@seed-design/codemod 0.0.16 → 0.0.17

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.
Files changed (2) hide show
  1. package/bin/index.cjs +58 -16
  2. package/package.json +3 -3
package/bin/index.cjs CHANGED
@@ -1,24 +1,66 @@
1
1
  #!/usr/bin/env node
2
- var pl=Object.create;var Cn=Object.defineProperty;var ml=Object.getOwnPropertyDescriptor;var gl=Object.getOwnPropertyNames;var vl=Object.getPrototypeOf,yl=Object.prototype.hasOwnProperty;var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var _l=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of gl(e))!yl.call(t,n)&&n!==r&&Cn(t,n,{get:()=>e[n],enumerable:!(s=ml(e,n))||s.enumerable});return t};var Fe=(t,e,r)=>(r=t!=null?pl(vl(t)):{},_l(e||!t||!t.__esModule?Cn(r,"default",{value:t,enumerable:!0}):r,t));var Ct=x((Iy,Ln)=>{var Al="2.0.0",Il=Number.MAX_SAFE_INTEGER||9007199254740991,$l=16,Nl=250,Ll=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Ln.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:$l,MAX_SAFE_BUILD_LENGTH:Nl,MAX_SAFE_INTEGER:Il,RELEASE_TYPES:Ll,SEMVER_SPEC_VERSION:Al,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ot=x(($y,Pn)=>{var Pl=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Pn.exports=Pl});var ct=x((_e,jn)=>{var{MAX_SAFE_COMPONENT_LENGTH:ss,MAX_SAFE_BUILD_LENGTH:jl,MAX_LENGTH:Fl}=Ct(),Dl=Ot();_e=jn.exports={};var Ml=_e.re=[],ql=_e.safeRe=[],_=_e.src=[],Bl=_e.safeSrc=[],b=_e.t={},Gl=0,ns="[a-zA-Z0-9-]",Ul=[["\\s",1],["\\d",Fl],[ns,jl]],Vl=t=>{for(let[e,r]of Ul)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},O=(t,e,r)=>{let s=Vl(e),n=Gl++;Dl(t,n,e),b[t]=n,_[n]=e,Bl[n]=s,Ml[n]=new RegExp(e,r?"g":void 0),ql[n]=new RegExp(s,r?"g":void 0)};O("NUMERICIDENTIFIER","0|[1-9]\\d*");O("NUMERICIDENTIFIERLOOSE","\\d+");O("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${ns}*`);O("MAINVERSION",`(${_[b.NUMERICIDENTIFIER]})\\.(${_[b.NUMERICIDENTIFIER]})\\.(${_[b.NUMERICIDENTIFIER]})`);O("MAINVERSIONLOOSE",`(${_[b.NUMERICIDENTIFIERLOOSE]})\\.(${_[b.NUMERICIDENTIFIERLOOSE]})\\.(${_[b.NUMERICIDENTIFIERLOOSE]})`);O("PRERELEASEIDENTIFIER",`(?:${_[b.NUMERICIDENTIFIER]}|${_[b.NONNUMERICIDENTIFIER]})`);O("PRERELEASEIDENTIFIERLOOSE",`(?:${_[b.NUMERICIDENTIFIERLOOSE]}|${_[b.NONNUMERICIDENTIFIER]})`);O("PRERELEASE",`(?:-(${_[b.PRERELEASEIDENTIFIER]}(?:\\.${_[b.PRERELEASEIDENTIFIER]})*))`);O("PRERELEASELOOSE",`(?:-?(${_[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[b.PRERELEASEIDENTIFIERLOOSE]})*))`);O("BUILDIDENTIFIER",`${ns}+`);O("BUILD",`(?:\\+(${_[b.BUILDIDENTIFIER]}(?:\\.${_[b.BUILDIDENTIFIER]})*))`);O("FULLPLAIN",`v?${_[b.MAINVERSION]}${_[b.PRERELEASE]}?${_[b.BUILD]}?`);O("FULL",`^${_[b.FULLPLAIN]}$`);O("LOOSEPLAIN",`[v=\\s]*${_[b.MAINVERSIONLOOSE]}${_[b.PRERELEASELOOSE]}?${_[b.BUILD]}?`);O("LOOSE",`^${_[b.LOOSEPLAIN]}$`);O("GTLT","((?:<|>)?=?)");O("XRANGEIDENTIFIERLOOSE",`${_[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);O("XRANGEIDENTIFIER",`${_[b.NUMERICIDENTIFIER]}|x|X|\\*`);O("XRANGEPLAIN",`[v=\\s]*(${_[b.XRANGEIDENTIFIER]})(?:\\.(${_[b.XRANGEIDENTIFIER]})(?:\\.(${_[b.XRANGEIDENTIFIER]})(?:${_[b.PRERELEASE]})?${_[b.BUILD]}?)?)?`);O("XRANGEPLAINLOOSE",`[v=\\s]*(${_[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[b.XRANGEIDENTIFIERLOOSE]})(?:${_[b.PRERELEASELOOSE]})?${_[b.BUILD]}?)?)?`);O("XRANGE",`^${_[b.GTLT]}\\s*${_[b.XRANGEPLAIN]}$`);O("XRANGELOOSE",`^${_[b.GTLT]}\\s*${_[b.XRANGEPLAINLOOSE]}$`);O("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ss}})(?:\\.(\\d{1,${ss}}))?(?:\\.(\\d{1,${ss}}))?`);O("COERCE",`${_[b.COERCEPLAIN]}(?:$|[^\\d])`);O("COERCEFULL",_[b.COERCEPLAIN]+`(?:${_[b.PRERELEASE]})?(?:${_[b.BUILD]})?(?:$|[^\\d])`);O("COERCERTL",_[b.COERCE],!0);O("COERCERTLFULL",_[b.COERCEFULL],!0);O("LONETILDE","(?:~>?)");O("TILDETRIM",`(\\s*)${_[b.LONETILDE]}\\s+`,!0);_e.tildeTrimReplace="$1~";O("TILDE",`^${_[b.LONETILDE]}${_[b.XRANGEPLAIN]}$`);O("TILDELOOSE",`^${_[b.LONETILDE]}${_[b.XRANGEPLAINLOOSE]}$`);O("LONECARET","(?:\\^)");O("CARETTRIM",`(\\s*)${_[b.LONECARET]}\\s+`,!0);_e.caretTrimReplace="$1^";O("CARET",`^${_[b.LONECARET]}${_[b.XRANGEPLAIN]}$`);O("CARETLOOSE",`^${_[b.LONECARET]}${_[b.XRANGEPLAINLOOSE]}$`);O("COMPARATORLOOSE",`^${_[b.GTLT]}\\s*(${_[b.LOOSEPLAIN]})$|^$`);O("COMPARATOR",`^${_[b.GTLT]}\\s*(${_[b.FULLPLAIN]})$|^$`);O("COMPARATORTRIM",`(\\s*)${_[b.GTLT]}\\s*(${_[b.LOOSEPLAIN]}|${_[b.XRANGEPLAIN]})`,!0);_e.comparatorTrimReplace="$1$2$3";O("HYPHENRANGE",`^\\s*(${_[b.XRANGEPLAIN]})\\s+-\\s+(${_[b.XRANGEPLAIN]})\\s*$`);O("HYPHENRANGELOOSE",`^\\s*(${_[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${_[b.XRANGEPLAINLOOSE]})\\s*$`);O("STAR","(<|>)?=?\\s*\\*");O("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");O("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var rr=x((Ny,Fn)=>{var Zl=Object.freeze({loose:!0}),zl=Object.freeze({}),Wl=t=>t?typeof t!="object"?Zl:t:zl;Fn.exports=Wl});var is=x((Ly,qn)=>{var Dn=/^[0-9]+$/,Mn=(t,e)=>{let r=Dn.test(t),s=Dn.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},Xl=(t,e)=>Mn(e,t);qn.exports={compareIdentifiers:Mn,rcompareIdentifiers:Xl}});var z=x((Py,Vn)=>{var sr=Ot(),{MAX_LENGTH:Bn,MAX_SAFE_INTEGER:nr}=Ct(),{safeRe:Gn,safeSrc:Un,t:ir}=ct(),Hl=rr(),{compareIdentifiers:ut}=is(),as=class t{constructor(e,r){if(r=Hl(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>Bn)throw new TypeError(`version is longer than ${Bn} characters`);sr("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?Gn[ir.LOOSE]:Gn[ir.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>nr||this.major<0)throw new TypeError("Invalid major version");if(this.minor>nr||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>nr||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let i=+n;if(i>=0&&i<nr)return i}return n}):this.prerelease=[],this.build=s[5]?s[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(e){if(sr("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),ut(this.major,e.major)||ut(this.minor,e.minor)||ut(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{let s=this.prerelease[r],n=e.prerelease[r];if(sr("prerelease compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return ut(s,n)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],n=e.build[r];if(sr("build compare",r,s,n),s===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(s===void 0)return-1;if(s===n)continue;return ut(s,n)}while(++r)}inc(e,r,s){if(e.startsWith("pre")){if(!r&&s===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=new RegExp(`^${this.options.loose?Un[ir.PRERELEASELOOSE]:Un[ir.PRERELEASE]}$`),i=`-${r}`.match(n);if(!i||i[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,s),this.inc("pre",r,s);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,s),this.inc("pre",r,s);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 n=Number(s)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&s===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let i=[r,n];s===!1&&(i=[r]),ut(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Vn.exports=as});var De=x((jy,zn)=>{var Zn=z(),Yl=(t,e,r=!1)=>{if(t instanceof Zn)return t;try{return new Zn(t,e)}catch(s){if(!r)return null;throw s}};zn.exports=Yl});var Xn=x((Fy,Wn)=>{var Kl=De(),Jl=(t,e)=>{let r=Kl(t,e);return r?r.version:null};Wn.exports=Jl});var Yn=x((Dy,Hn)=>{var Ql=De(),ed=(t,e)=>{let r=Ql(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Hn.exports=ed});var Qn=x((My,Jn)=>{var Kn=z(),td=(t,e,r,s,n)=>{typeof r=="string"&&(n=s,s=r,r=void 0);try{return new Kn(t instanceof Kn?t.version:t,r).inc(e,s,n).version}catch{return null}};Jn.exports=td});var ri=x((qy,ti)=>{var ei=De(),rd=(t,e)=>{let r=ei(t,null,!0),s=ei(e,null,!0),n=r.compare(s);if(n===0)return null;let i=n>0,a=i?r:s,o=i?s:r,c=!!a.prerelease.length;if(!!o.prerelease.length&&!c){if(!o.patch&&!o.minor)return"major";if(o.compareMain(a)===0)return o.minor&&!o.patch?"minor":"patch"}let l=c?"pre":"";return r.major!==s.major?l+"major":r.minor!==s.minor?l+"minor":r.patch!==s.patch?l+"patch":"prerelease"};ti.exports=rd});var ni=x((By,si)=>{var sd=z(),nd=(t,e)=>new sd(t,e).major;si.exports=nd});var ai=x((Gy,ii)=>{var id=z(),ad=(t,e)=>new id(t,e).minor;ii.exports=ad});var ci=x((Uy,oi)=>{var od=z(),cd=(t,e)=>new od(t,e).patch;oi.exports=cd});var li=x((Vy,ui)=>{var ud=De(),ld=(t,e)=>{let r=ud(t,e);return r&&r.prerelease.length?r.prerelease:null};ui.exports=ld});var le=x((Zy,fi)=>{var di=z(),dd=(t,e,r)=>new di(t,r).compare(new di(e,r));fi.exports=dd});var pi=x((zy,hi)=>{var fd=le(),hd=(t,e,r)=>fd(e,t,r);hi.exports=hd});var gi=x((Wy,mi)=>{var pd=le(),md=(t,e)=>pd(t,e,!0);mi.exports=md});var ar=x((Xy,yi)=>{var vi=z(),gd=(t,e,r)=>{let s=new vi(t,r),n=new vi(e,r);return s.compare(n)||s.compareBuild(n)};yi.exports=gd});var bi=x((Hy,_i)=>{var vd=ar(),yd=(t,e)=>t.sort((r,s)=>vd(r,s,e));_i.exports=yd});var wi=x((Yy,ki)=>{var _d=ar(),bd=(t,e)=>t.sort((r,s)=>_d(s,r,e));ki.exports=bd});var St=x((Ky,xi)=>{var kd=le(),wd=(t,e,r)=>kd(t,e,r)>0;xi.exports=wd});var or=x((Jy,Ti)=>{var xd=le(),Td=(t,e,r)=>xd(t,e,r)<0;Ti.exports=Td});var os=x((Qy,Ei)=>{var Ed=le(),Rd=(t,e,r)=>Ed(t,e,r)===0;Ei.exports=Rd});var cs=x((e_,Ri)=>{var Cd=le(),Od=(t,e,r)=>Cd(t,e,r)!==0;Ri.exports=Od});var cr=x((t_,Ci)=>{var Sd=le(),Ad=(t,e,r)=>Sd(t,e,r)>=0;Ci.exports=Ad});var ur=x((r_,Oi)=>{var Id=le(),$d=(t,e,r)=>Id(t,e,r)<=0;Oi.exports=$d});var us=x((s_,Si)=>{var Nd=os(),Ld=cs(),Pd=St(),jd=cr(),Fd=or(),Dd=ur(),Md=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return Nd(t,r,s);case"!=":return Ld(t,r,s);case">":return Pd(t,r,s);case">=":return jd(t,r,s);case"<":return Fd(t,r,s);case"<=":return Dd(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};Si.exports=Md});var Ii=x((n_,Ai)=>{var qd=z(),Bd=De(),{safeRe:lr,t:dr}=ct(),Gd=(t,e)=>{if(t instanceof qd)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?lr[dr.COERCEFULL]:lr[dr.COERCE]);else{let c=e.includePrerelease?lr[dr.COERCERTLFULL]:lr[dr.COERCERTL],u;for(;(u=c.exec(t))&&(!r||r.index+r[0].length!==t.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 s=r[2],n=r[3]||"0",i=r[4]||"0",a=e.includePrerelease&&r[5]?`-${r[5]}`:"",o=e.includePrerelease&&r[6]?`+${r[6]}`:"";return Bd(`${s}.${n}.${i}${a}${o}`,e)};Ai.exports=Gd});var Ni=x((i_,$i)=>{var ls=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(e,r)}return this}};$i.exports=ls});var de=x((a_,Fi)=>{var Ud=/\s+/g,ds=class t{constructor(e,r){if(r=Zd(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof fs)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(Ud," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(n=>!Pi(n[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Jd(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Yd)|(this.options.loose&&Kd))+":"+e,n=Li.get(s);if(n)return n;let i=this.options.loose,a=i?ee[Y.HYPHENRANGELOOSE]:ee[Y.HYPHENRANGE];e=e.replace(a,uf(this.options.includePrerelease)),j("hyphen replace",e),e=e.replace(ee[Y.COMPARATORTRIM],Wd),j("comparator trim",e),e=e.replace(ee[Y.TILDETRIM],Xd),j("tilde trim",e),e=e.replace(ee[Y.CARETTRIM],Hd),j("caret trim",e);let o=e.split(" ").map(d=>Qd(d,this.options)).join(" ").split(/\s+/).map(d=>cf(d,this.options));i&&(o=o.filter(d=>(j("loose invalid filter",d,this.options),!!d.match(ee[Y.COMPARATORLOOSE])))),j("range list",o);let c=new Map,u=o.map(d=>new fs(d,this.options));for(let d of u){if(Pi(d))return[d];c.set(d.value,d)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Li.set(s,l),l}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>ji(s,r)&&e.set.some(n=>ji(n,r)&&s.every(i=>n.every(a=>i.intersects(a,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new zd(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(lf(this.set[r],e,this.options))return!0;return!1}};Fi.exports=ds;var Vd=Ni(),Li=new Vd,Zd=rr(),fs=At(),j=Ot(),zd=z(),{safeRe:ee,t:Y,comparatorTrimReplace:Wd,tildeTrimReplace:Xd,caretTrimReplace:Hd}=ct(),{FLAG_INCLUDE_PRERELEASE:Yd,FLAG_LOOSE:Kd}=Ct(),Pi=t=>t.value==="<0.0.0-0",Jd=t=>t.value==="",ji=(t,e)=>{let r=!0,s=t.slice(),n=s.pop();for(;r&&s.length;)r=s.every(i=>n.intersects(i,e)),n=s.pop();return r},Qd=(t,e)=>(j("comp",t,e),t=rf(t,e),j("caret",t),t=ef(t,e),j("tildes",t),t=nf(t,e),j("xrange",t),t=of(t,e),j("stars",t),t),K=t=>!t||t.toLowerCase()==="x"||t==="*",ef=(t,e)=>t.trim().split(/\s+/).map(r=>tf(r,e)).join(" "),tf=(t,e)=>{let r=e.loose?ee[Y.TILDELOOSE]:ee[Y.TILDE];return t.replace(r,(s,n,i,a,o)=>{j("tilde",t,s,n,i,a,o);let c;return K(n)?c="":K(i)?c=`>=${n}.0.0 <${+n+1}.0.0-0`:K(a)?c=`>=${n}.${i}.0 <${n}.${+i+1}.0-0`:o?(j("replaceTilde pr",o),c=`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`):c=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,j("tilde return",c),c})},rf=(t,e)=>t.trim().split(/\s+/).map(r=>sf(r,e)).join(" "),sf=(t,e)=>{j("caret",t,e);let r=e.loose?ee[Y.CARETLOOSE]:ee[Y.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(n,i,a,o,c)=>{j("caret",t,n,i,a,o,c);let u;return K(i)?u="":K(a)?u=`>=${i}.0.0${s} <${+i+1}.0.0-0`:K(o)?i==="0"?u=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`:u=`>=${i}.${a}.0${s} <${+i+1}.0.0-0`:c?(j("replaceCaret pr",c),i==="0"?a==="0"?u=`>=${i}.${a}.${o}-${c} <${i}.${a}.${+o+1}-0`:u=`>=${i}.${a}.${o}-${c} <${i}.${+a+1}.0-0`:u=`>=${i}.${a}.${o}-${c} <${+i+1}.0.0-0`):(j("no pr"),i==="0"?a==="0"?u=`>=${i}.${a}.${o}${s} <${i}.${a}.${+o+1}-0`:u=`>=${i}.${a}.${o}${s} <${i}.${+a+1}.0-0`:u=`>=${i}.${a}.${o} <${+i+1}.0.0-0`),j("caret return",u),u})},nf=(t,e)=>(j("replaceXRanges",t,e),t.split(/\s+/).map(r=>af(r,e)).join(" ")),af=(t,e)=>{t=t.trim();let r=e.loose?ee[Y.XRANGELOOSE]:ee[Y.XRANGE];return t.replace(r,(s,n,i,a,o,c)=>{j("xRange",t,s,n,i,a,o,c);let u=K(i),l=u||K(a),d=l||K(o),h=d;return n==="="&&h&&(n=""),c=e.includePrerelease?"-0":"",u?n===">"||n==="<"?s="<0.0.0-0":s="*":n&&h?(l&&(a=0),o=0,n===">"?(n=">=",l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):n==="<="&&(n="<",l?i=+i+1:a=+a+1),n==="<"&&(c="-0"),s=`${n+i}.${a}.${o}${c}`):l?s=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(s=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),j("xRange return",s),s})},of=(t,e)=>(j("replaceStars",t,e),t.trim().replace(ee[Y.STAR],"")),cf=(t,e)=>(j("replaceGTE0",t,e),t.trim().replace(ee[e.includePrerelease?Y.GTE0PRE:Y.GTE0],"")),uf=t=>(e,r,s,n,i,a,o,c,u,l,d,h)=>(K(s)?r="":K(n)?r=`>=${s}.0.0${t?"-0":""}`:K(i)?r=`>=${s}.${n}.0${t?"-0":""}`:a?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,K(u)?c="":K(l)?c=`<${+u+1}.0.0-0`:K(d)?c=`<${u}.${+l+1}.0-0`:h?c=`<=${u}.${l}.${d}-${h}`:t?c=`<${u}.${l}.${+d+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),lf=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(j(t[s].semver),t[s].semver!==fs.ANY&&t[s].semver.prerelease.length>0){let n=t[s].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var At=x((o_,Ui)=>{var It=Symbol("SemVer ANY"),ms=class t{static get ANY(){return It}constructor(e,r){if(r=Di(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ps("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===It?this.value="":this.value=this.operator+this.semver.version,ps("comp",this)}parse(e){let r=this.options.loose?Mi[qi.COMPARATORLOOSE]:Mi[qi.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Bi(s[2],this.options.loose):this.semver=It}toString(){return this.value}test(e){if(ps("Comparator.test",e,this.options.loose),this.semver===It||e===It)return!0;if(typeof e=="string")try{e=new Bi(e,this.options)}catch{return!1}return hs(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Gi(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Gi(this.value,r).test(e.semver):(r=Di(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||hs(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||hs(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Ui.exports=ms;var Di=rr(),{safeRe:Mi,t:qi}=ct(),hs=us(),ps=Ot(),Bi=z(),Gi=de()});var $t=x((c_,Vi)=>{var df=de(),ff=(t,e,r)=>{try{e=new df(e,r)}catch{return!1}return e.test(t)};Vi.exports=ff});var zi=x((u_,Zi)=>{var hf=de(),pf=(t,e)=>new hf(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Zi.exports=pf});var Xi=x((l_,Wi)=>{var mf=z(),gf=de(),vf=(t,e,r)=>{let s=null,n=null,i=null;try{i=new gf(e,r)}catch{return null}return t.forEach(a=>{i.test(a)&&(!s||n.compare(a)===-1)&&(s=a,n=new mf(s,r))}),s};Wi.exports=vf});var Yi=x((d_,Hi)=>{var yf=z(),_f=de(),bf=(t,e,r)=>{let s=null,n=null,i=null;try{i=new _f(e,r)}catch{return null}return t.forEach(a=>{i.test(a)&&(!s||n.compare(a)===1)&&(s=a,n=new yf(s,r))}),s};Hi.exports=bf});var Qi=x((f_,Ji)=>{var gs=z(),kf=de(),Ki=St(),wf=(t,e)=>{t=new kf(t,e);let r=new gs("0.0.0");if(t.test(r)||(r=new gs("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let n=t.set[s],i=null;n.forEach(a=>{let o=new gs(a.semver.version);switch(a.operator){case">":o.prerelease.length===0?o.patch++:o.prerelease.push(0),o.raw=o.format();case"":case">=":(!i||Ki(o,i))&&(i=o);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),i&&(!r||Ki(r,i))&&(r=i)}return r&&t.test(r)?r:null};Ji.exports=wf});var ta=x((h_,ea)=>{var xf=de(),Tf=(t,e)=>{try{return new xf(t,e).range||"*"}catch{return null}};ea.exports=Tf});var fr=x((p_,ia)=>{var Ef=z(),na=At(),{ANY:Rf}=na,Cf=de(),Of=$t(),ra=St(),sa=or(),Sf=ur(),Af=cr(),If=(t,e,r,s)=>{t=new Ef(t,s),e=new Cf(e,s);let n,i,a,o,c;switch(r){case">":n=ra,i=Sf,a=sa,o=">",c=">=";break;case"<":n=sa,i=Af,a=ra,o="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Of(t,e,s))return!1;for(let u=0;u<e.set.length;++u){let l=e.set[u],d=null,h=null;if(l.forEach(f=>{f.semver===Rf&&(f=new na(">=0.0.0")),d=d||f,h=h||f,n(f.semver,d.semver,s)?d=f:a(f.semver,h.semver,s)&&(h=f)}),d.operator===o||d.operator===c||(!h.operator||h.operator===o)&&i(t,h.semver))return!1;if(h.operator===c&&a(t,h.semver))return!1}return!0};ia.exports=If});var oa=x((m_,aa)=>{var $f=fr(),Nf=(t,e,r)=>$f(t,e,">",r);aa.exports=Nf});var ua=x((g_,ca)=>{var Lf=fr(),Pf=(t,e,r)=>Lf(t,e,"<",r);ca.exports=Pf});var fa=x((v_,da)=>{var la=de(),jf=(t,e,r)=>(t=new la(t,r),e=new la(e,r),t.intersects(e,r));da.exports=jf});var pa=x((y_,ha)=>{var Ff=$t(),Df=le();ha.exports=(t,e,r)=>{let s=[],n=null,i=null,a=t.sort((l,d)=>Df(l,d,r));for(let l of a)Ff(l,e,r)?(i=l,n||(n=l)):(i&&s.push([n,i]),i=null,n=null);n&&s.push([n,null]);let o=[];for(let[l,d]of s)l===d?o.push(l):!d&&l===a[0]?o.push("*"):d?l===a[0]?o.push(`<=${d}`):o.push(`${l} - ${d}`):o.push(`>=${l}`);let c=o.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return c.length<u.length?c:e}});var ba=x((__,_a)=>{var ma=de(),ys=At(),{ANY:vs}=ys,Nt=$t(),_s=le(),Mf=(t,e,r={})=>{if(t===e)return!0;t=new ma(t,r),e=new ma(e,r);let s=!1;e:for(let n of t.set){for(let i of e.set){let a=Bf(n,i,r);if(s=s||a!==null,a)continue e}if(s)return!1}return!0},qf=[new ys(">=0.0.0-0")],ga=[new ys(">=0.0.0")],Bf=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===vs){if(e.length===1&&e[0].semver===vs)return!0;r.includePrerelease?t=qf:t=ga}if(e.length===1&&e[0].semver===vs){if(r.includePrerelease)return!0;e=ga}let s=new Set,n,i;for(let f of t)f.operator===">"||f.operator===">="?n=va(n,f,r):f.operator==="<"||f.operator==="<="?i=ya(i,f,r):s.add(f.semver);if(s.size>1)return null;let a;if(n&&i){if(a=_s(n.semver,i.semver,r),a>0)return null;if(a===0&&(n.operator!==">="||i.operator!=="<="))return null}for(let f of s){if(n&&!Nt(f,String(n),r)||i&&!Nt(f,String(i),r))return null;for(let F of e)if(!Nt(f,String(F),r))return!1;return!0}let o,c,u,l,d=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,h=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;d&&d.prerelease.length===1&&i.operator==="<"&&d.prerelease[0]===0&&(d=!1);for(let f of e){if(l=l||f.operator===">"||f.operator===">=",u=u||f.operator==="<"||f.operator==="<=",n){if(h&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===h.major&&f.semver.minor===h.minor&&f.semver.patch===h.patch&&(h=!1),f.operator===">"||f.operator===">="){if(o=va(n,f,r),o===f&&o!==n)return!1}else if(n.operator===">="&&!Nt(n.semver,String(f),r))return!1}if(i){if(d&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===d.major&&f.semver.minor===d.minor&&f.semver.patch===d.patch&&(d=!1),f.operator==="<"||f.operator==="<="){if(c=ya(i,f,r),c===f&&c!==i)return!1}else if(i.operator==="<="&&!Nt(i.semver,String(f),r))return!1}if(!f.operator&&(i||n)&&a!==0)return!1}return!(n&&u&&!i&&a!==0||i&&l&&!n&&a!==0||h||d)},va=(t,e,r)=>{if(!t)return e;let s=_s(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},ya=(t,e,r)=>{if(!t)return e;let s=_s(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};_a.exports=Mf});var Ta=x((b_,xa)=>{var bs=ct(),ka=Ct(),Gf=z(),wa=is(),Uf=De(),Vf=Xn(),Zf=Yn(),zf=Qn(),Wf=ri(),Xf=ni(),Hf=ai(),Yf=ci(),Kf=li(),Jf=le(),Qf=pi(),eh=gi(),th=ar(),rh=bi(),sh=wi(),nh=St(),ih=or(),ah=os(),oh=cs(),ch=cr(),uh=ur(),lh=us(),dh=Ii(),fh=At(),hh=de(),ph=$t(),mh=zi(),gh=Xi(),vh=Yi(),yh=Qi(),_h=ta(),bh=fr(),kh=oa(),wh=ua(),xh=fa(),Th=pa(),Eh=ba();xa.exports={parse:Uf,valid:Vf,clean:Zf,inc:zf,diff:Wf,major:Xf,minor:Hf,patch:Yf,prerelease:Kf,compare:Jf,rcompare:Qf,compareLoose:eh,compareBuild:th,sort:rh,rsort:sh,gt:nh,lt:ih,eq:ah,neq:oh,gte:ch,lte:uh,cmp:lh,coerce:dh,Comparator:fh,Range:hh,satisfies:ph,toComparators:mh,maxSatisfying:gh,minSatisfying:vh,minVersion:yh,validRange:_h,outside:bh,gtr:kh,ltr:wh,intersects:xh,simplifyRange:Th,subset:Eh,SemVer:Gf,re:bs.re,src:bs.src,tokens:bs.t,SEMVER_SPEC_VERSION:ka.SEMVER_SPEC_VERSION,RELEASE_TYPES:ka.RELEASE_TYPES,compareIdentifiers:wa.compareIdentifiers,rcompareIdentifiers:wa.rcompareIdentifiers}});var qa=x((T_,Ma)=>{var yt=1e3,_t=yt*60,bt=_t*60,tt=bt*24,Lp=tt*7,Pp=tt*365.25;Ma.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return jp(t);if(r==="number"&&isFinite(t))return e.long?Dp(t):Fp(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function jp(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),s=(e[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return r*Pp;case"weeks":case"week":case"w":return r*Lp;case"days":case"day":case"d":return r*tt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*bt;case"minutes":case"minute":case"mins":case"min":case"m":return r*_t;case"seconds":case"second":case"secs":case"sec":case"s":return r*yt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Fp(t){var e=Math.abs(t);return e>=tt?Math.round(t/tt)+"d":e>=bt?Math.round(t/bt)+"h":e>=_t?Math.round(t/_t)+"m":e>=yt?Math.round(t/yt)+"s":t+"ms"}function Dp(t){var e=Math.abs(t);return e>=tt?_r(t,e,tt,"day"):e>=bt?_r(t,e,bt,"hour"):e>=_t?_r(t,e,_t,"minute"):e>=yt?_r(t,e,yt,"second"):t+" ms"}function _r(t,e,r,s){var n=e>=r*1.5;return Math.round(t/r)+" "+s+(n?"s":"")}});var Rs=x((E_,Ba)=>{function Mp(t){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=n,r.enabled=o,r.humanize=qa(),r.destroy=u,Object.keys(t).forEach(l=>{r[l]=t[l]}),r.names=[],r.skips=[],r.formatters={};function e(l){let d=0;for(let h=0;h<l.length;h++)d=(d<<5)-d+l.charCodeAt(h),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=e;function r(l){let d,h=null,f,F;function D(...U){if(!D.enabled)return;let Te=D,at=Number(new Date),Yr=at-(d||at);Te.diff=Yr,Te.prev=d,Te.curr=at,d=at,U[0]=r.coerce(U[0]),typeof U[0]!="string"&&U.unshift("%O");let ot=0;U[0]=U[0].replace(/%([a-zA-Z%])/g,(Et,Kr)=>{if(Et==="%%")return"%";ot++;let Jt=r.formatters[Kr];if(typeof Jt=="function"){let Jr=U[ot];Et=Jt.call(Te,Jr),U.splice(ot,1),ot--}return Et}),r.formatArgs.call(Te,U),(Te.log||r.log).apply(Te,U)}return D.namespace=l,D.useColors=r.useColors(),D.color=r.selectColor(l),D.extend=s,D.destroy=r.destroy,Object.defineProperty(D,"enabled",{enumerable:!0,configurable:!1,get:()=>h!==null?h:(f!==r.namespaces&&(f=r.namespaces,F=r.enabled(l)),F),set:U=>{h=U}}),typeof r.init=="function"&&r.init(D),D}function s(l,d){let h=r(this.namespace+(typeof d>"u"?":":d)+l);return h.log=this.log,h}function n(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let d=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let h of d)h[0]==="-"?r.skips.push(h.slice(1)):r.names.push(h)}function i(l,d){let h=0,f=0,F=-1,D=0;for(;h<l.length;)if(f<d.length&&(d[f]===l[h]||d[f]==="*"))d[f]==="*"?(F=f,D=h,f++):(h++,f++);else if(F!==-1)f=F+1,D++,h=D;else return!1;for(;f<d.length&&d[f]==="*";)f++;return f===d.length}function a(){let l=[...r.names,...r.skips.map(d=>"-"+d)].join(",");return r.enable(""),l}function o(l){for(let d of r.skips)if(i(l,d))return!1;for(let d of r.names)if(i(l,d))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}Ba.exports=Mp});var Ga=x((oe,br)=>{oe.formatArgs=Bp;oe.save=Gp;oe.load=Up;oe.useColors=qp;oe.storage=Vp();oe.destroy=(()=>{let t=!1;return()=>{t||(t=!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`."))}})();oe.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 qp(){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 t;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&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Bp(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+br.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(s=r))}),t.splice(s,0,e)}oe.log=console.debug||console.log||(()=>{});function Gp(t){try{t?oe.storage.setItem("debug",t):oe.storage.removeItem("debug")}catch{}}function Up(){let t;try{t=oe.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function Vp(){try{return localStorage}catch{}}br.exports=Rs()(oe);var{formatters:Zp}=br.exports;Zp.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Va=x((R_,Ua)=>{"use strict";Ua.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),n=e.indexOf("--");return s!==-1&&(n===-1||s<n)}});var Wa=x((C_,za)=>{"use strict";var zp=require("os"),Za=require("tty"),pe=Va(),{env:V}=process,kr;pe("no-color")||pe("no-colors")||pe("color=false")||pe("color=never")?kr=0:(pe("color")||pe("colors")||pe("color=true")||pe("color=always"))&&(kr=1);function Wp(){if("FORCE_COLOR"in V)return V.FORCE_COLOR==="true"?1:V.FORCE_COLOR==="false"?0:V.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(V.FORCE_COLOR,10),3)}function Xp(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Hp(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let s=Wp();s!==void 0&&(kr=s);let n=r?kr:s;if(n===0)return 0;if(r){if(pe("color=16m")||pe("color=full")||pe("color=truecolor"))return 3;if(pe("color=256"))return 2}if(t&&!e&&n===void 0)return 0;let i=n||0;if(V.TERM==="dumb")return i;if(process.platform==="win32"){let a=zp.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in V)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(a=>a in V)||V.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in V)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(V.TEAMCITY_VERSION)?1:0;if(V.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in V){let a=Number.parseInt((V.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(V.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(V.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(V.TERM)||"COLORTERM"in V?1:i}function Cs(t,e={}){let r=Hp(t,{streamIsTTY:t&&t.isTTY,...e});return Xp(r)}za.exports={supportsColor:Cs,stdout:Cs({isTTY:Za.isatty(1)}),stderr:Cs({isTTY:Za.isatty(2)})}});var Ha=x((Z,xr)=>{var Yp=require("tty"),wr=require("util");Z.init=sm;Z.log=em;Z.formatArgs=Jp;Z.save=tm;Z.load=rm;Z.useColors=Kp;Z.destroy=wr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Z.colors=[6,2,3,4,5,1];try{let t=Wa();t&&(t.stderr||t).level>=2&&(Z.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{}Z.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,i)=>i.toUpperCase()),s=process.env[e];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s==="null"?s=null:s=Number(s),t[r]=s,t},{});function Kp(){return"colors"in Z.inspectOpts?!!Z.inspectOpts.colors:Yp.isatty(process.stderr.fd)}function Jp(t){let{namespace:e,useColors:r}=this;if(r){let s=this.color,n="\x1B[3"+(s<8?s:"8;5;"+s),i=` ${n};1m${e} \x1B[0m`;t[0]=i+t[0].split(`
2
+ var bS=Object.create;var Vc=Object.defineProperty;var wS=Object.getOwnPropertyDescriptor;var SS=Object.getOwnPropertyNames;var xS=Object.getPrototypeOf,vS=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var _S=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of SS(t))!vS.call(e,s)&&s!==r&&Vc(e,s,{get:()=>t[s],enumerable:!(n=wS(t,s))||n.enumerable});return e};var q=(e,t,r)=>(r=e!=null?bS(xS(e)):{},_S(t||!e||!e.__esModule?Vc(r,"default",{value:e,enumerable:!0}):r,e));var Mu=w((hL,Pu)=>{Pu.exports=Nu;Nu.sync=Ox;var Du=require("fs");function Tx(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var n=0;n<r.length;n++){var s=r[n].toLowerCase();if(s&&e.substr(-s.length).toLowerCase()===s)return!0}return!1}function Lu(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:Tx(t,r)}function Nu(e,t,r){Du.stat(e,function(n,s){r(n,n?!1:Lu(s,e,t))})}function Ox(e,t){return Lu(Du.statSync(e),e,t)}});var Gu=w((gL,Uu)=>{Uu.exports=ju;ju.sync=Rx;var Fu=require("fs");function ju(e,t,r){Fu.stat(e,function(n,s){r(n,n?!1:Bu(s,t))})}function Rx(e,t){return Bu(Fu.statSync(e),t)}function Bu(e,t){return e.isFile()&&kx(e,t)}function kx(e,t){var r=e.mode,n=e.uid,s=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),i=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),u=parseInt("001",8),l=a|c,f=r&u||r&c&&s===i||r&a&&n===o||r&l&&o===0;return f}});var Vu=w((bL,qu)=>{var yL=require("fs"),Mn;process.platform==="win32"||global.TESTING_WINDOWS?Mn=Mu():Mn=Gu();qu.exports=Zo;Zo.sync=Cx;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)})})}Mn(e,t||{},function(n,s){n&&(n.code==="EACCES"||t&&t.ignoreErrors)&&(n=null,s=!1),r(n,s)})}function Cx(e,t){try{return Mn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var Ku=w((wL,Xu)=>{var Xt=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",zu=require("path"),Ax=Xt?";":":",Wu=Vu(),Zu=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Hu=(e,t)=>{let r=t.colon||Ax,n=e.match(/\//)||Xt&&e.match(/\\/)?[""]:[...Xt?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],s=Xt?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=Xt?s.split(r):[""];return Xt&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:n,pathExt:o,pathExtExe:s}},Yu=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:n,pathExt:s,pathExtExe:o}=Hu(e,t),i=[],a=u=>new Promise((l,f)=>{if(u===n.length)return t.all&&i.length?l(i):f(Zu(e));let p=n[u],d=/^".*"$/.test(p)?p.slice(1,-1):p,b=zu.join(d,e),T=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+b:b;l(c(T,u,0))}),c=(u,l,f)=>new Promise((p,d)=>{if(f===s.length)return p(a(l+1));let b=s[f];Wu(u+b,{pathExt:o},(T,N)=>{if(!T&&N)if(t.all)i.push(u+b);else return p(u+b);return p(c(u,l,f+1))})});return r?a(0).then(u=>r(null,u),r):a(0)},Ix=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:n,pathExtExe:s}=Hu(e,t),o=[];for(let i=0;i<r.length;i++){let a=r[i],c=/^".*"$/.test(a)?a.slice(1,-1):a,u=zu.join(c,e),l=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let f=0;f<n.length;f++){let p=l+n[f];try{if(Wu.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 Zu(e)};Xu.exports=Yu;Yu.sync=Ix});var Qu=w((SL,Ho)=>{"use strict";var Ju=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"};Ho.exports=Ju;Ho.exports.default=Ju});var nl=w((xL,rl)=>{"use strict";var el=require("path"),$x=Ku(),Dx=Qu();function tl(e,t){let r=e.options.env||process.env,n=process.cwd(),s=e.options.cwd!=null,o=s&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let i;try{i=$x.sync(e.command,{path:r[Dx({env:r})],pathExt:t?el.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return i&&(i=el.resolve(s?e.options.cwd:"",i)),i}function Lx(e){return tl(e)||tl(e,!0)}rl.exports=Lx});var sl=w((vL,Xo)=>{"use strict";var Yo=/([()\][%!^"`<>&|;, *?])/g;function Nx(e){return e=e.replace(Yo,"^$1"),e}function Px(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(Yo,"^$1"),t&&(e=e.replace(Yo,"^$1")),e}Xo.exports.command=Nx;Xo.exports.argument=Px});var il=w((_L,ol)=>{"use strict";ol.exports=/^#!(.*)/});var cl=w((EL,al)=>{"use strict";var Mx=il();al.exports=(e="")=>{let t=e.match(Mx);if(!t)return null;let[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s}});var ll=w((TL,ul)=>{"use strict";var Ko=require("fs"),Fx=cl();function jx(e){let r=Buffer.alloc(150),n;try{n=Ko.openSync(e,"r"),Ko.readSync(n,r,0,150,0),Ko.closeSync(n)}catch{}return Fx(r.toString())}ul.exports=jx});var ml=w((OL,pl)=>{"use strict";var Bx=require("path"),fl=nl(),dl=sl(),Ux=ll(),Gx=process.platform==="win32",qx=/\.(?:com|exe)$/i,Vx=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function zx(e){e.file=fl(e);let t=e.file&&Ux(e.file);return t?(e.args.unshift(e.file),e.command=t,fl(e)):e.file}function Wx(e){if(!Gx)return e;let t=zx(e),r=!qx.test(t);if(e.options.forceShell||r){let n=Vx.test(t);e.command=Bx.normalize(e.command),e.command=dl.command(e.command),e.args=e.args.map(o=>dl.argument(o,n));let s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Zx(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:Wx(n)}pl.exports=Zx});var yl=w((RL,gl)=>{"use strict";var Jo=process.platform==="win32";function Qo(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 Hx(e,t){if(!Jo)return;let r=e.emit;e.emit=function(n,s){if(n==="exit"){let o=hl(s,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}function hl(e,t){return Jo&&e===1&&!t.file?Qo(t.original,"spawn"):null}function Yx(e,t){return Jo&&e===1&&!t.file?Qo(t.original,"spawnSync"):null}gl.exports={hookChildProcess:Hx,verifyENOENT:hl,verifyENOENTSync:Yx,notFoundError:Qo}});var Sl=w((kL,Kt)=>{"use strict";var bl=require("child_process"),ei=ml(),ti=yl();function wl(e,t,r){let n=ei(e,t,r),s=bl.spawn(n.command,n.args,n.options);return ti.hookChildProcess(s,n),s}function Xx(e,t,r){let n=ei(e,t,r),s=bl.spawnSync(n.command,n.args,n.options);return s.error=s.error||ti.verifyENOENTSync(s.status,n),s}Kt.exports=wl;Kt.exports.spawn=wl;Kt.exports.sync=Xx;Kt.exports._parse=ei;Kt.exports._enoent=ti});var Hr=w((hG,Gm)=>{var qT="2.0.0",VT=Number.MAX_SAFE_INTEGER||9007199254740991,zT=16,WT=250,ZT=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Gm.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:zT,MAX_SAFE_BUILD_LENGTH:WT,MAX_SAFE_INTEGER:VT,RELEASE_TYPES:ZT,SEMVER_SPEC_VERSION:qT,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Yr=w((gG,qm)=>{var HT=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};qm.exports=HT});var fr=w((ze,Vm)=>{var{MAX_SAFE_COMPONENT_LENGTH:va,MAX_SAFE_BUILD_LENGTH:YT,MAX_LENGTH:XT}=Hr(),KT=Yr();ze=Vm.exports={};var JT=ze.re=[],QT=ze.safeRe=[],x=ze.src=[],eO=ze.safeSrc=[],v=ze.t={},tO=0,_a="[a-zA-Z0-9-]",rO=[["\\s",1],["\\d",XT],[_a,YT]],nO=e=>{for(let[t,r]of rO)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},A=(e,t,r)=>{let n=nO(t),s=tO++;KT(e,s,t),v[e]=s,x[s]=t,eO[s]=n,JT[s]=new RegExp(t,r?"g":void 0),QT[s]=new RegExp(n,r?"g":void 0)};A("NUMERICIDENTIFIER","0|[1-9]\\d*");A("NUMERICIDENTIFIERLOOSE","\\d+");A("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${_a}*`);A("MAINVERSION",`(${x[v.NUMERICIDENTIFIER]})\\.(${x[v.NUMERICIDENTIFIER]})\\.(${x[v.NUMERICIDENTIFIER]})`);A("MAINVERSIONLOOSE",`(${x[v.NUMERICIDENTIFIERLOOSE]})\\.(${x[v.NUMERICIDENTIFIERLOOSE]})\\.(${x[v.NUMERICIDENTIFIERLOOSE]})`);A("PRERELEASEIDENTIFIER",`(?:${x[v.NUMERICIDENTIFIER]}|${x[v.NONNUMERICIDENTIFIER]})`);A("PRERELEASEIDENTIFIERLOOSE",`(?:${x[v.NUMERICIDENTIFIERLOOSE]}|${x[v.NONNUMERICIDENTIFIER]})`);A("PRERELEASE",`(?:-(${x[v.PRERELEASEIDENTIFIER]}(?:\\.${x[v.PRERELEASEIDENTIFIER]})*))`);A("PRERELEASELOOSE",`(?:-?(${x[v.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${x[v.PRERELEASEIDENTIFIERLOOSE]})*))`);A("BUILDIDENTIFIER",`${_a}+`);A("BUILD",`(?:\\+(${x[v.BUILDIDENTIFIER]}(?:\\.${x[v.BUILDIDENTIFIER]})*))`);A("FULLPLAIN",`v?${x[v.MAINVERSION]}${x[v.PRERELEASE]}?${x[v.BUILD]}?`);A("FULL",`^${x[v.FULLPLAIN]}$`);A("LOOSEPLAIN",`[v=\\s]*${x[v.MAINVERSIONLOOSE]}${x[v.PRERELEASELOOSE]}?${x[v.BUILD]}?`);A("LOOSE",`^${x[v.LOOSEPLAIN]}$`);A("GTLT","((?:<|>)?=?)");A("XRANGEIDENTIFIERLOOSE",`${x[v.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);A("XRANGEIDENTIFIER",`${x[v.NUMERICIDENTIFIER]}|x|X|\\*`);A("XRANGEPLAIN",`[v=\\s]*(${x[v.XRANGEIDENTIFIER]})(?:\\.(${x[v.XRANGEIDENTIFIER]})(?:\\.(${x[v.XRANGEIDENTIFIER]})(?:${x[v.PRERELEASE]})?${x[v.BUILD]}?)?)?`);A("XRANGEPLAINLOOSE",`[v=\\s]*(${x[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[v.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[v.XRANGEIDENTIFIERLOOSE]})(?:${x[v.PRERELEASELOOSE]})?${x[v.BUILD]}?)?)?`);A("XRANGE",`^${x[v.GTLT]}\\s*${x[v.XRANGEPLAIN]}$`);A("XRANGELOOSE",`^${x[v.GTLT]}\\s*${x[v.XRANGEPLAINLOOSE]}$`);A("COERCEPLAIN",`(^|[^\\d])(\\d{1,${va}})(?:\\.(\\d{1,${va}}))?(?:\\.(\\d{1,${va}}))?`);A("COERCE",`${x[v.COERCEPLAIN]}(?:$|[^\\d])`);A("COERCEFULL",x[v.COERCEPLAIN]+`(?:${x[v.PRERELEASE]})?(?:${x[v.BUILD]})?(?:$|[^\\d])`);A("COERCERTL",x[v.COERCE],!0);A("COERCERTLFULL",x[v.COERCEFULL],!0);A("LONETILDE","(?:~>?)");A("TILDETRIM",`(\\s*)${x[v.LONETILDE]}\\s+`,!0);ze.tildeTrimReplace="$1~";A("TILDE",`^${x[v.LONETILDE]}${x[v.XRANGEPLAIN]}$`);A("TILDELOOSE",`^${x[v.LONETILDE]}${x[v.XRANGEPLAINLOOSE]}$`);A("LONECARET","(?:\\^)");A("CARETTRIM",`(\\s*)${x[v.LONECARET]}\\s+`,!0);ze.caretTrimReplace="$1^";A("CARET",`^${x[v.LONECARET]}${x[v.XRANGEPLAIN]}$`);A("CARETLOOSE",`^${x[v.LONECARET]}${x[v.XRANGEPLAINLOOSE]}$`);A("COMPARATORLOOSE",`^${x[v.GTLT]}\\s*(${x[v.LOOSEPLAIN]})$|^$`);A("COMPARATOR",`^${x[v.GTLT]}\\s*(${x[v.FULLPLAIN]})$|^$`);A("COMPARATORTRIM",`(\\s*)${x[v.GTLT]}\\s*(${x[v.LOOSEPLAIN]}|${x[v.XRANGEPLAIN]})`,!0);ze.comparatorTrimReplace="$1$2$3";A("HYPHENRANGE",`^\\s*(${x[v.XRANGEPLAIN]})\\s+-\\s+(${x[v.XRANGEPLAIN]})\\s*$`);A("HYPHENRANGELOOSE",`^\\s*(${x[v.XRANGEPLAINLOOSE]})\\s+-\\s+(${x[v.XRANGEPLAINLOOSE]})\\s*$`);A("STAR","(<|>)?=?\\s*\\*");A("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");A("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Ms=w((yG,zm)=>{var sO=Object.freeze({loose:!0}),oO=Object.freeze({}),iO=e=>e?typeof e!="object"?sO:e:oO;zm.exports=iO});var Ea=w((bG,Hm)=>{var Wm=/^[0-9]+$/,Zm=(e,t)=>{let r=Wm.test(e),n=Wm.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1},aO=(e,t)=>Zm(t,e);Hm.exports={compareIdentifiers:Zm,rcompareIdentifiers:aO}});var ee=w((wG,Jm)=>{var Fs=Yr(),{MAX_LENGTH:Ym,MAX_SAFE_INTEGER:js}=Hr(),{safeRe:Xm,safeSrc:Km,t:Bs}=fr(),cO=Ms(),{compareIdentifiers:dr}=Ea(),Ta=class e{constructor(t,r){if(r=cO(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Ym)throw new TypeError(`version is longer than ${Ym} characters`);Fs("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=t.trim().match(r.loose?Xm[Bs.LOOSE]:Xm[Bs.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>js||this.major<0)throw new TypeError("Invalid major version");if(this.minor>js||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>js||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<js)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(Fs("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)),dr(this.major,t.major)||dr(this.minor,t.minor)||dr(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(Fs("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 dr(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(Fs("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 dr(n,s)}while(++r)}inc(t,r,n){if(t.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let s=new RegExp(`^${this.options.loose?Km[Bs.PRERELEASELOOSE]:Km[Bs.PRERELEASE]}$`),o=`-${r}`.match(s);if(!o||o[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let o=[r,s];n===!1&&(o=[r]),dr(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Jm.exports=Ta});var Tt=w((SG,eh)=>{var Qm=ee(),uO=(e,t,r=!1)=>{if(e instanceof Qm)return e;try{return new Qm(e,t)}catch(n){if(!r)return null;throw n}};eh.exports=uO});var rh=w((xG,th)=>{var lO=Tt(),fO=(e,t)=>{let r=lO(e,t);return r?r.version:null};th.exports=fO});var sh=w((vG,nh)=>{var dO=Tt(),pO=(e,t)=>{let r=dO(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};nh.exports=pO});var ah=w((_G,ih)=>{var oh=ee(),mO=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new oh(e instanceof oh?e.version:e,r).inc(t,n,s).version}catch{return null}};ih.exports=mO});var lh=w((EG,uh)=>{var ch=Tt(),hO=(e,t)=>{let r=ch(e,null,!0),n=ch(t,null,!0),s=r.compare(n);if(s===0)return null;let o=s>0,i=o?r:n,a=o?n:r,c=!!i.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(i)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};uh.exports=hO});var dh=w((TG,fh)=>{var gO=ee(),yO=(e,t)=>new gO(e,t).major;fh.exports=yO});var mh=w((OG,ph)=>{var bO=ee(),wO=(e,t)=>new bO(e,t).minor;ph.exports=wO});var gh=w((RG,hh)=>{var SO=ee(),xO=(e,t)=>new SO(e,t).patch;hh.exports=xO});var bh=w((kG,yh)=>{var vO=Tt(),_O=(e,t)=>{let r=vO(e,t);return r&&r.prerelease.length?r.prerelease:null};yh.exports=_O});var Ee=w((CG,Sh)=>{var wh=ee(),EO=(e,t,r)=>new wh(e,r).compare(new wh(t,r));Sh.exports=EO});var vh=w((AG,xh)=>{var TO=Ee(),OO=(e,t,r)=>TO(t,e,r);xh.exports=OO});var Eh=w((IG,_h)=>{var RO=Ee(),kO=(e,t)=>RO(e,t,!0);_h.exports=kO});var Us=w(($G,Oh)=>{var Th=ee(),CO=(e,t,r)=>{let n=new Th(e,r),s=new Th(t,r);return n.compare(s)||n.compareBuild(s)};Oh.exports=CO});var kh=w((DG,Rh)=>{var AO=Us(),IO=(e,t)=>e.sort((r,n)=>AO(r,n,t));Rh.exports=IO});var Ah=w((LG,Ch)=>{var $O=Us(),DO=(e,t)=>e.sort((r,n)=>$O(n,r,t));Ch.exports=DO});var Xr=w((NG,Ih)=>{var LO=Ee(),NO=(e,t,r)=>LO(e,t,r)>0;Ih.exports=NO});var Gs=w((PG,$h)=>{var PO=Ee(),MO=(e,t,r)=>PO(e,t,r)<0;$h.exports=MO});var Oa=w((MG,Dh)=>{var FO=Ee(),jO=(e,t,r)=>FO(e,t,r)===0;Dh.exports=jO});var Ra=w((FG,Lh)=>{var BO=Ee(),UO=(e,t,r)=>BO(e,t,r)!==0;Lh.exports=UO});var qs=w((jG,Nh)=>{var GO=Ee(),qO=(e,t,r)=>GO(e,t,r)>=0;Nh.exports=qO});var Vs=w((BG,Ph)=>{var VO=Ee(),zO=(e,t,r)=>VO(e,t,r)<=0;Ph.exports=zO});var ka=w((UG,Mh)=>{var WO=Oa(),ZO=Ra(),HO=Xr(),YO=qs(),XO=Gs(),KO=Vs(),JO=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return WO(e,r,n);case"!=":return ZO(e,r,n);case">":return HO(e,r,n);case">=":return YO(e,r,n);case"<":return XO(e,r,n);case"<=":return KO(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};Mh.exports=JO});var jh=w((GG,Fh)=>{var QO=ee(),eR=Tt(),{safeRe:zs,t:Ws}=fr(),tR=(e,t)=>{if(e instanceof QO)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?zs[Ws.COERCEFULL]:zs[Ws.COERCE]);else{let c=t.includePrerelease?zs[Ws.COERCERTLFULL]:zs[Ws.COERCERTL],u;for(;(u=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],s=r[3]||"0",o=r[4]||"0",i=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return eR(`${n}.${s}.${o}${i}${a}`,t)};Fh.exports=tR});var Uh=w((qG,Bh)=>{var Ca=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let s=this.map.keys().next().value;this.delete(s)}this.map.set(t,r)}return this}};Bh.exports=Ca});var Te=w((VG,zh)=>{var rR=/\s+/g,Aa=class e{constructor(t,r){if(r=sR(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof Ia)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(rR," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!qh(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&fR(s[0])){this.set=[s];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let n=((this.options.includePrerelease&&uR)|(this.options.loose&&lR))+":"+t,s=Gh.get(n);if(s)return s;let o=this.options.loose,i=o?ue[se.HYPHENRANGELOOSE]:ue[se.HYPHENRANGE];t=t.replace(i,xR(this.options.includePrerelease)),G("hyphen replace",t),t=t.replace(ue[se.COMPARATORTRIM],iR),G("comparator trim",t),t=t.replace(ue[se.TILDETRIM],aR),G("tilde trim",t),t=t.replace(ue[se.CARETTRIM],cR),G("caret trim",t);let a=t.split(" ").map(f=>dR(f,this.options)).join(" ").split(/\s+/).map(f=>SR(f,this.options));o&&(a=a.filter(f=>(G("loose invalid filter",f,this.options),!!f.match(ue[se.COMPARATORLOOSE])))),G("range list",a);let c=new Map,u=a.map(f=>new Ia(f,this.options));for(let f of u){if(qh(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Gh.set(n,l),l}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(n=>Vh(n,r)&&t.set.some(s=>Vh(s,r)&&n.every(o=>s.every(i=>o.intersects(i,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new oR(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(vR(this.set[r],t,this.options))return!0;return!1}};zh.exports=Aa;var nR=Uh(),Gh=new nR,sR=Ms(),Ia=Kr(),G=Yr(),oR=ee(),{safeRe:ue,t:se,comparatorTrimReplace:iR,tildeTrimReplace:aR,caretTrimReplace:cR}=fr(),{FLAG_INCLUDE_PRERELEASE:uR,FLAG_LOOSE:lR}=Hr(),qh=e=>e.value==="<0.0.0-0",fR=e=>e.value==="",Vh=(e,t)=>{let r=!0,n=e.slice(),s=n.pop();for(;r&&n.length;)r=n.every(o=>s.intersects(o,t)),s=n.pop();return r},dR=(e,t)=>(G("comp",e,t),e=hR(e,t),G("caret",e),e=pR(e,t),G("tildes",e),e=yR(e,t),G("xrange",e),e=wR(e,t),G("stars",e),e),oe=e=>!e||e.toLowerCase()==="x"||e==="*",pR=(e,t)=>e.trim().split(/\s+/).map(r=>mR(r,t)).join(" "),mR=(e,t)=>{let r=t.loose?ue[se.TILDELOOSE]:ue[se.TILDE];return e.replace(r,(n,s,o,i,a)=>{G("tilde",e,n,s,o,i,a);let c;return oe(s)?c="":oe(o)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:oe(i)?c=`>=${s}.${o}.0 <${s}.${+o+1}.0-0`:a?(G("replaceTilde pr",a),c=`>=${s}.${o}.${i}-${a} <${s}.${+o+1}.0-0`):c=`>=${s}.${o}.${i} <${s}.${+o+1}.0-0`,G("tilde return",c),c})},hR=(e,t)=>e.trim().split(/\s+/).map(r=>gR(r,t)).join(" "),gR=(e,t)=>{G("caret",e,t);let r=t.loose?ue[se.CARETLOOSE]:ue[se.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 oe(o)?u="":oe(i)?u=`>=${o}.0.0${n} <${+o+1}.0.0-0`:oe(a)?o==="0"?u=`>=${o}.${i}.0${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.0${n} <${+o+1}.0.0-0`:c?(G("replaceCaret pr",c),o==="0"?i==="0"?u=`>=${o}.${i}.${a}-${c} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}-${c} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a}-${c} <${+o+1}.0.0-0`):(G("no pr"),o==="0"?i==="0"?u=`>=${o}.${i}.${a}${n} <${o}.${i}.${+a+1}-0`:u=`>=${o}.${i}.${a}${n} <${o}.${+i+1}.0-0`:u=`>=${o}.${i}.${a} <${+o+1}.0.0-0`),G("caret return",u),u})},yR=(e,t)=>(G("replaceXRanges",e,t),e.split(/\s+/).map(r=>bR(r,t)).join(" ")),bR=(e,t)=>{e=e.trim();let r=t.loose?ue[se.XRANGELOOSE]:ue[se.XRANGE];return e.replace(r,(n,s,o,i,a,c)=>{G("xRange",e,n,s,o,i,a,c);let u=oe(o),l=u||oe(i),f=l||oe(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})},wR=(e,t)=>(G("replaceStars",e,t),e.trim().replace(ue[se.STAR],"")),SR=(e,t)=>(G("replaceGTE0",e,t),e.trim().replace(ue[t.includePrerelease?se.GTE0PRE:se.GTE0],"")),xR=e=>(t,r,n,s,o,i,a,c,u,l,f,p)=>(oe(n)?r="":oe(s)?r=`>=${n}.0.0${e?"-0":""}`:oe(o)?r=`>=${n}.${s}.0${e?"-0":""}`:i?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,oe(u)?c="":oe(l)?c=`<${+u+1}.0.0-0`:oe(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()),vR=(e,t,r)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let n=0;n<e.length;n++)if(G(e[n].semver),e[n].semver!==Ia.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((zG,Kh)=>{var Jr=Symbol("SemVer ANY"),La=class e{static get ANY(){return Jr}constructor(t,r){if(r=Wh(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),Da("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,Da("comp",this)}parse(t){let r=this.options.loose?Zh[Hh.COMPARATORLOOSE]:Zh[Hh.COMPARATOR],n=t.match(r);if(!n)throw new TypeError(`Invalid comparator: ${t}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Yh(n[2],this.options.loose):this.semver=Jr}toString(){return this.value}test(t){if(Da("Comparator.test",t,this.options.loose),this.semver===Jr||t===Jr)return!0;if(typeof t=="string")try{t=new Yh(t,this.options)}catch{return!1}return $a(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Xh(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new Xh(this.value,r).test(t.semver):(r=Wh(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||$a(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||$a(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};Kh.exports=La;var Wh=Ms(),{safeRe:Zh,t:Hh}=fr(),$a=ka(),Da=Yr(),Yh=ee(),Xh=Te()});var Qr=w((WG,Jh)=>{var _R=Te(),ER=(e,t,r)=>{try{t=new _R(t,r)}catch{return!1}return t.test(e)};Jh.exports=ER});var eg=w((ZG,Qh)=>{var TR=Te(),OR=(e,t)=>new TR(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));Qh.exports=OR});var rg=w((HG,tg)=>{var RR=ee(),kR=Te(),CR=(e,t,r)=>{let n=null,s=null,o=null;try{o=new kR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===-1)&&(n=i,s=new RR(n,r))}),n};tg.exports=CR});var sg=w((YG,ng)=>{var AR=ee(),IR=Te(),$R=(e,t,r)=>{let n=null,s=null,o=null;try{o=new IR(t,r)}catch{return null}return e.forEach(i=>{o.test(i)&&(!n||s.compare(i)===1)&&(n=i,s=new AR(n,r))}),n};ng.exports=$R});var ag=w((XG,ig)=>{var Na=ee(),DR=Te(),og=Xr(),LR=(e,t)=>{e=new DR(e,t);let r=new Na("0.0.0");if(e.test(r)||(r=new Na("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 Na(i.semver.version);switch(i.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||og(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),o&&(!r||og(r,o))&&(r=o)}return r&&e.test(r)?r:null};ig.exports=LR});var ug=w((KG,cg)=>{var NR=Te(),PR=(e,t)=>{try{return new NR(e,t).range||"*"}catch{return null}};cg.exports=PR});var Zs=w((JG,pg)=>{var MR=ee(),dg=Kr(),{ANY:FR}=dg,jR=Te(),BR=Qr(),lg=Xr(),fg=Gs(),UR=Vs(),GR=qs(),qR=(e,t,r,n)=>{e=new MR(e,n),t=new jR(t,n);let s,o,i,a,c;switch(r){case">":s=lg,o=UR,i=fg,a=">",c=">=";break;case"<":s=fg,o=GR,i=lg,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(BR(e,t,n))return!1;for(let u=0;u<t.set.length;++u){let l=t.set[u],f=null,p=null;if(l.forEach(d=>{d.semver===FR&&(d=new dg(">=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};pg.exports=qR});var hg=w((QG,mg)=>{var VR=Zs(),zR=(e,t,r)=>VR(e,t,">",r);mg.exports=zR});var yg=w((e9,gg)=>{var WR=Zs(),ZR=(e,t,r)=>WR(e,t,"<",r);gg.exports=ZR});var Sg=w((t9,wg)=>{var bg=Te(),HR=(e,t,r)=>(e=new bg(e,r),t=new bg(t,r),e.intersects(t,r));wg.exports=HR});var vg=w((r9,xg)=>{var YR=Qr(),XR=Ee();xg.exports=(e,t,r)=>{let n=[],s=null,o=null,i=e.sort((l,f)=>XR(l,f,r));for(let l of i)YR(l,t,r)?(o=l,s||(s=l)):(o&&n.push([s,o]),o=null,s=null);s&&n.push([s,null]);let a=[];for(let[l,f]of n)l===f?a.push(l):!f&&l===i[0]?a.push("*"):f?l===i[0]?a.push(`<=${f}`):a.push(`${l} - ${f}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof t.raw=="string"?t.raw:String(t);return c.length<u.length?c:t}});var kg=w((n9,Rg)=>{var _g=Te(),Ma=Kr(),{ANY:Pa}=Ma,en=Qr(),Fa=Ee(),KR=(e,t,r={})=>{if(e===t)return!0;e=new _g(e,r),t=new _g(t,r);let n=!1;e:for(let s of e.set){for(let o of t.set){let i=QR(s,o,r);if(n=n||i!==null,i)continue e}if(n)return!1}return!0},JR=[new Ma(">=0.0.0-0")],Eg=[new Ma(">=0.0.0")],QR=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Pa){if(t.length===1&&t[0].semver===Pa)return!0;r.includePrerelease?e=JR:e=Eg}if(t.length===1&&t[0].semver===Pa){if(r.includePrerelease)return!0;t=Eg}let n=new Set,s,o;for(let d of e)d.operator===">"||d.operator===">="?s=Tg(s,d,r):d.operator==="<"||d.operator==="<="?o=Og(o,d,r):n.add(d.semver);if(n.size>1)return null;let i;if(s&&o){if(i=Fa(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 b of t)if(!en(d,String(b),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=Tg(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=Og(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)},Tg=(e,t,r)=>{if(!e)return t;let n=Fa(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},Og=(e,t,r)=>{if(!e)return t;let n=Fa(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};Rg.exports=KR});var $g=w((s9,Ig)=>{var ja=fr(),Cg=Hr(),ek=ee(),Ag=Ea(),tk=Tt(),rk=rh(),nk=sh(),sk=ah(),ok=lh(),ik=dh(),ak=mh(),ck=gh(),uk=bh(),lk=Ee(),fk=vh(),dk=Eh(),pk=Us(),mk=kh(),hk=Ah(),gk=Xr(),yk=Gs(),bk=Oa(),wk=Ra(),Sk=qs(),xk=Vs(),vk=ka(),_k=jh(),Ek=Kr(),Tk=Te(),Ok=Qr(),Rk=eg(),kk=rg(),Ck=sg(),Ak=ag(),Ik=ug(),$k=Zs(),Dk=hg(),Lk=yg(),Nk=Sg(),Pk=vg(),Mk=kg();Ig.exports={parse:tk,valid:rk,clean:nk,inc:sk,diff:ok,major:ik,minor:ak,patch:ck,prerelease:uk,compare:lk,rcompare:fk,compareLoose:dk,compareBuild:pk,sort:mk,rsort:hk,gt:gk,lt:yk,eq:bk,neq:wk,gte:Sk,lte:xk,cmp:vk,coerce:_k,Comparator:Ek,Range:Tk,satisfies:Ok,toComparators:Rk,maxSatisfying:kk,minSatisfying:Ck,minVersion:Ak,validRange:Ik,outside:$k,gtr:Dk,ltr:Lk,intersects:Nk,simplifyRange:Pk,subset:Mk,SemVer:ek,re:ja.re,src:ja.src,tokens:ja.t,SEMVER_SPEC_VERSION:Cg.SEMVER_SPEC_VERSION,RELEASE_TYPES:Cg.RELEASE_TYPES,compareIdentifiers:Ag.compareIdentifiers,rcompareIdentifiers:Ag.rcompareIdentifiers}});var Hg=w((c9,Zg)=>{var xr=1e3,vr=xr*60,_r=vr*60,Gt=_r*24,WC=Gt*7,ZC=Gt*365.25;Zg.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return HC(e);if(r==="number"&&isFinite(e))return t.long?XC(e):YC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function HC(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ZC;case"weeks":case"week":case"w":return r*WC;case"days":case"day":case"d":return r*Gt;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*xr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function YC(e){var t=Math.abs(e);return t>=Gt?Math.round(e/Gt)+"d":t>=_r?Math.round(e/_r)+"h":t>=vr?Math.round(e/vr)+"m":t>=xr?Math.round(e/xr)+"s":e+"ms"}function XC(e){var t=Math.abs(e);return t>=Gt?eo(e,t,Gt,"day"):t>=_r?eo(e,t,_r,"hour"):t>=vr?eo(e,t,vr,"minute"):t>=xr?eo(e,t,xr,"second"):e+" ms"}function eo(e,t,r,n){var s=t>=r*1.5;return Math.round(e/r)+" "+n+(s?"s":"")}});var za=w((u9,Yg)=>{function KC(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=s,r.enabled=a,r.humanize=Hg(),r.destroy=u,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let f=0;for(let 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,b;function T(...N){if(!T.enabled)return;let P=T,j=Number(new Date),Y=j-(f||j);P.diff=Y,P.prev=f,P.curr=j,f=j,N[0]=r.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let X=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(ce,Ae)=>{if(ce==="%%")return"%";X++;let Ie=r.formatters[Ae];if(typeof Ie=="function"){let xe=N[X];ce=Ie.call(P,xe),N.splice(X,1),X--}return ce}),r.formatArgs.call(P,N),(P.log||r.log).apply(P,N)}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,b=r.enabled(l)),b),set:N=>{p=N}}),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(" ",",").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,b=-1,T=0;for(;p<l.length;)if(d<f.length&&(f[d]===l[p]||f[d]==="*"))f[d]==="*"?(b=d,T=p,d++):(p++,d++);else if(b!==-1)d=b+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}Yg.exports=KC});var Xg=w((ye,to)=>{ye.formatArgs=QC;ye.save=eA;ye.load=tA;ye.useColors=JC;ye.storage=rA();ye.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`."))}})();ye.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 JC(){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 QC(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+to.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)}ye.log=console.debug||console.log||(()=>{});function eA(e){try{e?ye.storage.setItem("debug",e):ye.storage.removeItem("debug")}catch{}}function tA(){let e;try{e=ye.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function rA(){try{return localStorage}catch{}}to.exports=za()(ye);var{formatters:nA}=to.exports;nA.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Jg=w((l9,Kg)=>{"use strict";Kg.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 ty=w((f9,ey)=>{"use strict";var sA=require("os"),Qg=require("tty"),ke=Jg(),{env:J}=process,ro;ke("no-color")||ke("no-colors")||ke("color=false")||ke("color=never")?ro=0:(ke("color")||ke("colors")||ke("color=true")||ke("color=always"))&&(ro=1);function oA(){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 iA(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function aA(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=oA();n!==void 0&&(ro=n);let s=r?ro: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=sA.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 Wa(e,t={}){let r=aA(e,{streamIsTTY:e&&e.isTTY,...t});return iA(r)}ey.exports={supportsColor:Wa,stdout:Wa({isTTY:Qg.isatty(1)}),stderr:Wa({isTTY:Qg.isatty(2)})}});var ny=w((Q,so)=>{var cA=require("tty"),no=require("util");Q.init=hA;Q.log=dA;Q.formatArgs=lA;Q.save=pA;Q.load=mA;Q.useColors=uA;Q.destroy=no.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=ty();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 uA(){return"colors"in Q.inspectOpts?!!Q.inspectOpts.colors:cA.isatty(process.stderr.fd)}function lA(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
- `+i),t.push(n+"m+"+xr.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Qp()+e+" "+t[0]}function Qp(){return Z.inspectOpts.hideDate?"":new Date().toISOString()+" "}function em(...t){return process.stderr.write(wr.formatWithOptions(Z.inspectOpts,...t)+`
5
- `)}function tm(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function rm(){return process.env.DEBUG}function sm(t){t.inspectOpts={};let e=Object.keys(Z.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Z.inspectOpts[e[r]]}xr.exports=Rs()(Z);var{formatters:Xa}=xr.exports;Xa.o=function(t){return this.inspectOpts.colors=this.useColors,wr.inspect(t,this.inspectOpts).split(`
6
- `).map(e=>e.trim()).join(" ")};Xa.O=function(t){return this.inspectOpts.colors=this.useColors,wr.inspect(t,this.inspectOpts)}});var Ss=x((O_,Os)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Os.exports=Ga():Os.exports=Ha()});var Ya=x(ce=>{"use strict";var nm=ce&&ce.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ce,"__esModule",{value:!0});var im=require("fs"),am=nm(Ss()),kt=am.default("@kwsites/file-exists");function om(t,e,r){kt("checking %s",t);try{let s=im.statSync(t);return s.isFile()&&e?(kt("[OK] path represents a file"),!0):s.isDirectory()&&r?(kt("[OK] path represents a directory"),!0):(kt("[FAIL] path represents something other than a file or directory"),!1)}catch(s){if(s.code==="ENOENT")return kt("[FAIL] path is not accessible: %o",s),!1;throw kt("[FATAL] %o",s),s}}function cm(t,e=ce.READABLE){return om(t,(e&ce.FILE)>0,(e&ce.FOLDER)>0)}ce.exists=cm;ce.FILE=1;ce.FOLDER=2;ce.READABLE=ce.FILE+ce.FOLDER});var Ka=x(Tr=>{"use strict";function um(t){for(var e in t)Tr.hasOwnProperty(e)||(Tr[e]=t[e])}Object.defineProperty(Tr,"__esModule",{value:!0});um(Ya())});var Is=x(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.createDeferred=rt.deferred=void 0;function As(){let t,e,r="pending";return{promise:new Promise((n,i)=>{t=n,e=i}),done(n){r==="pending"&&(r="resolved",t(n))},fail(n){r==="pending"&&(r="rejected",e(n))},get fulfilled(){return r!=="pending"},get status(){return r}}}rt.deferred=As;rt.createDeferred=As;rt.default=As});var Du=x((lb,wn)=>{var zr=process||{},ju=zr.argv||[],Zr=zr.env||{},by=!(Zr.NO_COLOR||ju.includes("--no-color"))&&(!!Zr.FORCE_COLOR||ju.includes("--color")||zr.platform==="win32"||(zr.stdout||{}).isTTY&&Zr.TERM!=="dumb"||!!Zr.CI),ky=(t,e,r=t)=>s=>{let n=""+s,i=n.indexOf(e,t.length);return~i?t+wy(n,e,r,i)+e:t+n+e},wy=(t,e,r,s)=>{let n="",i=0;do n+=t.substring(i,s)+r,i=s+e.length,s=t.indexOf(e,i);while(~s);return n+t.substring(i)},Fu=(t=by)=>{let e=t?ky:()=>String;return{isColorSupported:t,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};wn.exports=Fu();wn.exports.createColors=Fu});var Bu=x((fb,xy)=>{xy.exports={name:"@seed-design/codemod",version:"0.0.16",type:"module",repository:{type:"git",url:"git+https://github.com/daangn/seed-design.git",directory:"packages/codemod"},license:"MIT",bin:"./bin/index.cjs",files:["bin"],scripts:{dev:"bun ./dev.mjs",build:"bun ./build.mjs",test:"LOG=true bun vitest","lint:publish":"bun publint"},dependencies:{"@seed-design/migration-index":"0.0.3",cac:"^6.7.14","es-toolkit":"^1.25.2",execa:"^9.4.1",glob:"^11.0.1",jscodeshift:"^17.1.2",picocolors:"^1.1.1",postcss:"^8.5.3",semver:"^7.6.3","simple-git":"^3.27.0","change-case":"^5.4.4",winston:"^3.15.0",zod:"^3.23.8"},devDependencies:{"@types/jscodeshift":"^0.12.0","@types/node":"^22.10.2","csv-parse":"^5.5.6",dotenv:"^16.4.5",esbuild:"^0.25.0",typescript:"^5.4.5"},optionalDependencies:{"@daangn/react-monochrome-icon":"^0.0.13","@daangn/react-multicolor-icon":"^0.0.11"},publishConfig:{access:"public"},engines:{node:">=20.16.0"}}});var An=require("events");function es(t){return t==null?[]:Array.isArray(t)?t:[t]}function bl(t,e,r,s){var n,i=t[e],a=~s.string.indexOf(e)?r==null||r===!0?"":String(r):typeof r=="boolean"?r:~s.boolean.indexOf(e)?r==="false"?!1:r==="true"||(t._.push((n=+r,n*0===0?n:r)),!!r):(n=+r,n*0===0?n:r);t[e]=i==null?a:Array.isArray(i)?i.concat(a):[i,a]}function kl(t,e){t=t||[],e=e||{};var r,s,n,i,a,o={_:[]},c=0,u=0,l=0,d=t.length;let h=e.alias!==void 0,f=e.unknown!==void 0,F=e.default!==void 0;if(e.alias=e.alias||{},e.string=es(e.string),e.boolean=es(e.boolean),h)for(r in e.alias)for(s=e.alias[r]=es(e.alias[r]),c=0;c<s.length;c++)(e.alias[s[c]]=s.concat(r)).splice(c,1);for(c=e.boolean.length;c-- >0;)for(s=e.alias[e.boolean[c]]||[],u=s.length;u-- >0;)e.boolean.push(s[u]);for(c=e.string.length;c-- >0;)for(s=e.alias[e.string[c]]||[],u=s.length;u-- >0;)e.string.push(s[u]);if(F){for(r in e.default)if(i=typeof e.default[r],s=e.alias[r]=e.alias[r]||[],e[i]!==void 0)for(e[i].push(r),c=0;c<s.length;c++)e[i].push(s[c])}let D=f?Object.keys(e.alias):[];for(c=0;c<d;c++){if(n=t[c],n==="--"){o._=o._.concat(t.slice(++c));break}for(u=0;u<n.length&&n.charCodeAt(u)===45;u++);if(u===0)o._.push(n);else if(n.substring(u,u+3)==="no-"){if(i=n.substring(u+3),f&&!~D.indexOf(i))return e.unknown(n);o[i]=!1}else{for(l=u+1;l<n.length&&n.charCodeAt(l)!==61;l++);for(i=n.substring(u,l),a=n.substring(++l)||c+1===d||(""+t[c+1]).charCodeAt(0)===45||t[++c],s=u===2?[i]:i,l=0;l<s.length;l++){if(i=s[l],f&&!~D.indexOf(i))return e.unknown("-".repeat(u)+i);bl(o,i,l+1<s.length||a,e)}}}if(F)for(r in e.default)o[r]===void 0&&(o[r]=e.default[r]);if(h)for(r in o)for(s=e.alias[r]||[];s.length>0;)o[s.shift()]=o[r];return o}var In=t=>t.replace(/[<[].+/,"").trim(),wl=t=>{let e=/<([^>]+)>/g,r=/\[([^\]]+)\]/g,s=[],n=o=>{let c=!1,u=o[1];return u.startsWith("...")&&(u=u.slice(3),c=!0),{required:o[0].startsWith("<"),value:u,variadic:c}},i;for(;i=e.exec(t);)s.push(n(i));let a;for(;a=r.exec(t);)s.push(n(a));return s},xl=t=>{let e={alias:{},boolean:[]};for(let[r,s]of t.entries())s.names.length>1&&(e.alias[s.names[0]]=s.names.slice(1)),s.isBoolean&&(s.negated&&t.some((i,a)=>a!==r&&i.names.some(o=>s.names.includes(o))&&typeof i.required=="boolean")||e.boolean.push(s.names[0]));return e},On=t=>t.sort((e,r)=>e.length>r.length?-1:1)[0],Sn=(t,e)=>t.length>=e?t:`${t}${" ".repeat(e-t.length)}`,Tl=t=>t.replace(/([a-z])-([a-z])/g,(e,r,s)=>r+s.toUpperCase()),El=(t,e,r)=>{let s=0,n=e.length,i=t,a;for(;s<n;++s)a=i[e[s]],i=i[e[s]]=s===n-1?r:a??(~e[s+1].indexOf(".")||!(+e[s+1]>-1)?{}:[])},Rl=(t,e)=>{for(let r of Object.keys(e)){let s=e[r];s.shouldTransform&&(t[r]=Array.prototype.concat.call([],t[r]),typeof s.transformFunction=="function"&&(t[r]=t[r].map(s.transformFunction)))}},Cl=t=>{let e=/([^\\\/]+)$/.exec(t);return e?e[1]:""},$n=t=>t.split(".").map((e,r)=>r===0?Tl(e):e).join("."),Rt=class extends Error{constructor(e){super(e),this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}},ts=class{constructor(e,r,s){this.rawName=e,this.description=r,this.config=Object.assign({},s),e=e.replace(/\.\*/g,""),this.negated=!1,this.names=In(e).split(",").map(n=>{let i=n.trim().replace(/^-{1,2}/,"");return i.startsWith("no-")&&(this.negated=!0,i=i.replace(/^no-/,"")),$n(i)}).sort((n,i)=>n.length>i.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null&&(this.config.default=!0),e.includes("<")?this.required=!0:e.includes("[")?this.required=!1:this.isBoolean=!0}},Ol=process.argv,Sl=`${process.platform}-${process.arch} node-${process.version}`,er=class{constructor(e,r,s={},n){this.rawName=e,this.description=r,this.config=s,this.cli=n,this.options=[],this.aliasNames=[],this.name=In(e),this.args=wl(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,r="-v, --version"){return this.versionNumber=e,this.option(r,"Display version number"),this}example(e){return this.examples.push(e),this}option(e,r,s){let n=new ts(e,r,s);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 tr}hasOption(e){return e=e.split(".")[0],this.options.find(r=>r.names.includes(e))}outputHelp(){let{name:e,commands:r}=this.cli,{versionNumber:s,options:n,helpCallback:i}=this.cli.globalCommand,a=[{body:`${e}${s?`/${s}`:""}`}];if(a.push({title:"Usage",body:` $ ${e} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&r.length>0){let u=On(r.map(l=>l.rawName));a.push({title:"Commands",body:r.map(l=>` ${Sn(l.rawName,u.length)} ${l.description}`).join(`
7
- `)}),a.push({title:"For more info, run any command with the `--help` flag",body:r.map(l=>` $ ${e}${l.name===""?"":` ${l.name}`} --help`).join(`
8
- `)})}let c=this.isGlobalCommand?n:[...this.options,...n||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(c=c.filter(u=>u.name!=="version")),c.length>0){let u=On(c.map(l=>l.rawName));a.push({title:"Options",body:c.map(l=>` ${Sn(l.rawName,u.length)} ${l.description} ${l.config.default===void 0?"":`(default: ${l.config.default})`}`).join(`
9
- `)})}this.examples.length>0&&a.push({title:"Examples",body:this.examples.map(u=>typeof u=="function"?u(e):u).join(`
10
- `)}),i&&(a=i(a)||a),console.log(a.map(u=>u.title?`${u.title}:
4
+ `+o),e.push(s+"m+"+so.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=fA()+t+" "+e[0]}function fA(){return Q.inspectOpts.hideDate?"":new Date().toISOString()+" "}function dA(...e){return process.stderr.write(no.formatWithOptions(Q.inspectOpts,...e)+`
5
+ `)}function pA(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function mA(){return process.env.DEBUG}function hA(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]]}so.exports=za()(Q);var{formatters:ry}=so.exports;ry.o=function(e){return this.inspectOpts.colors=this.useColors,no.inspect(e,this.inspectOpts).split(`
6
+ `).map(t=>t.trim()).join(" ")};ry.O=function(e){return this.inspectOpts.colors=this.useColors,no.inspect(e,this.inspectOpts)}});var Ha=w((d9,Za)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Za.exports=Xg():Za.exports=ny()});var sy=w(be=>{"use strict";var gA=be&&be.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(be,"__esModule",{value:!0});var yA=require("fs"),bA=gA(Ha()),Er=bA.default("@kwsites/file-exists");function wA(e,t,r){Er("checking %s",e);try{let n=yA.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 SA(e,t=be.READABLE){return wA(e,(t&be.FILE)>0,(t&be.FOLDER)>0)}be.exists=SA;be.FILE=1;be.FOLDER=2;be.READABLE=be.FILE+be.FOLDER});var oy=w(oo=>{"use strict";function xA(e){for(var t in e)oo.hasOwnProperty(t)||(oo[t]=e[t])}Object.defineProperty(oo,"__esModule",{value:!0});xA(sy())});var Xa=w(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.createDeferred=qt.deferred=void 0;function Ya(){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}}}qt.deferred=Ya;qt.createDeferred=Ya;qt.default=Ya});var zw=w((H9,Bc)=>{var ko=process||{},qw=ko.argv||[],Ro=ko.env||{},$$=!(Ro.NO_COLOR||qw.includes("--no-color"))&&(!!Ro.FORCE_COLOR||qw.includes("--color")||ko.platform==="win32"||(ko.stdout||{}).isTTY&&Ro.TERM!=="dumb"||!!Ro.CI),D$=(e,t,r=e)=>n=>{let s=""+n,o=s.indexOf(t,e.length);return~o?e+L$(s,t,r,o)+t:e+s+t},L$=(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)},Vw=(e=$$)=>{let t=e?D$:()=>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")}};Bc.exports=Vw();Bc.exports.createColors=Vw});var Hw=w((X9,N$)=>{N$.exports={name:"@seed-design/codemod",version:"0.0.17",type:"module",repository:{type:"git",url:"git+https://github.com/daangn/seed-design.git",directory:"packages/codemod"},license:"MIT",bin:"./bin/index.cjs",files:["bin"],scripts:{dev:"bun ./dev.mjs",build:"bun ./build.mjs",test:"LOG=true bun vitest","lint:publish":"bun publint"},dependencies:{"@seed-design/migration-index":"^0.0.3",cac:"^6.7.14","change-case":"^5.4.4","es-toolkit":"^1.25.2",execa:"^9.4.1",glob:"^11.0.1",jscodeshift:"^17.1.2",picocolors:"^1.1.1",postcss:"^8.5.3",semver:"^7.6.3","simple-git":"^3.27.0",winston:"^3.15.0",zod:"^3.23.8"},devDependencies:{"@types/jscodeshift":"^0.12.0","@types/node":"^22.10.2","csv-parse":"^5.5.6",dotenv:"^16.4.5",esbuild:"^0.25.0",typescript:"^5.4.5"},optionalDependencies:{"@daangn/react-monochrome-icon":"^0.0.13","@daangn/react-multicolor-icon":"^0.0.11"},publishConfig:{access:"public"},engines:{node:">=20.16.0"}}});var Zc=require("events");function Do(e){return e==null?[]:Array.isArray(e)?e:[e]}function ES(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 TS(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,b=t.default!==void 0;if(t.alias=t.alias||{},t.string=Do(t.string),t.boolean=Do(t.boolean),p)for(r in t.alias)for(n=t.alias[r]=Do(t.alias[r]),c=0;c<n.length;c++)(t.alias[n[c]]=n.concat(r)).splice(c,1);for(c=t.boolean.length;c-- >0;)for(n=t.alias[t.boolean[c]]||[],u=n.length;u-- >0;)t.boolean.push(n[u]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],u=n.length;u-- >0;)t.string.push(n[u]);if(b){for(r in t.default)if(o=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],t[o]!==void 0)for(t[o].push(r),c=0;c<n.length;c++)t[o].push(n[c])}let T=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);ES(a,o,l+1<n.length||i,t)}}}if(b)for(r in t.default)a[r]===void 0&&(a[r]=t.default[r]);if(p)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}var Hc=e=>e.replace(/[<[].+/,"").trim(),OS=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},RS=e=>{let t={alias:{},boolean:[]};for(let[r,n]of e.entries())n.names.length>1&&(t.alias[n.names[0]]=n.names.slice(1)),n.isBoolean&&(n.negated&&e.some((o,i)=>i!==r&&o.names.some(a=>n.names.includes(a))&&typeof o.required=="boolean")||t.boolean.push(n.names[0]));return t},zc=e=>e.sort((t,r)=>t.length>r.length?-1:1)[0],Wc=(e,t)=>e.length>=t?e:`${e}${" ".repeat(t-e.length)}`,kS=e=>e.replace(/([a-z])-([a-z])/g,(t,r,n)=>r+n.toUpperCase()),CS=(e,t,r)=>{let n=0,s=t.length,o=e,i;for(;n<s;++n)i=o[t[n]],o=o[t[n]]=n===s-1?r:i??(~t[n+1].indexOf(".")||!(+t[n+1]>-1)?{}:[])},AS=(e,t)=>{for(let r of Object.keys(t)){let n=t[r];n.shouldTransform&&(e[r]=Array.prototype.concat.call([],e[r]),typeof n.transformFunction=="function"&&(e[r]=e[r].map(n.transformFunction)))}},IS=e=>{let t=/([^\\\/]+)$/.exec(e);return t?t[1]:""},Yc=e=>e.split(".").map((t,r)=>r===0?kS(t):t).join("."),Cr=class extends Error{constructor(t){super(t),this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}},Lo=class{constructor(t,r,n){this.rawName=t,this.description=r,this.config=Object.assign({},n),t=t.replace(/\.\*/g,""),this.negated=!1,this.names=Hc(t).split(",").map(s=>{let o=s.trim().replace(/^-{1,2}/,"");return o.startsWith("no-")&&(this.negated=!0,o=o.replace(/^no-/,"")),Yc(o)}).sort((s,o)=>s.length>o.length?1:-1),this.name=this.names[this.names.length-1],this.negated&&this.config.default==null&&(this.config.default=!0),t.includes("<")?this.required=!0:t.includes("[")?this.required=!1:this.isBoolean=!0}},$S=process.argv,DS=`${process.platform}-${process.arch} node-${process.version}`,xn=class{constructor(t,r,n={},s){this.rawName=t,this.description=r,this.config=n,this.cli=s,this.options=[],this.aliasNames=[],this.name=Hc(t),this.args=OS(t),this.examples=[]}usage(t){return this.usageText=t,this}allowUnknownOptions(){return this.config.allowUnknownOptions=!0,this}ignoreOptionDefaultValue(){return this.config.ignoreOptionDefaultValue=!0,this}version(t,r="-v, --version"){return this.versionNumber=t,this.option(r,"Display version number"),this}example(t){return this.examples.push(t),this}option(t,r,n){let s=new Lo(t,r,n);return this.options.push(s),this}alias(t){return this.aliasNames.push(t),this}action(t){return this.commandAction=t,this}isMatched(t){return this.name===t||this.aliasNames.includes(t)}get isDefaultCommand(){return this.name===""||this.aliasNames.includes("!")}get isGlobalCommand(){return this instanceof vn}hasOption(t){return t=t.split(".")[0],this.options.find(r=>r.names.includes(t))}outputHelp(){let{name:t,commands:r}=this.cli,{versionNumber:n,options:s,helpCallback:o}=this.cli.globalCommand,i=[{body:`${t}${n?`/${n}`:""}`}];if(i.push({title:"Usage",body:` $ ${t} ${this.usageText||this.rawName}`}),(this.isGlobalCommand||this.isDefaultCommand)&&r.length>0){let u=zc(r.map(l=>l.rawName));i.push({title:"Commands",body:r.map(l=>` ${Wc(l.rawName,u.length)} ${l.description}`).join(`
7
+ `)}),i.push({title:"For more info, run any command with the `--help` flag",body:r.map(l=>` $ ${t}${l.name===""?"":` ${l.name}`} --help`).join(`
8
+ `)})}let c=this.isGlobalCommand?s:[...this.options,...s||[]];if(!this.isGlobalCommand&&!this.isDefaultCommand&&(c=c.filter(u=>u.name!=="version")),c.length>0){let u=zc(c.map(l=>l.rawName));i.push({title:"Options",body:c.map(l=>` ${Wc(l.rawName,u.length)} ${l.description} ${l.config.default===void 0?"":`(default: ${l.config.default})`}`).join(`
9
+ `)})}this.examples.length>0&&i.push({title:"Examples",body:this.examples.map(u=>typeof u=="function"?u(t):u).join(`
10
+ `)}),o&&(i=o(i)||i),console.log(i.map(u=>u.title?`${u.title}:
11
11
  ${u.body}`:u.body).join(`
12
12
 
13
- `))}outputVersion(){let{name:e}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${e}/${r} ${Sl}`)}checkRequiredArgs(){let e=this.args.filter(r=>r.required).length;if(this.cli.args.length<e)throw new Rt(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:e,globalCommand:r}=this.cli;if(!this.config.allowUnknownOptions){for(let s of Object.keys(e))if(s!=="--"&&!this.hasOption(s)&&!r.hasOption(s))throw new Rt(`Unknown option \`${s.length>1?`--${s}`:`-${s}`}\``)}}checkOptionValue(){let{options:e,globalCommand:r}=this.cli,s=[...r.options,...this.options];for(let n of s){let i=e[n.name.split(".")[0]];if(n.required){let a=s.some(o=>o.negated&&o.names.includes(n.name));if(i===!0||i===!1&&!a)throw new Rt(`option \`${n.rawName}\` value is missing`)}}}},tr=class extends er{constructor(e){super("@@global@@","",{},e)}},Qt=Object.assign,rs=class extends An.EventEmitter{constructor(e=""){super(),this.name=e,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new tr(this),this.globalCommand.usage("<command> [options]")}usage(e){return this.globalCommand.usage(e),this}command(e,r,s){let n=new er(e,r||"",s,this);return n.globalCommand=this.globalCommand,this.commands.push(n),n}option(e,r,s){return this.globalCommand.option(e,r,s),this}help(e){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=e,this.showHelpOnExit=!0,this}version(e,r="-v, --version"){return this.globalCommand.version(e,r),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:r},s,n){return this.args=e,this.options=r,s&&(this.matchedCommand=s),n&&(this.matchedCommandName=n),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(e=Ol,{run:r=!0}={}){this.rawArgs=e,this.name||(this.name=e[1]?Cl(e[1]):"cli");let s=!0;for(let i of this.commands){let a=this.mri(e.slice(2),i),o=a.args[0];if(i.isMatched(o)){s=!1;let c=Qt(Qt({},a),{args:a.args.slice(1)});this.setParsedInfo(c,i,o),this.emit(`command:${o}`,i)}}if(s){for(let i of this.commands)if(i.name===""){s=!1;let a=this.mri(e.slice(2),i);this.setParsedInfo(a,i),this.emit("command:!",i)}}if(s){let i=this.mri(e.slice(2));this.setParsedInfo(i)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),r=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),r=!1,this.unsetMatchedCommand());let n={args:this.args,options:this.options};return r&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit("command:*"),n}mri(e,r){let s=[...this.globalCommand.options,...r?r.options:[]],n=xl(s),i=[],a=e.indexOf("--");a>-1&&(i=e.slice(a+1),e=e.slice(0,a));let o=kl(e,n);o=Object.keys(o).reduce((h,f)=>Qt(Qt({},h),{[$n(f)]:o[f]}),{_:[]});let c=o._,u={"--":i},l=r&&r.config.ignoreOptionDefaultValue?r.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,d=Object.create(null);for(let h of s){if(!l&&h.config.default!==void 0)for(let f of h.names)u[f]=h.config.default;Array.isArray(h.config.type)&&d[h.name]===void 0&&(d[h.name]=Object.create(null),d[h.name].shouldTransform=!0,d[h.name].transformFunction=h.config.type[0])}for(let h of Object.keys(o))if(h!=="_"){let f=h.split(".");El(u,f,o[h]),Rl(u,d)}return{args:c,options:u}}runMatchedCommand(){let{args:e,options:r,matchedCommand:s}=this;if(!s||!s.commandAction)return;s.checkUnknownOptions(),s.checkOptionValue(),s.checkRequiredArgs();let n=[];return s.args.forEach((i,a)=>{i.variadic?n.push(e.slice(a)):n.push(e[a])}),n.push(r),s.commandAction.apply(this,n)}},Nn=(t="")=>new rs(t);var Uu=require("child_process"),Vu=require("fs"),Xr=require("path"),Hr=Fe(Ta(),1);var $;(function(t){t.assertEqual=n=>n;function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{let i={};for(let a of n)i[a]=a;return i},t.getValidEnumValues=n=>{let i=t.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),a={};for(let o of i)a[o]=n[o];return t.objectValues(a)},t.objectValues=n=>t.objectKeys(n).map(function(i){return n[i]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.push(a);return i},t.find=(n,i)=>{for(let a of n)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function s(n,i=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=s,t.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})($||($={}));var ws;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(ws||(ws={}));var y=$.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Re=t=>{switch(typeof t){case"undefined":return y.undefined;case"string":return y.string;case"number":return isNaN(t)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(t)?y.array:t===null?y.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?y.promise:typeof Map<"u"&&t instanceof Map?y.map:typeof Set<"u"&&t instanceof Set?y.set:typeof Date<"u"&&t instanceof Date?y.date:y.object;default:return y.unknown}},p=$.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"]),Rh=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),ie=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(i){return i.message},s={_errors:[]},n=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)s._errors.push(r(a));else{let o=s,c=0;for(;c<a.path.length;){let u=a.path[c];c===a.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(r(a))):o[u]=o[u]||{_errors:[]},o=o[u],c++}}};return n(this),s}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},s=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):s.push(e(n));return{formErrors:s,fieldErrors:r}}get formErrors(){return this.flatten()}};ie.create=t=>new ie(t);var ft=(t,e)=>{let r;switch(t.code){case p.invalid_type:t.received===y.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case p.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,$.jsonStringifyReplacer)}`;break;case p.unrecognized_keys:r=`Unrecognized key(s) in object: ${$.joinValues(t.keys,", ")}`;break;case p.invalid_union:r="Invalid input";break;case p.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${$.joinValues(t.options)}`;break;case p.invalid_enum_value:r=`Invalid enum value. Expected ${$.joinValues(t.options)}, received '${t.received}'`;break;case p.invalid_arguments:r="Invalid function arguments";break;case p.invalid_return_type:r="Invalid function return type";break;case p.invalid_date:r="Invalid date";break;case p.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:$.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case p.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case p.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case p.custom:r="Invalid input";break;case p.invalid_intersection_types:r="Intersection results could not be merged";break;case p.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case p.not_finite:r="Number must be finite";break;default:r=e.defaultError,$.assertNever(t)}return{message:r}},Oa=ft;function Ch(t){Oa=t}function hr(){return Oa}var pr=t=>{let{data:e,path:r,errorMaps:s,issueData:n}=t,i=[...r,...n.path||[]],a={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let o="",c=s.filter(u=>!!u).slice().reverse();for(let u of c)o=u(a,{data:e,defaultError:o}).message;return{...n,path:i,message:o}},Oh=[];function v(t,e){let r=hr(),s=pr({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===ft?void 0:ft].filter(n=>!!n)});t.common.issues.push(s)}var W=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let s=[];for(let n of r){if(n.status==="aborted")return R;n.status==="dirty"&&e.dirty(),s.push(n.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,r){let s=[];for(let n of r){let i=await n.key,a=await n.value;s.push({key:i,value:a})}return t.mergeObjectSync(e,s)}static mergeObjectSync(e,r){let s={};for(let n of r){let{key:i,value:a}=n;if(i.status==="aborted"||a.status==="aborted")return R;i.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||n.alwaysSet)&&(s[i.value]=a.value)}return{status:e.value,value:s}}},R=Object.freeze({status:"aborted"}),dt=t=>({status:"dirty",value:t}),J=t=>({status:"valid",value:t}),xs=t=>t.status==="aborted",Ts=t=>t.status==="dirty",Me=t=>t.status==="valid",jt=t=>typeof Promise<"u"&&t instanceof Promise;function mr(t,e,r,s){if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?s:r==="a"?s.call(t):s?s.value:e.get(t)}function Sa(t,e,r,s,n){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?n.call(t,r):n?n.value=r:e.set(t,r),r}var k;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(k||(k={}));var Lt,Pt,he=class{constructor(e,r,s,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=s,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Ea=(t,e)=>{if(Me(e))return{success:!0,data:e.value};if(!t.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 ie(t.common.issues);return this._error=r,this._error}}};function A(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:s,description:n}=t;if(e&&(r||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(a,o)=>{var c,u;let{message:l}=t;return a.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:(c=l??s)!==null&&c!==void 0?c:o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:(u=l??r)!==null&&u!==void 0?u:o.defaultError}},description:n}}var I=class{get description(){return this._def.description}_getType(e){return Re(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Re(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new W,ctx:{common:e.parent.common,data:e.data,parsedType:Re(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(jt(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let s=this.safeParse(e,r);if(s.success)return s.data;throw s.error}safeParse(e,r){var s;let n={common:{issues:[],async:(s=r==null?void 0:r.async)!==null&&s!==void 0?s:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Re(e)},i=this._parseSync({data:e,path:n.path,parent:n});return Ea(n,i)}"~validate"(e){var r,s;let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Re(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:n});return Me(i)?{value:i.value}:{issues:n.common.issues}}catch(i){!((s=(r=i==null?void 0:i.message)===null||r===void 0?void 0:r.toLowerCase())===null||s===void 0)&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>Me(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,r){let s=await this.safeParseAsync(e,r);if(s.success)return s.data;throw s.error}async safeParseAsync(e,r){let s={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:e,parsedType:Re(e)},n=this._parse({data:e,path:s.path,parent:s}),i=await(jt(n)?n:Promise.resolve(n));return Ea(s,i)}refine(e,r){let s=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let a=e(n),o=()=>i.addIssue({code:p.custom,...s(n)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,r){return this._refinement((s,n)=>e(s)?!0:(n.addIssue(typeof r=="function"?r(s,n):r),!1))}_refinement(e){return new ae({schema:this,typeName:E.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,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 fe.create(this,this._def)}nullable(){return ke.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Oe.create(this)}promise(){return Le.create(this,this._def)}or(e){return ze.create([this,e],this._def)}and(e){return We.create(this,e,this._def)}transform(e){return new ae({...A(this._def),schema:this,typeName:E.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Je({...A(this._def),innerType:this,defaultValue:r,typeName:E.ZodDefault})}brand(){return new Ft({typeName:E.ZodBranded,type:this,...A(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Qe({...A(this._def),innerType:this,catchValue:r,typeName:E.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Dt.create(this,e)}readonly(){return et.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Sh=/^c[^\s-]{8,}$/i,Ah=/^[0-9a-z]+$/,Ih=/^[0-9A-HJKMNP-TV-Z]{26}$/i,$h=/^[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,Nh=/^[a-z0-9_-]{21}$/i,Lh=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ph=/^[-+]?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)?)??$/,jh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Fh="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",ks,Dh=/^(?:(?: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])$/,Mh=/^(?:(?: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])$/,qh=/^(([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]))$/,Bh=/^(([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])$/,Gh=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Uh=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Aa="((\\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])))",Vh=new RegExp(`^${Aa}$`);function Ia(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Zh(t){return new RegExp(`^${Ia(t)}$`)}function $a(t){let e=`${Aa}T${Ia(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function zh(t,e){return!!((e==="v4"||!e)&&Dh.test(t)||(e==="v6"||!e)&&qh.test(t))}function Wh(t,e){if(!Lh.test(t))return!1;try{let[r]=t.split("."),s=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(s));return!(typeof n!="object"||n===null||!n.typ||!n.alg||e&&n.alg!==e)}catch{return!1}}function Xh(t,e){return!!((e==="v4"||!e)&&Mh.test(t)||(e==="v6"||!e)&&Bh.test(t))}var $e=class t extends I{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){let i=this._getOrReturnCtx(e);return v(i,{code:p.invalid_type,expected:y.string,received:i.parsedType}),R}let s=new W,n;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),v(n,{code:p.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),v(n,{code:p.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if(i.kind==="length"){let a=e.data.length>i.value,o=e.data.length<i.value;(a||o)&&(n=this._getOrReturnCtx(e,n),a?v(n,{code:p.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&v(n,{code:p.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),s.dirty())}else if(i.kind==="email")jh.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"email",code:p.invalid_string,message:i.message}),s.dirty());else if(i.kind==="emoji")ks||(ks=new RegExp(Fh,"u")),ks.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"emoji",code:p.invalid_string,message:i.message}),s.dirty());else if(i.kind==="uuid")$h.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"uuid",code:p.invalid_string,message:i.message}),s.dirty());else if(i.kind==="nanoid")Nh.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"nanoid",code:p.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid")Sh.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"cuid",code:p.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid2")Ah.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"cuid2",code:p.invalid_string,message:i.message}),s.dirty());else if(i.kind==="ulid")Ih.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"ulid",code:p.invalid_string,message:i.message}),s.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),v(n,{validation:"url",code:p.invalid_string,message:i.message}),s.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"regex",code:p.invalid_string,message:i.message}),s.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),v(n,{code:p.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),s.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(n=this._getOrReturnCtx(e,n),v(n,{code:p.invalid_string,validation:{startsWith:i.value},message:i.message}),s.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),v(n,{code:p.invalid_string,validation:{endsWith:i.value},message:i.message}),s.dirty()):i.kind==="datetime"?$a(i).test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{code:p.invalid_string,validation:"datetime",message:i.message}),s.dirty()):i.kind==="date"?Vh.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{code:p.invalid_string,validation:"date",message:i.message}),s.dirty()):i.kind==="time"?Zh(i).test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{code:p.invalid_string,validation:"time",message:i.message}),s.dirty()):i.kind==="duration"?Ph.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"duration",code:p.invalid_string,message:i.message}),s.dirty()):i.kind==="ip"?zh(e.data,i.version)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"ip",code:p.invalid_string,message:i.message}),s.dirty()):i.kind==="jwt"?Wh(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"jwt",code:p.invalid_string,message:i.message}),s.dirty()):i.kind==="cidr"?Xh(e.data,i.version)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"cidr",code:p.invalid_string,message:i.message}),s.dirty()):i.kind==="base64"?Gh.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"base64",code:p.invalid_string,message:i.message}),s.dirty()):i.kind==="base64url"?Uh.test(e.data)||(n=this._getOrReturnCtx(e,n),v(n,{validation:"base64url",code:p.invalid_string,message:i.message}),s.dirty()):$.assertNever(i);return{status:s.value,value:e.data}}_regex(e,r,s){return this.refinement(n=>e.test(n),{validation:r,code:p.invalid_string,...k.errToObj(s)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...k.errToObj(e)})}url(e){return this._addCheck({kind:"url",...k.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...k.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...k.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...k.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...k.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...k.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...k.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...k.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...k.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...k.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...k.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...k.errToObj(e)})}datetime(e){var r,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...k.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...k.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...k.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...k.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...k.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...k.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...k.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...k.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...k.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...k.errToObj(r)})}nonempty(e){return this.min(1,k.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};$e.create=t=>{var e;return new $e({checks:[],typeName:E.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...A(t)})};function Hh(t,e){let r=(t.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,n=r>s?r:s,i=parseInt(t.toFixed(n).replace(".","")),a=parseInt(e.toFixed(n).replace(".",""));return i%a/Math.pow(10,n)}var qe=class t extends I{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==y.number){let i=this._getOrReturnCtx(e);return v(i,{code:p.invalid_type,expected:y.number,received:i.parsedType}),R}let s,n=new W;for(let i of this._def.checks)i.kind==="int"?$.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{code:p.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(s=this._getOrReturnCtx(e,s),v(s,{code:p.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(s=this._getOrReturnCtx(e,s),v(s,{code:p.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?Hh(e.data,i.value)!==0&&(s=this._getOrReturnCtx(e,s),v(s,{code:p.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),v(s,{code:p.not_finite,message:i.message}),n.dirty()):$.assertNever(i);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,k.toString(r))}gt(e,r){return this.setLimit("min",e,!1,k.toString(r))}lte(e,r){return this.setLimit("max",e,!0,k.toString(r))}lt(e,r){return this.setLimit("max",e,!1,k.toString(r))}setLimit(e,r,s,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:s,message:k.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:k.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:k.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:k.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:k.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:k.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&$.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(r===null||s.value>r)&&(r=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(r)&&Number.isFinite(e)}};qe.create=t=>new qe({checks:[],typeName:E.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...A(t)});var Be=class t extends I{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==y.bigint)return this._getInvalidInput(e);let s,n=new W;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(s=this._getOrReturnCtx(e,s),v(s,{code:p.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(s=this._getOrReturnCtx(e,s),v(s,{code:p.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),v(s,{code:p.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):$.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return v(r,{code:p.invalid_type,expected:y.bigint,received:r.parsedType}),R}gte(e,r){return this.setLimit("min",e,!0,k.toString(r))}gt(e,r){return this.setLimit("min",e,!1,k.toString(r))}lte(e,r){return this.setLimit("max",e,!0,k.toString(r))}lt(e,r){return this.setLimit("max",e,!1,k.toString(r))}setLimit(e,r,s,n){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:s,message:k.toString(n)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:k.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Be.create=t=>{var e;return new Be({checks:[],typeName:E.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...A(t)})};var Ge=class extends I{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){let s=this._getOrReturnCtx(e);return v(s,{code:p.invalid_type,expected:y.boolean,received:s.parsedType}),R}return J(e.data)}};Ge.create=t=>new Ge({typeName:E.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...A(t)});var Ue=class t extends I{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){let i=this._getOrReturnCtx(e);return v(i,{code:p.invalid_type,expected:y.date,received:i.parsedType}),R}if(isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return v(i,{code:p.invalid_date}),R}let s=new W,n;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),v(n,{code:p.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),s.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),v(n,{code:p.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),s.dirty()):$.assertNever(i);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:k.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:k.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Ue.create=t=>new Ue({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:E.ZodDate,...A(t)});var ht=class extends I{_parse(e){if(this._getType(e)!==y.symbol){let s=this._getOrReturnCtx(e);return v(s,{code:p.invalid_type,expected:y.symbol,received:s.parsedType}),R}return J(e.data)}};ht.create=t=>new ht({typeName:E.ZodSymbol,...A(t)});var Ve=class extends I{_parse(e){if(this._getType(e)!==y.undefined){let s=this._getOrReturnCtx(e);return v(s,{code:p.invalid_type,expected:y.undefined,received:s.parsedType}),R}return J(e.data)}};Ve.create=t=>new Ve({typeName:E.ZodUndefined,...A(t)});var Ze=class extends I{_parse(e){if(this._getType(e)!==y.null){let s=this._getOrReturnCtx(e);return v(s,{code:p.invalid_type,expected:y.null,received:s.parsedType}),R}return J(e.data)}};Ze.create=t=>new Ze({typeName:E.ZodNull,...A(t)});var Ne=class extends I{constructor(){super(...arguments),this._any=!0}_parse(e){return J(e.data)}};Ne.create=t=>new Ne({typeName:E.ZodAny,...A(t)});var Ce=class extends I{constructor(){super(...arguments),this._unknown=!0}_parse(e){return J(e.data)}};Ce.create=t=>new Ce({typeName:E.ZodUnknown,...A(t)});var ve=class extends I{_parse(e){let r=this._getOrReturnCtx(e);return v(r,{code:p.invalid_type,expected:y.never,received:r.parsedType}),R}};ve.create=t=>new ve({typeName:E.ZodNever,...A(t)});var pt=class extends I{_parse(e){if(this._getType(e)!==y.undefined){let s=this._getOrReturnCtx(e);return v(s,{code:p.invalid_type,expected:y.void,received:s.parsedType}),R}return J(e.data)}};pt.create=t=>new pt({typeName:E.ZodVoid,...A(t)});var Oe=class t extends I{_parse(e){let{ctx:r,status:s}=this._processInputParams(e),n=this._def;if(r.parsedType!==y.array)return v(r,{code:p.invalid_type,expected:y.array,received:r.parsedType}),R;if(n.exactLength!==null){let a=r.data.length>n.exactLength.value,o=r.data.length<n.exactLength.value;(a||o)&&(v(r,{code:a?p.too_big:p.too_small,minimum:o?n.exactLength.value:void 0,maximum:a?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),s.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(v(r,{code:p.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),s.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(v(r,{code:p.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),s.dirty()),r.common.async)return Promise.all([...r.data].map((a,o)=>n.type._parseAsync(new he(r,a,r.path,o)))).then(a=>W.mergeArray(s,a));let i=[...r.data].map((a,o)=>n.type._parseSync(new he(r,a,r.path,o)));return W.mergeArray(s,i)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:k.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:k.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:k.toString(r)}})}nonempty(e){return this.min(1,e)}};Oe.create=(t,e)=>new Oe({type:t,minLength:null,maxLength:null,exactLength:null,typeName:E.ZodArray,...A(e)});function lt(t){if(t instanceof te){let e={};for(let r in t.shape){let s=t.shape[r];e[r]=fe.create(lt(s))}return new te({...t._def,shape:()=>e})}else return t instanceof Oe?new Oe({...t._def,type:lt(t.element)}):t instanceof fe?fe.create(lt(t.unwrap())):t instanceof ke?ke.create(lt(t.unwrap())):t instanceof be?be.create(t.items.map(e=>lt(e))):t}var te=class t extends I{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=$.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==y.object){let u=this._getOrReturnCtx(e);return v(u,{code:p.invalid_type,expected:y.object,received:u.parsedType}),R}let{status:s,ctx:n}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof ve&&this._def.unknownKeys==="strip"))for(let u in n.data)a.includes(u)||o.push(u);let c=[];for(let u of a){let l=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new he(n,d,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof ve){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of o)c.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(u==="strict")o.length>0&&(v(n,{code:p.unrecognized_keys,keys:o}),s.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of o){let d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new he(n,d,n.path,l)),alwaysSet:l in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,h=await l.value;u.push({key:d,value:h,alwaysSet:l.alwaysSet})}return u}).then(u=>W.mergeObjectSync(s,u)):W.mergeObjectSync(s,c)}get shape(){return this._def.shape()}strict(e){return k.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,s)=>{var n,i,a,o;let c=(a=(i=(n=this._def).errorMap)===null||i===void 0?void 0:i.call(n,r,s).message)!==null&&a!==void 0?a:s.defaultError;return r.code==="unrecognized_keys"?{message:(o=k.errToObj(e).message)!==null&&o!==void 0?o:c}:{message:c}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:E.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return $.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(r[s]=this.shape[s])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return $.objectKeys(this.shape).forEach(s=>{e[s]||(r[s]=this.shape[s])}),new t({...this._def,shape:()=>r})}deepPartial(){return lt(this)}partial(e){let r={};return $.objectKeys(this.shape).forEach(s=>{let n=this.shape[s];e&&!e[s]?r[s]=n:r[s]=n.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return $.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])r[s]=this.shape[s];else{let i=this.shape[s];for(;i instanceof fe;)i=i._def.innerType;r[s]=i}}),new t({...this._def,shape:()=>r})}keyof(){return Na($.objectKeys(this.shape))}};te.create=(t,e)=>new te({shape:()=>t,unknownKeys:"strip",catchall:ve.create(),typeName:E.ZodObject,...A(e)});te.strictCreate=(t,e)=>new te({shape:()=>t,unknownKeys:"strict",catchall:ve.create(),typeName:E.ZodObject,...A(e)});te.lazycreate=(t,e)=>new te({shape:t,unknownKeys:"strip",catchall:ve.create(),typeName:E.ZodObject,...A(e)});var ze=class extends I{_parse(e){let{ctx:r}=this._processInputParams(e),s=this._def.options;function n(i){for(let o of i)if(o.result.status==="valid")return o.result;for(let o of i)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let a=i.map(o=>new ie(o.ctx.common.issues));return v(r,{code:p.invalid_union,unionErrors:a}),R}if(r.common.async)return Promise.all(s.map(async i=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(n);{let i,a=[];for(let c of s){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"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let o=a.map(c=>new ie(c));return v(r,{code:p.invalid_union,unionErrors:o}),R}}get options(){return this._def.options}};ze.create=(t,e)=>new ze({options:t,typeName:E.ZodUnion,...A(e)});var Ee=t=>t instanceof Xe?Ee(t.schema):t instanceof ae?Ee(t.innerType()):t instanceof He?[t.value]:t instanceof Ye?t.options:t instanceof Ke?$.objectValues(t.enum):t instanceof Je?Ee(t._def.innerType):t instanceof Ve?[void 0]:t instanceof Ze?[null]:t instanceof fe?[void 0,...Ee(t.unwrap())]:t instanceof ke?[null,...Ee(t.unwrap())]:t instanceof Ft||t instanceof et?Ee(t.unwrap()):t instanceof Qe?Ee(t._def.innerType):[],gr=class t extends I{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.object)return v(r,{code:p.invalid_type,expected:y.object,received:r.parsedType}),R;let s=this.discriminator,n=r.data[s],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(v(r,{code:p.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),R)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,s){let n=new Map;for(let i of r){let a=Ee(i.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of a){if(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,i)}}return new t({typeName:E.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:n,...A(s)})}};function Es(t,e){let r=Re(t),s=Re(e);if(t===e)return{valid:!0,data:t};if(r===y.object&&s===y.object){let n=$.objectKeys(e),i=$.objectKeys(t).filter(o=>n.indexOf(o)!==-1),a={...t,...e};for(let o of i){let c=Es(t[o],e[o]);if(!c.valid)return{valid:!1};a[o]=c.data}return{valid:!0,data:a}}else if(r===y.array&&s===y.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let i=0;i<t.length;i++){let a=t[i],o=e[i],c=Es(a,o);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return r===y.date&&s===y.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var We=class extends I{_parse(e){let{status:r,ctx:s}=this._processInputParams(e),n=(i,a)=>{if(xs(i)||xs(a))return R;let o=Es(i.value,a.value);return o.valid?((Ts(i)||Ts(a))&&r.dirty(),{status:r.value,value:o.data}):(v(s,{code:p.invalid_intersection_types}),R)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([i,a])=>n(i,a)):n(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}};We.create=(t,e,r)=>new We({left:t,right:e,typeName:E.ZodIntersection,...A(r)});var be=class t extends I{_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==y.array)return v(s,{code:p.invalid_type,expected:y.array,received:s.parsedType}),R;if(s.data.length<this._def.items.length)return v(s,{code:p.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),R;!this._def.rest&&s.data.length>this._def.items.length&&(v(s,{code:p.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...s.data].map((a,o)=>{let c=this._def.items[o]||this._def.rest;return c?c._parse(new he(s,a,s.path,o)):null}).filter(a=>!!a);return s.common.async?Promise.all(i).then(a=>W.mergeArray(r,a)):W.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};be.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new be({items:t,typeName:E.ZodTuple,rest:null,...A(e)})};var vr=class t extends I{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==y.object)return v(s,{code:p.invalid_type,expected:y.object,received:s.parsedType}),R;let n=[],i=this._def.keyType,a=this._def.valueType;for(let o in s.data)n.push({key:i._parse(new he(s,o,s.path,o)),value:a._parse(new he(s,s.data[o],s.path,o)),alwaysSet:o in s.data});return s.common.async?W.mergeObjectAsync(r,n):W.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,s){return r instanceof I?new t({keyType:e,valueType:r,typeName:E.ZodRecord,...A(s)}):new t({keyType:$e.create(),valueType:e,typeName:E.ZodRecord,...A(r)})}},mt=class extends I{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==y.map)return v(s,{code:p.invalid_type,expected:y.map,received:s.parsedType}),R;let n=this._def.keyType,i=this._def.valueType,a=[...s.data.entries()].map(([o,c],u)=>({key:n._parse(new he(s,o,s.path,[u,"key"])),value:i._parse(new he(s,c,s.path,[u,"value"]))}));if(s.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let c of a){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return R;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(u.value,l.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let c of a){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return R;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(u.value,l.value)}return{status:r.value,value:o}}}};mt.create=(t,e,r)=>new mt({valueType:e,keyType:t,typeName:E.ZodMap,...A(r)});var gt=class t extends I{_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.parsedType!==y.set)return v(s,{code:p.invalid_type,expected:y.set,received:s.parsedType}),R;let n=this._def;n.minSize!==null&&s.data.size<n.minSize.value&&(v(s,{code:p.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&s.data.size>n.maxSize.value&&(v(s,{code:p.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function a(c){let u=new Set;for(let l of c){if(l.status==="aborted")return R;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let o=[...s.data.values()].map((c,u)=>i._parse(new he(s,c,s.path,u)));return s.common.async?Promise.all(o).then(c=>a(c)):a(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:k.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:k.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};gt.create=(t,e)=>new gt({valueType:t,minSize:null,maxSize:null,typeName:E.ZodSet,...A(e)});var yr=class t extends I{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.function)return v(r,{code:p.invalid_type,expected:y.function,received:r.parsedType}),R;function s(o,c){return pr({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,hr(),ft].filter(u=>!!u),issueData:{code:p.invalid_arguments,argumentsError:c}})}function n(o,c){return pr({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,hr(),ft].filter(u=>!!u),issueData:{code:p.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Le){let o=this;return J(async function(...c){let u=new ie([]),l=await o._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(s(c,f)),u}),d=await Reflect.apply(a,this,l);return await o._def.returns._def.type.parseAsync(d,i).catch(f=>{throw u.addIssue(n(d,f)),u})})}else{let o=this;return J(function(...c){let u=o._def.args.safeParse(c,i);if(!u.success)throw new ie([s(c,u.error)]);let l=Reflect.apply(a,this,u.data),d=o._def.returns.safeParse(l,i);if(!d.success)throw new ie([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:be.create(e).rest(Ce.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,s){return new t({args:e||be.create([]).rest(Ce.create()),returns:r||Ce.create(),typeName:E.ZodFunction,...A(s)})}},Xe=class extends I{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Xe.create=(t,e)=>new Xe({getter:t,typeName:E.ZodLazy,...A(e)});var He=class extends I{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return v(r,{received:r.data,code:p.invalid_literal,expected:this._def.value}),R}return{status:"valid",value:e.data}}get value(){return this._def.value}};He.create=(t,e)=>new He({value:t,typeName:E.ZodLiteral,...A(e)});function Na(t,e){return new Ye({values:t,typeName:E.ZodEnum,...A(e)})}var Ye=class t extends I{constructor(){super(...arguments),Lt.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),s=this._def.values;return v(r,{expected:$.joinValues(s),received:r.parsedType,code:p.invalid_type}),R}if(mr(this,Lt,"f")||Sa(this,Lt,new Set(this._def.values),"f"),!mr(this,Lt,"f").has(e.data)){let r=this._getOrReturnCtx(e),s=this._def.values;return v(r,{received:r.data,code:p.invalid_enum_value,options:s}),R}return J(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(s=>!e.includes(s)),{...this._def,...r})}};Lt=new WeakMap;Ye.create=Na;var Ke=class extends I{constructor(){super(...arguments),Pt.set(this,void 0)}_parse(e){let r=$.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==y.string&&s.parsedType!==y.number){let n=$.objectValues(r);return v(s,{expected:$.joinValues(n),received:s.parsedType,code:p.invalid_type}),R}if(mr(this,Pt,"f")||Sa(this,Pt,new Set($.getValidEnumValues(this._def.values)),"f"),!mr(this,Pt,"f").has(e.data)){let n=$.objectValues(r);return v(s,{received:s.data,code:p.invalid_enum_value,options:n}),R}return J(e.data)}get enum(){return this._def.values}};Pt=new WeakMap;Ke.create=(t,e)=>new Ke({values:t,typeName:E.ZodNativeEnum,...A(e)});var Le=class extends I{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.promise&&r.common.async===!1)return v(r,{code:p.invalid_type,expected:y.promise,received:r.parsedType}),R;let s=r.parsedType===y.promise?r.data:Promise.resolve(r.data);return J(s.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Le.create=(t,e)=>new Le({type:t,typeName:E.ZodPromise,...A(e)});var ae=class extends I{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===E.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:s}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:a=>{v(s,a),a.fatal?r.abort():r.dirty()},get path(){return s.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let a=n.transform(s.data,i);if(s.common.async)return Promise.resolve(a).then(async o=>{if(r.value==="aborted")return R;let c=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return c.status==="aborted"?R:c.status==="dirty"||r.value==="dirty"?dt(c.value):c});{if(r.value==="aborted")return R;let o=this._def.schema._parseSync({data:a,path:s.path,parent:s});return o.status==="aborted"?R:o.status==="dirty"||r.value==="dirty"?dt(o.value):o}}if(n.type==="refinement"){let a=o=>{let c=n.refinement(o,i);if(s.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){let o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?R:(o.status==="dirty"&&r.dirty(),a(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?R:(o.status==="dirty"&&r.dirty(),a(o.value).then(()=>({status:r.value,value:o.value}))))}if(n.type==="transform")if(s.common.async===!1){let a=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!Me(a))return a;let o=n.transform(a.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(a=>Me(a)?Promise.resolve(n.transform(a.value,i)).then(o=>({status:r.value,value:o})):a);$.assertNever(n)}};ae.create=(t,e,r)=>new ae({schema:t,typeName:E.ZodEffects,effect:e,...A(r)});ae.createWithPreprocess=(t,e,r)=>new ae({schema:e,effect:{type:"preprocess",transform:t},typeName:E.ZodEffects,...A(r)});var fe=class extends I{_parse(e){return this._getType(e)===y.undefined?J(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};fe.create=(t,e)=>new fe({innerType:t,typeName:E.ZodOptional,...A(e)});var ke=class extends I{_parse(e){return this._getType(e)===y.null?J(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ke.create=(t,e)=>new ke({innerType:t,typeName:E.ZodNullable,...A(e)});var Je=class extends I{_parse(e){let{ctx:r}=this._processInputParams(e),s=r.data;return r.parsedType===y.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Je.create=(t,e)=>new Je({innerType:t,typeName:E.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...A(e)});var Qe=class extends I{_parse(e){let{ctx:r}=this._processInputParams(e),s={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return jt(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ie(s.common.issues)},input:s.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new ie(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}};Qe.create=(t,e)=>new Qe({innerType:t,typeName:E.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...A(e)});var vt=class extends I{_parse(e){if(this._getType(e)!==y.nan){let s=this._getOrReturnCtx(e);return v(s,{code:p.invalid_type,expected:y.nan,received:s.parsedType}),R}return{status:"valid",value:e.data}}};vt.create=t=>new vt({typeName:E.ZodNaN,...A(t)});var Yh=Symbol("zod_brand"),Ft=class extends I{_parse(e){let{ctx:r}=this._processInputParams(e),s=r.data;return this._def.type._parse({data:s,path:r.path,parent:r})}unwrap(){return this._def.type}},Dt=class t extends I{_parse(e){let{status:r,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?R:i.status==="dirty"?(r.dirty(),dt(i.value)):this._def.out._parseAsync({data:i.value,path:s.path,parent:s})})();{let n=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?R:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:s.path,parent:s})}}static create(e,r){return new t({in:e,out:r,typeName:E.ZodPipeline})}},et=class extends I{_parse(e){let r=this._def.innerType._parse(e),s=n=>(Me(n)&&(n.value=Object.freeze(n.value)),n);return jt(r)?r.then(n=>s(n)):s(r)}unwrap(){return this._def.innerType}};et.create=(t,e)=>new et({innerType:t,typeName:E.ZodReadonly,...A(e)});function Ra(t,e){let r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function La(t,e={},r){return t?Ne.create().superRefine((s,n)=>{var i,a;let o=t(s);if(o instanceof Promise)return o.then(c=>{var u,l;if(!c){let d=Ra(e,s),h=(l=(u=d.fatal)!==null&&u!==void 0?u:r)!==null&&l!==void 0?l:!0;n.addIssue({code:"custom",...d,fatal:h})}});if(!o){let c=Ra(e,s),u=(a=(i=c.fatal)!==null&&i!==void 0?i:r)!==null&&a!==void 0?a:!0;n.addIssue({code:"custom",...c,fatal:u})}}):Ne.create()}var Kh={object:te.lazycreate},E;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(E||(E={}));var Jh=(t,e={message:`Input not instance of ${t.name}`})=>La(r=>r instanceof t,e),Pa=$e.create,ja=qe.create,Qh=vt.create,ep=Be.create,Fa=Ge.create,tp=Ue.create,rp=ht.create,sp=Ve.create,np=Ze.create,ip=Ne.create,ap=Ce.create,op=ve.create,cp=pt.create,up=Oe.create,lp=te.create,dp=te.strictCreate,fp=ze.create,hp=gr.create,pp=We.create,mp=be.create,gp=vr.create,vp=mt.create,yp=gt.create,_p=yr.create,bp=Xe.create,kp=He.create,wp=Ye.create,xp=Ke.create,Tp=Le.create,Ca=ae.create,Ep=fe.create,Rp=ke.create,Cp=ae.createWithPreprocess,Op=Dt.create,Sp=()=>Pa().optional(),Ap=()=>ja().optional(),Ip=()=>Fa().optional(),$p={string:t=>$e.create({...t,coerce:!0}),number:t=>qe.create({...t,coerce:!0}),boolean:t=>Ge.create({...t,coerce:!0}),bigint:t=>Be.create({...t,coerce:!0}),date:t=>Ue.create({...t,coerce:!0})},Np=R,Se=Object.freeze({__proto__:null,defaultErrorMap:ft,setErrorMap:Ch,getErrorMap:hr,makeIssue:pr,EMPTY_PATH:Oh,addIssueToContext:v,ParseStatus:W,INVALID:R,DIRTY:dt,OK:J,isAborted:xs,isDirty:Ts,isValid:Me,isAsync:jt,get util(){return $},get objectUtil(){return ws},ZodParsedType:y,getParsedType:Re,ZodType:I,datetimeRegex:$a,ZodString:$e,ZodNumber:qe,ZodBigInt:Be,ZodBoolean:Ge,ZodDate:Ue,ZodSymbol:ht,ZodUndefined:Ve,ZodNull:Ze,ZodAny:Ne,ZodUnknown:Ce,ZodNever:ve,ZodVoid:pt,ZodArray:Oe,ZodObject:te,ZodUnion:ze,ZodDiscriminatedUnion:gr,ZodIntersection:We,ZodTuple:be,ZodRecord:vr,ZodMap:mt,ZodSet:gt,ZodFunction:yr,ZodLazy:Xe,ZodLiteral:He,ZodEnum:Ye,ZodNativeEnum:Ke,ZodPromise:Le,ZodEffects:ae,ZodTransformer:ae,ZodOptional:fe,ZodNullable:ke,ZodDefault:Je,ZodCatch:Qe,ZodNaN:vt,BRAND:Yh,ZodBranded:Ft,ZodPipeline:Dt,ZodReadonly:et,custom:La,Schema:I,ZodSchema:I,late:Kh,get ZodFirstPartyTypeKind(){return E},coerce:$p,any:ip,array:up,bigint:ep,boolean:Fa,date:tp,discriminatedUnion:hp,effect:Ca,enum:wp,function:_p,instanceof:Jh,intersection:pp,lazy:bp,literal:kp,map:vp,nan:Qh,nativeEnum:xp,never:op,null:np,nullable:Rp,number:ja,object:lp,oboolean:Ip,onumber:Ap,optional:Ep,ostring:Sp,pipeline:Op,preprocess:Cp,promise:Tp,record:gp,set:yp,strictObject:dp,string:Pa,symbol:rp,transformer:Ca,tuple:mp,undefined:sp,union:fp,unknown:ap,void:cp,NEVER:Np,ZodIssueCode:p,quotelessJson:Rh,ZodError:ie});var Da=Se.object({list:Se.boolean().optional(),log:Se.boolean().optional(),track:Se.boolean(),reporter:Se.boolean().optional(),parser:Se.enum(["babel","babylon","flow","ts","tsx"]).optional(),extensions:Se.string().optional(),ignoreConfig:Se.string().optional()});var Fr=Fe(Ka(),1),Nr=Fe(Ss(),1),Tc=require("child_process"),ou=Fe(Is(),1),wt=Fe(Is(),1),Nu=require("node:events"),Pr=Object.defineProperty,lm=Object.defineProperties,dm=Object.getOwnPropertyDescriptor,fm=Object.getOwnPropertyDescriptors,Ks=Object.getOwnPropertyNames,Ja=Object.getOwnPropertySymbols,$o=Object.prototype.hasOwnProperty,hm=Object.prototype.propertyIsEnumerable,Qa=(t,e,r)=>e in t?Pr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,me=(t,e)=>{for(var r in e||(e={}))$o.call(e,r)&&Qa(t,r,e[r]);if(Ja)for(var r of Ja(e))hm.call(e,r)&&Qa(t,r,e[r]);return t},Bt=(t,e)=>lm(t,fm(e)),g=(t,e)=>function(){return t&&(e=(0,t[Ks(t)[0]])(t=0)),e},pm=(t,e)=>function(){return e||(0,t[Ks(t)[0]])((e={exports:{}}).exports,e),e.exports},G=(t,e)=>{for(var r in e)Pr(t,r,{get:e[r],enumerable:!0})},mm=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ks(e))!$o.call(t,n)&&n!==r&&Pr(t,n,{get:()=>e[n],enumerable:!(s=dm(e,n))||s.enumerable});return t},M=t=>mm(Pr({},"__esModule",{value:!0}),t),qt=(t,e,r)=>new Promise((s,n)=>{var i=c=>{try{o(r.next(c))}catch(u){n(u)}},a=c=>{try{o(r.throw(c))}catch(u){n(u)}},o=c=>c.done?s(c.value):Promise.resolve(c.value).then(i,a);o((r=r.apply(t,e)).next())});function gm(...t){let e=new String(t);return jr.set(e,t),e}function Ir(t){return t instanceof String&&jr.has(t)}function eo(t){return jr.get(t)||[]}var jr,Zt=g({"src/lib/args/pathspec.ts"(){"use strict";jr=new WeakMap}}),Ie,je=g({"src/lib/errors/git-error.ts"(){"use strict";Ie=class extends Error{constructor(t,e){super(e),this.task=t,Object.setPrototypeOf(this,new.target.prototype)}}}}),zt,Tt=g({"src/lib/errors/git-response-error.ts"(){"use strict";je(),zt=class extends Ie{constructor(t,e){super(void 0,e||String(t)),this.git=t}}}}),No,Lo=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";je(),No=class extends Ie{constructor(t){super(void 0,t)}}}});function Po(t){return typeof t=="function"?t:it}function jo(t){return typeof t=="function"&&t!==it}function Fo(t,e){let r=t.indexOf(e);return r<=0?[t,""]:[t.substr(0,r),t.substr(r+1)]}function Do(t,e=0){return Mo(t)&&t.length>e?t[e]:void 0}function nt(t,e=0){if(Mo(t)&&t.length>e)return t[t.length-1-e]}function Mo(t){return!!(t&&typeof t.length=="number")}function Wt(t="",e=!0,r=`
14
- `){return t.split(r).reduce((s,n)=>{let i=e?n.trim():n;return i&&s.push(i),s},[])}function Js(t,e){return Wt(t,!0).map(r=>e(r))}function Qs(t){return(0,Fr.exists)(t,Fr.FOLDER)}function N(t,e){return Array.isArray(t)?t.includes(e)||t.push(e):t.add(e),e}function qo(t,e){return Array.isArray(t)&&!t.includes(e)&&t.push(e),t}function Dr(t,e){if(Array.isArray(t)){let r=t.indexOf(e);r>=0&&t.splice(r,1)}else t.delete(e);return e}function we(t){return Array.isArray(t)?t:[t]}function Bo(t){return t.replace(/[\s-]+(.)/g,(e,r)=>r.toUpperCase())}function Go(t){return we(t).map(String)}function P(t,e=0){if(t==null)return e;let r=parseInt(t,10);return isNaN(r)?e:r}function Gt(t,e){let r=[];for(let s=0,n=t.length;s<n;s++)r.push(e,t[s]);return r}function Ut(t){return(Array.isArray(t)?Buffer.concat(t):t).toString("utf-8")}function Uo(t,e){return Object.assign({},...e.map(r=>r in t?{[r]:t[r]}:{}))}function Ds(t=0){return new Promise(e=>setTimeout(e,t))}function Ms(t){if(t!==!1)return t}var xt,it,Xt,Mr=g({"src/lib/utils/util.ts"(){"use strict";xt="\0",it=()=>{},Xt=Object.prototype.toString.call.bind(Object.prototype.toString)}});function xe(t,e,r){return e(t)?t:arguments.length>2?r:void 0}function en(t,e){let r=Ir(t)?"string":typeof t;return/number|string|boolean/.test(r)&&(!e||!e.includes(r))}function tn(t){return!!t&&Xt(t)==="[object Object]"}function Vo(t){return typeof t=="function"}var Ht,X,Zo,$r,rn,zo=g({"src/lib/utils/argument-filters.ts"(){"use strict";Mr(),Zt(),Ht=t=>Array.isArray(t),X=t=>typeof t=="string",Zo=t=>Array.isArray(t)&&t.every(X),$r=t=>X(t)||Array.isArray(t)&&t.every(X),rn=t=>t==null||"number|boolean|function".includes(typeof t)?!1:Array.isArray(t)||typeof t=="string"||typeof t.length=="number"}}),qs,vm=g({"src/lib/utils/exit-codes.ts"(){"use strict";qs=(t=>(t[t.SUCCESS=0]="SUCCESS",t[t.ERROR=1]="ERROR",t[t.NOT_FOUND=-2]="NOT_FOUND",t[t.UNCLEAN=128]="UNCLEAN",t))(qs||{})}}),Vt,ym=g({"src/lib/utils/git-output-streams.ts"(){"use strict";Vt=class{constructor(t,e){this.stdOut=t,this.stdErr=e}asStrings(){return new Vt(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),S,Pe,_m=g({"src/lib/utils/line-parser.ts"(){"use strict";S=class{constructor(t,e){this.matches=[],this.parse=(r,s)=>(this.resetMatches(),this._regExp.every((n,i)=>this.addMatch(n,i,r(i)))?this.useMatches(s,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(t)?t:[t],e&&(this.useMatches=e)}useMatches(t,e){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(t,e,r){let s=r&&t.exec(r);return s&&this.pushMatch(e,s),!!s}pushMatch(t,e){this.matches.push(...e.slice(1))}},Pe=class extends S{addMatch(t,e,r){return/^remote:\s/.test(String(r))&&super.addMatch(t,e,r)}pushMatch(t,e){(t>0||e.length>1)&&super.pushMatch(t,e)}}}});function Wo(...t){let e=process.cwd(),r=Object.assign(me({baseDir:e},Xo),...t.filter(s=>typeof s=="object"&&s));return r.baseDir=r.baseDir||e,r.trimmed=r.trimmed===!0,r}var Xo,bm=g({"src/lib/utils/simple-git-options.ts"(){"use strict";Xo={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function sn(t,e=[]){return tn(t)?Object.keys(t).reduce((r,s)=>{let n=t[s];return Ir(n)?r.push(n):en(n,["boolean"])?r.push(s+"="+n):r.push(s),r},e):e}function re(t,e=0,r=!1){let s=[];for(let n=0,i=e<0?t.length:e;n<i;n++)"string|number".includes(typeof t[n])&&s.push(String(t[n]));return sn(nn(t),s),r||s.push(...km(t)),s}function km(t){let e=typeof nt(t)=="function";return xe(nt(t,e?1:0),Ht,[])}function nn(t){let e=Vo(nt(t));return xe(nt(t,e?1:0),tn)}function q(t,e=!0){let r=Po(nt(t));return e||jo(r)?r:void 0}var wm=g({"src/lib/utils/task-options.ts"(){"use strict";zo(),Mr(),Zt()}});function Bs(t,e){return t(e.stdOut,e.stdErr)}function ne(t,e,r,s=!0){return we(r).forEach(n=>{for(let i=Wt(n,s),a=0,o=i.length;a<o;a++){let c=(u=0)=>{if(!(a+u>=o))return i[a+u]};e.some(({parse:u})=>u(c,t))}}),t}var xm=g({"src/lib/utils/task-parser.ts"(){"use strict";Mr()}}),Ho={};G(Ho,{ExitCodes:()=>qs,GitOutputStreams:()=>Vt,LineParser:()=>S,NOOP:()=>it,NULL:()=>xt,RemoteLineParser:()=>Pe,append:()=>N,appendTaskOptions:()=>sn,asArray:()=>we,asCamelCase:()=>Bo,asFunction:()=>Po,asNumber:()=>P,asStringArray:()=>Go,bufferToString:()=>Ut,callTaskParser:()=>Bs,createInstanceConfig:()=>Wo,delay:()=>Ds,filterArray:()=>Ht,filterFunction:()=>Vo,filterHasLength:()=>rn,filterPlainObject:()=>tn,filterPrimitives:()=>en,filterString:()=>X,filterStringArray:()=>Zo,filterStringOrStringArray:()=>$r,filterType:()=>xe,first:()=>Do,folderExists:()=>Qs,forEachLineWithContent:()=>Js,getTrailingOptions:()=>re,including:()=>qo,isUserFunction:()=>jo,last:()=>nt,objectToString:()=>Xt,orVoid:()=>Ms,parseStringResponse:()=>ne,pick:()=>Uo,prefixedArray:()=>Gt,remove:()=>Dr,splitOn:()=>Fo,toLinesWithContent:()=>Wt,trailingFunctionArgument:()=>q,trailingOptionsArgument:()=>nn});var C=g({"src/lib/utils/index.ts"(){"use strict";zo(),vm(),ym(),_m(),bm(),wm(),xm(),Mr()}}),Yo={};G(Yo,{CheckRepoActions:()=>Gs,checkIsBareRepoTask:()=>Jo,checkIsRepoRootTask:()=>Ko,checkIsRepoTask:()=>Tm});function Tm(t){switch(t){case"bare":return Jo();case"root":return Ko()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:qr,parser:an}}function Ko(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:qr,parser(e){return/^\.(git)?$/.test(e.trim())}}}function Jo(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:qr,parser:an}}function Em(t){return/(Not a git repository|Kein Git-Repository)/i.test(String(t))}var Gs,qr,an,Qo=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";C(),Gs=(t=>(t.BARE="bare",t.IN_TREE="tree",t.IS_REPO_ROOT="root",t))(Gs||{}),qr=({exitCode:t},e,r,s)=>{if(t===128&&Em(e))return r(Buffer.from("false"));s(e)},an=t=>t.trim()==="true"}});function Rm(t,e){let r=new ec(t),s=t?rc:tc;return Wt(e).forEach(n=>{let i=n.replace(s,"");r.paths.push(i),(sc.test(i)?r.folders:r.files).push(i)}),r}var ec,tc,rc,sc,Cm=g({"src/lib/responses/CleanSummary.ts"(){"use strict";C(),ec=class{constructor(t){this.dryRun=t,this.paths=[],this.files=[],this.folders=[]}},tc=/^[a-z]+\s*/i,rc=/^[a-z]+\s+[a-z]+\s*/i,sc=/\/$/}}),Us={};G(Us,{EMPTY_COMMANDS:()=>Br,adhocExecTask:()=>nc,configurationErrorTask:()=>se,isBufferTask:()=>ac,isEmptyTask:()=>oc,straightThroughBufferTask:()=>ic,straightThroughStringTask:()=>Q});function nc(t){return{commands:Br,format:"empty",parser:t}}function se(t){return{commands:Br,format:"empty",parser(){throw typeof t=="string"?new No(t):t}}}function Q(t,e=!1){return{commands:t,format:"utf-8",parser(r){return e?String(r).trim():r}}}function ic(t){return{commands:t,format:"buffer",parser(e){return e}}}function ac(t){return t.format==="buffer"}function oc(t){return t.format==="empty"||!t.commands.length}var Br,B=g({"src/lib/tasks/task.ts"(){"use strict";Lo(),Br=[]}}),cc={};G(cc,{CONFIG_ERROR_INTERACTIVE_MODE:()=>on,CONFIG_ERROR_MODE_REQUIRED:()=>cn,CONFIG_ERROR_UNKNOWN_OPTION:()=>un,CleanOptions:()=>Cr,cleanTask:()=>uc,cleanWithOptionsTask:()=>Om,isCleanOptionsArray:()=>Sm});function Om(t,e){let{cleanMode:r,options:s,valid:n}=Am(t);return r?n.options?(s.push(...e),s.some(Nm)?se(on):uc(r,s)):se(un+JSON.stringify(t)):se(cn)}function uc(t,e){return{commands:["clean",`-${t}`,...e],format:"utf-8",parser(s){return Rm(t==="n",s)}}}function Sm(t){return Array.isArray(t)&&t.every(e=>ln.has(e))}function Am(t){let e,r=[],s={cleanMode:!1,options:!0};return t.replace(/[^a-z]i/g,"").split("").forEach(n=>{Im(n)?(e=n,s.cleanMode=!0):s.options=s.options&&$m(r[r.length]=`-${n}`)}),{cleanMode:e,options:r,valid:s}}function Im(t){return t==="f"||t==="n"}function $m(t){return/^-[a-z]$/i.test(t)&&ln.has(t.charAt(1))}function Nm(t){return/^-[^\-]/.test(t)?t.indexOf("i")>0:t==="--interactive"}var on,cn,un,Cr,ln,lc=g({"src/lib/tasks/clean.ts"(){"use strict";Cm(),C(),B(),on="Git clean interactive mode is not supported",cn='Git clean mode parameter ("n" or "f") is required',un="Git clean unknown option found in: ",Cr=(t=>(t.DRY_RUN="n",t.FORCE="f",t.IGNORED_INCLUDED="x",t.IGNORED_ONLY="X",t.EXCLUDING="e",t.QUIET="q",t.RECURSIVE="d",t))(Cr||{}),ln=new Set(["i",...Go(Object.values(Cr))])}});function Lm(t){let e=new fc;for(let r of dc(t))e.addValue(r.file,String(r.key),r.value);return e}function Pm(t,e){let r=null,s=[],n=new Map;for(let i of dc(t,e))i.key===e&&(s.push(r=i.value),n.has(i.file)||n.set(i.file,[]),n.get(i.file).push(r));return{key:e,paths:Array.from(n.keys()),scopes:n,value:r,values:s}}function jm(t){return t.replace(/^(file):/,"")}function*dc(t,e=null){let r=t.split("\0");for(let s=0,n=r.length-1;s<n;){let i=jm(r[s++]),a=r[s++],o=e;if(a.includes(`
15
- `)){let c=Fo(a,`
16
- `);o=c[0],a=c[1]}yield{file:i,key:o,value:a}}}var fc,Fm=g({"src/lib/responses/ConfigList.ts"(){"use strict";C(),fc=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((t,e)=>Object.assign(t,this.values[e]),{})),this._all}addFile(t){if(!(t in this.values)){let e=nt(this.files);this.values[t]=e?Object.create(this.values[e]):{},this.files.push(t)}return this.values[t]}addValue(t,e,r){let s=this.addFile(t);s.hasOwnProperty(e)?Array.isArray(s[e])?s[e].push(r):s[e]=[s[e],r]:s[e]=r,this._all=void 0}}}});function $s(t,e){return typeof t=="string"&&Vs.hasOwnProperty(t)?t:e}function Dm(t,e,r,s){let n=["config",`--${s}`];return r&&n.push("--add"),n.push(t,e),{commands:n,format:"utf-8",parser(i){return i}}}function Mm(t,e){let r=["config","--null","--show-origin","--get-all",t];return e&&r.splice(1,0,`--${e}`),{commands:r,format:"utf-8",parser(s){return Pm(s,t)}}}function qm(t){let e=["config","--list","--show-origin","--null"];return t&&e.push(`--${t}`),{commands:e,format:"utf-8",parser(r){return Lm(r)}}}function Bm(){return{addConfig(t,e,...r){return this._runTask(Dm(t,e,r[0]===!0,$s(r[1],"local")),q(arguments))},getConfig(t,e){return this._runTask(Mm(t,$s(e,void 0)),q(arguments))},listConfig(...t){return this._runTask(qm($s(t[0],void 0)),q(arguments))}}}var Vs,hc=g({"src/lib/tasks/config.ts"(){"use strict";Fm(),C(),Vs=(t=>(t.system="system",t.global="global",t.local="local",t.worktree="worktree",t))(Vs||{})}});function Gm(t){return pc.has(t)}var Ns,pc,mc=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";Ns=(t=>(t.ADDED="A",t.COPIED="C",t.DELETED="D",t.MODIFIED="M",t.RENAMED="R",t.CHANGED="T",t.UNMERGED="U",t.UNKNOWN="X",t.BROKEN="B",t))(Ns||{}),pc=new Set(Object.values(Ns))}});function Um(...t){return new vc().param(...t)}function Vm(t){let e=new Set,r={};return Js(t,s=>{let[n,i,a]=s.split(xt);e.add(n),(r[n]=r[n]||[]).push({line:P(i),path:n,preview:a})}),{paths:e,results:r}}function Zm(){return{grep(t){let e=q(arguments),r=re(arguments);for(let n of gc)if(r.includes(n))return this._runTask(se(`git.grep: use of "${n}" is not supported.`),e);typeof t=="string"&&(t=Um().param(t));let s=["grep","--null","-n","--full-name",...r,...t];return this._runTask({commands:s,format:"utf-8",parser(n){return Vm(n)}},e)}}}var gc,Mt,to,vc,yc=g({"src/lib/tasks/grep.ts"(){"use strict";C(),B(),gc=["-h"],Mt=Symbol("grepQuery"),vc=class{constructor(){this[to]=[]}*[(to=Mt,Symbol.iterator)](){for(let t of this[Mt])yield t}and(...t){return t.length&&this[Mt].push("--and","(",...Gt(t,"-e"),")"),this}param(...t){return this[Mt].push(...Gt(t,"-e")),this}}}}),_c={};G(_c,{ResetMode:()=>Or,getResetMode:()=>Wm,resetTask:()=>zm});function zm(t,e){let r=["reset"];return bc(t)&&r.push(`--${t}`),r.push(...e),Q(r)}function Wm(t){if(bc(t))return t;switch(typeof t){case"string":case"undefined":return"soft"}}function bc(t){return kc.includes(t)}var Or,kc,wc=g({"src/lib/tasks/reset.ts"(){"use strict";B(),Or=(t=>(t.MIXED="mixed",t.SOFT="soft",t.HARD="hard",t.MERGE="merge",t.KEEP="keep",t))(Or||{}),kc=Array.from(Object.values(Or))}});function Xm(){return(0,Nr.default)("simple-git")}function ro(t,e,r){return!e||!String(e).replace(/\s*/,"")?r?(s,...n)=>{t(s,...n),r(s,...n)}:t:(s,...n)=>{t(`%s ${s}`,e,...n),r&&r(s,...n)}}function Hm(t,e,{namespace:r}){if(typeof t=="string")return t;let s=e&&e.namespace||"";return s.startsWith(r)?s.substr(r.length+1):s||r}function dn(t,e,r,s=Xm()){let n=t&&`[${t}]`||"",i=[],a=typeof e=="string"?s.extend(e):e,o=Hm(xe(e,X),a,s);return u(r);function c(l,d){return N(i,dn(t,o.replace(/^[^:]+/,l),d,s))}function u(l){let d=l&&`[${l}]`||"",h=a&&ro(a,d)||it,f=ro(s,`${n} ${d}`,h);return Object.assign(a?h:f,{label:t,sibling:c,info:f,step:u})}}var xc=g({"src/lib/git-logger.ts"(){"use strict";C(),Nr.default.formatters.L=t=>String(rn(t)?t.length:"-"),Nr.default.formatters.B=t=>Buffer.isBuffer(t)?t.toString("utf8"):Xt(t)}}),Er,Zs,Ym=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";je(),xc(),Er=class{constructor(t="GitExecutor"){this.logLabel=t,this._queue=new Map}withProgress(t){return this._queue.get(t)}createProgress(t){let e=Er.getName(t.commands[0]),r=dn(this.logLabel,e);return{task:t,logger:r,name:e}}push(t){let e=this.createProgress(t);return e.logger("Adding task to the queue, commands = %o",t.commands),this._queue.set(t,e),e}fatal(t){for(let[e,{logger:r}]of Array.from(this._queue.entries()))e===t.task?(r.info("Failed %o",t),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",t.message),this.complete(e);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(t){this.withProgress(t)&&this._queue.delete(t)}attempt(t){let e=this.withProgress(t);if(!e)throw new Ie(void 0,"TasksPendingQueue: attempt called for an unknown task");return e.logger("Starting task"),e}static getName(t="empty"){return`task:${t}:${++Er.counter}`}},Zs=Er,Zs.counter=0}});function st(t,e){return{method:Do(t.commands)||"",commands:e}}function Km(t,e){return r=>{e("[ERROR] child process exception %o",r),t.push(Buffer.from(String(r.stack),"ascii"))}}function so(t,e,r,s){return n=>{r("%s received %L bytes",e,n),s("%B",n),t.push(n)}}var zs,Jm=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";je(),B(),C(),Ym(),zs=class{constructor(t,e,r){this._executor=t,this._scheduler=e,this._plugins=r,this._chain=Promise.resolve(),this._queue=new Zs}get cwd(){return this._cwd||this._executor.cwd}set cwd(t){this._cwd=t}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(t){return this._queue.push(t),this._chain=this._chain.then(()=>this.attemptTask(t))}attemptTask(t){return qt(this,null,function*(){let e=yield this._scheduler.next(),r=()=>this._queue.complete(t);try{let{logger:s}=this._queue.attempt(t);return yield oc(t)?this.attemptEmptyTask(t,s):this.attemptRemoteTask(t,s)}catch(s){throw this.onFatalException(t,s)}finally{r(),e()}})}onFatalException(t,e){let r=e instanceof Ie?Object.assign(e,{task:t}):new Ie(t,e&&String(e));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(t,e){return qt(this,null,function*(){let r=this._plugins.exec("spawn.binary","",st(t,t.commands)),s=this._plugins.exec("spawn.args",[...t.commands],st(t,t.commands)),n=yield this.gitResponse(t,r,s,this.outputHandler,e.step("SPAWN")),i=yield this.handleTaskData(t,s,n,e.step("HANDLE"));return e("passing response to task's parser as a %s",t.format),ac(t)?Bs(t.parser,i):Bs(t.parser,i.asStrings())})}attemptEmptyTask(t,e){return qt(this,null,function*(){return e("empty task bypassing child process to call to task's parser"),t.parser(this)})}handleTaskData(t,e,r,s){let{exitCode:n,rejection:i,stdOut:a,stdErr:o}=r;return new Promise((c,u)=>{s("Preparing to handle process response exitCode=%d stdOut=",n);let{error:l}=this._plugins.exec("task.error",{error:i},me(me({},st(t,e)),r));if(l&&t.onError)return s.info("exitCode=%s handling with custom error handler"),t.onError(r,l,d=>{s.info("custom error handler treated as success"),s("custom error returned a %s",Xt(d)),c(new Vt(Array.isArray(d)?Buffer.concat(d):d,Buffer.concat(o)))},u);if(l)return s.info("handling as error: exitCode=%s stdErr=%s rejection=%o",n,o.length,i),u(l);s.info("retrieving task output complete"),c(new Vt(Buffer.concat(a),Buffer.concat(o)))})}gitResponse(t,e,r,s,n){return qt(this,null,function*(){let i=n.sibling("output"),a=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},st(t,t.commands));return new Promise(o=>{let c=[],u=[];n.info("%s %o",e,r),n("%O",a);let l=this._beforeSpawn(t,r);if(l)return o({stdOut:c,stdErr:u,exitCode:9901,rejection:l});this._plugins.exec("spawn.before",void 0,Bt(me({},st(t,r)),{kill(h){l=h||l}}));let d=(0,Tc.spawn)(e,r,a);d.stdout.on("data",so(c,"stdOut",n,i.step("stdOut"))),d.stderr.on("data",so(u,"stdErr",n,i.step("stdErr"))),d.on("error",Km(u,n)),s&&(n("Passing child process stdOut/stdErr to custom outputHandler"),s(e,d.stdout,d.stderr,[...r])),this._plugins.exec("spawn.after",void 0,Bt(me({},st(t,r)),{spawned:d,close(h,f){o({stdOut:c,stdErr:u,exitCode:h,rejection:l||f})},kill(h){d.killed||(l=h,d.kill("SIGINT"))}}))})})}_beforeSpawn(t,e){let r;return this._plugins.exec("spawn.before",void 0,Bt(me({},st(t,e)),{kill(s){r=s||r}})),r}}}}),Ec={};G(Ec,{GitExecutor:()=>Rc});var Rc,Qm=g({"src/lib/runners/git-executor.ts"(){"use strict";Jm(),Rc=class{constructor(t,e,r){this.cwd=t,this._scheduler=e,this._plugins=r,this._chain=new zs(this,this._scheduler,this._plugins)}chain(){return new zs(this,this._scheduler,this._plugins)}push(t){return this._chain.push(t)}}}});function eg(t,e,r=it){let s=i=>{r(null,i)},n=i=>{(i==null?void 0:i.task)===t&&r(i instanceof zt?tg(i):i,void 0)};e.then(s,n)}function tg(t){let e=s=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${s} should be GitResponseError.git.${s}, this will no longer be available in version 3`),e=it};return Object.create(t,Object.getOwnPropertyNames(t.git).reduce(r,{}));function r(s,n){return n in t||(s[n]={enumerable:!1,configurable:!1,get(){return e(n),t.git[n]}}),s}}var rg=g({"src/lib/task-callback.ts"(){"use strict";Tt(),C()}});function no(t,e){return nc(r=>{if(!Qs(t))throw new Error(`Git.cwd: cannot change to non-directory "${t}"`);return(e||r).cwd=t})}var sg=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";C(),B()}});function Ls(t){let e=["checkout",...t];return e[1]==="-b"&&e.includes("-B")&&(e[1]=Dr(e,"-B")),Q(e)}function ng(){return{checkout(){return this._runTask(Ls(re(arguments,1)),q(arguments))},checkoutBranch(t,e){return this._runTask(Ls(["-b",t,e,...re(arguments)]),q(arguments))},checkoutLocalBranch(t){return this._runTask(Ls(["-b",t,...re(arguments)]),q(arguments))}}}var ig=g({"src/lib/tasks/checkout.ts"(){"use strict";C(),B()}});function ag(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function og(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(t){return ne(ag(),[Cc],t)}})}}}var Cc,cg=g({"src/lib/tasks/count-objects.ts"(){"use strict";C(),Cc=new S(/([a-z-]+): (\d+)$/,(t,[e,r])=>{let s=Bo(e);t.hasOwnProperty(s)&&(t[s]=P(r))})}});function ug(t){return ne({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Oc,t)}var Oc,lg=g({"src/lib/parsers/parse-commit.ts"(){"use strict";C(),Oc=[new S(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(t,[e,r,s])=>{t.branch=e,t.commit=s,t.root=!!r}),new S(/\s*Author:\s(.+)/i,(t,[e])=>{let r=e.split("<"),s=r.pop();!s||!s.includes("@")||(t.author={email:s.substr(0,s.length-1),name:r.join("<").trim()})}),new S(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(t,[e,r,s])=>{t.summary.changes=parseInt(e,10)||0,t.summary.insertions=parseInt(r,10)||0,t.summary.deletions=parseInt(s,10)||0}),new S(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(t,[e,r,s])=>{t.summary.changes=parseInt(e,10)||0;let n=parseInt(r,10)||0;s==="-"?t.summary.deletions=n:s==="+"&&(t.summary.insertions=n)})]}});function dg(t,e,r){return{commands:["-c","core.abbrev=40","commit",...Gt(t,"-m"),...e,...r],format:"utf-8",parser:ug}}function fg(){return{commit(e,...r){let s=q(arguments),n=t(e)||dg(we(e),we(xe(r[0],$r,[])),[...xe(r[1],Ht,[]),...re(arguments,0,!0)]);return this._runTask(n,s)}};function t(e){return!$r(e)&&se("git.commit: requires the commit message to be supplied as a string/string[]")}}var hg=g({"src/lib/tasks/commit.ts"(){"use strict";lg(),C(),B()}});function pg(){return{firstCommit(){return this._runTask(Q(["rev-list","--max-parents=0","HEAD"],!0),q(arguments))}}}var mg=g({"src/lib/tasks/first-commit.ts"(){"use strict";C(),B()}});function gg(t,e){let r=["hash-object",t];return e&&r.push("-w"),Q(r,!0)}var vg=g({"src/lib/tasks/hash-object.ts"(){"use strict";B()}});function yg(t,e,r){let s=String(r).trim(),n;if(n=Sc.exec(s))return new Sr(t,e,!1,n[1]);if(n=Ac.exec(s))return new Sr(t,e,!0,n[1]);let i="",a=s.split(" ");for(;a.length;)if(a.shift()==="in"){i=a.join(" ");break}return new Sr(t,e,/^re/i.test(s),i)}var Sr,Sc,Ac,_g=g({"src/lib/responses/InitSummary.ts"(){"use strict";Sr=class{constructor(t,e,r,s){this.bare=t,this.path=e,this.existing=r,this.gitDir=s}},Sc=/^Init.+ repository in (.+)$/,Ac=/^Rein.+ in (.+)$/}});function bg(t){return t.includes(fn)}function kg(t=!1,e,r){let s=["init",...r];return t&&!bg(s)&&s.splice(1,0,fn),{commands:s,format:"utf-8",parser(n){return yg(s.includes("--bare"),e,n)}}}var fn,wg=g({"src/lib/tasks/init.ts"(){"use strict";_g(),fn="--bare"}});function hn(t){for(let e=0;e<t.length;e++){let r=pn.exec(t[e]);if(r)return`--${r[1]}`}return""}function xg(t){return pn.test(t)}var pn,Yt=g({"src/lib/args/log-format.ts"(){"use strict";pn=/^--(stat|numstat|name-only|name-status)(=|$)/}}),Ic,Tg=g({"src/lib/responses/DiffSummary.ts"(){"use strict";Ic=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function $c(t=""){let e=Nc[t];return r=>ne(new Ic,e,r,!1)}var Ps,io,ao,oo,Nc,Lc=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";Yt(),Tg(),mc(),C(),Ps=[new S(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(t,[e,r,s=""])=>{t.files.push({file:e.trim(),changes:P(r),insertions:s.replace(/[^+]/g,"").length,deletions:s.replace(/[^-]/g,"").length,binary:!1})}),new S(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(t,[e,r,s])=>{t.files.push({file:e.trim(),before:P(r),after:P(s),binary:!0})}),new S(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(t,[e,r])=>{let s=/(\d+) i/.exec(r),n=/(\d+) d/.exec(r);t.changed=P(e),t.insertions=P(s==null?void 0:s[1]),t.deletions=P(n==null?void 0:n[1])})],io=[new S(/(\d+)\t(\d+)\t(.+)$/,(t,[e,r,s])=>{let n=P(e),i=P(r);t.changed++,t.insertions+=n,t.deletions+=i,t.files.push({file:s,changes:n+i,insertions:n,deletions:i,binary:!1})}),new S(/-\t-\t(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,after:0,before:0,binary:!0})})],ao=[new S(/(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,changes:0,insertions:0,deletions:0,binary:!1})})],oo=[new S(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(t,[e,r,s,n,i])=>{t.changed++,t.files.push({file:i??s,changes:0,insertions:0,deletions:0,binary:!1,status:Ms(Gm(e)&&e),from:Ms(!!i&&s!==i&&s),similarity:P(r)})})],Nc={"":Ps,"--stat":Ps,"--numstat":io,"--name-status":oo,"--name-only":ao}}});function Eg(t,e){return e.reduce((r,s,n)=>(r[s]=t[n]||"",r),Object.create({diff:null}))}function Pc(t=vn,e=jc,r=""){let s=$c(r);return function(n){let i=Wt(n.trim(),!1,mn).map(function(a){let o=a.split(gn),c=Eg(o[0].split(t),e);return o.length>1&&o[1].trim()&&(c.diff=s(o[1])),c});return{all:i,latest:i.length&&i[0]||null,total:i.length}}}var mn,gn,vn,jc,Fc=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";C(),Lc(),Yt(),mn="\xF2\xF2\xF2\xF2\xF2\xF2 ",gn=" \xF2\xF2",vn=" \xF2 ",jc=["hash","date","message","refs","author_name","author_email"]}}),Dc={};G(Dc,{diffSummaryTask:()=>Rg,validateLogFormatConfig:()=>Gr});function Rg(t){let e=hn(t),r=["diff"];return e===""&&(e="--stat",r.push("--stat=4096")),r.push(...t),Gr(r)||{commands:r,format:"utf-8",parser:$c(e)}}function Gr(t){let e=t.filter(xg);if(e.length>1)return se(`Summary flags are mutually exclusive - pick one of ${e.join(",")}`);if(e.length&&t.includes("-z"))return se(`Summary flag ${e} parsing is not compatible with null termination option '-z'`)}var yn=g({"src/lib/tasks/diff.ts"(){"use strict";Yt(),Lc(),B()}});function Cg(t,e){let r=[],s=[];return Object.keys(t).forEach(n=>{r.push(n),s.push(String(t[n]))}),[r,s.join(e)]}function Og(t){return Object.keys(t).reduce((e,r)=>(r in Ws||(e[r]=t[r]),e),{})}function Mc(t={},e=[]){let r=xe(t.splitter,X,vn),s=!en(t.format)&&t.format?t.format:{hash:"%H",date:t.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:t.multiLine?"%B":"%b",author_name:t.mailMap!==!1?"%aN":"%an",author_email:t.mailMap!==!1?"%aE":"%ae"},[n,i]=Cg(s,r),a=[],o=[`--pretty=format:${mn}${i}${gn}`,...e],c=t.n||t["max-count"]||t.maxCount;if(c&&o.push(`--max-count=${c}`),t.from||t.to){let u=t.symmetric!==!1?"...":"..";a.push(`${t.from||""}${u}${t.to||""}`)}return X(t.file)&&o.push("--follow",gm(t.file)),sn(Og(t),o),{fields:n,splitter:r,commands:[...o,...a]}}function Sg(t,e,r){let s=Pc(t,e,hn(r));return{commands:["log",...r],format:"utf-8",parser:s}}function Ag(){return{log(...r){let s=q(arguments),n=Mc(nn(arguments),xe(arguments[0],Ht)),i=e(...r)||Gr(n.commands)||t(n);return this._runTask(i,s)}};function t(r){return Sg(r.splitter,r.fields,r.commands)}function e(r,s){return X(r)&&X(s)&&se("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var Ws,qc=g({"src/lib/tasks/log.ts"(){"use strict";Yt(),Zt(),Fc(),C(),B(),yn(),Ws=(t=>(t[t["--pretty"]=0]="--pretty",t[t["max-count"]=1]="max-count",t[t.maxCount=2]="maxCount",t[t.n=3]="n",t[t.file=4]="file",t[t.format=5]="format",t[t.from=6]="from",t[t.to=7]="to",t[t.splitter=8]="splitter",t[t.symmetric=9]="symmetric",t[t.mailMap=10]="mailMap",t[t.multiLine=11]="multiLine",t[t.strictDate=12]="strictDate",t))(Ws||{})}}),Ar,Bc,Ig=g({"src/lib/responses/MergeSummary.ts"(){"use strict";Ar=class{constructor(t,e=null,r){this.reason=t,this.file=e,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Bc=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"}}}}),Xs,Gc,$g=g({"src/lib/responses/PullSummary.ts"(){"use strict";Xs=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Gc=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function js(t){return t.objects=t.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}function co(t){let e=/^\s*(\d+)/.exec(t),r=/delta (\d+)/i.exec(t);return{count:P(e&&e[1]||"0"),delta:P(r&&r[1]||"0")}}var Uc,Ng=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";C(),Uc=[new Pe(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(t,[e,r])=>{let s=e.toLowerCase(),n=js(t.remoteMessages);Object.assign(n,{[s]:P(r)})}),new Pe(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(t,[e,r])=>{let s=e.toLowerCase(),n=js(t.remoteMessages);Object.assign(n,{[s]:P(r)})}),new Pe(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(t,[e,r,s])=>{let n=js(t.remoteMessages);n.total=co(e),n.reused=co(r),n.packReused=P(s)})]}});function Vc(t,e){return ne({remoteMessages:new zc},Zc,e)}var Zc,zc,Wc=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";C(),Ng(),Zc=[new Pe(/^remote:\s*(.+)$/,(t,[e])=>(t.remoteMessages.all.push(e.trim()),!1)),...Uc,new Pe([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(t,[e])=>{t.remoteMessages.pullRequestUrl=e}),new Pe([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(t,[e,r,s])=>{t.remoteMessages.vulnerabilities={count:P(e),summary:r,url:s}})],zc=class{constructor(){this.all=[]}}}});function Lg(t,e){let r=ne(new Gc,Xc,[t,e]);return r.message&&r}var uo,lo,fo,ho,Xc,po,_n,Hc=g({"src/lib/parsers/parse-pull.ts"(){"use strict";$g(),C(),Wc(),uo=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,lo=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,fo=/^(create|delete) mode \d+ (.+)/,ho=[new S(uo,(t,[e,r,s])=>{t.files.push(e),r&&(t.insertions[e]=r.length),s&&(t.deletions[e]=s.length)}),new S(lo,(t,[e,,r,,s])=>r!==void 0||s!==void 0?(t.summary.changes=+e||0,t.summary.insertions=+r||0,t.summary.deletions=+s||0,!0):!1),new S(fo,(t,[e,r])=>{N(t.files,r),N(e==="create"?t.created:t.deleted,r)})],Xc=[new S(/^from\s(.+)$/i,(t,[e])=>void(t.remote=e)),new S(/^fatal:\s(.+)$/,(t,[e])=>void(t.message=e)),new S(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(t,[e,r,s,n])=>{t.branch.local=s,t.hash.local=e,t.branch.remote=n,t.hash.remote=r})],po=(t,e)=>ne(new Xs,ho,[t,e]),_n=(t,e)=>Object.assign(new Xs,po(t,e),Vc(t,e))}}),mo,Yc,go,Pg=g({"src/lib/parsers/parse-merge.ts"(){"use strict";Ig(),C(),Hc(),mo=[new S(/^Auto-merging\s+(.+)$/,(t,[e])=>{t.merges.push(e)}),new S(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(t,[e,r])=>{t.conflicts.push(new Ar(e,r))}),new S(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(t,[e,r,s])=>{t.conflicts.push(new Ar(e,r,{deleteRef:s}))}),new S(/^CONFLICT\s+\((.+)\):/,(t,[e])=>{t.conflicts.push(new Ar(e,null))}),new S(/^Automatic merge failed;\s+(.+)$/,(t,[e])=>{t.result=e})],Yc=(t,e)=>Object.assign(go(t,e),_n(t,e)),go=t=>ne(new Bc,mo,t)}});function vo(t){return t.length?{commands:["merge",...t],format:"utf-8",parser(e,r){let s=Yc(e,r);if(s.failed)throw new zt(s);return s}}:se("Git.merge requires at least one option")}var jg=g({"src/lib/tasks/merge.ts"(){"use strict";Tt(),Pg(),B()}});function Fg(t,e,r){let s=r.includes("deleted"),n=r.includes("tag")||/^refs\/tags/.test(t),i=!r.includes("new");return{deleted:s,tag:n,branch:!n,new:!i,alreadyUpdated:i,local:t,remote:e}}var yo,Kc,_o,Dg=g({"src/lib/parsers/parse-push.ts"(){"use strict";C(),Wc(),yo=[new S(/^Pushing to (.+)$/,(t,[e])=>{t.repo=e}),new S(/^updating local tracking ref '(.+)'/,(t,[e])=>{t.ref=Bt(me({},t.ref||{}),{local:e})}),new S(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(t,[e,r,s])=>{t.pushed.push(Fg(e,r,s))}),new S(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(t,[e,r,s])=>{t.branch=Bt(me({},t.branch||{}),{local:e,remote:r,remoteName:s})}),new S(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(t,[e,r,s,n])=>{t.update={head:{local:e,remote:r},hash:{from:s,to:n}}})],Kc=(t,e)=>{let r=_o(t,e),s=Vc(t,e);return me(me({},r),s)},_o=(t,e)=>ne({pushed:[]},yo,[t,e])}}),Jc={};G(Jc,{pushTagsTask:()=>Mg,pushTask:()=>bn});function Mg(t={},e){return N(e,"--tags"),bn(t,e)}function bn(t={},e){let r=["push",...e];return t.branch&&r.splice(1,0,t.branch),t.remote&&r.splice(1,0,t.remote),Dr(r,"-v"),N(r,"--verbose"),N(r,"--porcelain"),{commands:r,format:"utf-8",parser:Kc}}var Qc=g({"src/lib/tasks/push.ts"(){"use strict";Dg(),C()}});function qg(){return{showBuffer(){let t=["show",...re(arguments,1)];return t.includes("--binary")||t.splice(1,0,"--binary"),this._runTask(ic(t),q(arguments))},show(){let t=["show",...re(arguments,1)];return this._runTask(Q(t),q(arguments))}}}var Bg=g({"src/lib/tasks/show.ts"(){"use strict";C(),B()}}),bo,eu,Gg=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";bo=/^(.+)\0(.+)$/,eu=class{constructor(t,e,r){if(this.path=t,this.index=e,this.working_dir=r,e==="R"||r==="R"){let s=bo.exec(t)||[null,t,t];this.from=s[2]||"",this.path=s[1]||""}}}}});function ko(t){let[e,r]=t.split(xt);return{from:r||e,to:e}}function ue(t,e,r){return[`${t}${e}`,r]}function Fs(t,...e){return e.map(r=>ue(t,r,(s,n)=>N(s.conflicted,n)))}function Ug(t,e){let r=e.trim();switch(" "){case r.charAt(2):return s(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return s(" ",r.charAt(0),r.substr(2));default:return}function s(n,i,a){let o=`${n}${i}`,c=tu.get(o);c&&c(t,a),o!=="##"&&o!=="!!"&&t.files.push(new eu(a,n,i))}}var wo,tu,ru,Vg=g({"src/lib/responses/StatusSummary.ts"(){"use strict";C(),Gg(),wo=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}},tu=new Map([ue(" ","A",(t,e)=>N(t.created,e)),ue(" ","D",(t,e)=>N(t.deleted,e)),ue(" ","M",(t,e)=>N(t.modified,e)),ue("A"," ",(t,e)=>N(t.created,e)&&N(t.staged,e)),ue("A","M",(t,e)=>N(t.created,e)&&N(t.staged,e)&&N(t.modified,e)),ue("D"," ",(t,e)=>N(t.deleted,e)&&N(t.staged,e)),ue("M"," ",(t,e)=>N(t.modified,e)&&N(t.staged,e)),ue("M","M",(t,e)=>N(t.modified,e)&&N(t.staged,e)),ue("R"," ",(t,e)=>{N(t.renamed,ko(e))}),ue("R","M",(t,e)=>{let r=ko(e);N(t.renamed,r),N(t.modified,r.to)}),ue("!","!",(t,e)=>{N(t.ignored=t.ignored||[],e)}),ue("?","?",(t,e)=>N(t.not_added,e)),...Fs("A","A","U"),...Fs("D","D","U"),...Fs("U","A","D","U"),["##",(t,e)=>{let r=/ahead (\d+)/,s=/behind (\d+)/,n=/^(.+?(?=(?:\.{3}|\s|$)))/,i=/\.{3}(\S*)/,a=/\son\s([\S]+)$/,o;o=r.exec(e),t.ahead=o&&+o[1]||0,o=s.exec(e),t.behind=o&&+o[1]||0,o=n.exec(e),t.current=o&&o[1],o=i.exec(e),t.tracking=o&&o[1],o=a.exec(e),t.current=o&&o[1]||t.current,t.detached=/\(no branch\)/.test(e)}]]),ru=function(t){let e=t.split(xt),r=new wo;for(let s=0,n=e.length;s<n;){let i=e[s++].trim();i&&(i.charAt(0)==="R"&&(i+=xt+(e[s++]||"")),Ug(r,i))}return r}}});function Zg(t){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...t.filter(r=>!su.includes(r))],parser(r){return ru(r)}}}var su,zg=g({"src/lib/tasks/status.ts"(){"use strict";Vg(),su=["--null","-z"]}});function Lr(t=0,e=0,r=0,s="",n=!0){return Object.defineProperty({major:t,minor:e,patch:r,agent:s,installed:n},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}function Wg(){return Lr(0,0,0,"",!1)}function Xg(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:Hg,onError(t,e,r,s){if(t.exitCode===-2)return r(Buffer.from(kn));s(e)}})}}}function Hg(t){return t===kn?Wg():ne(Lr(0,0,0,t),nu,t)}var kn,nu,Yg=g({"src/lib/tasks/version.ts"(){"use strict";C(),kn="installed=false",nu=[new S(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(t,[e,r,s,n=""])=>{Object.assign(t,Lr(P(e),P(r),P(s),n))}),new S(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(t,[e,r,s,n=""])=>{Object.assign(t,Lr(P(e),P(r),s,n))})]}}),iu={};G(iu,{SimpleGitApi:()=>Hs});var Hs,Kg=g({"src/lib/simple-git-api.ts"(){"use strict";rg(),sg(),ig(),cg(),hg(),hc(),mg(),yc(),vg(),wg(),qc(),jg(),Qc(),Bg(),zg(),B(),Yg(),C(),Hs=class{constructor(t){this._executor=t}_runTask(t,e){let r=this._executor.chain(),s=r.push(t);return e&&eg(t,s,e),Object.create(this,{then:{value:s.then.bind(s)},catch:{value:s.catch.bind(s)},_executor:{value:r}})}add(t){return this._runTask(Q(["add",...we(t)]),q(arguments))}cwd(t){let e=q(arguments);return typeof t=="string"?this._runTask(no(t,this._executor),e):typeof(t==null?void 0:t.path)=="string"?this._runTask(no(t.path,t.root&&this._executor||void 0),e):this._runTask(se("Git.cwd: workingDirectory must be supplied as a string"),e)}hashObject(t,e){return this._runTask(gg(t,e===!0),q(arguments))}init(t){return this._runTask(kg(t===!0,this._executor.cwd,re(arguments)),q(arguments))}merge(){return this._runTask(vo(re(arguments)),q(arguments))}mergeFromTo(t,e){return X(t)&&X(e)?this._runTask(vo([t,e,...re(arguments)]),q(arguments,!1)):this._runTask(se("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(t){return this._executor.outputHandler=t,this}push(){let t=bn({remote:xe(arguments[0],X),branch:xe(arguments[1],X)},re(arguments));return this._runTask(t,q(arguments))}stash(){return this._runTask(Q(["stash",...re(arguments)]),q(arguments))}status(){return this._runTask(Zg(re(arguments)),q(arguments))}},Object.assign(Hs.prototype,ng(),fg(),Bm(),og(),pg(),Zm(),Ag(),qg(),Xg())}}),au={};G(au,{Scheduler:()=>cu});var xo,cu,Jg=g({"src/lib/runners/scheduler.ts"(){"use strict";C(),xc(),xo=(()=>{let t=0;return()=>{t++;let{promise:e,done:r}=(0,ou.createDeferred)();return{promise:e,done:r,id:t}}})(),cu=class{constructor(t=2){this.concurrency=t,this.logger=dn("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",t)}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 t=N(this.running,this.pending.shift());this.logger("Attempting id=%s",t.id),t.done(()=>{this.logger("Completing id=",t.id),Dr(this.running,t),this.schedule()})}next(){let{promise:t,id:e}=N(this.pending,xo());return this.logger("Scheduling id=%s",e),this.schedule(),t}}}}),uu={};G(uu,{applyPatchTask:()=>Qg});function Qg(t,e){return Q(["apply",...e,...t])}var ev=g({"src/lib/tasks/apply-patch.ts"(){"use strict";B()}});function tv(t,e){return{branch:t,hash:e,success:!0}}function rv(t){return{branch:t,hash:null,success:!1}}var lu,sv=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";lu=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function du(t,e){return e===1&&Ys.test(t)}var To,Ys,Eo,Ur,nv=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";sv(),C(),To=/(\S+)\s+\(\S+\s([^)]+)\)/,Ys=/^error[^']+'([^']+)'/m,Eo=[new S(To,(t,[e,r])=>{let s=tv(e,r);t.all.push(s),t.branches[e]=s}),new S(Ys,(t,[e])=>{let r=rv(e);t.errors.push(r),t.all.push(r),t.branches[e]=r})],Ur=(t,e)=>ne(new lu,Eo,[t,e])}}),fu,iv=g({"src/lib/responses/BranchSummary.ts"(){"use strict";fu=class{constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(t,e,r,s,n){t==="*"&&(this.detached=e,this.current=r),this.all.push(r),this.branches[r]={current:t==="*",linkedWorkTree:t==="+",name:r,commit:s,label:n}}}}});function Ro(t){return t?t.charAt(0):""}function hu(t){return ne(new fu,pu,t)}var pu,av=g({"src/lib/parsers/parse-branch.ts"(){"use strict";iv(),C(),pu=[new S(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(t,[e,r,s,n])=>{t.push(Ro(e),!0,r,s,n)}),new S(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(t,[e,r,s,n])=>{t.push(Ro(e),!1,r,s,n)})]}}),mu={};G(mu,{branchLocalTask:()=>cv,branchTask:()=>ov,containsDeleteBranchCommand:()=>gu,deleteBranchTask:()=>lv,deleteBranchesTask:()=>uv});function gu(t){let e=["-d","-D","--delete"];return t.some(r=>e.includes(r))}function ov(t){let e=gu(t),r=["branch",...t];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(s,n){return e?Ur(s,n).all[0]:hu(s)}}}function cv(){return{format:"utf-8",commands:["branch","-v"],parser:hu}}function uv(t,e=!1){return{format:"utf-8",commands:["branch","-v",e?"-D":"-d",...t],parser(r,s){return Ur(r,s)},onError({exitCode:r,stdOut:s},n,i,a){if(!du(String(n),r))return a(n);i(s)}}}function lv(t,e=!1){let r={format:"utf-8",commands:["branch","-v",e?"-D":"-d",t],parser(s,n){return Ur(s,n).branches[t]},onError({exitCode:s,stdErr:n,stdOut:i},a,o,c){if(!du(String(a),s))return c(a);throw new zt(r.parser(Ut(i),Ut(n)),String(a))}};return r}var dv=g({"src/lib/tasks/branch.ts"(){"use strict";Tt(),nv(),av(),C()}}),vu,fv=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";vu=t=>t.split(/\n/g).map(e=>e.trim()).filter(e=>!!e)}}),yu={};G(yu,{checkIgnoreTask:()=>hv});function hv(t){return{commands:["check-ignore",...t],format:"utf-8",parser:vu}}var pv=g({"src/lib/tasks/check-ignore.ts"(){"use strict";fv()}}),_u={};G(_u,{cloneMirrorTask:()=>gv,cloneTask:()=>bu});function mv(t){return/^--upload-pack(=|$)/.test(t)}function bu(t,e,r){let s=["clone",...r];return X(t)&&s.push(t),X(e)&&s.push(e),s.find(mv)?se("git.fetch: potential exploit argument blocked."):Q(s)}function gv(t,e,r){return N(r,"--mirror"),bu(t,e,r)}var vv=g({"src/lib/tasks/clone.ts"(){"use strict";B(),C()}});function yv(t,e){return ne({raw:t,remote:null,branches:[],tags:[],updated:[],deleted:[]},ku,[t,e])}var ku,_v=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";C(),ku=[new S(/From (.+)$/,(t,[e])=>{t.remote=e}),new S(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.branches.push({name:e,tracking:r})}),new S(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.tags.push({name:e,tracking:r})}),new S(/- \[deleted]\s+\S+\s*-> (.+)$/,(t,[e])=>{t.deleted.push({tracking:e})}),new S(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(t,[e,r,s,n])=>{t.updated.push({name:s,tracking:n,to:r,from:e})})]}}),wu={};G(wu,{fetchTask:()=>kv});function bv(t){return/^--upload-pack(=|$)/.test(t)}function kv(t,e,r){let s=["fetch",...r];return t&&e&&s.push(t,e),s.find(bv)?se("git.fetch: potential exploit argument blocked."):{commands:s,format:"utf-8",parser:yv}}var wv=g({"src/lib/tasks/fetch.ts"(){"use strict";_v(),B()}});function xv(t){return ne({moves:[]},xu,t)}var xu,Tv=g({"src/lib/parsers/parse-move.ts"(){"use strict";C(),xu=[new S(/^Renaming (.+) to (.+)$/,(t,[e,r])=>{t.moves.push({from:e,to:r})})]}}),Tu={};G(Tu,{moveTask:()=>Ev});function Ev(t,e){return{commands:["mv","-v",...we(t),e],format:"utf-8",parser:xv}}var Rv=g({"src/lib/tasks/move.ts"(){"use strict";Tv(),C()}}),Eu={};G(Eu,{pullTask:()=>Cv});function Cv(t,e,r){let s=["pull",...r];return t&&e&&s.splice(1,0,t,e),{commands:s,format:"utf-8",parser(n,i){return _n(n,i)},onError(n,i,a,o){let c=Lg(Ut(n.stdOut),Ut(n.stdErr));if(c)return o(new zt(c));o(i)}}}var Ov=g({"src/lib/tasks/pull.ts"(){"use strict";Tt(),Hc(),C()}});function Sv(t){let e={};return Ru(t,([r])=>e[r]={name:r}),Object.values(e)}function Av(t){let e={};return Ru(t,([r,s,n])=>{e.hasOwnProperty(r)||(e[r]={name:r,refs:{fetch:"",push:""}}),n&&s&&(e[r].refs[n.replace(/[^a-z]/g,"")]=s)}),Object.values(e)}function Ru(t,e){Js(t,r=>e(r.split(/\s+/)))}var Iv=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";C()}}),Cu={};G(Cu,{addRemoteTask:()=>$v,getRemotesTask:()=>Nv,listRemotesTask:()=>Lv,remoteTask:()=>Pv,removeRemoteTask:()=>jv});function $v(t,e,r){return Q(["remote","add",...r,t,e])}function Nv(t){let e=["remote"];return t&&e.push("-v"),{commands:e,format:"utf-8",parser:t?Av:Sv}}function Lv(t){let e=[...t];return e[0]!=="ls-remote"&&e.unshift("ls-remote"),Q(e)}function Pv(t){let e=[...t];return e[0]!=="remote"&&e.unshift("remote"),Q(e)}function jv(t){return Q(["remote","remove",t])}var Fv=g({"src/lib/tasks/remote.ts"(){"use strict";Iv(),B()}}),Ou={};G(Ou,{stashListTask:()=>Dv});function Dv(t={},e){let r=Mc(t),s=["stash","list",...r.commands,...e],n=Pc(r.splitter,r.fields,hn(s));return Gr(s)||{commands:s,format:"utf-8",parser:n}}var Mv=g({"src/lib/tasks/stash-list.ts"(){"use strict";Yt(),Fc(),yn(),qc()}}),Su={};G(Su,{addSubModuleTask:()=>qv,initSubModuleTask:()=>Bv,subModuleTask:()=>Vr,updateSubModuleTask:()=>Gv});function qv(t,e){return Vr(["add",t,e])}function Bv(t){return Vr(["init",...t])}function Vr(t){let e=[...t];return e[0]!=="submodule"&&e.unshift("submodule"),Q(e)}function Gv(t){return Vr(["update",...t])}var Uv=g({"src/lib/tasks/sub-module.ts"(){"use strict";B()}});function Vv(t,e){let r=isNaN(t),s=isNaN(e);return r!==s?r?1:-1:r?Au(t,e):0}function Au(t,e){return t===e?0:t>e?1:-1}function Zv(t){return t.trim()}function Rr(t){return typeof t=="string"&&parseInt(t.replace(/^\D+/g,""),10)||0}var Co,Iu,zv=g({"src/lib/responses/TagList.ts"(){"use strict";Co=class{constructor(t,e){this.all=t,this.latest=e}},Iu=function(t,e=!1){let r=t.split(`
17
- `).map(Zv).filter(Boolean);e||r.sort(function(n,i){let a=n.split("."),o=i.split(".");if(a.length===1||o.length===1)return Vv(Rr(a[0]),Rr(o[0]));for(let c=0,u=Math.max(a.length,o.length);c<u;c++){let l=Au(Rr(a[c]),Rr(o[c]));if(l)return l}return 0});let s=e?r[0]:[...r].reverse().find(n=>n.indexOf(".")>=0);return new Co(r,s)}}}),$u={};G($u,{addAnnotatedTagTask:()=>Hv,addTagTask:()=>Xv,tagListTask:()=>Wv});function Wv(t=[]){let e=t.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...t],parser(r){return Iu(r,e)}}}function Xv(t){return{format:"utf-8",commands:["tag",t],parser(){return{name:t}}}}function Hv(t,e){return{format:"utf-8",commands:["tag","-a","-m",e,t],parser(){return{name:t}}}}var Yv=g({"src/lib/tasks/tag.ts"(){"use strict";zv()}}),Kv=pm({"src/git.js"(t,e){"use strict";var{GitExecutor:r}=(Qm(),M(Ec)),{SimpleGitApi:s}=(Kg(),M(iu)),{Scheduler:n}=(Jg(),M(au)),{configurationErrorTask:i}=(B(),M(Us)),{asArray:a,filterArray:o,filterPrimitives:c,filterString:u,filterStringOrStringArray:l,filterType:d,getTrailingOptions:h,trailingFunctionArgument:f,trailingOptionsArgument:F}=(C(),M(Ho)),{applyPatchTask:D}=(ev(),M(uu)),{branchTask:U,branchLocalTask:Te,deleteBranchesTask:at,deleteBranchTask:Yr}=(dv(),M(mu)),{checkIgnoreTask:ot}=(pv(),M(yu)),{checkIsRepoTask:En}=(Qo(),M(Yo)),{cloneTask:Et,cloneMirrorTask:Kr}=(vv(),M(_u)),{cleanWithOptionsTask:Jt,isCleanOptionsArray:Jr}=(lc(),M(cc)),{diffSummaryTask:Wu}=(yn(),M(Dc)),{fetchTask:Xu}=(wv(),M(wu)),{moveTask:Hu}=(Rv(),M(Tu)),{pullTask:Yu}=(Ov(),M(Eu)),{pushTagsTask:Ku}=(Qc(),M(Jc)),{addRemoteTask:Ju,getRemotesTask:Qu,listRemotesTask:el,remoteTask:tl,removeRemoteTask:rl}=(Fv(),M(Cu)),{getResetMode:sl,resetTask:nl}=(wc(),M(_c)),{stashListTask:il}=(Mv(),M(Ou)),{addSubModuleTask:al,initSubModuleTask:ol,subModuleTask:cl,updateSubModuleTask:ul}=(Uv(),M(Su)),{addAnnotatedTagTask:ll,addTagTask:dl,tagListTask:fl}=(Yv(),M($u)),{straightThroughBufferTask:hl,straightThroughStringTask:ye}=(B(),M(Us));function T(m,w){this._plugins=w,this._executor=new r(m.baseDir,new n(m.maxConcurrentProcesses),w),this._trimmed=m.trimmed}(T.prototype=Object.create(s.prototype)).constructor=T,T.prototype.customBinary=function(m){return this._plugins.reconfigure("binary",m),this},T.prototype.env=function(m,w){return arguments.length===1&&typeof m=="object"?this._executor.env=m:(this._executor.env=this._executor.env||{})[m]=w,this},T.prototype.stashList=function(m){return this._runTask(il(F(arguments)||{},o(m)&&m||[]),f(arguments))};function Rn(m,w,L,H){return typeof L!="string"?i(`git.${m}() requires a string 'repoPath'`):w(L,d(H,u),h(arguments))}T.prototype.clone=function(){return this._runTask(Rn("clone",Et,...arguments),f(arguments))},T.prototype.mirror=function(){return this._runTask(Rn("mirror",Kr,...arguments),f(arguments))},T.prototype.mv=function(m,w){return this._runTask(Hu(m,w),f(arguments))},T.prototype.checkoutLatestTag=function(m){var w=this;return this.pull(function(){w.tags(function(L,H){w.checkout(H.latest,m)})})},T.prototype.pull=function(m,w,L,H){return this._runTask(Yu(d(m,u),d(w,u),h(arguments)),f(arguments))},T.prototype.fetch=function(m,w){return this._runTask(Xu(d(m,u),d(w,u),h(arguments)),f(arguments))},T.prototype.silent=function(m){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},T.prototype.tags=function(m,w){return this._runTask(fl(h(arguments)),f(arguments))},T.prototype.rebase=function(){return this._runTask(ye(["rebase",...h(arguments)]),f(arguments))},T.prototype.reset=function(m){return this._runTask(nl(sl(m),h(arguments)),f(arguments))},T.prototype.revert=function(m){let w=f(arguments);return typeof m!="string"?this._runTask(i("Commit must be a string"),w):this._runTask(ye(["revert",...h(arguments,0,!0),m]),w)},T.prototype.addTag=function(m){let w=typeof m=="string"?dl(m):i("Git.addTag requires a tag name");return this._runTask(w,f(arguments))},T.prototype.addAnnotatedTag=function(m,w){return this._runTask(ll(m,w),f(arguments))},T.prototype.deleteLocalBranch=function(m,w,L){return this._runTask(Yr(m,typeof w=="boolean"?w:!1),f(arguments))},T.prototype.deleteLocalBranches=function(m,w,L){return this._runTask(at(m,typeof w=="boolean"?w:!1),f(arguments))},T.prototype.branch=function(m,w){return this._runTask(U(h(arguments)),f(arguments))},T.prototype.branchLocal=function(m){return this._runTask(Te(),f(arguments))},T.prototype.raw=function(m){let w=!Array.isArray(m),L=[].slice.call(w?arguments:m,0);for(let ge=0;ge<L.length&&w;ge++)if(!c(L[ge])){L.splice(ge,L.length-ge);break}L.push(...h(arguments,0,!0));var H=f(arguments);return L.length?this._runTask(ye(L,this._trimmed),H):this._runTask(i("Raw: must supply one or more command to execute"),H)},T.prototype.submoduleAdd=function(m,w,L){return this._runTask(al(m,w),f(arguments))},T.prototype.submoduleUpdate=function(m,w){return this._runTask(ul(h(arguments,!0)),f(arguments))},T.prototype.submoduleInit=function(m,w){return this._runTask(ol(h(arguments,!0)),f(arguments))},T.prototype.subModule=function(m,w){return this._runTask(cl(h(arguments)),f(arguments))},T.prototype.listRemote=function(){return this._runTask(el(h(arguments)),f(arguments))},T.prototype.addRemote=function(m,w,L){return this._runTask(Ju(m,w,h(arguments)),f(arguments))},T.prototype.removeRemote=function(m,w){return this._runTask(rl(m),f(arguments))},T.prototype.getRemotes=function(m,w){return this._runTask(Qu(m===!0),f(arguments))},T.prototype.remote=function(m,w){return this._runTask(tl(h(arguments)),f(arguments))},T.prototype.tag=function(m,w){let L=h(arguments);return L[0]!=="tag"&&L.unshift("tag"),this._runTask(ye(L),f(arguments))},T.prototype.updateServerInfo=function(m){return this._runTask(ye(["update-server-info"]),f(arguments))},T.prototype.pushTags=function(m,w){let L=Ku({remote:d(m,u)},h(arguments));return this._runTask(L,f(arguments))},T.prototype.rm=function(m){return this._runTask(ye(["rm","-f",...a(m)]),f(arguments))},T.prototype.rmKeepLocal=function(m){return this._runTask(ye(["rm","--cached",...a(m)]),f(arguments))},T.prototype.catFile=function(m,w){return this._catFile("utf-8",arguments)},T.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},T.prototype._catFile=function(m,w){var L=f(w),H=["cat-file"],ge=w[0];if(typeof ge=="string")return this._runTask(i("Git.catFile: options must be supplied as an array of strings"),L);Array.isArray(ge)&&H.push.apply(H,ge);let Qr=m==="buffer"?hl(H):ye(H);return this._runTask(Qr,L)},T.prototype.diff=function(m,w){let L=u(m)?i("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):ye(["diff",...h(arguments)]);return this._runTask(L,f(arguments))},T.prototype.diffSummary=function(){return this._runTask(Wu(h(arguments,1)),f(arguments))},T.prototype.applyPatch=function(m){let w=l(m)?D(a(m),h([].slice.call(arguments,1))):i("git.applyPatch requires one or more string patches as the first argument");return this._runTask(w,f(arguments))},T.prototype.revparse=function(){let m=["rev-parse",...h(arguments,!0)];return this._runTask(ye(m,!0),f(arguments))},T.prototype.clean=function(m,w,L){let H=Jr(m),ge=H&&m.join("")||d(m,u)||"",Qr=h([].slice.call(arguments,H?1:0));return this._runTask(Jt(ge,Qr),f(arguments))},T.prototype.exec=function(m){let w={commands:[],format:"utf-8",parser(){typeof m=="function"&&m()}};return this._runTask(w)},T.prototype.clearQueue=function(){return this},T.prototype.checkIgnore=function(m,w){return this._runTask(ot(a(d(m,l,[]))),f(arguments))},T.prototype.checkIsRepo=function(m,w){return this._runTask(En(d(m,u)),f(arguments))},e.exports=T}});Zt();je();var Jv=class extends Ie{constructor(t,e){super(void 0,e),this.config=t}};je();je();var Ae=class extends Ie{constructor(t,e,r){super(t,r),this.task=t,this.plugin=e,Object.setPrototypeOf(this,new.target.prototype)}};Tt();Lo();Qo();lc();hc();mc();yc();wc();function Qv(t){return t?[{type:"spawn.before",action(s,n){t.aborted&&n.kill(new Ae(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(s,n){function i(){n.kill(new Ae(void 0,"abort","Abort signal received"))}t.addEventListener("abort",i),n.spawned.on("close",()=>t.removeEventListener("abort",i))}}]:void 0}function ey(t){return typeof t=="string"&&t.trim().toLowerCase()==="-c"}function ty(t,e){if(ey(t)&&/^\s*protocol(.[a-z]+)?.allow/.test(e))throw new Ae(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function ry(t,e){if(/^\s*--(upload|receive)-pack/.test(t))throw new Ae(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(e==="clone"&&/^\s*-u\b/.test(t))throw new Ae(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(e==="push"&&/^\s*--exec\b/.test(t))throw new Ae(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}function sy({allowUnsafeProtocolOverride:t=!1,allowUnsafePack:e=!1}={}){return{type:"spawn.args",action(r,s){return r.forEach((n,i)=>{let a=i<r.length?r[i+1]:"";t||ty(n,a),e||ry(n,s.method)}),r}}}C();function ny(t){let e=Gt(t,"-c");return{type:"spawn.args",action(r){return[...e,...r]}}}C();var Oo=(0,wt.deferred)().promise;function iy({onClose:t=!0,onExit:e=50}={}){function r(){let n=-1,i={close:(0,wt.deferred)(),closeTimeout:(0,wt.deferred)(),exit:(0,wt.deferred)(),exitTimeout:(0,wt.deferred)()},a=Promise.race([t===!1?Oo:i.closeTimeout.promise,e===!1?Oo:i.exitTimeout.promise]);return s(t,i.close,i.closeTimeout),s(e,i.exit,i.exitTimeout),{close(o){n=o,i.close.done()},exit(o){n=o,i.exit.done()},get exitCode(){return n},result:a}}function s(n,i,a){n!==!1&&(n===!0?i.promise:i.promise.then(()=>Ds(n))).then(a.done)}return{type:"spawn.after",action(n,i){return qt(this,arguments,function*(a,{spawned:o,close:c}){var u,l;let d=r(),h=!0,f=()=>void(h=!1);(u=o.stdout)==null||u.on("data",f),(l=o.stderr)==null||l.on("data",f),o.on("error",f),o.on("close",F=>d.close(F)),o.on("exit",F=>d.exit(F));try{yield d.result,h&&(yield Ds(50)),c(d.exitCode)}catch(F){c(d.exitCode,F)}})}}}C();var ay="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",So="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function oy(t){return!t||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(t)}function Ao(t,e){if(t.length<1||t.length>2)throw new Ae(void 0,"binary",ay);if(t.some(oy))if(e)console.warn(So);else throw new Ae(void 0,"binary",So);let[s,n]=t;return{binary:s,prefix:n}}function cy(t,e=["git"],r=!1){let s=Ao(we(e),r);t.on("binary",n=>{s=Ao(we(n),r)}),t.append("spawn.binary",()=>s.binary),t.append("spawn.args",n=>s.prefix?[s.prefix,...n]:n)}je();function uy(t){return!!(t.exitCode&&t.stdErr.length)}function ly(t){return Buffer.concat([...t.stdOut,...t.stdErr])}function dy(t=!1,e=uy,r=ly){return(s,n)=>!t&&s||!e(n)?s:r(n)}function Io(t){return{type:"task.error",action(e,r){let s=t(e.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(s)?{error:new Ie(void 0,s.toString("utf-8"))}:{error:s}}}}C();var fy=class{constructor(){this.plugins=new Set,this.events=new Nu.EventEmitter}on(t,e){this.events.on(t,e)}reconfigure(t,e){this.events.emit(t,e)}append(t,e){let r=N(this.plugins,{type:t,action:e});return()=>this.plugins.delete(r)}add(t){let e=[];return we(t).forEach(r=>r&&this.plugins.add(N(e,r))),()=>{e.forEach(r=>this.plugins.delete(r))}}exec(t,e,r){let s=e,n=Object.freeze(Object.create(r));for(let i of this.plugins)i.type===t&&(s=i.action(s,n));return s}};C();function hy(t){let e="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(i,a){return r.includes(a.method)?qo(i,e):i}},{type:"spawn.after",action(i,a){var o;a.commands.includes(e)&&((o=a.spawned.stderr)==null||o.on("data",c=>{let u=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(c.toString("utf8"));u&&t({method:a.method,stage:py(u[1]),progress:P(u[2]),processed:P(u[3]),total:P(u[4])})}))}}]}function py(t){return String(t.toLowerCase().split(" ",1))||"unknown"}C();function my(t){let e=Uo(t,["uid","gid"]);return{type:"spawn.options",action(r){return me(me({},e),r)}}}function gy({block:t,stdErr:e=!0,stdOut:r=!0}){if(t>0)return{type:"spawn.after",action(s,n){var i,a;let o;function c(){o&&clearTimeout(o),o=setTimeout(l,t)}function u(){var d,h;(d=n.spawned.stdout)==null||d.off("data",c),(h=n.spawned.stderr)==null||h.off("data",c),n.spawned.off("exit",u),n.spawned.off("close",u),o&&clearTimeout(o)}function l(){u(),n.kill(new Ae(void 0,"timeout","block timeout reached"))}r&&((i=n.spawned.stdout)==null||i.on("data",c)),e&&((a=n.spawned.stderr)==null||a.on("data",c)),n.spawned.on("exit",u),n.spawned.on("close",u),c()}}}Zt();function vy(){return{type:"spawn.args",action(t){let e=[],r;function s(n){(r=r||[]).push(...n)}for(let n=0;n<t.length;n++){let i=t[n];if(Ir(i)){s(eo(i));continue}if(i==="--"){s(t.slice(n+1).flatMap(a=>Ir(a)&&eo(a)||a));break}e.push(i)}return r?[...e,"--",...r.map(String)]:e}}}C();var yy=Kv();function _y(t,e){var r;let s=new fy,n=Wo(t&&(typeof t=="string"?{baseDir:t}:t)||{},e);if(!Qs(n.baseDir))throw new Jv(n,"Cannot use simple-git on a directory that does not exist");return Array.isArray(n.config)&&s.add(ny(n.config)),s.add(sy(n.unsafe)),s.add(vy()),s.add(iy(n.completion)),n.abort&&s.add(Qv(n.abort)),n.progress&&s.add(hy(n.progress)),n.timeout&&s.add(gy(n.timeout)),n.spawnOptions&&s.add(my(n.spawnOptions)),s.add(Io(dy(!0))),n.errors&&s.add(Io(n.errors)),cy(s,n.binary,(r=n.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new yy(n,s)}Tt();var Lu=_y;async function Pu(){let t=Lu();try{let{current:e}=await t.branchLocal(),r=(await t.getRemotes(!0)).map(({name:i,refs:{fetch:a}})=>({name:i,url:a})),s=r.find(({name:i})=>i==="origin")??r[0];return{possibleRepositoryName:s?s.url.split("/").slice(-2).join("/").replace(/\.git$/,""):(await t.revparse(["--show-toplevel"])).split("/").pop(),branch:e,remotes:r}}catch{return null}}var Mu=Fe(Du(),1),xn=Mu.default.bold("@seed-design/codemod"),qu=t=>({event:e,properties:r})=>console.log(xn,e,r,t);var Zu=(0,Xr.resolve)(__dirname,"transforms"),Gu=Nn(),Wr=Bu(),Kt=null,zu=null;function Ty(){Pu().then(t=>{zu=t,Kt=qu({...t}),Ey(Kt)})}function Ey(t){Ry(),Gu.version(Wr.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("--reporter","\uBCC0\uD658 \uACB0\uACFC\uB97C \uD30C\uC77C\uB85C \uC800\uC7A5\uD574\uC694").option("--extensions <extensions>","\uBCC0\uD658\uD560 \uD30C\uC77C \uD655\uC7A5\uC790").option("--ignore-config <ignoreConfig>","Ignore config").example(" $ npx @seed-design/codemod migrate-icons src/ui").action(async(e,r,s)=>{let n=Da.parse(s);n.track&&(t==null||t({event:"\uC2E4\uD589",properties:{transformName:e,paths:r}}));let i=Oy();n.list&&(Tn(i),process.exit(0)),e||(console.error("transform \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694"),Tn(i),process.exit(1)),i.includes(e)||(console.error(`\uC774\uB984\uC774 ${e}\uC778 transform\uC774 \uC5C6\uC5B4\uC694`),Tn(i),process.exit(1)),r.length===0&&(console.error("\uD30C\uC77C \uACBD\uB85C\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694"),process.exit(1));let a=(0,Xr.resolve)(Zu,e,"index.js");console.log(xn,`${r.join(", ")}\uC5D0 ${e} transform\uC744 \uC2E4\uD589\uD574\uC694.`),await Cy(a,e,r,n)}),Gu.parse()}function Ry(){(0,Hr.satisfies)(process.versions.node,Wr.engines.node)===!1&&(console.error(`Node.js \uBC84\uC804 \uC694\uAD6C\uC0AC\uD56D\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uC54A\uC544\uC694: "${Wr.engines.node}"
13
+ `))}outputVersion(){let{name:t}=this.cli,{versionNumber:r}=this.cli.globalCommand;r&&console.log(`${t}/${r} ${DS}`)}checkRequiredArgs(){let t=this.args.filter(r=>r.required).length;if(this.cli.args.length<t)throw new Cr(`missing required args for command \`${this.rawName}\``)}checkUnknownOptions(){let{options:t,globalCommand:r}=this.cli;if(!this.config.allowUnknownOptions){for(let n of Object.keys(t))if(n!=="--"&&!this.hasOption(n)&&!r.hasOption(n))throw new Cr(`Unknown option \`${n.length>1?`--${n}`:`-${n}`}\``)}}checkOptionValue(){let{options:t,globalCommand:r}=this.cli,n=[...r.options,...this.options];for(let s of n){let o=t[s.name.split(".")[0]];if(s.required){let i=n.some(a=>a.negated&&a.names.includes(s.name));if(o===!0||o===!1&&!i)throw new Cr(`option \`${s.rawName}\` value is missing`)}}}},vn=class extends xn{constructor(t){super("@@global@@","",{},t)}},Sn=Object.assign,No=class extends Zc.EventEmitter{constructor(t=""){super(),this.name=t,this.commands=[],this.rawArgs=[],this.args=[],this.options={},this.globalCommand=new vn(this),this.globalCommand.usage("<command> [options]")}usage(t){return this.globalCommand.usage(t),this}command(t,r,n){let s=new xn(t,r||"",n,this);return s.globalCommand=this.globalCommand,this.commands.push(s),s}option(t,r,n){return this.globalCommand.option(t,r,n),this}help(t){return this.globalCommand.option("-h, --help","Display this message"),this.globalCommand.helpCallback=t,this.showHelpOnExit=!0,this}version(t,r="-v, --version"){return this.globalCommand.version(t,r),this.showVersionOnExit=!0,this}example(t){return this.globalCommand.example(t),this}outputHelp(){this.matchedCommand?this.matchedCommand.outputHelp():this.globalCommand.outputHelp()}outputVersion(){this.globalCommand.outputVersion()}setParsedInfo({args:t,options:r},n,s){return this.args=t,this.options=r,n&&(this.matchedCommand=n),s&&(this.matchedCommandName=s),this}unsetMatchedCommand(){this.matchedCommand=void 0,this.matchedCommandName=void 0}parse(t=$S,{run:r=!0}={}){this.rawArgs=t,this.name||(this.name=t[1]?IS(t[1]):"cli");let n=!0;for(let o of this.commands){let i=this.mri(t.slice(2),o),a=i.args[0];if(o.isMatched(a)){n=!1;let c=Sn(Sn({},i),{args:i.args.slice(1)});this.setParsedInfo(c,o,a),this.emit(`command:${a}`,o)}}if(n){for(let o of this.commands)if(o.name===""){n=!1;let i=this.mri(t.slice(2),o);this.setParsedInfo(i,o),this.emit("command:!",o)}}if(n){let o=this.mri(t.slice(2));this.setParsedInfo(o)}this.options.help&&this.showHelpOnExit&&(this.outputHelp(),r=!1,this.unsetMatchedCommand()),this.options.version&&this.showVersionOnExit&&this.matchedCommandName==null&&(this.outputVersion(),r=!1,this.unsetMatchedCommand());let s={args:this.args,options:this.options};return r&&this.runMatchedCommand(),!this.matchedCommand&&this.args[0]&&this.emit("command:*"),s}mri(t,r){let n=[...this.globalCommand.options,...r?r.options:[]],s=RS(n),o=[],i=t.indexOf("--");i>-1&&(o=t.slice(i+1),t=t.slice(0,i));let a=TS(t,s);a=Object.keys(a).reduce((p,d)=>Sn(Sn({},p),{[Yc(d)]:a[d]}),{_:[]});let c=a._,u={"--":o},l=r&&r.config.ignoreOptionDefaultValue?r.config.ignoreOptionDefaultValue:this.globalCommand.config.ignoreOptionDefaultValue,f=Object.create(null);for(let p of n){if(!l&&p.config.default!==void 0)for(let d of p.names)u[d]=p.config.default;Array.isArray(p.config.type)&&f[p.name]===void 0&&(f[p.name]=Object.create(null),f[p.name].shouldTransform=!0,f[p.name].transformFunction=p.config.type[0])}for(let p of Object.keys(a))if(p!=="_"){let d=p.split(".");CS(u,d,a[p]),AS(u,f)}return{args:c,options:u}}runMatchedCommand(){let{args:t,options:r,matchedCommand:n}=this;if(!n||!n.commandAction)return;n.checkUnknownOptions(),n.checkOptionValue(),n.checkRequiredArgs();let s=[];return n.args.forEach((o,i)=>{o.variadic?s.push(t.slice(i)):s.push(t[i])}),s.push(r),n.commandAction.apply(this,s)}},Xc=(e="")=>new No(e);function W(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var Kc=require("node:url"),Zt=(e,t)=>{let r=Mo(LS(e));if(typeof r!="string")throw new TypeError(`${t} must be a string or a file URL: ${r}.`);return r},LS=e=>Po(e)?e.toString():e,Po=e=>typeof e!="string"&&e&&Object.getPrototypeOf(e)===String.prototype,Mo=e=>e instanceof URL?(0,Kc.fileURLToPath)(e):e;var _n=(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 iu=require("node:child_process");var Jc=require("node:string_decoder"),{toString:Qc}=Object.prototype,eu=e=>Qc.call(e)==="[object ArrayBuffer]",K=e=>Qc.call(e)==="[object Uint8Array]",Xe=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),NS=new TextEncoder,tu=e=>NS.encode(e),PS=new TextDecoder,En=e=>PS.decode(e),ru=(e,t)=>MS(e,t).join(""),MS=(e,t)=>{if(t==="utf8"&&e.every(o=>typeof o=="string"))return e;let r=new Jc.StringDecoder(t),n=e.map(o=>typeof o=="string"?tu(o):o).map(o=>r.write(o)),s=r.end();return s===""?n:[...n,s]},Ar=e=>e.length===1&&K(e[0])?e[0]:Fo(FS(e)),FS=e=>e.map(t=>typeof t=="string"?tu(t):t),Fo=e=>{let t=new Uint8Array(jS(e)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t},jS=e=>{let t=0;for(let r of e)t+=r.length;return t};var au=e=>Array.isArray(e)&&Array.isArray(e.raw),cu=(e,t)=>{let r=[];for(let[o,i]of e.entries())r=BS({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,{}]},BS=({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}=US(s,e.raw[n]),c=su(r,o,i);if(n===t.length)return c;let u=t[n],l=Array.isArray(u)?u.map(f=>ou(f)):[ou(u)];return su(c,l,a)},US=(e,t)=>{if(t.length===0)return{nextTokens:[],leadingWhitespaces:!1,trailingWhitespaces:!1};let r=[],n=0,s=nu.has(t[0]);for(let i=0,a=0;i<e.length;i+=1,a+=1){let c=t[a];if(nu.has(c))n!==i&&r.push(e.slice(n,i)),n=i+1;else if(c==="\\"){let u=t[a+1];u===`
14
+ `?(i-=1,a+=1):u==="u"&&t[a+2]==="{"?a=t.indexOf("}",a+3):a+=GS[u]??1}}let o=n===e.length;return o||r.push(e.slice(n)),{nextTokens:r,leadingWhitespaces:s,trailingWhitespaces:o}},nu=new Set([" "," ","\r",`
15
+ `]),GS={x:3,u:5},su=(e,t,r)=>r||e.length===0||t.length===0?[...e,...t]:[...e.slice(0,-1),`${e.at(-1)}${t[0]}`,...t.slice(1)],ou=e=>{let t=typeof e;if(t==="string")return e;if(t==="number")return String(e);if(W(e)&&("stdout"in e||"isMaxBuffer"in e))return qS(e);throw e instanceof iu.ChildProcess||Object.prototype.toString.call(e)==="[object Promise]"?new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}."):new TypeError(`Unexpected "${t}" in template expression`)},qS=({stdout:e})=>{if(typeof e=="string")return e;if(K(e))return En(e);throw e===void 0?new TypeError(`Missing result.stdout in template expression. This is probably due to the previous subprocess' "stdout" option.`):new TypeError(`Unexpected "${typeof e}" stdout in template expression`)};var vp=require("node:child_process");var lu=require("node:util");var Tn=q(require("node:process"),1),De=e=>On.includes(e),On=[Tn.default.stdin,Tn.default.stdout,Tn.default.stderr],ve=["stdin","stdout","stderr"],Rn=e=>ve[e]??`stdio[${e}]`;var fu=e=>{let t={...e};for(let r of Uo)t[r]=jo(e,r);return t},jo=(e,t)=>{let r=Array.from({length:VS(e)+1}),n=zS(e[t],r,t);return XS(n,t)},VS=({stdio:e})=>Array.isArray(e)?Math.max(e.length,ve.length):ve.length,zS=(e,t,r)=>W(e)?WS(e,t,r):t.fill(e),WS=(e,t,r)=>{for(let n of Object.keys(e).sort(ZS))for(let s of HS(n,r,t))t[s]=e[n];return t},ZS=(e,t)=>uu(e)<uu(t)?1:-1,uu=e=>e==="stdout"||e==="stderr"?0:e==="all"?2:1,HS=(e,t,r)=>{if(e==="ipc")return[r.length-1];let n=Bo(e);if(n===void 0||n===0)throw new TypeError(`"${t}.${e}" is invalid.
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]},Bo=e=>{if(e==="all")return e;if(ve.includes(e))return ve.indexOf(e);let t=YS.exec(e);if(t!==null)return Number(t[1])},YS=/^fd(\d+)$/,XS=(e,t)=>e.map(r=>r===void 0?JS[t]:r),KS=(0,lu.debuglog)("execa").enabled?"full":"none",JS={lines:!1,buffer:!0,maxBuffer:1e3*1e3*100,verbose:KS,stripFinalNewline:!0},Uo=["lines","buffer","maxBuffer","verbose","stripFinalNewline"],Ke=(e,t)=>t==="ipc"?e.at(-1):e[t];var Ht=({verbose:e},t)=>Go(e,t)!=="none",Yt=({verbose:e},t)=>!["none","short"].includes(Go(e,t)),du=({verbose:e},t)=>{let r=Go(e,t);return kn(r)?r:void 0},Go=(e,t)=>t===void 0?QS(e):Ke(e,t),QS=e=>e.find(t=>kn(t))??Cn.findLast(t=>e.includes(t)),kn=e=>typeof e=="function",Cn=["none","short","full"];var Au=require("node:util");var pu=require("node:process"),mu=require("node:util"),hu=(e,t)=>{let r=[e,...t],n=r.join(" "),s=r.map(o=>ox(gu(o))).join(" ");return{command:n,escapedCommand:s}},Ir=e=>(0,mu.stripVTControlCharacters)(e).split(`
18
+ `).map(t=>gu(t)).join(`
19
+ `),gu=e=>e.replaceAll(rx,t=>ex(t)),ex=e=>{let t=nx[e];if(t!==void 0)return t;let r=e.codePointAt(0),n=r.toString(16);return r<=sx?`\\u${n.padStart(4,"0")}`:`\\U${n}`},tx=()=>{try{return new RegExp("\\p{Separator}|\\p{Other}","gu")}catch{return/[\s\u0000-\u001F\u007F-\u009F\u00AD]/g}},rx=tx(),nx={" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},sx=65535,ox=e=>ix.test(e)?e:pu.platform==="win32"?`"${e.replaceAll('"','""')}"`:`'${e.replaceAll("'","'\\''")}'`,ix=/^[\w./-]+$/;var qo=q(require("node:process"),1);function Vo(){let{env:e}=qo.default,{TERM:t,TERM_PROGRAM:r}=e;return qo.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var yu={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"\u2588",squareDarkShade:"\u2593",squareMediumShade:"\u2592",squareLightShade:"\u2591",squareTop:"\u2580",squareBottom:"\u2584",squareLeft:"\u258C",squareRight:"\u2590",squareCenter:"\u25A0",bullet:"\u25CF",dot:"\u2024",ellipsis:"\u2026",pointerSmall:"\u203A",triangleUp:"\u25B2",triangleUpSmall:"\u25B4",triangleDown:"\u25BC",triangleDownSmall:"\u25BE",triangleLeftSmall:"\u25C2",triangleRightSmall:"\u25B8",home:"\u2302",heart:"\u2665",musicNote:"\u266A",musicNoteBeamed:"\u266B",arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",arrowLeftRight:"\u2194",arrowUpDown:"\u2195",almostEqual:"\u2248",notEqual:"\u2260",lessOrEqual:"\u2264",greaterOrEqual:"\u2265",identical:"\u2261",infinity:"\u221E",subscriptZero:"\u2080",subscriptOne:"\u2081",subscriptTwo:"\u2082",subscriptThree:"\u2083",subscriptFour:"\u2084",subscriptFive:"\u2085",subscriptSix:"\u2086",subscriptSeven:"\u2087",subscriptEight:"\u2088",subscriptNine:"\u2089",oneHalf:"\xBD",oneThird:"\u2153",oneQuarter:"\xBC",oneFifth:"\u2155",oneSixth:"\u2159",oneEighth:"\u215B",twoThirds:"\u2154",twoFifths:"\u2156",threeQuarters:"\xBE",threeFifths:"\u2157",threeEighths:"\u215C",fourFifths:"\u2158",fiveSixths:"\u215A",fiveEighths:"\u215D",sevenEighths:"\u215E",line:"\u2500",lineBold:"\u2501",lineDouble:"\u2550",lineDashed0:"\u2504",lineDashed1:"\u2505",lineDashed2:"\u2508",lineDashed3:"\u2509",lineDashed4:"\u254C",lineDashed5:"\u254D",lineDashed6:"\u2574",lineDashed7:"\u2576",lineDashed8:"\u2578",lineDashed9:"\u257A",lineDashed10:"\u257C",lineDashed11:"\u257E",lineDashed12:"\u2212",lineDashed13:"\u2013",lineDashed14:"\u2010",lineDashed15:"\u2043",lineVertical:"\u2502",lineVerticalBold:"\u2503",lineVerticalDouble:"\u2551",lineVerticalDashed0:"\u2506",lineVerticalDashed1:"\u2507",lineVerticalDashed2:"\u250A",lineVerticalDashed3:"\u250B",lineVerticalDashed4:"\u254E",lineVerticalDashed5:"\u254F",lineVerticalDashed6:"\u2575",lineVerticalDashed7:"\u2577",lineVerticalDashed8:"\u2579",lineVerticalDashed9:"\u257B",lineVerticalDashed10:"\u257D",lineVerticalDashed11:"\u257F",lineDownLeft:"\u2510",lineDownLeftArc:"\u256E",lineDownBoldLeftBold:"\u2513",lineDownBoldLeft:"\u2512",lineDownLeftBold:"\u2511",lineDownDoubleLeftDouble:"\u2557",lineDownDoubleLeft:"\u2556",lineDownLeftDouble:"\u2555",lineDownRight:"\u250C",lineDownRightArc:"\u256D",lineDownBoldRightBold:"\u250F",lineDownBoldRight:"\u250E",lineDownRightBold:"\u250D",lineDownDoubleRightDouble:"\u2554",lineDownDoubleRight:"\u2553",lineDownRightDouble:"\u2552",lineUpLeft:"\u2518",lineUpLeftArc:"\u256F",lineUpBoldLeftBold:"\u251B",lineUpBoldLeft:"\u251A",lineUpLeftBold:"\u2519",lineUpDoubleLeftDouble:"\u255D",lineUpDoubleLeft:"\u255C",lineUpLeftDouble:"\u255B",lineUpRight:"\u2514",lineUpRightArc:"\u2570",lineUpBoldRightBold:"\u2517",lineUpBoldRight:"\u2516",lineUpRightBold:"\u2515",lineUpDoubleRightDouble:"\u255A",lineUpDoubleRight:"\u2559",lineUpRightDouble:"\u2558",lineUpDownLeft:"\u2524",lineUpBoldDownBoldLeftBold:"\u252B",lineUpBoldDownBoldLeft:"\u2528",lineUpDownLeftBold:"\u2525",lineUpBoldDownLeftBold:"\u2529",lineUpDownBoldLeftBold:"\u252A",lineUpDownBoldLeft:"\u2527",lineUpBoldDownLeft:"\u2526",lineUpDoubleDownDoubleLeftDouble:"\u2563",lineUpDoubleDownDoubleLeft:"\u2562",lineUpDownLeftDouble:"\u2561",lineUpDownRight:"\u251C",lineUpBoldDownBoldRightBold:"\u2523",lineUpBoldDownBoldRight:"\u2520",lineUpDownRightBold:"\u251D",lineUpBoldDownRightBold:"\u2521",lineUpDownBoldRightBold:"\u2522",lineUpDownBoldRight:"\u251F",lineUpBoldDownRight:"\u251E",lineUpDoubleDownDoubleRightDouble:"\u2560",lineUpDoubleDownDoubleRight:"\u255F",lineUpDownRightDouble:"\u255E",lineDownLeftRight:"\u252C",lineDownBoldLeftBoldRightBold:"\u2533",lineDownLeftBoldRightBold:"\u252F",lineDownBoldLeftRight:"\u2530",lineDownBoldLeftBoldRight:"\u2531",lineDownBoldLeftRightBold:"\u2532",lineDownLeftRightBold:"\u252E",lineDownLeftBoldRight:"\u252D",lineDownDoubleLeftDoubleRightDouble:"\u2566",lineDownDoubleLeftRight:"\u2565",lineDownLeftDoubleRightDouble:"\u2564",lineUpLeftRight:"\u2534",lineUpBoldLeftBoldRightBold:"\u253B",lineUpLeftBoldRightBold:"\u2537",lineUpBoldLeftRight:"\u2538",lineUpBoldLeftBoldRight:"\u2539",lineUpBoldLeftRightBold:"\u253A",lineUpLeftRightBold:"\u2536",lineUpLeftBoldRight:"\u2535",lineUpDoubleLeftDoubleRightDouble:"\u2569",lineUpDoubleLeftRight:"\u2568",lineUpLeftDoubleRightDouble:"\u2567",lineUpDownLeftRight:"\u253C",lineUpBoldDownBoldLeftBoldRightBold:"\u254B",lineUpDownBoldLeftBoldRightBold:"\u2548",lineUpBoldDownLeftBoldRightBold:"\u2547",lineUpBoldDownBoldLeftRightBold:"\u254A",lineUpBoldDownBoldLeftBoldRight:"\u2549",lineUpBoldDownLeftRight:"\u2540",lineUpDownBoldLeftRight:"\u2541",lineUpDownLeftBoldRight:"\u253D",lineUpDownLeftRightBold:"\u253E",lineUpBoldDownBoldLeftRight:"\u2542",lineUpDownLeftBoldRightBold:"\u253F",lineUpBoldDownLeftBoldRight:"\u2543",lineUpBoldDownLeftRightBold:"\u2544",lineUpDownBoldLeftBoldRight:"\u2545",lineUpDownBoldLeftRightBold:"\u2546",lineUpDoubleDownDoubleLeftDoubleRightDouble:"\u256C",lineUpDoubleDownDoubleLeftRight:"\u256B",lineUpDownLeftDoubleRightDouble:"\u256A",lineCross:"\u2573",lineBackslash:"\u2572",lineSlash:"\u2571"},bu={tick:"\u2714",info:"\u2139",warning:"\u26A0",cross:"\u2718",squareSmall:"\u25FB",squareSmallFilled:"\u25FC",circle:"\u25EF",circleFilled:"\u25C9",circleDotted:"\u25CC",circleDouble:"\u25CE",circleCircle:"\u24DE",circleCross:"\u24E7",circlePipe:"\u24BE",radioOn:"\u25C9",radioOff:"\u25EF",checkboxOn:"\u2612",checkboxOff:"\u2610",checkboxCircleOn:"\u24E7",checkboxCircleOff:"\u24BE",pointer:"\u276F",triangleUpOutline:"\u25B3",triangleLeft:"\u25C0",triangleRight:"\u25B6",lozenge:"\u25C6",lozengeOutline:"\u25C7",hamburger:"\u2630",smiley:"\u32E1",mustache:"\u0DF4",star:"\u2605",play:"\u25B6",nodejs:"\u2B22",oneSeventh:"\u2150",oneNinth:"\u2151",oneTenth:"\u2152"},ax={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"},cx={...yu,...bu},ux={...yu,...ax},lx=Vo(),fx=lx?cx:ux,An=fx,cD=Object.entries(bu);var vu=q(require("node:tty"),1),wu,Su,In,xu,dx=((xu=(In=(Su=(wu=vu.default)==null?void 0:wu.WriteStream)==null?void 0:Su.prototype)==null?void 0:In.hasColors)==null?void 0:xu.call(In))??!1,L=(e,t)=>{if(!dx)return s=>s;let r=`\x1B[${e}m`,n=`\x1B[${t}m`;return s=>{let o=s+"",i=o.indexOf(n);if(i===-1)return r+o+n;let a=r,c=0;for(;i!==-1;)a+=o.slice(c,i)+r,c=i+n.length,i=o.indexOf(n,c);return a+=o.slice(c)+n,a}},lD=L(0,0),_u=L(1,22),fD=L(2,22),dD=L(3,23),pD=L(4,24),mD=L(53,55),hD=L(7,27),gD=L(8,28),yD=L(9,29),bD=L(30,39),wD=L(31,39),SD=L(32,39),xD=L(33,39),vD=L(34,39),_D=L(35,39),ED=L(36,39),TD=L(37,39),$n=L(90,39),OD=L(40,49),RD=L(41,49),kD=L(42,49),CD=L(43,49),AD=L(44,49),ID=L(45,49),$D=L(46,49),DD=L(47,49),LD=L(100,49),Eu=L(91,39),ND=L(92,39),Tu=L(93,39),PD=L(94,39),MD=L(95,39),FD=L(96,39),jD=L(97,39),BD=L(101,49),UD=L(102,49),GD=L(103,49),qD=L(104,49),VD=L(105,49),zD=L(106,49),WD=L(107,49);var ku=({type:e,message:t,timestamp:r,piped:n,commandId:s,result:{failed:o=!1}={},options:{reject:i=!0}})=>{let a=px(r),c=mx[e]({failed:o,reject:i,piped:n}),u=hx[e]({reject:i});return`${$n(`[${a}]`)} ${$n(`[${s}]`)} ${u(c)} ${u(t)}`},px=e=>`${Dn(e.getHours(),2)}:${Dn(e.getMinutes(),2)}:${Dn(e.getSeconds(),2)}.${Dn(e.getMilliseconds(),3)}`,Dn=(e,t)=>String(e).padStart(t,"0"),Ou=({failed:e,reject:t})=>e?t?An.cross:An.warning:An.tick,mx={command:({piped:e})=>e?"|":"$",output:()=>" ",ipc:()=>"*",error:Ou,duration:Ou},Ru=e=>e,hx={command:()=>_u,output:()=>Ru,ipc:()=>Ru,error:({reject:e})=>e?Eu:Tu,duration:()=>$n};var Cu=(e,t,r)=>{let n=du(t,r);return e.map(({verboseLine:s,verboseObject:o})=>gx(s,o,n)).filter(s=>s!==void 0).map(s=>yx(s)).join("")},gx=(e,t,r)=>{if(r===void 0)return e;let n=r(e,t);if(typeof n=="string")return n},yx=e=>e.endsWith(`
20
+ `)?e:`${e}
21
+ `;var je=({type:e,verboseMessage:t,fdNumber:r,verboseInfo:n,result:s})=>{let o=bx({type:e,result:s,verboseInfo:n}),i=wx(t,o),a=Cu(i,n,r);a!==""&&console.warn(a.slice(0,-1))},bx=({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}),wx=(e,t)=>e.split(`
22
+ `).map(r=>Sx({...t,message:r})),Sx=e=>({verboseLine:ku(e),verboseObject:e}),Ln=e=>{let t=typeof e=="string"?e:(0,Au.inspect)(e);return Ir(t).replaceAll(" "," ".repeat(xx))},xx=2;var Iu=(e,t)=>{Ht(t)&&je({type:"command",verboseMessage:e,verboseInfo:t})};var $u=(e,t,r)=>{Ex(e);let n=vx(e);return{verbose:e,escapedCommand:t,commandId:n,rawOptions:r}},vx=e=>Ht({verbose:e})?_x++:void 0,_x=0n,Ex=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(!Cn.includes(t)&&!kn(t)){let r=Cn.map(n=>`'${n}'`).join(", ");throw new TypeError(`The "verbose" option must not be ${t}. Allowed values are: ${r} or a function.`)}}};var zo=require("node:process"),Nn=()=>zo.hrtime.bigint(),Wo=e=>Number(zo.hrtime.bigint()-e)/1e6;var Pn=(e,t,r)=>{let n=Nn(),{command:s,escapedCommand:o}=hu(e,t),i=jo(r,"verbose"),a=$u(i,o,{...r});return Iu(o,a),{command:s,escapedCommand:o,startTime:n,verboseInfo:a}};var Zf=q(require("node:path"),1),gi=q(require("node:process"),1),Hf=q(Sl(),1);var $r=q(require("node:process"),1),at=q(require("node:path"),1);function Fn(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 xl=require("node:util"),ni=require("node:child_process"),ri=q(require("node:path"),1),vl=require("node:url"),AL=(0,xl.promisify)(ni.execFile);function jn(e){return e instanceof URL?(0,vl.fileURLToPath)(e):e}function _l(e){return{*[Symbol.iterator](){let t=ri.default.resolve(jn(e)),r;for(;r!==t;)yield t,r=t,t=ri.default.resolve(t,"..")}}}var IL=10*1024*1024;var Kx=({cwd:e=$r.default.cwd(),path:t=$r.default.env[Fn()],preferLocal:r=!0,execPath:n=$r.default.execPath,addExecPath:s=!0}={})=>{let o=at.default.resolve(jn(e)),i=[],a=t.split(at.default.delimiter);return r&&Jx(i,a,o),s&&Qx(i,a,n,o),t===""||t===at.default.delimiter?`${i.join(at.default.delimiter)}${t}`:[...i,t].join(at.default.delimiter)},Jx=(e,t,r)=>{for(let n of _l(r)){let s=at.default.join(n,"node_modules/.bin");t.includes(s)||e.push(s)}},Qx=(e,t,r,n)=>{let s=at.default.resolve(n,jn(r),"..");t.includes(s)||e.push(s)},El=({env:e=$r.default.env,...t}={})=>{e={...e};let r=Fn({env:e});return t.path=e[r],e[r]=Kx(t),e};var Bl=require("node:timers/promises");var Tl=(e,t,r)=>{let n=r?Lr:Dr,s=e instanceof Le?{}:{cause:e};return new n(t,s)},Le=class extends Error{},Ol=(e,t)=>{Object.defineProperty(e.prototype,"name",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,kl,{value:!0,writable:!1,enumerable:!1,configurable:!1})},Rl=e=>Bn(e)&&kl in e,kl=Symbol("isExecaError"),Bn=e=>Object.prototype.toString.call(e)==="[object Error]",Dr=class extends Error{};Ol(Dr,Dr.name);var Lr=class extends Error{};Ol(Lr,Lr.name);var Jt=require("node:os");var Ll=require("node:os");var Cl=()=>{let e=Il-Al+1;return Array.from({length:e},ev)},ev=(e,t)=>({name:`SIGRT${t+1}`,number:Al+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Al=34,Il=64;var Dl=require("node:os");var $l=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];var si=()=>{let e=Cl();return[...$l,...e].map(tv)},tv=({name:e,number:t,description:r,action:n,forced:s=!1,standard:o})=>{let{signals:{[e]:i}}=Dl.constants,a=i!==void 0;return{name:e,number:a?i:t,description:r,supported:a,action:n,forced:s,standard:o}};var rv=()=>{let e=si();return Object.fromEntries(e.map(nv))},nv=({name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i})=>[e,{name:e,number:t,description:r,supported:n,action:s,forced:o,standard:i}],Nl=rv(),sv=()=>{let e=si(),t=65,r=Array.from({length:t},(n,s)=>ov(s,e));return Object.assign({},...r)},ov=(e,t)=>{let r=iv(e,t);if(r===void 0)return{};let{name:n,description:s,supported:o,action:i,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:s,supported:o,action:i,forced:a,standard:c}}},iv=(e,t)=>{let r=t.find(({name:n})=>Ll.constants.signals[n]===e);return r!==void 0?r:t.find(n=>n.number===e)},VL=sv();var Ml=e=>{let t="option `killSignal`";if(e===0)throw new TypeError(`Invalid ${t}: 0 cannot be used.`);return jl(e,t)},Fl=e=>e===0?e:jl(e,"`subprocess.kill()`'s argument"),jl=(e,t)=>{if(Number.isInteger(e))return av(e,t);if(typeof e=="string")return uv(e,t);throw new TypeError(`Invalid ${t} ${String(e)}: it must be a string or an integer.
23
+ ${oi()}`)},av=(e,t)=>{if(Pl.has(e))return Pl.get(e);throw new TypeError(`Invalid ${t} ${e}: this signal integer does not exist.
24
+ ${oi()}`)},cv=()=>new Map(Object.entries(Jt.constants.signals).reverse().map(([e,t])=>[t,e])),Pl=cv(),uv=(e,t)=>{if(e in Jt.constants.signals)return e;throw e.toUpperCase()in Jt.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
+ ${oi()}`)},oi=()=>`Available signal names: ${lv()}.
26
+ Available signal numbers: ${fv()}.`,lv=()=>Object.keys(Jt.constants.signals).sort().map(e=>`'${e}'`).join(", "),fv=()=>[...new Set(Object.values(Jt.constants.signals).sort((e,t)=>e-t))].join(", "),Un=e=>Nl[e].description;var Ul=e=>{if(e===!1)return e;if(e===!0)return dv;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterDelay\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},dv=1e3*5,Gl=({kill:e,options:{forceKillAfterDelay:t,killSignal:r},onInternalError:n,context:s,controller:o},i,a)=>{let{signal:c,error:u}=pv(i,a,r);mv(u,n);let l=e(c);return hv({kill:e,signal:c,forceKillAfterDelay:t,killSignal:r,killResult:l,context:s,controller:o}),l},pv=(e,t,r)=>{let[n=r,s]=Bn(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&&!Bn(s))throw new TypeError(`The second argument is optional. If specified, it must be an error instance: ${s}`);return{signal:Fl(n),error:s}},mv=(e,t)=>{e!==void 0&&t.reject(e)},hv=async({kill:e,signal:t,forceKillAfterDelay:r,killSignal:n,killResult:s,context:o,controller:i})=>{t===n&&s&&ii({kill:e,forceKillAfterDelay:r,context:o,controllerSignal:i.signal})},ii=async({kill:e,forceKillAfterDelay:t,context:r,controllerSignal:n})=>{if(t!==!1)try{await(0,Bl.setTimeout)(t,void 0,{signal:n}),e("SIGKILL")&&(r.isForcefullyTerminated??=!0)}catch{}};var ql=require("node:events"),Gn=async(e,t)=>{e.aborted||await(0,ql.once)(e,"abort",{signal:t})};var Vl=({cancelSignal:e})=>{if(e!==void 0&&Object.prototype.toString.call(e)!=="[object AbortSignal]")throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(e)}`)},zl=({subprocess:e,cancelSignal:t,gracefulCancel:r,context:n,controller:s})=>t===void 0||r?[]:[gv(e,t,n,s)],gv=async(e,t,r,{signal:n})=>{throw await Gn(t,n),r.terminationReason??="cancel",e.kill(),t.reason};var Tf=require("node:timers/promises");var _f=require("node:util");var Qt=({methodName:e,isSubprocess:t,ipc:r,isConnected:n})=>{yv(e,t,r),ai(e,t,n)},yv=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} can only be used if the \`ipc\` option is \`true\`.`)},ai=(e,t,r)=>{if(!r)throw new Error(`${Ne(e,t)} cannot be used: the ${ct(t)} has already exited or disconnected.`)},Wl=e=>{throw new Error(`${Ne("getOneMessage",e)} could not complete: the ${ct(e)} exited or disconnected.`)},Zl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ct(e)} is sending a message too, instead of listening to incoming messages.
27
+ This can be fixed by both sending a message and listening to incoming messages at the same time:
28
+
29
+ const [receivedMessage] = await Promise.all([
30
+ ${Ne("getOneMessage",e)},
31
+ ${Ne("sendMessage",e,"message, {strict: true}")},
32
+ ]);`)},qn=(e,t)=>new Error(`${Ne("sendMessage",t)} failed when sending an acknowledgment response to the ${ct(t)}.`,{cause:e}),Hl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ct(e)} is not listening to incoming messages.`)},Yl=e=>{throw new Error(`${Ne("sendMessage",e)} failed: the ${ct(e)} exited without listening to incoming messages.`)},Xl=()=>new Error(`\`cancelSignal\` aborted: the ${ct(!0)} disconnected.`),Kl=()=>{throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.")},Jl=({error:e,methodName:t,isSubprocess:r})=>{if(e.code==="EPIPE")throw new Error(`${Ne(t,r)} cannot be used: the ${ct(r)} is disconnecting.`,{cause:e})},Ql=({error:e,methodName:t,isSubprocess:r,message:n})=>{if(bv(e))throw new Error(`${Ne(t,r)}'s argument type is invalid: the message cannot be serialized: ${String(n)}.`,{cause:e})},bv=({code:e,message:t})=>wv.has(e)||Sv.some(r=>t.includes(r)),wv=new Set(["ERR_MISSING_ARGS","ERR_INVALID_ARG_TYPE"]),Sv=["could not be cloned","circular structure","call stack size exceeded"],Ne=(e,t,r="")=>e==="cancelSignal"?"`cancelSignal`'s `controller.abort()`":`${xv(t)}${e}(${r})`,xv=e=>e?"":"subprocess.",ct=e=>e?"parent process":"subprocess",er=e=>{e.connected&&e.disconnect()};var Be=()=>{let e={},t=new Promise((r,n)=>{Object.assign(e,{resolve:r,reject:n})});return Object.assign(t,e)};var zn=(e,t="stdin")=>{let{options:n,fileDescriptors:s}=Ue.get(e),o=ef(s,t,!0),i=e.stdio[o];if(i===null)throw new TypeError(tf(o,t,n,!0));return i},tr=(e,t="stdout")=>{let{options:n,fileDescriptors:s}=Ue.get(e),o=ef(s,t,!1),i=o==="all"?e.all:e.stdio[o];if(i==null)throw new TypeError(tf(o,t,n,!1));return i},Ue=new WeakMap,ef=(e,t,r)=>{let n=vv(t,r);return _v(n,t,r,e),n},vv=(e,t)=>{let r=Bo(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
+ It must be ${n} or "fd3", "fd4" (and so on).
34
+ It is optional and defaults to "${s}".`)},_v=(e,t,r,n)=>{let s=n[rf(e)];if(s===void 0)throw new TypeError(`"${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.`)},tf=(e,t,r,n)=>{if(e==="all"&&!r.all)return`The "all" option must be true to use "from: 'all'".`;let{optionName:s,optionValue:o}=Ev(e,r);return`The "${s}: ${Vn(o)}" option is incompatible with using "${Nr(n)}: ${Vn(t)}".
36
+ Please set this option with "pipe" instead.`},Ev=(e,{stdin:t,stdout:r,stderr:n,stdio:s})=>{let o=rf(e);return o===0&&t!==void 0?{optionName:"stdin",optionValue:t}:o===1&&r!==void 0?{optionName:"stdout",optionValue:r}:o===2&&n!==void 0?{optionName:"stderr",optionValue:n}:{optionName:`stdio[${o}]`,optionValue:s[o]}},rf=e=>e==="all"?1:e,Nr=e=>e?"to":"from",Vn=e=>typeof e=="string"?`'${e}'`:typeof e=="number"?`${e}`:"Stream";var gf=require("node:events");var nf=require("node:events"),wt=(e,t,r)=>{let n=e.getMaxListeners();n===0||n===Number.POSITIVE_INFINITY||(e.setMaxListeners(n+t),(0,nf.addAbortListener)(r,()=>{e.setMaxListeners(e.getMaxListeners()-t)}))};var hf=require("node:events");var af=require("node:events"),cf=require("node:timers/promises");var Wn=(e,t)=>{t&&ci(e)},ci=e=>{e.refCounted()},Zn=(e,t)=>{t&&ui(e)},ui=e=>{e.unrefCounted()},sf=(e,t)=>{t&&(ui(e),ui(e))},of=(e,t)=>{t&&(ci(e),ci(e))};var uf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n},s)=>{if(df(s)||mf(s))return;Hn.has(e)||Hn.set(e,[]);let o=Hn.get(e);if(o.push(s),!(o.length>1))for(;o.length>0;){await pf(e,n,s),await cf.scheduler.yield();let i=await ff({wrappedMessage:o[0],anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n});o.shift(),n.emit("message",i),n.emit("message:done")}},lf=async({anyProcess:e,channel:t,isSubprocess:r,ipcEmitter:n,boundOnMessage:s})=>{li();let o=Hn.get(e);for(;(o==null?void 0:o.length)>0;)await(0,af.once)(n,"message:done");e.removeListener("message",s),of(t,r),n.connected=!1,n.emit("disconnect")},Hn=new WeakMap;var ut=(e,t,r)=>{if(Yn.has(e))return Yn.get(e);let n=new hf.EventEmitter;return n.connected=!0,Yn.set(e,n),Tv({ipcEmitter:n,anyProcess:e,channel:t,isSubprocess:r}),n},Yn=new WeakMap,Tv=({ipcEmitter:e,anyProcess:t,channel:r,isSubprocess:n})=>{let s=uf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e});t.on("message",s),t.once("disconnect",lf.bind(void 0,{anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:e,boundOnMessage:s})),sf(r,n)},Xn=e=>{let t=Yn.get(e);return t===void 0?e.channel!==null:t.connected};var yf=({anyProcess:e,channel:t,isSubprocess:r,message:n,strict:s})=>{if(!s)return n;let o=ut(e,t,r),i=Qn(e,o);return{id:Ov++,type:Jn,message:n,hasListeners:i}},Ov=0n,bf=(e,t)=>{if(!((t==null?void 0:t.type)!==Jn||t.hasListeners))for(let{id:r}of e)r!==void 0&&Kn[r].resolve({isDeadlock:!0,hasListeners:!1})},ff=async({wrappedMessage:e,anyProcess:t,channel:r,isSubprocess:n,ipcEmitter:s})=>{if((e==null?void 0:e.type)!==Jn||!t.connected)return e;let{id:o,message:i}=e,a={id:o,type:Sf,message:Qn(t,s)};try{await es({anyProcess:t,channel:r,isSubprocess:n,ipc:!0},a)}catch(c){s.emit("strict:error",c)}return i},df=e=>{var n;if((e==null?void 0:e.type)!==Sf)return!1;let{id:t,message:r}=e;return(n=Kn[t])==null||n.resolve({isDeadlock:!1,hasListeners:r}),!0},wf=async(e,t,r)=>{if((e==null?void 0:e.type)!==Jn)return;let n=Be();Kn[e.id]=n;let s=new AbortController;try{let{isDeadlock:o,hasListeners:i}=await Promise.race([n,Rv(t,r,s)]);o&&Zl(r),i||Hl(r)}finally{s.abort(),delete Kn[e.id]}},Kn={},Rv=async(e,t,{signal:r})=>{wt(e,1,r),await(0,gf.once)(e,"disconnect",{signal:r}),Yl(t)},Jn="execa:ipc:request",Sf="execa:ipc:response";var xf=(e,t,r)=>{Pr.has(e)||Pr.set(e,new Set);let n=Pr.get(e),s=Be(),o=r?t.id:void 0,i={onMessageSent:s,id:o};return n.add(i),{outgoingMessages:n,outgoingMessage:i}},vf=({outgoingMessages:e,outgoingMessage:t})=>{e.delete(t),t.onMessageSent.resolve()},pf=async(e,t,r)=>{var n;for(;!Qn(e,t)&&((n=Pr.get(e))==null?void 0:n.size)>0;){let s=[...Pr.get(e)];bf(s,r),await Promise.all(s.map(({onMessageSent:o})=>o))}},Pr=new WeakMap,Qn=(e,t)=>t.listenerCount("message")>kv(e),kv=e=>Ue.has(e)&&!Ke(Ue.get(e).options.buffer,"ipc")?1:0;var es=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},s,{strict:o=!1}={})=>{let i="sendMessage";return Qt({methodName:i,isSubprocess:r,ipc:n,isConnected:e.connected}),Cv({anyProcess:e,channel:t,methodName:i,isSubprocess:r,message:s,strict:o})},Cv=async({anyProcess:e,channel:t,methodName:r,isSubprocess:n,message:s,strict:o})=>{let i=yf({anyProcess:e,channel:t,isSubprocess:n,message:s,strict:o}),a=xf(e,i,o);try{await di({anyProcess:e,methodName:r,isSubprocess:n,wrappedMessage:i,message:s})}catch(c){throw er(e),c}finally{vf(a)}},di=async({anyProcess:e,methodName:t,isSubprocess:r,wrappedMessage:n,message:s})=>{let o=Av(e);try{await Promise.all([wf(n,e,r),o(n)])}catch(i){throw Jl({error:i,methodName:t,isSubprocess:r}),Ql({error:i,methodName:t,isSubprocess:r,message:s}),i}},Av=e=>{if(fi.has(e))return fi.get(e);let t=(0,_f.promisify)(e.send.bind(e));return fi.set(e,t),t},fi=new WeakMap;var Of=(e,t)=>{let r="cancelSignal";return ai(r,!1,e.connected),di({anyProcess:e,methodName:r,isSubprocess:!1,wrappedMessage:{type:kf,message:t},message:t})},Rf=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>(await Iv({anyProcess:e,channel:t,isSubprocess:r,ipc:n}),pi.signal),Iv=async({anyProcess:e,channel:t,isSubprocess:r,ipc:n})=>{if(!Ef){if(Ef=!0,!n){Kl();return}if(t===null){li();return}ut(e,t,r),await Tf.scheduler.yield()}},Ef=!1,mf=e=>(e==null?void 0:e.type)!==kf?!1:(pi.abort(e.message),!0),kf="execa:ipc:cancel",li=()=>{pi.abort(Xl())},pi=new AbortController;var Cf=({gracefulCancel:e,cancelSignal:t,ipc:r,serialization:n})=>{if(e){if(t===void 0)throw new Error("The `cancelSignal` option must be defined when setting the `gracefulCancel` option.");if(!r)throw new Error("The `ipc` option cannot be false when setting the `gracefulCancel` option.");if(n==="json")throw new Error("The `serialization` option cannot be 'json' when setting the `gracefulCancel` option.")}},Af=({subprocess:e,cancelSignal:t,gracefulCancel:r,forceKillAfterDelay:n,context:s,controller:o})=>r?[$v({subprocess:e,cancelSignal:t,forceKillAfterDelay:n,context:s,controller:o})]:[],$v=async({subprocess:e,cancelSignal:t,forceKillAfterDelay:r,context:n,controller:{signal:s}})=>{await Gn(t,s);let o=Dv(t);throw await Of(e,o),ii({kill:e.kill,forceKillAfterDelay:r,context:n,controllerSignal:s}),n.terminationReason??="gracefulCancel",t.reason},Dv=({reason:e})=>{if(!(e instanceof DOMException))return e;let t=new Error(e.message);return Object.defineProperty(t,"stack",{value:e.stack,enumerable:!1,configurable:!0,writable:!0}),t};var If=require("node:timers/promises");var $f=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},Df=(e,t,r,n)=>t===0||t===void 0?[]:[Lv(e,t,r,n)],Lv=async(e,t,r,{signal:n})=>{throw await(0,If.setTimeout)(t,void 0,{signal:n}),r.terminationReason??="timeout",e.kill(),new Le};var ts=require("node:process"),mi=q(require("node:path"),1);var Lf=({options:e})=>{if(e.node===!1)throw new TypeError('The "node" option cannot be false with `execaNode()`.');return{options:{...e,node:!0}}},Nf=(e,t,{node:r=!1,nodePath:n=ts.execPath,nodeOptions:s=ts.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=mi.default.resolve(o,c),l={...a,nodePath:u,node:r,cwd:o};if(!r)return[e,t,l];if(mi.default.basename(e,".exe")==="node")throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');return[u,[...s,e,...t],{ipc:!0,...l,shell:!1}]};var Pf=require("node:v8"),Mf=({ipcInput:e,ipc:t,serialization:r})=>{if(e!==void 0){if(!t)throw new Error("The `ipcInput` option cannot be set unless the `ipc` option is `true`.");Mv[r](e)}},Nv=e=>{try{(0,Pf.serialize)(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with a structured clone.",{cause:t})}},Pv=e=>{try{JSON.stringify(e)}catch(t){throw new Error("The `ipcInput` option is not serializable with JSON.",{cause:t})}},Mv={advanced:Nv,json:Pv},Ff=async(e,t)=>{t!==void 0&&await e.sendMessage(t)};var Bf=({encoding:e})=>{if(hi.has(e))return;let t=jv(e);if(t!==void 0)throw new TypeError(`Invalid option \`encoding: ${rs(e)}\`.
37
+ Please rename it to ${rs(t)}.`);let r=[...hi].map(n=>rs(n)).join(", ");throw new TypeError(`Invalid option \`encoding: ${rs(e)}\`.
38
+ Please rename it to one of: ${r}.`)},Fv=new Set(["utf8","utf16le"]),me=new Set(["buffer","hex","base64","base64url","latin1","ascii"]),hi=new Set([...Fv,...me]),jv=e=>{if(e===null)return"buffer";if(typeof e!="string")return;let t=e.toLowerCase();if(t in jf)return jf[t];if(hi.has(t))return t},jf={"utf-8":"utf8","utf-16le":"utf16le","ucs-2":"utf16le",ucs2:"utf16le",binary:"latin1"},rs=e=>typeof e=="string"?`"${e}"`:String(e);var Uf=require("node:fs"),Gf=q(require("node:path"),1),qf=q(require("node:process"),1);var Vf=(e=zf())=>{let t=Zt(e,'The "cwd" option');return Gf.default.resolve(t)},zf=()=>{try{return qf.default.cwd()}catch(e){throw e.message=`The current directory does not exist.
39
+ ${e.message}`,e}},Wf=(e,t)=>{if(t===zf())return e;let r;try{r=(0,Uf.statSync)(t)}catch(n){return`The "cwd" option is invalid: ${t}.
40
+ ${n.message}
41
+ ${e}`}return r.isDirectory()?e:`The "cwd" option is not a directory: ${t}.
42
+ ${e}`};var ns=(e,t,r)=>{r.cwd=Vf(r.cwd);let[n,s,o]=Nf(e,t,r),{command:i,args:a,options:c}=Hf.default._parse(n,s,o),u=fu(c),l=Bv(u);return $f(l),Bf(l),Mf(l),Vl(l),Cf(l),l.shell=Mo(l.shell),l.env=Uv(l),l.killSignal=Ml(l.killSignal),l.forceKillAfterDelay=Ul(l.forceKillAfterDelay),l.lines=l.lines.map((f,p)=>f&&!me.has(l.encoding)&&l.buffer[p]),gi.default.platform==="win32"&&Zf.default.basename(i,".exe")==="cmd"&&a.unshift("/q"),{file:i,commandArguments:a,options:l}},Bv=({extendEnv:e=!0,preferLocal:t=!1,cwd:r,localDir:n=r,encoding:s="utf8",reject:o=!0,cleanup:i=!0,all:a=!1,windowsHide:c=!0,killSignal:u="SIGTERM",forceKillAfterDelay:l=!0,gracefulCancel:f=!1,ipcInput:p,ipc:d=p!==void 0||f,serialization:b="advanced",...T})=>({...T,extendEnv:e,preferLocal:t,cwd:r,localDirectory:n,encoding:s,reject:o,cleanup:i,all:a,windowsHide:c,killSignal:u,forceKillAfterDelay:l,gracefulCancel:f,ipcInput:p,ipc:d,serialization:b}),Uv=({env:e,extendEnv:t,preferLocal:r,node:n,localDirectory:s,nodePath:o})=>{let i=t?{...gi.default.env,...e}:e;return r||n?El({env:i,cwd:s,execPath:o,preferLocal:r,addExecPath:n}):i};var gd=require("node:util");function rr(e){if(typeof e=="string")return Gv(e);if(!(ArrayBuffer.isView(e)&&e.BYTES_PER_ELEMENT===1))throw new Error("Input must be a string or a Uint8Array");return qv(e)}var Gv=e=>e.at(-1)===Yf?e.slice(0,e.at(-2)===Xf?-2:-1):e,qv=e=>e.at(-1)===Vv?e.subarray(0,e.at(-2)===zv?-2:-1):e,Yf=`
43
+ `,Vv=Yf.codePointAt(0),Xf="\r",zv=Xf.codePointAt(0);var cd=require("node:events"),ud=require("node:stream/promises");function Pe(e,{checkOpen:t=!0}={}){return e!==null&&typeof e=="object"&&(e.writable||e.readable||!t||e.writable===void 0&&e.readable===void 0)&&typeof e.pipe=="function"}function yi(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 bi(e,t){return yi(e,t)&&St(e,t)}var Wv=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype),wi=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}}},Si=Symbol();function Kf(){return this[Si].next()}Object.defineProperty(Kf,"name",{value:"next"});function Jf(e){return this[Si].return(e)}Object.defineProperty(Jf,"name",{value:"return"});var Zv=Object.create(Wv,{next:{enumerable:!0,configurable:!0,writable:!0,value:Kf},return:{enumerable:!0,configurable:!0,writable:!0,value:Jf}});function xi({preventCancel:e=!1}={}){let t=this.getReader(),r=new wi(t,e),n=Object.create(Zv);return n[Si]=r,n}var Qf=e=>{if(St(e,{checkOpen:!1})&&Mr.on!==void 0)return Yv(e);if(typeof(e==null?void 0:e[Symbol.asyncIterator])=="function")return e;if(Hv.call(e)==="[object ReadableStream]")return xi.call(e);throw new TypeError("The first argument must be a Readable, a ReadableStream, or an async iterable.")},{toString:Hv}=Object.prototype,Yv=async function*(e){let t=new AbortController,r={};Xv(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()}},Xv=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 nr=async(e,{init:t,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,finalize:a},{maxBuffer:c=Number.POSITIVE_INFINITY}={})=>{let u=Qf(e),l=t();l.length=0;try{for await(let f of u){let p=Jv(f),d=r[p](f,l);rd({convertedChunk:d,state:l,getSize:n,truncateChunk:s,addChunk:o,maxBuffer:c})}return Kv({state:l,convertChunk:r,getSize:n,truncateChunk:s,addChunk:o,getFinalChunk:i,maxBuffer:c}),a(l)}catch(f){let p=typeof f=="object"&&f!==null?f:new Error(f);throw p.bufferedData=a(l),p}},Kv=({state:e,getSize:t,truncateChunk:r,addChunk:n,getFinalChunk:s,maxBuffer:o})=>{let i=s(e);i!==void 0&&rd({convertedChunk:i,state:e,getSize:t,truncateChunk:r,addChunk:n,maxBuffer:o})},rd=({convertedChunk:e,state:t,getSize:r,truncateChunk:n,addChunk:s,maxBuffer:o})=>{let i=r(e),a=t.length+i;if(a<=o){ed(e,t,s,a);return}let c=n(e,o-t.length);throw c!==void 0&&ed(c,t,s,o),new Ge},ed=(e,t,r,n)=>{t.contents=r(e,t,n),t.length=n},Jv=e=>{var n;let t=typeof e;if(t==="string")return"string";if(t!=="object"||e===null)return"others";if((n=globalThis.Buffer)!=null&&n.isBuffer(e))return"buffer";let r=td.call(e);return r==="[object ArrayBuffer]"?"arrayBuffer":r==="[object DataView]"?"dataView":Number.isInteger(e.byteLength)&&Number.isInteger(e.byteOffset)&&td.call(e.buffer)==="[object ArrayBuffer]"?"typedArray":"others"},{toString:td}=Object.prototype,Ge=class extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}};var Je=e=>e,Fr=()=>{},ss=({contents:e})=>e,os=e=>{throw new Error(`Streams in object mode are not supported: ${String(e)}`)},is=e=>e.length;async function as(e,t){return nr(e,r_,t)}var Qv=()=>({contents:[]}),e_=()=>1,t_=(e,{contents:t})=>(t.push(e),t),r_={init:Qv,convertChunk:{string:Je,buffer:Je,arrayBuffer:Je,dataView:Je,typedArray:Je,others:Je},getSize:e_,truncateChunk:Fr,addChunk:t_,getFinalChunk:Fr,finalize:ss};async function cs(e,t){return nr(e,f_,t)}var n_=()=>({contents:new ArrayBuffer(0)}),s_=e=>o_.encode(e),o_=new TextEncoder,nd=e=>new Uint8Array(e),sd=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i_=(e,t)=>e.slice(0,t),a_=(e,{contents:t,length:r},n)=>{let s=ad()?u_(t,n):c_(t,n);return new Uint8Array(s).set(e,r),s},c_=(e,t)=>{if(t<=e.byteLength)return e;let r=new ArrayBuffer(id(t));return new Uint8Array(r).set(new Uint8Array(e),0),r},u_=(e,t)=>{if(t<=e.maxByteLength)return e.resize(t),e;let r=new ArrayBuffer(t,{maxByteLength:id(t)});return new Uint8Array(r).set(new Uint8Array(e),0),r},id=e=>od**Math.ceil(Math.log(e)/Math.log(od)),od=2,l_=({contents:e,length:t})=>ad()?e:e.slice(0,t),ad=()=>"resize"in ArrayBuffer.prototype,f_={init:n_,convertChunk:{string:s_,buffer:nd,arrayBuffer:nd,dataView:sd,typedArray:sd,others:os},getSize:is,truncateChunk:i_,addChunk:a_,getFinalChunk:Fr,finalize:l_};async function ls(e,t){return nr(e,g_,t)}var d_=()=>({contents:"",textDecoder:new TextDecoder}),us=(e,{textDecoder:t})=>t.decode(e,{stream:!0}),p_=(e,{contents:t})=>t+e,m_=(e,t)=>e.slice(0,t),h_=({textDecoder:e})=>{let t=e.decode();return t===""?void 0:t},g_={init:d_,convertChunk:{string:Je,buffer:us,arrayBuffer:us,dataView:us,typedArray:us,others:os},getSize:is,truncateChunk:m_,addChunk:p_,getFinalChunk:h_,finalize:ss};Object.assign(Mr,{on:cd.on,finished:ud.finished});var ld=({error:e,stream:t,readableObjectMode:r,lines:n,encoding:s,fdNumber:o})=>{if(!(e instanceof Ge))throw e;if(o==="all")return e;let i=y_(r,n,s);throw e.maxBufferInfo={fdNumber:o,unit:i},t.destroy(),e},y_=(e,t,r)=>e?"objects":t?"lines":r==="buffer"?"bytes":"characters",fd=(e,t,r)=>{if(t.length!==r)return;let n=new Ge;throw n.maxBufferInfo={fdNumber:"ipc"},n},dd=(e,t)=>{let{streamName:r,threshold:n,unit:s}=b_(e,t);return`Command's ${r} was larger than ${n} ${s}`},b_=(e,t)=>{if((e==null?void 0:e.maxBufferInfo)===void 0)return{streamName:"output",threshold:t[1],unit:"bytes"};let{maxBufferInfo:{fdNumber:r,unit:n}}=e;delete e.maxBufferInfo;let s=Ke(t,r);return r==="ipc"?{streamName:"IPC output",threshold:s,unit:"messages"}:{streamName:Rn(r),threshold:s,unit:n}},pd=(e,t,r)=>(e==null?void 0:e.code)==="ENOBUFS"&&t!==null&&t.some(n=>n!==null&&n.length>fs(r)),md=(e,t,r)=>{if(!t)return e;let n=fs(r);return e.length>n?e.slice(0,n):e},fs=([,e])=>e;var yd=({stdio:e,all:t,ipcOutput:r,originalError:n,signal:s,signalDescription:o,exitCode:i,escapedCommand:a,timedOut:c,isCanceled:u,isGracefullyCanceled:l,isMaxBuffer:f,isForcefullyTerminated:p,forceKillAfterDelay:d,killSignal:b,maxBuffer:T,timeout:N,cwd:P})=>{let j=n==null?void 0:n.code,Y=w_({originalError:n,timedOut:c,timeout:N,isMaxBuffer:f,maxBuffer:T,errorCode:j,signal:s,signalDescription:o,exitCode:i,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:p,forceKillAfterDelay:d,killSignal:b}),X=x_(n,P),Se=X===void 0?"":`
44
+ ${X}`,ce=`${Y}: ${a}${Se}`,Ae=t===void 0?[e[2],e[1]]:[t],Ie=[ce,...Ae,...e.slice(3),r.map(xe=>v_(xe)).join(`
45
+ `)].map(xe=>Ir(rr(__(xe)))).filter(Boolean).join(`
46
+
47
+ `);return{originalMessage:X,shortMessage:ce,message:Ie}},w_=({originalError:e,timedOut:t,timeout:r,isMaxBuffer:n,maxBuffer:s,errorCode:o,signal:i,signalDescription:a,exitCode:c,isCanceled:u,isGracefullyCanceled:l,isForcefullyTerminated:f,forceKillAfterDelay:p,killSignal:d})=>{let b=S_(f,p);return t?`Command timed out after ${r} milliseconds${b}`:l?i===void 0?`Command was gracefully canceled with exit code ${c}`:f?`Command was gracefully canceled${b}`:`Command was gracefully canceled with ${i} (${a})`:u?`Command was canceled${b}`:n?`${dd(e,s)}${b}`:o!==void 0?`Command failed with ${o}${b}`:f?`Command was killed with ${d} (${Un(d)})${b}`:i!==void 0?`Command was killed with ${i} (${a})`:c!==void 0?`Command failed with exit code ${c}`:"Command failed"},S_=(e,t)=>e?` and was forcefully terminated after ${t} milliseconds`:"",x_=(e,t)=>{if(e instanceof Le)return;let r=Rl(e)?e.originalMessage:String((e==null?void 0:e.message)??e),n=Ir(Wf(r,t));return n===""?void 0:n},v_=e=>typeof e=="string"?e:(0,gd.inspect)(e),__=e=>Array.isArray(e)?e.map(t=>rr(hd(t))).filter(Boolean).join(`
48
+ `):hd(e),hd=e=>typeof e=="string"?e:K(e)?En(e):"";var ds=({command:e,escapedCommand:t,stdio:r,all:n,ipcOutput:s,options:{cwd:o},startTime:i})=>bd({command:e,escapedCommand:t,cwd:o,durationMs:Wo(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:[]}),sr=({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:b,timeout:T=b,forceKillAfterDelay:N,killSignal:P,cwd:j,maxBuffer:Y},isSync:X})=>{let{exitCode:Se,signal:ce,signalDescription:Ae}=T_(u,l),{originalMessage:Ie,shortMessage:xe,message:kr}=yd({stdio:f,all:p,ipcOutput:d,originalError:e,signal:ce,signalDescription:Ae,exitCode:Se,escapedCommand:r,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,forceKillAfterDelay:N,killSignal:P,maxBuffer:Y,timeout:T,cwd:j}),bt=Tl(e,kr,X);return Object.assign(bt,E_({error:bt,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:Se,signal:ce,signalDescription:Ae,stdio:f,all:p,ipcOutput:d,cwd:j,originalMessage:Ie,shortMessage:xe})),bt},E_=({error:e,command:t,escapedCommand:r,startTime:n,timedOut:s,isCanceled:o,isGracefullyCanceled:i,isMaxBuffer:a,isForcefullyTerminated:c,exitCode:u,signal:l,signalDescription:f,stdio:p,all:d,ipcOutput:b,cwd:T,originalMessage:N,shortMessage:P})=>{var j;return bd({shortMessage:P,originalMessage:N,command:t,escapedCommand:r,cwd:T,durationMs:Wo(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:b,pipedFrom:[]})},bd=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),T_=(e,t)=>{let r=e===null?void 0:e,n=t===null?void 0:t,s=n===void 0?void 0:Un(t);return{exitCode:r,signal:n,signalDescription:s}};var wd=e=>Number.isFinite(e)?e:0;function O_(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(wd(e*1e3)%1e3),nanoseconds:Math.trunc(wd(e*1e6)%1e3)}}function R_(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function vi(e){switch(typeof e){case"number":{if(Number.isFinite(e))return O_(e);break}case"bigint":return R_(e)}throw new TypeError("Expected a finite number or bigint")}var k_=e=>e===0||e===0n,C_=(e,t)=>t===1||t===1n?e:`${e}s`,A_=1e-7,I_=24n*60n*60n*1000n;function _i(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+A_);return(Math.round(p)/10**f).toFixed(f)},i=(l,f,p,d)=>{if(!((s.length===0||!t.colonNotation)&&k_(l)&&!(t.colonNotation&&p==="m"))){if(d??=String(l),t.colonNotation){let b=d.includes(".")?d.split(".")[0].length:d.length,T=s.length>0?2:1;d="0".repeat(Math.max(0,T-b))+d}else d+=t.verbose?" "+C_(f,l):p;s.push(d)}},a=vi(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 b=f+p/1e3+d/1e6,T=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,N=b>=1?Math.round(b):Math.ceil(b),P=T?b.toFixed(T):N;i(Number.parseFloat(P),"millisecond","ms",P)}}else{let l=(r?Number(e%I_):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 Sd=(e,t)=>{e.failed&&je({type:"error",verboseMessage:e.shortMessage,verboseInfo:t,result:e})};var xd=(e,t)=>{Ht(t)&&(Sd(e,t),$_(e,t))},$_=(e,t)=>{let r=`(done in ${_i(e.durationMs)})`;je({type:"duration",verboseMessage:r,verboseInfo:t,result:e})};var or=(e,t,{reject:r})=>{if(xd(e,t),e.failed&&r)throw e;return e};var Ii=require("node:fs");var Ed=(e,t)=>xt(e)?"asyncGenerator":Rd(e)?"generator":ps(e)?"fileUrl":M_(e)?"filePath":B_(e)?"webStream":Pe(e,{checkOpen:!1})?"native":K(e)?"uint8Array":U_(e)?"asyncIterable":G_(e)?"iterable":Oi(e)?Td({transform:e},t):P_(e)?D_(e,t):"native",D_=(e,t)=>bi(e.transform,{checkOpen:!1})?L_(e,t):Oi(e.transform)?Td(e,t):N_(e,t),L_=(e,t)=>(Od(e,t,"Duplex stream"),"duplex"),Td=(e,t)=>(Od(e,t,"web TransformStream"),"webTransform"),Od=({final:e,binary:t,objectMode:r},n,s)=>{vd(e,`${n}.final`,s),vd(t,`${n}.binary`,s),Ei(r,`${n}.objectMode`)},vd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${t}\` option can only be defined when using a generator, not a ${r}.`)},N_=({transform:e,final:t,binary:r,objectMode:n},s)=>{if(e!==void 0&&!_d(e))throw new TypeError(`The \`${s}.transform\` option must be a generator, a Duplex stream or a web TransformStream.`);if(bi(t,{checkOpen:!1}))throw new TypeError(`The \`${s}.final\` option must not be a Duplex stream.`);if(Oi(t))throw new TypeError(`The \`${s}.final\` option must not be a web TransformStream.`);if(t!==void 0&&!_d(t))throw new TypeError(`The \`${s}.final\` option must be a generator.`);return Ei(r,`${s}.binary`),Ei(n,`${s}.objectMode`),xt(e)||xt(t)?"asyncGenerator":"generator"},Ei=(e,t)=>{if(e!==void 0&&typeof e!="boolean")throw new TypeError(`The \`${t}\` option must use a boolean.`)},_d=e=>xt(e)||Rd(e),xt=e=>Object.prototype.toString.call(e)==="[object AsyncGeneratorFunction]",Rd=e=>Object.prototype.toString.call(e)==="[object GeneratorFunction]",P_=e=>W(e)&&(e.transform!==void 0||e.final!==void 0),ps=e=>Object.prototype.toString.call(e)==="[object URL]",kd=e=>ps(e)&&e.protocol!=="file:",M_=e=>W(e)&&Object.keys(e).length>0&&Object.keys(e).every(t=>F_.has(t))&&Ti(e.file),F_=new Set(["file","append"]),Ti=e=>typeof e=="string",Cd=(e,t)=>e==="native"&&typeof t=="string"&&!j_.has(t),j_=new Set(["ipc","ignore","inherit","overlapped","pipe"]),Ad=e=>Object.prototype.toString.call(e)==="[object ReadableStream]",ms=e=>Object.prototype.toString.call(e)==="[object WritableStream]",B_=e=>Ad(e)||ms(e),Oi=e=>Ad(e==null?void 0:e.readable)&&ms(e==null?void 0:e.writable),U_=e=>Id(e)&&typeof e[Symbol.asyncIterator]=="function",G_=e=>Id(e)&&typeof e[Symbol.iterator]=="function",Id=e=>typeof e=="object"&&e!==null,_e=new Set(["generator","asyncGenerator","duplex","webTransform"]),hs=new Set(["fileUrl","filePath","fileNumber"]),Ri=new Set(["fileUrl","filePath"]),$d=new Set([...Ri,"webStream","nodeStream"]),Dd=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 ki=(e,t,r,n)=>n==="output"?q_(e,t,r):V_(e,t,r),q_=(e,t,r)=>{let n=t!==0&&r[t-1].value.readableObjectMode;return{writableObjectMode:n,readableObjectMode:e??n}},V_=(e,t,r)=>{let n=t===0?e===!0:r[t-1].value.readableObjectMode,s=t!==r.length-1&&(e??n);return{writableObjectMode:n,readableObjectMode:s}},Ld=(e,t)=>{let r=e.findLast(({type:n})=>_e.has(n));return r===void 0?!1:t==="input"?r.value.writableObjectMode:r.value.readableObjectMode};var Nd=(e,t,r,n)=>[...e.filter(({type:s})=>!_e.has(s)),...z_(e,t,r,n)],z_=(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]=W_({stdioItem:a,index:Number(i),newTransforms:o,optionName:t,direction:r,encoding:n});return X_(o,r)},W_=({stdioItem:e,stdioItem:{type:t},index:r,newTransforms:n,optionName:s,direction:o,encoding:i})=>t==="duplex"?Z_({stdioItem:e,optionName:s}):t==="webTransform"?H_({stdioItem:e,index:r,newTransforms:n,direction:o}):Y_({stdioItem:e,index:r,newTransforms:n,direction:o,encoding:i}),Z_=({stdioItem:e,stdioItem:{value:{transform:t,transform:{writableObjectMode:r,readableObjectMode:n},objectMode:s=n}},optionName:o})=>{if(s&&!n)throw new TypeError(`The \`${o}.objectMode\` option can only be \`true\` if \`new Duplex({objectMode: true})\` is used.`);if(!s&&n)throw new TypeError(`The \`${o}.objectMode\` option cannot be \`false\` if \`new Duplex({objectMode: true})\` is used.`);return{...e,value:{transform:t,writableObjectMode:r,readableObjectMode:n}}},H_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s})=>{let{transform:o,objectMode:i}=W(t)?t:{transform:t},{writableObjectMode:a,readableObjectMode:c}=ki(i,r,n,s);return{...e,value:{transform:o,writableObjectMode:a,readableObjectMode:c}}},Y_=({stdioItem:e,stdioItem:{value:t},index:r,newTransforms:n,direction:s,encoding:o})=>{let{transform:i,final:a,binary:c=!1,preserveNewlines:u=!1,objectMode:l}=W(t)?t:{transform:t},f=c||me.has(o),{writableObjectMode:p,readableObjectMode:d}=ki(l,r,n,s);return{...e,value:{transform:i,final:a,binary:f,preserveNewlines:u,writableObjectMode:p,readableObjectMode:d}}},X_=(e,t)=>t==="input"?e.reverse():e;var gs=q(require("node:process"),1);var Pd=(e,t,r)=>{let n=e.map(s=>K_(s,t));if(n.includes("input")&&n.includes("output"))throw new TypeError(`The \`${r}\` option must not be an array of both readable and writable values.`);return n.find(Boolean)??eE},K_=({type:e,value:t},r)=>J_[r]??Md[e](t),J_=["input","output","output"],ir=()=>{},Ci=()=>"input",Md={generator:ir,asyncGenerator:ir,fileUrl:ir,filePath:ir,iterable:Ci,asyncIterable:Ci,uint8Array:Ci,webStream:e=>ms(e)?"output":"input",nodeStream(e){return St(e,{checkOpen:!1})?yi(e,{checkOpen:!1})?void 0:"input":"output"},webTransform:ir,duplex:ir,native(e){let t=Q_(e);if(t!==void 0)return t;if(Pe(e,{checkOpen:!1}))return Md.nodeStream(e)}},Q_=e=>{if([0,gs.default.stdin].includes(e))return"input";if([1,2,gs.default.stdout,gs.default.stderr].includes(e))return"output"},eE="output";var Fd=(e,t)=>t&&!e.includes("ipc")?[...e,"ipc"]:e;var jd=({stdio:e,ipc:t,buffer:r,...n},s,o)=>{let i=tE(e,n).map((a,c)=>Bd(a,c));return o?nE(i,r,s):Fd(i,t)},tE=(e,t)=>{if(e===void 0)return ve.map(n=>t[n]);if(rE(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])},rE=e=>ve.some(t=>e[t]!==void 0),Bd=(e,t)=>Array.isArray(e)?e.map(r=>Bd(r,t)):e??(t>=ve.length?"ignore":"pipe"),nE=(e,t,r)=>e.map((n,s)=>!t[s]&&s!==0&&!Yt(r,s)&&sE(n)?"ignore":n),sE=e=>e==="pipe"||Array.isArray(e)&&e.every(t=>t==="pipe");var Gd=require("node:fs"),qd=q(require("node:tty"),1);var Vd=({stdioItem:e,stdioItem:{type:t},isStdioArray:r,fdNumber:n,direction:s,isSync:o})=>!r||t!=="native"?e:o?oE({stdioItem:e,fdNumber:n,direction:s}):cE({stdioItem:e,fdNumber:n}),oE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n,direction:s})=>{let o=iE({value:t,optionName:r,fdNumber:n,direction:s});if(o!==void 0)return o;if(Pe(t,{checkOpen:!1}))throw new TypeError(`The \`${r}: Stream\` option cannot both be an array and include a stream with synchronous methods.`);return e},iE=({value:e,optionName:t,fdNumber:r,direction:n})=>{let s=aE(e,r);if(s!==void 0){if(n==="output")return{type:"fileNumber",value:s,optionName:t};if(qd.default.isatty(s))throw new TypeError(`The \`${t}: ${Vn(e)}\` option is invalid: it cannot be a TTY with synchronous methods.`);return{type:"uint8Array",value:Xe((0,Gd.readFileSync)(s)),optionName:t}}},aE=(e,t)=>{if(e==="inherit")return t;if(typeof e=="number")return e;let r=On.indexOf(e);if(r!==-1)return r},cE=({stdioItem:e,stdioItem:{value:t,optionName:r},fdNumber:n})=>t==="inherit"?{type:"nodeStream",value:Ud(n,t,r),optionName:r}:typeof t=="number"?{type:"nodeStream",value:Ud(t,t,r),optionName:r}:Pe(t,{checkOpen:!1})?{type:"nodeStream",value:t,optionName:r}:e,Ud=(e,t,r)=>{let n=On[e];if(n===void 0)throw new TypeError(`The \`${r}: ${t}\` option is invalid: no such standard stream.`);return n};var zd=({input:e,inputFile:t},r)=>r===0?[...uE(e),...fE(t)]:[],uE=e=>e===void 0?[]:[{type:lE(e),value:e,optionName:"input"}],lE=e=>{if(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.")},fE=e=>e===void 0?[]:[{...dE(e),optionName:"inputFile"}],dE=e=>{if(ps(e))return{type:"fileUrl",value:e};if(Ti(e))return{type:"filePath",value:{file:e}};throw new Error("The `inputFile` option must be a file path string or a file URL.")};var Wd=e=>e.filter((t,r)=>e.every((n,s)=>t.value!==n.value||r>=s||t.type==="generator"||t.type==="asyncGenerator")),Zd=({stdioItem:{type:e,value:t,optionName:r},direction:n,fileDescriptors:s,isSync:o})=>{let i=pE(s,e);if(i.length!==0){if(o){mE({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});return}if($d.has(e))return Hd({otherStdioItems:i,type:e,value:t,optionName:r,direction:n});Dd.has(e)&&gE({otherStdioItems:i,type:e,value:t,optionName:r})}},pE=(e,t)=>e.flatMap(({direction:r,stdioItems:n})=>n.filter(s=>s.type===t).map(s=>({...s,direction:r}))),mE=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{Ri.has(t)&&Hd({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})},Hd=({otherStdioItems:e,type:t,value:r,optionName:n,direction:s})=>{let o=e.filter(a=>hE(a,r));if(o.length===0)return;let i=o.find(a=>a.direction!==s);return Yd(i,n,t),s==="output"?o[0].stream:void 0},hE=({type:e,value:t},r)=>e==="filePath"?t.file===r.file:e==="fileUrl"?t.href===r.href:t===r,gE=({otherStdioItems:e,type:t,value:r,optionName:n})=>{let s=e.find(({value:{transform:o}})=>o===r.transform);Yd(s,n,t)},Yd=(e,t,r)=>{if(e!==void 0)throw new TypeError(`The \`${e.optionName}\` and \`${t}\` options must not target ${lt[r]} that is the same.`)};var ys=(e,t,r,n)=>{let o=jd(t,r,n).map((a,c)=>yE({stdioOption:a,fdNumber:c,options:t,isSync:n})),i=TE({initialFileDescriptors:o,addProperties:e,options:t,isSync:n});return t.stdio=i.map(({stdioItems:a})=>kE(a)),i},yE=({stdioOption:e,fdNumber:t,options:r,isSync:n})=>{let s=Rn(t),{stdioItems:o,isStdioArray:i}=bE({stdioOption:e,fdNumber:t,options:r,optionName:s}),a=Pd(o,t,s),c=o.map(f=>Vd({stdioItem:f,isStdioArray:i,fdNumber:t,direction:a,isSync:n})),u=Nd(c,s,a,r),l=Ld(u,a);return EE(u,l),{direction:a,objectMode:l,stdioItems:u}},bE=({stdioOption:e,fdNumber:t,options:r,optionName:n})=>{let o=[...(Array.isArray(e)?e:[e]).map(c=>wE(c,n)),...zd(r,t)],i=Wd(o),a=i.length>1;return SE(i,a,n),vE(i),{stdioItems:i,isStdioArray:a}},wE=(e,t)=>({type:Ed(e,t),value:e,optionName:t}),SE=(e,t,r)=>{if(e.length===0)throw new TypeError(`The \`${r}\` option must not be an empty array.`);if(t){for(let{value:n,optionName:s}of e)if(xE.has(n))throw new Error(`The \`${s}\` option must not include \`${n}\`.`)}},xE=new Set(["ignore","ipc"]),vE=e=>{for(let t of e)_E(t)},_E=({type:e,value:t,optionName:r})=>{if(kd(t))throw new TypeError(`The \`${r}: URL\` option must use the \`file:\` scheme.
49
+ For example, you can use the \`pathToFileURL()\` method of the \`url\` core module.`);if(Cd(e,t))throw new TypeError(`The \`${r}: { file: '...' }\` option must be used instead of \`${r}: '...'\`.`)},EE=(e,t)=>{if(!t)return;let r=e.find(({type:n})=>hs.has(n));if(r!==void 0)throw new TypeError(`The \`${r.optionName}\` option cannot use both files and transforms in objectMode.`)},TE=({initialFileDescriptors:e,addProperties:t,options:r,isSync:n})=>{let s=[];try{for(let o of e)s.push(OE({fileDescriptor:o,fileDescriptors:s,addProperties:t,options:r,isSync:n}));return s}catch(o){throw Ai(s),o}},OE=({fileDescriptor:{direction:e,objectMode:t,stdioItems:r},fileDescriptors:n,addProperties:s,options:o,isSync:i})=>{let a=r.map(c=>RE({stdioItem:c,addProperties:s,direction:e,options:o,fileDescriptors:n,isSync:i}));return{direction:e,objectMode:t,stdioItems:a}},RE=({stdioItem:e,addProperties:t,direction:r,options:n,fileDescriptors:s,isSync:o})=>{let i=Zd({stdioItem:e,direction:r,fileDescriptors:s,isSync:o});return i!==void 0?{...e,stream:i}:{...e,...t[r][e.type](e,n)}},Ai=e=>{for(let{stdioItems:t}of e)for(let{stream:r}of t)r!==void 0&&!De(r)&&r.destroy()},kE=e=>{if(e.length>1)return e.some(({value:n})=>n==="overlapped")?"overlapped":"pipe";let[{type:t,value:r}]=e;return t==="native"?r:"pipe"};var Kd=(e,t)=>ys(AE,e,t,!0),qe=({type:e,optionName:t})=>{Jd(t,lt[e])},CE=({optionName:e,value:t})=>((t==="ipc"||t==="overlapped")&&Jd(e,`"${t}"`),{}),Jd=(e,t)=>{throw new TypeError(`The \`${e}\` option cannot be ${t} with synchronous methods.`)},Xd={generator(){},asyncGenerator:qe,webStream:qe,nodeStream:qe,webTransform:qe,duplex:qe,asyncIterable:qe,native:CE},AE={input:{...Xd,fileUrl:({value:e})=>({contents:[Xe((0,Ii.readFileSync)(e))]}),filePath:({value:{file:e}})=>({contents:[Xe((0,Ii.readFileSync)(e))]}),fileNumber:qe,iterable:({value:e})=>({contents:[...e]}),string:({value:e})=>({contents:[e]}),uint8Array:({value:e})=>({contents:[e]})},output:{...Xd,fileUrl:({value:e})=>({path:e}),filePath:({value:{file:e,append:t}})=>({path:e,append:t}),fileNumber:({value:e})=>({path:e}),iterable:qe,string:qe,uint8Array:qe}};var Qe=(e,{stripFinalNewline:t},r)=>$i(t,r)&&e!==void 0&&!Array.isArray(e)?rr(e):e,$i=(e,t)=>t==="all"?e[1]||e[2]:e[t];var Ur=require("node:stream");var bs=(e,t,r,n)=>e||r?void 0:ep(t,n),Li=(e,t,r)=>r?e.flatMap(n=>Qd(n,t)):Qd(e,t),Qd=(e,t)=>{let{transform:r,final:n}=ep(t,{});return[...r(e),...n()]},ep=(e,t)=>(t.previousChunks="",{transform:IE.bind(void 0,t,e),final:DE.bind(void 0,t)}),IE=function*(e,t,r){if(typeof r!="string"){yield r;return}let{previousChunks:n}=e,s=-1;for(let o=0;o<r.length;o+=1)if(r[o]===`
50
+ `){let i=$E(r,o,t,e),a=r.slice(s+1,o+1-i);n.length>0&&(a=Di(n,a),n=""),yield a,s=o}s!==r.length-1&&(n=Di(n,r.slice(s+1))),e.previousChunks=n},$E=(e,t,r,n)=>r?0:(n.isWindowsNewline=t!==0&&e[t-1]==="\r",n.isWindowsNewline?2:1),DE=function*({previousChunks:e}){e.length>0&&(yield e)},tp=({binary:e,preserveNewlines:t,readableObjectMode:r,state:n})=>e||t||r?void 0:{transform:LE.bind(void 0,n)},LE=function*({isWindowsNewline:e=!1},t){let{unixNewline:r,windowsNewline:n,LF:s,concatBytes:o}=typeof t=="string"?NE:ME;if(t.at(-1)===s){yield t;return}yield o(t,e?n:r)},Di=(e,t)=>`${e}${t}`,NE={windowsNewline:`\r
51
+ `,unixNewline:`
52
+ `,LF:`
53
+ `,concatBytes:Di},PE=(e,t)=>{let r=new Uint8Array(e.length+t.length);return r.set(e,0),r.set(t,e.length),r},ME={windowsNewline:new Uint8Array([13,10]),unixNewline:new Uint8Array([10]),LF:10,concatBytes:PE};var rp=require("node:buffer");var np=(e,t)=>e?void 0:FE.bind(void 0,t),FE=function*(e,t){if(typeof t!="string"&&!K(t)&&!rp.Buffer.isBuffer(t))throw new TypeError(`The \`${e}\` option's transform must use "objectMode: true" to receive as input: ${typeof t}.`);yield t},sp=(e,t)=>e?jE.bind(void 0,t):BE.bind(void 0,t),jE=function*(e,t){op(e,t),yield t},BE=function*(e,t){if(op(e,t),typeof t!="string"&&!K(t))throw new TypeError(`The \`${e}\` option's function must yield a string or an Uint8Array, not ${typeof t}.`);yield t},op=(e,t)=>{if(t==null)throw new TypeError(`The \`${e}\` option's function must not call \`yield ${t}\`.
54
+ Instead, \`yield\` should either be called with a value, or not be called at all. For example:
55
+ if (condition) { yield value; }`)};var ip=require("node:buffer"),ap=require("node:string_decoder");var ws=(e,t,r)=>{if(r)return;if(e)return{transform:UE.bind(void 0,new TextEncoder)};let n=new ap.StringDecoder(t);return{transform:GE.bind(void 0,n),final:qE.bind(void 0,n)}},UE=function*(e,t){ip.Buffer.isBuffer(t)?yield Xe(t):typeof t=="string"?yield e.encode(t):yield t},GE=function*(e,t){yield K(t)?e.write(t):t},qE=function*(e){let t=e.end();t!==""&&(yield t)};var Ni=require("node:util"),Pi=(0,Ni.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}}),Ss=async function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=zE}=t[r];for await(let s of n(e))yield*Ss(s,t,r+1)},cp=async function*(e){for(let[t,{final:r}]of Object.entries(e))yield*VE(r,Number(t),e)},VE=async function*(e,t,r){if(e!==void 0)for await(let n of e())yield*Ss(n,r,t+1)},up=(0,Ni.callbackify)(async({currentIterable:e},t)=>{if(e!==void 0){await(t?e.throw(t):e.return());return}if(t)throw t}),zE=function*(e){yield e};var Mi=(e,t,r,n)=>{try{for(let s of e(...t))r.push(s);n()}catch(s){n(s)}},lp=(e,t)=>[...t.flatMap(r=>[...vt(r,e,0)]),...Br(e)],vt=function*(e,t,r){if(r===t.length){yield e;return}let{transform:n=ZE}=t[r];for(let s of n(e))yield*vt(s,t,r+1)},Br=function*(e){for(let[t,{final:r}]of Object.entries(e))yield*WE(r,Number(t),e)},WE=function*(e,t,r){if(e!==void 0)for(let n of e())yield*vt(n,r,t+1)},ZE=function*(e){yield e};var Fi=({value:e,value:{transform:t,final:r,writableObjectMode:n,readableObjectMode:s},optionName:o},{encoding:i})=>{let a={},c=fp(e,i,o),u=xt(t),l=xt(r),f=u?Pi.bind(void 0,Ss,a):Mi.bind(void 0,vt),p=u||l?Pi.bind(void 0,cp,a):Mi.bind(void 0,Br),d=u||l?up.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,N,P){f([T,c,0],this,P)},flush(T){p([c],this,T)},destroy:d})}},xs=(e,t,r,n)=>{let s=t.filter(({type:i})=>i==="generator"),o=n?s.reverse():s;for(let{value:i,optionName:a}of o){let c=fp(i,r,a);e=lp(c,e)}return e},fp=({transform:e,final:t,binary:r,writableObjectMode:n,readableObjectMode:s,preserveNewlines:o},i,a)=>{let c={};return[{transform:np(n,a)},ws(r,i,n),bs(r,o,n,c),{transform:e,final:t},{transform:sp(s,a)},tp({binary:r,preserveNewlines:o,readableObjectMode:s,state:c})].filter(Boolean)};var dp=(e,t)=>{for(let r of HE(e))YE(e,r,t)},HE=e=>new Set(Object.entries(e).filter(([,{direction:t}])=>t==="input").map(([t])=>Number(t))),YE=(e,t,r)=>{let{stdioItems:n}=e[t],s=n.filter(({contents:a})=>a!==void 0);if(s.length===0)return;if(t!==0){let[{type:a,optionName:c}]=s;throw new TypeError(`Only the \`stdin\` option, not \`${c}\`, can be ${lt[a]} with synchronous methods.`)}let i=s.map(({contents:a})=>a).map(a=>XE(a,n));r.input=Ar(i)},XE=(e,t)=>{let r=xs(e,t,"utf8",!0);return KE(r),Ar(r)},KE=e=>{let t=e.find(r=>typeof r!="string"&&!K(r));if(t!==void 0)throw new TypeError(`The \`stdin\` option is invalid: when passing objects as input, a transform must be used to serialize them to strings or Uint8Arrays: ${t}.`)};var _s=require("node:fs");var vs=({stdioItems:e,encoding:t,verboseInfo:r,fdNumber:n})=>n!=="all"&&Yt(r,n)&&!me.has(t)&&JE(n)&&(e.some(({type:s,value:o})=>s==="native"&&QE.has(o))||e.every(({type:s})=>_e.has(s))),JE=e=>e===1||e===2,QE=new Set(["pipe","overlapped"]),pp=async(e,t,r,n)=>{for await(let s of e)e0(t)||hp(s,r,n)},mp=(e,t,r)=>{for(let n of e)hp(n,t,r)},e0=e=>e._readableState.pipes.length>0,hp=(e,t,r)=>{let n=Ln(e);je({type:"output",verboseMessage:n,fdNumber:t,verboseInfo:r})};var gp=({fileDescriptors:e,syncResult:{output:t},options:r,isMaxBuffer:n,verboseInfo:s})=>{if(t===null)return{output:Array.from({length:3})};let o={},i=new Set([]);return{output:t.map((c,u)=>t0({result:c,fileDescriptors:e,fdNumber:u,state:o,outputFiles:i,isMaxBuffer:n,verboseInfo:s},r)),...o}},t0=({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=md(e,o,f),d=Xe(p),{stdioItems:b,objectMode:T}=t[r],N=r0([d],b,c,n),{serializedResult:P,finalResult:j=P}=n0({chunks:N,objectMode:T,encoding:c,lines:u,stripFinalNewline:l,fdNumber:r});s0({serializedResult:P,fdNumber:r,state:n,verboseInfo:i,encoding:c,stdioItems:b,objectMode:T});let Y=a[r]?j:void 0;try{return n.error===void 0&&o0(P,b,s),Y}catch(X){return n.error=X,Y}},r0=(e,t,r,n)=>{try{return xs(e,t,r,!1)}catch(s){return n.error=s,e}},n0=({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=ru(e,r);return n[o]?{serializedResult:i,finalResult:Li(i,!s[o],t)}:{serializedResult:i}},s0=({serializedResult:e,fdNumber:t,state:r,verboseInfo:n,encoding:s,stdioItems:o,objectMode:i})=>{if(!vs({stdioItems:o,encoding:s,verboseInfo:n,fdNumber:t}))return;let a=Li(e,!1,i);try{mp(a,t,n)}catch(c){r.error??=c}},o0=(e,t,r)=>{for(let{path:n,append:s}of t.filter(({type:o})=>hs.has(o))){let o=typeof n=="string"?n:n.toString();s||r.has(o)?(0,_s.appendFileSync)(n,e):(r.add(o),(0,_s.writeFileSync)(n,e))}};var yp=([,e,t],r)=>{if(r.all)return e===void 0?t:t===void 0?e:Array.isArray(e)?Array.isArray(t)?[...e,...t]:[...e,Qe(t,r,"all")]:Array.isArray(t)?[Qe(e,r,"all"),...t]:K(e)&&K(t)?Fo([e,t]):`${e}${t}`};var Es=require("node:events");var bp=async(e,t)=>{let[r,n]=await i0(e);return t.isForcefullyTerminated??=!1,[r,n]},i0=async e=>{let[t,r]=await Promise.allSettled([(0,Es.once)(e,"spawn"),(0,Es.once)(e,"exit")]);return t.status==="rejected"?[]:r.status==="rejected"?wp(e):r.value},wp=async e=>{try{return await(0,Es.once)(e,"exit")}catch{return wp(e)}},Sp=async e=>{let[t,r]=await e;if(!a0(t,r)&&ji(t,r))throw new Le;return[t,r]},a0=(e,t)=>e===void 0&&t===void 0,ji=(e,t)=>e!==0||t!==null;var xp=({error:e,status:t,signal:r,output:n},{maxBuffer:s})=>{let o=c0(e,t,r),i=(o==null?void 0:o.code)==="ETIMEDOUT",a=pd(o,n,s);return{resultError:o,exitCode:t,signal:r,timedOut:i,isMaxBuffer:a}},c0=(e,t,r)=>e!==void 0?e:ji(t,r)?new Le:void 0;var _p=(e,t,r)=>{let{file:n,commandArguments:s,command:o,escapedCommand:i,startTime:a,verboseInfo:c,options:u,fileDescriptors:l}=u0(e,t,r),f=d0({file:n,commandArguments:s,options:u,command:o,escapedCommand:i,verboseInfo:c,fileDescriptors:l,startTime:a});return or(f,c,u)},u0=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Pn(e,t,r),a=l0(r),{file:c,commandArguments:u,options:l}=ns(e,t,a);f0(l);let f=Kd(l,i);return{file:c,commandArguments:u,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},l0=e=>e.node&&!e.ipc?{...e,ipc:!1}:e,f0=({ipc:e,ipcInput:t,detached:r,cancelSignal:n})=>{t&&Ts("ipcInput"),e&&Ts("ipc: true"),r&&Ts("detached: true"),n&&Ts("cancelSignal")},Ts=e=>{throw new TypeError(`The "${e}" option cannot be used with synchronous methods.`)},d0=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,verboseInfo:o,fileDescriptors:i,startTime:a})=>{let c=p0({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}=xp(c,r),{output:b,error:T=u}=gp({fileDescriptors:i,syncResult:c,options:r,isMaxBuffer:d,verboseInfo:o}),N=b.map((j,Y)=>Qe(j,r,Y)),P=Qe(yp(b,r),r,"all");return h0({error:T,exitCode:l,signal:f,timedOut:p,isMaxBuffer:d,stdio:N,all:P,options:r,command:n,escapedCommand:s,startTime:a})},p0=({file:e,commandArguments:t,options:r,command:n,escapedCommand:s,fileDescriptors:o,startTime:i})=>{try{dp(o,r);let a=m0(r);return(0,vp.spawnSync)(e,t,a)}catch(a){return sr({error:a,command:n,escapedCommand:s,fileDescriptors:o,options:r,startTime:i,isSync:!0})}},m0=({encoding:e,maxBuffer:t,...r})=>({...r,encoding:"buffer",maxBuffer:fs(t)}),h0=({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?ds({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 Im=require("node:events"),$m=require("node:child_process");var Ui=q(require("node:process"),1);var ar=require("node:events");var Ep=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0,filter:o}={})=>(Qt({methodName:"getOneMessage",isSubprocess:r,ipc:n,isConnected:Xn(e)}),g0({anyProcess:e,channel:t,isSubprocess:r,filter:o,reference:s})),g0=async({anyProcess:e,channel:t,isSubprocess:r,filter:n,reference:s})=>{Wn(t,s);let o=ut(e,t,r),i=new AbortController;try{return await Promise.race([y0(o,n,i),b0(o,r,i),w0(o,r,i)])}catch(a){throw er(e),a}finally{i.abort(),Zn(t,s)}},y0=async(e,t,{signal:r})=>{if(t===void 0){let[n]=await(0,ar.once)(e,"message",{signal:r});return n}for await(let[n]of(0,ar.on)(e,"message",{signal:r}))if(t(n))return n},b0=async(e,t,{signal:r})=>{await(0,ar.once)(e,"disconnect",{signal:r}),Wl(t)},w0=async(e,t,{signal:r})=>{let[n]=await(0,ar.once)(e,"strict:error",{signal:r});throw qn(n,t)};var Gr=require("node:events");var Op=({anyProcess:e,channel:t,isSubprocess:r,ipc:n},{reference:s=!0}={})=>Bi({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:!r,reference:s}),Bi=({anyProcess:e,channel:t,isSubprocess:r,ipc:n,shouldAwait:s,reference:o})=>{Qt({methodName:"getEachMessage",isSubprocess:r,ipc:n,isConnected:Xn(e)}),Wn(t,o);let i=ut(e,t,r),a=new AbortController,c={};return S0(e,i,a),x0({ipcEmitter:i,isSubprocess:r,controller:a,state:c}),v0({anyProcess:e,channel:t,ipcEmitter:i,isSubprocess:r,shouldAwait:s,controller:a,state:c,reference:o})},S0=async(e,t,r)=>{try{await(0,Gr.once)(t,"disconnect",{signal:r.signal}),r.abort()}catch{}},x0=async({ipcEmitter:e,isSubprocess:t,controller:r,state:n})=>{try{let[s]=await(0,Gr.once)(e,"strict:error",{signal:r.signal});n.error=qn(s,t),r.abort()}catch{}},v0=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}))Tp(i),yield c}catch{Tp(i)}finally{o.abort(),Zn(t,a),n||er(e),s&&await e}},Tp=({error:e})=>{if(e)throw e};var Rp=(e,{ipc:t})=>{Object.assign(e,Cp(e,!1,t))},kp=()=>{let e=Ui.default,t=!0,r=Ui.default.channel!==void 0;return{...Cp(e,t,r),getCancelSignal:Rf.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})}},Cp=(e,t,r)=>({sendMessage:es.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getOneMessage:Ep.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r}),getEachMessage:Op.bind(void 0,{anyProcess:e,channel:e.channel,isSubprocess:t,ipc:r})});var Ap=require("node:child_process"),ft=require("node:stream");var Ip=({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,verboseInfo:i})=>{Ai(n);let a=new Ap.ChildProcess;_0(a,n),Object.assign(a,{readable:E0,writable:T0,duplex:O0});let c=sr({error:e,command:t,escapedCommand:r,fileDescriptors:n,options:s,startTime:o,isSync:!1}),u=R0(c,i,s);return{subprocess:a,promise:u}},_0=(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},E0=()=>new ft.Readable({read(){}}),T0=()=>new ft.Writable({write(){}}),O0=()=>new ft.Duplex({read(){},write(){}}),R0=async(e,t,r)=>or(e,t,r);var cr=require("node:fs"),Dp=require("node:buffer"),Ve=require("node:stream");var Lp=(e,t)=>ys(k0,e,t,!1),Vr=({type:e,optionName:t})=>{throw new TypeError(`The \`${t}\` option cannot be ${lt[e]}.`)},$p={fileNumber:Vr,generator:Fi,asyncGenerator:Fi,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(){}},k0={input:{...$p,fileUrl:({value:e})=>({stream:(0,cr.createReadStream)(e)}),filePath:({value:{file:e}})=>({stream:(0,cr.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(Dp.Buffer.from(e))})},output:{...$p,fileUrl:({value:e})=>({stream:(0,cr.createWriteStream)(e)}),filePath:({value:{file:e,append:t}})=>({stream:(0,cr.createWriteStream)(e,t?{flags:"a"}:{})}),webStream:({value:e})=>({stream:Ve.Writable.fromWeb(e)}),iterable:Vr,asyncIterable:Vr,string:Vr,uint8Array:Vr}};var zr=require("node:events"),Rs=require("node:stream"),Vi=require("node:stream/promises");function _t(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let s of e)qi(s);let t=e.some(({readableObjectMode:s})=>s),r=C0(e,t),n=new Gi({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let s of e)n.add(s);return n}var C0=(e,t)=>{if(e.length===0)return(0,Rs.getDefaultHighWaterMark)(t);let r=e.filter(({readableObjectMode:n})=>n===t).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},Gi=class extends Rs.PassThrough{#t=new Set([]);#r=new Set([]);#e=new Set([]);#n;#o=Symbol("unpipe");#s=new WeakMap;add(t){if(qi(t),this.#t.has(t))return;this.#t.add(t),this.#n??=A0(this,this.#t,this.#o);let r=D0({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(qi(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)}},A0=async(e,t,r)=>{Os(e,Np);let n=new AbortController;try{await Promise.race([I0(e,n),$0(e,t,r,n)])}finally{n.abort(),Os(e,-Np)}},I0=async(e,{signal:t})=>{try{await(0,Vi.finished)(e,{signal:t,cleanup:!0})}catch(r){throw Mp(e,r),r}},$0=async(e,t,r,{signal:n})=>{for await(let[s]of(0,zr.on)(e,"unpipe",{signal:n}))t.has(s)&&s.emit(r)},qi=e=>{if(typeof(e==null?void 0:e.pipe)!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},D0=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,onFinished:o,unpipeEvent:i})=>{Os(e,Pp);let a=new AbortController;try{await Promise.race([L0(o,t,a),N0({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:a}),P0({stream:t,streams:r,ended:n,aborted:s,unpipeEvent:i,controller:a})])}finally{a.abort(),Os(e,-Pp)}r.size>0&&r.size===n.size+s.size&&(n.size===0&&s.size>0?zi(e):M0(e))},L0=async(e,t,{signal:r})=>{try{await e,r.aborted||zi(t)}catch(n){r.aborted||Mp(t,n)}},N0=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:s,controller:{signal:o}})=>{try{await(0,Vi.finished)(t,{signal:o,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(i){if(o.aborted||!r.has(t))return;Fp(i)?s.add(t):jp(e,i)}},P0=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)},M0=e=>{e.writable&&e.end()},Mp=(e,t)=>{Fp(t)?zi(e):jp(e,t)},Fp=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",zi=e=>{(e.readable||e.writable)&&e.destroy()},jp=(e,t)=>{e.destroyed||(e.once("error",F0),e.destroy(t))},F0=()=>{},Os=(e,t)=>{let r=e.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},Np=2,Pp=1;var Wi=require("node:stream/promises");var ur=(e,t)=>{e.pipe(t),j0(e,t),B0(e,t)},j0=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Wi.finished)(e,{cleanup:!0,readable:!0,writable:!1})}catch{}Zi(t)}},Zi=e=>{e.writable&&e.end()},B0=async(e,t)=>{if(!(De(e)||De(t))){try{await(0,Wi.finished)(t,{cleanup:!0,readable:!1,writable:!0})}catch{}Hi(e)}},Hi=e=>{e.readable&&e.destroy()};var Bp=(e,t,r)=>{let n=new Map;for(let[s,{stdioItems:o,direction:i}]of Object.entries(t)){for(let{stream:a}of o.filter(({type:c})=>_e.has(c)))U0(e,a,i,s);for(let{stream:a}of o.filter(({type:c})=>!_e.has(c)))q0({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]:_t(o);ur(i,s)}},U0=(e,t,r,n)=>{r==="output"?ur(e.stdio[n],t):ur(t,e.stdio[n]);let s=G0[n];s!==void 0&&(e[s]=t),e.stdio[n]=t},G0=["stdin","stdout","stderr"],q0=({subprocess:e,stream:t,direction:r,fdNumber:n,pipeGroups:s,controller:o})=>{if(t===void 0)return;V0(t,o);let[i,a]=r==="output"?[t,e.stdio[n]]:[e.stdio[n],t],c=s.get(i)??[];s.set(i,[...c,a])},V0=(e,{signal:t})=>{De(e)&&wt(e,z0,t)},z0=2;var Gp=require("node:events");var Et=[];Et.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&Et.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Et.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var ks=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",Yi=Symbol.for("signal-exit emitter"),Xi=globalThis,W0=Object.defineProperty.bind(Object),Ki=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Xi[Yi])return Xi[Yi];W0(Xi,Yi,{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}},Cs=class{},Z0=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),Ji=class extends Cs{onExit(){return()=>{}}load(){}unload(){}},Qi=class extends Cs{#t=ea.platform==="win32"?"SIGINT":"SIGHUP";#r=new Ki;#e;#n;#o;#s={};#i=!1;constructor(t){super(),this.#e=t,this.#s={};for(let r of Et)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(!ks(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 Et)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,Et.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 ks(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"&&ks(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)}},ea=globalThis.process,{onExit:Up,load:Dj,unload:Lj}=Z0(ks(ea)?new Qi(ea):new Ji);var qp=(e,{cleanup:t,detached:r},{signal:n})=>{if(!t||r)return;let s=Up(()=>{e.kill()});(0,Gp.addAbortListener)(n,()=>{s()})};var zp=({source:e,sourcePromise:t,boundOptions:r,createNested:n},...s)=>{let o=Nn(),{destination:i,destinationStream:a,destinationError:c,from:u,unpipeSignal:l}=H0(r,n,s),{sourceStream:f,sourceError:p}=X0(e,u),{options:d,fileDescriptors:b}=Ue.get(e);return{sourcePromise:t,sourceStream:f,sourceOptions:d,sourceError:p,destination:i,destinationStream:a,destinationError:c,unpipeSignal:l,fileDescriptors:b,startTime:o}},H0=(e,t,r)=>{try{let{destination:n,pipeOptions:{from:s,to:o,unpipeSignal:i}={}}=Y0(e,t,...r),a=zn(n,o);return{destination:n,destinationStream:a,from:s,unpipeSignal:i}}catch(n){return{destinationError:n}}},Y0=(e,t,r,...n)=>{if(Array.isArray(r))return{destination:t(Vp,e)(r,...n),pipeOptions:e};if(typeof r=="string"||r instanceof URL||Po(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]=_n(r,...n);return{destination:t(Vp)(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}`)},Vp=({options:e})=>({options:{...e,stdin:"pipe",piped:!0}}),X0=(e,t)=>{try{return{sourceStream:tr(e,t)}}catch(r){return{sourceError:r}}};var Zp=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n,fileDescriptors:s,sourceOptions:o,startTime:i})=>{let a=K0({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n});if(a!==void 0)throw ta({error:a,fileDescriptors:s,sourceOptions:o,startTime:i})},K0=({sourceStream:e,sourceError:t,destinationStream:r,destinationError:n})=>{if(t!==void 0&&n!==void 0)return n;if(n!==void 0)return Hi(e),n;if(t!==void 0)return Zi(r),t},ta=({error:e,fileDescriptors:t,sourceOptions:r,startTime:n})=>sr({error:e,command:Wp,escapedCommand:Wp,fileDescriptors:t,options:r,startTime:n,isSync:!1}),Wp="source.pipe(destination)";var Hp=async e=>{let[{status:t,reason:r,value:n=r},{status:s,reason:o,value:i=o}]=await e;if(i.pipedFrom.includes(n)||i.pipedFrom.push(n),s==="rejected")throw i;if(t==="rejected")throw n;return i};var Yp=require("node:stream/promises");var Xp=(e,t,r)=>{let n=As.has(t)?Q0(e,t):J0(e,t);return wt(e,tT,r.signal),wt(t,rT,r.signal),eT(t),n},J0=(e,t)=>{let r=_t([e]);return ur(r,t),As.set(t,r),r},Q0=(e,t)=>{let r=As.get(t);return r.add(e),r},eT=async e=>{try{await(0,Yp.finished)(e,{cleanup:!0,readable:!1,writable:!0})}catch{}As.delete(e)},As=new WeakMap,tT=2,rT=1;var Kp=require("node:util");var Jp=(e,t)=>e===void 0?[]:[nT(e,t)],nT=async(e,{sourceStream:t,mergedStream:r,fileDescriptors:n,sourceOptions:s,startTime:o})=>{await(0,Kp.aborted)(e,t),await r.remove(t);let i=new Error("Pipe canceled by `unpipeSignal` option.");throw ta({error:i,fileDescriptors:n,sourceOptions:s,startTime:o})};var Is=(e,...t)=>{if(W(t[0]))return Is.bind(void 0,{...e,boundOptions:{...e.boundOptions,...t[0]}});let{destination:r,...n}=zp(e,...t),s=sT({...n,destination:r});return s.pipe=Is.bind(void 0,{...e,source:r,sourcePromise:s,boundOptions:{}}),s},sT=async({sourcePromise:e,sourceStream:t,sourceOptions:r,sourceError:n,destination:s,destinationStream:o,destinationError:i,unpipeSignal:a,fileDescriptors:c,startTime:u})=>{let l=oT(e,s);Zp({sourceStream:t,sourceError:n,destinationStream:o,destinationError:i,fileDescriptors:c,sourceOptions:r,startTime:u});let f=new AbortController;try{let p=Xp(t,o,f);return await Promise.race([Hp(l),...Jp(a,{sourceStream:t,mergedStream:p,sourceOptions:r,fileDescriptors:c,startTime:u})])}finally{f.abort()}},oT=(e,t)=>Promise.allSettled([e,t]);var nm=require("node:timers/promises");var em=require("node:events"),tm=require("node:stream");var $s=({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:n,encoding:s,preserveNewlines:o})=>{let i=new AbortController;return iT(t,i),rm({stream:e,controller:i,binary:r,shouldEncode:!e.readableObjectMode&&n,encoding:s,shouldSplit:!e.readableObjectMode,preserveNewlines:o})},iT=async(e,t)=>{try{await e}catch{}finally{t.abort()}},ra=({stream:e,onStreamEnd:t,lines:r,encoding:n,stripFinalNewline:s,allMixed:o})=>{let i=new AbortController;aT(t,i,e);let a=e.readableObjectMode&&!o;return rm({stream:e,controller:i,binary:n==="buffer",shouldEncode:!a,encoding:n,shouldSplit:!a&&r,preserveNewlines:!s})},aT=async(e,t,r)=>{try{await e}catch{r.destroy()}finally{t.abort()}},rm=({stream:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})=>{let a=(0,em.on)(e,"data",{signal:t.signal,highWaterMark:Qp,highWatermark:Qp});return cT({onStdoutChunk:a,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i})},na=(0,tm.getDefaultHighWaterMark)(!0),Qp=na,cT=async function*({onStdoutChunk:e,controller:t,binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i}){let a=uT({binary:r,shouldEncode:n,encoding:s,shouldSplit:o,preserveNewlines:i});try{for await(let[c]of e)yield*vt(c,a,0)}catch(c){if(!t.signal.aborted)throw c}finally{yield*Br(a)}},uT=({binary:e,shouldEncode:t,encoding:r,shouldSplit:n,preserveNewlines:s})=>[ws(e,r,!t),bs(e,s,!n,{})].filter(Boolean);var sm=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,buffer:s,maxBuffer:o,lines:i,allMixed:a,stripFinalNewline:c,verboseInfo:u,streamInfo:l})=>{let f=lT({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:a,verboseInfo:u,streamInfo:l});if(!s){await Promise.all([fT(e),f]);return}let p=$i(c,r),d=ra({stream:e,onStreamEnd:t,lines:i,encoding:n,stripFinalNewline:p,allMixed:a}),[b]=await Promise.all([dT({stream:e,iterable:d,fdNumber:r,encoding:n,maxBuffer:o,lines:i}),f]);return b},lT=async({stream:e,onStreamEnd:t,fdNumber:r,encoding:n,allMixed:s,verboseInfo:o,streamInfo:{fileDescriptors:i}})=>{var c;if(!vs({stdioItems:(c=i[r])==null?void 0:c.stdioItems,encoding:n,verboseInfo:o,fdNumber:r}))return;let a=ra({stream:e,onStreamEnd:t,lines:!0,encoding:n,stripFinalNewline:!0,allMixed:s});await pp(a,e,r,o)},fT=async e=>{await(0,nm.setImmediate)(),e.readableFlowing===null&&e.resume()},dT=async({stream:e,stream:{readableObjectMode:t},iterable:r,fdNumber:n,encoding:s,maxBuffer:o,lines:i})=>{try{return t||i?await as(r,{maxBuffer:o}):s==="buffer"?new Uint8Array(await cs(r,{maxBuffer:o})):await ls(r,{maxBuffer:o})}catch(a){return om(ld({error:a,stream:e,readableObjectMode:t,lines:i,encoding:s,fdNumber:n}))}},sa=async e=>{try{return await e}catch(t){return om(t)}},om=({bufferedData:e})=>eu(e)?new Uint8Array(e):e;var am=require("node:stream/promises"),Wr=async(e,t,r,{isSameDirection:n,stopOnExit:s=!1}={})=>{let o=pT(e,r),i=new AbortController;try{await Promise.race([...s?[r.exitPromise]:[],(0,am.finished)(e,{cleanup:!0,signal:i.signal})])}catch(a){o.stdinCleanedUp||gT(a,t,r,n)}finally{i.abort()}},pT=(e,{originalStreams:[t],subprocess:r})=>{let n={stdinCleanedUp:!1};return e===t&&mT(e,r,n),n},mT=(e,t,r)=>{let{_destroy:n}=e;e._destroy=(...s)=>{hT(t,r),n.call(e,...s)}},hT=({exitCode:e,signalCode:t},r)=>{(e!==null||t!==null)&&(r.stdinCleanedUp=!0)},gT=(e,t,r,n)=>{if(!yT(e,t,r,n))throw e},yT=(e,t,r,n=!0)=>r.propagating?im(e)||Ds(e):(r.propagating=!0,oa(r,t)===n?im(e):Ds(e)),oa=({fileDescriptors:e},t)=>t!=="all"&&e[t].direction==="input",Ds=e=>(e==null?void 0:e.code)==="ERR_STREAM_PREMATURE_CLOSE",im=e=>(e==null?void 0:e.code)==="EPIPE";var cm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>e.stdio.map((c,u)=>ia({stream:c,fdNumber:u,encoding:t,buffer:r[u],maxBuffer:n[u],lines:s[u],allMixed:!1,stripFinalNewline:o,verboseInfo:i,streamInfo:a})),ia=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(oa(u,t)){await l;return}let[f]=await Promise.all([sm({stream:e,onStreamEnd:l,fdNumber:t,encoding:r,buffer:n,maxBuffer:s,lines:o,allMixed:i,stripFinalNewline:a,verboseInfo:c,streamInfo:u}),l]);return f};var um=({stdout:e,stderr:t},{all:r})=>r&&(e||t)?_t([e,t].filter(Boolean)):void 0,lm=({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:o,verboseInfo:i,streamInfo:a})=>ia({...bT(e,r),fdNumber:"all",encoding:t,maxBuffer:n[1]+n[2],lines:s[1]||s[2],allMixed:wT(e),stripFinalNewline:o,verboseInfo:i,streamInfo:a}),bT=({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}},wT=({all:e,stdout:t,stderr:r})=>e&&t&&r&&t.readableObjectMode!==r.readableObjectMode;var hm=require("node:events");var fm=e=>Yt(e,"ipc"),dm=(e,t)=>{let r=Ln(e);je({type:"ipc",verboseMessage:r,fdNumber:"ipc",verboseInfo:t})};var pm=async({subprocess:e,buffer:t,maxBuffer:r,ipc:n,ipcOutput:s,verboseInfo:o})=>{if(!n)return s;let i=fm(o),a=Ke(t,"ipc"),c=Ke(r,"ipc");for await(let u of Bi({anyProcess:e,channel:e.channel,isSubprocess:!1,ipc:n,shouldAwait:!1,reference:!0}))a&&(fd(e,s,c),s.push(u)),i&&dm(u,o);return s},mm=async(e,t)=>(await Promise.allSettled([e]),t);var gm=async({subprocess:e,options:{encoding:t,buffer:r,maxBuffer:n,lines:s,timeoutDuration:o,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,stripFinalNewline:u,ipc:l,ipcInput:f},context:p,verboseInfo:d,fileDescriptors:b,originalStreams:T,onInternalError:N,controller:P})=>{let j=bp(e,p),Y={originalStreams:T,fileDescriptors:b,subprocess:e,exitPromise:j,propagating:!1},X=cm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:d,streamInfo:Y}),Se=lm({subprocess:e,encoding:t,buffer:r,maxBuffer:n,lines:s,stripFinalNewline:u,verboseInfo:d,streamInfo:Y}),ce=[],Ae=pm({subprocess:e,buffer:r,maxBuffer:n,ipc:l,ipcOutput:ce,verboseInfo:d}),Ie=ST(T,e,Y),xe=xT(b,Y);try{return await Promise.race([Promise.all([{},Sp(j),Promise.all(X),Se,Ae,Ff(e,f),...Ie,...xe]),N,vT(e,P),...Df(e,o,p,P),...zl({subprocess:e,cancelSignal:i,gracefulCancel:a,context:p,controller:P}),...Af({subprocess:e,cancelSignal:i,gracefulCancel:a,forceKillAfterDelay:c,context:p,controller:P})])}catch(kr){return p.terminationReason??="other",Promise.all([{error:kr},j,Promise.all(X.map(bt=>sa(bt))),sa(Se),mm(Ae,ce),Promise.allSettled(Ie),Promise.allSettled(xe)])}},ST=(e,t,r)=>e.map((n,s)=>n===t.stdio[s]?void 0:Wr(n,s,r)),xT=(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"}))),vT=async(e,{signal:t})=>{let[r]=await(0,hm.once)(e,"error",{signal:t});throw r};var ym=()=>({readableDestroy:new WeakMap,writableFinal:new WeakMap,writableDestroy:new WeakMap}),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}},lr=async({resolve:e,promises:t},r)=>{e();let[n]=await Promise.race([Promise.allSettled([!0,r]),Promise.all([!1,...t])]);return!n};var wm=require("node:stream"),Sm=require("node:util");var aa=require("node:stream/promises");var ca=async e=>{if(e!==void 0)try{await ua(e)}catch{}},bm=async e=>{if(e!==void 0)try{await la(e)}catch{}},ua=async e=>{await(0,aa.finished)(e,{cleanup:!0,readable:!1,writable:!0})},la=async e=>{await(0,aa.finished)(e,{cleanup:!0,readable:!0,writable:!1})},Ls=async(e,t)=>{if(await e,t)throw t},Ns=(e,t,r)=>{r&&!Ds(r)?e.destroy(r):t&&e.destroy()};var xm=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,binary:s=!0,preserveNewlines:o=!0}={})=>{let i=s||me.has(r),{subprocessStdout:a,waitReadableDestroy:c}=fa(e,n,t),{readableEncoding:u,readableObjectMode:l,readableHighWaterMark:f}=da(a,i),{read:p,onStdoutDataDone:d}=pa({subprocessStdout:a,subprocess:e,binary:i,encoding:r,preserveNewlines:o}),b=new wm.Readable({read:p,destroy:(0,Sm.callbackify)(ha.bind(void 0,{subprocessStdout:a,subprocess:e,waitReadableDestroy:c})),highWaterMark:f,objectMode:l,encoding:u});return ma({subprocessStdout:a,onStdoutDataDone:d,readable:b,subprocess:e}),b},fa=(e,t,r)=>{let n=tr(e,t),s=Zr(r,n,"readableDestroy");return{subprocessStdout:n,waitReadableDestroy:s}},da=({readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r},n)=>n?{readableEncoding:e,readableObjectMode:t,readableHighWaterMark:r}:{readableEncoding:e,readableObjectMode:!0,readableHighWaterMark:na},pa=({subprocessStdout:e,subprocess:t,binary:r,encoding:n,preserveNewlines:s})=>{let o=Be(),i=$s({subprocessStdout:e,subprocess:t,binary:r,shouldEncode:!r,encoding:n,preserveNewlines:s});return{read(){_T(this,i,o)},onStdoutDataDone:o}},_T=async(e,t,r)=>{try{let{value:n,done:s}=await t.next();s?r.resolve():e.push(n)}catch{}},ma=async({subprocessStdout:e,onStdoutDataDone:t,readable:r,subprocess:n,subprocessStdin:s})=>{try{await la(e),await n,await ca(s),await t,r.readable&&r.push(null)}catch(o){await ca(s),vm(r,o)}},ha=async({subprocessStdout:e,subprocess:t,waitReadableDestroy:r},n)=>{await lr(r,t)&&(vm(e,n),await Ls(t,n))},vm=(e,t)=>{Ns(e,e.readable,t)};var _m=require("node:stream"),ga=require("node:util");var Em=({subprocess:e,concurrentStreams:t},{to:r}={})=>{let{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}=ya(e,r,t),i=new _m.Writable({...ba(n,e,s),destroy:(0,ga.callbackify)(Sa.bind(void 0,{subprocessStdin:n,subprocess:e,waitWritableFinal:s,waitWritableDestroy:o})),highWaterMark:n.writableHighWaterMark,objectMode:n.writableObjectMode});return wa(n,i),i},ya=(e,t,r)=>{let n=zn(e,t),s=Zr(r,n,"writableFinal"),o=Zr(r,n,"writableDestroy");return{subprocessStdin:n,waitWritableFinal:s,waitWritableDestroy:o}},ba=(e,t,r)=>({write:ET.bind(void 0,e),final:(0,ga.callbackify)(TT.bind(void 0,e,t,r))}),ET=(e,t,r,n)=>{e.write(t,r)?n():e.once("drain",n)},TT=async(e,t,r)=>{await lr(r,t)&&(e.writable&&e.end(),await t)},wa=async(e,t,r)=>{try{await ua(e),t.writable&&t.end()}catch(n){await bm(r),Tm(t,n)}},Sa=async({subprocessStdin:e,subprocess:t,waitWritableFinal:r,waitWritableDestroy:n},s)=>{await lr(r,t),await lr(n,t)&&(Tm(e,s),await Ls(t,s))},Tm=(e,t)=>{Ns(e,e.writable,t)};var Om=require("node:stream"),Rm=require("node:util");var km=({subprocess:e,concurrentStreams:t,encoding:r},{from:n,to:s,binary:o=!0,preserveNewlines:i=!0}={})=>{let a=o||me.has(r),{subprocessStdout:c,waitReadableDestroy:u}=fa(e,n,t),{subprocessStdin:l,waitWritableFinal:f,waitWritableDestroy:p}=ya(e,s,t),{readableEncoding:d,readableObjectMode:b,readableHighWaterMark:T}=da(c,a),{read:N,onStdoutDataDone:P}=pa({subprocessStdout:c,subprocess:e,binary:a,encoding:r,preserveNewlines:i}),j=new Om.Duplex({read:N,...ba(l,e,f),destroy:(0,Rm.callbackify)(OT.bind(void 0,{subprocessStdout:c,subprocessStdin:l,subprocess:e,waitReadableDestroy:u,waitWritableFinal:f,waitWritableDestroy:p})),readableHighWaterMark:T,writableHighWaterMark:l.writableHighWaterMark,readableObjectMode:b,writableObjectMode:l.writableObjectMode,encoding:d});return ma({subprocessStdout:c,onStdoutDataDone:P,readable:j,subprocess:e,subprocessStdin:l}),wa(l,j,c),j},OT=async({subprocessStdout:e,subprocessStdin:t,subprocess:r,waitReadableDestroy:n,waitWritableFinal:s,waitWritableDestroy:o},i)=>{await Promise.all([ha({subprocessStdout:e,subprocess:r,waitReadableDestroy:n},i),Sa({subprocessStdin:t,subprocess:r,waitWritableFinal:s,waitWritableDestroy:o},i)])};var xa=(e,t,{from:r,binary:n=!1,preserveNewlines:s=!1}={})=>{let o=n||me.has(t),i=tr(e,r),a=$s({subprocessStdout:i,subprocess:e,binary:o,shouldEncode:!0,encoding:t,preserveNewlines:s});return RT(a,i,e)},RT=async function*(e,t,r){try{yield*e}finally{t.readable&&t.destroy(),await r}};var Cm=(e,{encoding:t})=>{let r=ym();e.readable=xm.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.writable=Em.bind(void 0,{subprocess:e,concurrentStreams:r}),e.duplex=km.bind(void 0,{subprocess:e,concurrentStreams:r,encoding:t}),e.iterable=xa.bind(void 0,e,t),e[Symbol.asyncIterator]=xa.bind(void 0,e,t,{})};var Am=(e,t)=>{for(let[r,n]of CT){let s=n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:s})}},kT=(async()=>{})().constructor.prototype,CT=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(kT,e)]);var Dm=(e,t,r,n)=>{let{file:s,commandArguments:o,command:i,escapedCommand:a,startTime:c,verboseInfo:u,options:l,fileDescriptors:f}=AT(e,t,r),{subprocess:p,promise:d}=$T({file:s,commandArguments:o,options:l,startTime:c,verboseInfo:u,command:i,escapedCommand:a,fileDescriptors:f});return p.pipe=Is.bind(void 0,{source:p,sourcePromise:d,boundOptions:{},createNested:n}),Am(p,d),Ue.set(p,{options:l,fileDescriptors:f}),p},AT=(e,t,r)=>{let{command:n,escapedCommand:s,startTime:o,verboseInfo:i}=Pn(e,t,r),{file:a,commandArguments:c,options:u}=ns(e,t,r),l=IT(u),f=Lp(l,i);return{file:a,commandArguments:c,command:n,escapedCommand:s,startTime:o,verboseInfo:i,options:l,fileDescriptors:f}},IT=({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}},$T=({file:e,commandArguments:t,options:r,startTime:n,verboseInfo:s,command:o,escapedCommand:i,fileDescriptors:a})=>{let c;try{c=(0,$m.spawn)(e,t,r)}catch(b){return Ip({error:b,command:o,escapedCommand:i,fileDescriptors:a,options:r,startTime:n,verboseInfo:s})}let u=new AbortController;(0,Im.setMaxListeners)(Number.POSITIVE_INFINITY,u.signal);let l=[...c.stdio];Bp(c,a,u),qp(c,r,u);let f={},p=Be();c.kill=Gl.bind(void 0,{kill:c.kill.bind(c),options:r,onInternalError:p,context:f,controller:u}),c.all=um(c,r),Cm(c,r),Rp(c,r);let d=DT({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}},DT=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],b,T,N]=await gm({subprocess:e,options:t,context:c,verboseInfo:n,fileDescriptors:s,originalStreams:o,onInternalError:u,controller:l});l.abort(),u.resolve();let P=b.map((X,Se)=>Qe(X,t,Se)),j=Qe(T,t,"all"),Y=LT({errorInfo:f,exitCode:p,signal:d,stdio:P,all:j,ipcOutput:N,context:c,options:t,command:i,escapedCommand:a,startTime:r});return or(Y,n,t)},LT=({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 Ge,isForcefullyTerminated:i.isForcefullyTerminated,exitCode:t,signal:r,stdio:n,all:s,ipcOutput:o,options:a,startTime:l,isSync:!1}):ds({command:c,escapedCommand:u,stdio:n,all:s,ipcOutput:o,options:a,startTime:l});var Ps=(e,t)=>{let r=Object.fromEntries(Object.entries(t).map(([n,s])=>[n,NT(n,e[n],s)]));return{...e,...r}},NT=(e,t,r)=>PT.has(e)&&W(t)&&W(r)?{...t,...r}:r,PT=new Set(["env",...Uo]);var dt=(e,t,r,n)=>{let s=(i,a,c)=>dt(i,a,r,c),o=(...i)=>MT({mapArguments:e,deepOptions:r,boundOptions:t,setBoundExeca:n,createNested:s},...i);return n!==void 0&&n(o,s,t),o},MT=({mapArguments:e,deepOptions:t={},boundOptions:r={},setBoundExeca:n,createNested:s},o,...i)=>{if(W(o))return s(e,Ps(r,o),n);let{file:a,commandArguments:c,options:u,isSync:l}=FT({mapArguments:e,firstArgument:o,nextArguments:i,deepOptions:t,boundOptions:r});return l?_p(a,c,u):Dm(a,c,u,s)},FT=({mapArguments:e,firstArgument:t,nextArguments:r,deepOptions:n,boundOptions:s})=>{let o=au(t)?cu(t,r):[t,...r],[i,a,c]=_n(...o),u=Ps(Ps(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 Lm=({file:e,commandArguments:t})=>Pm(e,t),Nm=({file:e,commandArguments:t})=>({...Pm(e,t),isSync:!0}),Pm=(e,t)=>{if(t.length>0)throw new TypeError(`The command and its arguments must be passed as a single string: ${e} ${t}.`);let[r,...n]=jT(e);return{file:r,commandArguments:n}},jT=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(BT)){let s=r.at(-1);s&&s.endsWith("\\")?r[r.length-1]=`${s.slice(0,-1)} ${n}`:r.push(n)}return r},BT=/ +/g;var Mm=(e,t,r)=>{e.sync=t(UT,r),e.s=e.sync},Fm=({options:e})=>jm(e),UT=({options:e})=>({...jm(e),isSync:!0}),jm=e=>({options:{...GT(e),...e}}),GT=({input:e,inputFile:t,stdio:r})=>e===void 0&&t===void 0&&r===void 0?{stdin:"inherit"}:{},Bm={preferLocal:!0};var Um=dt(()=>({})),oG=dt(()=>({isSync:!0})),iG=dt(Lm),aG=dt(Nm),cG=dt(Lf),uG=dt(Fm,{},Bm,Mm),{sendMessage:lG,getOneMessage:fG,getEachMessage:dG,getCancelSignal:pG}=kp();var Xw=require("fs"),Ao=require("path"),Io=q($g(),1);var M;(function(e){e.assertEqual=s=>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"&&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})(M||(M={}));var Ua;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Ua||(Ua={}));var S=M.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),tt=e=>{switch(typeof e){case"undefined":return S.undefined;case"string":return S.string;case"number":return isNaN(e)?S.nan:S.number;case"boolean":return S.boolean;case"function":return S.function;case"bigint":return S.bigint;case"symbol":return S.symbol;case"object":return Array.isArray(e)?S.array:e===null?S.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?S.promise:typeof Map<"u"&&e instanceof Map?S.map:typeof Set<"u"&&e instanceof Set?S.set:typeof Date<"u"&&e instanceof Date?S.date:S.object;default:return S.unknown}},m=M.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Fk=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),he=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,M.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(t(s))):n.push(t(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};he.create=e=>new he(e);var hr=(e,t)=>{let r;switch(e.code){case m.invalid_type:e.received===S.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case m.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,M.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:r=`Unrecognized key(s) in object: ${M.joinValues(e.keys,", ")}`;break;case m.invalid_union:r="Invalid input";break;case m.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${M.joinValues(e.options)}`;break;case m.invalid_enum_value:r=`Invalid enum value. Expected ${M.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}"`:M.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case m.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case m.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case m.custom:r="Invalid input";break;case m.invalid_intersection_types:r="Intersection results could not be merged";break;case m.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case m.not_finite:r="Number must be finite";break;default:r=t.defaultError,M.assertNever(e)}return{message:r}},Pg=hr;function jk(e){Pg=e}function Hs(){return Pg}var Ys=e=>{let{data:t,path:r,errorMaps:n,issueData:s}=e,o=[...r,...s.path||[]],i={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(i,{data:t,defaultError:a}).message;return{...s,path:o,message:a}},Bk=[];function y(e,t){let r=Hs(),n=Ys({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===hr?void 0:hr].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 k;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 k;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}}},k=Object.freeze({status:"aborted"}),mr=e=>({status:"dirty",value:e}),ie=e=>({status:"valid",value:e}),Ga=e=>e.status==="aborted",qa=e=>e.status==="dirty",Ot=e=>e.status==="valid",nn=e=>typeof Promise<"u"&&e instanceof Promise;function Xs(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Mg(e,t,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r}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 tn,rn,Re=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||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Dg=(e,t)=>{if(Ot(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 he(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)=>{var c,u;let{message:l}=e;return i.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:(c=l??n)!==null&&c!==void 0?c:a.defaultError}:i.code!=="invalid_type"?{message:a.defaultError}:{message:(u=l??r)!==null&&u!==void 0?u:a.defaultError}},description:s}}var D=class{get description(){return this._def.description}_getType(t){return tt(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:tt(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:tt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(nn(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){var n;let s={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:tt(t)},o=this._parseSync({data:t,path:s.path,parent:s});return Dg(s,o)}"~validate"(t){var r,n;let s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:tt(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:s});return Ot(o)?{value:o.value}:{issues:s.common.issues}}catch(o){!((n=(r=o==null?void 0:o.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:s}).then(o=>Ot(o)?{value:o.value}:{issues:s.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:tt(t)},s=this._parse({data:t,path:n.path,parent:n}),o=await(nn(s)?s:Promise.resolve(s));return Dg(n,o)}refine(t,r){let n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,o)=>{let i=t(s),a=()=>o.addIssue({code:m.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,s)=>t(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(t){return new ge({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 Ze.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return nt.create(this)}promise(){return ht.create(this,this._def)}or(t){return Dt.create([this,t],this._def)}and(t){return Lt.create(this,t,this._def)}transform(t){return new ge({...$(this._def),schema:this,typeName:R.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new jt({...$(this._def),innerType:this,defaultValue:r,typeName:R.ZodDefault})}brand(){return new sn({typeName:R.ZodBranded,type:this,...$(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Bt({...$(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 on.create(this,t)}readonly(){return Ut.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Uk=/^c[^\s-]{8,}$/i,Gk=/^[0-9a-z]+$/,qk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Vk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zk=/^[a-z0-9_-]{21}$/i,Wk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Zk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Hk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ba,Xk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Kk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Jk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Qk=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Fg="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",rC=new RegExp(`^${Fg}$`);function jg(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function nC(e){return new RegExp(`^${jg(e)}$`)}function Bg(e){let t=`${Fg}T${jg(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function sC(e,t){return!!((t==="v4"||!t)&&Xk.test(e)||(t==="v6"||!t)&&Jk.test(e))}function oC(e,t){if(!Wk.test(e))return!1;try{let[r]=e.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||!s.typ||!s.alg||t&&s.alg!==t)}catch{return!1}}function iC(e,t){return!!((t==="v4"||!t)&&Kk.test(e)||(t==="v6"||!t)&&Qk.test(e))}var pt=class e extends D{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==S.string){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:S.string,received:o.parsedType}),k}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")Hk.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")Ba||(Ba=new RegExp(Yk,"u")),Ba.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"emoji",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")Vk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"uuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"nanoid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")Uk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")Gk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cuid2",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")qk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ulid",code:m.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),y(s,{validation:"url",code:m.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"regex",code:m.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?Bg(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?rC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?nC(o).test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{code:m.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?Zk.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"duration",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?sC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"ip",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?oC(t.data,o.alg)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"jwt",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?iC(t.data,o.version)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"cidr",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?eC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64",code:m.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?tC.test(t.data)||(s=this._getOrReturnCtx(t,s),y(s,{validation:"base64url",code:m.invalid_string,message:o.message}),n.dirty()):M.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){var r,n;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:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,local:(n=t==null?void 0:t.local)!==null&&n!==void 0?n:!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}};pt.create=e=>{var t;return new pt({checks:[],typeName:R.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$(e)})};function aC(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,s=r>n?r:n,o=parseInt(e.toFixed(s).replace(".","")),i=parseInt(t.toFixed(s).replace(".",""));return o%i/Math.pow(10,s)}var Rt=class e extends D{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)!==S.number){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:S.number,received:o.parsedType}),k}let n,s=new te;for(let o of this._def.checks)o.kind==="int"?M.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?aC(t.data,o.value)!==0&&(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),y(n,{code:m.not_finite,message:o.message}),s.dirty()):M.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"&&M.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 kt=class e extends D{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)!==S.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()):M.assertNever(o);return{status:s.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:S.bigint,received:r.parsedType}),k}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}};kt.create=e=>{var t;return new kt({checks:[],typeName:R.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...$(e)})};var Ct=class extends D{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==S.boolean){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.boolean,received:n.parsedType}),k}return ie(t.data)}};Ct.create=e=>new Ct({typeName:R.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...$(e)});var At=class e extends D{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==S.date){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_type,expected:S.date,received:o.parsedType}),k}if(isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return y(o,{code:m.invalid_date}),k}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()):M.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}};At.create=e=>new At({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:R.ZodDate,...$(e)});var gr=class extends D{_parse(t){if(this._getType(t)!==S.symbol){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.symbol,received:n.parsedType}),k}return ie(t.data)}};gr.create=e=>new gr({typeName:R.ZodSymbol,...$(e)});var It=class extends D{_parse(t){if(this._getType(t)!==S.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.undefined,received:n.parsedType}),k}return ie(t.data)}};It.create=e=>new It({typeName:R.ZodUndefined,...$(e)});var $t=class extends D{_parse(t){if(this._getType(t)!==S.null){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.null,received:n.parsedType}),k}return ie(t.data)}};$t.create=e=>new $t({typeName:R.ZodNull,...$(e)});var mt=class extends D{constructor(){super(...arguments),this._any=!0}_parse(t){return ie(t.data)}};mt.create=e=>new mt({typeName:R.ZodAny,...$(e)});var rt=class extends D{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ie(t.data)}};rt.create=e=>new rt({typeName:R.ZodUnknown,...$(e)});var Me=class extends D{_parse(t){let r=this._getOrReturnCtx(t);return y(r,{code:m.invalid_type,expected:S.never,received:r.parsedType}),k}};Me.create=e=>new Me({typeName:R.ZodNever,...$(e)});var yr=class extends D{_parse(t){if(this._getType(t)!==S.undefined){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.void,received:n.parsedType}),k}return ie(t.data)}};yr.create=e=>new yr({typeName:R.ZodVoid,...$(e)});var nt=class e extends D{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),s=this._def;if(r.parsedType!==S.array)return y(r,{code:m.invalid_type,expected:S.array,received:r.parsedType}),k;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 Re(r,i,r.path,a)))).then(i=>te.mergeArray(n,i));let o=[...r.data].map((i,a)=>s.type._parseSync(new Re(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)}};nt.create=(e,t)=>new nt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:R.ZodArray,...$(t)});function pr(e){if(e instanceof le){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=Oe.create(pr(n))}return new le({...e._def,shape:()=>t})}else return e instanceof nt?new nt({...e._def,type:pr(e.element)}):e instanceof Oe?Oe.create(pr(e.unwrap())):e instanceof Ze?Ze.create(pr(e.unwrap())):e instanceof We?We.create(e.items.map(t=>pr(t))):e}var le=class e extends D{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=M.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==S.object){let u=this._getOrReturnCtx(t);return y(u,{code:m.invalid_type,expected:S.object,received:u.parsedType}),k}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 Re(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 Re(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 s,o,i,a;let c=(i=(o=(s=this._def).errorMap)===null||o===void 0?void 0:o.call(s,r,n).message)!==null&&i!==void 0?i:n.defaultError;return r.code==="unrecognized_keys"?{message:(a=_.errToObj(t).message)!==null&&a!==void 0?a:c}:{message:c}}}:{}})}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={};return M.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return M.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new e({...this._def,shape:()=>r})}deepPartial(){return pr(this)}partial(t){let r={};return M.objectKeys(this.shape).forEach(n=>{let s=this.shape[n];t&&!t[n]?r[n]=s:r[n]=s.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return M.objectKeys(this.shape).forEach(n=>{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}}),new e({...this._def,shape:()=>r})}keyof(){return Ug(M.objectKeys(this.shape))}};le.create=(e,t)=>new le({shape:()=>e,unknownKeys:"strip",catchall:Me.create(),typeName:R.ZodObject,...$(t)});le.strictCreate=(e,t)=>new le({shape:()=>e,unknownKeys:"strict",catchall:Me.create(),typeName:R.ZodObject,...$(t)});le.lazycreate=(e,t)=>new le({shape:e,unknownKeys:"strip",catchall:Me.create(),typeName:R.ZodObject,...$(t)});var Dt=class extends D{_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 he(a.ctx.common.issues));return y(r,{code:m.invalid_union,unionErrors:i}),k}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 he(c));return y(r,{code:m.invalid_union,unionErrors:a}),k}}get options(){return this._def.options}};Dt.create=(e,t)=>new Dt({options:e,typeName:R.ZodUnion,...$(t)});var et=e=>e instanceof Nt?et(e.schema):e instanceof ge?et(e.innerType()):e instanceof Pt?[e.value]:e instanceof Mt?e.options:e instanceof Ft?M.objectValues(e.enum):e instanceof jt?et(e._def.innerType):e instanceof It?[void 0]:e instanceof $t?[null]:e instanceof Oe?[void 0,...et(e.unwrap())]:e instanceof Ze?[null,...et(e.unwrap())]:e instanceof sn||e instanceof Ut?et(e.unwrap()):e instanceof Bt?et(e._def.innerType):[],Ks=class e extends D{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==S.object)return y(r,{code:m.invalid_type,expected:S.object,received:r.parsedType}),k;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]}),k)}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=et(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 Va(e,t){let r=tt(e),n=tt(t);if(e===t)return{valid:!0,data:e};if(r===S.object&&n===S.object){let s=M.objectKeys(t),o=M.objectKeys(e).filter(a=>s.indexOf(a)!==-1),i={...e,...t};for(let a of o){let c=Va(e[a],t[a]);if(!c.valid)return{valid:!1};i[a]=c.data}return{valid:!0,data:i}}else if(r===S.array&&n===S.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=Va(i,a);if(!c.valid)return{valid:!1};s.push(c.data)}return{valid:!0,data:s}}else return r===S.date&&n===S.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Lt=class extends D{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),s=(o,i)=>{if(Ga(o)||Ga(i))return k;let a=Va(o.value,i.value);return a.valid?((qa(o)||qa(i))&&r.dirty(),{status:r.value,value:a.data}):(y(n,{code:m.invalid_intersection_types}),k)};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}))}};Lt.create=(e,t,r)=>new Lt({left:e,right:t,typeName:R.ZodIntersection,...$(r)});var We=class e extends D{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==S.array)return y(n,{code:m.invalid_type,expected:S.array,received:n.parsedType}),k;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"}),k;!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 Re(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})}};We.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new We({items:e,typeName:R.ZodTuple,rest:null,...$(t)})};var Js=class e extends D{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!==S.object)return y(n,{code:m.invalid_type,expected:S.object,received:n.parsedType}),k;let s=[],o=this._def.keyType,i=this._def.valueType;for(let a in n.data)s.push({key:o._parse(new Re(n,a,n.path,a)),value:i._parse(new Re(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 D?new e({keyType:t,valueType:r,typeName:R.ZodRecord,...$(n)}):new e({keyType:pt.create(),valueType:t,typeName:R.ZodRecord,...$(r)})}},br=class extends D{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!==S.map)return y(n,{code:m.invalid_type,expected:S.map,received:n.parsedType}),k;let s=this._def.keyType,o=this._def.valueType,i=[...n.data.entries()].map(([a,c],u)=>({key:s._parse(new Re(n,a,n.path,[u,"key"])),value:o._parse(new Re(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 k;(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 k;(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 D{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==S.set)return y(n,{code:m.invalid_type,expected:S.set,received:n.parsedType}),k;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 k;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 Re(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 Qs=class e extends D{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==S.function)return y(r,{code:m.invalid_type,expected:S.function,received:r.parsedType}),k;function n(a,c){return Ys({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Hs(),hr].filter(u=>!!u),issueData:{code:m.invalid_arguments,argumentsError:c}})}function s(a,c){return Ys({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Hs(),hr].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 ht){let a=this;return ie(async function(...c){let u=new he([]),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 ie(function(...c){let u=a._def.args.safeParse(c,o);if(!u.success)throw new he([n(c,u.error)]);let l=Reflect.apply(i,this,u.data),f=a._def.returns.safeParse(l,o);if(!f.success)throw new he([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:We.create(t).rest(rt.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||We.create([]).rest(rt.create()),returns:r||rt.create(),typeName:R.ZodFunction,...$(n)})}},Nt=class extends D{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})}};Nt.create=(e,t)=>new Nt({getter:e,typeName:R.ZodLazy,...$(t)});var Pt=class extends D{_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}),k}return{status:"valid",value:t.data}}get value(){return this._def.value}};Pt.create=(e,t)=>new Pt({value:e,typeName:R.ZodLiteral,...$(t)});function Ug(e,t){return new Mt({values:e,typeName:R.ZodEnum,...$(t)})}var Mt=class e extends D{constructor(){super(...arguments),tn.set(this,void 0)}_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{expected:M.joinValues(n),received:r.parsedType,code:m.invalid_type}),k}if(Xs(this,tn,"f")||Mg(this,tn,new Set(this._def.values),"f"),!Xs(this,tn,"f").has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return y(r,{received:r.data,code:m.invalid_enum_value,options:n}),k}return ie(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})}};tn=new WeakMap;Mt.create=Ug;var Ft=class extends D{constructor(){super(...arguments),rn.set(this,void 0)}_parse(t){let r=M.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==S.string&&n.parsedType!==S.number){let s=M.objectValues(r);return y(n,{expected:M.joinValues(s),received:n.parsedType,code:m.invalid_type}),k}if(Xs(this,rn,"f")||Mg(this,rn,new Set(M.getValidEnumValues(this._def.values)),"f"),!Xs(this,rn,"f").has(t.data)){let s=M.objectValues(r);return y(n,{received:n.data,code:m.invalid_enum_value,options:s}),k}return ie(t.data)}get enum(){return this._def.values}};rn=new WeakMap;Ft.create=(e,t)=>new Ft({values:e,typeName:R.ZodNativeEnum,...$(t)});var ht=class extends D{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==S.promise&&r.common.async===!1)return y(r,{code:m.invalid_type,expected:S.promise,received:r.parsedType}),k;let n=r.parsedType===S.promise?r.data:Promise.resolve(r.data);return ie(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ht.create=(e,t)=>new ht({type:e,typeName:R.ZodPromise,...$(t)});var ge=class extends D{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 k;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?k:c.status==="dirty"||r.value==="dirty"?mr(c.value):c});{if(r.value==="aborted")return k;let a=this._def.schema._parseSync({data:i,path:n.path,parent:n});return a.status==="aborted"?k:a.status==="dirty"||r.value==="dirty"?mr(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"?k:(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"?k:(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(!Ot(i))return i;let a=s.transform(i.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>Ot(i)?Promise.resolve(s.transform(i.value,o)).then(a=>({status:r.value,value:a})):i);M.assertNever(s)}};ge.create=(e,t,r)=>new ge({schema:e,typeName:R.ZodEffects,effect:t,...$(r)});ge.createWithPreprocess=(e,t,r)=>new ge({schema:t,effect:{type:"preprocess",transform:e},typeName:R.ZodEffects,...$(r)});var Oe=class extends D{_parse(t){return this._getType(t)===S.undefined?ie(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 Ze=class extends D{_parse(t){return this._getType(t)===S.null?ie(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ze.create=(e,t)=>new Ze({innerType:e,typeName:R.ZodNullable,...$(t)});var jt=class extends D{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===S.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};jt.create=(e,t)=>new jt({innerType:e,typeName:R.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...$(t)});var Bt=class extends D{_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 nn(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new he(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new he(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Bt.create=(e,t)=>new Bt({innerType:e,typeName:R.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...$(t)});var Sr=class extends D{_parse(t){if(this._getType(t)!==S.nan){let n=this._getOrReturnCtx(t);return y(n,{code:m.invalid_type,expected:S.nan,received:n.parsedType}),k}return{status:"valid",value:t.data}}};Sr.create=e=>new Sr({typeName:R.ZodNaN,...$(e)});var cC=Symbol("zod_brand"),sn=class extends D{_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}},on=class e extends D{_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"?k:o.status==="dirty"?(r.dirty(),mr(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"?k: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})}},Ut=class extends D{_parse(t){let r=this._def.innerType._parse(t),n=s=>(Ot(s)&&(s.value=Object.freeze(s.value)),s);return nn(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}};Ut.create=(e,t)=>new Ut({innerType:e,typeName:R.ZodReadonly,...$(t)});function Lg(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function Gg(e,t={},r){return e?mt.create().superRefine((n,s)=>{var o,i;let a=e(n);if(a instanceof Promise)return a.then(c=>{var u,l;if(!c){let f=Lg(t,n),p=(l=(u=f.fatal)!==null&&u!==void 0?u:r)!==null&&l!==void 0?l:!0;s.addIssue({code:"custom",...f,fatal:p})}});if(!a){let c=Lg(t,n),u=(i=(o=c.fatal)!==null&&o!==void 0?o:r)!==null&&i!==void 0?i:!0;s.addIssue({code:"custom",...c,fatal:u})}}):mt.create()}var uC={object:le.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 lC=(e,t={message:`Input not instance of ${e.name}`})=>Gg(r=>r instanceof e,t),qg=pt.create,Vg=Rt.create,fC=Sr.create,dC=kt.create,zg=Ct.create,pC=At.create,mC=gr.create,hC=It.create,gC=$t.create,yC=mt.create,bC=rt.create,wC=Me.create,SC=yr.create,xC=nt.create,vC=le.create,_C=le.strictCreate,EC=Dt.create,TC=Ks.create,OC=Lt.create,RC=We.create,kC=Js.create,CC=br.create,AC=wr.create,IC=Qs.create,$C=Nt.create,DC=Pt.create,LC=Mt.create,NC=Ft.create,PC=ht.create,Ng=ge.create,MC=Oe.create,FC=Ze.create,jC=ge.createWithPreprocess,BC=on.create,UC=()=>qg().optional(),GC=()=>Vg().optional(),qC=()=>zg().optional(),VC={string:e=>pt.create({...e,coerce:!0}),number:e=>Rt.create({...e,coerce:!0}),boolean:e=>Ct.create({...e,coerce:!0}),bigint:e=>kt.create({...e,coerce:!0}),date:e=>At.create({...e,coerce:!0})},zC=k,st=Object.freeze({__proto__:null,defaultErrorMap:hr,setErrorMap:jk,getErrorMap:Hs,makeIssue:Ys,EMPTY_PATH:Bk,addIssueToContext:y,ParseStatus:te,INVALID:k,DIRTY:mr,OK:ie,isAborted:Ga,isDirty:qa,isValid:Ot,isAsync:nn,get util(){return M},get objectUtil(){return Ua},ZodParsedType:S,getParsedType:tt,ZodType:D,datetimeRegex:Bg,ZodString:pt,ZodNumber:Rt,ZodBigInt:kt,ZodBoolean:Ct,ZodDate:At,ZodSymbol:gr,ZodUndefined:It,ZodNull:$t,ZodAny:mt,ZodUnknown:rt,ZodNever:Me,ZodVoid:yr,ZodArray:nt,ZodObject:le,ZodUnion:Dt,ZodDiscriminatedUnion:Ks,ZodIntersection:Lt,ZodTuple:We,ZodRecord:Js,ZodMap:br,ZodSet:wr,ZodFunction:Qs,ZodLazy:Nt,ZodLiteral:Pt,ZodEnum:Mt,ZodNativeEnum:Ft,ZodPromise:ht,ZodEffects:ge,ZodTransformer:ge,ZodOptional:Oe,ZodNullable:Ze,ZodDefault:jt,ZodCatch:Bt,ZodNaN:Sr,BRAND:cC,ZodBranded:sn,ZodPipeline:on,ZodReadonly:Ut,custom:Gg,Schema:D,ZodSchema:D,late:uC,get ZodFirstPartyTypeKind(){return R},coerce:VC,any:yC,array:xC,bigint:dC,boolean:zg,date:pC,discriminatedUnion:TC,effect:Ng,enum:LC,function:IC,instanceof:lC,intersection:OC,lazy:$C,literal:DC,map:CC,nan:fC,nativeEnum:NC,never:wC,null:gC,nullable:FC,number:Vg,object:vC,oboolean:qC,onumber:GC,optional:MC,ostring:UC,pipeline:BC,preprocess:jC,promise:PC,record:kC,set:AC,strictObject:_C,string:qg,symbol:mC,transformer:Ng,tuple:RC,undefined:hC,union:EC,unknown:bC,void:SC,NEVER:zC,ZodIssueCode:m,quotelessJson:Fk,ZodError:he});var Wg=st.object({list:st.boolean().optional(),log:st.boolean().optional(),track:st.boolean(),reporter:st.boolean().optional(),parser:st.enum(["babel","babylon","flow","ts","tsx"]).optional(),extensions:st.string().optional(),ignoreConfig:st.string().optional()});var wo=q(oy(),1),ho=q(Ha(),1),Ib=require("child_process"),mw=q(Xa(),1),Tr=q(Xa(),1),Bw=require("node:events"),yo=Object.defineProperty,vA=Object.defineProperties,_A=Object.getOwnPropertyDescriptor,EA=Object.getOwnPropertyDescriptors,gc=Object.getOwnPropertyNames,iy=Object.getOwnPropertySymbols,jy=Object.prototype.hasOwnProperty,TA=Object.prototype.propertyIsEnumerable,ay=(e,t,r)=>t in e?yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ce=(e,t)=>{for(var r in t||(t={}))jy.call(t,r)&&ay(e,r,t[r]);if(iy)for(var r of iy(t))TA.call(t,r)&&ay(e,r,t[r]);return e},un=(e,t)=>vA(e,EA(t)),g=(e,t)=>function(){return e&&(t=(0,e[gc(e)[0]])(e=0)),t},OA=(e,t)=>function(){return t||(0,e[gc(e)[0]])((t={exports:{}}).exports,t),t.exports},H=(e,t)=>{for(var r in t)yo(e,r,{get:t[r],enumerable:!0})},RA=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of gc(t))!jy.call(e,s)&&s!==r&&yo(e,s,{get:()=>t[s],enumerable:!(n=_A(t,s))||n.enumerable});return e},V=e=>RA(yo({},"__esModule",{value:!0}),e),cn=(e,t,r)=>new Promise((n,s)=>{var o=c=>{try{a(r.next(c))}catch(u){s(u)}},i=c=>{try{a(r.throw(c))}catch(u){s(u)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,i);a((r=r.apply(e,t)).next())});function kA(...e){let t=new String(e);return bo.set(t,e),t}function po(e){return e instanceof String&&bo.has(e)}function cy(e){return bo.get(e)||[]}var bo,pn=g({"src/lib/args/pathspec.ts"(){"use strict";bo=new WeakMap}}),it,yt=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)}}}}),mn,Rr=g({"src/lib/errors/git-response-error.ts"(){"use strict";yt(),mn=class extends it{constructor(e,t){super(void 0,t||String(e)),this.git=e}}}}),By,Uy=g({"src/lib/errors/task-configuration-error.ts"(){"use strict";yt(),By=class extends it{constructor(e){super(void 0,e)}}}});function Gy(e){return typeof e=="function"?e:Wt}function qy(e){return typeof e=="function"&&e!==Wt}function Vy(e,t){let r=e.indexOf(t);return r<=0?[e,""]:[e.substr(0,r),e.substr(r+1)]}function zy(e,t=0){return Wy(e)&&e.length>t?e[t]:void 0}function zt(e,t=0){if(Wy(e)&&e.length>t)return e[e.length-1-t]}function Wy(e){return!!(e&&typeof e.length=="number")}function hn(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 yc(e,t){return hn(e,!0).map(r=>t(r))}function bc(e){return(0,wo.exists)(e,wo.FOLDER)}function F(e,t){return Array.isArray(e)?e.includes(t)||e.push(t):e.add(t),t}function Zy(e,t){return Array.isArray(e)&&!e.includes(t)&&e.push(t),e}function So(e,t){if(Array.isArray(e)){let r=e.indexOf(t);r>=0&&e.splice(r,1)}else e.delete(t);return t}function He(e){return Array.isArray(e)?e:[e]}function Hy(e){return e.replace(/[\s-]+(.)/g,(t,r)=>r.toUpperCase())}function Yy(e){return He(e).map(String)}function U(e,t=0){if(e==null)return t;let r=parseInt(e,10);return isNaN(r)?t:r}function ln(e,t){let r=[];for(let n=0,s=e.length;n<s;n++)r.push(t,e[n]);return r}function fn(e){return(Array.isArray(e)?Buffer.concat(e):e).toString("utf-8")}function Xy(e,t){return Object.assign({},...t.map(r=>r in e?{[r]:e[r]}:{}))}function nc(e=0){return new Promise(t=>setTimeout(t,e))}function sc(e){if(e!==!1)return e}var Or,Wt,gn,xo=g({"src/lib/utils/util.ts"(){"use strict";Or="\0",Wt=()=>{},gn=Object.prototype.toString.call.bind(Object.prototype.toString)}});function Ye(e,t,r){return t(e)?e:arguments.length>2?r:void 0}function wc(e,t){let r=po(e)?"string":typeof e;return/number|string|boolean/.test(r)&&(!t||!t.includes(r))}function Sc(e){return!!e&&gn(e)==="[object Object]"}function Ky(e){return typeof e=="function"}var yn,re,Jy,mo,xc,Qy=g({"src/lib/utils/argument-filters.ts"(){"use strict";xo(),pn(),yn=e=>Array.isArray(e),re=e=>typeof e=="string",Jy=e=>Array.isArray(e)&&e.every(re),mo=e=>re(e)||Array.isArray(e)&&e.every(re),xc=e=>e==null||"number|boolean|function".includes(typeof e)?!1:Array.isArray(e)||typeof e=="string"||typeof e.length=="number"}}),oc,CA=g({"src/lib/utils/exit-codes.ts"(){"use strict";oc=(e=>(e[e.SUCCESS=0]="SUCCESS",e[e.ERROR=1]="ERROR",e[e.NOT_FOUND=-2]="NOT_FOUND",e[e.UNCLEAN=128]="UNCLEAN",e))(oc||{})}}),dn,AA=g({"src/lib/utils/git-output-streams.ts"(){"use strict";dn=class{constructor(e,t){this.stdOut=e,this.stdErr=t}asStrings(){return new dn(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),I,gt,IA=g({"src/lib/utils/line-parser.ts"(){"use strict";I=class{constructor(e,t){this.matches=[],this.parse=(r,n)=>(this.resetMatches(),this._regExp.every((s,o)=>this.addMatch(s,o,r(o)))?this.useMatches(n,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(e)?e:[e],t&&(this.useMatches=t)}useMatches(e,t){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(e,t,r){let n=r&&e.exec(r);return n&&this.pushMatch(t,n),!!n}pushMatch(e,t){this.matches.push(...t.slice(1))}},gt=class extends I{addMatch(e,t,r){return/^remote:\s/.test(String(r))&&super.addMatch(e,t,r)}pushMatch(e,t){(e>0||t.length>1)&&super.pushMatch(e,t)}}}});function eb(...e){let t=process.cwd(),r=Object.assign(Ce({baseDir:t},tb),...e.filter(n=>typeof n=="object"&&n));return r.baseDir=r.baseDir||t,r.trimmed=r.trimmed===!0,r}var tb,$A=g({"src/lib/utils/simple-git-options.ts"(){"use strict";tb={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function vc(e,t=[]){return Sc(e)?Object.keys(e).reduce((r,n)=>{let s=e[n];return po(s)?r.push(s):wc(s,["boolean"])?r.push(n+"="+s):r.push(n),r},t):t}function fe(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 vc(_c(e),n),r||n.push(...DA(e)),n}function DA(e){let t=typeof zt(e)=="function";return Ye(zt(e,t?1:0),yn,[])}function _c(e){let t=Ky(zt(e));return Ye(zt(e,t?1:0),Sc)}function z(e,t=!0){let r=Gy(zt(e));return t||qy(r)?r:void 0}var LA=g({"src/lib/utils/task-options.ts"(){"use strict";Qy(),xo(),pn()}});function ic(e,t){return e(t.stdOut,t.stdErr)}function pe(e,t,r,n=!0){return He(r).forEach(s=>{for(let o=hn(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 NA=g({"src/lib/utils/task-parser.ts"(){"use strict";xo()}}),rb={};H(rb,{ExitCodes:()=>oc,GitOutputStreams:()=>dn,LineParser:()=>I,NOOP:()=>Wt,NULL:()=>Or,RemoteLineParser:()=>gt,append:()=>F,appendTaskOptions:()=>vc,asArray:()=>He,asCamelCase:()=>Hy,asFunction:()=>Gy,asNumber:()=>U,asStringArray:()=>Yy,bufferToString:()=>fn,callTaskParser:()=>ic,createInstanceConfig:()=>eb,delay:()=>nc,filterArray:()=>yn,filterFunction:()=>Ky,filterHasLength:()=>xc,filterPlainObject:()=>Sc,filterPrimitives:()=>wc,filterString:()=>re,filterStringArray:()=>Jy,filterStringOrStringArray:()=>mo,filterType:()=>Ye,first:()=>zy,folderExists:()=>bc,forEachLineWithContent:()=>yc,getTrailingOptions:()=>fe,including:()=>Zy,isUserFunction:()=>qy,last:()=>zt,objectToString:()=>gn,orVoid:()=>sc,parseStringResponse:()=>pe,pick:()=>Xy,prefixedArray:()=>ln,remove:()=>So,splitOn:()=>Vy,toLinesWithContent:()=>hn,trailingFunctionArgument:()=>z,trailingOptionsArgument:()=>_c});var C=g({"src/lib/utils/index.ts"(){"use strict";Qy(),CA(),AA(),IA(),$A(),LA(),NA(),xo()}}),nb={};H(nb,{CheckRepoActions:()=>ac,checkIsBareRepoTask:()=>ob,checkIsRepoRootTask:()=>sb,checkIsRepoTask:()=>PA});function PA(e){switch(e){case"bare":return ob();case"root":return sb()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:vo,parser:Ec}}function sb(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:vo,parser(t){return/^\.(git)?$/.test(t.trim())}}}function ob(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:vo,parser:Ec}}function MA(e){return/(Not a git repository|Kein Git-Repository)/i.test(String(e))}var ac,vo,Ec,ib=g({"src/lib/tasks/check-is-repo.ts"(){"use strict";C(),ac=(e=>(e.BARE="bare",e.IN_TREE="tree",e.IS_REPO_ROOT="root",e))(ac||{}),vo=({exitCode:e},t,r,n)=>{if(e===128&&MA(t))return r(Buffer.from("false"));n(t)},Ec=e=>e.trim()==="true"}});function FA(e,t){let r=new ab(e),n=e?ub:cb;return hn(t).forEach(s=>{let o=s.replace(n,"");r.paths.push(o),(lb.test(o)?r.folders:r.files).push(o)}),r}var ab,cb,ub,lb,jA=g({"src/lib/responses/CleanSummary.ts"(){"use strict";C(),ab=class{constructor(e){this.dryRun=e,this.paths=[],this.files=[],this.folders=[]}},cb=/^[a-z]+\s*/i,ub=/^[a-z]+\s+[a-z]+\s*/i,lb=/\/$/}}),cc={};H(cc,{EMPTY_COMMANDS:()=>_o,adhocExecTask:()=>fb,configurationErrorTask:()=>de,isBufferTask:()=>pb,isEmptyTask:()=>mb,straightThroughBufferTask:()=>db,straightThroughStringTask:()=>ae});function fb(e){return{commands:_o,format:"empty",parser:e}}function de(e){return{commands:_o,format:"empty",parser(){throw typeof e=="string"?new By(e):e}}}function ae(e,t=!1){return{commands:e,format:"utf-8",parser(r){return t?String(r).trim():r}}}function db(e){return{commands:e,format:"buffer",parser(t){return t}}}function pb(e){return e.format==="buffer"}function mb(e){return e.format==="empty"||!e.commands.length}var _o,Z=g({"src/lib/tasks/task.ts"(){"use strict";Uy(),_o=[]}}),hb={};H(hb,{CONFIG_ERROR_INTERACTIVE_MODE:()=>Tc,CONFIG_ERROR_MODE_REQUIRED:()=>Oc,CONFIG_ERROR_UNKNOWN_OPTION:()=>Rc,CleanOptions:()=>co,cleanTask:()=>gb,cleanWithOptionsTask:()=>BA,isCleanOptionsArray:()=>UA});function BA(e,t){let{cleanMode:r,options:n,valid:s}=GA(e);return r?s.options?(n.push(...t),n.some(zA)?de(Tc):gb(r,n)):de(Rc+JSON.stringify(e)):de(Oc)}function gb(e,t){return{commands:["clean",`-${e}`,...t],format:"utf-8",parser(n){return FA(e==="n",n)}}}function UA(e){return Array.isArray(e)&&e.every(t=>kc.has(t))}function GA(e){let t,r=[],n={cleanMode:!1,options:!0};return e.replace(/[^a-z]i/g,"").split("").forEach(s=>{qA(s)?(t=s,n.cleanMode=!0):n.options=n.options&&VA(r[r.length]=`-${s}`)}),{cleanMode:t,options:r,valid:n}}function qA(e){return e==="f"||e==="n"}function VA(e){return/^-[a-z]$/i.test(e)&&kc.has(e.charAt(1))}function zA(e){return/^-[^\-]/.test(e)?e.indexOf("i")>0:e==="--interactive"}var Tc,Oc,Rc,co,kc,yb=g({"src/lib/tasks/clean.ts"(){"use strict";jA(),C(),Z(),Tc="Git clean interactive mode is not supported",Oc='Git clean mode parameter ("n" or "f") is required',Rc="Git clean unknown option found in: ",co=(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))(co||{}),kc=new Set(["i",...Yy(Object.values(co))])}});function WA(e){let t=new wb;for(let r of bb(e))t.addValue(r.file,String(r.key),r.value);return t}function ZA(e,t){let r=null,n=[],s=new Map;for(let o of bb(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 HA(e){return e.replace(/^(file):/,"")}function*bb(e,t=null){let r=e.split("\0");for(let n=0,s=r.length-1;n<s;){let o=HA(r[n++]),i=r[n++],a=t;if(i.includes(`
57
+ `)){let c=Vy(i,`
58
+ `);a=c[0],i=c[1]}yield{file:o,key:a,value:i}}}var wb,YA=g({"src/lib/responses/ConfigList.ts"(){"use strict";C(),wb=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=zt(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 Ka(e,t){return typeof e=="string"&&uc.hasOwnProperty(e)?e:t}function XA(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 KA(e,t){let r=["config","--null","--show-origin","--get-all",e];return t&&r.splice(1,0,`--${t}`),{commands:r,format:"utf-8",parser(n){return ZA(n,e)}}}function JA(e){let t=["config","--list","--show-origin","--null"];return e&&t.push(`--${e}`),{commands:t,format:"utf-8",parser(r){return WA(r)}}}function QA(){return{addConfig(e,t,...r){return this._runTask(XA(e,t,r[0]===!0,Ka(r[1],"local")),z(arguments))},getConfig(e,t){return this._runTask(KA(e,Ka(t,void 0)),z(arguments))},listConfig(...e){return this._runTask(JA(Ka(e[0],void 0)),z(arguments))}}}var uc,Sb=g({"src/lib/tasks/config.ts"(){"use strict";YA(),C(),uc=(e=>(e.system="system",e.global="global",e.local="local",e.worktree="worktree",e))(uc||{})}});function eI(e){return xb.has(e)}var Ja,xb,vb=g({"src/lib/tasks/diff-name-status.ts"(){"use strict";Ja=(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))(Ja||{}),xb=new Set(Object.values(Ja))}});function tI(...e){return new Eb().param(...e)}function rI(e){let t=new Set,r={};return yc(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 nI(){return{grep(e){let t=z(arguments),r=fe(arguments);for(let s of _b)if(r.includes(s))return this._runTask(de(`git.grep: use of "${s}" is not supported.`),t);typeof e=="string"&&(e=tI().param(e));let n=["grep","--null","-n","--full-name",...r,...e];return this._runTask({commands:n,format:"utf-8",parser(s){return rI(s)}},t)}}}var _b,an,uy,Eb,Tb=g({"src/lib/tasks/grep.ts"(){"use strict";C(),Z(),_b=["-h"],an=Symbol("grepQuery"),Eb=class{constructor(){this[uy]=[]}*[(uy=an,Symbol.iterator)](){for(let e of this[an])yield e}and(...e){return e.length&&this[an].push("--and","(",...ln(e,"-e"),")"),this}param(...e){return this[an].push(...ln(e,"-e")),this}}}}),Ob={};H(Ob,{ResetMode:()=>uo,getResetMode:()=>oI,resetTask:()=>sI});function sI(e,t){let r=["reset"];return Rb(e)&&r.push(`--${e}`),r.push(...t),ae(r)}function oI(e){if(Rb(e))return e;switch(typeof e){case"string":case"undefined":return"soft"}}function Rb(e){return kb.includes(e)}var uo,kb,Cb=g({"src/lib/tasks/reset.ts"(){"use strict";Z(),uo=(e=>(e.MIXED="mixed",e.SOFT="soft",e.HARD="hard",e.MERGE="merge",e.KEEP="keep",e))(uo||{}),kb=Array.from(Object.values(uo))}});function iI(){return(0,ho.default)("simple-git")}function ly(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 aI(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 Cc(e,t,r,n=iI()){let s=e&&`[${e}]`||"",o=[],i=typeof t=="string"?n.extend(t):t,a=aI(Ye(t,re),i,n);return u(r);function c(l,f){return F(o,Cc(e,a.replace(/^[^:]+/,l),f,n))}function u(l){let f=l&&`[${l}]`||"",p=i&&ly(i,f)||Wt,d=ly(n,`${s} ${f}`,p);return Object.assign(i?p:d,{label:e,sibling:c,info:d,step:u})}}var Ab=g({"src/lib/git-logger.ts"(){"use strict";C(),ho.default.formatters.L=e=>String(xc(e)?e.length:"-"),ho.default.formatters.B=e=>Buffer.isBuffer(e)?e.toString("utf8"):gn(e)}}),io,lc,cI=g({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";yt(),Ab(),io=class{constructor(e="GitExecutor"){this.logLabel=e,this._queue=new Map}withProgress(e){return this._queue.get(e)}createProgress(e){let t=io.getName(e.commands[0]),r=Cc(this.logLabel,t);return{task:e,logger:r,name:t}}push(e){let t=this.createProgress(e);return t.logger("Adding task to the queue, commands = %o",e.commands),this._queue.set(e,t),t}fatal(e){for(let[t,{logger:r}]of Array.from(this._queue.entries()))t===e.task?(r.info("Failed %o",e),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",e.message),this.complete(t);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(e){this.withProgress(e)&&this._queue.delete(e)}attempt(e){let t=this.withProgress(e);if(!t)throw new it(void 0,"TasksPendingQueue: attempt called for an unknown task");return t.logger("Starting task"),t}static getName(e="empty"){return`task:${e}:${++io.counter}`}},lc=io,lc.counter=0}});function Vt(e,t){return{method:zy(e.commands)||"",commands:t}}function uI(e,t){return r=>{t("[ERROR] child process exception %o",r),e.push(Buffer.from(String(r.stack),"ascii"))}}function fy(e,t,r,n){return s=>{r("%s received %L bytes",t,s),n("%B",s),e.push(s)}}var fc,lI=g({"src/lib/runners/git-executor-chain.ts"(){"use strict";yt(),Z(),C(),cI(),fc=class{constructor(e,t,r){this._executor=e,this._scheduler=t,this._plugins=r,this._chain=Promise.resolve(),this._queue=new lc}get cwd(){return this._cwd||this._executor.cwd}set cwd(e){this._cwd=e}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(e){return this._queue.push(e),this._chain=this._chain.then(()=>this.attemptTask(e))}attemptTask(e){return cn(this,null,function*(){let t=yield this._scheduler.next(),r=()=>this._queue.complete(e);try{let{logger:n}=this._queue.attempt(e);return yield mb(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}attemptRemoteTask(e,t){return cn(this,null,function*(){let r=this._plugins.exec("spawn.binary","",Vt(e,e.commands)),n=this._plugins.exec("spawn.args",[...e.commands],Vt(e,e.commands)),s=yield this.gitResponse(e,r,n,this.outputHandler,t.step("SPAWN")),o=yield this.handleTaskData(e,n,s,t.step("HANDLE"));return t("passing response to task's parser as a %s",e.format),pb(e)?ic(e.parser,o):ic(e.parser,o.asStrings())})}attemptEmptyTask(e,t){return cn(this,null,function*(){return t("empty task bypassing child process to call to task's parser"),e.parser(this)})}handleTaskData(e,t,r,n){let{exitCode:s,rejection:o,stdOut:i,stdErr:a}=r;return new Promise((c,u)=>{n("Preparing to handle process response exitCode=%d stdOut=",s);let{error:l}=this._plugins.exec("task.error",{error:o},Ce(Ce({},Vt(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",gn(f)),c(new dn(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 dn(Buffer.concat(i),Buffer.concat(a)))})}gitResponse(e,t,r,n,s){return cn(this,null,function*(){let o=s.sibling("output"),i=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},Vt(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,un(Ce({},Vt(e,r)),{kill(p){l=p||l}}));let f=(0,Ib.spawn)(t,r,i);f.stdout.on("data",fy(c,"stdOut",s,o.step("stdOut"))),f.stderr.on("data",fy(u,"stdErr",s,o.step("stdErr"))),f.on("error",uI(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,un(Ce({},Vt(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,un(Ce({},Vt(e,t)),{kill(n){r=n||r}})),r}}}}),$b={};H($b,{GitExecutor:()=>Db});var Db,fI=g({"src/lib/runners/git-executor.ts"(){"use strict";lI(),Db=class{constructor(e,t,r){this.cwd=e,this._scheduler=t,this._plugins=r,this._chain=new fc(this,this._scheduler,this._plugins)}chain(){return new fc(this,this._scheduler,this._plugins)}push(e){return this._chain.push(e)}}}});function dI(e,t,r=Wt){let n=o=>{r(null,o)},s=o=>{(o==null?void 0:o.task)===e&&r(o instanceof mn?pI(o):o,void 0)};t.then(n,s)}function pI(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=Wt};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 mI=g({"src/lib/task-callback.ts"(){"use strict";Rr(),C()}});function dy(e,t){return fb(r=>{if(!bc(e))throw new Error(`Git.cwd: cannot change to non-directory "${e}"`);return(t||r).cwd=e})}var hI=g({"src/lib/tasks/change-working-directory.ts"(){"use strict";C(),Z()}});function Qa(e){let t=["checkout",...e];return t[1]==="-b"&&t.includes("-B")&&(t[1]=So(t,"-B")),ae(t)}function gI(){return{checkout(){return this._runTask(Qa(fe(arguments,1)),z(arguments))},checkoutBranch(e,t){return this._runTask(Qa(["-b",e,t,...fe(arguments)]),z(arguments))},checkoutLocalBranch(e){return this._runTask(Qa(["-b",e,...fe(arguments)]),z(arguments))}}}var yI=g({"src/lib/tasks/checkout.ts"(){"use strict";C(),Z()}});function bI(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}function wI(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(e){return pe(bI(),[Lb],e)}})}}}var Lb,SI=g({"src/lib/tasks/count-objects.ts"(){"use strict";C(),Lb=new I(/([a-z-]+): (\d+)$/,(e,[t,r])=>{let n=Hy(t);e.hasOwnProperty(n)&&(e[n]=U(r))})}});function xI(e){return pe({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},Nb,e)}var Nb,vI=g({"src/lib/parsers/parse-commit.ts"(){"use strict";C(),Nb=[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 _I(e,t,r){return{commands:["-c","core.abbrev=40","commit",...ln(e,"-m"),...t,...r],format:"utf-8",parser:xI}}function EI(){return{commit(t,...r){let n=z(arguments),s=e(t)||_I(He(t),He(Ye(r[0],mo,[])),[...Ye(r[1],yn,[]),...fe(arguments,0,!0)]);return this._runTask(s,n)}};function e(t){return!mo(t)&&de("git.commit: requires the commit message to be supplied as a string/string[]")}}var TI=g({"src/lib/tasks/commit.ts"(){"use strict";vI(),C(),Z()}});function OI(){return{firstCommit(){return this._runTask(ae(["rev-list","--max-parents=0","HEAD"],!0),z(arguments))}}}var RI=g({"src/lib/tasks/first-commit.ts"(){"use strict";C(),Z()}});function kI(e,t){let r=["hash-object",e];return t&&r.push("-w"),ae(r,!0)}var CI=g({"src/lib/tasks/hash-object.ts"(){"use strict";Z()}});function AI(e,t,r){let n=String(r).trim(),s;if(s=Pb.exec(n))return new lo(e,t,!1,s[1]);if(s=Mb.exec(n))return new lo(e,t,!0,s[1]);let o="",i=n.split(" ");for(;i.length;)if(i.shift()==="in"){o=i.join(" ");break}return new lo(e,t,/^re/i.test(n),o)}var lo,Pb,Mb,II=g({"src/lib/responses/InitSummary.ts"(){"use strict";lo=class{constructor(e,t,r,n){this.bare=e,this.path=t,this.existing=r,this.gitDir=n}},Pb=/^Init.+ repository in (.+)$/,Mb=/^Rein.+ in (.+)$/}});function $I(e){return e.includes(Ac)}function DI(e=!1,t,r){let n=["init",...r];return e&&!$I(n)&&n.splice(1,0,Ac),{commands:n,format:"utf-8",parser(s){return AI(n.includes("--bare"),t,s)}}}var Ac,LI=g({"src/lib/tasks/init.ts"(){"use strict";II(),Ac="--bare"}});function Ic(e){for(let t=0;t<e.length;t++){let r=$c.exec(e[t]);if(r)return`--${r[1]}`}return""}function NI(e){return $c.test(e)}var $c,bn=g({"src/lib/args/log-format.ts"(){"use strict";$c=/^--(stat|numstat|name-only|name-status)(=|$)/}}),Fb,PI=g({"src/lib/responses/DiffSummary.ts"(){"use strict";Fb=class{constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function jb(e=""){let t=Bb[e];return r=>pe(new Fb,t,r,!1)}var ec,py,my,hy,Bb,Ub=g({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";bn(),PI(),vb(),C(),ec=[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])})],py=[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})})],my=[new I(/(.+)$/,(e,[t])=>{e.changed++,e.files.push({file:t,changes:0,insertions:0,deletions:0,binary:!1})})],hy=[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:sc(eI(t)&&t),from:sc(!!o&&n!==o&&n),similarity:U(r)})})],Bb={"":ec,"--stat":ec,"--numstat":py,"--name-status":hy,"--name-only":my}}});function MI(e,t){return t.reduce((r,n,s)=>(r[n]=e[s]||"",r),Object.create({diff:null}))}function Gb(e=Nc,t=qb,r=""){let n=jb(r);return function(s){let o=hn(s.trim(),!1,Dc).map(function(i){let a=i.split(Lc),c=MI(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 Dc,Lc,Nc,qb,Vb=g({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";C(),Ub(),bn(),Dc="\xF2\xF2\xF2\xF2\xF2\xF2 ",Lc=" \xF2\xF2",Nc=" \xF2 ",qb=["hash","date","message","refs","author_name","author_email"]}}),zb={};H(zb,{diffSummaryTask:()=>FI,validateLogFormatConfig:()=>Eo});function FI(e){let t=Ic(e),r=["diff"];return t===""&&(t="--stat",r.push("--stat=4096")),r.push(...e),Eo(r)||{commands:r,format:"utf-8",parser:jb(t)}}function Eo(e){let t=e.filter(NI);if(t.length>1)return de(`Summary flags are mutually exclusive - pick one of ${t.join(",")}`);if(t.length&&e.includes("-z"))return de(`Summary flag ${t} parsing is not compatible with null termination option '-z'`)}var Pc=g({"src/lib/tasks/diff.ts"(){"use strict";bn(),Ub(),Z()}});function jI(e,t){let r=[],n=[];return Object.keys(e).forEach(s=>{r.push(s),n.push(String(e[s]))}),[r,n.join(t)]}function BI(e){return Object.keys(e).reduce((t,r)=>(r in dc||(t[r]=e[r]),t),{})}function Wb(e={},t=[]){let r=Ye(e.splitter,re,Nc),n=!wc(e.format)&&e.format?e.format:{hash:"%H",date:e.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:e.multiLine?"%B":"%b",author_name:e.mailMap!==!1?"%aN":"%an",author_email:e.mailMap!==!1?"%aE":"%ae"},[s,o]=jI(n,r),i=[],a=[`--pretty=format:${Dc}${o}${Lc}`,...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 re(e.file)&&a.push("--follow",kA(e.file)),vc(BI(e),a),{fields:s,splitter:r,commands:[...a,...i]}}function UI(e,t,r){let n=Gb(e,t,Ic(r));return{commands:["log",...r],format:"utf-8",parser:n}}function GI(){return{log(...r){let n=z(arguments),s=Wb(_c(arguments),Ye(arguments[0],yn)),o=t(...r)||Eo(s.commands)||e(s);return this._runTask(o,n)}};function e(r){return UI(r.splitter,r.fields,r.commands)}function t(r,n){return re(r)&&re(n)&&de("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}var dc,Zb=g({"src/lib/tasks/log.ts"(){"use strict";bn(),pn(),Vb(),C(),Z(),Pc(),dc=(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))(dc||{})}}),fo,Hb,qI=g({"src/lib/responses/MergeSummary.ts"(){"use strict";fo=class{constructor(e,t=null,r){this.reason=e,this.file=t,this.meta=r}toString(){return`${this.file}:${this.reason}`}},Hb=class{constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),pc,Yb,VI=g({"src/lib/responses/PullSummary.ts"(){"use strict";pc=class{constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Yb=class{constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function tc(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 gy(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 Xb,zI=g({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";C(),Xb=[new gt(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=tc(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new gt(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(e,[t,r])=>{let n=t.toLowerCase(),s=tc(e.remoteMessages);Object.assign(s,{[n]:U(r)})}),new gt(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(e,[t,r,n])=>{let s=tc(e.remoteMessages);s.total=gy(t),s.reused=gy(r),s.packReused=U(n)})]}});function Kb(e,t){return pe({remoteMessages:new Qb},Jb,t)}var Jb,Qb,ew=g({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";C(),zI(),Jb=[new gt(/^remote:\s*(.+)$/,(e,[t])=>(e.remoteMessages.all.push(t.trim()),!1)),...Xb,new gt([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(e,[t])=>{e.remoteMessages.pullRequestUrl=t}),new gt([/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 WI(e,t){let r=pe(new Yb,tw,[e,t]);return r.message&&r}var yy,by,wy,Sy,tw,xy,Mc,rw=g({"src/lib/parsers/parse-pull.ts"(){"use strict";VI(),C(),ew(),yy=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,by=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,wy=/^(create|delete) mode \d+ (.+)/,Sy=[new I(yy,(e,[t,r,n])=>{e.files.push(t),r&&(e.insertions[t]=r.length),n&&(e.deletions[t]=n.length)}),new I(by,(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(wy,(e,[t,r])=>{F(e.files,r),F(t==="create"?e.created:e.deleted,r)})],tw=[new I(/^from\s(.+)$/i,(e,[t])=>void(e.remote=t)),new I(/^fatal:\s(.+)$/,(e,[t])=>void(e.message=t)),new I(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(e,[t,r,n,s])=>{e.branch.local=n,e.hash.local=t,e.branch.remote=s,e.hash.remote=r})],xy=(e,t)=>pe(new pc,Sy,[e,t]),Mc=(e,t)=>Object.assign(new pc,xy(e,t),Kb(e,t))}}),vy,nw,_y,ZI=g({"src/lib/parsers/parse-merge.ts"(){"use strict";qI(),C(),rw(),vy=[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 fo(t,r))}),new I(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(e,[t,r,n])=>{e.conflicts.push(new fo(t,r,{deleteRef:n}))}),new I(/^CONFLICT\s+\((.+)\):/,(e,[t])=>{e.conflicts.push(new fo(t,null))}),new I(/^Automatic merge failed;\s+(.+)$/,(e,[t])=>{e.result=t})],nw=(e,t)=>Object.assign(_y(e,t),Mc(e,t)),_y=e=>pe(new Hb,vy,e)}});function Ey(e){return e.length?{commands:["merge",...e],format:"utf-8",parser(t,r){let n=nw(t,r);if(n.failed)throw new mn(n);return n}}:de("Git.merge requires at least one option")}var HI=g({"src/lib/tasks/merge.ts"(){"use strict";Rr(),ZI(),Z()}});function YI(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 Ty,sw,Oy,XI=g({"src/lib/parsers/parse-push.ts"(){"use strict";C(),ew(),Ty=[new I(/^Pushing to (.+)$/,(e,[t])=>{e.repo=t}),new I(/^updating local tracking ref '(.+)'/,(e,[t])=>{e.ref=un(Ce({},e.ref||{}),{local:t})}),new I(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(e,[t,r,n])=>{e.pushed.push(YI(t,r,n))}),new I(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(e,[t,r,n])=>{e.branch=un(Ce({},e.branch||{}),{local:t,remote:r,remoteName:n})}),new I(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(e,[t,r,n,s])=>{e.update={head:{local:t,remote:r},hash:{from:n,to:s}}})],sw=(e,t)=>{let r=Oy(e,t),n=Kb(e,t);return Ce(Ce({},r),n)},Oy=(e,t)=>pe({pushed:[]},Ty,[e,t])}}),ow={};H(ow,{pushTagsTask:()=>KI,pushTask:()=>Fc});function KI(e={},t){return F(t,"--tags"),Fc(e,t)}function Fc(e={},t){let r=["push",...t];return e.branch&&r.splice(1,0,e.branch),e.remote&&r.splice(1,0,e.remote),So(r,"-v"),F(r,"--verbose"),F(r,"--porcelain"),{commands:r,format:"utf-8",parser:sw}}var iw=g({"src/lib/tasks/push.ts"(){"use strict";XI(),C()}});function JI(){return{showBuffer(){let e=["show",...fe(arguments,1)];return e.includes("--binary")||e.splice(1,0,"--binary"),this._runTask(db(e),z(arguments))},show(){let e=["show",...fe(arguments,1)];return this._runTask(ae(e),z(arguments))}}}var QI=g({"src/lib/tasks/show.ts"(){"use strict";C(),Z()}}),Ry,aw,e1=g({"src/lib/responses/FileStatusSummary.ts"(){"use strict";Ry=/^(.+)\0(.+)$/,aw=class{constructor(e,t,r){if(this.path=e,this.index=t,this.working_dir=r,t==="R"||r==="R"){let n=Ry.exec(e)||[null,e,e];this.from=n[2]||"",this.path=n[1]||""}}}}});function ky(e){let[t,r]=e.split(Or);return{from:r||t,to:t}}function we(e,t,r){return[`${e}${t}`,r]}function rc(e,...t){return t.map(r=>we(e,r,(n,s)=>F(n.conflicted,s)))}function t1(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=cw.get(a);c&&c(e,i),a!=="##"&&a!=="!!"&&e.files.push(new aw(i,s,o))}}var Cy,cw,uw,r1=g({"src/lib/responses/StatusSummary.ts"(){"use strict";C(),e1(),Cy=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}},cw=new Map([we(" ","A",(e,t)=>F(e.created,t)),we(" ","D",(e,t)=>F(e.deleted,t)),we(" ","M",(e,t)=>F(e.modified,t)),we("A"," ",(e,t)=>F(e.created,t)&&F(e.staged,t)),we("A","M",(e,t)=>F(e.created,t)&&F(e.staged,t)&&F(e.modified,t)),we("D"," ",(e,t)=>F(e.deleted,t)&&F(e.staged,t)),we("M"," ",(e,t)=>F(e.modified,t)&&F(e.staged,t)),we("M","M",(e,t)=>F(e.modified,t)&&F(e.staged,t)),we("R"," ",(e,t)=>{F(e.renamed,ky(t))}),we("R","M",(e,t)=>{let r=ky(t);F(e.renamed,r),F(e.modified,r.to)}),we("!","!",(e,t)=>{F(e.ignored=e.ignored||[],t)}),we("?","?",(e,t)=>F(e.not_added,t)),...rc("A","A","U"),...rc("D","D","U"),...rc("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)}]]),uw=function(e){let t=e.split(Or),r=new Cy;for(let n=0,s=t.length;n<s;){let o=t[n++].trim();o&&(o.charAt(0)==="R"&&(o+=Or+(t[n++]||"")),t1(r,o))}return r}}});function n1(e){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...e.filter(r=>!lw.includes(r))],parser(r){return uw(r)}}}var lw,s1=g({"src/lib/tasks/status.ts"(){"use strict";r1(),lw=["--null","-z"]}});function go(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 o1(){return go(0,0,0,"",!1)}function i1(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:a1,onError(e,t,r,n){if(e.exitCode===-2)return r(Buffer.from(jc));n(t)}})}}}function a1(e){return e===jc?o1():pe(go(0,0,0,e),fw,e)}var jc,fw,c1=g({"src/lib/tasks/version.ts"(){"use strict";C(),jc="installed=false",fw=[new I(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(e,[t,r,n,s=""])=>{Object.assign(e,go(U(t),U(r),U(n),s))}),new I(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(e,[t,r,n,s=""])=>{Object.assign(e,go(U(t),U(r),n,s))})]}}),dw={};H(dw,{SimpleGitApi:()=>mc});var mc,u1=g({"src/lib/simple-git-api.ts"(){"use strict";mI(),hI(),yI(),SI(),TI(),Sb(),RI(),Tb(),CI(),LI(),Zb(),HI(),iw(),QI(),s1(),Z(),c1(),C(),mc=class{constructor(e){this._executor=e}_runTask(e,t){let r=this._executor.chain(),n=r.push(e);return t&&dI(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",...He(e)]),z(arguments))}cwd(e){let t=z(arguments);return typeof e=="string"?this._runTask(dy(e,this._executor),t):typeof(e==null?void 0:e.path)=="string"?this._runTask(dy(e.path,e.root&&this._executor||void 0),t):this._runTask(de("Git.cwd: workingDirectory must be supplied as a string"),t)}hashObject(e,t){return this._runTask(kI(e,t===!0),z(arguments))}init(e){return this._runTask(DI(e===!0,this._executor.cwd,fe(arguments)),z(arguments))}merge(){return this._runTask(Ey(fe(arguments)),z(arguments))}mergeFromTo(e,t){return re(e)&&re(t)?this._runTask(Ey([e,t,...fe(arguments)]),z(arguments,!1)):this._runTask(de("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(e){return this._executor.outputHandler=e,this}push(){let e=Fc({remote:Ye(arguments[0],re),branch:Ye(arguments[1],re)},fe(arguments));return this._runTask(e,z(arguments))}stash(){return this._runTask(ae(["stash",...fe(arguments)]),z(arguments))}status(){return this._runTask(n1(fe(arguments)),z(arguments))}},Object.assign(mc.prototype,gI(),EI(),QA(),wI(),OI(),nI(),GI(),JI(),i1())}}),pw={};H(pw,{Scheduler:()=>hw});var Ay,hw,l1=g({"src/lib/runners/scheduler.ts"(){"use strict";C(),Ab(),Ay=(()=>{let e=0;return()=>{e++;let{promise:t,done:r}=(0,mw.createDeferred)();return{promise:t,done:r,id:e}}})(),hw=class{constructor(e=2){this.concurrency=e,this.logger=Cc("","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),So(this.running,e),this.schedule()})}next(){let{promise:e,id:t}=F(this.pending,Ay());return this.logger("Scheduling id=%s",t),this.schedule(),e}}}}),gw={};H(gw,{applyPatchTask:()=>f1});function f1(e,t){return ae(["apply",...t,...e])}var d1=g({"src/lib/tasks/apply-patch.ts"(){"use strict";Z()}});function p1(e,t){return{branch:e,hash:t,success:!0}}function m1(e){return{branch:e,hash:null,success:!1}}var yw,h1=g({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";yw=class{constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function bw(e,t){return t===1&&hc.test(e)}var Iy,hc,$y,To,g1=g({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";h1(),C(),Iy=/(\S+)\s+\(\S+\s([^)]+)\)/,hc=/^error[^']+'([^']+)'/m,$y=[new I(Iy,(e,[t,r])=>{let n=p1(t,r);e.all.push(n),e.branches[t]=n}),new I(hc,(e,[t])=>{let r=m1(t);e.errors.push(r),e.all.push(r),e.branches[t]=r})],To=(e,t)=>pe(new yw,$y,[e,t])}}),ww,y1=g({"src/lib/responses/BranchSummary.ts"(){"use strict";ww=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 Dy(e){return e?e.charAt(0):""}function Sw(e){return pe(new ww,xw,e)}var xw,b1=g({"src/lib/parsers/parse-branch.ts"(){"use strict";y1(),C(),xw=[new I(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(e,[t,r,n,s])=>{e.push(Dy(t),!0,r,n,s)}),new I(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(e,[t,r,n,s])=>{e.push(Dy(t),!1,r,n,s)})]}}),vw={};H(vw,{branchLocalTask:()=>S1,branchTask:()=>w1,containsDeleteBranchCommand:()=>_w,deleteBranchTask:()=>v1,deleteBranchesTask:()=>x1});function _w(e){let t=["-d","-D","--delete"];return e.some(r=>t.includes(r))}function w1(e){let t=_w(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?To(n,s).all[0]:Sw(n)}}}function S1(){return{format:"utf-8",commands:["branch","-v"],parser:Sw}}function x1(e,t=!1){return{format:"utf-8",commands:["branch","-v",t?"-D":"-d",...e],parser(r,n){return To(r,n)},onError({exitCode:r,stdOut:n},s,o,i){if(!bw(String(s),r))return i(s);o(n)}}}function v1(e,t=!1){let r={format:"utf-8",commands:["branch","-v",t?"-D":"-d",e],parser(n,s){return To(n,s).branches[e]},onError({exitCode:n,stdErr:s,stdOut:o},i,a,c){if(!bw(String(i),n))return c(i);throw new mn(r.parser(fn(o),fn(s)),String(i))}};return r}var _1=g({"src/lib/tasks/branch.ts"(){"use strict";Rr(),g1(),b1(),C()}}),Ew,E1=g({"src/lib/responses/CheckIgnore.ts"(){"use strict";Ew=e=>e.split(/\n/g).map(t=>t.trim()).filter(t=>!!t)}}),Tw={};H(Tw,{checkIgnoreTask:()=>T1});function T1(e){return{commands:["check-ignore",...e],format:"utf-8",parser:Ew}}var O1=g({"src/lib/tasks/check-ignore.ts"(){"use strict";E1()}}),Ow={};H(Ow,{cloneMirrorTask:()=>k1,cloneTask:()=>Rw});function R1(e){return/^--upload-pack(=|$)/.test(e)}function Rw(e,t,r){let n=["clone",...r];return re(e)&&n.push(e),re(t)&&n.push(t),n.find(R1)?de("git.fetch: potential exploit argument blocked."):ae(n)}function k1(e,t,r){return F(r,"--mirror"),Rw(e,t,r)}var C1=g({"src/lib/tasks/clone.ts"(){"use strict";Z(),C()}});function A1(e,t){return pe({raw:e,remote:null,branches:[],tags:[],updated:[],deleted:[]},kw,[e,t])}var kw,I1=g({"src/lib/parsers/parse-fetch.ts"(){"use strict";C(),kw=[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})})]}}),Cw={};H(Cw,{fetchTask:()=>D1});function $1(e){return/^--upload-pack(=|$)/.test(e)}function D1(e,t,r){let n=["fetch",...r];return e&&t&&n.push(e,t),n.find($1)?de("git.fetch: potential exploit argument blocked."):{commands:n,format:"utf-8",parser:A1}}var L1=g({"src/lib/tasks/fetch.ts"(){"use strict";I1(),Z()}});function N1(e){return pe({moves:[]},Aw,e)}var Aw,P1=g({"src/lib/parsers/parse-move.ts"(){"use strict";C(),Aw=[new I(/^Renaming (.+) to (.+)$/,(e,[t,r])=>{e.moves.push({from:t,to:r})})]}}),Iw={};H(Iw,{moveTask:()=>M1});function M1(e,t){return{commands:["mv","-v",...He(e),t],format:"utf-8",parser:N1}}var F1=g({"src/lib/tasks/move.ts"(){"use strict";P1(),C()}}),$w={};H($w,{pullTask:()=>j1});function j1(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 Mc(s,o)},onError(s,o,i,a){let c=WI(fn(s.stdOut),fn(s.stdErr));if(c)return a(new mn(c));a(o)}}}var B1=g({"src/lib/tasks/pull.ts"(){"use strict";Rr(),rw(),C()}});function U1(e){let t={};return Dw(e,([r])=>t[r]={name:r}),Object.values(t)}function G1(e){let t={};return Dw(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 Dw(e,t){yc(e,r=>t(r.split(/\s+/)))}var q1=g({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";C()}}),Lw={};H(Lw,{addRemoteTask:()=>V1,getRemotesTask:()=>z1,listRemotesTask:()=>W1,remoteTask:()=>Z1,removeRemoteTask:()=>H1});function V1(e,t,r){return ae(["remote","add",...r,e,t])}function z1(e){let t=["remote"];return e&&t.push("-v"),{commands:t,format:"utf-8",parser:e?G1:U1}}function W1(e){let t=[...e];return t[0]!=="ls-remote"&&t.unshift("ls-remote"),ae(t)}function Z1(e){let t=[...e];return t[0]!=="remote"&&t.unshift("remote"),ae(t)}function H1(e){return ae(["remote","remove",e])}var Y1=g({"src/lib/tasks/remote.ts"(){"use strict";q1(),Z()}}),Nw={};H(Nw,{stashListTask:()=>X1});function X1(e={},t){let r=Wb(e),n=["stash","list",...r.commands,...t],s=Gb(r.splitter,r.fields,Ic(n));return Eo(n)||{commands:n,format:"utf-8",parser:s}}var K1=g({"src/lib/tasks/stash-list.ts"(){"use strict";bn(),Vb(),Pc(),Zb()}}),Pw={};H(Pw,{addSubModuleTask:()=>J1,initSubModuleTask:()=>Q1,subModuleTask:()=>Oo,updateSubModuleTask:()=>e$});function J1(e,t){return Oo(["add",e,t])}function Q1(e){return Oo(["init",...e])}function Oo(e){let t=[...e];return t[0]!=="submodule"&&t.unshift("submodule"),ae(t)}function e$(e){return Oo(["update",...e])}var t$=g({"src/lib/tasks/sub-module.ts"(){"use strict";Z()}});function r$(e,t){let r=isNaN(e),n=isNaN(t);return r!==n?r?1:-1:r?Mw(e,t):0}function Mw(e,t){return e===t?0:e>t?1:-1}function n$(e){return e.trim()}function ao(e){return typeof e=="string"&&parseInt(e.replace(/^\D+/g,""),10)||0}var Ly,Fw,s$=g({"src/lib/responses/TagList.ts"(){"use strict";Ly=class{constructor(e,t){this.all=e,this.latest=t}},Fw=function(e,t=!1){let r=e.split(`
59
+ `).map(n$).filter(Boolean);t||r.sort(function(s,o){let i=s.split("."),a=o.split(".");if(i.length===1||a.length===1)return r$(ao(i[0]),ao(a[0]));for(let c=0,u=Math.max(i.length,a.length);c<u;c++){let l=Mw(ao(i[c]),ao(a[c]));if(l)return l}return 0});let n=t?r[0]:[...r].reverse().find(s=>s.indexOf(".")>=0);return new Ly(r,n)}}}),jw={};H(jw,{addAnnotatedTagTask:()=>a$,addTagTask:()=>i$,tagListTask:()=>o$});function o$(e=[]){let t=e.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...e],parser(r){return Fw(r,t)}}}function i$(e){return{format:"utf-8",commands:["tag",e],parser(){return{name:e}}}}function a$(e,t){return{format:"utf-8",commands:["tag","-a","-m",t,e],parser(){return{name:e}}}}var c$=g({"src/lib/tasks/tag.ts"(){"use strict";s$()}}),u$=OA({"src/git.js"(e,t){"use strict";var{GitExecutor:r}=(fI(),V($b)),{SimpleGitApi:n}=(u1(),V(dw)),{Scheduler:s}=(l1(),V(pw)),{configurationErrorTask:o}=(Z(),V(cc)),{asArray:i,filterArray:a,filterPrimitives:c,filterString:u,filterStringOrStringArray:l,filterType:f,getTrailingOptions:p,trailingFunctionArgument:d,trailingOptionsArgument:b}=(C(),V(rb)),{applyPatchTask:T}=(d1(),V(gw)),{branchTask:N,branchLocalTask:P,deleteBranchesTask:j,deleteBranchTask:Y}=(_1(),V(vw)),{checkIgnoreTask:X}=(O1(),V(Tw)),{checkIsRepoTask:Se}=(ib(),V(nb)),{cloneTask:ce,cloneMirrorTask:Ae}=(C1(),V(Ow)),{cleanWithOptionsTask:Ie,isCleanOptionsArray:xe}=(yb(),V(hb)),{diffSummaryTask:kr}=(Pc(),V(zb)),{fetchTask:bt}=(L1(),V(Cw)),{moveTask:Qw}=(F1(),V(Iw)),{pullTask:eS}=(B1(),V($w)),{pushTagsTask:tS}=(iw(),V(ow)),{addRemoteTask:rS,getRemotesTask:nS,listRemotesTask:sS,remoteTask:oS,removeRemoteTask:iS}=(Y1(),V(Lw)),{getResetMode:aS,resetTask:cS}=(Cb(),V(Ob)),{stashListTask:uS}=(K1(),V(Nw)),{addSubModuleTask:lS,initSubModuleTask:fS,subModuleTask:dS,updateSubModuleTask:pS}=(t$(),V(Pw)),{addAnnotatedTagTask:mS,addTagTask:hS,tagListTask:gS}=(c$(),V(jw)),{straightThroughBufferTask:yS,straightThroughStringTask:Fe}=(Z(),V(cc));function O(h,E){this._plugins=E,this._executor=new r(h.baseDir,new s(h.maxConcurrentProcesses),E),this._trimmed=h.trimmed}(O.prototype=Object.create(n.prototype)).constructor=O,O.prototype.customBinary=function(h){return this._plugins.reconfigure("binary",h),this},O.prototype.env=function(h,E){return arguments.length===1&&typeof h=="object"?this._executor.env=h:(this._executor.env=this._executor.env||{})[h]=E,this},O.prototype.stashList=function(h){return this._runTask(uS(b(arguments)||{},a(h)&&h||[]),d(arguments))};function qc(h,E,B,ne){return typeof B!="string"?o(`git.${h}() requires a string 'repoPath'`):E(B,f(ne,u),p(arguments))}O.prototype.clone=function(){return this._runTask(qc("clone",ce,...arguments),d(arguments))},O.prototype.mirror=function(){return this._runTask(qc("mirror",Ae,...arguments),d(arguments))},O.prototype.mv=function(h,E){return this._runTask(Qw(h,E),d(arguments))},O.prototype.checkoutLatestTag=function(h){var E=this;return this.pull(function(){E.tags(function(B,ne){E.checkout(ne.latest,h)})})},O.prototype.pull=function(h,E,B,ne){return this._runTask(eS(f(h,u),f(E,u),p(arguments)),d(arguments))},O.prototype.fetch=function(h,E){return this._runTask(bt(f(h,u),f(E,u),p(arguments)),d(arguments))},O.prototype.silent=function(h){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},O.prototype.tags=function(h,E){return this._runTask(gS(p(arguments)),d(arguments))},O.prototype.rebase=function(){return this._runTask(Fe(["rebase",...p(arguments)]),d(arguments))},O.prototype.reset=function(h){return this._runTask(cS(aS(h),p(arguments)),d(arguments))},O.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)},O.prototype.addTag=function(h){let E=typeof h=="string"?hS(h):o("Git.addTag requires a tag name");return this._runTask(E,d(arguments))},O.prototype.addAnnotatedTag=function(h,E){return this._runTask(mS(h,E),d(arguments))},O.prototype.deleteLocalBranch=function(h,E,B){return this._runTask(Y(h,typeof E=="boolean"?E:!1),d(arguments))},O.prototype.deleteLocalBranches=function(h,E,B){return this._runTask(j(h,typeof E=="boolean"?E:!1),d(arguments))},O.prototype.branch=function(h,E){return this._runTask(N(p(arguments)),d(arguments))},O.prototype.branchLocal=function(h){return this._runTask(P(),d(arguments))},O.prototype.raw=function(h){let E=!Array.isArray(h),B=[].slice.call(E?arguments:h,0);for(let $e=0;$e<B.length&&E;$e++)if(!c(B[$e])){B.splice($e,B.length-$e);break}B.push(...p(arguments,0,!0));var ne=d(arguments);return B.length?this._runTask(Fe(B,this._trimmed),ne):this._runTask(o("Raw: must supply one or more command to execute"),ne)},O.prototype.submoduleAdd=function(h,E,B){return this._runTask(lS(h,E),d(arguments))},O.prototype.submoduleUpdate=function(h,E){return this._runTask(pS(p(arguments,!0)),d(arguments))},O.prototype.submoduleInit=function(h,E){return this._runTask(fS(p(arguments,!0)),d(arguments))},O.prototype.subModule=function(h,E){return this._runTask(dS(p(arguments)),d(arguments))},O.prototype.listRemote=function(){return this._runTask(sS(p(arguments)),d(arguments))},O.prototype.addRemote=function(h,E,B){return this._runTask(rS(h,E,p(arguments)),d(arguments))},O.prototype.removeRemote=function(h,E){return this._runTask(iS(h),d(arguments))},O.prototype.getRemotes=function(h,E){return this._runTask(nS(h===!0),d(arguments))},O.prototype.remote=function(h,E){return this._runTask(oS(p(arguments)),d(arguments))},O.prototype.tag=function(h,E){let B=p(arguments);return B[0]!=="tag"&&B.unshift("tag"),this._runTask(Fe(B),d(arguments))},O.prototype.updateServerInfo=function(h){return this._runTask(Fe(["update-server-info"]),d(arguments))},O.prototype.pushTags=function(h,E){let B=tS({remote:f(h,u)},p(arguments));return this._runTask(B,d(arguments))},O.prototype.rm=function(h){return this._runTask(Fe(["rm","-f",...i(h)]),d(arguments))},O.prototype.rmKeepLocal=function(h){return this._runTask(Fe(["rm","--cached",...i(h)]),d(arguments))},O.prototype.catFile=function(h,E){return this._catFile("utf-8",arguments)},O.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},O.prototype._catFile=function(h,E){var B=d(E),ne=["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)&&ne.push.apply(ne,$e);let $o=h==="buffer"?yS(ne):Fe(ne);return this._runTask($o,B)},O.prototype.diff=function(h,E){let B=u(h)?o("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):Fe(["diff",...p(arguments)]);return this._runTask(B,d(arguments))},O.prototype.diffSummary=function(){return this._runTask(kr(p(arguments,1)),d(arguments))},O.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))},O.prototype.revparse=function(){let h=["rev-parse",...p(arguments,!0)];return this._runTask(Fe(h,!0),d(arguments))},O.prototype.clean=function(h,E,B){let ne=xe(h),$e=ne&&h.join("")||f(h,u)||"",$o=p([].slice.call(arguments,ne?1:0));return this._runTask(Ie($e,$o),d(arguments))},O.prototype.exec=function(h){let E={commands:[],format:"utf-8",parser(){typeof h=="function"&&h()}};return this._runTask(E)},O.prototype.clearQueue=function(){return this},O.prototype.checkIgnore=function(h,E){return this._runTask(X(i(f(h,l,[]))),d(arguments))},O.prototype.checkIsRepo=function(h,E){return this._runTask(Se(f(h,u)),d(arguments))},t.exports=O}});pn();yt();var l$=class extends it{constructor(e,t){super(void 0,t),this.config=e}};yt();yt();var ot=class extends it{constructor(e,t,r){super(e,r),this.task=e,this.plugin=t,Object.setPrototypeOf(this,new.target.prototype)}};Rr();Uy();ib();yb();Sb();vb();Tb();Cb();function f$(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 d$(e){return typeof e=="string"&&e.trim().toLowerCase()==="-c"}function p$(e,t){if(d$(e)&&/^\s*protocol(.[a-z]+)?.allow/.test(t))throw new ot(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}function m$(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 h$({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||p$(s,i),t||m$(s,n.method)}),r}}}C();function g$(e){let t=ln(e,"-c");return{type:"spawn.args",action(r){return[...t,...r]}}}C();var Ny=(0,Tr.deferred)().promise;function y$({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?Ny:o.closeTimeout.promise,t===!1?Ny: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(()=>nc(s))).then(i.done)}return{type:"spawn.after",action(s,o){return cn(this,arguments,function*(i,{spawned:a,close:c}){var u,l;let f=r(),p=!0,d=()=>void(p=!1);(u=a.stdout)==null||u.on("data",d),(l=a.stderr)==null||l.on("data",d),a.on("error",d),a.on("close",b=>f.close(b)),a.on("exit",b=>f.exit(b));try{yield f.result,p&&(yield nc(50)),c(f.exitCode)}catch(b){c(f.exitCode,b)}})}}}C();var b$="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",Py="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function w$(e){return!e||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(e)}function My(e,t){if(e.length<1||e.length>2)throw new ot(void 0,"binary",b$);if(e.some(w$))if(t)console.warn(Py);else throw new ot(void 0,"binary",Py);let[n,s]=e;return{binary:n,prefix:s}}function S$(e,t=["git"],r=!1){let n=My(He(t),r);e.on("binary",s=>{n=My(He(s),r)}),e.append("spawn.binary",()=>n.binary),e.append("spawn.args",s=>n.prefix?[n.prefix,...s]:s)}yt();function x$(e){return!!(e.exitCode&&e.stdErr.length)}function v$(e){return Buffer.concat([...e.stdOut,...e.stdErr])}function _$(e=!1,t=x$,r=v$){return(n,s)=>!e&&n||!t(s)?n:r(s)}function Fy(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 E$=class{constructor(){this.plugins=new Set,this.events=new Bw.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 He(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 T$(e){let t="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,i){return r.includes(i.method)?Zy(o,t):o}},{type:"spawn.after",action(o,i){var a;i.commands.includes(t)&&((a=i.spawned.stderr)==null||a.on("data",c=>{let u=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(c.toString("utf8"));u&&e({method:i.method,stage:O$(u[1]),progress:U(u[2]),processed:U(u[3]),total:U(u[4])})}))}}]}function O$(e){return String(e.toLowerCase().split(" ",1))||"unknown"}C();function R$(e){let t=Xy(e,["uid","gid"]);return{type:"spawn.options",action(r){return Ce(Ce({},t),r)}}}function k$({block:e,stdErr:t=!0,stdOut:r=!0}){if(e>0)return{type:"spawn.after",action(n,s){var o,i;let a;function c(){a&&clearTimeout(a),a=setTimeout(l,e)}function u(){var f,p;(f=s.spawned.stdout)==null||f.off("data",c),(p=s.spawned.stderr)==null||p.off("data",c),s.spawned.off("exit",u),s.spawned.off("close",u),a&&clearTimeout(a)}function l(){u(),s.kill(new ot(void 0,"timeout","block timeout reached"))}r&&((o=s.spawned.stdout)==null||o.on("data",c)),t&&((i=s.spawned.stderr)==null||i.on("data",c)),s.spawned.on("exit",u),s.spawned.on("close",u),c()}}}pn();function C$(){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(po(o)){n(cy(o));continue}if(o==="--"){n(e.slice(s+1).flatMap(i=>po(i)&&cy(i)||i));break}t.push(o)}return r?[...t,"--",...r.map(String)]:t}}}C();var A$=u$();function I$(e,t){var r;let n=new E$,s=eb(e&&(typeof e=="string"?{baseDir:e}:e)||{},t);if(!bc(s.baseDir))throw new l$(s,"Cannot use simple-git on a directory that does not exist");return Array.isArray(s.config)&&n.add(g$(s.config)),n.add(h$(s.unsafe)),n.add(C$()),n.add(y$(s.completion)),s.abort&&n.add(f$(s.abort)),s.progress&&n.add(T$(s.progress)),s.timeout&&n.add(k$(s.timeout)),s.spawnOptions&&n.add(R$(s.spawnOptions)),n.add(Fy(_$(!0))),s.errors&&n.add(Fy(s.errors)),S$(n,s.binary,(r=s.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new A$(s,n)}Rr();var Uw=I$;async function Gw(){let e=Uw();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 Ww=q(zw(),1),Uc=Ww.default.bold("@seed-design/codemod"),Zw=e=>({event:t,properties:r})=>console.log(Uc,t,r,e);var Kw=(0,Ao.resolve)(__dirname,"transforms"),Yw=Xc(),Co=Hw(),wn=null,Jw=null;function P$(){Gw().then(e=>{Jw=e,wn=Zw({...e}),M$(wn)})}function M$(e){F$(),Yw.version(Co.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("--reporter","\uBCC0\uD658 \uACB0\uACFC\uB97C \uD30C\uC77C\uB85C \uC800\uC7A5\uD574\uC694").option("--extensions <extensions>","\uBCC0\uD658\uD560 \uD30C\uC77C \uD655\uC7A5\uC790").option("--ignore-config <ignoreConfig>","Ignore config").example(" $ npx @seed-design/codemod migrate-icons src/ui").action(async(t,r,n)=>{let s=Wg.parse(n);s.track&&(e==null||e({event:"\uC2E4\uD589",properties:{transformName:t,paths:r}}));let o=U$();s.list&&(Gc(o),process.exit(0)),t||(console.error("transform \uC774\uB984\uC744 \uC785\uB825\uD574\uC8FC\uC138\uC694"),Gc(o),process.exit(1)),o.includes(t)||(console.error(`\uC774\uB984\uC774 ${t}\uC778 transform\uC774 \uC5C6\uC5B4\uC694`),Gc(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,Ao.resolve)(Kw,t,"index.js");console.log(Uc,`${r.join(", ")}\uC5D0 ${t} transform\uC744 \uC2E4\uD589\uD574\uC694.`),await B$(i,t,r,s)}),Yw.parse()}function F$(){(0,Io.satisfies)(process.versions.node,Co.engines.node)===!1&&(console.error(`Node.js \uBC84\uC804 \uC694\uAD6C\uC0AC\uD56D\uC744 \uB9CC\uC871\uC2DC\uD0A4\uC9C0 \uC54A\uC544\uC694: "${Co.engines.node}"
18
60
  Node.js \uBC84\uC804\uC744 \uC5C5\uADF8\uB808\uC774\uB4DC\uD574\uC8FC\uC138\uC694.
19
61
  \uD604\uC7AC \uBC84\uC804: ${process.versions.node}
20
62
 
21
- $ nvm install ${(0,Hr.minVersion)(Wr.engines.node)}`),process.exit(1))}async function Cy(t,e,r,s){let{log:n,parser:i,extensions:a,ignoreConfig:o,reporter:c,track:u}=s,l=require.resolve("jscodeshift/bin/jscodeshift"),d=r.map(h=>(0,Xr.resolve)(process.cwd(),h));if(e==="replace-css-color-variable"){require(t).processCssFiles(r,s);return}return u&&(Kt==null||Kt({event:"transform \uC2E4\uD589",properties:{transformPath:t,paths:d,options:s}})),new Promise((h,f)=>{let F=[l,"--transform",t,"--parser",i,"--ignore-pattern","**/*.d.ts",...d];c&&F.push("--reporter"),a&&F.push("--extensions",a),o&&F.push("--ignore-config",o);let D=(0,Uu.spawn)("node",F,{stdio:"inherit",env:{...process.env,LOG:String(n),TRACK:String(u),GIT_INFO:JSON.stringify(zu)}});D.on("close",U=>{U===0?h(void 0):f(new Error(`Transform failed with code ${U}`))}),D.on("error",U=>{f(U)})})}function Oy(){return(0,Vu.readdirSync)(Zu)}function Tn(t){console.log(`
63
+ $ nvm install ${(0,Io.minVersion)(Co.engines.node)}`),process.exit(1))}var j$=["replace-css-color-variable","replace-css-typography-variable"];async function B$(e,t,r,n){let{log:s,parser:o,extensions:i,ignoreConfig:a,reporter:c,track:u}=n,l=require.resolve("jscodeshift/bin/jscodeshift"),f=r.map(d=>(0,Ao.resolve)(process.cwd(),d));if(j$.includes(t)){require(e).processCssFiles(r,n);return}u&&(wn==null||wn({event:"transform \uC2E4\uD589",properties:{transformPath:e,paths:f,options:n}}));let p=[l,"--transform",e,"--parser",o,"--ignore-pattern","**/*.d.ts",...f];c&&p.push("--reporter"),i&&p.push("--extensions",i),a&&p.push("--ignore-config",a);try{await Um("node",p,{stdio:"inherit",env:{...process.env,LOG:String(s),TRACK:String(u),GIT_INFO:JSON.stringify(Jw)}});return}catch(d){throw d.exitCode?new Error(`Transform failed with code ${d.exitCode}`):d}}function U$(){return(0,Xw.readdirSync)(Kw)}function Gc(e){console.log(`
22
64
  \uC0AC\uC6A9 \uAC00\uB2A5\uD55C transform \uBAA9\uB85D:
23
- `,t.join(`
24
- `))}Ty();
65
+ `,e.join(`
66
+ `))}P$();