(()=>{var$3e=Object.create;varNF=Object.defineProperty;vare_e=Object.getOwnPropertyDescriptor;vart_e=Object.getOwnPropertyNames;varr_e=Object.getPrototypeOf,n_e=Object.prototype.hasOwnProperty;varve=(t=>typeofrequire<"u"?require:typeofProxy<"u"?newProxy(t,{get:(e,r)=>(typeofrequire<"u"?require:e)[r]}):t)(function(t){if(typeofrequire<"u")returnrequire.apply(this,arguments);thrownewError('Dynamic require of "'+t+'" is not supported')});varEt=(t,e)=>()=>(t&&(e=t(t=0)),e);var_=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),zt=(t,e)=>{for(varrine)NF(t,r,{get:e[r],enumerable:!0})},i_e=(t,e,r,o)=>{if(e&&typeofe=="object"||typeofe=="function")for(letaoft_e(e))!n_e.call(t,a)&&a!==r&&NF(t,a,{get:()=>e[a],enumerable:!(o=e_e(e,a))||o.enumerable});returnt};varZe=(t,e,r)=>(r=t!=null?$3e(r_e(t)):{},i_e(e||!t||!t.__esModule?NF(r,"default",{value:t,enumerable:!0}):r,t));varvi={};zt(vi,{SAFE_TIME:()=>x7,S_IFDIR:()=>IP,S_IFLNK:()=>BP,S_IFMT:()=>Mu,S_IFREG:()=>_w});varMu,IP,_w,BP,x7,k7=Et(()=>{Mu=61440,IP=16384,_w=32768,BP=40960,x7=456789e3});varnr={};zt(nr,{EBADF:()=>wo,EBUSY:()=>s_e,EEXIST:()=>A_e,EINVAL:()=>a_e,EISDIR:()=>u_e,ENOENT:()=>l_e,ENOSYS:()=>o_e,ENOTDIR:()=>c_e,ENOTEMPTY:()=>p_e,EOPNOTSUPP:()=>h_e,EROFS:()=>f_e,ERR_DIR_CLOSED:()=>OF});functionLl(t,e){returnObject.assign(newError(`${t}: ${e}`),{code:t})}functions_e(t){returnLl("EBUSY",t)}functiono_e(t,e){returnLl("ENOSYS",`${t}, ${e}`)}functiona_e(t){returnLl("EINVAL",`invalid argument, ${t}`)}functionwo(t){returnLl("EBADF",`bad file descriptor, ${t}`)}functionl_e(t){returnLl("ENOENT",`no such file or directory, ${t}`)}functionc_e(t){returnLl("ENOTDIR",`not a directory, ${t}`)}functionu_e(t){returnLl("EISDIR",`illegal operation on a directory, ${t}`)}functionA_e(t){returnLl("EEXIST",`file already exists, ${t}`)}functionf_e(t){returnLl("EROFS",`read-only filesystem, ${t}`)}functionp_e(t){returnLl("ENOTEMPTY",`directory not empty, ${t}`)}functionh_e(t){returnLl("EOPNOTSUPP",`operation not supported, ${t}`)}functionOF(){returnLl("ERR_DIR_CLOSED","Directory handle was closed")}varvP=Et(()=>{});varEa={};zt(Ea,{BigIntStatsEntry:()=>ey,DEFAULT_MODE:()=>_F,DirEntry:()=>MF,StatEntry:()=>$m,areStatsEqual:()=>HF,clearStats:()=>PP,convertToBigIntStats:()=>d_e,makeDefaultStats:()=>Q7,makeEmptyStats:()=>g_e});functionQ7(){returnnew$m}functiong_e(){returnPP(Q7())}functionPP(t){for(leteint)if(Object.hasOwn(t,e)){letr=t[e];typeofr=="number"?t[e]=0:typeofr=="bigint"?t[e]=BigInt(0):UF.types.isDate(r)&&(t[e]=newDate(0))}returnt}functiond_e(t){lete=newey;for(letrint)if(Object.hasOwn(t,r)){leto=t[r];typeofo=="number"?e[r]=BigInt(o):UF.types.isDate(o)&&(e[r]=newDate(o))}returne.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}functionHF(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;letr=t,o=e;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}varUF,_F,MF,$m,ey,qF=Et(()=>{UF=Ze(ve("util")),_F=33188,MF=class{constructor(){this.name="";this.path="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},$m=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=newDate(0);this.mtime=newDate(0);this.ctime=newDate(0);this.bi
`+r)),o};uW.exports=fT});var as=_((qbt,pW)=>{"use strict";var fW=uy(),w8e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],I8e=["scalar","sequence","mapping"];function B8e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(o){e[String(o)]=r})}),e}function v8e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(w8e.indexOf(r)===-1)throw new fW('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=B8e(e.styleAliases||null),I8e.indexOf(this.kind)===-1)throw new fW('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}pW.exports=v8e});var Vg=_((Gbt,gW)=>{"use strict";var hW=Jg(),HP=uy(),P8e=as();function pT(t,e,r){var o=[];return t.include.forEach(function(a){r=pT(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,u){n.tag===a.tag&&n.kind===a.kind&&o.push(u)}),r.push(a)}),r.filter(function(a,n){return o.indexOf(n)===-1})}function D8e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function o(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(o);return t}function Ay(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!=="scalar")throw new HP("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=pT(this,"implicit",[]),this.compiledExplicit=pT(this,"explicit",[]),this.compiledTypeMap=D8e(this.compiledImplicit,this.compiledExplicit)}Ay.DEFAULT=null;Ay.create=function(){var e,r;switch(arguments.length){case 1:e=Ay.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new HP("Wrong number of arguments for Schema.create function")}if(e=hW.toArray(e),r=hW.toArray(r),!e.every(function(o){return o instanceof Ay}))throw new HP("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(o){return o instanceof P8e}))throw new HP("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Ay({include:e,explicit:r})};gW.exports=Ay});var mW=_((jbt,dW)=>{"use strict";var S8e=as();dW.exports=new S8e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var EW=_((Ybt,yW)=>{"use strict";var b8e=as();yW.exports=new b8e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var wW=_((Wbt,CW)=>{"use strict";var x8e=as();CW.exports=new x8e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var qP=_((Kbt,IW)=>{"use strict";var k8e=Vg();IW.exports=new k8e({explicit:[mW(),EW(),wW()]})});var vW=_((zbt,BW)=>{"use strict";var Q8e=as();function R8e(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function F8e(){return null}function T8e(t){return t===null}BW.exports=new Q8e("tag:yaml.org,2002:null",{kind:"scalar",resolve:R8e,construct:F8e,predicate:T8e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var DW=_((Jbt,PW)=>{"use strict";var L8e=as();function N8e(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function O8e(t){return t==="true"||t==="True"||t==="TRUE"}function M8e(t){return Object.prototype.toString.call(t)==="[object Boolean]"}PW.exports=new L8e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:N8e,construct:O8e,predicate:M8e,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE"
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function XHe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var mK=new Array(256),yK=new Array(256);for(Zg=0;Zg<256;Zg++)mK[Zg]=aK(Zg)?1:0,yK[Zg]=aK(Zg);var Zg;function ZHe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||GHe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function EK(t,e){return new AK(e,new qHe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Sr(t,e){throw EK(t,e)}function WP(t,e){t.onWarning&&t.onWarning.call(null,EK(t,e))}var lK={YAML:function(e,r,o){var a,n,u;e.version!==null&&Sr(e,"duplication of %YAML directive"),o.length!==1&&Sr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),a===null&&Sr(e,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),u=parseInt(a[2],10),n!==1&&Sr(e,"unacceptable YAML version of the document"),e.version=o[0],e.checkLineBreaks=u<2,u!==1&&u!==2&&WP(e,"unsupported YAML version of the document")},TAG:function(e,r,o){var a,n;o.length!==2&&Sr(e,"TAG directive accepts exactly two arguments"),a=o[0],n=o[1],gK.test(a)||Sr(e,"ill-formed tag handle (first argument) of the TAG directive"),Wp.call(e.tagMap,a)&&Sr(e,'there is a previously declared suffix for "'+a+'" tag handle'),dK.test(n)||Sr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[a]=n}};function Yp(t,e,r,o){var a,n,u,A;if(e<r){if(A=t.input.slice(e,r),o)for(a=0,n=A.length;a<n;a+=1)u=A.charCodeAt(a),u===9||32<=u&&u<=1114111||Sr(t,"expected valid JSON character");else YHe.test(A)&&Sr(t,"the stream contains non-printable characters");t.result+=A}}function cK(t,e,r,o){var a,n,u,A;for(yf.isObject(r)||Sr(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),u=0,A=a.length;u<A;u+=1)n=a[u],Wp.call(e,n)||(e[n]=r[n],o[n]=!0)}function hy(t,e,r,o,a,n,u,A){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&Sr(t,"nested arrays are not supported inside keys"),typeof a=="object"&&oK(a[p])==="[object Object]"&&(a[p]="[object Object]");if(typeof a=="object"&&oK(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)cK(t,e,n[p],r);else cK(t,e,n,r);else!t.json&&!Wp.call(r,a)&&Wp.call(e,a)&&(t.line=u||t.line,t.position=A||t.position,Sr(t,"duplicated mapping key")),e[a]=n,delete r[a];return e}function yT(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Sr(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function Wi(t,e,r){for(var o=0,a=t.input.charCodeAt(t.position);a!==0;){for(;$g(a);)a=t.input.charCodeAt(++t.position);if(e&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(qu(a))for(yT(t),a=t.input.charCodeAt(t.position),o++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&o!==0&&t.lineIndent<r&&WP(t,"deficient indentation"),o}function KP(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Ia(r)))}function ET(t,e){e===1?t.result+=" ":e>1&&(t.result+=yf.repeat(`
`,e-1))}function $He(t,e,r){var o,a,n,u,A,p,h,E,I=t.kind,v=t.result,x;if(x=t.input.charCodeAt(t.position),Ia(x)||py(x)||x===35||x===38||x===42||x===33||x===124||x===62||x===39||x===34||x===37||x===64||x===96||(x===63||x===45)&&(a=t.input.charCodeAt(t.position+1),Ia(a)||r&&py(a)))return!1;for(t.kind="scalar",t.result="",n=u=t.position,A=!1;x!==0;){if(x===58){if(a=t.input.charCodeAt(t.position+1),Ia(a)||r&&py(a))break}else if(x===35){if(o=t.input.charCodeAt(t.position-1),Ia(o))break}else{if(t.position===t.lineStart&&KP(t)||r&&py(x))break;if(qu(x))if(p=t.line,h=t.lineStart,E=t.lineIndent,Wi(t,!1,-1),t.lineIndent>=e){A=!0,x=t.input.charCodeAt(t.position);continue}else{t.position=u,t.line=p,t.lineStart=h,t.lineIndent=E;break}}A&&(Yp(t,n,u,!1),ET(t,t.line-p),n=u=t.position,A=!1),$g(x)||(u=t.position+1),x=t.input.charCodeAt(++t.position)}return Yp(t,n,u,!1),t.result?!0:(t.kind=I,t.result=v,!1)}function e6e(t,e){var r,o,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,o=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Yp(t,o,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)o=t.position,t.position++,a=t.position;else return!0;else qu(r)?(Yp(t,o,a,!0),ET(t,Wi(t,!1,e)),o=a=t.position):t.position===t.lineStart&&KP(t)?Sr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);Sr(t,"unexpected end of the stream within a single quoted scalar")}function t6e(t,e){var r,o,a,n,u,A;if(A=t.input.charCodeAt(t.position),A!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;(A=t.input.charCodeAt(t.position))!==0;){if(A===34)return Yp(t,r,t.position,!0),t.position++,!0;if(A===92){if(Yp(t,r,t.position,!0),A=t.input.charCodeAt(++t.position),qu(A))Wi(t,!1,e);else if(A<256&&mK[A])t.result+=yK[A],t.position++;else if((u=JHe(A))>0){for(a=u,n=0;a>0;a--)A=t.input.charCodeAt(++t.position),(u=zHe(A))>=0?n=(n<<4)+u:Sr(t,"expected hexadecimal character");t.result+=XHe(n),t.position++}else Sr(t,"unknown escape sequence");r=o=t.position}else qu(A)?(Yp(t,r,o,!0),ET(t,Wi(t,!1,e)),r=o=t.position):t.position===t.lineStart&&KP(t)?Sr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}Sr(t,"unexpected end of the stream within a double quoted scalar")}function r6e(t,e){var r=!0,o,a=t.tag,n,u=t.anchor,A,p,h,E,I,v={},x,C,F,N;if(N=t.input.charCodeAt(t.position),N===91)p=93,I=!1,n=[];else if(N===123)p=125,I=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),N=t.input.charCodeAt(++t.position);N!==0;){if(Wi(t,!0,e),N=t.input.charCodeAt(t.position),N===p)return t.position++,t.tag=a,t.anchor=u,t.kind=I?"mapping":"sequence",t.result=n,!0;r||Sr(t,"missed comma between flow collection entries"),C=x=F=null,h=E=!1,N===63&&(A=t.input.charCodeAt(t.position+1),Ia(A)&&(h=E=!0,t.position++,Wi(t,!0,e))),o=t.line,gy(t,e,jP,!1,!0),C=t.tag,x=t.result,Wi(t,!0,e),N=t.input.charCodeAt(t.position),(E||t.line===o)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),Wi(t,!0,e),gy(t,e,jP,!1,!0),F=t.result),I?hy(t,n,v,C,x,F):h?n.push(hy(t,null,v,C,x,F)):n.push(x),Wi(t,!0,e),N=t.input.charCodeAt(t.position),N===44?(r=!0,N=t.input.charCodeAt(++t.position)):r=!1}Sr(t,"unexpected end of the stream within a flow collection")}function n6e(t,e){var r,o,a=mT,n=!1,u=!1,A=e,p=0,h=!1,E,I;if(I=t.input.charCodeAt(t.position),I===124)o=!1;else if(I===62)o=!0;else return!1;for(t.kind="scalar",t.result="";I!==0;)if(I=t.input.charCodeAt(++t.position),I===43||I===45)mT===a?a=I===43?sK:jHe:Sr(t,"repeat of a chomping mode identifier");else if((E=VHe(I))>=0)E===0?Sr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?Sr(t,"repeat of an indentation width identifier"):(A=e+E-1,u=!0);else break;if($g(I)){do I=t.input.charCodeAt(++t.position);while($g(I));if(I===35)do I=t.input.charCodeAt(++t.position);while(!qu(I)&&I!==0)}for(;I!==0;){for(yT(t),t.lineIndent=0,I=t.input.charCodeAt(t.position);(!u||t.lineIndent<A)&&I===32;)t.lineIndent++,I=t.input.charCodeAt(++t.position);if(!u&&t.lineIndent>A&&(A=t
`,n?1+p:p),n=!0,u=!0,p=0,r=t.position;!qu(I)&&I!==0;)I=t.input.charCodeAt(++t.position);Yp(t,r,t.position,!1)}return!0}function uK(t,e){var r,o=t.tag,a=t.anchor,n=[],u,A=!1,p;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(t.position);p!==0&&!(p!==45||(u=t.input.charCodeAt(t.position+1),!Ia(u)));){if(A=!0,t.position++,Wi(t,!0,-1)&&t.lineIndent<=e){n.push(null),p=t.input.charCodeAt(t.position);continue}if(r=t.line,gy(t,e,hK,!1,!0),n.push(t.result),Wi(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&p!==0)Sr(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return A?(t.tag=o,t.anchor=a,t.kind="sequence",t.result=n,!0):!1}function i6e(t,e,r){var o,a,n,u,A=t.tag,p=t.anchor,h={},E={},I=null,v=null,x=null,C=!1,F=!1,N;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),N=t.input.charCodeAt(t.position);N!==0;){if(o=t.input.charCodeAt(t.position+1),n=t.line,u=t.position,(N===63||N===58)&&Ia(o))N===63?(C&&(hy(t,h,E,I,v,null),I=v=x=null),F=!0,C=!0,a=!0):C?(C=!1,a=!0):Sr(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,N=o;else if(gy(t,r,pK,!1,!0))if(t.line===n){for(N=t.input.charCodeAt(t.position);$g(N);)N=t.input.charCodeAt(++t.position);if(N===58)N=t.input.charCodeAt(++t.position),Ia(N)||Sr(t,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(hy(t,h,E,I,v,null),I=v=x=null),F=!0,C=!1,a=!1,I=t.tag,v=t.result;else if(F)Sr(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=A,t.anchor=p,!0}else if(F)Sr(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=A,t.anchor=p,!0;else break;if((t.line===n||t.lineIndent>e)&&(gy(t,e,YP,!0,a)&&(C?v=t.result:x=t.result),C||(hy(t,h,E,I,v,x,n,u),I=v=x=null),Wi(t,!0,-1),N=t.input.charCodeAt(t.position)),t.lineIndent>e&&N!==0)Sr(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return C&&hy(t,h,E,I,v,null),F&&(t.tag=A,t.anchor=p,t.kind="mapping",t.result=h),F}function s6e(t){var e,r=!1,o=!1,a,n,u;if(u=t.input.charCodeAt(t.position),u!==33)return!1;if(t.tag!==null&&Sr(t,"duplication of a tag property"),u=t.input.charCodeAt(++t.position),u===60?(r=!0,u=t.input.charCodeAt(++t.position)):u===33?(o=!0,a="!!",u=t.input.charCodeAt(++t.position)):a="!",e=t.position,r){do u=t.input.charCodeAt(++t.position);while(u!==0&&u!==62);t.position<t.length?(n=t.input.slice(e,t.position),u=t.input.charCodeAt(++t.position)):Sr(t,"unexpected end of the stream within a verbatim tag")}else{for(;u!==0&&!Ia(u);)u===33&&(o?Sr(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(e-1,t.position+1),gK.test(a)||Sr(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),u=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),KHe.test(n)&&Sr(t,"tag suffix cannot contain flow indicator characters")}return n&&!dK.test(n)&&Sr(t,"tag name cannot contain such characters: "+n),r?t.tag=n:Wp.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a==="!"?t.tag="!"+n:a==="!!"?t.tag="tag:yaml.org,2002:"+n:Sr(t,'undeclared tag handle "'+a+'"'),!0}function o6e(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Sr(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Ia(r)&&!py(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Sr(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function a6e(t){var e,r,o;if(o=t.input.charCodeAt(t.position),o!==42)return!1;for(o=t.input.charCodeAt(++t.position),e=t.position;o!==0&&!Ia(o)&&!py(o);)o=t.input.charCodeAt(++t.position);return t.position===e&&Sr(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Wp.call(t.anchorMap,r)||Sr(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Wi(t,!0,-1),!0}function gy(t,e,r,o,a){var n,u,A,p=1,h=!1,E=!1,I,v,x,C,F;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new ZHe(t,e),o=t.indexOf("\0");for(o!==-1&&(r.position=o,Sr(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)l6e(r);return r.documents}function wK(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var o=CK(t,r);if(typeof e!="function")return o;for(var a=0,n=o.length;a<n;a+=1)e(o[a])}function IK(t,e){var r=CK(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new AK("expected a single document in the stream, but found more")}}function c6e(t,e,r){return typeof e=="object"&&e!==null&&typeof r>"u"&&(r=e,e=null),wK(t,e,yf.extend({schema:fK},r))}function u6e(t,e){return IK(t,yf.extend({schema:fK},e))}Vw.exports.loadAll=wK;Vw.exports.load=IK;Vw.exports.safeLoadAll=c6e;Vw.exports.safeLoad=u6e});var WK=_((hxt,BT)=>{"use strict";var Zw=Jg(),$w=uy(),A6e=Jw(),f6e=fy(),QK=Object.prototype.toString,RK=Object.prototype.hasOwnProperty,p6e=9,Xw=10,h6e=13,g6e=32,d6e=33,m6e=34,FK=35,y6e=37,E6e=38,C6e=39,w6e=42,TK=44,I6e=45,LK=58,B6e=61,v6e=62,P6e=63,D6e=64,NK=91,OK=93,S6e=96,MK=123,b6e=124,UK=125,Bo={};Bo[0]="\\0";Bo[7]="\\a";Bo[8]="\\b";Bo[9]="\\t";Bo[10]="\\n";Bo[11]="\\v";Bo[12]="\\f";Bo[13]="\\r";Bo[27]="\\e";Bo[34]='\\"';Bo[92]="\\\\";Bo[133]="\\N";Bo[160]="\\_";Bo[8232]="\\L";Bo[8233]="\\P";var x6e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function k6e(t,e){var r,o,a,n,u,A,p;if(e===null)return{};for(r={},o=Object.keys(e),a=0,n=o.length;a<n;a+=1)u=o[a],A=String(e[u]),u.slice(0,2)==="!!"&&(u="tag:yaml.org,2002:"+u.slice(2)),p=t.compiledTypeMap.fallback[u],p&&RK.call(p.styleAliases,A)&&(A=p.styleAliases[A]),r[u]=A;return r}function vK(t){var e,r,o;if(e=t.toString(16).toUpperCase(),t<=255)r="x",o=2;else if(t<=65535)r="u",o=4;else if(t<=4294967295)r="U",o=8;else throw new $w("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Zw.repeat("0",o-e.length)+e}function Q6e(t){this.schema=t.schema||A6e,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Zw.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=k6e(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function PK(t,e){for(var r=Zw.repeat(" ",e),o=0,a=-1,n="",u,A=t.length;o<A;)a=t.indexOf(`
-${nD(r)}`).join("")}`)}functionid(t,e,r){if(typeofr>"u")returne;leto=[],a=[],n=A=>{letp=e;returne=A,n.bind(null,p)};if(!r(e,{errors:o,coercions:a,coercion:n}))throwrI(`Invalid value for ${t}`,o);for(let[,A]ofa)A();returne}vartI,Ef=Et(()=>{rD();tI=Symbol("clipanion/isOption")});varKo={};zt(Ko,{KeyRelationship:()=>Yu,TypeAssertionError:()=>zp,applyCascade:()=>sI,as:()=>Eqe,assert:()=>dqe,assertWithErrors:()=>mqe,cascade:()=>aD,fn:()=>Cqe,hasAtLeastOneKey:()=>MT,hasExactLength:()=>dz,hasForbiddenKeys:()=>Uqe,hasKeyRelationship:()=>aI,hasMaxLength:()=>Iqe,hasMinLength:()=>wqe,hasMutuallyExclusiveKeys:()=>_qe,hasRequiredKeys:()=>Mqe,hasUniqueItems:()=>Bqe,isArray:()=>iD,isAtLeast:()=>NT,isAtMost:()=>Dqe,isBase64:()=>Tqe,isBoolean:()=>lqe,isDate:()=>uqe,isDict:()=>pqe,isEnum:()=>Js,isHexColor:()=>Fqe,isISO8601:()=>Rqe,isInExclusiveRange:()=>bqe,isInInclusiveRange:()=>Sqe,isInstanceOf:()=>gqe,isInteger:()=>OT,isJSON:()=>Lqe,isLiteral:()=>pz,isLowerCase:()=>xqe,isMap:()=>fqe,isNegative:()=>vqe,isNullable:()=>Oqe,isNumber:()=>TT,isObject:()=>hz,isOneOf:()=>LT,isOptional:()=>Nqe,isPartial:()=>hqe,isPayload:()=>cqe,isPositive:()=>Pqe,isRecord:()=>oD,isSet:()=>Aqe,isString:()=>Ey,isTuple:()=>sD,isUUID4:()=>Qqe,isUnknown:()=>FT,isUpperCase:()=>kqe,makeTrait:()=>gz,makeValidator:()=>Hr,matchesRegExp:()=>iI,softAssert:()=>yqe});functionqn(t){returnt===null?"null":t===void0?"undefined":t===""?"an empty string":typeoft=="symbol"?`<${t.toString()}>`:Array.isArray(t)?"an array":JSON.stringify(t)}functionyy(t,e){if(t.length===0)return"nothing";if(t.length===1)returnqn(t[0]);letr=t.slice(0,-1),o=t[t.length-1],a=t.length>2?`, ${e}`:`${e}`;return`${r.map(n=>qn(n)).join(", ")}${a}${qn(o)}`}functionKp(t,e){varr,o,a;returntypeofe=="number"?`${(r=t?.p)!==null&&r!==void0?r:"."}[${e}]`:tqe.test(e)?`${(o=t?.p)!==null&&o!==void0?o:""}.${e}`:`${(a=t?.p)!==null&&a!==void0?a:"."}[${JSON.stringify(e)}]`}functionRT(t,e,r){returnt===1?e:r}functionpr({errors:t,p:e}={},r){returnt?.push(`${e??"."}: ${r}`),!1}functionoqe(t,e){returnr=>{t[e]=r}}functionWu(t,e){returnr=>{leto=t[e];returnt[e]=r,Wu(t,e).bind(null,o)}}functionnI(t,e,r){leto=()=>(t(r()),a),a=()=>(t(e),o);returno}functionFT(){returnHr({test:(t,e)=>!0})}functionpz(t){returnHr({test:(e,r)=>e!==t?pr(r,`Expected ${qn(t)} (got ${qn(e)})`):!0})}functionEy(){returnHr({test:(t,e)=>typeoft!="string"?pr(e,`Expected a string (got ${qn(t)})`):!0})}functionJs(t){lete=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeofa=="string"||typeofa=="number"),o=newSet(e);returno.size===1?pz([...o][0]):Hr({test:(a,n)=>o.has(a)?!0:r?pr(n,`Expected one of ${yy(e,"or")} (got ${qn(a)})`):pr(n,`Expected a valid enumeration value (got ${qn(a)})`)})}functionlqe(){returnHr({test:(t,e)=>{varr;if(typeoft!="boolean"){if(typeofe?.coercions<"u"){if(typeofe?.coercion>"u")returnpr(e,"Unbound coercion result");leto=aqe.get(t);if(typeofo<"u")returne.coercions.push([(r=e.p)!==null&&r!==void0?r:".",e.coercion.bind(null,o)]),!0}returnpr(e,`Expected a boolean (got ${qn(t)})`)}return!0}})}functionTT(){returnHr({test:(t,e)=>{varr;if(typeoft!="number"){if(typeofe?.coercions<"u"){if(typeofe?.coercion>"u")returnpr(e,"Unbound coercion result");leto;if(typeoft=="string"){leta;try{a=JSON.parse(t)}catch{}if(typeofa=="number")if(JSON.stringify(a)===t)o=a;elsereturnpr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeofo<"u")returne.coercions.push([(r=e.p)!==null&&r!==void0?r:".",e.coercion.bind(null,o)]),!0}returnpr(e,`Expected a number (got ${qn(t)})`)}return!0}})}functioncqe(t){returnHr({test:(e,r)=>{varo;if(typeofr?.coercions>"u")returnpr(r,"The isPayload predicate can only be used with coercion enabled");if(typeofr.coercion>"u")returnpr(r,"Unbound coercion result");if(typeofe!="string")returnpr(r,`Expected a string (got ${qn(e)})`);leta;try{a=JSON.parse(e)}catch{returnpr(r,`Expected a JSON string (got ${qn(e)})`)}letn={value:a};returnt(a,Object.assign(Object.assign({},r),{coercion:Wu(n,"value")}))?(r.coercions.push([
-${o}`}super(r)}};oI={missing:(t,e)=>t.has(e),undefined:(t,e,r)=>t.has(e)&&typeof r[e]<"u",nil:(t,e,r)=>t.has(e)&&r[e]!=null,falsy:(t,e,r)=>t.has(e)&&!!r[e]};(function(t){t.Forbids="Forbids",t.Requires="Requires"})(Yu||(Yu={}));Hqe={[Yu.Forbids]:{expect:!1,message:"forbids using"},[Yu.Requires]:{expect:!0,message:"requires using"}}});var it,Jp=Et(()=>{Ef();it=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:u}=await Promise.resolve().then(()=>($a(),Ko)),A=u(a(n()),r),p=[],h=[];if(!A(this,{errors:p,coercions:h}))throw rI("Invalid option schema",p);for(let[,I]of h)I()}else if(r!=null)throw new Error("Invalid command schema");let o=await this.execute();return typeof o<"u"?o:0}};it.isOption=tI;it.Default=[]});function va(t){bT&&console.log(t)}function yz(){let t={nodes:[]};for(let e=0;e<un.CustomNode;++e)t.nodes.push(el());return t}function qqe(t){let e=yz(),r=[],o=e.nodes.length;for(let a of t){r.push(o);for(let n=0;n<a.nodes.length;++n)Cz(n)||e.nodes.push(Vqe(a.nodes[n],o));o+=a.nodes.length-un.CustomNode+1}for(let a of r)Cy(e,un.InitialNode,a);return e}function Mc(t,e){return t.nodes.push(e),t.nodes.length-1}function Gqe(t){let e=new Set,r=o=>{if(e.has(o))return;e.add(o);let a=t.nodes[o];for(let u of Object.values(a.statics))for(let{to:A}of u)r(A);for(let[,{to:u}]of a.dynamics)r(u);for(let{to:u}of a.shortcuts)r(u);let n=new Set(a.shortcuts.map(({to:u})=>u));for(;a.shortcuts.length>0;){let{to:u}=a.shortcuts.shift(),A=t.nodes[u];for(let[p,h]of Object.entries(A.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let I of h)E.some(({to:v})=>I.to===v)||E.push(I)}for(let[p,h]of A.dynamics)a.dynamics.some(([E,{to:I}])=>p===E&&h.to===I)||a.dynamics.push([p,h]);for(let p of A.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(un.InitialNode)}function jqe(t,{prefix:e=""}={}){if(bT){va(`${e}Nodesare:`);for(let r=0;r<t.nodes.length;++r)va(`${e}${r}:${JSON.stringify(t.nodes[r])}`)}}function Yqe(t,e,r=!1){va(`Runningavmon${JSON.stringify(e)}`);let o=[{node:un.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];jqe(t,{prefix:" "});let a=[Hn.StartOfInput,...e];for(let n=0;n<a.length;++n){let u=a[n],A=u===Hn.EndOfInput||u===Hn.EndOfPartialInput,p=n-1;va(`Processing${JSON.stringify(u)}`);let h=[];for(let{node:E,state:I}of o){va(`Currentnodeis${E}`);let v=t.nodes[E];if(E===un.ErrorNode){h.push({node:E,state:I});continue}console.assert(v.shortcuts.length===0,"Shortcuts should have been eliminated by now");let x=Object.prototype.hasOwnProperty.call(v.statics,u);if(!r||n<a.length-1||x)if(x){let C=v.statics[u];for(let{to:F,reducer:N}of C)h.push({node:F,state:typeof N<"u"?lD(_T,N,I,u,p):I}),va(`Statictransitionto${F}found`)}else va(" No static transition found");else{let C=!1;for(let F of Object.keys(v.statics))if(!!F.startsWith(u)){if(u===F)for(let{to:N,reducer:U}of v.statics[F])h.push({node:N,state:typeof U<"u"?lD(_T,U,I,u,p):I}),va(`Statictransitionto${N}found`);else for(let{to:N}of v.statics[F])h.push({node:N,state:{...I,remainder:F.slice(u.length)}}),va(`Statictransitionto${N}found(partialmatch)`);C=!0}C||va(" No partial static transition found")}if(!A)for(let[C,{to:F,reducer:N}]of v.dynamics)lD(Xqe,C,I,u,p)&&(h.push({node:F,state:typeof N<"u"?lD(_T,N,I,u,p):I}),va(`Dynamictransitionto${F}found(via${C})`))}if(h.length===0&&A&&e.length===1)return[{node:un.InitialNode,state:mz}];if(h.length===0)throw new my(e,o.filter(({node:E})=>E!==un.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===un.ErrorNode))throw new my(e,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));o=Kqe(h)}if(o.length>0){va(" Results:");for(let n of o)va(`-${n.node}->${JSON.stringify(n.state)}`)}els
`);let r=0;for(let o of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[o].commandClass,{prefix:`${r++}.`.padStart(5)}));this.context.stdout.write(`
`;for(let v of h){let x=p.get(v).slice().sort((F,N)=>F.usage.localeCompare(N.usage,"en",{usage:"sort",caseFirst:"upper"})),C=v!==null?v.trim():"General commands";A+=`
`,A+=vo("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return A}error(e,r){var o,{colored:a,command:n=(o=e[Dz])!==null&&o!==void 0?o:null}=r===void 0?{}:r;(!e||typeof e!="object"||!("stack"in e))&&(e=new Error(`Executionfailedwithanon-errorrejection(rejectedvalue:${JSON.stringify(e)})`));let u="",A=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");A==="Error"&&(A="Internal Error"),u+=`${this.format(a).error(A)}:${e.message}
`),n=n.replace(/\\r/g,"\r")),e[a]=n}return e}function oGe(t){let e=Xz(t),r=ks.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA:Cannotparse${e}foranunknownreason`);let o=Vz(t).split(","),a=o.length,n;for(let u=0;u<a;u++)try{let A=o[u].trim(),p=cGe(r,A);n=ks.decrypt(p.ciphertext,p.key);break}catch(A){if(u+1>=a)throw A}return ks.parse(n)}function aGe(t){console.log(`[dotenv@${WT}][INFO]${t}`)}function lGe(t){console.log(`[dotenv@${WT}][WARN]${t}`)}function jT(t){console.log(`[dotenv@${WT}][DEBUG]${t}`)}function Vz(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function cGe(t,e){let r;try{r=new URL(e)}catch(A){throw A.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):A}let o=r.password;if(!o)throw new Error("INVALID_DOTENV_KEY: Missing key part");let a=r.searchParams.get("environment");if(!a)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let n=`DOTENV_VAULT_${a.toUpperCase()}`,u=t.parsed[n];if(!u)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT:Cannotlocateenvironment${n}inyour.env.vaultfile.`);return{ciphertext:u,key:o}}function Xz(t){let e=YT.resolve(process.cwd(),".env");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(".vault")?e:`${e}.vault`}function uGe(t){return t[0]==="~"?YT.join(tGe.homedir(),t.slice(1)):t}function AGe(t){aGe("Loading env from encrypted .env.vault");let e=ks._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),ks.populate(r,e,t),{parsed:e}}function fGe(t){let e=YT.resolve(process.cwd(),".env"),r="utf8",o=Boolean(t&&t.debug);t&&(t.path!=null&&(e=uGe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=ks.parse(Jz.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),ks.populate(n,a,t),{parsed:a}}catch(a){return o&&jT(`Failedtoload${e}${a.message}`),{error:a}}}function pGe(t){let e=Xz(t);return Vz(t).length===0?ks.configDotenv(t):Jz.existsSync(e)?ks._configVault(t):(lGe(`YousetDOTENV_KEYbutyouaremissinga.env.vaultfileat${e}.Didyouforgettobuildit?`),ks.configDotenv(t))}function hGe(t,e){let r=Buffer.from(e.slice(-64),"hex"),o=Buffer.from(t,"base64"),a=o.slice(0,12),n=o.slice(-16);o=o.slice(12,-16);try{let u=rGe.createDecipheriv("aes-256-gcm",r,a);return u.setAuthTag(n),`${u.update(o)}${u.final()}`}catch(u){let A=u instanceof RangeError,p=u.message==="Invalid key length",h=u.message==="Unsupported state or unable to authenticate data";if(A||p){let E="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(E)}else if(h){let E="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(E)}else throw console.error("Error: ",u.code),console.error("Error: ",u.message),u}}function gGe(t,e,r={}){let o=Boolean(r&&r.debug),a=Boolean(r&&r.override);if(typeof e!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(t,n)?(a===!0&&(t[n]=e[n]),o&&jT(a===!0?`"${n}"isalreadydefinedandWASoverwritten`:`"${n}"isalreadydefinedandwasNOToverwritten`)):t[n]=e[n]}var ks={configDotenv:fGe,_configVault:AGe,_parseVault:oGe,config:pGe,decrypt:hGe,parse:sGe,populate:gGe};Cf.exports.configDotenv=ks.configDotenv;Cf.exports._configVault=ks._configVault;Cf.exports._parseVault=ks._parseVault;Cf.exports.config=ks.config;Cf.exports.decrypt=ks.decrypt;Cf.exports.parse=ks.parse;Cf.exports.populate=ks.populate;Cf.exports=ks});var eJ=_((Rkt,$z)=>{"use strict";$z.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var sd=_((Fkt,KT)=>{"use strict";var dGe=eJ(),tJ=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,o=()=>{r--,e.length>0&&e.shift()()},a=(A,p,...h)=>{r++;let E=dGe(A,...h);p(E),E.then(o,o)},n=(A,p,...h)=>{r<t?a(A,p,...h):e.push(a.bind(null,A,p,...h))},u=(A,...p)=>new Promise(h=>
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function IX(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):T5e.get(t)||t}function L5e(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(R5e))r.push(a[2].replace(F5e,(A,p,h)=>p?IX(p):h));else throw new Error(`InvalidChalktemplatestyleargument:${n}(instyle'${t}')`)}return r}function N5e(t){CX.lastIndex=0;let e=[],r;for(;(r=CX.exec(t))!==null;){let o=r[1];if(r[2]){let a=L5e(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function wX(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`UnknownChalkstyle:${a}`);o=n.length>0?o[a](...n):o[a]}return o}BX.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(Q5e,(n,u,A,p,h,E)=>{if(u)a.push(IX(u));else if(p){let I=a.join("");a=[],o.push(r.length===0?I:wX(t,r)(I)),r.push({inverse:A,styles:N5e(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(wX(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),o.push(a.join("")),r.length>0){let n=`Chalktemplateliteralismissing${r.length}closingbracket${r.length===1?"":"s"}(\`}\`)`;thrownewError(n)}returno.join("")}});varBL=_((MQt,bX)=>{"use strict";varvI=BI(),{stdout:EL,stderr:CL}=mL(),{stringReplaceAll:O5e,stringEncaseCRLFWithFirstIndex:M5e}=EX(),PX=["ansi","ansi","ansi256","ansi16m"],Qy=Object.create(null),U5e=(t,e={})=>{if(e.level>3||e.level<0)thrownewError("The `level` option should be an integer from 0 to 3");letr=EL?EL.level:0;t.level=e.level===void0?r:e.level},wL=class{constructor(e){returnDX(e)}},DX=t=>{lete={};returnU5e(e,t),e.template=(...r)=>q5e(e.template,...r),Object.setPrototypeOf(e,xD.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{thrownewError("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=wL,e.template};functionxD(t){returnDX(t)}for(let[t,e]ofObject.entries(vI))Qy[t]={get(){letr=kD(this,IL(e.open,e.close,this._styler),this._isEmpty);returnObject.defineProperty(this,t,{value:r}),r}};Qy.visible={get(){lett=kD(this,this._styler,!0);returnObject.defineProperty(this,"visible",{value:t}),t}};varSX=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(lettofSX)Qy[t]={get(){let{level:e}=this;returnfunction(...r){leto=IL(vI.color[PX[e]][t](...r),vI.color.close,this._styler);returnkD(this,o,this._isEmpty)}}};for(lettofSX){lete="bg"+t[0].toUpperCase()+t.slice(1);Qy[e]={get(){let{level:r}=this;returnfunction(...o){leta=IL(vI.bgColor[PX[r]][t](...o),vI.bgColor.close,this._styler);returnkD(this,a,this._isEmpty)}}}}var_5e=Object.defineProperties(()=>{},{...Qy,level:{enumerable:!0,get(){returnthis._generator.level},set(t){this._generator.level=t}}}),IL=(t,e,r)=>{leto,a;returnr===void0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},kD=(t,e,r)=>{leto=(...a)=>H5e(o,a.length===1?""+a[0]:a.join(" "));returno.__proto__=_5e,o._generator=t,o._styler=e,o._isEmpty=r,o},H5e=(t,e)=>{if(t.level<=0||!e)returnt._isEmpty?"":e;letr=t._styler;if(r===void0)returne;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void0;)e=O5e(e,r.close,r.open),r=r.parent;letn=e.indexOf(`
Pleasereportthistohttps://github.com/szmarczak/http2-wrapper/`);C(F)}return}o[0].resolve(x);return}}if(u in this.queue){if(A in this.queue[u]){this.queue[u][A].listeners.push(...o),this._tryToCreateNewSession(u,A);return}}else this.queue[u]={};let p=()=>{u in this.queue&&this.queue[u][A]===h&&(delete this.queue[u][A],Object.keys(this.queue[u]).length===0&&delete this.queue[u])},h=()=>{let E=`${A}:${u}`,I=!1;try{let v=Xnt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});v[ea]=0,v[BE]=!1;let x=()=>v[ea]<v.remoteSettings.maxConcurrentStreams,C=!0;v.socket.once("session",N=>{this.tlsSessionCache.set(E,N)}),v.once("error",N=>{for(let{reject:U}of o)U(N);this.tlsSessionCache.delete(E)}),v.setTimeout(this.timeout,()=>{v.destroy()}),v.once("close",()=>{if(I){C&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[u];N.splice(N.indexOf(v),1),N.length===0&&delete this.sessions[u]}else{let N=new Error("Session closed without receiving a SETTINGS frame");N.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of o)U(N);p()}this._tryToCreateNewSession(u,A)});let F=()=>{if(!(!(u in this.queue)||!x())){for(let N of v[Kl])if(N in this.queue[u]){let{listeners:U}=this.queue[u][N];for(;U.length!==0&&x();)U.shift().resolve(v);let J=this.queue[u];if(J[N].listeners.length===0&&(delete J[N],Object.keys(J).length===0)){delete this.queue[u];break}if(!x())break}}};v.on("origin",()=>{v[Kl]=v.originSet,x()&&(F(),KM(this.sessions[u],v))}),v.once("remoteSettings",()=>{if(v.ref(),v.unref(),this._sessionsCount++,h.destroyed){let N=new Error("Agent has been destroyed");for(let U of o)U.reject(N);v.destroy();return}v[Kl]=v.originSet;{let N=this.sessions;if(u in N){let U=N[u];U.splice(eit(U,v,tit),0,v)}else N[u]=[v]}this._freeSessionsCount+=1,I=!0,this.emit("session",v),F(),p(),v[ea]===0&&this._freeSessionsCount>this.maxFreeSessions&&v.close(),o.length!==0&&(this.getSession(A,r,o),o.length=0),v.on("remoteSettings",()=>{F(),KM(this.sessions[u],v)})}),v[joe]=v.request,v.request=(N,U)=>{if(v[BE])throw new Error("The session is gracefully closing. No new streams are allowed.");let J=v[joe](N,U);return v.ref(),++v[ea],v[ea]===v.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,J.once("close",()=>{if(C=x(),--v[ea],!v.destroyed&&!v.closed&&(rit(this.sessions[u],v),x()&&!v.closed)){C||(this._freeSessionsCount++,C=!0);let te=v[ea]===0;te&&v.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||v[BE])?v.close():(KM(this.sessions[u],v),F())}}),J}}catch(v){for(let x of o)x.reject(v);p()}};h.listeners=o,h.completed=!1,h.destroyed=!1,this.queue[u][A]=h,this._tryToCreateNewSession(u,A)})}request(e,r,o,a){return new Promise((n,u)=>{this.getSession(e,r,[{reject:u,resolve:A=>{try{n(A.request(o,a))}catch(p){u(p)}}}])})}createConnection(e,r){return rA.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let o=e.port||443,a=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=a),Vnt.connect(o,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[ea]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let o of r)o.destroy(e);for(let r of Object.values(this.queue))for(let o of Object.values(r))o.destroyed=!0;this.queue={}}get freeSessions(){return Yoe({agent:this,isFree:!0})}get busySessions(){return Yoe({agent:this,isFree:!1})}};rA.kCurrentStreamsCount=ea;rA.kGracefullyClosing=BE;Koe.exports={Agent:rA,globalAgent:new rA}});var VM=_((NNt,zoe)=>{"use strict";var{Readable:nit}=ve("stream"),JM=class extends nit{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"
`);return{stdout:n,stderr:u}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let o of r.resolvers||[])e.push(new o);return new Pd([new u1,new Xn,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let o of r.fetchers||[])e.push(new o);return new fE([new pE,new gE,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let o of r.linkers||[])e.push(new o);return e}getSupportedArchitectures(){let e=v1(),r=this.get("supportedArchitectures"),o=r.get("os");o!==null&&(o=o.map(u=>u==="current"?e.os:u));let a=r.get("cpu");a!==null&&(a=a.map(u=>u==="current"?e.cpu:u));let n=r.get("libc");return n!==null&&(n=ol(n,u=>u==="current"?e.libc??ol.skip:u)),{os:o,cpu:a,libc:n}}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let e=this.packageExtensions,r=(o,a,{userProvided:n=!1}={})=>{if(!xa(o.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let u=new Ot;u.load(a,{yamlCompatibilityMode:!0});let A=WI(e,o.identHash),p=[];A.push([o.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:o};for(let E of u.dependencies.values())p.push({...h,type:"Dependency",descriptor:E});for(let E of u.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:E});for(let[E,I]of u.peerDependenciesMeta)for(let[v,x]of Object.entries(I))p.push({...h,type:"PeerDependencyMeta",selector:E,key:v,value:x})};await this.triggerHook(o=>o.registerPackageExtensions,this,r);for(let[o,a]of this.get("packageExtensions"))r(sh(o,!0),iS(a),{userProvided:!0});return e}normalizeLocator(e){return xa(e.reference)?Fs(e,`${this.get("defaultProtocol")}${e.reference}`):kE.test(e.reference)?Fs(e,`${this.get("defaultProtocol")}${e.reference}`):e}normalizeDependency(e){return xa(e.range)?In(e,`${this.get("defaultProtocol")}${e.range}`):kE.test(e.range)?In(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,o])=>[r,this.normalizeDependency(o)]))}normalizePackage(e,{packageExtensions:r}){let o=e1(e),a=r.get(e.identHash);if(typeof a<"u"){let u=e.version;if(u!==null){for(let[A,p]of a)if(!!kf(u,A))for(let h of p)switch(h.status==="inactive"&&(h.status="redundant"),h.type){case"Dependency":typeof o.dependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",o.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case"PeerDependency":typeof o.peerDependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",o.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case"PeerDependencyMeta":{let E=o.peerDependenciesMeta.get(h.selector);(typeof E>"u"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status="active",al(o.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:CN(h)}}}let n=u=>u.scope?`${u.scope}__${u.name}`:`${u.name}`;for(let u of o.peerDependenciesMeta.keys()){let A=Zo(u);o.peerDependencies.has(A.identHash)||o.peerDependencies.set(A.identHash,In(A,"*"))}for(let u of o.peerDependencies.values()){if(u.scope==="types")continue;let A=n(u),p=tA("types",A),h=rn(p);o.peerDependencies.has(p.identHash)||o.peerDependenciesMeta.has(h)||(o.peerDependencies.set(p.identHash,In(p,"*")),o.peerDependenciesMeta.set(h,{optional:!0}))}return o.dependencies=new Map(Rs(o.dependencies,([,u])=>Sa(u))),o.peerDependencies=new Map(Rs(o.peerDependencies,([,u])=>Sa(u))),o}getLimit(e){return al(this.limits,e,()=>(0,xle.default)(this.get(e)))}async triggerHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);!n||await n(...r)}}async triggerMultipleHooks(e,r){for(let o of r)await this.triggerHook(e,...o)}async reduceHook(e,r,...o){let a=r;for(let n of this.plugins.values()){let u=n.hooks;if(!u)continue;let A=e(u);!A||(a=await A(a,...o))}return a}async firstHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);if(!n)continue;let u=await n(...r);if(typeof u<"u")return u}return null}},Ke=nA;Ke.deleteProperty=Symbol(),Ke.telemetry=null});va
`,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0echo'"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}});var ll,Wle=Et(()=>{ll=class extends Error{constructor(e){super(e),this.name="ShellError"}}});var Ob={};zt(Ob,{fastGlobOptions:()=>Jle,isBraceExpansion:()=>oU,isGlobPattern:()=>pot,match:()=>hot,micromatchOptions:()=>Nb});function pot(t){if(!Lb.default.scan(t,Nb).isGlob)return!1;try{Lb.default.parse(t,Nb)}catch{return!1}return!0}function hot(t,{cwd:e,baseFs:r}){return(0,Kle.default)(t,{...Jle,cwd:ue.fromPortablePath(e),fs:FP(zle.default,new Gp(r))})}function oU(t){return Lb.default.scan(t,Nb).isBrace}var Kle,zle,Lb,Nb,Jle,Vle=Et(()=>{Dt();Kle=Ze(TS()),zle=Ze(ve("fs")),Lb=Ze(Xo()),Nb={strictBrackets:!0},Jle={onlyDirectories:!1,onlyFiles:!1}});function aU(){}function lU(){for(let t of kd)t.kill()}function ece(t,e,r,o){return a=>{let n=a[0]instanceof sA.Transform?"pipe":a[0],u=a[1]instanceof sA.Transform?"pipe":a[1],A=a[2]instanceof sA.Transform?"pipe":a[2],p=(0,Zle.default)(t,e,{...o,stdio:[n,u,A]});return kd.add(p),kd.size===1&&(process.on("SIGINT",aU),process.on("SIGTERM",lU)),a[0]instanceof sA.Transform&&a[0].pipe(p.stdin),a[1]instanceof sA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof sA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",E=>{switch(kd.delete(p),kd.size===0&&(process.off("SIGINT",aU),process.off("SIGTERM",lU)),E.code){case"ENOENT":a[2].write(`commandnotfound:${t}
`),this.writeProgress()}writeLines(r,{truncate:o}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:o})}
`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let o of r)o.committed=!0,o.action()}clearProgress({delta:r=0,clear:o=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||o)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>Yce&&(this.progressFrame=(this.progressFrame+1)%jce.length,this.progressTime=r);let o=jce[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=`${h}${E}`}let u=this.formatName(null),A=u?`${u}:`:"",p=a.definition.title?`${a.definition.title}`:"";this.stdout.write(`${Ut(this.configuration,"\u27A4","blueBright")}${A}${o}${n}${p}
`,{mode:493})}async function $ce(t){let e=await Ot.tryFind(t);if(e?.packageManager){let o=_S(e.packageManager);if(o?.name){let a=`found${JSON.stringify({packageManager:e.packageManager})}inmanifest`,[n]=o.reference.split(".");switch(o.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await oe.readFilePromise(z.join(t,dr.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:oe.existsSync(z.join(t,"package-lock.json"))?{packageManager:"npm",reason:`foundnpm's "package-lock.json" lockfile`}:oe.existsSync(z.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's"pnpm-lock.yaml"lockfile`}:null}async function U1({project:t,locator:e,binFolder:r,ignoreCorepack:o,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let u={};for(let[E,I]of Object.entries(n))typeof I<"u"&&(u[E.toLowerCase()!=="path"?E:"PATH"]=I);let A=ue.fromPortablePath(r);u.BERRY_BIN_FOLDER=ue.fromPortablePath(A);let p=process.env.COREPACK_ROOT&&!o?ue.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([ph(r,"node",process.execPath),...nn!==null?[ph(r,"run",process.execPath,[p,"run"]),ph(r,"yarn",process.execPath,[p]),ph(r,"yarnpkg",process.execPath,[p]),ph(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),t&&(u.INIT_CWD=ue.fromPortablePath(t.configuration.startingCwd),u.PROJECT_CWD=ue.fromPortablePath(t.cwd)),u.PATH=u.PATH?`${A}${ue.delimiter}${u.PATH}`:`${A}`,u.npm_execpath=`${A}${ue.sep}yarn`,u.npm_node_execpath=`${A}${ue.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let E=t.tryWorkspaceByLocator(e),I=E?E.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";u.npm_package_name=rn(e),u.npm_package_version=I;let v;if(E)v=E.cwd;else{let x=t.storedPackages.get(e.locatorHash);if(!x)throw new Error(`Packagefor${qr(t.configuration,e)}notfoundintheproject`);let C=t.configuration.getLinkers(),F={project:t,report:new Ft({stdout:new hh.PassThrough,configuration:t.configuration})},N=C.find(U=>U.supportsPackage(x,F));if(!N)throw new Error(`Thepackage${qr(t.configuration,x)}isn'tsupportedbyanyoftheavailablelinkers`);v=await N.findPackageLocation(x,F)}u.npm_package_json=ue.fromPortablePath(z.join(v,dr.manifest))}let h=nn!==null?`yarn/${nn}`:`yarn/${Pf("@yarnpkg/core").version}-core`;return u.npm_config_user_agent=`${h}npm/?node/${process.version}${process.platform}${process.arch}`,a&&(u.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(E=>E.setupScriptEnvironment,t,u,async(E,I,v)=>await ph(r,E,I,v)),u}async function vat(t,e,{configuration:r,report:o,workspace:a=null,locator:n=null}){await Bat(async()=>{await oe.mktempPromise(async u=>{let A=z.join(u,"pack.log"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(A,{prefix:ue.fromPortablePath(t),report:o}),I=n&&qc(n)?r1(n):n,v=I?ba(I):"an external project";h.write(`Packing${v}fromsources
`}),A},o})});var fs={};zt(fs,{emitList:()=>sut,emitTree:()=>ipe,treeNodeToJson:()=>npe,treeNodeToTreeify:()=>rpe});function rpe(t,{configuration:e}){let r={},o=0,a=(n,u)=>{let A=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of A){if(!h)continue;let{label:E,value:I,children:v}=h,x=[];typeof E<"u"&&x.push(yd(e,E,2)),typeof I<"u"&&x.push(Ut(e,I[0],I[1])),x.length===0&&x.push(yd(e,`${p}`,2));let C=x.join(": ").trim(),F=`\0${o++}\0`,N=u[`${F}${C}`]={};typeof v<"u"&&a(v,N)}};if(typeof t.children>"u")throw new Error("The root node must only contain children");return a(t.children,r),r}function npe(t){let e=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Ed(r.value[0],r.value[1])}let o=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,u]of o)u&&(a[out(n)]=e(u));return typeof r.value>"u"?a:{value:Ed(r.value[0],r.value[1]),children:a}};return e(t)}function sut(t,{configuration:e,stdout:r,json:o}){let a=t.map(n=>({value:n}));ipe({children:a},{configuration:e,stdout:r,json:o})}function ipe(t,{configuration:e,stdout:r,json:o,separators:a=0}){if(o){let u=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let A of u)A&&r.write(`${JSON.stringify(npe(A))}
$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function out(t){return typeof t=="string"?t.replace(/^\0[0-9]+\0/,""):t}var tpe,spe=Et(()=>{tpe=Ze(epe());jl()});function s2(t){let e=t.match(aut);if(!e?.groups)throw new Error("Assertion failed: Expected the checksum to match the requested pattern");let r=e.groups.cacheVersion?parseInt(e.groups.cacheVersion):null;return{cacheKey:e.groups.cacheKey??null,cacheVersion:r,cacheSpec:e.groups.cacheSpec??null,hash:e.groups.hash}}var ope,l_,c_,zx,Nr,aut,u_=Et(()=>{je();Dt();Dt();iA();ope=ve("crypto"),l_=Ze(ve("fs"));Wl();ih();Gl();So();c_=Ky(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),zx=Ky(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Nr=class{constructor(e,{configuration:r,immutable:o=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,ope.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=o,this.check=a;let{cacheSpec:n,cacheKey:u}=Nr.getCacheKey(r);this.cacheSpec=n,this.cacheKey=u}static async find(e,{immutable:r,check:o}={}){let a=new Nr(e.get("cacheFolder"),{configuration:e,immutable:r,check:o});return await a.setup(),a}static getCacheKey(e){let r=e.get("compressionLevel"),o=r!=="mixed"?`c${r}`:"";return{cacheKey:[zx,o].join(""),cacheSpec:o}}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${oE(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=s2(r).hash.slice(0,10);return`${oE(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:o}=s2(e);if(r===null||r<c_)return!1;let a=this.configuration.get("cacheMigrationMode");return!(r<zx&&a==="always"||o!==this.cacheSpec&&a!=="required-only")}getLocatorPath(e,r){return this.mirrorCwd===null?z.resolve(this.cwd,this.getVersionFilename(e)):r===null?z.resolve(this.cwd,this.getVersionFilename(e)):z.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?z.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await oe.existsPromise(this.cwd))throw new Vt(56,"Cache path does not exist.")}else{await oe.mkdirPromise(this.cwd,{recursive:!0});let e=z.resolve(this.cwd,".gitignore");await oe.changeFilePromise(e,`/.gitignore
`);if(te.lines=ae,te.added||te.removed){var le;if(!E){var ce=A[J-1];E=x,I=C,ce&&(v=u.context>0?p(ce.lines.slice(-u.context)):[],E-=v.length,I-=v.length)}(le=v).push.apply(le,p_(ae.map(function(Ae){return(te.added?"+":"-")+Ae}))),te.added?C+=ae.length:x+=ae.length}else{if(E)if(ae.length<=u.context*2&&J<A.length-2){var we;(we=v).push.apply(we,p_(p(ae)))}else{var de,Be=Math.min(ae.length,u.context);(de=v).push.apply(de,p_(p(ae.slice(0,Be))));var Ee={oldStart:E,oldLines:x-E+Be,newStart:I,newLines:C-I+Be,lines:v};if(J>=A.length-2&&ae.length<=u.context){var g=/\n$/.test(r),me=/\n$/.test(o),Ce=ae.length==0&&v.length>Ee.oldLines;!g&&Ce&&r.length>0&&v.splice(Ee.oldLines,0,"\\ No newline at end of file"),(!g&&!Ce||!me)&&v.push("\\ No newline at end of file")}h.push(Ee),E=0,I=0,v=[]}x+=ae.length,C+=ae.length}},N=0;N<A.length;N++)F(N);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:h}}var o3t,cpe,upe,m_,y_,put,hut,Eut,o2,d_,E_=Et(()=>{Kf.prototype={diff:function(e,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.callback;typeof o=="function"&&(a=o,o={}),this.options=o;var n=this;function u(F){return a?(setTimeout(function(){a(void 0,F)},0),!0):F}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var A=r.length,p=e.length,h=1,E=A+p;o.maxEditLength&&(E=Math.min(E,o.maxEditLength));var I=[{newPos:-1,components:[]}],v=this.extractCommon(I[0],r,e,0);if(I[0].newPos+1>=A&&v+1>=p)return u([{value:this.join(r),count:r.length}]);function x(){for(var F=-1*h;F<=h;F+=2){var N=void 0,U=I[F-1],J=I[F+1],te=(J?J.newPos:0)-F;U&&(I[F-1]=void 0);var ae=U&&U.newPos+1<A,le=J&&0<=te&&te<p;if(!ae&&!le){I[F]=void 0;continue}if(!ae||le&&U.newPos<J.newPos?(N=uut(J),n.pushComponent(N.components,void 0,!0)):(N=U,N.newPos++,n.pushComponent(N.components,!0,void 0)),te=n.extractCommon(N,r,e,F),N.newPos+1>=A&&te+1>=p)return u(cut(n,N.components,r,e,n.useLongestToken));I[F]=N}h++}if(a)(function F(){setTimeout(function(){if(h>E)return a();x()||F()},0)})();else for(;h<=E;){var C=x();if(C)return C}},pushComponent:function(e,r,o){var a=e[e.length-1];a&&a.added===r&&a.removed===o?e[e.length-1]={count:a.count+1,added:r,removed:o}:e.push({count:1,added:r,removed:o})},extractCommon:function(e,r,o,a){for(var n=r.length,u=o.length,A=e.newPos,p=A-a,h=0;A+1<n&&p+1<u&&this.equals(r[A+1],o[p+1]);)A++,p++,h++;return h&&e.components.push({count:h}),e.newPos=A,p},equals:function(e,r){return this.options.comparator?this.options.comparator(e,r):e===r||this.options.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],o=0;o<e.length;o++)e[o]&&r.push(e[o]);return r},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};o3t=new Kf;cpe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,upe=/\S/,m_=new Kf;m_.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!upe.test(t)&&!upe.test(e)};m_.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<e.length-1;r++)!e[r+1]&&e[r+2]&&cpe.test(e[r])&&cpe.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};y_=new Kf;y_.tokenize=function(t){var e=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var o=0;o<r.length;o++){var a=r[o];o%2&&!this.options.newlineIsToken?e[e.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),e.push(a))}return e};put=new Kf;put.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};hut=new Kf;hut.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};Eut=Object.prototype.toString,o2=new Kf;o2.useLongestToken=!0;o2.tokenize=y_.tokenize;o2.castInput=function(t){var e=this.options,r=e.undefinedReplacement,o=e.stringifyReplacer,a=o===void 0?function(n,u){return typeof u>"u"?r:u}:o;return typeof t=="string"?t:JSON.stringify(g_(t,null,null,a),a," ")};o2.equals=function(t,e){return Kf.prototype.equals.call(o2,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};d_=new Kf;d_.tokenize=function(t){return t.s
`;await oe.changeFilePromise(r,o,{automaticNewlines:!0}),this.manifest.raw=e}}});function RAt({project:t,allDescriptors:e,allResolutions:r,allPackages:o,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:u=new Map,peerWarnings:A=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,I=[],v=new Map,x=new Map,C=new Map,F=new Map,N=new Map(t.workspaces.map(le=>{let ce=le.anchoredLocator.locatorHash,we=o.get(ce);if(typeof we>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[ce,e1(we)]})),U=()=>{let le=oe.mktempSync(),ce=z.join(le,"stacktrace.log"),we=String(I.length+1).length,de=I.map((Be,Ee)=>`${`${Ee+1}.`.padStart(we," ")}${ba(Be)}
`).join("");throw oe.writeFileSync(ce,de),oe.detachTemp(le),new Vt(45,`Encounteredastackoverflowwhenresolvingpeerdependencies;cf${ue.fromPortablePath(ce)}`)},J=le=>{let ce=r.get(le.descriptorHash);if(typeof ce>"u")throw new Error("Assertion failed: The resolution should have been registered");let we=o.get(ce);if(!we)throw new Error("Assertion failed: The package could not be found");return we},te=(le,ce,we,{top:de,optional:Be})=>{I.length>1e3&&U(),I.push(ce);let Ee=ae(le,ce,we,{top:de,optional:Be});return I.pop(),Ee},ae=(le,ce,we,{top:de,optional:Be})=>{if(Be||n.delete(ce.locatorHash),a.has(ce.locatorHash))return;a.add(ce.locatorHash);let Ee=o.get(ce.locatorHash);if(!Ee)throw new Error(`Assertionfailed:Thepackage(${qr(t.configuration,ce)})shouldhavebeenregistered`);let g=[],me=new Map,Ce=[],Ae=[],ne=[],Z=[];for(let Le of Array.from(Ee.dependencies.values())){if(Ee.peerDependencies.has(Le.identHash)&&Ee.locatorHash!==de)continue;if(bf(Le))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");h.delete(Le.descriptorHash);let ht=Be;if(!ht){let Se=Ee.dependenciesMeta.get(rn(Le));if(typeof Se<"u"){let et=Se.get(null);typeof et<"u"&&et.optional&&(ht=!0)}}let H=r.get(Le.descriptorHash);if(!H)throw new Error(`Assertionfailed:Theresolution(${Gn(t.configuration,Le)})shouldhavebeenregistered`);let rt=N.get(H)||o.get(H);if(!rt)throw new Error(`Assertionfailed:Thepackage(${H},resolvedfrom${Gn(t.configuration,Le)})shouldhavebeenregistered`);if(rt.peerDependencies.size===0){te(Le,rt,new Map,{top:de,optional:ht});continue}let Te,Re,ke=new Set,Ye=new Map;Ce.push(()=>{Te=tM(Le,ce.locatorHash),Re=rM(rt,ce.locatorHash),Ee.dependencies.delete(Le.identHash),Ee.dependencies.set(Te.identHash,Te),r.set(Te.descriptorHash,Re.locatorHash),e.set(Te.descriptorHash,Te),o.set(Re.locatorHash,Re),g.push([rt,Te,Re])}),Ae.push(()=>{F.set(Re.locatorHash,Ye);for(let Se of Re.peerDependencies.values()){let Ue=al(me,Se.identHash,()=>{let b=we.get(Se.identHash)??null,w=Ee.dependencies.get(Se.identHash);return!w&&n1(ce,Se)&&(le.identHash===ce.identHash?w=le:(w=In(ce,le.range),e.set(w.descriptorHash,w),r.set(w.descriptorHash,ce.locatorHash),h.delete(w.descriptorHash),b=null)),w||(w=In(Se,"missing:")),{subject:ce,ident:Se,provided:w,root:!b,requests:new Map,hash:`p${zi(ce.locatorHash,Se.identHash).slice(0,5)}`}}).provided;if(Ue.range==="missing:"&&Re.dependencies.has(Se.identHash)){Re.peerDependencies.delete(Se.identHash);continue}Ye.set(Se.identHash,{requester:Re,descriptor:Se,meta:Re.peerDependenciesMeta.get(rn(Se)),children:new Map}),Re.dependencies.set(Se.identHash,Ue),bf(Ue)&&jy(C,Ue.descriptorHash).add(Re.locatorHash),v.set(Ue.identHash,Ue),Ue.range==="missing:"&&ke.add(Ue.identHash)}Re.dependencies=new Map(Rs(Re.dependencies,([Se,et])=>rn(et)))}),ne.push(()=>{if(!o.has(Re.locatorHash))return;let Se=E.get(rt.locatorHash);typeof Se=="number"&&Se>=2&&U();let et=E.get(rt.locatorHash),Ue=typeof et<"u"?et+1:1;E.set(rt.locatorHash,Ue),te(Te,Re,Ye,{top:de,optional:ht}),E.set(rt.locatorHash,Ue-1)}),Z.push(()=>{let Se=Ee.dependencies.get(Le.identHash);if(typeof Se>"u")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let et=r.get(Se.descriptorHash);if(typeof et>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let Ue=F.get(et);if(typeof Ue>"u")throw new Error("Assertion failed: Expected the peer requests to be registered");for(let b of me.values()){let w=Ue.get(b.ident.identHash);!w||(b.requests.set(Se.descriptorHash,w),p.set(b.hash,b),b.root||we.get(b.ident.identHash)?.children.set(Se.descriptorHash,w))}if(!!o.has(Re.locatorHash))for(let b of ke)Re.dependencies.delete(b)})}for(let Le of[...Ce,...Ae])Le();let xe;do{xe=!0;for(let[Le,ht,H]of g){let rt=KI(x,Le.locatorHash),Te=zi(...[...H.dependencies.values()].map(Se=>{let et=Se.range!=="missing:"?r.get(Se.descriptorHash):"missing:";if(typeof et>"u")throw new Error(`Assertionfailed:Expectedtheresolutionfor${Gn(t.configuration,Se)}tohavebeen
`)}`)}asyncsetupResolutions(){this.storedResolutions=newMap,this.storedDescriptors=newMap,this.storedPackages=newMap,this.lockFileChecksum=null;lete=z.join(this.cwd,dr.lockfile),r=this.configuration.get("defaultLanguageName");if(oe.existsSync(e)){leto=awaitoe.readFilePromise(e,"utf8");this.lockFileChecksum=Jpe(o);leta=Ki(o);if(a.__metadata){letn=a.__metadata.version,u=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<rk;for(letAofObject.keys(a)){if(A==="__metadata")continue;letp=a[A];if(typeofp.resolution>"u")thrownewError(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);leth=xf(p.resolution,!0),E=newOt;E.load(p,{yamlCompatibilityMode:!0});letI=E.version,v=E.languageName||r,x=p.linkType.toUpperCase(),C=p.conditions??null,F=E.dependencies,N=E.peerDependencies,U=E.dependenciesMeta,J=E.peerDependenciesMeta,te=E.bin;if(p.checksum!=null){letle=typeofu<"u"&&!p.checksum.includes("/")?`${u}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,le)}letae={...h,version:I,languageName:v,linkType:x,conditions:C,dependencies:F,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:J,bin:te};this.originalPackages.set(ae.locatorHash,ae);for(letleofA.split(bAt)){letce=sh(le);n<=6&&(ce=this.configuration.normalizeDependency(ce),ce=In(ce,ce.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(ce.descriptorHash,ce),this.storedResolutions.set(ce.descriptorHash,h.locatorHash)}}}elseo.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}asyncsetupWorkspaces(){this.workspaces=[],this.workspacesByCwd=newMap,this.workspacesByIdent=newMap;lete=newSet,r=(0,tk.default)(4),o=async(a,n)=>{if(e.has(n))returna;e.add(n);letu=newaC(n,{project:this});awaitr(()=>u.setup());letA=a.then(()=>{this.addWorkspace(u)});returnArray.from(u.workspacesCwds).reduce(o,A)};awaito(Promise.resolve(),this.cwd)}addWorkspace(e){letr=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeofr<"u")thrownewError(`Duplicate workspace name ${us(this.configuration,e.anchoredLocator)}: ${ue.fromPortablePath(e.cwd)} conflicts with ${ue.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}gettopLevelWorkspace(){returnthis.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){z.isAbsolute(e)||(e=z.resolve(this.cwd,e)),e=z.normalize(e).replace(/\/+$/,"");letr=this.workspacesByCwd.get(e);returnr||null}getWorkspaceByCwd(e){letr=this.tryWorkspaceByCwd(e);if(!r)thrownewError(`Workspace not found (${e})`);returnr}tryWorkspaceByFilePath(e){letr=null;for(letoofthis.workspaces)z.relative(o.cwd,e).startsWith("../")||r&&r.cwd.length>=o.cwd.length||(r=o);returnr||null}getWorkspaceByFilePath(e){letr=this.tryWorkspaceByFilePath(e);if(!r)thrownewError(`Workspace not found (${e})`);returnr}tryWorkspaceByIdent(e){letr=this.workspacesByIdent.get(e.identHash);returntypeofr>"u"?null:r}getWorkspaceByIdent(e){letr=this.tryWorkspaceByIdent(e);if(!r)thrownewError(`Workspace not found (${us(this.configuration,e)})`);returnr}tryWorkspaceByDescriptor(e){if(e.range.startsWith(Xn.protocol)){leto=e.range.slice(Xn.protocol.length);if(o!=="^"&&o!=="~"&&o!=="*"&&!xa(o))returnthis.tryWorkspaceByCwd(o)}letr=this.tryWorkspaceByIdent(e);returnr===null||(bf(e)&&(e=t1(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){letr=this.tryWorkspaceByDescriptor(e);if(r===null)thrownewError(`Workspace not found (${Gn(this.configuration,e)})`);returnr}tryWorkspaceByLocator(e){letr=this.tryWorkspaceByIdent(e);returnr===null||(qc(e)&&(e=r1(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){letr=this.tryWorkspaceByLocator(e);if(!r)thrownewError(`Workspace not found (${qr(this.configuration,e)})`);returnr}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolu
`;break}let Re=null;if(!await oe.mktempPromise(async Ye=>{let Se=z.join(Ye,"build.log"),{stdout:et,stderr:Ue}=this.configuration.getSubprocessStreams(Se,{header:Te,prefix:qr(this.configuration,Z),report:r}),b;try{switch(rt.type){case 0:b=await Kb(Z,rt.script,[],{cwd:H,project:this,stdin:Re,stdout:et,stderr:Ue});break;case 1:b=await EU(Z,rt.script,[],{cwd:H,project:this,stdin:Re,stdout:et,stderr:Ue});break}}catch(y){Ue.write(y.stack),b=1}if(et.end(),Ue.end(),b===0)return!0;oe.detachTemp(Ye);let w=`${qr(this.configuration,Z)}couldn't be built successfully (exit code ${Ut(this.configuration,b,yt.NUMBER)}, logs can be found here: ${Ut(this.configuration,Se,yt.PATH)})`,S=this.optionalBuilds.has(Z.locatorHash);return S?r.reportInfo(9,w):r.reportError(9,w),zce&&r.reportFold(ue.fromPortablePath(Se),oe.readFileSync(Se,"utf8")),S}))return!1}return!0});Ae.push(...ht,Promise.allSettled(ht).then(H=>{ae.delete(ne),H.every(rt=>rt.status==="fulfilled"&&rt.value===!0)&&Ee.set(Z.locatorHash,Le)}))}if(await _c(Ae),Ce===ae.size){let ne=Array.from(ae).map(Z=>{let xe=this.storedPackages.get(Z);if(!xe)throw new Error("Assertion failed: The package should have been registered");return qr(this.configuration,xe)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won'tbebuilt(affectedpackagesare:${ne})`);break}}this.storedBuildState=Ee,this.skippedBuilds=N}async installWithNewReport(e,r){return(await Ft.start({configuration:this.configuration,json:e.json,stdout:e.stdout,forceSectionAlignment:!0,includeLogs:!e.json&&!e.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(e){let r=this.configuration.get("nodeLinker");Ke.telemetry?.reportInstall(r);let o=!1;if(await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{this.configuration.get("enableOfflineMode")&&e.report.reportWarning(90,"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,I)=>{e.report.reportWarning(E,I)},reportError:(E,I)=>{e.report.reportError(E,I),o=!0}})}),o)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,I]of E)for(let v of I)v.status="inactive";let n=z.join(this.cwd,dr.lockfile),u=null;if(e.immutable)try{u=await oe.readFilePromise(n,"utf8")}catch(E){throw E.code==="ENOENT"?new Vt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):E}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{FAt(this,e.report);for(let[,E]of a)for(let[,I]of E)for(let v of I)if(v.userProvided){let x=Ut(this.configuration,v,yt.PACKAGE_EXTENSION);switch(v.status){case"inactive":e.report.reportWarning(68,`${x}:Nomatchingpackageinthedependencytree;youmaynotneedthisruleanymore.`);break;case"redundant":e.report.reportWarning(69,`${x}:Thisruleseemsredundantwhenappliedontheoriginalpackage;theextensionmayhavebeenappliedupstream.`);break}}if(u!==null){let E=Hg(u,this.generateLockfile());if(E!==u){let I=fpe(n,n,u,E,void 0,void 0,{maxEditLength:100});if(I){e.report.reportSeparator();for(let v of I.hunks){e.report.reportInfo(null,`@@-${v.oldStart},${v.oldLines}+${v.newStart},${v.newLines}@@`);for(let x of v.lines)x.startsWith("+")?e.report.reportError(28,Ut(this.configuration,x,yt.ADDED)):x.startsWith("-")?e.report.reportError(28,Ut(this.configuration,x,yt.REMOVED)):e.report.reportInfo(null,Ut(this.configuration,x,"grey"))}e.report.reportSeparator()}throw new Vt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let E of a.values())for(let[,I]of E)for(let v of I)v.userProvided&&v.status==="active"&&Ke.telemetry?.reportPackageExtension(Ed(v,yt.PACKAGE_EXTENSION));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(
`),h=u.length;for(h>0&&u.includes("unstyle")&&(u=[...new Set(["unstyle",...u])].reverse());h-- >0;)A=r(t.styles[u[h]],A,p);return A},a=(n,u,A)=>{t.styles[n]=e({name:n,codes:u}),(t.keys[A]||(t.keys[A]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=E=>o(E,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=UAt,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,u)=>{let A=typeof u=="string"?t[u]:u;if(typeof A!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:n}),t.styles[n]=A,A.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>o(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(A.stack):A.stack,p}})},t.theme=n=>{if(!MAt(n))throw new TypeError("Expected theme to be an object");for(let u of Object.keys(n))t.alias(u,n[u]);return t},t.alias("unstyle",n=>typeof n=="string"&&n!==""?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,"")):""),t.alias("noop",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=ihe(),t.define=a,t};F_.exports=she();F_.exports.create=she});var To=_(on=>{"use strict";var _At=Object.prototype.toString,nc=zc(),ohe=!1,T_=[],ahe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};on.longest=(t,e)=>t.reduce((r,o)=>Math.max(r,e?o[e].length:o.length),0);on.hasColor=t=>!!t&&nc.hasColor(t);var sk=on.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);on.nativeType=t=>_At.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");on.isAsyncFn=t=>on.nativeType(t)==="asyncfunction";on.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";on.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;on.scrollDown=(t=[])=>[...t.slice(1),t[0]];on.scrollUp=(t=[])=>[t.pop(),...t];on.reorder=(t=[])=>{let e=t.slice();return e.sort((r,o)=>r.index>o.index?1:r.index<o.index?-1:0),e};on.swap=(t,e,r)=>{let o=t.length,a=r===o?0:r<0?o-1:r,n=t[e];t[e]=t[a],t[a]=n};on.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[0]),process.platform==="win32"?r-1:r};on.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};on.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:o=`
`+r,width:a=80}=e,n=(o+r).match(/[^\S\n]/g)||[];a-=n.length;let u=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,A=t.trim(),p=new RegExp(u,"g"),h=A.match(p)||[];return h=h.map(E=>E.replace(/\n$/,"")),e.padEnd&&(h=h.map(E=>E.padEnd(a," "))),e.padStart&&(h=h.map(E=>E.padStart(a," "))),r+h.join(o)};on.unmute=t=>{let e=t.stack.find(o=>nc.keys.color.includes(o));return e?nc[e]:t.stack.find(o=>o.slice(2)==="bg")?nc[e.slice(2)]:o=>o};on.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";on.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>nc.keys.color.includes(o));if(e){let o=nc["bg"+on.pascal(e)];return o?o.black:t}let r=t.stack.find(o=>o.slice(0,2)==="bg");return r?nc[r.slice(2).toLowerCase()]||t:nc.none};on.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>nc.keys.color.includes(o)),r=t.stack.find(o=>o.slice(0,2)==="bg");if(e&&!r)return nc[ahe[e]||e];if(r){let o=r.slice(2).toLowerCase(),a=ahe[o];return a&&nc["bg"+on.pascal(a)]||t}return nc.none};on.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),o=e>=12?"pm":"am";e=e%12;let a=e===0?12:e,n=r<10?"0"+r:r;return a+":"+n+" "+o};on.set=(t={},e="",r)=>e.split(".").reduce((o,a,n,u)=>{let A=u.length-1>n?o[a]||{}:r;return!on.isObject(A)&&n<u.length-1&&(A={}),o[a]=A},t);on.get=(t={},e="",r)=>{let o=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return o??r};on.mixin=(t,e)=>{if(!sk(t))return e;if(!sk(e))return t;for(let r of Object.keys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(o.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&sk(o.value)){let a=Object.getOwnPropertyDescriptor(t,r);sk(a.value)?t[r]=on.merge({},t[r],e[r]):Reflect.defineProperty(t,r,o)}else Reflect.defineProperty(t,r,o);else Reflect.defineProperty(t,r,o)}return t};on.merge=(...t)=>{let e={};for(let r of t)on.mixin(e,r);return e};on.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let o of Object.keys(r)){let a=r[o];typeof a=="function"?on.define(t,o,a.bind(e)):on.define(t,o,a)}};on.onExit=t=>{let e=(r,o)=>{ohe||(ohe=!0,T_.forEach(a=>a()),r===!0&&process.exit(128+o))};T_.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),T_.push(t)};on.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};on.defineExport=(t,e,r)=>{let o;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){o=a},get(){return o?o():r()}})}});var lhe=_(fC=>{"use strict";fC.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};fC.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};fC.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};fC.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};fC.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var Ahe=_((e8t,uhe)=>{"use strict";var che=ve("readline"),HAt=lhe(),qAt=/^(?:\x1b)([a-zA-Z0-9])$/,GAt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,jAt={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","
`:" ",o=[];for(let a=0;a<4;a++){let n=r(a);e[a]?o.push(n.repeat(e[a])):o.push("")}return o}bhe.exports=u2});var Qhe=_((a8t,khe)=>{"use strict";var aft=To(),xhe={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return xhe.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};khe.exports=(t,e={})=>{let r=aft.merge({},xhe,e.roles);return r[t]||r.default}});var A2=_((l8t,The)=>{"use strict";var lft=zc(),cft=pC(),uft=Qhe(),ak=To(),{reorder:j_,scrollUp:Aft,scrollDown:fft,isObject:Rhe,swap:pft}=ak,Y_=class extends cft{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:o,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");Rhe(r)&&(r=Object.keys(r)),Array.isArray(r)?(o!=null&&(this.index=this.findIndex(o)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(o!=null&&(r=o),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let o=[],a=0,n=async(u,A)=>{typeof u=="function"&&(u=await u.call(this)),u instanceof Promise&&(u=await u);for(let p=0;p<u.length;p++){let h=u[p]=await this.toChoice(u[p],a++,A);o.push(h),h.choices&&await n(h.choices,h)}return o};return n(e,r).then(u=>(this.state.loadingChoices=!1,u))}async toChoice(e,r,o){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let a=e.value;if(e=uft(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,ak.define(e,"parent",o),e.level=o?o.level+1:1,e.indent==null&&(e.indent=o?o.indent+" ":e.indent||""),e.path=o?o.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,lft.unstyle(e.message).length));let u={...e};return e.reset=(A=u.input,p=u.value)=>{for(let h of Object.keys(u))e[h]=u[h];e.input=A,e.value=p},a==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,o){let a=await this.toChoice(e,r,o);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,o){let a={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,o);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(thi
`)),this.write(this.margin[2]),this.restore()}};D0e.exports=m8});var x0e=_((T8t,b0e)=>{"use strict";var Zft=xh(),y8=class extends Zft{constructor(e){if(super(e),typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let o=await super.toChoices(e,r);if(o.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>o.length)throw new Error("Please specify the index of the correct answer from the list of choices");return o}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};b0e.exports=y8});var Q0e=_(E8=>{"use strict";var k0e=To(),ps=(t,e)=>{k0e.defineExport(E8,t,e),k0e.defineExport(E8,t.toLowerCase(),e)};ps("AutoComplete",()=>Ohe());ps("BasicAuth",()=>jhe());ps("Confirm",()=>Khe());ps("Editable",()=>Jhe());ps("Form",()=>lk());ps("Input",()=>i8());ps("Invisible",()=>r0e());ps("List",()=>i0e());ps("MultiSelect",()=>o0e());ps("Numeral",()=>c0e());ps("Password",()=>A0e());ps("Scale",()=>h0e());ps("Select",()=>xh());ps("Snippet",()=>E0e());ps("Sort",()=>w0e());ps("Survey",()=>B0e());ps("Text",()=>P0e());ps("Toggle",()=>S0e());ps("Quiz",()=>x0e())});var F0e=_((N8t,R0e)=>{R0e.exports={ArrayPrompt:A2(),AuthPrompt:Z_(),BooleanPrompt:ck(),NumberPrompt:c8(),StringPrompt:Wd()}});var p2=_((O8t,L0e)=>{"use strict";var T0e=ve("assert"),w8=ve("events"),kh=To(),Vc=class extends w8{constructor(e,r){super(),this.options=kh.merge({},e),this.answers={...r}}register(e,r){if(kh.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}T0e.equal(typeof r,"function","expected a function");let o=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[o]=r:this.prompts[o]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(kh.merge({},this.options,r))}catch(o){return Promise.reject(o)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=kh.merge({},this.options,e),{type:o,name:a}=e,{set:n,get:u}=kh;if(typeof o=="function"&&(o=await o.call(this,e,this.answers)),!o)return this.answers[a];T0e(this.prompts[o],`Prompt"${o}"isnotregistered`);let A=new this.prompts[o](r),p=u(this.answers,a);A.state.answers=this.answers,A.enquirer=this,a&&A.on("submit",E=>{this.emit("answer",a,E,A),n(this.answers,a,E)});let h=A.emit.bind(A);return A.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit("prompt",A,this),r.autofill&&p!=null?(A.value=A.input=p,r.autofill==="show"&&await A.submit()):p=A.value=await A.run(),p}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||pC()}static get prompts(){return Q0e()}static get types(){return F0e()}static get prompt(){let e=(r,...o)=>{let a=new this(...o),n=a.emit.bind(a);return a.emit=(...u)=>(e.emit(...u),n(...u)),a.prompt(r)};return kh.mixinEmitter(e,new w8),e}};kh.mixinEmitter(Vc,new w8);var C8=Vc.prompts;for(let t of Object.keys(C8)){let e=t.toLowerCase(),r=o=>new C8[t](o).run();Vc.prompt[e]=r,Vc[e]=r,Vc[t]||Reflect.defineProperty(Vc,t,{get:()=>C8[t]})}var f2=t=>{kh.defineExport(Vc,t,()=>Vc.types[t])};f2("ArrayPrompt");f2("AuthPrompt");f2("BooleanPrompt");f2("NumberPrompt");f2("StringPrompt");L0e.exports=Vc});var m2=_((EHt,q0e)=>{var ipt=Xx();function spt(t,e,r){var o=t==null?void 0:ipt(t,e);return o===void 0?r:o}q0e.exports=spt});var Y0e=_((PHt,j0e)=>{function opt(t,e){for(var r=-1,o=t==null?0:t.length;++r<o&&e(t[r],r,t)!==!1;);return t}j0e.exports=opt});var K0e=_((DHt,W0e)=>{var apt=md(),lpt=VD();function cpt(t,e){return t&&apt(e,lpt(e),t)}W0e.exports=cpt});var J0e=_((SHt,z0e)=>{var upt=md(),Apt=Gy();function fpt(t,e){return t&&upt(e,Apt(e),t)}z0e.exports=fpt});var
Andthelengthmustbe:$<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(x){return x==="charlist"?r.text:x==="length"?o+"..."+a:null}}),u,A,p,h,E,I,v;for(e=e||{},u=IC(e.charlist?e.charlist+"":"$<!-~>",Zde),(isNaN(o=parseInt(e.min,10))||typeof o!="number")&&(o=12),(isNaN(a=parseInt(e.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+gH(u)+"]{"+o+","+a+"}$"),r=Jde([u],n.caseSensitive,!0),r.text=Vde(r.values,r.suppressed),A=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",p=e.unmatchMessage!=null?e.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",t==null&&(t="Input new password: "),E=n.limitMessage;!v;)n.limit=h,n.limitMessage=E,I=Wr.question(t,n),n.limit=[I,""],n.limitMessage=p,v=Wr.question(A,n);return I};function tme(t,e,r){var o;function a(n){return o=r(n),!isNaN(o)&&typeof o=="number"}return Wr.question(t,Ls({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),o}Wr.questionInt=function(t,e){return tme(t,e,function(r){return parseInt(r,10)})};Wr.questionFloat=function(t,e){return tme(t,e,parseFloat)};Wr.questionPath=function(t,e){var r,o="",a=Ls({hideEchoBack:!1,limitMessage:`$<error(
)>Inputvalidpath,please.$<(Min:)min>$<(Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var u,A,p;n=dH(n,!0),o="";function h(E){E.split(/\/|\\/).reduce(function(I,v){var x=u0.resolve(I+=v+u0.sep);if(!Yn.existsSync(x))Yn.mkdirSync(x);else if(!Yn.statSync(x).isDirectory())throw new Error("Non directory already exists: "+x);return I},"")}try{if(u=Yn.existsSync(n),r=u?Yn.realpathSync(n):u0.resolve(n),!e.hasOwnProperty("exists")&&!u||typeof e.exists=="boolean"&&e.exists!==u)return o=(u?"Already exists":"No such file or directory")+": "+r,!1;if(!u&&e.create&&(e.isDirectory?h(r):(h(u0.dirname(r)),Yn.closeSync(Yn.openSync(r,"w"))),r=Yn.realpathSync(r)),u&&(e.min||e.max||e.isFile||e.isDirectory)){if(A=Yn.statSync(r),e.isFile&&!A.isFile())return o="Not file: "+r,!1;if(e.isDirectory&&!A.isDirectory())return o="Not directory: "+r,!1;if(e.min&&A.size<+e.min||e.max&&A.size>+e.max)return o="Size "+A.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(p=e.validate(r))!==!0)return typeof p=="string"&&(o=p),!1}catch(E){return o=E+"",!1}return!0},phContent:function(n){return n==="error"?o:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),Wr.question(t,a),r};function rme(t,e){var r={},o={};return typeof t=="object"?(Object.keys(t).forEach(function(a){typeof t[a]=="function"&&(o[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=pH(a),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&o.hasOwnProperty(n)?o[n].apply(a,r.args.slice(1)):o.hasOwnProperty("_")?o._.apply(a,r.args):null,{res:a,forceNext:!1}},o.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return e.caseSensitive||(a=a.toLowerCase()),o.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=pH(a),r.hRes=typeof t=="function"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}Wr.promptCL=function(t,e){var r=Ls({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=rme(t,r);return r.limit=o.limit,r.preCheck=o.preCheck,Wr.prompt(r),o.args};Wr.promptLoop=function(t,e){for(var r=Ls({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t(Wr.prompt(r)););};Wr.promptCLLoop=function(t,e){var r=Ls({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=rme(t,r);for(r.limit=o.limit,r.preCheck=o.preCheck;Wr.prompt(r),!o.hRes;);};Wr.promptSimShell=function(t){return Wr.prompt(Ls({hideEchoBack:!1,history:!0},t,{prompt:function(){return $d?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function nme(t,e,r){var o;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),o=Wr.keyIn(t,Ls(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof o=="boolean"?o:""}Wr.keyInYN=function(t,e){return nme(t,e)};Wr.keyInYNStrict=function(t,e){return nme(t,e,"yn")};Wr.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),Wr.keyIn(t,Ls({limit:null},e,{hideEchoBack:!0,mask:""}))};Wr.keyInSelect=function(t,e,r){var o=Ls({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?t.length+"":p==="firstItem"?(t[0]+"").trim():p==="lastItem"?(t[t.length-1]+"").trim():null}}),a="",n={},u=49,A=`
`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(p,h){var E=String.fromCharCode(u);a+=E,n[E]=h,A+="["+E+"] "+(p+"").trim()+`
`;return S},xe.prototype.clone=function(){return new xe(this.id)},Le.prototype.clone=function(){return new Le(this.value,this.is_float)},H.prototype.clone=function(){return new H(this.id,o(this.args,function(w){return w.clone()}))},Te.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Re.prototype.clone=function(){var w={};for(var S in this.links)!this.links.hasOwnProperty(S)||(w[S]=this.links[S].clone());return new Re(w)},ke.prototype.clone=function(){return new ke(this.goal.clone(),this.substitution.clone(),this.parent)},Ye.prototype.clone=function(){return new Ye(this.head.clone(),this.body!==null?this.body.clone():null)},xe.prototype.equals=function(w){return b.type.is_variable(w)&&this.id===w.id},Le.prototype.equals=function(w){return b.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float},H.prototype.equals=function(w){if(!b.type.is_term(w)||this.indicator!==w.indicator)return!1;for(var S=0;S<this.args.length;S++)if(!this.args[S].equals(w.args[S]))return!1;return!0},Te.prototype.equals=function(w){return b.type.is_stream(w)&&this.id===w.id},Re.prototype.equals=function(w){var S;if(!b.type.is_substitution(w))return!1;for(S in this.links)if(!!this.links.hasOwnProperty(S)&&(!w.links[S]||!this.links[S].equals(w.links[S])))return!1;for(S in w.links)if(!!w.links.hasOwnProperty(S)&&!this.links[S])return!1;return!0},ke.prototype.equals=function(w){return b.type.is_state(w)&&this.goal.equals(w.goal)&&this.substitution.equals(w.substitution)&&this.parent===w.parent},Ye.prototype.equals=function(w){return b.type.is_rule(w)&&this.head.equals(w.head)&&(this.body===null&&w.body===null||this.body!==null&&this.body.equals(w.body))},xe.prototype.rename=function(w){return w.get_free_variable(this)},Le.prototype.rename=function(w){return this},H.prototype.rename=function(w){return new H(this.id,o(this.args,function(S){return S.rename(w)}))},Te.prototype.rename=function(w){return this},Ye.prototype.rename=function(w){return new Ye(this.head.rename(w),this.body!==null?this.body.rename(w):null)},xe.prototype.variables=function(){return[this.id]},Le.prototype.variables=function(){return[]},H.prototype.variables=function(){return[].concat.apply([],o(this.args,function(w){return w.variables()}))},Te.prototype.variables=function(){return[]},Ye.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},xe.prototype.apply=function(w){return w.lookup(this.id)?w.lookup(this.id):this},Le.prototype.apply=function(w){return this},H.prototype.apply=function(w){if(this.indicator==="./2"){for(var S=[],y=this;y.indicator==="./2";)S.push(y.args[0].apply(w)),y=y.args[1];for(var R=y.apply(w),V=S.length-1;V>=0;V--)R=new H(".",[S[V],R]);return R}return new H(this.id,o(this.args,function(X){return X.apply(w)}),this.ref)},Te.prototype.apply=function(w){return this},Ye.prototype.apply=function(w){return new Ye(this.head.apply(w),this.body!==null?this.body.apply(w):null)},Re.prototype.apply=function(w){var S,y={};for(S in this.links)!this.links.hasOwnProperty(S)||(y[S]=this.links[S].apply(w));return new Re(y)},H.prototype.select=function(){for(var w=this;w.indicator===",/2";)w=w.args[0];return w},H.prototype.replace=function(w){return this.indicator===",/2"?this.args[0].indicator===",/2"?new H(",",[this.args[0].replace(w),this.args[1]]):w===null?this.args[1]:new H(",",[w,this.args[1]]):w},H.prototype.search=function(w){if(b.type.is_term(w)&&w.ref!==void 0&&this.ref===w.ref)return!0;for(var S=0;S<this.args.length;S++)if(b.type.is_term(this.args[S])&&this.args[S].search(w))return!0;return!1},Se.prototype.get_current_input=function(){return this.current_input},et.prototype.get_current_input=function(){return this.session.get_current_input()},Se.prototype.get_current_output=function(){return this.current_output},et.prototype.get_current_output=function(){return this.session.get_current_output()},Se.prototype.set_current_input=function(w){this.current_input=w},et.prototype.set_current_input=function(w){return t
`+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(t){for(;t.length>0;){var e=t.shift();if(typeof e=="function"){e();continue}var r=e.func;typeof r=="number"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var o=r>0?r:lengthBytesUTF8(t)+1,a=new Array(o),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r<t.length;r++){var o=t[r];o>255&&(o&=255),e.push(String.fromCharCode(o))}return e.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var o,a;r&&(a=e+lengthBytesUTF8(t),o=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=o)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function
Ifthisabort()isunexpected,buildwith-sASSERTIONS=1whichcangivemoreinformation.`,r="abort("+t+") at "+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(o){r=o(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var am=_((vKt,NEe)=>{"use strict";var Kyt=TEe(),zyt=LEe(),x6=!1,k6=null;zyt({},function(t,e){if(!x6){if(x6=!0,t)throw t;k6=e}});if(!x6)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");NEe.exports=Kyt(k6.bind,k6.lib)});var R6=_((PKt,Q6)=>{"use strict";var OEe=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);Q6.exports=OEe;Q6.exports.default=OEe});var UEe=_((DKt,MEe)=>{"use strict";MEe.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD8
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function wCe(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):TEt.get(t)||t}function LEt(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(REt))r.push(a[2].replace(FEt,(A,p,h)=>p?wCe(p):h));else throw new Error(`InvalidChalktemplatestyleargument:${n}(instyle'${t}')`)}return r}function NEt(t){ECe.lastIndex=0;let e=[],r;for(;(r=ECe.exec(t))!==null;){let o=r[1];if(r[2]){let a=LEt(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function CCe(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`UnknownChalkstyle:${a}`);o=n.length>0?o[a](...n):o[a]}return o}ICe.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(QEt,(n,u,A,p,h,E)=>{if(u)a.push(wCe(u));else if(p){let I=a.join("");a=[],o.push(r.length===0?I:CCe(t,r)(I)),r.push({inverse:A,styles:NEt(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(CCe(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),o.push(a.join("")),r.length>0){let n=`Chalktemplateliteralismissing${r.length}closingbracket${r.length===1?"":"s"}(\`}\`)`;thrownewError(n)}returno.join("")}});varnQ=_((YKt,xCe)=>{"use strict";varmB=BI(),{stdout:K6,stderr:z6}=mL(),{stringReplaceAll:OEt,stringEncaseCRLFWithFirstIndex:MEt}=yCe(),{isArray:$k}=Array,PCe=["ansi","ansi","ansi256","ansi16m"],UC=Object.create(null),UEt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))thrownewError("The `level` option should be an integer from 0 to 3");letr=K6?K6.level:0;t.level=e.level===void0?r:e.level},J6=class{constructor(e){returnDCe(e)}},DCe=t=>{lete={};returnUEt(e,t),e.template=(...r)=>bCe(e.template,...r),Object.setPrototypeOf(e,eQ.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{thrownewError("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=J6,e.template};functioneQ(t){returnDCe(t)}for(let[t,e]ofObject.entries(mB))UC[t]={get(){letr=tQ(this,V6(e.open,e.close,this._styler),this._isEmpty);returnObject.defineProperty(this,t,{value:r}),r}};UC.visible={get(){lett=tQ(this,this._styler,!0);returnObject.defineProperty(this,"visible",{value:t}),t}};varSCe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(lettofSCe)UC[t]={get(){let{level:e}=this;returnfunction(...r){leto=V6(mB.color[PCe[e]][t](...r),mB.color.close,this._styler);returntQ(this,o,this._isEmpty)}}};for(lettofSCe){lete="bg"+t[0].toUpperCase()+t.slice(1);UC[e]={get(){let{level:r}=this;returnfunction(...o){leta=V6(mB.bgColor[PCe[r]][t](...o),mB.bgColor.close,this._styler);returntQ(this,a,this._isEmpty)}}}}var_Et=Object.defineProperties(()=>{},{...UC,level:{enumerable:!0,get(){returnthis._generator.level},set(t){this._generator.level=t}}}),V6=(t,e,r)=>{leto,a;returnr===void0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},tQ=(t,e,r)=>{leto=(...a)=>$k(a[0])&&$k(a[0].raw)?vCe(o,bCe(o,...a)):vCe(o,a.length===1?""+a[0]:a.join(" "));returnObject.setPrototypeOf(o,_Et),o._generator=t,o._styler=e,o._isEmpty=r,o},vCe=(t,e)=>{if(t.level<=0||!e)returnt._isEmpty?"":e;letr=t._styler;if(r===void0)returne;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void0;)e=OEt(e,r.close,r.open),r=r.parent;letn=e.indexOf(`
`),h=0;for(let E of p){let I=e[n+h];if(!I)continue;let v=rCt.default(E);for(let x of A)E=x(E);e[n+h]=GCe.default(I,0,a)+E+GCe.default(I,a+v),h++}}return{output:e.map(o=>o.trimRight()).join(`
Readabouthowtopreventthiserroronhttps://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
`);return Buffer.from(e)};tw.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var o=parseInt(t.slice(0,r).toString(),10);if(!o)return e;var a=t.slice(r+1,o-1).toString(),n=a.indexOf("=");if(n===-1)return e;e[a.slice(0,n)]=a.slice(n+1),t=t.slice(o)}return e};tw.encode=function(t){var e=qBt(512),r=t.name,o="";if(t.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf("/");if(a===-1)return null;o+=o?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(o)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(M0(t.mode&zBt,6),100),e.write(M0(t.uid,6),108),e.write(M0(t.gid,6),116),e.write(M0(t.size,11),124),e.write(M0(t.mtime.getTime()/1e3|0,11),136),e[156]=L2e+XBt(t.type),t.linkname&&e.write(t.linkname,157),N2e.copy(e,Sv),YBt.copy(e,rj),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(M0(t.devmajor||0,6),329),e.write(M0(t.devminor||0,6),337),o&&e.write(o,345),e.write(M0(M2e(e),6),148),e)};tw.decode=function(t,e,r){var o=t[156]===0?0:t[156]-L2e,a=ew(t,0,100,e),n=U0(t,100,8),u=U0(t,108,8),A=U0(t,116,8),p=U0(t,124,12),h=U0(t,136,12),E=VBt(o),I=t[157]===0?null:ew(t,157,100,e),v=ew(t,265,32),x=ew(t,297,32),C=U0(t,329,8),F=U0(t,337,8),N=M2e(t);if(N===8*32)return null;if(N!==U0(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(N2e.compare(t,Sv,Sv+6)===0)t[345]&&(a=ew(t,345,155,e)+"/"+a);else if(!(WBt.compare(t,Sv,Sv+6)===0&&KBt.compare(t,rj,rj+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return o===0&&a&&a[a.length-1]==="/"&&(o=5),{name:a,mode:n,uid:u,gid:A,size:p,mtime:new Date(1e3*h),type:E,linkname:I,uname:v,gname:x,devmajor:C,devminor:F}}});var Y2e=_((H$t,j2e)=>{var _2e=ve("util"),$Bt=T2e(),bv=nj(),H2e=$C().Writable,q2e=$C().PassThrough,G2e=function(){},U2e=function(t){return t&=511,t&&512-t},evt=function(t,e){var r=new WQ(t,e);return r.end(),r},tvt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},WQ=function(t,e){this._parent=t,this.offset=e,q2e.call(this,{autoDestroy:!1})};_2e.inherits(WQ,q2e);WQ.prototype.destroy=function(t){this._parent.destroy(t)};var ap=function(t){if(!(this instanceof ap))return new ap(t);H2e.call(this,t),t=t||{},this._offset=0,this._buffer=$Bt(),this._missing=0,this._partial=!1,this._onparse=G2e,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,o=function(){e._continue()},a=function(v){if(e._locked=!1,v)return e.destroy(v);e._stream||o()},n=function(){e._stream=null;var v=U2e(e._header.size);v?e._parse(v,u):e._parse(512,I),e._locked||o()},u=function(){e._buffer.consume(U2e(e._header.size)),e._parse(512,I),o()},A=function(){var v=e._header.size;e._paxGlobal=bv.decodePax(r.slice(0,v)),r.consume(v),n()},p=function(){var v=e._header.size;e._pax=bv.decodePax(r.slice(0,v)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(v),n()},h=function(){var v=e._header.size;this._gnuLongPath=bv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},E=function(){var v=e._header.size;this._gnuLongLinkPath=bv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},I=function(){var v=e._offset,x;try{x=e._header=bv.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(C){e.emit("error",C)}if(r.consume(512),!x){e._parse(512,I),o();return}if(x.type==="gnu-long-path"){e._parse(x.size,h),o();return}if(x.type==="gnu-long-link-path"){e._parse(x.size,E),o();return}if(x.type==="pax-global-header"){e._parse(x.size,A),o();return}if(x.type==="pax-header"){e._parse(x.size,p),o();return}if(e._gnuLongPath&&(x.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(x.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=x=tvt(x,e._pax),e._pax
Found:${A}`);v.code="EBADSIZE",v.found=A,v.expected=t.size,v.sri=e,p.emit("error",v)}else if(t.integrity&&!I){let v=new Error(`${e}integritychecksumfailedwhenusing${o}:wanted${a}butgot${E}.(${A}bytes)`);v.code="EINTEGRITY",v.found=E,v.expected=a,v.algorithm=o,v.sri=e,p.emit("error",v)}else p.emit("size",A),p.emit("integrity",E),I&&p.emit("verified",I)});return p}BA.exports.create=Fvt;function Fvt(t){t=ia(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",o=e.map(Qv.createHash);return{update:function(a,n){return o.forEach(u=>u.update(a,n)),this},digest:function(a){return e.reduce((u,A)=>{let p=o.shift().digest("base64"),h=new H0(`${A}-${p}${r}`,t);if(h.algorithm&&h.digest){let E=h.algorithm;u[E]||(u[E]=[]),u[E].push(h)}return u},new vm)}}}var Tvt=new Set(Qv.getHashes()),pBe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>Tvt.has(t));function Lvt(t,e){return pBe.indexOf(t.toLowerCase())>=pBe.indexOf(e.toLowerCase())?t:e}});var GBe=_((pir,qBe)=>{var LPt=uN();function NPt(t){return LPt(t)?void 0:t}qBe.exports=NPt});var YBe=_((hir,jBe)=>{var OPt=qb(),MPt=x8(),UPt=F8(),_Pt=Gd(),HPt=md(),qPt=GBe(),GPt=v_(),jPt=b8(),YPt=1,WPt=2,KPt=4,zPt=GPt(function(t,e){var r={};if(t==null)return r;var o=!1;e=OPt(e,function(n){return n=_Pt(n,t),o||(o=n.length>1),n}),HPt(t,jPt(t),r),o&&(r=MPt(r,YPt|WPt|KPt,qPt));for(var a=e.length;a--;)UPt(r,e[a]);return r});jBe.exports=zPt});Dt();je();Dt();var VBe=ve("child_process"),XBe=Ze(rd());qt();var cC=new Map([]);var l2={};zt(l2,{BaseCommand:()=>ut,WorkspaceRequiredError:()=>sr,getCli:()=>ehe,getDynamicLibs:()=>$pe,getPluginConfiguration:()=>AC,openWorkspace:()=>uC,pluginCommands:()=>cC,runExit:()=>ik});qt();var ut=class extends it{constructor(){super(...arguments);this.cwd=ge.String("--cwd",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<"u")throw new st("The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path");return super.validateAndExecute()}};je();Dt();qt();var sr=class extends st{constructor(e,r){let o=z.relative(e,r),a=z.join(e,Ot.fileName);super(`Thiscommandcanonlyberunfromwithinaworkspaceofyourproject(${o}isn'taworkspaceof${a}).`)}};je();Dt();iA();Nl();Q1();qt();var LAt=Ze(Vn());$a();var $pe=()=>new Map([["@yarnpkg/cli",l2],["@yarnpkg/core",a2],["@yarnpkg/fslib",Ww],["@yarnpkg/libzip",k1],["@yarnpkg/parsers",eI],["@yarnpkg/shell",L1],["clipanion",fI],["semver",LAt],["typanion",Ko]]);je();async function uC(t,e){let{project:r,workspace:o}=await St.find(t,e);if(!o)throw new sr(r.cwd,e);return o}je();Dt();iA();Nl();Q1();qt();var nDt=Ze(Vn());$a();var $8={};zt($8,{AddCommand:()=>Qh,BinCommand:()=>Rh,CacheCleanCommand:()=>Fh,ClipanionCommand:()=>Kd,ConfigCommand:()=>Oh,ConfigGetCommand:()=>Th,ConfigSetCommand:()=>Lh,ConfigUnsetCommand:()=>Nh,DedupeCommand:()=>Mh,EntryCommand:()=>gC,ExecCommand:()=>Uh,ExplainCommand:()=>qh,ExplainPeerRequirementsCommand:()=>_h,HelpCommand:()=>zd,InfoCommand:()=>Gh,LinkCommand:()=>Yh,NodeCommand:()=>Wh,PluginCheckCommand:()=>Kh,PluginImportCommand:()=>Vh,PluginImportSourcesCommand:()=>Xh,PluginListCommand:()=>zh,PluginRemoveCommand:()=>Zh,PluginRuntimeCommand:()=>$h,RebuildCommand:()=>e0,RemoveCommand:()=>t0,RunCommand:()=>r0,RunIndexCommand:()=>Xd,SetResolutionCommand:()=>n0,SetVersionCommand:()=>Hh,SetVersionSourcesCommand:()=>Jh,UnlinkCommand:()=>i0,UpCommand:()=>Jf,VersionCommand:()=>Jd,WhyCommand:()=>s0,WorkspaceCommand:()=>l0,WorkspacesListCommand:()=>a0,YarnCommand:()=>jh,dedupeUtils:()=>hk,default:()=>xgt,suggestUtils:()=>Xc});var Qde=Ze(rd());je();je();je();qt();var H0e=Ze(p2());$a();var Xc={};zt(Xc,{Modifier:()=>B8,Strategy:()=>Ak,Target:()=>h2,WorkspaceModifier:()=>N0e,applyModifier:()=>tpt,extractDescriptorFromPath:()=>v8,extractRangeModifier:()=>O0e,fetchDescriptorFrom:()=>P8,findProjectDescriptors:()=>_0e,getModifier:()=>g2,getSuggestedDescriptors:()=>d2,makeWorkspaceDescriptor:()=>U0e,toWorkspaceModifier:()=>M0e})
Tryrunningthecommandagainwiththepackagenameprefixed:${pe.pretty(r,"yarn add",pe.Type.CODE)}${pe.pretty(r,j.makeDescriptor(j.makeIdent(null,"my-package"),`${te[0]}...`),pe.Type.DESCRIPTOR)}`);if(!J)throw new st(`The${pe.pretty(r,U,pe.Type.CODE)}stringdidn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let ae=npt(a,J,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(ae.map(async ce=>{let we=await d2(J,{project:o,workspace:a,cache:n,fixed:u,target:ce,modifier:h,strategies:E,maxResults:I});return{request:J,suggestedDescriptors:we,target:ce}}))})).then(U=>U.flat()),x=await fA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async U=>{for(let{request:J,suggestedDescriptors:{suggestions:te,rejections:ae}}of v)if(te.filter(ce=>ce.descriptor!==null).length===0){let[ce]=ae;if(typeof ce>"u")throw new Error("Assertion failed: Expected an error to have been set");o.configuration.get("enableNetwork")?U.reportError(27,`${j.prettyDescriptor(r,J)} can'tberesolvedtoasatisfyingrange`):U.reportError(27,`${j.prettyDescriptor(r,J)}can'tberesolvedtoasatisfyingrange(note:networkresolutionhasbeendisabled)`),U.reportSeparator(),U.reportExceptionOnce(ce)}});if(x.hasErrors())return x.exitCode();let C=!1,F=[],N=[];for(let{suggestedDescriptors:{suggestions:U},target:J}of v){let te,ae=U.filter(de=>de.descriptor!==null),le=ae[0].descriptor,ce=ae.every(de=>j.areDescriptorsEqual(de.descriptor,le));ae.length===1||ce?te=le:(C=!0,{answer:te}=await(0,H0e.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:U.map(({descriptor:de,name:Be,reason:Ee})=>de?{name:Be,hint:Ee,descriptor:de}:{name:Be,hint:Ee,disabled:!0}),onCancel:()=>process.exit(130),result(de){return this.find(de,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let we=a.manifest[J].get(te.identHash);(typeof we>"u"||we.descriptorHash!==te.descriptorHash)&&(a.manifest[J].set(te.identHash,te),this.optional&&(J==="dependencies"?a.manifest.ensureDependencyMeta({...te,range:"unknown"}).optional=!0:J==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...te,range:"unknown"}).optional=!0)),typeof we>"u"?F.push([a,J,te,E]):N.push([a,J,we,te]))}return await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyAddition,F),await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyReplacement,N),C&&this.context.stdout.write(`
`),await o.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};Qh.paths=[["add"]],Qh.usage=it.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"<package>\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Addaspecificversionforapackagetothecurrentworksp
`),0}return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async u=>{let A=await An.getPackageAccessibleBinaries(a,{project:o}),h=Array.from(A.keys()).reduce((E,I)=>Math.max(E,I.length),0);for(let[E,[I,v]]of A)u.reportJson({name:E,source:j.stringifyIdent(I),path:v});if(this.verbose)for(let[E,[I]]of A)u.reportInfo(null,`${E.padEnd(h," ")}${j.prettyLocator(r,I)}`);else for(let E of A.keys())u.reportInfo(null,E)})).exitCode()}};Rh.paths=[["bin"]],Rh.usage=it.Usage({description:"get the path to a binary script",details:`
Whenusedwithoutarguments,thiscommandwillprintthelistofallthebinariesavailableinthecurrentworkspace.Addingthe\`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.
`,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]});je();Dt();qt();var Fh=class extends ut{constructor(){super(...arguments);this.mirror=ge.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=ge.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await Nr.find(r);return(await Ft.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&o.mirrorCwd!==null,u=!this.mirror;n&&(await oe.removePromise(o.mirrorCwd),await r.triggerHook(A=>A.cleanGlobalArtifacts,r)),u&&await oe.removePromise(o.cwd)})).exitCode()}};Fh.paths=[["cache","clean"],["cache","clear"]],Fh.usage=it.Usage({description:"remove the shared cache files",details:`
`,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]});je();qt();var G0e=Ze(m2()),D8=ve("util"),Th=class extends ut{constructor(){super(...arguments);this.why=ge.Boolean("--why",!1,{description:"Print the explanation for why a setting has its value"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=ge.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(o)>"u")throw new st(`Couldn'tfindaconfigurationsettingsnamed"${o}"`);let u=r.getSpecial(o,{hideSecrets:!this.unsafe,getNativePaths:!0}),A=He.convertMapsToIndexableObjects(u),p=a?(0,G0e.default)(A,a):A,h=await Ft.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
`,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarnconfigget'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]});je();qt();var Fge=Ze(k8()),Tge=Ze(m2()),Lge=Ze(Q8()),R8=ve("util"),Lh=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String();this.value=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new st("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new st(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new st("This setting only affects the file it'sin,andthuscannotbesetfromtheCLI");let A=this.json?JSON.parse(this.value):this.value;await(this.home?C=>Ke.updateHomeConfiguration(C):C=>Ke.updateConfiguration(o(),C))(C=>{if(n){let F=(0,Fge.default)(C);return(0,Lge.default)(F,this.name,A),F}else return{...C,[a]:A}});let E=(await Ke.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),I=He.convertMapsToIndexableObjects(E),v=n?(0,Tge.default)(I,n):I;return(await Ft.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async C=>{R8.inspect.styles.name="cyan",C.reportInfo(0,`Successfully set ${this.name} to ${(0,R8.inspect)(v,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Lh.paths=[["config","set"]],Lh.usage=it.Usage({description:"changeaconfigurationsettings",details:`
`,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarnconfigsetunsafeHttpWhitelist--json'["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarnconfigsetpackageExtensions--json'{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarnconfigset'npmRegistries["//npm.example.com"].npmAuthToken'"ffffffff-ffff-ffff-ffff-ffffffffffff"`]]});je();qt();var Wge=Ze(k8()),Kge=Ze(Uge()),zge=Ze(T8()),Nh=class extends ut{constructor(){super(...arguments);this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new st("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new st(`Couldn't find a configuration settings named "${a}"`);let A=this.home?h=>Ke.updateHomeConfiguration(h):h=>Ke.updateConfiguration(o(),h);return(await Ft.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await A(I=>{if(!(0,Kge.default)(I,this.name))return h.reportWarning(0,`Configuration doesn'tcontainsetting${this.name};thereisnothingtounset`),E=!0,I;let v=n?(0,Wge.default)(I):{...I};return(0,zge.default)(v,this.name),v}),E||h.reportInfo(0,`Successfullyunset${this.name}`)})).exitCode()}};Nh.paths=[["config","unset"]],Nh.usage=it.Usage({description:"unset a configuration setting",details:`
`,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]});je();Dt();qt();var pk=ve("util"),Oh=class extends ut{constructor(){super(...arguments);this.noDefaults=ge.Boolean("--no-defaults",!1,{description:"Omit the default values from the display"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.verbose=ge.Boolean("-v,--verbose",{hidden:!0});this.why=ge.Boolean("--why",{hidden:!0});this.names=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins,{strict:!1}),o=await TE({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:"The --verbose option is deprecated, the settings' descriptions are now always displayed"},{option:this.why,message:"The --why option is deprecated, the settings' sources are now always displayed"}]);if(o!==null)return o;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,u=await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async A=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)A.reportError(34,`Invalidconfigurationkey"${p}"in${h}`);A.reportSeparator()}if(this.json)for(let p of a){let h=r.settings.get(p);typeof h>"u"&&A.reportError(34,`Noconfigurationkeynamed"${p}"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),I=r.sources.get(p)??"<default>",v=I&&I[0]!=="<"?ue.fromPortablePath(I):I;A.reportJson({key:p,effective:E,source:v,...h})}else{let p={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},h={},E={children:h};for(let I of a){if(this.noDefaults&&!r.sources.has(I))continue;let v=r.settings.get(I),x=r.sources.get(I)??"<default>",C=r.getSpecial(I,{hideSecrets:!0,getNativePaths:!0}),F={Description:{label:"Description",value:pe.tuple(pe.Type.MARKDOWN,{text:v.description,format:this.cli.format(),paragraphs:!1})},Source:{label:"Source",value:pe.tuple(x[0]==="<"?pe.Type.CODE:pe.Type.PATH,x)}};h[I]={value:pe.tuple(pe.Type.CODE,I),children:F};let N=(U,J)=>{for(let[te,ae]of J)if(ae instanceof Map){let le={};U[te]={children:le},N(le,ae)}else U[te]={label:te,value:pe.tuple(pe.Type.NO_HINT,(0,pk.inspect)(ae,p))}};C instanceof Map?N(F,C):F.Value={label:"Value",value:pe.tuple(pe.Type.NO_HINT,(0,pk.inspect)(C,p))}}a.length!==1&&(n=void 0),fs.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<"u"){let A=a[0],p=(0,pk.inspect)(r.getSpecial(A,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get("enableColors")});this.context.stdout.write(`
`,examples:[["Print the active configuration settings","$0 config"]]});je();qt();$a();var hk={};zt(hk,{Strategy:()=>y2,acceptedStrategies:()=>U0t,dedupe:()=>L8});je();je();var Jge=Ze(Xo()),y2=(e=>(e.HIGHEST="highest",e))(y2||{}),U0t=new Set(Object.values(y2)),_0t={highest:async(t,e,{resolver:r,fetcher:o,resolveOptions:a,fetchOptions:n})=>{let u=new Map;for(let[p,h]of t.storedResolutions){let E=t.storedDescriptors.get(p);if(typeof E>"u")throw new Error(`Assertionfailed:Thedescriptor(${p})shouldhavebeenregistered`);He.getSetWithDefault(u,E.identHash).add(h)}let A=new Map(He.mapAndFilter(t.storedDescriptors.values(),p=>j.isVirtualDescriptor(p)?He.mapAndFilter.skip:[p.descriptorHash,He.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=A.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertionfailed:Thedescriptor(${p.descriptorHash})shouldhavebeenregistered`);let E=t.storedResolutions.get(p.descriptorHash);if(typeof E>"u")throw new Error(`Assertionfailed:Theresolution(${p.descriptorHash})shouldhavebeenregistered`);let I=t.originalPackages.get(E);if(typeof I>"u")throw new Error(`Assertionfailed:Thepackage(${E})shouldhavebeenregistered`);Promise.resolve().then(async()=>{let v=r.getResolutionDependencies(p,a),x=Object.fromEntries(await He.allSettledSafe(Object.entries(v).map(async([te,ae])=>{let le=A.get(ae.descriptorHash);if(typeof le>"u")throw new Error(`Assertionfailed:Thedescriptor(${ae.descriptorHash})shouldhavebeenregistered`);let ce=await le.promise;if(!ce)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[te,ce.updatedPackage]})));if(e.length&&!Jge.default.isMatch(j.stringifyIdent(p),e)||!r.shouldPersistResolution(I,a))return I;let C=u.get(p.identHash);if(typeof C>"u")throw new Error(`Assertionfailed:Theresolutions(${p.identHash})shouldhavebeenregistered`);if(C.size===1)return I;let F=[...C].map(te=>{let ae=t.originalPackages.get(te);if(typeof ae>"u")throw new Error(`Assertionfailed:Thepackage(${te})shouldhavebeenregistered`);return ae}),N=await r.getSatisfying(p,x,F,a),U=N.locators?.[0];if(typeof U>"u"||!N.sorted)return I;let J=t.originalPackages.get(U.locatorHash);if(typeof J>"u")throw new Error(`Assertionfailed:Thepackage(${U.locatorHash})shouldhavebeenregistered`);return J}).then(async v=>{let x=await t.preparePackage(v,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:I,updatedPackage:v,resolvedPackage:x})}).catch(v=>{h.reject(v)})}return[...A.values()].map(p=>p.promise)}};async function L8(t,{strategy:e,patterns:r,cache:o,report:a}){let{configuration:n}=t,u=new Qi,A=n.makeResolver(),p=n.makeFetcher(),h={cache:o,checksums:t.storedChecksums,fetcher:p,project:t,report:u,cacheOptions:{skipIntegrityCheck:!0}},E={project:t,resolver:A,report:u,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let I=_0t[e],v=await I(t,r,{resolver:A,resolveOptions:E,fetcher:p,fetchOptions:h}),x=Xs.progressViaCounter(v.length);await a.reportProgress(x);let C=0;await Promise.all(v.map(U=>U.then(J=>{if(J===null||J.currentPackage.locatorHash===J.updatedPackage.locatorHash)return;C++;let{descriptor:te,currentPackage:ae,updatedPackage:le}=J;a.reportInfo(0,`${j.prettyDescriptor(n,te)}canbededupedfrom${j.prettyLocator(n,ae)}to${j.prettyLocator(n,le)}`),a.reportJson({descriptor:j.stringifyDescriptor(te),currentResolution:j.stringifyLocator(ae),updatedResolution:j.stringifyLocator(le)}),t.storedResolutions.set(te.descriptorHash,le.locatorHash)}).finally(()=>x.tick())));let F;switch(C){case 0:F="No packages";break;case 1:F="One package";break;default:F=`${C}packages`}let N=pe.pretty(n,e,pe.Type.CODE);return a.reportInfo(0,`${F}canbededupedusingthe${N}strategy`),C})}var Mh=class extends ut{constructor(){super(...arguments);this.strategy=ge.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:Js(y2)});this.check=ge.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when dupl
`,examples:[["Explain the corresponding peer requirement for a hash","$0 explain peer-requirements p1a4ed"],["List all peer requirements","$0 explain peer-requirements"]]});async function q0t(t,e,r){let o=e.peerRequirementNodes.get(t);if(typeof o>"u")throw new Error(`NopeerDependencyrequirementsfoundforhash:"${t}"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:pe.tuple(pe.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:pe.tuple(pe.Type.NO_HINT,"...")}]:[]}:(a.add(p.requester.locatorHash),{value:pe.tuple(pe.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[j.stringifyLocator(h.requester),n(h)]))}),u=e.peerWarnings.find(p=>p.hash===t);return(await Ft.start({configuration:e.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=pe.mark(e.configuration),E=u?h.Cross:h.Check;if(p.reportInfo(0,`Package${pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)}isrequestedtoprovide${pe.pretty(e.configuration,o.ident,pe.Type.IDENT)}byitsdescendants`),p.reportSeparator(),p.reportInfo(0,pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)),fs.emitTree({children:Object.fromEntries(Array.from(o.requests.values(),I=>[j.stringifyLocator(I.requester),n(I)]))},{configuration:e.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),o.provided.range==="missing:"){let I=u?"":" , but all peer requests are optional";p.reportInfo(0,`${E}Package${pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)}doesnotprovide${pe.pretty(e.configuration,o.ident,pe.Type.IDENT)}${I}.`)}else{let I=e.storedResolutions.get(o.provided.descriptorHash);if(!I)throw new Error("Assertion failed: Expected the descriptor to be registered");let v=e.storedPackages.get(I);if(!v)throw new Error("Assertion failed: Expected the package to be registered");p.reportInfo(0,`${E}Package${pe.pretty(e.configuration,o.subject,pe.Type.LOCATOR)}provides${pe.pretty(e.configuration,o.ident,pe.Type.IDENT)}withversion${j.prettyReference(e.configuration,v.version??"0.0.0")},${u?"which does not satisfy all requests.":"which satisfies all requests"}`),u?.type===3&&(u.range?p.reportInfo(0,`Thecombinedrequestedrangeis${pe.pretty(e.configuration,u.range,pe.Type.RANGE)}`):p.reportInfo(0," Unfortunately, the requested ranges have no overlap"))}})).exitCode()}async function G0t(t,e){return(await Ft.start({configuration:t.configuration,stdout:e.stdout,includeFooter:!1,includePrefix:!1},async o=>{let a=pe.mark(t.configuration),n=He.sortMap(t.peerRequirementNodes,[([,u])=>j.stringifyLocator(u.subject),([,u])=>j.stringifyIdent(u.ident)]);for(let[,u]of n.values()){if(!u.root)continue;let A=t.peerWarnings.find(E=>E.hash===u.hash),p=[...j.allPeerRequests(u)],h;if(p.length>2?h=`and${p.length-1}otherdependencies`:p.length===2?h=" and 1 other dependency":h="",u.provided.range!=="missing:"){let E=t.storedResolutions.get(u.provided.descriptorHash);if(!E)throw new Error("Assertion failed: Expected the resolution to have been registered");let I=t.storedPackages.get(E);if(!I)throw new Error("Assertion failed: Expected the provided package to have been registered");let v=`${pe.pretty(t.configuration,u.hash,pe.Type.CODE)}\u2192${A?a.Cross:a.Check}${j.prettyLocator(t.configuration,u.subject)}provides${j.prettyLocator(t.configuration,I)}to${j.prettyLocator(t.configuration,p[0].requester)}${h}`;A?o.reportWarning(0,v):o.reportInfo(0,v)}else{let E=`${pe.pretty(t.configuration,u.hash,pe.Type.CODE)}\u2192${A?a.Cross:a.Check}${j.prettyLocator(t.configuration,u.subject)}doesn'tprovide${j.prettyIdent(t.configuration,u.ident)}to${j.prettyLocator(t.configuration,p[0].requester)}${h}`;A?o.reportWarning(0,E):o.reportInfo(0,E)}}})).exitCode()}je();qt();$a();je();je();Dt();qt();var Xge=Ze(Vn()),Hh=class extends ut{constructor(){super(...arguments);this.useYarnPath=ge.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=ge.Boolean("--only
${e}`)})}let A=t.projectCwd??t.startingCwd,p=z.resolve(A,".yarn/releases"),h=z.resolve(p,`yarn-${e}.cjs`),E=z.relative(t.startingCwd,h),I=He.isTaggedYarnVersion(e),v=t.get("yarnPath"),x=!I,C=x||!!v||!!a;if(a===!1){if(x)throw new Vt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");C=!1}else!C&&!process.env.COREPACK_ROOT&&(o.reportWarning(0,`Youdon't seem to have ${pe.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'llhavetorelyon${pe.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")}instead`),C=!0);if(C){let te=await u();o.reportInfo(0,`Savingthenewreleasein${pe.pretty(t,E,"magenta")}`),await oe.removePromise(z.dirname(h)),await oe.mkdirPromise(z.dirname(h),{recursive:!0}),await oe.writeFilePromise(h,te,{mode:493}),await Ke.updateConfiguration(A,{yarnPath:z.relative(A,h)})}else await oe.removePromise(z.dirname(h)),await Ke.updateConfiguration(A,{yarnPath:Ke.deleteProperty});let F=await Ot.tryFind(A)||new Ot;F.packageManager=`yarn@${I?e:awaitE2(t,"stable")}`;let N={};F.exportTo(N);let U=z.join(A,Ot.fileName),J=`${JSON.stringify(N,null,F.indent)}
`;return await oe.changeFilePromise(U,J,{automaticNewlines:!0}),{bundleVersion:e}}function Zge(t){return wr[fD(t)]}var Y0t=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function W0t(t){let r=`https://repo.yarnpkg.com/${He.isTaggedYarnVersion(nn)?nn:await E2(t,"canary")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,o=await sn.get(r,{configuration:t});return new Map(Array.from(o.toString().matchAll(Y0t),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=Zge(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var qh=class extends ut{constructor(){super(...arguments);this.code=ge.String({required:!1,validator:sI(Ey(),[iI(/^YN[0-9]{4}$/)])});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let o=Zge(this.code),a=pe.pretty(r,o,pe.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),A=(await W0t(r)).get(this.code),p=typeof A<"u"?pe.jsonOrPretty(this.json,r,pe.tuple(pe.Type.MARKDOWN,{text:A,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
`)}else{let o={children:He.mapAndFilter(Object.entries(wr),([a,n])=>Number.isNaN(Number(a))?He.mapAndFilter.skip:{label:Ku(Number(a)),value:pe.tuple(pe.Type.CODE,n)})};fs.emitTree(o,{configuration:r,stdout:this.context.stdout,json:this.json})}}};qh.paths=[["explain"]],qh.usage=it.Usage({description:"explain an error code",details:`
`,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]});je();Dt();qt();var $ge=Ze(Xo()),Gh=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=ge.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=ge.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=ge.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=ge.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=ge.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=ge.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a&&!this.all)throw new sr(o.cwd,this.context.cwd);await o.restoreInstallState();let u=new Set(this.extra);this.cache&&u.add("cache"),this.dependents&&u.add("dependents"),this.manifest&&u.add("manifest");let A=(ae,{recursive:le})=>{let ce=ae.anchoredLocator.locatorHash,we=new Map,de=[ce];for(;de.length>0;){let Be=de.shift();if(we.has(Be))continue;let Ee=o.storedPackages.get(Be);if(typeof Ee>"u")throw new Error("Assertion failed: Expected the package to be registered");if(we.set(Be,Ee),j.isVirtualLocator(Ee)&&de.push(j.devirtualizeLocator(Ee).locatorHash),!(!le&&Be!==ce))for(let g of Ee.dependencies.values()){let me=o.storedResolutions.get(g.descriptorHash);if(typeof me>"u")throw new Error("Assertion failed: Expected the resolution to be registered");de.push(me)}}return we.values()},p=({recursive:ae})=>{let le=new Map;for(let ce of o.workspaces)for(let we of A(ce,{recursive:ae}))le.set(we.locatorHash,we);return le.values()},h=({all:ae,recursive:le})=>ae&&le?o.storedPackages.values():ae?p({recursive:le}):A(a,{recursive:le}),E=({all:ae,recursive:le})=>{let ce=h({all:ae,recursive:le}),we=this.patterns.map(Ee=>{let g=j.parseLocator(Ee),me=$ge.default.makeRe(j.stringifyIdent(g)),Ce=j.isVirtualLocator(g),Ae=Ce?j.devirtualizeLocator(g):g;return ne=>{let Z=j.stringifyIdent(ne);if(!me.test(Z))return!1;if(g.reference==="unknown")return!0;let xe=j.isVirtualLocator(ne),Le=xe?j.devirtualizeLocator(ne):ne;return!(Ce&&xe&&g.reference!==ne.reference||Ae.reference!==Le.reference)}}),de=He.sortMap([...ce],Ee=>j.stringifyLocator(Ee));return{selection:de.filter(Ee=>we.length===0||we.some(g=>g(Ee))),sortedLookup:de}},{selection:I,sortedLookup:v}=E({all:this.all,recursive:this.recursive});if(I.length===0)throw new st("No package matched your request");let x=new Map;if(this.dependents)for(let ae of v)for(let le of ae.dependencies.values()){let ce=o.storedResolutions.get(le.descriptorHash);if(typeof ce>"u")throw new Error("Assertion failed: Expected the resolution to be registered");He.getArrayWithDefault(x,ce).push(ae)}let C=new Map;for(let ae of v){if(!j.isVirtualLocator(ae))continue;let le=j.devirtualizeLocator(ae);He.getArrayWithDefault(C,le.locatorHash).push(ae)}let F={},N={children:F},U=r.makeFetcher(),J={project:o,fetcher:U,cache:n,checksums:o.storedChecksums,report:new Qi,cacheOptions:{skipIntegrityCheck:!0}},te=[async(ae,le,ce)=>{if(!le.has("manifest"))return;let we=await U.fetch(ae,J),de;try{de=await Ot.find(we.prefixPath,{baseFs:we.packageFs})}finally{we.releaseFs?.()}ce("Manifest",{License:pe.tuple(pe.Type.NO_HINT,de.license),Homepage:pe.tuple(pe.Type.URL,de.raw.homepage??null)})},async(ae,le,ce)=>{if(!le.has("cache"))return;let we=o.storedChecksums.get(ae.locatorHash)??null,de=n
`,examples:[["Run a Node script","$0 node ./my-script.js"]]});je();qt();var Kh=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await Ke.findRcFiles(this.context.cwd);return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let u of o)if(!!u.data?.plugins)for(let A of u.data.plugins){if(!A.checksum||!A.spec.match(/^https?:/))continue;let p=await sn.get(A.spec,{configuration:r}),h=wn.makeHash(p);if(A.checksum===h)continue;let E=pe.pretty(r,A.path,pe.Type.PATH),I=pe.pretty(r,A.spec,pe.Type.URL),v=`${E}isdifferentfromthefileprovidedby${I}`;n.reportJson({...A,newChecksum:h}),n.reportError(0,v)}})).exitCode()}};Kh.paths=[["plugin","check"]],Kh.usage=it.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:`
`,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]});je();je();Dt();qt();var ide=ve("os");je();Dt();qt();var ede=ve("os");je();Nl();qt();var X0t="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Vd(t,e){let r=await sn.get(X0t,{configuration:t}),o=Ki(r.toString());return Object.fromEntries(Object.entries(o).filter(([a,n])=>!e||Lr.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var zh=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Vd(r,nn);for(let[u,{experimental:A,...p}]of Object.entries(n)){let h=u;A&&(h+=" [experimental]"),a.reportJson({name:u,experimental:A,...p}),a.reportInfo(null,h)}})).exitCode()}};zh.paths=[["plugin","list"]],zh.usage=it.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarnpluginimport`.\n ",examples:[["List the official plugins","$0 plugin list"]]});var Z0t=/^[0-9]+$/,$0t=process.platform==="win32";function tde(t){return Z0t.test(t)?`pull/${t}/head`:t}var egt=({repository:t,branch:e},r)=>[["git","init",ue.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",tde(e)],["git","reset","--hard","FETCH_HEAD"]],tgt=({branch:t})=>[["git","fetch","origin","--depth=1",tde(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],rgt=({plugins:t,noMinify:e},r,o)=>[["yarn","build:cli",...new Array().concat(...t.map(a=>["--plugin",z.resolve(o,a)])),...e?["--no-minify"]:[],"|"],[$0t?"move":"mv","packages/yarnpkg-cli/bundles/yarn.js",ue.fromPortablePath(r),"|"]],Jh=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=ge.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"If set, the bundle will be built but not added to the project"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=ge.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),a=typeof this.installPath<"u"?z.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):z.resolve(ue.toPortablePath((0,ede.tmpdir)()),"yarnpkg-sources",wn.makeHash(this.repository).slice(0,6));return(await Ft.start({configuration:r,stdout:this.context.stdout},async u=>{await M8(this,{configuration:r,report:u,target:a}),u.reportSeparator(),u.reportInfo(0,"Building a fresh bundle"),u.reportSeparator();let A=await Ur.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=z.join(a,`packages/yarnpkg-cli/bundles/yarn-${A.stdout.trim()}.js`);oe.existsSync(p)||(await C2(rgt(this,p,a),{configuration:r,context:this.context,target:a}),u.reportSeparator());let h=await oe.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await N8(r,null,async()=>h,{report:u});this.skipPlugins||await ngt(this,E,{project:o,report:u,target:a})}})).exitCode()}};Jh.paths=[["set","version","from","sources"]],Jh.usage=it.Usage({descrip
`,examples:[["Build Yarn from master","$0 set version from sources"]]});async function C2(t,{configuration:e,context:r,target:o}){for(let[a,...n]of t){let u=n[n.length-1]==="|";if(u&&n.pop(),u)await Ur.pipevp(a,n,{cwd:o,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${pe.pretty(e,`$${[a,...n].join(" ")}`,"grey")}
`);try{await Ur.execvp(a,n,{cwd:o,strict:!0})}catch(A){throw r.stdout.write(A.stdout||A.stack),A}}}}async function M8(t,{configuration:e,report:r,target:o}){let a=!1;if(!t.force&&oe.existsSync(z.join(o,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await C2(tgt(t),{configuration:e,context:t.context,target:o}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await oe.removePromise(o),await oe.mkdirPromise(o,{recursive:!0}),await C2(egt(t,o),{configuration:e,context:t.context,target:o}))}async function ngt(t,e,{project:r,report:o,target:a}){let n=await Vd(r.configuration,e),u=new Set(Object.keys(n));for(let A of r.configuration.plugins.keys())!u.has(A)||await U8(A,t,{project:r,report:o,target:a})}je();je();Dt();qt();var rde=Ze(Vn()),nde=ve("vm");var Vh=class extends ut{constructor(){super(...arguments);this.name=ge.String();this.checksum=ge.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Ft.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await St.find(r,this.context.cwd),u,A;if(this.name.match(/^\.{0,2}[\\/]/)||ue.isAbsolute(this.name)){let p=z.resolve(this.context.cwd,ue.toPortablePath(this.name));a.reportInfo(0,`Reading${pe.pretty(r,p,pe.Type.PATH)}`),u=z.relative(n.cwd,p),A=await oe.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new Vt(52,`Pluginspecifier"${this.name}"isneitherapluginnamenoravalidurl`)}u=this.name,p=this.name}else{let h=j.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!rde.default.valid(h.reference))throw new Vt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let E=j.stringifyIdent(h),I=await Vd(r,nn);if(!Object.hasOwn(I,E)){let v=`Couldn'tfindapluginnamed${j.prettyIdent(r,h)}ontheremoteregistry.
`;throw r.plugins.has(E)?v+=`Apluginnamed${j.prettyIdent(r,h)}isalreadyinstalled;possiblyattemptingtoimportabuilt-inplugin.`:v+=`Notethatonlythepluginsreferencedonourwebsite(${pe.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",pe.Type.URL)})canbereferencedbytheirname;anyotherpluginwillhavetobereferencedthroughitspublicurl(forexample${pe.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",pe.Type.URL)}).`,new Vt(51,v)}u=E,p=I[E].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${E}/${h.reference}/`):nn!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${nn}/`))}a.reportInfo(0,`Downloading${pe.pretty(r,p,"green")}`),A=await sn.get(p,{configuration:r})}await _8(u,A,{checksum:this.checksum,project:n,report:a})})).exitCode()}};Vh.paths=[["plugin","import"]],Vh.usage=it.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
`,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]});async function _8(t,e,{checksum:r=!0,project:o,report:a}){let{configuration:n}=o,u={},A={exports:u};(0,nde.runInNewContext)(e.toString(),{module:A,exports:u});let h=`.yarn/plugins/${A.exports.name}.cjs`,E=z.resolve(o.cwd,h);a.reportInfo(0,`Savingthenewpluginin${pe.pretty(n,h,"magenta")}`),await oe.mkdirPromise(z.dirname(E),{recursive:!0}),await oe.writeFilePromise(E,e);let I={path:h,spec:t};r&&(I.checksum=wn.makeHash(e)),await Ke.addPlugin(o.cwd,[I])}var igt=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],Xh=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=typeof this.installPath<"u"?z.resolve(this.context.cwd,ue.toPortablePath(this.installPath)):z.resolve(ue.toPortablePath((0,ide.tmpdir)()),"yarnpkg-sources",wn.makeHash(this.repository).slice(0,6));return(await Ft.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:u}=await St.find(r,this.context.cwd),A=j.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=j.stringifyIdent(A),h=await Vd(r,nn);if(!Object.hasOwn(h,p))throw new Vt(51,`Couldn'tfindapluginnamed"${p}"ontheremoteregistry.Notethatonlythepluginsreferencedonourwebsite(https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let E=p;await M8(this,{configuration:r,report:n,target:o}),await U8(E,this,{project:u,report:n,target:o})})).exitCode()}};Xh.paths=[["plugin","import","from","sources"]],Xh.usage=it.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
`,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]});je();qt();var $h=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Ft.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let u=this.context.plugins.plugins.has(n),A=n;u&&(A+=" [builtin]"),a.reportJson({name:n,builtin:u}),a.reportInfo(null,`${A}`)}})).exitCode()}};$h.paths=[["plugin","runtime"]],$h.usage=it.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
`,examples:[["List the currently active plugins","$0 plugin runtime"]]});je();je();qt();var e0=class extends ut{constructor(){super(...arguments);this.idents=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new sr(o.cwd,this.context.cwd);let u=new Set;for(let A of this.idents)u.add(j.parseIdent(A).identHash);if(await o.restoreInstallState({restoreResolutions:!1}),await o.resolveEverything({cache:n,report:new Qi}),u.size>0)for(let A of o.storedPackages.values())u.has(A.identHash)&&(o.storedBuildState.delete(A.locatorHash),o.skippedBuilds.delete(A.locatorHash));else o.storedBuildState.clear(),o.skippedBuilds.clear();return await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};e0.paths=[["rebuild"]],e0.usage=it.Usage({description:"rebuild the project's native packages",details:`
`,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});je();je();je();qt();var H8=Ze(Xo());$a();var t0=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:Js(hl)});this.patterns=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new sr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.all?o.workspaces:[a],A=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,E=[];for(let C of this.patterns){let F=!1,N=j.parseIdent(C);for(let U of u){let J=[...U.manifest.peerDependenciesMeta.keys()];for(let te of(0,H8.default)(J,C))U.manifest.peerDependenciesMeta.delete(te),h=!0,F=!0;for(let te of A){let ae=U.manifest.getForScope(te),le=[...ae.values()].map(ce=>j.stringifyIdent(ce));for(let ce of(0,H8.default)(le,j.stringifyIdent(N))){let{identHash:we}=j.parseIdent(ce),de=ae.get(we);if(typeof de>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[te].delete(we),E.push([U,te,de]),h=!0,F=!0}}}F||p.push(C)}let I=p.length>1?"Patterns":"Pattern",v=p.length>1?"don't":"doesn't",x=this.all?"any":"this";if(p.length>0)throw new st(`${I}${pe.prettyList(r,p,pe.Type.CODE)}${v}matchanypackagesreferencedby${x}workspace`);return h?(await r.triggerMultipleHooks(C=>C.afterWorkspaceDependencyRemoval,E),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};t0.paths=[["remove"]],t0.usage=it.Usage({description:"remove dependencies from the project",details:`
Ifthe\`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
-\`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
-\`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
Thiscommandacceptsglobpatternsasarguments(ifvalidIdentsandsupportedby[micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
`,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]});je();je();qt();var sde=ve("util"),Xd=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new sr(o.cwd,this.context.cwd);return(await Ft.start({configuration:r,stdout:this.context.stdout,json:this.json},async u=>{let A=a.manifest.scripts,p=He.sortMap(A.keys(),I=>I),h={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},E=p.reduce((I,v)=>Math.max(I,v.length),0);for(let[I,v]of A.entries())u.reportInfo(null,`${I.padEnd(E," ")}${(0,sde.inspect)(v,h)}`),u.reportJson({name:I,script:v})})).exitCode()}};Xd.paths=[["run"]];je();je();qt();var r0=class extends ut{constructor(){super(...arguments);this.inspect=ge.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=ge.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=ge.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=ge.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=ge.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=ge.Boolean("--silent",{hidden:!0});this.scriptName=ge.String();this.args=ge.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a,locator:n}=await St.find(r,this.context.cwd);await o.restoreInstallState();let u=this.topLevel?o.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await An.hasPackageScript(u,this.scriptName,{project:o}))return await An.executePackageScript(u,this.scriptName,this.args,{project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let A=await An.getPackageAccessibleBinaries(u,{project:o});if(A.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await An.executePackageAccessibleBinary(u,this.scriptName,this.args,{cwd:this.context.cwd,project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:A})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let E=(await Promise.all(o.workspaces.map(async I=>I.manifest.scripts.has(this.scriptName)?I:null))).filter(I=>I!==null);if(E.length===1)return await An.executeWorkspaceScript(E[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new st(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${j.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn'tlistitintheirdependencies.Tofixthat,pleaserun"yarn add node-gyp"intoyourtop-levelworkspace.Youalsocanopenanissueontherepositoryofthespecifiedpackagetosuggestthemtouseanoptionalpeerdependency.`):new st(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${j.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new st("The 'yarn
`,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]});je();je();qt();var n0=class extends ut{constructor(){super(...arguments);this.descriptor=ge.String();this.resolution=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(await o.restoreInstallState({restoreResolutions:!1}),!a)throw new sr(o.cwd,this.context.cwd);let u=j.parseDescriptor(this.descriptor,!0),A=j.makeDescriptor(u,this.resolution);return o.storedDescriptors.set(u.descriptorHash,u),o.storedDescriptors.set(A.descriptorHash,A),o.resolutionAliases.set(u.descriptorHash,A.descriptorHash),await o.installWithNewReport({stdout:this.context.stdout},{cache:n})}};n0.paths=[["set","resolution"]],n0.usage=it.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, edit the `resolutions` field in your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]});je();Dt();qt();var ode=Ze(Xo()),i0=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new sr(o.cwd,this.context.cwd);let u=o.topLevelWorkspace,A=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of u.manifest.resolutions)h.startsWith("portal:")&&A.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=z.resolve(this.context.cwd,ue.toPortablePath(p));if(He.isPathLike(p)){let E=await Ke.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:I,workspace:v}=await St.find(E,h);if(!v)throw new sr(I.cwd,h);if(this.all){for(let x of I.workspaces)x.manifest.name&&A.add(j.stringifyIdent(x.anchoredLocator));if(A.size===0)throw new st("No workspace found to be unlinked in the target project")}else{if(!v.manifest.name)throw new st("The target workspace doesn't have a name and thus cannot be unlinked");A.add(j.stringifyIdent(v.anchoredLocator))}}else{let E=[...u.manifest.resolutions.map(({pattern:I})=>I.descriptor.fullName)];for(let I of(0,ode.default)(E,p))A.add(I)}}return u.manifest.resolutions=u.manifest.resolutions.filter(({pattern:p})=>!A.has(p.descriptor.fullName)),await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};i0.paths=[["unlink"]],i0.usage=it.Usage({description:"disconnect the local project from another one",details:`
`,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]});je();je();je();qt();var ade=Ze(p2()),q8=Ze(Xo());$a();var Jf=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=ge.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=ge.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=ge.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=ge.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:Js(hl)});this.patterns=ge.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new sr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=[...o.storedDescriptors.values()],A=u.map(E=>j.stringifyIdent(E)),p=new Set;for(let E of this.patterns){if(j.parseDescriptor(E).range!=="unknown")throw new st("Ranges aren't allowed when using --recursive");for(let I of(0,q8.default)(A,E)){let v=j.parseIdent(I);p.add(v.identHash)}}let h=u.filter(E=>p.has(E.identHash));for(let E of h)o.storedDescriptors.delete(E.descriptorHash),o.storedResolutions.delete(E.descriptorHash);return await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}async executeUpClassic(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new sr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.fixed,A=this.interactive??r.get("preferInteractive"),p=g2(this,o),h=A?["keep","reuse","project","latest"]:["project","latest"],E=[],I=[];for(let N of this.patterns){let U=!1,J=j.parseDescriptor(N),te=j.stringifyIdent(J);for(let ae of o.workspaces)for(let le of["dependencies","devDependencies"]){let we=[...ae.manifest.getForScope(le).values()].map(Be=>j.stringifyIdent(Be)),de=te==="*"?we:(0,q8.default)(we,te);for(let Be of de){let Ee=j.parseIdent(Be),g=ae.manifest[le].get(Ee.identHash);if(typeof g>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let me=j.makeDescriptor(Ee,J.range);E.push(Promise.resolve().then(async()=>[ae,le,g,await d2(me,{project:o,workspace:ae,cache:n,target:le,fixed:u,modifier:p,strategies:h})])),U=!0}}U||I.push(N)}if(I.length>1)throw new st(`Patterns${pe.prettyList(r,I,pe.Type.CODE)}don't match any packages referenced by any workspace`);if(I.length>0)throw new st(`Pattern ${pe.prettyList(r,I,pe.Type.CODE)} doesn'tmatchanypackagesreferencedbyanyworkspace`);let v=await Promise.all(E),x=await fA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async N=>{for(let[,,U,{suggestions:J,rejections:te}]of v){let ae=J.filter(le=>le.descriptor!==null);if(ae.length===0){let[le]=te;if(typeof le>"u")throw new Error("Assertion failed: Expected an error to have been set");let ce=this.cli.error(le);o.configuration.get("enableNetwork")?N.reportError(27,`${j.prettyDescriptor(r,U)}can'tberesolvedtoasatisfyingrange
${ce}`)}else ae.length>1&&!A&&N.reportError(27,`${j.prettyDescriptor(r,U)}hasmultiplepossibleupgradestrategies;use-itodisambiguatemanually`)}});if(x.hasErrors())return x.exitCode();let C=!1,F=[];for(let[N,U,,{suggestions:J}]of v){let te,ae=J.filter(de=>de.descriptor!==null),le=ae[0].descriptor,ce=ae.every(de=>j.areDescriptorsEqual(de.descriptor,le));ae.length===1||ce?te=le:(C=!0,{answer:te}=await(0,ade.prompt)({type:"select",name:"answer",message:`Whichrangedoyouwanttousein${j.prettyWorkspace(r,N)}\u276F${U}?`,choices:J.map(({descriptor:de,name:Be,reason:Ee})=>de?{name:Be,hint:Ee,descriptor:de}:{name:Be,hint:Ee,disabled:!0}),onCancel:()=>process.exit(130),result(de){return this.find(de,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let we=N.manifest[U].get(te.identHash);if(typeof we>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(we.descriptorHash!==te.descriptorHash)N.manifest[U].set(te.identHash,te),F.push([N,U,we,te]);else{let de=r.makeResolver(),Be={project:o,resolver:de},Ee=r.normalizeDependency(we),g=de.bindDescriptor(Ee,N.anchoredLocator,Be);o.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,F),C&&this.context.stdout.write(`
`),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Jf.paths=[["up"]],Jf.usage=it.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarnup` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarnup` and `yarnup-R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarnup` as a counterpart to what was `yarnupgrade--latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarnupgrade` which only upgraded dependencies in the current workspace, `yarnup` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),Jf.schema=[aI("recursive",Yu.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];je();je();je();qt();var s0=class extends ut{constructor(){super(...arguments);this.recursive=ge.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=ge.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a
If\`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.
`,examples:[["Explain why lodash is used in your project","$0 why lodash"]]});function sgt(t,e,{configuration:r,peers:o}){let a=He.sortMap(t.storedPackages.values(),A=>j.stringifyLocator(A)),n={},u={children:n};for(let A of a){let p={};for(let E of A.dependencies.values()){if(!o&&A.peerDependencies.has(E.identHash))continue;let I=t.storedResolutions.get(E.descriptorHash);if(!I)throw new Error("Assertion failed: The resolution should have been registered");let v=t.storedPackages.get(I);if(!v)throw new Error("Assertion failed: The package should have been registered");if(v.identHash!==e)continue;{let C=j.stringifyLocator(A);n[C]={value:[A,pe.Type.LOCATOR],children:p}}let x=j.stringifyLocator(v);p[x]={value:[{descriptor:E,locator:v},pe.Type.DEPENDENT]}}}return u}function ogt(t,e,{configuration:r,peers:o}){let a=He.sortMap(t.workspaces,v=>j.stringifyLocator(v.anchoredLocator)),n=new Set,u=new Set,A=v=>{if(n.has(v.locatorHash))return u.has(v.locatorHash);if(n.add(v.locatorHash),v.identHash===e)return u.add(v.locatorHash),!0;let x=!1;v.identHash===e&&(x=!0);for(let C of v.dependencies.values()){if(!o&&v.peerDependencies.has(C.identHash))continue;let F=t.storedResolutions.get(C.descriptorHash);if(!F)throw new Error("Assertion failed: The resolution should have been registered");let N=t.storedPackages.get(F);if(!N)throw new Error("Assertion failed: The package should have been registered");A(N)&&(x=!0)}return x&&u.add(v.locatorHash),x};for(let v of a)A(v.anchoredPackage);let p=new Set,h={},E={children:h},I=(v,x,C)=>{if(!u.has(v.locatorHash))return;let F=C!==null?pe.tuple(pe.Type.DEPENDENT,{locator:v,descriptor:C}):pe.tuple(pe.Type.LOCATOR,v),N={},U={value:F,children:N},J=j.stringifyLocator(v);if(x[J]=U,!(C!==null&&t.tryWorkspaceByLocator(v))&&!p.has(v.locatorHash)){p.add(v.locatorHash);for(let te of v.dependencies.values()){if(!o&&v.peerDependencies.has(te.identHash))continue;let ae=t.storedResolutions.get(te.descriptorHash);if(!ae)throw new Error("Assertion failed: The resolution should have been registered");let le=t.storedPackages.get(ae);if(!le)throw new Error("Assertion failed: The package should have been registered");I(le,N,te)}}};for(let v of a)I(v.anchoredPackage,h,null);return E}je();var Z8={};zt(Z8,{GitFetcher:()=>I2,GitResolver:()=>B2,default:()=>Sgt,gitUtils:()=>ra});je();Dt();var ra={};zt(ra,{TreeishProtocols:()=>w2,clone:()=>X8,fetchBase:()=>xde,fetchChangedFiles:()=>kde,fetchChangedWorkspaces:()=>Pgt,fetchRoot:()=>bde,isGitUrl:()=>yC,lsRemote:()=>Sde,normalizeLocator:()=>vgt,normalizeRepoUrl:()=>dC,resolveUrl:()=>V8,splitRepoUrl:()=>o0,validateRepoUrl:()=>J8});je();Dt();qt();var vde=Ze(wde()),Pde=Ze(mU()),mC=Ze(ve("querystring")),K8=Ze(Vn());function W8(t,e,r){let o=t.indexOf(r);return t.lastIndexOf(e,o>-1?o:1/0)}function Ide(t){try{return new URL(t)}catch{return}}function Igt(t){let e=W8(t,"@","#"),r=W8(t,":","#");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),W8(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`ssh://${t}`),t}function Bde(t){return Ide(t)||Ide(Igt(t))}function dC(t,{git:e=!1}={}){if(t=t.replace(/^git\+https:/,"https:"),t=t.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),t=t.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),e){let r=Bde(t);r&&(t=r.href),t=t.replace(/^git\+([^:]+):/,"$1:")}return t}function Dde(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var Bgt=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],w2=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a)
-`)}?`)}returnthis.cli.run([this.commandName,...this.args],{cwd:A.cwd})}};l0.paths=[["workspace"]],l0.usage=it.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:`
`,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]});var bgt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:Qde.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarnadd` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[Fh,Th,Lh,Nh,n0,Jh,Hh,a0,Kd,zd,gC,Jd,Qh,Rh,Oh,Mh,Uh,_h,qh,Gh,jh,Yh,i0,Wh,Kh,Xh,Vh,Zh,zh,$h,e0,t0,Xd,r0,Jf,s0,l0]},xgt=bgt;var iH={};zt(iH,{default:()=>Qgt});je();var kt={optional:!0},eH=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:kt,zenObservable:kt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:kt,zenObservable:kt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:kt}}],["got@<11",{dependencies:{["@types/responselike"]:"^1.0.0",["@types/keyv"]:"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{["@types/keyv"]:"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{["vscode-jsonrpc"]:"^5.0.1",["vscode-languageserver-protocol"]:"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{["postcss-html"]:kt,["postcss-jsx"]:kt,["postcss-less"]:kt,["postcss-markdown"]:kt,["postcss-scss"]:kt}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{["tiny-warning"]:"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:kt}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:kt}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:kt,"vue-template-compiler":kt}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:kt,"utf-8-validate":kt}}],["react-portal@<4.2.2",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{["babel-polyfill"]:"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependen
`,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]});function tdt(t){return typeof t!="string"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function rdt(t,e){let r=t===0,o=t===e-1;return r&&o?"":r?"\u250C ":o?"\u2514 ":"\u2502 "}je();qt();var h0=class extends ut{constructor(){super(...arguments);this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(k2(),x2)),o=await Ke.find(this.context.cwd,this.context.plugins),{project:a}=await St.find(o,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};h0.paths=[["constraints","source"]],h0.usage=it.Usage({category:"Constraints-related commands",description:"print the source code for the constraints",details:"\n This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\n ",examples:[["Prints the source code","yarn constraints source"],["Print the source code and the fact database","yarn constraints source -v"]]});je();je();qt();P2();var g0=class extends ut{constructor(){super(...arguments);this.fix=ge.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);await o.restoreInstallState();let a=await o.loadUserConfig(),n;if(a?.constraints)n=new CC(o);else{let{Constraints:h}=await Promise.resolve().then(()=>(k2(),x2));n=await h.find(o)}let u,A=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:I,remainingErrors:v}=dk(o,E,{fix:this.fix}),x=[];for(let[C,F]of I){let N=C.manifest.indent;C.manifest=new Ot,C.manifest.indent=N,C.manifest.load(F),x.push(C.persistManifest())}if(await Promise.all(x),!(I.size>0&&h>1)){u=qde(v,{configuration:r}),A=!1,p=!0;for(let[,C]of v)for(let F of C)F.fixable?A=!0:p=!1}}if(u.children.length===0)return 0;if(A){let h=p?`Thoseerrorscanallbefixedbyrunning${pe.pretty(r,"yarn constraints --fix",pe.Type.CODE)}`:`Errorsprefixedby'\u2699'canbefixedbyrunning${pe.pretty(r,"yarn constraints --fix",pe.Type.CODE)}`;await Ft.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return u.children=He.sortMap(u.children,h=>h.value[1]),fs.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};g0.paths=[["constraints"]],g0.usage=it.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
Ifthe\`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.
`,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]});P2();var ndt={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[p0,h0,g0],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get("enableConstraintsChecks"))return;let r=await t.loadUserConfig(),o;if(r?.constraints)o=new CC(t);else{let{Constraints:u}=await Promise.resolve().then(()=>(k2(),x2));o=await u.find(t)}let a=await o.process();if(!a)return;let{remainingErrors:n}=dk(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[u,A]of n)for(let p of A)e(84,`${pe.pretty(t.configuration,u.anchoredLocator,pe.Type.IDENT)}:${p.text}`);else e(84,`Constraintcheckfailed;run${pe.pretty(t.configuration,"yarn constraints",pe.Type.CODE)}formoredetails`)}}},idt=ndt;var IH={};zt(IH,{CreateCommand:()=>tm,DlxCommand:()=>d0,default:()=>odt});je();qt();var tm=class extends ut{constructor(){super(...arguments);this.pkg=ge.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let o=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=j.parseDescriptor(o),n=a.name.match(/^create(-|$)/)?a:a.scope?j.makeIdent(a.scope,`create-${a.name}`):j.makeIdent(null,`create-${a.name}`),u=j.stringifyIdent(n);return a.range!=="unknown"&&(u+=`@${a.range}`),this.cli.run(["dlx",...r,u,...this.args])}};tm.paths=[["create"]];je();je();Dt();qt();var d0=class extends ut{constructor(){super(...arguments);this.packages=ge.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}async execute(){return Ke.telemetry=null,await oe.mktempPromise(async r=>{let o=z.join(r,`dlx-${process.pid}`);await oe.mkdirPromise(o),await oe.writeFilePromise(z.join(o,"package.json"),`{}
`);let v=await Ke.find(o,this.context.plugins),{project:x,workspace:C}=await St.find(v,o);if(C===null)throw new sr(x.cwd,o);await x.restoreInstallState();let F=await An.getWorkspaceAccessibleBinaries(C);return F.has(E)===!1&&F.size===1&&typeof this.packages>"u"&&(E=Array.from(F)[0][0]),await An.executeWorkspaceAccessibleBinary(C,E,this.args,{packageAccessibleBinaries:F,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};d0.paths=[["dlx"]],d0.usage=it.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarndlx` as a replacement of `yarnadd` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"],["Install multiple packages for a single command",`yarndlx-ptypescript-pts-nodets-node--transpile-only-e"console.log('hello!')"`]]});var sdt={commands:[tm,d0]},odt=sdt;var PH={};zt(PH,{ExecFetcher:()=>R2,ExecResolver:()=>F2,default:()=>cdt,execUtils:()=>Ck});je();je();Dt();var pA="exec:";var Ck={};zt(Ck,{loadGeneratorFile:()=>Q2,makeLocator:()=>vH,makeSpec:()=>hme,parseSpec:()=>BH});je();Dt();function BH(t){let{params:e,selector:r}=j.parseRange(t),o=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?j.parseLocator(e.locator):null,path:o}}function hme({parentLocator:t,path:e,generatorHash:r,protocol:o}){let a=t!==null?{locator:j.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return j.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function vH(t,{parentLocator:e,path:r,generatorHash:o,protocol:a}){return j.makeLocator(t,hme({parentLocator:e,path:r,generatorHash:o,protocol:a}))}async function Q2(t,e,r){let{parentLocator:o,path:a}=j.parseFileStyleRange(t,{protocol:e}),n=z.isAbsolute(a)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,n.localPath)}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=z.join(u.prefixPath,a);return await A.readFilePromise(p,"utf8")}var R2=class{supports(e,r){return!!e.reference.startsWith(pA)}getLocalPath(e,r){let{parentLocator:o,path:a}=j.parseFileStyleRange(e.reference,{protocol:pA});if(z.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:z.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){let o=await Q2(e.reference,pA,r);return oe.mktempPromise(async a=>{let n=z.join(a,"generator.js");return await oe.writeFilePromise(n,o),oe.mktempPromise(async u=>{if(await this.generatePackage(u,e,n,r),!oe.existsSync(z.join(u,"build")))throw new Error("The script should have generated a build directory");return await Zi.makeArchiveFromDirectory(z.join(u,"build"),{prefixPath:j.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,o,a){return await oe.mktempPromise(async n=>{let u=await An.makeScriptEnv({project:a.project,binFolder:n}),A=z.join(e,"runtime.js");return await oe.mktempPromise(async p=>{let h=z.join(p,"buildfile.log"),E=z.join(e,"generator"),I=z.join(e,"build");await oe.mkdirPromise(E),await oe.mkdirPromise(I);let v={tempDir:ue.fromPortabl
`,prefix:j.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Ur.pipevp(process.execPath,["--require",ue.fromPortablePath(A),ue.fromPortablePath(o),j.stringifyIdent(r)],{cwd:e,env:u,stdin:null,stdout:F,stderr:N});if(U!==0)throw oe.detachTemp(p),new Error(`Packagegenerationfailed(exitcode${U},logscanbefoundhere:${pe.pretty(a.project.configuration,h,pe.Type.PATH)})`)})})}};je();je();var adt=2,F2=class{supportsDescriptor(e,r){return!!e.range.startsWith(pA)}supportsLocator(e,r){return!!e.reference.startsWith(pA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return j.bindDescriptor(e,{locator:j.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=BH(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await Q2(j.makeRange({protocol:pA,source:a,selector:a,params:{locator:j.stringifyLocator(n)}}),pA,o.fetchOptions),A=wn.makeHash(`${adt}`,u).slice(0,6);return[vH(e,{parentLocator:n,path:a,generatorHash:A,protocol:pA})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await He.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var ldt={fetchers:[R2],resolvers:[F2]},cdt=ldt;var SH={};zt(SH,{FileFetcher:()=>O2,FileResolver:()=>M2,TarballFileFetcher:()=>U2,TarballFileResolver:()=>_2,default:()=>fdt,fileUtils:()=>rm});je();Dt();var vC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,T2=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,Ui="file:";var rm={};zt(rm,{fetchArchiveFromLocator:()=>N2,makeArchiveFromLocator:()=>wk,makeBufferFromLocator:()=>DH,makeLocator:()=>PC,makeSpec:()=>gme,parseSpec:()=>L2});je();Dt();function L2(t){let{params:e,selector:r}=j.parseRange(t),o=ue.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?j.parseLocator(e.locator):null,path:o}}function gme({parentLocator:t,path:e,hash:r,protocol:o}){let a=t!==null?{locator:j.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return j.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function PC(t,{parentLocator:e,path:r,hash:o,protocol:a}){return j.makeLocator(t,gme({parentLocator:e,path:r,hash:o,protocol:a}))}async function N2(t,e){let{parentLocator:r,path:o}=j.parseFileStyleRange(t.reference,{protocol:Ui}),a=z.isAbsolute(o)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let u=n.packageFs,A=z.join(n.prefixPath,o);return await He.releaseAfterUseAsync(async()=>await u.readFilePromise(A),n.releaseFs)}async function wk(t,{protocol:e,fetchOptions:r,inMemory:o=!1}){let{parentLocator:a,path:n}=j.parseFileStyleRange(t.reference,{protocol:e}),u=z.isAbsolute(n)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(a,r),A=u.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,u.localPath)}:u;u!==A&&u.releaseFs&&u.releaseFs();let p=A.packageFs,h=z.join(A.prefixPath,n);return await He.releaseAfterUseAsync(async()=>await Zi.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:j.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:o}),A.releaseFs)}async function DH(t,{protocol:e,fe
`),h.push(E)),!o||o.cwd===this.context.cwd){let I=z.join(this.context.cwd,dr.lockfile);oe.existsSync(I)||(await oe.writeFilePromise(I,""),h.push(I));let x=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarnconfigsetenableGlobalCachefalse`!","# Documentation here: https://yarnpkg.com/features/caching#zero-installs","","#!.yarn/cache",".pnp.*"].map(le=>`${le}
`}}let ae=z.join(this.context.cwd,".editorconfig");oe.existsSync(ae)||(await oe.writeFilePromise(ae,te),h.push(ae)),await this.cli.run(["install"],{quiet:!0}),oe.existsSync(z.join(this.context.cwd,".git"))||(await Ur.execvp("git",["init"],{cwd:this.context.cwd}),await Ur.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Ur.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};m0.paths=[["init"]],m0.usage=it.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarnsetversion` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i=latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]});var mdt={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[m0]},ydt=mdt;var Tq={};zt(Tq,{SearchCommand:()=>I0,UpgradeInteractiveCommand:()=>v0,default:()=>oIt});je();var Cme=Ze(ve("os"));function DC({stdout:t}){if(Cme.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!t.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}qt();var Rye=Ze(VH()),XH={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},gyt=(0,Rye.default)(XH.appId,XH.apiKey).initIndex(XH.indexName),ZH=async(t,e=0)=>await gyt.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var GB=["regular","dev","peer"],I0=class extends ut{async execute(){DC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(uQ(),Bq)),{ScrollableItems:r}=await Promise.resolve().then(()=>(hQ(),pQ)),{useKeypress:o}=await Promise.resolve().then(()=>(_B(),Kwe)),{useMinistore:a}=await Promise.resolve().then(()=>(xq(),bq)),{renderForm:n}=await Promise.resolve().then(()=>(yQ(),mQ)),{default:u}=await Promise.resolve().then(()=>Ze(nIe())),{Box:A,Text:p}=await Promise.resolve().then(()=>Ze(sc())),{default:h,useEffect:E,useState:I}=await Promise.resolve().then(()=>Ze(an())),v=await Ke.find(this.context.cwd,this.context.plugins),x=()=>h.createElement(A,{flexDirection:"row"},h.createElement(A,{flexDirection:"column",width:48},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright
${JB(A)}`);let v=dIe(A);if(v)throw new Error(`${v},afterhoistingfinished:
${JB(A)}`)}return n.debugLevel>=2&&console.log(JB(A)),dIt(A)},cIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=n=>{if(!o.has(n)){o.add(n);for(let u of n.hoistedDependencies.values())r.set(u.name,u);for(let u of n.dependencies.values())n.peerNames.has(u.name)||a(u)}};return a(e),r},uIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=new Set,n=(u,A)=>{if(o.has(u))return;o.add(u);for(let h of u.hoistedDependencies.values())if(!A.has(h.name)){let E;for(let I of t)E=I.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of u.dependencies.values())p.add(h.name);for(let h of u.dependencies.values())u.peerNames.has(h.name)||n(h,p)};return n(e,a),r},pIe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:o,ident:a,locator:n,dependencies:u,originalDependencies:A,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:I,hoistPriority:v,dependencyKind:x,hoistedFrom:C,hoistedTo:F}=e,N={name:r,references:new Set(o),ident:a,locator:n,dependencies:new Map(u),originalDependencies:new Map(A),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:I,hoistPriority:v,dependencyKind:x,hoistedFrom:new Map(C),hoistedTo:new Map(F)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),t.dependencies.set(N.name,N),N},AIt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let o=Array.from(e.keys());o.sort((a,n)=>{let u=e.get(a),A=e.get(n);return A.hoistPriority!==u.hoistPriority?A.hoistPriority-u.hoistPriority:A.peerDependents.size!==u.peerDependents.size?A.peerDependents.size-u.peerDependents.size:A.dependents.size-u.dependents.size});for(let a of o){let n=a.substring(0,a.indexOf("@",1)),u=a.substring(n.length+1);if(!t.peerNames.has(n)){let A=r.get(n);A||(A=[],r.set(n,A)),A.indexOf(u)<0&&A.push(u)}}return r},Nq=t=>{let e=new Set,r=(o,a=new Set)=>{if(!a.has(o)){a.add(o);for(let n of o.peerNames)if(!t.peerNames.has(n)){let u=t.dependencies.get(n);u&&!e.has(u)&&r(u,a)}e.add(o)}};for(let o of t.dependencies.values())t.peerNames.has(o.name)||r(o);return e},Mq=(t,e,r,o,a,n=new Set)=>{let u=e[e.length-1];if(n.has(u))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(u);let A=mIt(u),p=AIt(u,A),h=t==u?new Map:a.fastLookupPossible?cIt(e):uIt(e),E,I=!1,v=!1,x=new Map(Array.from(p.entries()).map(([F,N])=>[F,N[0]])),C=new Map;do{let F=hIt(t,e,r,h,x,p,o,C,a);F.isGraphChanged&&(v=!0),F.anotherRoundNeeded&&(I=!0),E=!1;for(let[N,U]of p)U.length>1&&!u.dependencies.has(N)&&(x.delete(N),U.shift(),x.set(N,U[0]),E=!0)}while(E);for(let F of u.dependencies.values())if(!u.peerNames.has(F.name)&&!r.has(F.locator)){r.add(F.locator);let N=Mq(t,[...e,F],r,C,a);N.isGraphChanged&&(v=!0),N.anotherRoundNeeded&&(I=!0),r.delete(F.locator)}return{anotherRoundNeeded:I,isGraphChanged:v}},fIt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},pIt=(t,e,r,o,a,n,u,A,{outputReason:p,fastLookupPossible:h})=>{let E,I=null,v=new Set;p&&(E=`${Array.from(e).map(N=>ro(N)).join("\u2192")}`);let x=r[r.length-1],F=!(o.ident===x.ident);if(p&&!F&&(I="- self-reference"),F&&(F=o.dependencyKind!==1,p&&!F&&(I="- workspace")),F&&o.dependencyKind===2&&(F=!fIt(o),p&&!F&&(I="- external soft link with unhoisted dependencies")),F&&(F=x.dependencyKind!==1||x.hoistedFrom.has(o.name)||e.size===1,p&&!F&&(I=x.reasons.get(o.name))),F&&(F=!t.peerNames.has(o.name),p&&!F&&(I=`-cannotshadowpeer:${ro(t.originalDependencies.get(o.name).locator)}at${E}`)),F){let N=!1,U=a.get(o.name);if(N=!U||U.ident===o.ident,p&&!N&&(I=`-filledby:${ro(U.locator)}at${E}`),N)for(let J=r.length-1;J>=1;J--){let ae=r[J].dependencies.get(o.name);if(ae&&ae.ident!==o.ident){N=!1;let le=A.get(x);le||(le=new Set,A.set(x,le)),le.add(o.name),p&&(I=`-filledby${ro(ae.locator)}at${r.slice(0,J).map(ce=>ro(ce.locator)).join("\u2192")}`);break}}F=N}if(F&&(F=n.get(o.name)===o.ident,p&&!F&&(I=`-filledby:${ro(u.get(o.name)[0])}at${E}`)),F){let N=!0,U=new Set(o.peerNames);for(let J=r.length-1;J>=1;J--){let te=r[J];for(let ae of U){if(
${JB(t)}`)}let Ce=Nq(ae);for(let Ae of Ce)if(Ee.has(Ae)){let ne=Be.get(Ae);if((a.get(Ae.name)===Ae.ident||!ae.reasons.has(Ae.name))&&ne.isHoistable!==0&&ae.reasons.set(Ae.name,ne.reason),!Ae.isHoistBorder&&we.indexOf(EQ(Ae))<0){E.add(ae);let xe=pIe(ae,Ae);x([...U,ae],ce,we,xe,F),E.delete(ae)}}},C,F=new Set(Nq(h)),N=Array.from(e).map(U=>EQ(U));do{C=F,F=new Set;for(let U of C){if(U.locator===h.locator||U.isHoistBorder)continue;let J=pIe(h,U);x([],Array.from(r),N,J,F)}}while(F.size>0);return{anotherRoundNeeded:I,isGraphChanged:v}},dIe=t=>{let e=[],r=new Set,o=new Set,a=(n,u,A)=>{if(r.has(n)||(r.add(n),o.has(n)))return;let p=new Map(u);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),I=()=>`${Array.from(o).concat([n]).map(v=>ro(v.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let v=u.get(h.name);(v!==E||!v||v.ident!==h.ident)&&e.push(`${I()}-brokenpeerpromise:expected${h.ident}butfound${v&&v.ident}`)}else{let v=A.hoistedFrom.get(n.name),x=n.hoistedTo.get(h.name),C=`${v?` hoisted from ${v.join(", ")}`:""}`,F=`${x?` hoisted to ${x}`:""}`,N=`${I()}${C}`;E?E.ident!==h.ident&&e.push(`${N}-brokenrequirepromisefor${h.name}${F}:expected${h.ident},butfound:${E.ident}`):e.push(`${N}-brokenrequirepromise:norequireddependency${h.name}${F}found`)}}o.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);o.delete(n)};return a(t,t.dependencies,t),e.join(`
`)},gIt=(t,e)=>{let{identName:r,name:o,reference:a,peerNames:n}=t,u={name:o,references:new Set([a]),locator:Oq(r,a),ident:fIe(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},A=new Map([[t,u]]),p=(h,E)=>{let I=A.get(h),v=!!I;if(!I){let{name:x,identName:C,reference:F,peerNames:N,hoistPriority:U,dependencyKind:J}=h,te=e.hoistingLimits.get(E.locator);I={name:x,references:new Set([F]),locator:Oq(C,F),ident:fIe(C,F),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(x):!1,hoistPriority:U||0,dependencyKind:J||0,hoistedFrom:new Map,hoistedTo:new Map},A.set(h,I)}if(E.dependencies.set(h.name,I),E.originalDependencies.set(h.name,I),v){let x=new Set,C=F=>{if(!x.has(F)){x.add(F),F.decoupled=!1;for(let N of F.dependencies.values())F.peerNames.has(N.name)||C(N)}};C(I)}else for(let x of h.dependencies)p(x,I)};for(let h of t.dependencies)p(h,u);return u},Uq=t=>t.substring(0,t.indexOf("@",1)),dIt=t=>{let e={name:t.name,identName:Uq(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),o=(a,n,u)=>{let A=r.has(a),p;if(n===a)p=u;else{let{name:h,references:E,locator:I}=a;p={name:h,identName:Uq(I),references:E,dependencies:new Set}}if(u.dependencies.add(p),!A){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||o(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())o(a,t,e);return e},mIt=t=>{let e=new Map,r=new Set([t]),o=u=>`${u.name}@${u.ident}`,a=u=>{let A=o(u),p=e.get(A);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(A,p)),p},n=(u,A)=>{let p=!!r.has(A);if(a(A).dependents.add(u.ident),!p){r.add(A);for(let E of A.dependencies.values()){let I=a(E);I.hoistPriority=Math.max(I.hoistPriority,E.hoistPriority),A.peerNames.has(E.name)?I.peerDependents.add(A.ident):n(A,E)}}};for(let u of t.dependencies.values())t.peerNames.has(u.name)||n(t,u);return e},ro=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let o=t.substring(e+1);if(o==="workspace:.")return".";if(o){let a=(o.indexOf("#")>0?o.split("#")[1]:o).replace("npm:","");return o.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`},hIe=5e4,JB=t=>{let e=0,r=(a,n,u="")=>{if(e>hIe||n.has(a))return"";e++;let A=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p="";n.add(a);for(let h=0;h<A.length;h++){let E=A[h];if(!a.peerNames.has(E.name)&&E!==a){let I=a.reasons.get(E.name),v=Uq(E.locator);p+=`${u}${h<A.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(E)?">":"")+(v!==E.name?`a:${E.name}:`:"")+ro(E.locator)+(I?`${I}`:"")}
`:"")};var VB=(o=>(o.WORKSPACES="workspaces",o.DEPENDENCIES="dependencies",o.NONE="none",o))(VB||{}),mIe="node_modules",P0="$wsroot$";var XB=(t,e)=>{let{packageTree:r,hoistingLimits:o,errors:a,preserveSymlinksRequired:n}=EIt(t,e),u=null;if(a.length===0){let A=gIe(r,{hoistingLimits:o});u=wIt(t,A,e)}return{tree:u,errors:a,preserveSymlinksRequired:n}},dA=t=>`${t.name}@${t.reference}`,Hq=t=>{let e=new Map;for(let[r,o]of t.entries())if(!o.dirList){let a=e.get(o.locator);a||(a={target:o.target,linkType:o.linkType,locations:[],aliases:o.aliases},e.set(o.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((o,a)=>{let n=o.split(z.delimiter).length,u=a.split(z.delimiter).length;return a===o?0:n!==u?u-n:a>o?1:-1});return e},yIe=(t,e)=>{let r=j.isVirtualLocator(t)?j.devirtualizeLocator(t):t,o=j.isVirtualLocator(e)?j.devirtualizeLocator(e):e;return j.areLocatorsEqual(r,o)},_q=(t,e,r,o)=>{if(t.linkType!=="SOFT")return!1;let a=ue.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return z.contains(o,a)===null},yIt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(t.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let o=ue.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},u=t.getDependencyTreeRoots(),A=new Map,p=new Set,h=(v,x)=>{let C=dA(v);if(p.has(C))return;p.add(C);let F=t.getPackageInformation(v);if(F){let N=x?dA(x):"";if(dA(v)!==N&&F.linkType==="SOFT"&&!v.reference.startsWith("link:")&&!_q(F,v,t,o)){let U=EIe(F,v,t);(!A.get(U)||v.reference.startsWith("workspace:"))&&A.set(U,v)}for(let[U,J]of F.packageDependencies)J!==null&&(F.packagePeers.has(U)||h(t.getLocator(U,J),v))}};for(let v of u)h(v,null);let E=o.split(z.sep);for(let v of A.values()){let x=t.getPackageInformation(v),F=ue.toPortablePath(x.packageLocation.slice(0,-1)).split(z.sep).slice(E.length),N=n;for(let U of F){let J=N.children.get(U);J||(J={children:new Map},N.children.set(U,J)),N=J}N.workspaceLocator=v}let I=(v,x)=>{if(v.workspaceLocator){let C=dA(x),F=a.get(C);F||(F=new Set,a.set(C,F)),F.add(v.workspaceLocator)}for(let C of v.children.values())I(C,v.workspaceLocator||x)};for(let v of n.children.values())I(v,n.workspaceLocator);return a},EIt=(t,e)=>{let r=[],o=!1,a=new Map,n=yIt(t),u=t.getPackageInformation(t.topLevel);if(u===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let A=t.findPackageLocator(u.packageLocation);if(A===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=ue.toPortablePath(u.packageLocation.slice(0,-1)),h={name:A.name,identName:A.name,reference:A.reference,peerNames:u.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,I=(x,C)=>`${dA(C)}:${x}`,v=(x,C,F,N,U,J,te,ae)=>{let le=I(x,F),ce=E.get(le),we=!!ce;!we&&F.name===A.name&&F.reference===A.reference&&(ce=h,E.set(le,h));let de=_q(C,F,t,p);if(!ce){let Ae=0;de?Ae=2:C.linkType==="SOFT"&&F.name.endsWith(P0)&&(Ae=1),ce={name:x,identName:F.name,reference:F.reference,dependencies:new Set,peerNames:Ae===1?new Set:C.packagePeers,dependencyKind:Ae},E.set(le,ce)}let Be;if(de?Be=2:U.linkType==="SOFT"?Be=1:Be=0,ce.hoistPriority=Math.max(ce.hoistPriority||0,Be),ae&&!de){let Ae=dA({name:N.identName,reference:N.reference}),ne=a.get(Ae)||new Set;a.set(Ae,ne),ne.add(ce.name)}let Ee=new Map(C.packageDependencies);if(e.project){let Ae=e.project.workspacesByCwd.get(ue.toPortablePath(C.packageLocation.slice(0,-1)));if(Ae){let ne=new Set([...Array.from(Ae.manifest.peerDependencies.values(),Z=>j.stringifyIdent(Z)),...Array.from(Ae.manifest.peerDependenciesMeta.keys())]);for(let Z of ne)Ee.has(Z)||(Ee.set(Z,J.get(Z)||null),ce.peerNames.add(Z))}}let g=dA({name:F.name.replace(P0,""),reference:F.reference}),me=n.get(g);if(me)for(let Ae of me)Ee.set(`${Ae.name}${P0}`,Ae.reference);(C
`),r}Dt();var[Ma,np]=process.versions.node.split(".").map(t=>parseInt(t,10)),JIe=Ma>19||Ma===19&&np>=2||Ma===18&&np>=13,DVt=Ma===20&&np<6||Ma===19&&np>=3,SVt=Ma>19||Ma===19&&np>=6,bVt=Ma>=21||Ma===20&&np>=10||Ma===18&&np>=19,xVt=Ma>=21||Ma===20&&np>=10||Ma===18&&np>=20,kVt=Ma>=22;function VIe(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>ue.fromPortablePath(mi.resolveVirtual(ue.toPortablePath(e)))),JIe)process.send({"watch:require":t});else for(let e of t)process.send({"watch:require":e})}function eG(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,o=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,u=/\/$/,A=/^\.{0,2}\//,p={name:null,reference:null},h=[],E=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Te of["react-scripts","gatsby"]){let Re=t.packageRegistry.get(Te);if(Re)for(let ke of Re.keys()){if(ke===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Te,reference:ke})}}let{ignorePattern:I,packageRegistry:v,packageLocatorsByLocations:x}=t;function C(Te,Re){return{fn:Te,args:Re,error:null,result:null}}function F(Te){let Re=process.stderr?.hasColors?.()??process.stdout.isTTY,ke=(et,Ue)=>`\x1B[${et}m${Ue}\x1B[0m`,Ye=Te.error;console.error(Ye?ke("31;1",`\u2716${Te.error?.message.replace(/\n.*/s,"")}`):ke("33;1","\u203CResolution")),Te.args.length>0&&console.error();for(letetofTe.args)console.error(`${ke("37;1","In\u2190")}${(0,$q.inspect)(et,{colors:Re,compact:!0})}`);Te.result&&(console.error(),console.error(`${ke("37;1","Out\u2192")}${(0,$q.inspect)(Te.result,{colors:Re,compact:!0})}`));letSe=newError().stack.match(/(?<=^+)at.*/gm)?.slice(2)??[];if(Se.length>0){console.error();for(letetofSe)console.error(`${ke("38;5;244",et)}`)}console.error()}functionN(Te,Re){if(e.allowDebug===!1)returnRe;if(Number.isFinite(o)){if(o>=2)return(...ke)=>{letYe=C(Te,ke);try{returnYe.result=Re(...ke)}catch(Se){throwYe.error=Se}finally{F(Ye)}};if(o>=1)return(...ke)=>{try{returnRe(...ke)}catch(Ye){letSe=C(Te,ke);throwSe.error=Ye,F(Se),Ye}}}returnRe}functionU(Te){letRe=g(Te);if(!Re)throwes("INTERNAL","Couldn'tfindamatchingentryinthedependencytreeforthespecifiedparent(thisisprobablyaninternalerror)");returnRe}functionJ(Te){if(Te.name===null)return!0;for(letReoft.dependencyTreeRoots)if(Re.name===Te.name&&Re.reference===Te.reference)return!0;return!1}lette=newSet(["node","require",...zIe("--conditions")]);functionae(Te,Re=te,ke){letYe=Ae(z.join(Te,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Ye===null)throwes("INTERNAL",`Thelocatorthatownsthe"${Te}"pathcan'tbefoundinsidethedependencytree(thisisprobablyaninternalerror)`);let{packageLocation:Se}=U(Ye),et=z.join(Se,dr.manifest);if(!e.fakeFs.existsSync(et))returnnull;letUe=JSON.parse(e.fakeFs.readFileSync(et,"utf8"));if(Ue.exports==null)returnnull;letb=z.contains(Se,Te);if(b===null)throwes("INTERNAL","unqualifiedPathdoesn'tcontainthepackageLocation(thisisprobablyaninternalerror)");b!=="."&&!A.test(b)&&(b=`./${b}`);try{letw=qIe({packageJSONUrl:(0,gm.pathToFileURL)(ue.fromPortablePath(et)),packageSubpath:b,exports:Ue.exports,base:ke?(0,gm.pathToFileURL)(ue.fromPortablePath(ke)):null,conditions:Re});returnue.toPortablePath((0,gm.fileURLToPath)(w))}catch(w){throwes("EXPORTS_RESOLUTION_FAILED",w.message,{unqualifiedPath:lu(Te),locator:Ye,pkgJson:Ue,subpath:lu(b),conditions:Re},w.code)}}functionle(Te,Re,{extensions:ke}){letYe;try{Re.push(Te),Ye=e.fakeFs.statSync(Te)}catch{}if(Ye&&!Ye.isDirectory())returne.fakeFs.realpathSync(Te);if(Ye&&Ye.isDirectory()){letSe;try{Se=JSON.parse(e.fakeFs.readFileSync(z.join(Te,dr.manifest),"utf8"))}catch{}letet;if(Se&&Se.main&&(et=z.resolve(Te,Se.main)),et&&et!==Te){letUe=le(et,Re,{extensions:ke});if(Ue!==null)returnUe}}for(letSe=0,et=ke.length;Se<et;Se++){letUe=`${Te}${ke[Se]}`;if(Re.push(Ue),e.fakeFs.existsSync(Ue))returnUe}if(Ye&&Ye.isDir
`,{request:Ye,issuer:Se});return ue.toPortablePath(b)}let et,Ue=Te.match(a);if(Ue){if(!Re)throw es("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:Se});let[,b,w]=Ue,S=Ae(Re);if(!S){let Fe=we(Te,Re);if(Fe===!1)throw es("BUILTIN_NODE_RESOLUTION_FAILED",`Thebuiltinnoderesolutionalgorithmwasunabletoresolvetherequestedmodule(itdidn't go through the pnp resolver because the issuer doesn'tseemtobepartoftheYarn-manageddependencytree).
`,{request:Ye,issuer:Se,dependencyName:b}):X=es("UNDECLARED_DEPENDENCY",`${S.name}triedtoaccess${b}.WhilethismoduleisusuallyinterpretedasaNodebuiltin,yourresolverisrunninginsideanon-Noderesolutioncontextwheresuchbuiltinsareignored.Since${b}isn't otherwise declared in ${S.name}'sdependencies,thismakestherequirecallambiguousandunsound.
`,{request:Ye,issuer:Se,issuerLocator:Object.assign({},S),dependencyName:b}));if(R==null){if(V===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");R=V;let Fe=X.message.replace(/\n.*/g,"");X.message=Fe,!E.has(Fe)&&o!==0&&(E.add(Fe),process.emitWarning(X))}let $=Array.isArray(R)?{name:R[0],reference:R[1]}:{name:b,reference:R},ie=U($);if(!ie.packageLocation)throw es("MISSING_DEPENDENCY",`Adependencyseemsvalidbutdidn'tgetinstalledforsomereason.Thismightbecausedbyapartialinstall,suchasdevvsprod.
`,{request:Ye,issuer:Se,dependencyLocator:Object.assign({},$)});let be=ie.packageLocation;w?et=z.join(be,w):et=be}else if(z.isAbsolute(Te))et=z.normalize(Te);else{if(!Re)throw es("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:Se});let b=z.resolve(Re);Re.match(u)?et=z.normalize(z.join(b,Te)):et=z.normalize(z.join(z.dirname(b),Te))}return z.normalize(et)}function xe(Te,Re,ke=te,Ye){if(n.test(Te))return Re;let Se=ae(Re,ke,Ye);return Se?z.normalize(Se):Re}function Le(Te,{extensions:Re=Object.keys(ip.Module._extensions)}={}){let ke=[],Ye=le(Te,ke,{extensions:Re});if(Ye)return z.normalize(Ye);{VIe(ke.map(Ue=>ue.fromPortablePath(Ue)));let Se=lu(Te),et=Ae(Te);if(et){let{packageLocation:Ue}=U(et),b=!0;try{e.fakeFs.accessSync(Ue)}catch(w){if(w?.code==="ENOENT")b=!1;else{let S=(w?.message??w??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw es("QUALIFIED_PATH_RESOLUTION_FAILED",`Requiredpackageexistsbutcouldnotbeaccessed(${S}).
`,{unqualifiedPath:Se,extensions:Re})}}if(!b){let w=Ue.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw es("QUALIFIED_PATH_RESOLUTION_FAILED",`${w}
`).join("")}`,{unqualifiedPath:Se,extensions:Re})}}functionht(Te,Re,ke){if(!Re)thrownewError("Assertion failed: An issuer is required to resolve private import mappings");letYe=GIe({name:Te,base:(0,gm.pathToFileURL)(ue.fromPortablePath(Re)),conditions:ke.conditions??te,readFileSyncFn:ne});if(YeinstanceofURL)returnLe(ue.toPortablePath((0,gm.fileURLToPath)(Ye)),{extensions:ke.extensions});if(Ye.startsWith("#"))thrownewError("Mapping from one private import to another isn't allowed");returnH(Ye,Re,ke)}functionH(Te,Re,ke={}){try{if(Te.startsWith("#"))returnht(Te,Re,ke);let{considerBuiltins:Ye,extensions:Se,conditions:et}=ke,Ue=Z(Te,Re,{considerBuiltins:Ye});if(Te==="pnpapi")returnUe;if(Ue===null)returnnull;letb=()=>Re!==null?de(Re):!1,w=(!Ye||!(0,ip.isBuiltin)(Te))&&!b()?xe(Te,Ue,et,Re):Ue;returnLe(w,{extensions:Se})}catch(Ye){throwObject.hasOwn(Ye,"pnpCode")&&Object.assign(Ye.data,{request:lu(Te),issuer:Re&&lu(Re)}),Ye}}functionrt(Te){letRe=z.normalize(Te),ke=mi.resolveVirtual(Re);returnke!==Re?ke:null}return{VERSIONS:Be,topLevel:Ee,getLocator:(Te,Re)=>Array.isArray(Re)?{name:Re[0],reference:Re[1]}:{name:Te,reference:Re},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){letTe=[];for(let[Re,ke]ofv)for(letYeofke.keys())Re!==null&&Ye!==null&&Te.push({name:Re,reference:Ye});returnTe},getPackageInformation:Te=>{letRe=g(Te);if(Re===null)returnnull;letke=ue.fromPortablePath(Re.packageLocation);return{...Re,packageLocation:ke}},findPackageLocator:Te=>Ae(ue.toPortablePath(Te)),resolveToUnqualified:N("resolveToUnqualified",(Te,Re,ke)=>{letYe=Re!==null?ue.toPortablePath(Re):null,Se=Z(ue.toPortablePath(Te),Ye,ke);returnSe===null?null:ue.fromPortablePath(Se)}),resolveUnqualified:N("resolveUnqualified",(Te,Re)=>ue.fromPortablePath(Le(ue.toPortablePath(Te),Re))),resolveRequest:N("resolveRequest",(Te,Re,ke)=>{letYe=Re!==null?ue.toPortablePath(Re):null,Se=H(ue.toPortablePath(Te),Ye,ke);returnSe===null?null:ue.fromPortablePath(Se)}),resolveVirtual:N("resolveVirtual",Te=>{letRe=rt(ue.toPortablePath(Te));returnRe!==null?ue.fromPortablePath(Re):null})}}Dt();varXIe=(t,e,r)=>{leto=$B(t),a=Gq(o,{basePath:e}),n=ue.join(e,dr.pnpCjs);returneG(a,{fakeFs:r,pnpapiResolution:n})};varrG=Ze($Ie());qt();varyA={};zt(yA,{checkManifestCompatibility:()=>e1e,extractBuildRequest:()=>BQ,getExtractHint:()=>nG,hasBindingGyp:()=>iG});je();Dt();functione1e(t){returnj.isPackageCompatible(t,Vi.getArchitectureSet())}functionBQ(t,e,r,{configuration:o}){leta=[];for(letnof["preinstall","install","postinstall"])e.manifest.scripts.has(n)&&a.push({type:0,script:n});return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&a.push({type:1,script:"node-gyp rebuild"}),a.length===0?null:t.linkType!=="HARD"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${j.prettyLocator(o,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${j.prettyLocator(o,t)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!o.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${j.prettyLocator(o,t)} lists build scripts, but all build scripts have been disabled.`)}:e1e(t)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${j.prettyLocator(o,t)} The ${Vi.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}varYIt=newSet([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);functionnG(t){returnt.packageFs.getExtractHint({relevantExtensions:YIt})}functioniG(t){lete=z.join(t.prefixPath,"binding.gyp");returnt.packageFs.existsSync(e)}varlv={};zt(lv,{getUnpluggedPath:()=>av});je();Dt();functionav(t,{configuration:e}){returnz.resolve(e.get("pnpUnpluggedFolder"),j.slugifyLocator(t))}varWIt=newSet([j.makeIdent(null,"open").identHash,j.makeIdent(null,"opn").identHash]),b0=class{constructor(){this.mode="strict";this.pnpCache=newMap}getCustomDataKey(){returnJ
`;let u=Array.from(e.keys()).sort(),A=j.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let E of u){let I=e.get(E);n+=`
`,n+=`${JSON.stringify(E)}:
`,n+=`locations:
`;for(let v of I.locations){let x=z.contains(t.cwd,v);if(x===null)throw new Error(`Assertionfailed:Expectedthepathtobewithintheproject(${v})`);n+=`-${JSON.stringify(x)}
`}if(I.aliases.length>0){n+=`aliases:
`;for(let v of I.aliases)n+=`-${JSON.stringify(v)}
`}if(E===A&&r.size>0){n+=`bin:
`;for(let[v,x]of r){let C=z.contains(t.cwd,v);if(C===null)throw new Error(`Assertionfailed:Expectedthepathtobewithintheproject(${v})`);n+=`${JSON.stringify(C)}:
`),o}function bQ(t){if(t.originalError?.name!=="HTTPError")return!1;try{return(t.originalError?.response.headers["www-authenticate"].split(/,\s*/).map(r=>r.toLowerCase())).includes("otp")}catch{return!1}}function WC(t){return{["npm-otp"]:t}}var pv=class{supports(e,r){if(!e.reference.startsWith(Wn))return!1;let{selector:o,params:a}=j.parseRange(e.reference);return!(!D1e.default.valid(o)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${j.prettyLocator(r.project.configuration,e)}can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let{params:o}=j.parseRange(e.reference);if(o===null||typeof o.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await ym(o.__archiveUrl,{customErrorMessage:mm,configuration:r.project.configuration,ident:e});return await Zi.convertToZip(a,{configuration:r.project.configuration,prefixPath:j.getIdentVendorPath(e),stripComponents:1})}};je();var hv=class{supportsDescriptor(e,r){return!(!e.range.startsWith(Wn)||!j.tryParseDescriptor(e.range.slice(Wn.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){let o=r.project.configuration.normalizeDependency(j.parseDescriptor(e.range.slice(Wn.length),!0));return r.resolver.getResolutionDependencies(o,r)}async getCandidates(e,r,o){let a=o.project.configuration.normalizeDependency(j.parseDescriptor(e.range.slice(Wn.length),!0));return await o.resolver.getCandidates(a,r,o)}async getSatisfying(e,r,o,a){let n=a.project.configuration.normalizeDependency(j.parseDescriptor(e.range.slice(Wn.length),!0));return a.resolver.getSatisfying(n,r,o,a)}resolve(e,r){throw new Error("Unreachable")}};je();je();var S1e=Ze(Vn());var ml=class{supports(e,r){if(!e.reference.startsWith(Wn))return!1;let o=new URL(e.reference);return!(!S1e.default.valid(o.pathname)||o.searchParams.has("__archiveUrl"))}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${j.prettyLocator(r.project.configuration,e)} can'tbefoundinthecacheandwillbefetchedfromtheremoteregistry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o;try{o=await ym(ml.getLocatorUrl(e),{customErrorMessage:mm,configuration:r.project.configuration,ident:e})}catch{o=await ym(ml.getLocatorUrl(e).replace(/%2f/g,"/"),{customErrorMessage:mm,configuration:r.project.configuration,ident:e})}return await Zi.convertToZip(o,{configuration:r.project.configuration,prefixPath:j.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:o}){let a=YC(e.scope,{configuration:o}),n=ml.getLocatorUrl(e);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(e){let r=Lr.clean(e.reference.slice(Wn.length));if(r===null)throw new Vt(10,"The npm semver resolver got selected, but the version isn't semver");return`${DQ(e)}/-/${e.name}-${r}.tgz`}};je();je();je();var BG=Ze(Vn());var xQ=j.makeIdent(null,"node-gyp"),U1t=/\b(node-gyp|prebuild-install)\b/,gv=class{supportsDescriptor(e,r){returne.range.startsWith(Wn)?!!Lr.validRange(e.range.slice(Wn.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(Wn))return!
`;try{a=await oe.readFilePromise(e,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var gj={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},EBe={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},Mvt={configuration:{...gj,...EBe,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...gj,...EBe}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:ac,valueDefinition:{description:"",type:"SHAPE",properties:{...gj}}}},fetchers:[pv,ml],resolvers:[hv,gv,dv]},Uvt=Mvt;var Pj={};zt(Pj,{NpmAuditCommand:()=>q0,NpmInfoCommand:()=>G0,NpmLoginCommand:()=>j0,NpmLogoutCommand:()=>Y0,NpmPublishCommand:()=>W0,NpmTagAddCommand:()=>z0,NpmTagListCommand:()=>K0,NpmTagRemoveCommand:()=>J0,NpmWhoamiCommand:()=>V0,default:()=>Wvt,npmAuditTypes:()=>Tv,npmAuditUtils:()=>$Q});je();je();qt();var wj=Ze(Xo());$a();var Tv={};zt(Tv,{Environment:()=>Rv,Severity:()=>Fv});var Rv=(o=>(o.All="all",o.Production="production",o.Development="development",o))(Rv||{}),Fv=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(Fv||{});var $Q={};zt($Q,{allSeverities:()=>sw,getPackages:()=>Cj,getReportTree:()=>yj,getSeverityInclusions:()=>mj,getTopLevelDependencies:()=>Ej});je();var CBe=Ze(Vn());var sw=["info","low","moderate","high","critical"];function mj(t){if(typeof t>"u")return new Set(sw);let e=sw.indexOf(t),r=sw.slice(e);return new Set(r)}function yj(t){let e={},r={children:e};for(let[o,a]of He.sortMap(Object.entries(t),n=>n[0]))for(let n of He.sortMap(a,u=>`${u.id}`))e[`${o}/${n.id}`]={value:pe.tuple(pe.Type.IDENT,j.parseIdent(o)),children:{ID:typeof n.id<"u"&&{label:"ID",value:pe.tuple(pe.Type.ID,n.id)},Issue:{label:"Issue",value:pe.tuple(pe.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:pe.tuple(pe.Type.URL,n.url)},Severity:{label:"Severity",value:pe.tuple(pe.Type.NO_HINT,n.severity)},["Vulnerable Versions"]:{label:"Vulnerable Versions",value:pe.tuple(pe.Type.RANGE,n.vulnerable_versions)},["Tree Versions"]:{label:"Tree Versions",children:[...n.versions].sort(CBe.default.compare).map(u=>({value:pe.tuple(pe.Type.REFERENCE,u)}))},Dependents:{label:"Dependents",children:He.sortMap(n.dependents,u=>j.stringifyLocator(u)).map(u=>({value:pe.tuple(pe.Type.LOCATOR,u)}))}}};return r}function Ej(t,e,{all:r,environment:o}){let a=[],n=r?t.workspaces:[e],u=["all","production"].includes(o),A=["all","development"].includes(o);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!A:!u)||a.push({workspace:p,dependency:h});return a}function Cj(t,e,{recursive:r}){let o=new Map,a=new Set,n=[],u=(A,p)=>{let h=t.storedResolutions.get(p.descriptorHash);if(typeof h>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(h))a.add(h);else return;let E=t.storedPackages.get(h);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");if(j.ensureDevirtualizedLocator(E).reference.startsWith("npm:")&&E.version!==null){let v=j.stringifyIdent(E),x=He.getMapWithDefault(o,v);He.getArrayWithDefault(x,E.version).push(A)}if(r)for(let v of E.dependencies.values())n.push([E,v])};for(let{workspace:A,dependency:p}of e)n.push([A.anchoredLocator,p]);for(;n.length>0;){let[A,p]=n.shift();u(A,p)}return o}var q0=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",
Forconsistencywithourothercommandsthedefaultistoonlycheckthedirectdependenciesfortheactiveworkspace.Toextendthissearchtoallworkspaces,use\`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.
Applyingthe\`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${sw.map(r=>`\`${r}\``).join(", ")}.
Ifthe\`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.
Ifcertainpackagesproducefalsepositivesforaparticularenvironment,the\`--exclude\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \`npmAuditExcludePackages\` option.
Ifparticularadvisoriesareneededtobeignored,the\`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option.
Tounderstandthedependencytreerequiringvulnerablepackages,checktherawreportwiththe\`--json\` flag or use \`yarn why package\` to get more information as to who depends on them.
`,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]});je();je();Dt();qt();var Ij=Ze(Vn()),Bj=ve("util"),G0=class extends ut{constructor(){super(...arguments);this.fields=ge.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),a=typeof this.fields<"u"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],u=!1,A=await Ft.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let E;if(h==="."){let ae=o.topLevelWorkspace;if(!ae.manifest.name)throw new st(`Missing${pe.pretty(r,"name",pe.Type.CODE)}fieldin${ue.fromPortablePath(z.join(ae.cwd,dr.manifest))}`);E=j.makeDescriptor(ae.manifest.name,"unknown")}else E=j.parseDescriptor(h);let I=Zr.getIdentUrl(E),v=vj(await Zr.get(I,{configuration:r,ident:E,jsonResponse:!0,customErrorMessage:Zr.customPackageError})),x=Object.keys(v.versions).sort(Ij.default.compareLoose),F=v["dist-tags"].latest||x[x.length-1],N=Lr.validRange(E.range);if(N){let ae=Ij.default.maxSatisfying(x,N);ae!==null?F=ae:(p.reportWarning(0,`Unmetrange${j.prettyRange(r,E.range)};fallingbacktothelatestversion`),u=!0)}else Object.hasOwn(v["dist-tags"],E.range)?F=v["dist-tags"][E.range]:E.range!=="unknown"&&(p.reportWarning(0,`Unknowntag${j.prettyRange(r,E.range)};fallingbacktothelatestversion`),u=!0);let U=v.versions[F],J={...v,...U,version:F,versions:x},te;if(a!==null){te={};for(let ae of a){let le=J[ae];if(typeof le<"u")te[ae]=le;else{p.reportWarning(1,`The${pe.pretty(r,ae,pe.Type.CODE)}fielddoesn't exist inside ${j.prettyIdent(r,E)}'sinformation`),u=!0;continue}}}else this.json||(delete J.dist,delete J.readme,delete J.users),te=J;p.reportJson(te),this.json||n.push(te)}});Bj.inspect.styles.name="cyan";for(let p of n)(p!==n[0]||u)&&this.context.stdout.write(`
`);return A.exitCode()}};G0.paths=[["npm","info"]],G0.usage=it.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]});function vj(t){if(Array.isArray(t)){let e=[];for(let r of t)r=vj(r),r&&e.push(r);return e}else if(typeof t=="object"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith("_"))continue;let o=vj(t[r]);o&&(e[r]=o)}return e}else return t||null}je();je();qt();var wBe=Ze(p2()),j0=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=ge.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await eR({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ft.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=await qvt({configuration:r,registry:o,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),A=await _vt(o,u,r);return await Hvt(o,A,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};j0.paths=[["npm","login"]],j0.usage=it.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]});async function eR({scope:t,publish:e,configuration:r,cwd:o}){return t&&
`,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});async function Lv(t,e){let r=`/-/package${Zr.getIdentUrl(t)}/dist-tags`;returnZr.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:Zr.customPackageError})}varz0=classextendsut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}asyncexecute(){letr=awaitKe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=awaitSt.find(r,this.context.cwd);if(!a)thrownewsr(o.cwd,this.context.cwd);letn=j.parseDescriptor(this.package,!0),u=n.range;if(!BBe.default.valid(u))thrownewst(`Therange${pe.pretty(r,n.range,pe.Type.RANGE)}mustbeavalidsemverversion`);letA=$n.getPublishRegistry(a.manifest,{configuration:r}),p=pe.pretty(r,n,pe.Type.IDENT),h=pe.pretty(r,u,pe.Type.RANGE),E=pe.pretty(r,this.tag,pe.Type.CODE);return(awaitFt.start({configuration:r,stdout:this.context.stdout},asyncv=>{letx=awaitLv(n,r);Object.hasOwn(x,this.tag)&&x[this.tag]===u&&v.reportWarning(0,`Tag${E}isalreadysettoversion${h}`);letC=`/-/package${Zr.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;awaitZr.put(C,u,{configuration:r,registry:A,ident:n,jsonRequest:!0,jsonResponse:!0}),v.reportInfo(0,`Tag${E}addedtoversion${h}ofpackage${p}`)})).exitCode()}};z0.paths=[["npm","tag","add"]],z0.usage=it.Usage({category:"Npm-relatedcommands",description:"addatagforaspecificversionofapackage",details:`
`,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]});je();qt();var J0=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}async execute(){if(this.tag==="latest")throw new st("The 'latest' tag cannot be removed.");let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new sr(o.cwd,this.context.cwd);let n=j.parseIdent(this.package),u=$n.getPublishRegistry(a.manifest,{configuration:r}),A=pe.pretty(r,this.tag,pe.Type.CODE),p=pe.pretty(r,n,pe.Type.IDENT),h=await Lv(n,r);if(!Object.hasOwn(h,this.tag))throw new st(`${A}isnotatagofpackage${p}`);return(await Ft.start({configuration:r,stdout:this.context.stdout},async I=>{let v=`/-/package${Zr.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;awaitZr.del(v,{configuration:r,registry:u,ident:n,jsonResponse:!0}),I.reportInfo(0,`Tag${A}removedfrompackage${p}`)})).exitCode()}};J0.paths=[["npm","tag","remove"]],J0.usage=it.Usage({category:"Npm-relatedcommands",description:"removeatagfromapackage",details:`
`,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});je();je();qt();var V0=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o;return this.scope&&this.publish?o=$n.getScopeRegistry(this.scope,{configuration:r,type:$n.RegistryType.PUBLISH_REGISTRY}):this.scope?o=$n.getScopeRegistry(this.scope,{configuration:r}):this.publish?o=$n.getPublishRegistry((await uC(r,this.context.cwd)).manifest,{configuration:r}):o=$n.getDefaultRegistry({configuration:r}),(await Ft.start({configuration:r,stdout:this.context.stdout},async n=>{let u;try{u=await Zr.get("/-/whoami",{configuration:r,registry:o,authType:Zr.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?j.makeIdent(this.scope,""):void 0})}catch(A){if(A.response?.statusCode===401||A.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw A}n.reportInfo(0,u.username)})).exitCode()}};V0.paths=[["npm","whoami"]],V0.usage=it.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]});var Yvt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[q0,G0,j0,Y0,W0,z0,K0,J0,V0]},Wvt=Yvt;var Rj={};zt(Rj,{PatchCommand:()=>$0,PatchCommitCommand:()=>Z0,PatchFetcher:()=>_v,PatchResolver:()=>Hv,default:()=>uPt,patchUtils:()=>Pm});je();je();Dt();iA();var Pm={};zt(Pm,{applyPatchFile:()=>rR,diffFolders:()=>kj,ensureUnpatchedDescriptor:()=>Dj,ensureUnpatchedLocator:()=>iR,extractPackageToDisk:()=>xj,extractPatchFlags:()=>kBe,isParentRequired:()=>bj,isPatchDescriptor:()=>nR,isPatchLocator:()=>X0,loadPatchFiles:()=>Uv,makeDescriptor:()=>sR,makeLocator:()=>Sj,makePatchHash:()=>Qj,parseDescriptor:()=>Ov,parseLocator:()=>Mv,parsePatchFile:()=>Nv,unpatchDescriptor:()=>aPt,unpatchLocator:()=>lPt});je();Dt();je();Dt();var Kvt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function aw(t){return z.relative(Bt.root,z.resolve(Bt.root,ue.toPortablePath(t)))}function zvt(t){let e=t.trim().match(Kvt);if(!e)throw new Error(`Badheaderline:'${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var Jvt=420,Vvt=493;var vBe=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),Xvt=t=>({header:zvt(t),parts:[]}),Zvt={["@"]:"header",["-"]:"deletion",["+"]:"insertion",[" "]:"context",["\\"]:"pragma",undefined:"context"};function $vt(t){let e=[],r=vBe(),o="parsing header
`):"";await e.mkdirpPromise(z.dirname(a.path),{chmod:493,utimes:[vi.SAFE_TIME,vi.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,vi.SAFE_TIME,vi.SAFE_TIME)}break;case"patch":await cw(e,a.path,async()=>{await iPt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let u=(await e.statPromise(a.path)).mode;if(PBe(a.newMode)!==PBe(u))continue;await cw(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:He.assertNever(a);break}}function PBe(t){return(t&64)>0}function DBe(t){return t.replace(/\s+$/,"")}function nPt(t,e){return DBe(t)===DBe(e)}async function iPt({hunks:t,path:e},{baseFs:r,dryRun:o=!1}){let a=await r.statSync(e).mode,u=(await r.readFileSync(e,"utf8")).split(/\n/),A=[],p=0,h=0;for(let I of t){let v=Math.max(h,I.header.patched.start+p),x=Math.max(0,v-h),C=Math.max(0,u.length-v-I.header.original.length),F=Math.max(x,C),N=0,U=0,J=null;for(;N<=F;){if(N<=x&&(U=v-N,J=SBe(I,u,U),J!==null)){N=-N;break}if(N<=C&&(U=v+N,J=SBe(I,u,U),J!==null))break;N+=1}if(J===null)throw new lw(t.indexOf(I),I);A.push(J),p+=N,h=U+I.header.original.length}if(o)return;let E=0;for(let I of A)for(let v of I)switch(v.type){case"splice":{let x=v.index+E;u.splice(x,v.numToDelete,...v.linesToInsert),E+=v.linesToInsert.length-v.numToDelete}break;case"pop":u.pop();break;case"push":u.push(v.line);break;default:He.assertNever(v);break}await r.writeFilePromise(e,u.join(`
`),{mode:a})}function SBe(t,e,r){let o=[];for(let a of t.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let u=e[r];if(u==null||!nPt(u,n))return null;r+=1}a.type==="deletion"&&(o.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&o.push({type:"push",line:""}))}break;case"insertion":o.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&o.push({type:"pop"});break;default:He.assertNever(a.type);break}return o}var oPt=/^builtin<([^>]+)>$/;function uw(t,e){let{protocol:r,source:o,selector:a,params:n}=j.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(o===null)throw new Error("Patch locators must explicitly define their source");let u=a?a.split(/&/).map(E=>ue.toPortablePath(E)):[],A=n&&typeof n.locator=="string"?j.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=e(o);return{parentLocator:A,sourceItem:h,patchPaths:u,sourceVersion:p}}function nR(t){return t.range.startsWith("patch:")}function X0(t){return t.reference.startsWith("patch:")}function Ov(t){let{sourceItem:e,...r}=uw(t.range,j.parseDescriptor);return{...r,sourceDescriptor:e}}function Mv(t){let{sourceItem:e,...r}=uw(t.reference,j.parseLocator);return{...r,sourceLocator:e}}function aPt(t){let{sourceItem:e}=uw(t.range,j.parseDescriptor);return e}function lPt(t){let{sourceItem:e}=uw(t.reference,j.parseLocator);return e}function Dj(t){if(!nR(t))return t;let{sourceItem:e}=uw(t.range,j.parseDescriptor);return e}function iR(t){if(!X0(t))return t;let{sourceItem:e}=uw(t.reference,j.parseLocator);return e}function bBe({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:o,patchHash:a},n){let u=t!==null?{locator:j.stringifyLocator(t)}:{},A=typeof o<"u"?{version:o}:{},p=typeof a<"u"?{hash:a}:{};return j.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...A,...p,...u}})}function sR(t,{parentLocator:e,sourceDescriptor:r,patchPaths:o}){return j.makeDescriptor(t,bBe({parentLocator:e,sourceItem:r,patchPaths:o},j.stringifyDescriptor))}function Sj(t,{parentLocator:e,sourcePackage:r,patchPaths:o,patchHash:a}){return j.makeLocator(t,bBe({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:o,patchHash:a},j.stringifyLocator))}function xBe({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:o},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let u=a.match(oPt);return u!==null?o(u[1]):a.startsWith("~/")?r(a.slice(2)):z.isAbsolute(a)?t(a):e(a)}function kBe(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function bj(t){return xBe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function Uv(t,e,r){let o=t!==null?await r.fetcher.fetch(t,r):null,a=o&&o.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,o.localPath)}:o;o&&o!==a&&o.releaseFs&&o.releaseFs();let n=await He.releaseAfterUseAsync(async()=>await Promise.all(e.map(async u=>{let A=kBe(u),p=await xBe({onAbsolute:async h=>await oe.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(z.join(a.prefixPath,h),"utf8")},onProject:async h=>await oe.readFilePromise(z.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},u);return{...A,source:p}})));for(let u of n)typeof u.source=="string"&&(u.source=u.source.replace(/\r\n?/g,`
`));return n}async function xj(t,{cache:e,project:r}){let o=r.storedPackages.get(t.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=iR(t),n=r.storedChecksums,u=new Qi,A=await oe.mktempPromise(),p=z.join(A,"source"),h=z.join(A,"user"),E=z.join(A,".yarn-patch.json"),I=r.configuration.makeFetcher(),v=[];try{let x,C;if(t.locatorHash===a.locatorHash){let F=await I.fetch(t,{cache:e,project:r,fetcher:I,checksums:n,report:u});v.push(()=>F.releaseFs?.()),x=F,C=F}else x=await I.fetch(t,{cache:e,project:r,fetcher:I,checksums:n,report:u}),v.push(()=>x.releaseFs?.()),C=await I.fetch(t,{cache:e,project:r,fetcher:I,checksums:n,report:u}),v.push(()=>C.releaseFs?.());await Promise.all([oe.copyPromise(p,x.prefixPath,{baseFs:x.packageFs}),oe.copyPromise(h,C.prefixPath,{baseFs:C.packageFs}),oe.writeJsonPromise(E,{locator:j.stringifyLocator(t),version:o.version})])}finally{for(let x of v)x()}return oe.detachTemp(A),h}async function kj(t,e){let r=ue.fromPortablePath(t).replace(/\\/g,"/"),o=ue.fromPortablePath(e).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Ur.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,o],{cwd:ue.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unabletodiffdirectories.Makesureyouhavearecentversionof'git'availableinPATH.
${n}`);let u=r.startsWith("/")?A=>A.slice(1):A=>A;return a.replace(new RegExp(`(a|b)(${He.escapeRegExp(`/${u(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${He.escapeRegExp(`/${u(o)}/`)}`,"g"),"$1/").replace(new RegExp(He.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(He.escapeRegExp(`${o}/`),"g"),"")}function Qj(t,e){let r=[];for(let{source:o}of t){if(o===null)continue;let a=Nv(o);for(let n of a){let{semverExclusivity:u,...A}=n;u!==null&&e!==null&&!Lr.satisfiesWithPrereleases(e,u)||r.push(JSON.stringify(A))}}return wn.makeHash(`${3}`,...r).slice(0,6)}je();function QBe(t,{configuration:e,report:r}){for(let o of t.parts)for(let a of o.lines)switch(o.type){case"context":r.reportInfo(null,`${pe.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`-${pe.pretty(e,a,pe.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+${pe.pretty(e,a,pe.Type.ADDED)}`);break;default:He.assertNever(o.type)}}var _v=class{supports(e,r){return!!X0(e)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${j.prettyLocator(r.project.configuration,e)}can'tbefoundinthecacheandwillbefetchedfromthedisk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:j.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async patchPackage(e,r){let{parentLocator:o,sourceLocator:a,sourceVersion:n,patchPaths:u}=Mv(e),A=await Uv(o,u,r),p=await oe.mktempPromise(),h=z.join(p,"current.zip"),E=await r.fetcher.fetch(a,r),I=j.getIdentVendorPath(e),v=new Xi(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await He.releaseAfterUseAsync(async()=>{await v.copyPromise(I,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),v.saveAndClose();for(let{source:x,optional:C}of A){if(x===null)continue;let F=new Xi(h,{level:r.project.configuration.get("compressionLevel")}),N=new gn(z.resolve(Bt.root,I),{baseFs:F});try{await rR(Nv(x),{baseFs:N,version:n})}catch(U){if(!(U instanceof lw))throw U;let J=r.project.configuration.get("enableInlineHunks"),te=!J&&!C?" (set enableInlineHunks for details)":"",ae=`${j.prettyLocator(r.project.configuration,e)}:${U.message}${te}`,le=ce=>{!J||QBe(U.hunk,{configuration:r.project.configuration,report:ce})};if(F.discardAndClose(),C){r.report.reportWarningOnce(66,ae,{reportExtra:le});continue}else throw new Vt(66,ae,le)}F.saveAndClose()}return new Xi(h,{level:r.project.configuration.get("compressionLevel")})}};je();var Hv=class{supportsDescriptor(e,r){return!!nR(e)}supportsLocator(e,r){return!!X0(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){let{patchPaths:a}=Ov(e);return a.every(n=>!bj(n))?e:j.bindDescriptor(e,{locator:j.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:o}=Ov(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(o)}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=Ov(e),u=await Uv(a,n,o.fetchOptions),A=r.sourceDescriptor;if(typeof A>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=Qj(u,A.version);return[Sj(e,{parentLocator:a,sourcePackage:A,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:o}=Mv(e);return{...await r.resolver.resolve(o,r),...e}}};je();Dt();qt();var Z0=class extends ut{constructor(){super(...arguments);this.save=ge.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new sr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=z.resolve(this.context.cwd,ue.toPortablePat
-${j.prettyLocator(r,p)}`).join("")}`);u=A[0]}if(!o.storedPackages.has(u.locatorHash))thrownewst("No package found in the project for the given locator");awaitFt.start({configuration:r,json:this.json,stdout:this.context.stdout},asyncA=>{letp=iR(u),h=awaitxj(u,{cache:n,project:o});A.reportJson({locator:j.stringifyLocator(p),path:ue.fromPortablePath(h)});letE=this.update?" along with its current modifications":"";A.reportInfo(0,`Package ${j.prettyLocator(r,p)} got extracted with success${E}!`),A.reportInfo(0,`You can now edit the following folder: ${pe.pretty(r,ue.fromPortablePath(h),"magenta")}`),A.reportInfo(0,`Once you are done run ${pe.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${ue.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};$0.paths=[["patch"]],$0.usage=it.Usage({description:"prepare a package for patching",details:"\n This command will cause a package to be extracted in a temporary directory intended to be editable at will.\n\n Once you're done with your changes, run `yarn patch-commit -s path` (with `path` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\n\n Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\n "});varcPt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[Z0,$0],fetchers:[_v],resolvers:[Hv]},uPt=cPt;varLj={};zt(Lj,{PnpmLinker:()=>qv,default:()=>gPt});je();Dt();qt();varqv=class{getCustomDataKey(){returnJSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){returnthis.isEnabled(r)}asyncfindPackageLocation(e,r){if(!this.isEnabled(r))thrownewError("Assertion failed: Expected the pnpm linker to be enabled");leto=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)thrownewst(`The project in ${pe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,pe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);letn=a.pathsByLocator.get(e.locatorHash);if(typeofn>"u")thrownewst(`Couldn't find ${j.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);returnn.packageLocation}asyncfindPackageLocator(e,r){if(!this.isEnabled(r))returnnull;leto=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)thrownewst(`The project in ${pe.pretty(r.project.configuration,`${r.project.cwd}/package.json`,pe.Type.PATH)} doesn't seem to have been installed - running an install there might help`);letn=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){letp=a.locatorByPath.get(n[1]);if(p)returnp}letu=e,A=e;do{A=u,u=z.dirname(A);letp=a.locatorByPath.get(A);if(p)returnp}while(u!==A);returnnull}makeInstaller(e){returnnewFj(e)}isEnabled(e){returne.project.configuration.get("nodeLinker")==="pnpm"}},Fj=class{constructor(e){this.opts=e;this.asyncActions=newHe.AsyncActions(10);this.customData={pathsByLocator:newMap,locatorByPath:newMap};this.indexFolderPromise=SP(oe,{indexPath:z.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}asyncinstallPackage(e,r,o){switch(e.linkType){case"SOFT":returnthis.installPackageSoft(e,r,o);case"HARD":returnthis.installPackageHard(e,r,o)}thrownewError("Assertion failed: Unsupported package link type")}asyncinstallPackageSoft(e,r,o){leta=z.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?z.join(a,dr.nodeModules):null;returnthis.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{pa
`,"--",...o],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(o=>ue.fromPortablePath(o.path));await Ur.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var IPt=[OBe],eg=class extends ut{constructor(){super(...arguments);this.commit=ge.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=ge.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=ge.Boolean("-u,--update",!1,{hidden:!0})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),{driver:a,root:n}=await BPt(o.cwd),u=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(I=>I.populateYarnPaths,o,I=>{u.push(I)});let A=new Set;for(let I of u)for(let v of vPt(n,I))A.add(v);let p=new Set([r.get("rcFilename"),dr.lockfile,dr.manifest]),h=await a.filterChanges(n,A,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E}
`);else for(let I of h)this.context.stdout.write(`${ue.fromPortablePath(I.path)}
`);else if(this.reset){let I=await a.filterChanges(n,A,p,{staged:!0});I.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,I)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};eg.paths=[["stage"]],eg.usage=it.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]});async function BPt(t){let e=null,r=null;for(let o of IPt)if((r=await o.findRoot(t))!==null){e=o;break}if(e===null||r===null)throw new st("No stage driver has been found for your current project");return{driver:e,root:r}}function vPt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let o;try{o=oe.statSync(e)}catch{break}if(o.isSymbolicLink())e=z.resolve(z.dirname(e),oe.readlinkSync(e));else break}return r}var PPt={commands:[eg]},DPt=PPt;var Gj={};zt(Gj,{default:()=>TPt});je();je();Dt();var _Be=Ze(Vn());je();var MBe=Ze(VH()),SPt="e8e1bd300d860104bb8c58453ffa1eb4",bPt="OFCNCOG2CU",UBe=async(t,e)=>{let r=j.stringifyIdent(t),a=xPt(e).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},xPt=t=>(0,MBe.default)(bPt,SPt,{requester:{async send(r){try{let o=await sn.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:o.body,isTimedOut:!1,status:o.statusCode}}catch(o){return{content:o.response.body,isTimedOut:!1,status:o.response.statusCode}}}}});var HBe=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,kPt=async(t,e,r,o)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??(oe.existsSync(z.join(t.cwd,"tsconfig.json"))||oe.existsSync(z.join(a.cwd,"tsconfig.json")))))return;let A=n.makeResolver(),p={project:a,resolver:A,report:new Qi};if(!await UBe(r,n))return;let E=HBe(r),I=j.parseRange(r.range).selector;if(!Lr.validRange(I)){let N=n.normalizeDependency(r),U=await A.getCandidates(N,{},p);I=j.parseRange(U[0].reference).selector}let v=_Be.default.coerce(I);if(v===null)return;let x=`${Xc.Modifier.CARET}${v.major}`,C=j.makeDescriptor(j.makeIdent("types",E),x),F=He.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,J=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&J!==r.descriptorHash)return He.mapAndFind.skip;let te=[];for(let ae of Ot.allDependencies){let le=N.manifest[ae].get(C.identHash);typeof le>"u"||te.push([ae,le])}return te.length===0?He.mapAndFind.skip:te});if(typeof F<"u")for(let[N,U]of F)t.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(C);if((await A.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[Xc.Target.DEVELOPMENT].set(C.identHash,C)}},QPt=async(t,e,r)=>{if(r.scope==="types")return;let{project:o}=t,{configuration:a}=o;if(!(a.get("tsEnableAutoTypes")??(oe.existsSync(z.join(t.cwd,"tsconfig.json"))||oe.existsSync(z.join(o.cwd,"tsconfig.json")))))return;let u=HBe(r),A=j.makeIdent("types",u);for(let p of Ot.allDependencies)typeof t.manifest[p].get(A.identHash)>"u"||t.manifest[p].delete(A.iden
-`)}`);letp=newSet(He.mapAndFilter(n,x=>{letC=t.tryWorkspaceByFilePath(x);returnC===null?He.mapAndFilter.skip:C}));if(A.length===0&&p.size===0&&!e)returnnull;leth=A.length===1?A[0]:z.join(u,`${wn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=oe.existsSync(h)?awaitoe.readFilePromise(h,"utf8"):"{}",I=Ki(E),v=newMap;for(letxofI.declined||[]){letC=j.parseIdent(x),F=t.getWorkspaceByIdent(C);v.set(F,"decline")}for(let[x,C]ofObject.entries(I.releases||{})){letF=j.parseIdent(x),N=t.getWorkspaceByIdent(F);v.set(N,Aw(C))}return{project:t,root:o,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:newSet(n),changedWorkspaces:p,releaseRoots:newSet([...p].filter(x=>x.manifest.version!==null)),releases:v,asyncsaveAll(){letx={},C=[],F=[];for(letNoft.workspaces){if(N.manifest.version===null)continue;letU=j.stringifyIdent(N.anchoredLocator),J=v.get(N);J==="decline"?C.push(U):typeofJ<"u"?x[U]=Aw(J):p.has(N)&&F.push(U)}awaitoe.mkdirPromise(z.dirname(h),{recursive:!0}),awaitoe.changeFilePromise(h,Ba(newBa.PreserveOrdering({releases:Object.keys(x).length>0?x:void0,declined:C.length>0?C:void0,undecided:F.length>0?F:void0})))}}}functionVPt(t){returnlR(t).size>0||jv(t).length>0}functionlR(t){lete=newSet;for(letroft.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));returne}functionjv(t,{include:e=newSet}={}){letr=[],o=newMap(He.mapAndFilter([...t.releases],([n,u])=>u==="decline"?He.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=newMap(He.mapAndFilter([...t.releases],([n,u])=>u!=="decline"?He.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(letnoft.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||o.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(letuofOt.hardDependencies)for(letAofn.manifest.getForScope(u).values()){letp=t.project.tryWorkspaceByDescriptor(A);p!==null&&o.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}returnr}functionWj(t,e){letr=vA.default.clean(e);for(letoofObject.values(fw))if(o!=="undecided"&&o!=="decline"&&vA.default.inc(t,o)===r)returno;returnnull}functioncR(t,e){if(vA.default.valid(e))returne;if(t===null)thrownewst(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!vA.default.valid(t))thrownewst(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);letr=vA.default.inc(t,e);if(r===null)thrownewst(`Cannot apply the release strategy "${e}" on the specified version (${t})`);returnr}functionKj(t,e,{report:r}){leto=newMap;for(letaoft.workspaces)for(letnofOt.allDependencies)for(letuofa.manifest[n].values()){letA=t.tryWorkspaceByDescriptor(u);if(A===null||!e.has(A))continue;He.getArrayWithDefault(o,A).push([a,n,u.identHash])}for(let[a,n]ofe){letu=a.manifest.version;a.manifest.version=n,vA.default.prerelease(n)===null?deletea.manifest.raw.stableVersion:a.manifest.raw.stableVersion||(a.manifest.raw.stableVersion=u);letA=a.manifest.name!==null?j.stringifyIdent(a.manifest.name):null;r.reportInfo(0,`${j.prettyLocator(t.configuration,a.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:ue.fromPortablePath(a.cwd),ident:A,oldVersion:u,newVersion:n});letp=o.get(a);if(!(typeofp>"u"))for(let[h,E,I]ofp){letv=h.manifest[E].get(I);if(typeofv>"u")thrownewError("Assertion failed: The dependency should have existed");letx=v.range,C=!1;if(x.startsWith(Xn.protocol)&&(x=x.slice(Xn.protocol.length),C=!0,x===a.relativeCwd))continue;letF=x.match(JPt);if(!F){r.reportWarning(0,`Couldn't auto-upgrade range ${x} (in ${j.prettyLocator(t.configuration,h.anchoredLocator)})`);continue}letN=`${F[1]}${n}`;C&&(N=`${Xn.protocol}${N}`);letU=j.makeDescriptor(v,N);h.manifest[E].set(I,U)}}}varXPt=newMap([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);functionKBe(t,{current:e,prerelease:r}){leto=newvA.default.SemVer(e),a=o.prerelease.slice(),n=[];o.prerelease=[],o.format()!==t&&(a.length=0);letu=!0,A=r.split(/\./g);for(letpofA){leth=XPt.get
Notethatif\`--prerelease\` is set, the given prerelease identifier (by default \`rc.%n\`) will be used on all new versions and the version definitions will be kept as-is.
-\`--recursive\` to also apply the version bump on its dependencies
-\`--all\` to apply the version bump on all packages in the repository
Notethatthiscommandwillalsoupdatethe\`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.
`,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]});je();Dt();qt();var uR=Ze(Vn());var rg=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){DC(this.context);let{Gem:r}=await Promise.resolve().then(()=>(uQ(),Bq)),{ScrollableItems:o}=await Promise.resolve().then(()=>(hQ(),pQ)),{FocusRequest:a}=await Promise.resolve().then(()=>(Pq(),Jwe)),{useListInput:n}=await Promise.resolve().then(()=>(fQ(),Vwe)),{renderForm:u}=await Promise.resolve().then(()=>(yQ(),mQ)),{Box:A,Text:p}=await Promise.resolve().then(()=>Ze(sc())),{default:h,useCallback:E,useState:I}=await Promise.resolve().then(()=>Ze(an())),v=await Ke.find(this.context.cwd,this.context.plugins),{project:x,workspace:C}=await St.find(v,this.context.cwd);if(!C)throw new sr(x.cwd,this.context.cwd);await x.restoreInstallState();let F=await pw(x);if(F===null||F.releaseRoots.size===0)return 0;if(F.root===null)throw new st("This command can only be run on Git repositories");let N=()=>h.createElement(A,{flexDirection:"row",paddingBottom:1},h.createElement(A,{flexDirection:"column",width:60},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<left>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),U=({workspace:we,active:de,decision:Be,setDecision:Ee})=>{let g=we.manifest.raw.stableVersion??we.manifest.version;if(g===null)throw new Error(`Assertionfailed:Theversionshouldhavebeenset(${j.prettyLocator(v,we.anchoredLocator)})`);if(uR.default.prerelease(g)!==null)throw new Error(`Assertionfailed:Prereleaseidentifiersshouldn'tbefound(${g})`);let me=["undecided","decline","patch","minor","major"];n(Be,me,{active:de,minus:"left",plus:"right",set:Ee});let Ce=Be==="undecided"?h.createElement(p,{color:"yellow"},g):Be==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},uR.default.valid(Be)?Be:uR.default.inc(g,Be)));return h.createElement(A,{flexDirection:"column"},h.createElement(A,null,h.createElement(p,null,j.prettyLocator(v,we.anchoredLocator)," - ",Ce)),h.createElement(A,null,me.map(Ae=>h.createElement(A,{key:Ae,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:Ae===Be})," ",Ae)))))},J=we=>{let de=new Set(F.releaseRoots),Be=new Map([...we].filter(([Ee])=>de.has(Ee)));for(;;){let Ee=jv({project:F.project,releases:Be}),g=!1;if(Ee.length>0){for(let[me]of Ee)if(!de.has(me)){de.add(me),g=!0;let Ce=we.get(me);typeof Ce<"u"&&Be.set(me,Ce)}}if(!g)break}return{relevantWorkspaces:de,relevantReleases:Be}},te=()=>{let[we,de]=I(()=>new Map(F.releases)),Be=E((Ee,g)=>{let me=new Map(we);g!=="undecided"?me.set(Ee,g):me.delete(Ee);let{relevantReleases:Ce}=J(me);de(Ce)},[we,de]);return[we,Be]},ae=({workspaces:we,releases:de})=>{let Be=[];Be.push(`${we.size}total`);let Ee=0,g=0;for(let me of we){let Ce=de.get(me);typeof Ce>"u"?g+=1:Ce!=="decline"&&(Ee+=1)}return Be.push(`${Ee}release${Ee===1?"":"s"}`),Be.push(`${g}remaining`),h.createElement(p,{color:"yellow"},Be.join(", "))},ce=await u(({useSubmit:we})=>{let[de,Be]=te();we(de);let{relevantWorkspaces:Ee}=J(de),g=new Set([...Ee].fil
`)},p=()=>{let Ee=this.from.map(g=>gw.default.matcher(g));return o.workspaces.filter(g=>{let me=j.stringifyIdent(g.anchoredLocator),Ce=g.relativeCwd;return Ee.some(Ae=>Ae(me)||Ae(Ce))})},h=[];if(this.since?(A("Option --since is set; selecting the changed workspaces as root for workspace selection"),h=Array.from(await ra.fetchChangedWorkspaces({ref:this.since,project:o}))):this.from?(A("Option --from is set; selecting the specified workspaces"),h=[...p()]):this.worktree?(A("Option --worktree is set; selecting the current workspace"),h=[a]):this.recursive?(A("Option --recursive is set; selecting the current workspace"),h=[a]):this.all&&(A("Option --all is set; selecting all workspaces"),h=[...o.workspaces]),this.dryRun&&!this.all){for(let Ee of h)A(`
${j.prettyLocator(r,Ee.anchoredLocator)}`);h.length>0&&A("")}let E;if(this.recursive?this.since?(A("Option --recursive --since is set; recursively selecting all dependent workspaces"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceDependents()]).flat())):(A("Option --recursive is set; recursively selecting all transitive dependencies"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(A("Option --worktree is set; recursively selecting all nested workspaces"),E=new Set(h.map(Ee=>[...Ee.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ee of E)A(`
${j.prettyLocator(r,Ee.anchoredLocator)}`);let I=[],v=!1;if(u?.includes(":")){for(let Ee of o.workspaces)if(Ee.manifest.scripts.has(u)&&(v=!v,v===!1))break}for(let Ee of h){if(u&&!Ee.manifest.scripts.has(u)&&!v&&!(await An.getWorkspaceAccessibleBinaries(Ee)).has(u)){A(`Excluding${Ee.relativeCwd}becauseitdoesn't have a "${u}" script`);continue}if(!(u===r.env.npm_lifecycle_event&&Ee.cwd===a.cwd)){if(this.include.length>0&&!gw.default.isMatch(j.stringifyIdent(Ee.anchoredLocator),this.include)&&!gw.default.isMatch(Ee.relativeCwd,this.include)){A(`Excluding ${Ee.relativeCwd} because it doesn'tmatchthe--includefilter`);continue}if(this.exclude.length>0&&(gw.default.isMatch(j.stringifyIdent(Ee.anchoredLocator),this.exclude)||gw.default.isMatch(Ee.relativeCwd,this.exclude))){A(`Excluding${Ee.relativeCwd}becauseitmatchesthe--includefilter`);continue}if(this.publicOnly&&Ee.manifest.private===!0){A(`Excluding${Ee.relativeCwd}becauseit's a private workspace and --no-private was set`);continue}I.push(Ee)}}if(this.dryRun)return 0;let x=this.verbose??(this.context.stdout.isTTY?1/0:0),C=x>0,F=x>1,N=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(Vi.availableParallelism()/2):1,U=N===1?!1:this.parallel,J=U?this.interlaced:!0,te=(0,JBe.default)(N),ae=new Map,le=new Set,ce=0,we=null,de=!1,Be=await Ft.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ee=>{let g=async(me,{commandIndex:Ce})=>{if(de)return-1;!U&&F&&Ce>1&&Ee.reportSeparator();let Ae=eDt(me,{configuration:r,label:C,commandIndex:Ce}),[ne,Z]=zBe(Ee,{prefix:Ae,interlaced:J}),[xe,Le]=zBe(Ee,{prefix:Ae,interlaced:J});try{F&&Ee.reportInfo(null,`${Ae?`${Ae} `:""}Process started`);let ht=Date.now(),H=await this.cli.run([this.commandName,...this.args],{cwd:me.cwd,stdout:ne,stderr:xe})||0;ne.end(),xe.end(),await Z,await Le;let rt=Date.now();if(F){let Te=r.get("enableTimers")?`, completed in ${pe.pretty(r,rt-ht,pe.Type.DURATION)}`:"";Ee.reportInfo(null,`${Ae?`${Ae} `:""}Process exited (exit code ${H})${Te}`)}return H===130&&(de=!0,we=H),H}catch(ht){throw ne.end(),xe.end(),await Z,await Le,ht}};for(let me of I)ae.set(me.anchoredLocator.locatorHash,me);for(;ae.size>0&&!Ee.hasErrors();){let me=[];for(let[ne,Z]of ae){if(le.has(Z.anchoredDescriptor.descriptorHash))continue;let xe=!0;if(this.topological||this.topologicalDev){let Le=this.topologicalDev?new Map([...Z.manifest.dependencies,...Z.manifest.devDependencies]):Z.manifest.dependencies;for(let ht of Le.values()){let H=o.tryWorkspaceByDescriptor(ht);if(xe=H===null||!ae.has(H.anchoredLocator.locatorHash),!xe)break}}if(!!xe&&(le.add(Z.anchoredDescriptor.descriptorHash),me.push(te(async()=>{let Le=await g(Z,{commandIndex:++ce});return ae.delete(ne),le.delete(Z.anchoredDescriptor.descriptorHash),Le})),!U))break}if(me.length===0){let ne=Array.from(ae.values()).map(Z=>j.prettyLocator(r,Z.anchoredLocator)).join(", ");Ee.reportError(3,`Dependency cycle detected (${ne})`);return}let Ae=(await Promise.all(me)).find(ne=>ne!==0);we===null&&(we=typeof Ae<"u"?1:we),(this.topological||this.topologicalDev)&&typeof Ae<"u"&&Ee.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can'tsatisfythedependencygraph")}});return we!==null?we:Be.exitCode()}};lp.paths=[["workspaces","foreach"]],lp.usage=it.Usage({category:"Workspace-relatedcommands",description:"runacommandonallworkspaces",details:"\nThiscommandwillrunagivensub-commandoncurrentandallitsdescendantworkspaces.Variousflagscanaltertheexactbehaviorofthecommand:\n\n-If`-p,--parallel`isset,thecommandswillberaninparallel;they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn'tset,itwouldinsteadbuffertheoutputfromeachprocessandprinttheresultingbuffersonlya