darkness-dependent-vision/.yarn/releases/yarn-4.0.0.cjs

894 lines
2.6 MiB
JavaScript
Raw Normal View History

2023-10-25 13:02:17 +02:00
#!/usr/bin/env node
/* eslint-disable */
//prettier-ignore
(()=>{var t_e=Object.create;var LR=Object.defineProperty;var r_e=Object.getOwnPropertyDescriptor;var n_e=Object.getOwnPropertyNames;var i_e=Object.getPrototypeOf,s_e=Object.prototype.hasOwnProperty;var Be=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var yt=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vt=(t,e)=>{for(var r in e)LR(t,r,{get:e[r],enumerable:!0})},o_e=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of n_e(e))!s_e.call(t,a)&&a!==r&&LR(t,a,{get:()=>e[a],enumerable:!(o=r_e(e,a))||o.enumerable});return t};var $e=(t,e,r)=>(r=t!=null?t_e(i_e(t)):{},o_e(e||!t||!t.__esModule?LR(r,"default",{value:t,enumerable:!0}):r,t));var vi={};Vt(vi,{SAFE_TIME:()=>Q7,S_IFDIR:()=>wD,S_IFLNK:()=>ID,S_IFMT:()=>Ou,S_IFREG:()=>Hw});var Ou,wD,Hw,ID,Q7,F7=yt(()=>{Ou=61440,wD=16384,Hw=32768,ID=40960,Q7=456789e3});var ar={};Vt(ar,{EBADF:()=>Io,EBUSY:()=>a_e,EEXIST:()=>p_e,EINVAL:()=>c_e,EISDIR:()=>f_e,ENOENT:()=>u_e,ENOSYS:()=>l_e,ENOTDIR:()=>A_e,ENOTEMPTY:()=>g_e,EOPNOTSUPP:()=>d_e,EROFS:()=>h_e,ERR_DIR_CLOSED:()=>NR});function Tl(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function a_e(t){return Tl("EBUSY",t)}function l_e(t,e){return Tl("ENOSYS",`${t}, ${e}`)}function c_e(t){return Tl("EINVAL",`invalid argument, ${t}`)}function Io(t){return Tl("EBADF",`bad file descriptor, ${t}`)}function u_e(t){return Tl("ENOENT",`no such file or directory, ${t}`)}function A_e(t){return Tl("ENOTDIR",`not a directory, ${t}`)}function f_e(t){return Tl("EISDIR",`illegal operation on a directory, ${t}`)}function p_e(t){return Tl("EEXIST",`file already exists, ${t}`)}function h_e(t){return Tl("EROFS",`read-only filesystem, ${t}`)}function g_e(t){return Tl("ENOTEMPTY",`directory not empty, ${t}`)}function d_e(t){return Tl("EOPNOTSUPP",`operation not supported, ${t}`)}function NR(){return Tl("ERR_DIR_CLOSED","Directory handle was closed")}var BD=yt(()=>{});var Ea={};Vt(Ea,{BigIntStatsEntry:()=>ey,DEFAULT_MODE:()=>UR,DirEntry:()=>OR,StatEntry:()=>$m,areStatsEqual:()=>_R,clearStats:()=>vD,convertToBigIntStats:()=>y_e,makeDefaultStats:()=>R7,makeEmptyStats:()=>m_e});function R7(){return new $m}function m_e(){return vD(R7())}function vD(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):MR.types.isDate(r)&&(t[e]=new Date(0))}return t}function y_e(t){let e=new ey;for(let r in t)if(Object.hasOwn(t,r)){let o=t[r];typeof o=="number"?e[r]=BigInt(o):MR.types.isDate(o)&&(e[r]=new Date(o))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function _R(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;let r=t,o=e;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}var MR,UR,OR,$m,ey,HR=yt(()=>{MR=$e(Be("util")),UR=33188,OR=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=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.bi
`).length,o=e.length-r;return r>o?`\r
`:`
`}function Mg(t,e){return e.replace(/\r?\n/g,Q_e(t))}var j7,q7,hf,Mu,Ug=yt(()=>{j7=Be("crypto"),q7=Be("os");GR();Ca();hf=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let o=[e];for(;o.length>0;){let a=o.shift();if((await this.lstatPromise(a)).isDirectory()){let u=await this.readdirPromise(a);if(r)for(let A of u.sort())o.push(this.pathUtils.join(a,A));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let o=await this.openPromise(e,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,j7.createHash)(r),A=0;for(;(A=await this.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await this.closePromise(o)}}async removePromise(e,{recursive:r=!0,maxRetries:o=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(u=>this.removePromise(this.pathUtils.resolve(e,u))))}for(let n=0;n<=o;n++)try{await this.rmdirPromise(e);break}catch(u){if(u.code!=="EBUSY"&&u.code!=="ENOTEMPTY")throw u;n<o&&await new Promise(A=>setTimeout(A,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let o;try{o=this.lstatSync(e)}catch(a){if(a.code==="ENOENT")return;throw a}if(o.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{await this.mkdirPromise(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&await this.chmodPromise(A,r),o!=null)await this.utimesPromise(A,o[0],o[1]);else{let p=await this.statPromise(this.pathUtils.dirname(A));await this.utimesPromise(A,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{this.mkdirSync(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&this.chmodSync(A,r),o!=null)this.utimesSync(A,o[0],o[1]);else{let p=this.statSync(this.pathUtils.dirname(A));this.utimesSync(A,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:o=this,overwrite:a=!0,stableSort:n=!1,stableTime:u=!1,linkStrategy:A=null}={}){return await N7(this,e,o,r,{overwrite:a,stableSort:n,stableTime:u,linkStrategy:A})}copySync(e,r,{baseFs:o=this,overwrite:a=!0}={}){let n=o.lstatSync(r),u=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=o.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),o.pathUtils.join(r,h),{baseFs:o,overwrite:a})}else if(n.isFile()){if(!u||a){u&&this.removeSync(e);let p=o.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!u||a){u&&this.removeSync(e);let p=o.readlinkSync(r);this.symlinkSync(DD(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let A=n.mode&511;this.chmodSync(e,A)}async changeFilePromise(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,o):this.changeFileTextPromise(e,r,o)}async changeFileBufferPromise(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:o})}async changeFileTextPromise(e,r,{automaticNewlines:o,mode:a}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch{}let u=o?Mg(n,r):r;n!==u&&await this.writeFilePromise(e,u,{mode:a})}changeFileSync(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,o):this.changeFileTextSync(e,r,o)}changeFileBufferSync(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:o})}changeFileTextSync(e,r,{automaticNewlines:
`)}writeJsonSync(e,r,{compact:o=!1}={}){let a=o?0:2;return this.writeFileSync(e,`${JSON.stringify(r,null,a)}
`)}async preserveTimePromise(e,r){let o=await this.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await this.lutimesPromise(e,o.atime,o.mtime)}async preserveTimeSync(e,r){let o=this.lstatSync(e),a=r();typeof a<"u"&&(e=a),this.lutimesSync(e,o.atime,o.mtime)}},Mu=class extends hf{constructor(){super(V)}}});var Ps,gf=yt(()=>{Ug();Ps=class extends hf{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,o){return this.baseFs.openPromise(this.mapToBase(e),r,o)}openSync(e,r,o){return this.baseFs.openSync(this.mapToBase(e),r,o)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,o,a,n){return await this.baseFs.readPromise(e,r,o,a,n)}readSync(e,r,o,a,n){return this.baseFs.readSync(e,r,o,a,n)}async writePromise(e,r,o,a,n){return typeof r=="string"?await this.baseFs.writePromise(e,r,o):await this.baseFs.writePromise(e,r,o,a,n)}writeSync(e,r,o,a,n){return typeof r=="string"?this.baseFs.writeSync(e,r,o):this.baseFs.writeSync(e,r,o,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,o){return this.baseFs.fchownPromise(e,r,o)}fchownSync(e,r,o){return this.baseFs.fchownSync(e,r,o)}async chownPromise(e,r,o){return this.baseFs.chownPromise(this.mapToBase(e),r,o)}chownSync(e,r,o){return this.baseFs.chownSync(this.mapToBase(e),r,o)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,o=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),o)}copyFileSync(e,r,o=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),o)}async appendFilePromise(e,r,o){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,o)}appendFileSync(e,r,o){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,o)}async writeFilePromise(e,r,o){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,o)}writeFileSync(e,r,o){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,o)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,o){return this.baseFs.utimesPromise(this.mapToBase(e),r,o)}utimesSync(e,r,o){return this.baseFs.utimesSync(this.mapToBase(e),r,o)}async lutimesPromise(e,r,o){return this.baseFs.lutimesPromise(this.mapToBase(e),r,o)}lutimesSync(e,r,o){return this.baseFs.lutimesSync(this.mapToB
`,Vn=Br(`\\
`,!1),On=function(){return""},Li="\\",Mn=Br("\\",!1),_i=/^[\\$"`]/,tr=Cs(["\\","$",'"',"`"],!1,!1),Oe=function(L){return L},ii="\\a",Ma=Br("\\a",!1),hr=function(){return"a"},uc="\\b",uu=Br("\\b",!1),Ac=function(){return"\b"},El=/^[Ee]/,vA=Cs(["E","e"],!1,!1),Au=function(){return"\x1B"},Ce="\\f",Rt=Br("\\f",!1),fc=function(){return"\f"},Hi="\\n",fu=Br("\\n",!1),Yt=function(){return`
`},Cl="\\r",DA=Br("\\r",!1),lp=function(){return"\r"},pc="\\t",PA=Br("\\t",!1),Qn=function(){return" "},hi="\\v",hc=Br("\\v",!1),SA=function(){return"\v"},sa=/^[\\'"?]/,Ni=Cs(["\\","'",'"',"?"],!1,!1),_o=function(L){return String.fromCharCode(parseInt(L,16))},Ze="\\x",lo=Br("\\x",!1),gc="\\u",pu=Br("\\u",!1),ji="\\U",hu=Br("\\U",!1),xA=function(L){return String.fromCodePoint(parseInt(L,16))},Ua=/^[0-7]/,dc=Cs([["0","7"]],!1,!1),hs=/^[0-9a-fA-f]/,Ut=Cs([["0","9"],["a","f"],["A","f"]],!1,!1),Fn=lg(),Ci="{}",oa=Br("{}",!1),co=function(){return"{}"},_s="-",aa=Br("-",!1),la="+",Ho=Br("+",!1),wi=".",gs=Br(".",!1),ds=function(L,K,re){return{type:"number",value:(L==="-"?-1:1)*parseFloat(K.join("")+"."+re.join(""))}},ms=function(L,K){return{type:"number",value:(L==="-"?-1:1)*parseInt(K.join(""))}},Hs=function(L){return{type:"variable",...L}},Un=function(L){return{type:"variable",name:L}},Pn=function(L){return L},ys="*",We=Br("*",!1),tt="/",It=Br("/",!1),nr=function(L,K,re){return{type:K==="*"?"multiplication":"division",right:re}},$=function(L,K){return K.reduce((re,he)=>({left:re,...he}),L)},me=function(L,K,re){return{type:K==="+"?"addition":"subtraction",right:re}},Ne="$((",ft=Br("$((",!1),pt="))",Tt=Br("))",!1),er=function(L){return L},Zr="$(",qi=Br("$(",!1),es=function(L){return L},xi="${",jo=Br("${",!1),bA=":-",kA=Br(":-",!1),cp=function(L,K){return{name:L,defaultValue:K}},rg=":-}",gu=Br(":-}",!1),ng=function(L){return{name:L,defaultValue:[]}},du=":+",uo=Br(":+",!1),QA=function(L,K){return{name:L,alternativeValue:K}},mc=":+}",ca=Br(":+}",!1),ig=function(L){return{name:L,alternativeValue:[]}},yc=function(L){return{name:L}},Pm="$",sg=Br("$",!1),$n=function(L){return e.isGlobPattern(L)},up=function(L){return L},og=/^[a-zA-Z0-9_]/,FA=Cs([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),js=function(){return ag()},mu=/^[$@*?#a-zA-Z0-9_\-]/,Ha=Cs(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),Gi=/^[()}<>$|&; \t"']/,ua=Cs(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),yu=/^[<>&; \t"']/,Es=Cs(["<",">","&",";"," "," ",'"',"'"],!1,!1),Ec=/^[ \t]/,Cc=Cs([" "," "],!1,!1),Y=0,Dt=0,wl=[{line:1,column:1}],bi=0,wc=[],ct=0,Eu;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function ag(){return t.substring(Dt,Y)}function mw(){return Ic(Dt,Y)}function RA(L,K){throw K=K!==void 0?K:Ic(Dt,Y),Ag([ug(L)],t.substring(Dt,Y),K)}function Ap(L,K){throw K=K!==void 0?K:Ic(Dt,Y),Sm(L,K)}function Br(L,K){return{type:"literal",text:L,ignoreCase:K}}function Cs(L,K,re){return{type:"class",parts:L,inverted:K,ignoreCase:re}}function lg(){return{type:"any"}}function cg(){return{type:"end"}}function ug(L){return{type:"other",description:L}}function fp(L){var K=wl[L],re;if(K)return K;for(re=L-1;!wl[re];)re--;for(K=wl[re],K={line:K.line,column:K.column};re<L;)t.charCodeAt(re)===10?(K.line++,K.column=1):K.column++,re++;return wl[L]=K,K}function Ic(L,K){var re=fp(L),he=fp(K);return{start:{offset:L,line:re.line,column:re.column},end:{offset:K,line:he.line,column:he.column}}}function Ct(L){Y<bi||(Y>bi&&(bi=Y,wc=[]),wc.push(L))}function Sm(L,K){return new jg(L,null,null,K)}function Ag(L,K,re){return new jg(jg.buildMessage(L,K),L,K,re)}function fg(){var L,K,re;for(L=Y,K=[],re=Qt();re!==r;)K.push(re),re=Qt();return K!==r?(re=Cu(),re===r&&(re=null),re!==r?(Dt=L,K=n(re),L=K):(Y=L,L=r)):(Y=L,L=r),L}function Cu(){var L,K,re,he,Je;if(L=Y,K=wu(),K!==r){for(re=[],he=Qt();he!==r;)re.push(he),he=Qt();re!==r?(he=pg(),he!==r?(Je=xm(),Je===r&&(Je=null),Je!==r?(Dt=L,K=u(K,he,Je),L=K):(Y=L,L=r)):(Y=L,L=r)):(Y=L,L=r)}else Y=L,L=r;if(L===r)if(L=Y,K=wu(),K!==r){for(re=[],he=Qt();he!==r;)re.push(he),he=Qt();re!==r?(he=pg(),he===r&&(he=null),he!==r?(Dt=L,K=A(K,he),L=K):(Y=L,L=r)):(Y=L,L=r)}else Y=L,L=r;return L}function xm(){var L,K,re,he,Je;for(L=Y,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r)if(re=Cu(),re!==r){for(he=[],Je=Qt();Je!==r;)he.push(Je),Je=Qt();he!==r?(Dt=L,K=p(re),L=K):(Y=L,L=r)}else Y=L,L=r;else Y=L,L=r;return L}function pg(){var L;return t.charCodeAt(Y)===59?(L=h,Y++
`,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),h8e=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(eW,([t,e])=>[t,`"$'${e}'"`])]),tW=t=>eW.get(t)??`\\x${t.charCodeAt(0).toString(16).padStart(2,"0")}`,g8e=t=>h8e.get(t)??`"$'${tW(t)}'"`});var iW=_((bxt,nW)=>{"use strict";function d8e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Gg(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Gg)}d8e(Gg,Error);Gg.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var C="",I;for(I=0;I<h.parts.length;I++)C+=h.parts[I]instanceof Array?n(h.parts[I][0])+"-"+n(h.parts[I][1]):n(h.parts[I]);return"["+(h.inverted?"^":"")+C+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function u(h){return r[h.type](h)}function A(h){var C=new Array(h.length),I,v;for(I=0;I<h.length;I++)C[I]=u(h[I]);if(C.sort(),C.length>0){for(I=1,v=1;I<C.length;I++)C[I-1]!==C[I]&&(C[v]=C[I],v++);C.length=v}switch(C.length){case 1:return C[0];case 2:return C[0]+" or "+C[1];default:return C.slice(0,-1).join(", ")+", or "+C[C.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function m8e(t,e){e=e!==void 0?e:{};var r={},o={resolution:ke},a=ke,n="/",u=De("/",!1),A=function(je,x){return{from:je,descriptor:x}},p=function(je){return{descriptor:je}},h="@",C=De("@",!1),I=function(je,x){return{fullName:je,description:x}},v=function(je){return{fullName:je}},b=function(){return Ie()},E=/^[^\/@]/,F=ce(["/","@"],!0,!1),N=/^[^\/]/,U=ce(["/"],!0,!1),z=0,te=0,le=[{line:1,column:1}],pe=0,ue=[],ye=0,ae;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function Ie(){return t.substring(te,z)}function Fe(){return ht(te,z)}function g(je,x){throw x=x!==void 0?x:ht(te,z),Te([we(je)],t.substring(te,z),x)}function Ee(je,x){throw x=x!==void 0?x:ht(te,z),lt(je,x)}function De(je,x){return{type:"literal",text:je,ignoreCase:x}}function ce(je,x,w){return{type:"class",parts:je,inverted:x,ignoreCase:w}}function ne(){return{type:"any"}}function ee(){return{type:"end"}}function we(je){return{type:"other",description:je}}function be(je){var x=le[je],w;if(x)return x;for(w=je-1;!le[w];)w--;for(x=le[w],x={line:x.line,column:x.column};w<je;)t.charCodeAt(w)===10?(x.line++,x.column=1):x.column++,w++;return le[je]=x,x}function ht(je,x){var w=be(je),S=be(x);return{start:{offset:je,line:w.line,column:w.column},end:{offset:x,line:S.line,column:S.column}}}function H(je){z<pe||(z>pe&&(pe=z,ue=[]),ue.push(je))}function lt(je,x){return new Gg(je,null,null,x)}function Te(je,x,w){return new Gg(Gg.buildMessage(je,x),je,x,w)}function ke(){var je,x,w,S;return je=z,x=xe(),x!==r?(t.charCodeAt(z)===47?(w=n,z++):(w=r,ye===0&&H(u)),w!==r?(S=xe(),S!==r?(te=je,x=A(x,S),je=x):(z=je,je=r)):(z=je,je=r)):(z=je,je=r),je===r&&(je=z,x=xe(),x!==r&&(te=je,x=p(x)),je=x),je}function xe(){var je,x,w,S;return je=z,x=He(),x!==r?(t.charCodeAt(z)===64?(w=h,z++):(w=r,ye===0&&H(C)),w!==r?(S=ze(),S!==r?(te=je,x=I(x,S),je=x):(z=je,je=r)):(z=je,je=r)):(z=je,je=r),je===r&&(je=z,x=He(),x!==r&&(te=je,x=v(x)),je=x),je}function He(){var je,x,w,S,y;return je=z,t.charCodeAt(z)===64?(x=h,z++):(x=r,ye===0&
\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){o=" ... ",a+=5;break}for(n="",u=this.position;u<this.buffer.length&&`\0\r
\x85\u2028\u2029`.indexOf(this.buffer.charAt(u))===-1;)if(u+=1,u-this.position>r/2-1){n=" ... ",u-=5;break}return A=this.buffer.slice(a,u),cW.repeat(" ",e)+o+A+n+`
`+cW.repeat(" ",e+this.position-a+o.length)+"^"};AT.prototype.toString=function(e){var r,o="";return this.name&&(o+='in "'+this.name+'" '),o+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(o+=`:
`+r)),o};uW.exports=AT});var os=_((Txt,pW)=>{"use strict";var fW=uy(),B8e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],v8e=["scalar","sequence","mapping"];function D8e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(o){e[String(o)]=r})}),e}function P8e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(B8e.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=D8e(e.styleAliases||null),v8e.indexOf(this.kind)===-1)throw new fW('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}pW.exports=P8e});var Kg=_((Lxt,gW)=>{"use strict";var hW=Wg(),HD=uy(),S8e=os();function fT(t,e,r){var o=[];return t.include.forEach(function(a){r=fT(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 x8e(){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 HD("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=fT(this,"implicit",[]),this.compiledExplicit=fT(this,"explicit",[]),this.compiledTypeMap=x8e(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 HD("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 HD("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(o){return o instanceof S8e}))throw new HD("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=_((Nxt,dW)=>{"use strict";var b8e=os();dW.exports=new b8e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var EW=_((Oxt,yW)=>{"use strict";var k8e=os();yW.exports=new k8e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var wW=_((Mxt,CW)=>{"use strict";var Q8e=os();CW.exports=new Q8e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var jD=_((Uxt,IW)=>{"use strict";var F8e=Kg();IW.exports=new F8e({explicit:[mW(),EW(),wW()]})});var vW=_((_xt,BW)=>{"use strict";var R8e=os();function T8e(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function L8e(){return null}function N8e(t){return t===null}BW.exports=new R8e("tag:yaml.org,2002:null",{kind:"scalar",resolve:T8e,construct:L8e,predicate:N8e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var PW=_((Hxt,DW)=>{"use strict";var O8e=os();function M8e(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 U8e(t){return t==="true"||t==="True"||t==="TRUE"}function _8e(t){return Object.prototype.toString.call(t)==="[object Boolean]"}DW.exports=new O8e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:M8e,construct:U8e,predicate:_8e,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE"
\r`;function AHe(t){if(t===null)return!1;var e,r,o=0,a=t.length,n=gT;for(r=0;r<a;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;o+=6}return o%8===0}function fHe(t){var e,r,o=t.replace(/[\r\n=]/g,""),a=o.length,n=gT,u=0,A=[];for(e=0;e<a;e++)e%4===0&&e&&(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)),u=u<<6|n.indexOf(o.charAt(e));return r=a%4*6,r===0?(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)):r===18?(A.push(u>>10&255),A.push(u>>2&255)):r===12&&A.push(u>>4&255),Vg?Vg.from?Vg.from(A):new Vg(A):A}function pHe(t){var e="",r=0,o,a,n=t.length,u=gT;for(o=0;o<n;o++)o%3===0&&o&&(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]),r=(r<<8)+t[o];return a=n%3,a===0?(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]):a===2?(e+=u[r>>10&63],e+=u[r>>4&63],e+=u[r<<2&63],e+=u[64]):a===1&&(e+=u[r>>2&63],e+=u[r<<4&63],e+=u[64],e+=u[64]),e}function hHe(t){return Vg&&Vg.isBuffer(t)}HW.exports=new uHe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:AHe,construct:fHe,predicate:hHe,represent:pHe})});var GW=_((Jxt,qW)=>{"use strict";var gHe=os(),dHe=Object.prototype.hasOwnProperty,mHe=Object.prototype.toString;function yHe(t){if(t===null)return!0;var e=[],r,o,a,n,u,A=t;for(r=0,o=A.length;r<o;r+=1){if(a=A[r],u=!1,mHe.call(a)!=="[object Object]")return!1;for(n in a)if(dHe.call(a,n))if(!u)u=!0;else return!1;if(!u)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function EHe(t){return t!==null?t:[]}qW.exports=new gHe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:yHe,construct:EHe})});var WW=_((Xxt,YW)=>{"use strict";var CHe=os(),wHe=Object.prototype.toString;function IHe(t){if(t===null)return!0;var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1){if(o=u[e],wHe.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;n[e]=[a[0],o[a[0]]]}return!0}function BHe(t){if(t===null)return[];var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1)o=u[e],a=Object.keys(o),n[e]=[a[0],o[a[0]]];return n}YW.exports=new CHe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:IHe,construct:BHe})});var VW=_((Zxt,KW)=>{"use strict";var vHe=os(),DHe=Object.prototype.hasOwnProperty;function PHe(t){if(t===null)return!0;var e,r=t;for(e in r)if(DHe.call(r,e)&&r[e]!==null)return!1;return!0}function SHe(t){return t!==null?t:{}}KW.exports=new vHe("tag:yaml.org,2002:set",{kind:"mapping",resolve:PHe,construct:SHe})});var fy=_(($xt,zW)=>{"use strict";var xHe=Kg();zW.exports=new xHe({include:[hT()],implicit:[OW(),UW()],explicit:[jW(),GW(),WW(),VW()]})});var XW=_((ebt,JW)=>{"use strict";var bHe=os();function kHe(){return!0}function QHe(){}function FHe(){return""}function RHe(t){return typeof t>"u"}JW.exports=new bHe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:kHe,construct:QHe,predicate:RHe,represent:FHe})});var $W=_((tbt,ZW)=>{"use strict";var THe=os();function LHe(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),o="";return!(e[0]==="/"&&(r&&(o=r[1]),o.length>3||e[e.length-o.length-1]!=="/"))}function NHe(t){var e=t,r=/\/([gim]*)$/.exec(t),o="";return e[0]==="/"&&(r&&(o=r[1]),e=e.slice(1,e.length-o.length-1)),new RegExp(e,o)}function OHe(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function MHe(t){return Object.prototype.toString.call(t)==="[object RegExp]"}ZW.exports=new THe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:LHe,construct:NHe,predicate:MHe,represent:OHe})});var rK=_((rbt,tK)=>{"use strict";var qD;try{eK=Be,qD=eK("esprima")}catch{typeof window<"u"&&(qD=window.esprima)}var eK,UHe=os();function _He(t){if(t===null)return!1;try{var e="("+t+")",r=qD.parse(e,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function HHe(t){var e="("+t+")",r=qD.parse(e,{range:!0}),o=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!
`: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 $He(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 e6e(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||YHe,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 GHe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Sr(t,e){throw EK(t,e)}function WD(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&&WD(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"),qp.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 jp(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 KHe.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(mf.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],qp.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&&!qp.call(r,a)&&qp.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 mT(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(;Jg(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(Hu(a))for(mT(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&&WD(t,"deficient indentation"),o}function KD(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 yT(t,e){e===1?t.result+=" ":e>1&&(t.result+=mf.repeat(`
`,e-1))}function t6e(t,e,r){var o,a,n,u,A,p,h,C,I=t.kind,v=t.result,b;if(b=t.input.charCodeAt(t.position),Ia(b)||py(b)||b===35||b===38||b===42||b===33||b===124||b===62||b===39||b===34||b===37||b===64||b===96||(b===63||b===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;b!==0;){if(b===58){if(a=t.input.charCodeAt(t.position+1),Ia(a)||r&&py(a))break}else if(b===35){if(o=t.input.charCodeAt(t.position-1),Ia(o))break}else{if(t.position===t.lineStart&&KD(t)||r&&py(b))break;if(Hu(b))if(p=t.line,h=t.lineStart,C=t.lineIndent,Wi(t,!1,-1),t.lineIndent>=e){A=!0,b=t.input.charCodeAt(t.position);continue}else{t.position=u,t.line=p,t.lineStart=h,t.lineIndent=C;break}}A&&(jp(t,n,u,!1),yT(t,t.line-p),n=u=t.position,A=!1),Jg(b)||(u=t.position+1),b=t.input.charCodeAt(++t.position)}return jp(t,n,u,!1),t.result?!0:(t.kind=I,t.result=v,!1)}function r6e(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(jp(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 Hu(r)?(jp(t,o,a,!0),yT(t,Wi(t,!1,e)),o=a=t.position):t.position===t.lineStart&&KD(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 n6e(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 jp(t,r,t.position,!0),t.position++,!0;if(A===92){if(jp(t,r,t.position,!0),A=t.input.charCodeAt(++t.position),Hu(A))Wi(t,!1,e);else if(A<256&&mK[A])t.result+=yK[A],t.position++;else if((u=XHe(A))>0){for(a=u,n=0;a>0;a--)A=t.input.charCodeAt(++t.position),(u=JHe(A))>=0?n=(n<<4)+u:Sr(t,"expected hexadecimal character");t.result+=$He(n),t.position++}else Sr(t,"unknown escape sequence");r=o=t.position}else Hu(A)?(jp(t,r,o,!0),yT(t,Wi(t,!1,e)),r=o=t.position):t.position===t.lineStart&&KD(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 i6e(t,e){var r=!0,o,a=t.tag,n,u=t.anchor,A,p,h,C,I,v={},b,E,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"),E=b=F=null,h=C=!1,N===63&&(A=t.input.charCodeAt(t.position+1),Ia(A)&&(h=C=!0,t.position++,Wi(t,!0,e))),o=t.line,gy(t,e,GD,!1,!0),E=t.tag,b=t.result,Wi(t,!0,e),N=t.input.charCodeAt(t.position),(C||t.line===o)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),Wi(t,!0,e),gy(t,e,GD,!1,!0),F=t.result),I?hy(t,n,v,E,b,F):h?n.push(hy(t,null,v,E,b,F)):n.push(b),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 s6e(t,e){var r,o,a=dT,n=!1,u=!1,A=e,p=0,h=!1,C,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)dT===a?a=I===43?sK:WHe:Sr(t,"repeat of a chomping mode identifier");else if((C=ZHe(I))>=0)C===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+C-1,u=!0);else break;if(Jg(I)){do I=t.input.charCodeAt(++t.position);while(Jg(I));if(I===35)do I=t.input.charCodeAt(++t.position);while(!Hu(I)&&I!==0)}for(;I!==0;){for(mT(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):a===dT&&n&&(t.result+=`
`);break}for(o?Jg(I)?(h=!0,t.result+=mf.repeat(`
`,n?1+p:p)):h?(h=!1,t.result+=mf.repeat(`
`,p+1)):p===0?n&&(t.result+=" "):t.result+=mf.repeat(`
`,p):t.result+=mf.repeat(`
`,n?1+p:p),n=!0,u=!0,p=0,r=t.position;!Hu(I)&&I!==0;)I=t.input.charCodeAt(++t.position);jp(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 o6e(t,e,r){var o,a,n,u,A=t.tag,p=t.anchor,h={},C={},I=null,v=null,b=null,E=!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?(E&&(hy(t,h,C,I,v,null),I=v=b=null),F=!0,E=!0,a=!0):E?(E=!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);Jg(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"),E&&(hy(t,h,C,I,v,null),I=v=b=null),F=!0,E=!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,YD,!0,a)&&(E?v=t.result:b=t.result),E||(hy(t,h,C,I,v,b,n,u),I=v=b=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 E&&hy(t,h,C,I,v,null),F&&(t.tag=A,t.anchor=p,t.kind="mapping",t.result=h),F}function a6e(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),zHe.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:qp.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 l6e(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 c6e(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),qp.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,C=!1,I,v,b,E,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 e6e(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;)u6e(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 A6e(t,e,r){return typeof e=="object"&&e!==null&&typeof r>"u"&&(r=e,e=null),wK(t,e,mf.extend({schema:fK},r))}function f6e(t,e){return IK(t,mf.extend({schema:fK},e))}Xw.exports.loadAll=wK;Xw.exports.load=IK;Xw.exports.safeLoadAll=A6e;Xw.exports.safeLoad=f6e});var WK=_((obt,IT)=>{"use strict";var $w=Wg(),eI=uy(),p6e=Jw(),h6e=fy(),QK=Object.prototype.toString,FK=Object.prototype.hasOwnProperty,g6e=9,Zw=10,d6e=13,m6e=32,y6e=33,E6e=34,RK=35,C6e=37,w6e=38,I6e=39,B6e=42,TK=44,v6e=45,LK=58,D6e=61,P6e=62,S6e=63,x6e=64,NK=91,OK=93,b6e=96,MK=123,k6e=124,UK=125,vo={};vo[0]="\\0";vo[7]="\\a";vo[8]="\\b";vo[9]="\\t";vo[10]="\\n";vo[11]="\\v";vo[12]="\\f";vo[13]="\\r";vo[27]="\\e";vo[34]='\\"';vo[92]="\\\\";vo[133]="\\N";vo[160]="\\_";vo[8232]="\\L";vo[8233]="\\P";var Q6e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function F6e(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&&FK.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 eI("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+$w.repeat("0",o-e.length)+e}function R6e(t){this.schema=t.schema||p6e,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=$w.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=F6e(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 DK(t,e){for(var r=$w.repeat(" ",e),o=0,a=-1,n="",u,A=t.length;o<A;)a=t.indexOf(`
`,o),a===-1?(u=t.slice(o),o=A):(u=t.slice(o,a+1),o=a+1),u.length&&u!==`
`&&(n+=r),n+=u;return n}function ET(t,e){return`
`+$w.repeat(" ",t.indent*e)}function T6e(t,e){var r,o,a;for(r=0,o=t.implicitTypes.length;r<o;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}function wT(t){return t===m6e||t===g6e}function dy(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function L6e(t){return dy(t)&&!wT(t)&&t!==65279&&t!==d6e&&t!==Zw}function PK(t,e){return dy(t)&&t!==65279&&t!==TK&&t!==NK&&t!==OK&&t!==MK&&t!==UK&&t!==LK&&(t!==RK||e&&L6e(e))}function N6e(t){return dy(t)&&t!==65279&&!wT(t)&&t!==v6e&&t!==S6e&&t!==LK&&t!==TK&&t!==NK&&t!==OK&&t!==MK&&t!==UK&&t!==RK&&t!==w6e&&t!==B6e&&t!==y6e&&t!==k6e&&t!==D6e&&t!==P6e&&t!==I6e&&t!==E6e&&t!==C6e&&t!==x6e&&t!==b6e}function _K(t){var e=/^\n* /;return e.test(t)}var HK=1,jK=2,qK=3,GK=4,VD=5;function O6e(t,e,r,o,a){var n,u,A,p=!1,h=!1,C=o!==-1,I=-1,v=N6e(t.charCodeAt(0))&&!wT(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),!dy(u))return VD;A=n>0?t.charCodeAt(n-1):null,v=v&&PK(u,A)}else{for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),u===Zw)p=!0,C&&(h=h||n-I-1>o&&t[I+1]!==" ",I=n);else if(!dy(u))return VD;A=n>0?t.charCodeAt(n-1):null,v=v&&PK(u,A)}h=h||C&&n-I-1>o&&t[I+1]!==" "}return!p&&!h?v&&!a(t)?HK:jK:r>9&&_K(t)?VD:h?GK:qK}function M6e(t,e,r,o){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&Q6e.indexOf(e)!==-1)return"'"+e+"'";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),u=o||t.flowLevel>-1&&r>=t.flowLevel;function A(p){return T6e(t,p)}switch(O6e(e,u,t.indent,n,A)){case HK:return e;case jK:return"'"+e.replace(/'/g,"''")+"'";case qK:return"|"+SK(e,t.indent)+xK(DK(e,a));case GK:return">"+SK(e,t.indent)+xK(DK(U6e(e,n),a));case VD:return'"'+_6e(e,n)+'"';default:throw new eI("impossible error: invalid scalar style")}}()}function SK(t,e){var r=_K(t)?String(e):"",o=t[t.length-1]===`
`,a=o&&(t[t.length-2]===`
`||t===`
`),n=a?"+":o?"":"-";return r+n+`
`}function xK(t){return t[t.length-1]===`
`?t.slice(0,-1):t}function U6e(t,e){for(var r=/(\n+)([^\n]*)/g,o=function(){var h=t.indexOf(`
`);return h=h!==-1?h:t.length,r.lastIndex=h,bK(t.slice(0,h),e)}(),a=t[0]===`
`||t[0]===" ",n,u;u=r.exec(t);){var A=u[1],p=u[2];n=p[0]===" ",o+=A+(!a&&!n&&p!==""?`
`:"")+bK(p,e),a=n}return o}function bK(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,o,a=0,n,u=0,A=0,p="";o=r.exec(t);)A=o.index,A-a>e&&(n=u>a?u:A,p+=`
`+t.slice(a,n),a=n+1),u=A;return p+=`
`,t.length-a>e&&u>a?p+=t.slice(a,u)+`
`+t.slice(u+1):p+=t.slice(a),p.slice(1)}function _6e(t){for(var e="",r,o,a,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(o=t.charCodeAt(n+1),o>=56320&&o<=57343)){e+=vK((r-55296)*1024+o-56320+65536),n++;continue}a=vo[r],e+=!a&&dy(r)?t[n]:a||vK(r)}return e}function H6e(t,e,r){var o="",a=t.tag,n,u;for(n=0,u=r.length;n<u;n+=1)Xg(t,e,r[n],!1,!1)&&(n!==0&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=a,t.dump="["+o+"]"}function j6e(t,e,r,o){var a="",n=t.tag,u,A;for(u=0,A=r.length;u<A;u+=1)Xg(t,e+1,r[u],!0,!0)&&((!o||u!==0)&&(a+=ET(t,e)),t.dump&&Zw===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=n,t.dump=a||"[]"}function q6e(t,e,r){var o="",a=t.tag,n=Object.keys(r),u,A,p,h,C;for(u=0,A=n.length;u<A;u+=1)C="",u!==0&&(C+=", "),t.condenseFlow&&(C+='"'),p=n[u],h=r[p],Xg(t,e,p,!1,!1)&&(t.dump.length>1024&&(C+="? "),C+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Xg(t,e,h,!1,!1)&&(C+=t.dump,o+=C));t.tag=a,t.dump="{"+o+"}"}function G6e(t,e,r,o){var a="",n=t.tag,u=Object.keys(r),A,p,h,C,I,v;if(t.sortKeys===!0)u.sort();else if(typeof t.sortKeys=="function")u.sort(t.sortKeys);else if(t.sortKeys)throw new eI("sortKeys must be a boolean or a function");for(A=0,p=u.length;A<p;A+=1)v="",(!o||A!==0)&&(v+=ET(t,e)),h=u[A],C=r[h],Xg(t,e+1,h,!0,!0,!0)&&(I=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,I&&(t.dump&&Zw===t.dump.charCodeAt(0)?v+="?":v+="? "),v+=t.dump,I&&(v+=ET(t,e)),Xg(t,e+1,C,!0,I)&&(t.dump&&Zw===t.dump.charCodeAt(0)?v+=":":v+=": ",v+=t.dump,a+=v));t.tag=n,t.dump=a||"{}"}function kK(t,e,r){var o,a,n,u,A,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,u=a.length;n<u;n+=1)if(A=a[n],(A.instanceOf||A.predicate)&&(!A.instanceOf||typeof e=="object"&&e instanceof A.instanceOf)&&(!A.predicate||A.predicate(e))){if(t.tag=r?A.tag:"?",A.represent){if(p=t.styleMap[A.tag]||A.defaultStyle,QK.call(A.represent)==="[object Function]")o=A.represent(e,p);else if(FK.call(A.represent,p))o=A.represent[p](e,p);else throw new eI("!<"+A.tag+'> tag resolver accepts not "'+p+'" style');t.dump=o}return!0}return!1}function Xg(t,e,r,o,a,n){t.tag=null,t.dump=r,kK(t,r,!1)||kK(t,r,!0);var u=QK.call(t.dump);o&&(o=t.flowLevel<0||t.flowLevel>e);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(A&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(t.dump).length!==0?(G6e(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(q6e(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(u==="[object Array]"){var C=t.noArrayIndent&&e>0?e-1:e;o&&t.dump.length!==0?(j6e(t,C,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(H6e(t,C,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(u==="[object String]")t.tag!=="?"&&M6e(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new eI("unacceptable kind of an object to dump "+u)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function Y6e(t,e){var r=[],o=[],a,n;for(CT(t,r,o),a=0,n=o.length;a<n;a+=1)e.duplicates.push(r[o[a]]);e.usedDuplicates=new Array(n)}function CT(t,e,r){var o,a,n;if(t!==null&&typeof t=="object")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)CT(t[a],e,r);else for(o=Object.keys(t),a=0,n=o.length;a<n;a+=1)CT(t[o[a]],e,r)}function YK(t,e){e=e||{};var r=new R6e(e);return r.noRefs||Y6e(t,r),Xg(r,0,t,!0,!0)?r.dump+`
`:""}function W6e(t,e){return YK(t,$w.extend({schema:h6e},e))}IT.exports.dump=YK;IT.exports.safeDump=W6e});var VK=_((abt,ki)=>{"use strict";var zD=BK(),KK=WK();function JD(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}ki.exports.Type=os();ki.exports.Schema=Kg();ki.exports.FAILSAFE_SCHEMA=jD();ki.exports.JSON_SCHEMA=pT();ki.exports.CORE_SCHEMA=hT();ki.exports.DEFAULT_SAFE_SCHEMA=fy();ki.exports.DEFAULT_FULL_SCHEMA=Jw();ki.exports.load=zD.load;ki.exports.loadAll=zD.loadAll;ki.exports.safeLoad=zD.safeLoad;ki.exports.safeLoadAll=zD.safeLoadAll;ki.exports.dump=KK.dump;ki.exports.safeDump=KK.safeDump;ki.exports.YAMLException=uy();ki.exports.MINIMAL_SCHEMA=jD();ki.exports.SAFE_SCHEMA=fy();ki.exports.DEFAULT_SCHEMA=Jw();ki.exports.scan=JD("scan");ki.exports.parse=JD("parse");ki.exports.compose=JD("compose");ki.exports.addConstructor=JD("addConstructor")});var JK=_((lbt,zK)=>{"use strict";var K6e=VK();zK.exports=K6e});var ZK=_((cbt,XK)=>{"use strict";function V6e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Zg(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Zg)}V6e(Zg,Error);Zg.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var C="",I;for(I=0;I<h.parts.length;I++)C+=h.parts[I]instanceof Array?n(h.parts[I][0])+"-"+n(h.parts[I][1]):n(h.parts[I]);return"["+(h.inverted?"^":"")+C+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function n(h){return h.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function u(h){return r[h.type](h)}function A(h){var C=new Array(h.length),I,v;for(I=0;I<h.length;I++)C[I]=u(h[I]);if(C.sort(),C.length>0){for(I=1,v=1;I<C.length;I++)C[I-1]!==C[I]&&(C[v]=C[I],v++);C.length=v}switch(C.length){case 1:return C[0];case 2:return C[0]+" or "+C[1];default:return C.slice(0,-1).join(", ")+", or "+C[C.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function z6e(t,e){e=e!==void 0?e:{};var r={},o={Start:pu},a=pu,n=function($){return[].concat(...$)},u="-",A=Qn("-",!1),p=function($){return $},h=function($){return Object.assign({},...$)},C="#",I=Qn("#",!1),v=hc(),b=function(){return{}},E=":",F=Qn(":",!1),N=function($,me){return{[$]:me}},U=",",z=Qn(",",!1),te=function($,me){return me},le=function($,me,Ne){return Object.assign({},...[$].concat(me).map(ft=>({[ft]:Ne})))},pe=function($){return $},ue=function($){return $},ye=sa("correct indentation"),ae=" ",Ie=Qn(" ",!1),Fe=function($){return $.length===nr*It},g=function($){return $.length===(nr+1)*It},Ee=function(){return nr++,!0},De=function(){return nr--,!0},ce=function(){return DA()},ne=sa("pseudostring"),ee=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,we=hi(["\r",`
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),be=/^[^\r\n\t ,\][{}:#"']/,ht=hi(["\r",`
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),H=function(){return DA().replace(/^ *| *$/g,"")},lt="--",Te=Qn("--",!1),ke=/^[a-zA-Z\/0-9]/,xe=hi([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),He=/^[^\r\n\t :,]/,Re=hi(["\r",`
`," "," ",":",","],!0,!1),ze="null",je=Qn("null",!1),x=function(){return null},w="true",S=Qn("true",!1),y=function(){return!0},R="false",J=Qn("false",!1),X=function(){return!1},Z=sa("string"),ie='"',Pe=Qn('"',!1),Le=function(){return""},ot=function($){return $},dt=function($){return $.join("")},jt=/^[^"\\\0-\x1F\x7F]/,$t=hi(['"',"\\",["\0",""],"\x7F"],!0,!1),xt='\\"',an=Qn('\\"',!1),kr=function(){return'"'},mr="\\\\",xr=Qn("\\\\",!1),Wr=function(){return"\\"},Kn="\\/",Ns=Qn("\\/",!1),Ti=function(){return"/"},ps="\\b",io=Qn("\\b",!1),Si=function(){return"\b"},Os="\\f",so=Qn("\\f",!1),cc=function(){return"\f"},cu="\\n",op=Qn("\\n",!1),ap=function(){return`
`},Ms="\\r",Dn=Qn("\\r",!1),oo=function(){return"\r"},Us="\\t",ml=Qn("\\t",!1),yl=function(){return" "},ao="\\u",Vn=Qn("\\u",!1),On=function($,me,Ne,ft){return String.fromCharCode(parseInt(`0x${$}${me}${Ne}${ft}`))},Li=/^[0-9a-fA-F]/,Mn=hi([["0","9"],["a","f"],["A","F"]],!1,!1),_i=sa("blank space"),tr=/^[ \t]/,Oe=hi([" "," "],!1,!1),ii=sa("white space"),Ma=/^[ \t\n\r]/,hr=hi([" "," ",`
`,"\r"],!1,!1),uc=`\r
`,uu=Qn(`\r
`,!1),Ac=`
`,El=Qn(`
`,!1),vA="\r",Au=Qn("\r",!1),Ce=0,Rt=0,fc=[{line:1,column:1}],Hi=0,fu=[],Yt=0,Cl;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function DA(){return t.substring(Rt,Ce)}function lp(){return _o(Rt,Ce)}function pc($,me){throw me=me!==void 0?me:_o(Rt,Ce),gc([sa($)],t.substring(Rt,Ce),me)}function PA($,me){throw me=me!==void 0?me:_o(Rt,Ce),lo($,me)}function Qn($,me){return{type:"literal",text:$,ignoreCase:me}}function hi($,me,Ne){return{type:"class",parts:$,inverted:me,ignoreCase:Ne}}function hc(){return{type:"any"}}function SA(){return{type:"end"}}function sa($){return{type:"other",description:$}}function Ni($){var me=fc[$],Ne;if(me)return me;for(Ne=$-1;!fc[Ne];)Ne--;for(me=fc[Ne],me={line:me.line,column:me.column};Ne<$;)t.charCodeAt(Ne)===10?(me.line++,me.column=1):me.column++,Ne++;return fc[$]=me,me}function _o($,me){var Ne=Ni($),ft=Ni(me);return{start:{offset:$,line:Ne.line,column:Ne.column},end:{offset:me,line:ft.line,column:ft.column}}}function Ze($){Ce<Hi||(Ce>Hi&&(Hi=Ce,fu=[]),fu.push($))}function lo($,me){return new Zg($,null,null,me)}function gc($,me,Ne){return new Zg(Zg.buildMessage($,me),$,me,Ne)}function pu(){var $;return $=xA(),$}function ji(){var $,me,Ne;for($=Ce,me=[],Ne=hu();Ne!==r;)me.push(Ne),Ne=hu();return me!==r&&(Rt=$,me=n(me)),$=me,$}function hu(){var $,me,Ne,ft,pt;return $=Ce,me=hs(),me!==r?(t.charCodeAt(Ce)===45?(Ne=u,Ce++):(Ne=r,Yt===0&&Ze(A)),Ne!==r?(ft=Pn(),ft!==r?(pt=dc(),pt!==r?(Rt=$,me=p(pt),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$}function xA(){var $,me,Ne;for($=Ce,me=[],Ne=Ua();Ne!==r;)me.push(Ne),Ne=Ua();return me!==r&&(Rt=$,me=h(me)),$=me,$}function Ua(){var $,me,Ne,ft,pt,Tt,er,Zr,qi;if($=Ce,me=Pn(),me===r&&(me=null),me!==r){if(Ne=Ce,t.charCodeAt(Ce)===35?(ft=C,Ce++):(ft=r,Yt===0&&Ze(I)),ft!==r){if(pt=[],Tt=Ce,er=Ce,Yt++,Zr=tt(),Yt--,Zr===r?er=void 0:(Ce=er,er=r),er!==r?(t.length>Ce?(Zr=t.charAt(Ce),Ce++):(Zr=r,Yt===0&&Ze(v)),Zr!==r?(er=[er,Zr],Tt=er):(Ce=Tt,Tt=r)):(Ce=Tt,Tt=r),Tt!==r)for(;Tt!==r;)pt.push(Tt),Tt=Ce,er=Ce,Yt++,Zr=tt(),Yt--,Zr===r?er=void 0:(Ce=er,er=r),er!==r?(t.length>Ce?(Zr=t.charAt(Ce),Ce++):(Zr=r,Yt===0&&Ze(v)),Zr!==r?(er=[er,Zr],Tt=er):(Ce=Tt,Tt=r)):(Ce=Tt,Tt=r);else pt=r;pt!==r?(ft=[ft,pt],Ne=ft):(Ce=Ne,Ne=r)}else Ce=Ne,Ne=r;if(Ne===r&&(Ne=null),Ne!==r){if(ft=[],pt=We(),pt!==r)for(;pt!==r;)ft.push(pt),pt=We();else ft=r;ft!==r?(Rt=$,me=b(),$=me):(Ce=$,$=r)}else Ce=$,$=r}else Ce=$,$=r;if($===r&&($=Ce,me=hs(),me!==r?(Ne=oa(),Ne!==r?(ft=Pn(),ft===r&&(ft=null),ft!==r?(t.charCodeAt(Ce)===58?(pt=E,Ce++):(pt=r,Yt===0&&Ze(F)),pt!==r?(Tt=Pn(),Tt===r&&(Tt=null),Tt!==r?(er=dc(),er!==r?(Rt=$,me=N(Ne,er),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$===r&&($=Ce,me=hs(),me!==r?(Ne=co(),Ne!==r?(ft=Pn(),ft===r&&(ft=null),ft!==r?(t.charCodeAt(Ce)===58?(pt=E,Ce++):(pt=r,Yt===0&&Ze(F)),pt!==r?(Tt=Pn(),Tt===r&&(Tt=null),Tt!==r?(er=dc(),er!==r?(Rt=$,me=N(Ne,er),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$===r))){if($=Ce,me=hs(),me!==r)if(Ne=co(),Ne!==r)if(ft=Pn(),ft!==r)if(pt=aa(),pt!==r){if(Tt=[],er=We(),er!==r)for(;er!==r;)Tt.push(er),er=We();else Tt=r;Tt!==r?(Rt=$,me=N(Ne,pt),$=me):(Ce=$,$=r)}else Ce=$,$=r;else Ce=$,$=r;else Ce=$,$=r;else Ce=$,$=r;if($===r)if($=Ce,me=hs(),me!==r)if(Ne=co(),Ne!==r){if(ft=[],pt=Ce,Tt=Pn(),Tt===r&&(Tt=null),Tt!==r?(t.charCodeAt(Ce)===44?(er=U,Ce++):(er=r,Yt===0&&Ze(z)),er!==r?(Zr=Pn(),Zr===r&&(Zr=null),Zr!==r?(qi=co(),qi!==r?(Rt=pt,Tt=te(Ne,qi),pt=Tt):(Ce=pt,pt=r)):(Ce=pt,pt=r)):(Ce=pt,pt=r)):(Ce=pt,pt=r),pt!==r)for(;pt!==r;)ft.push(pt),pt=Ce,Tt=Pn(),Tt===r&&(Tt=null),Tt!==r?(t.charCodeAt(Ce)===44?(er=U,Ce++):(er=r,Yt===0&&Ze(z)),er!==r?(Zr=Pn(),Zr===r&&(Zr=null),Zr!==r?(qi=co(),qi!==r?(Rt=pt,Tt=te(Ne,qi),pt=Tt):(Ce=pt,pt=r)):(Ce=pt,pt=r)):(Ce=pt,pt=r)):(Ce=pt,pt=r);else ft=r;ft!==r?(pt=Pn(),pt===r&&(pt=null),pt!==r?(t.charCodeAt(Ce)===58?(Tt=E,Ce++):(Tt=r,Yt===0&&Ze(F)),Tt!==r?(er=Pn(),er===r&&(er=null),er!==r?(Zr=dc(),Zr!==r?(Rt=$,me=le(Ne,ft,Zr),$=me):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r
`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()}
`;if(typeof t=="string")return`${eV(t)}
`;if(Array.isArray(t)){if(t.length===0)return`[]
`;let o=" ".repeat(e);return`
${t.map(n=>`${o}- ${BT(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[o,a]=t instanceof XD?[t.data,!1]:[t,!0],n=" ".repeat(e),u=Object.keys(o);a&&u.sort((p,h)=>{let C=$K.indexOf(p),I=$K.indexOf(h);return C===-1&&I===-1?p<h?-1:p>h?1:0:C!==-1&&I===-1?-1:C===-1&&I!==-1?1:C-I});let A=u.filter(p=>!rV(o[p])).map((p,h)=>{let C=o[p],I=eV(p),v=BT(C,e+1,!0),b=h>0||r?n:"",E=I.length>1024?`? ${I}
${b}:`:`${I}:`,F=v.startsWith(`
`)?v:` ${v}`;return`${b}${E}${F}`}).join(e===0?`
`:"")||`
`;return r?`
${A}`:`${A}`}throw new Error(`Unsupported value type (${t})`)}function Ba(t){try{let e=BT(t,0,!1);return e!==`
`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function X6e(t){return t.endsWith(`
`)||(t+=`
`),(0,tV.parse)(t)}function $6e(t){if(Z6e.test(t))return X6e(t);let e=(0,ZD.safeLoad)(t,{schema:ZD.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return e}function Ki(t){return $6e(t)}var ZD,tV,J6e,$K,XD,Z6e,nV=yt(()=>{ZD=$e(JK()),tV=$e(ZK()),J6e=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,$K=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],XD=class{constructor(e){this.data=e}};Ba.PreserveOrdering=XD;Z6e=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var tI={};Vt(tI,{parseResolution:()=>UD,parseShell:()=>ND,parseSyml:()=>Ki,stringifyArgument:()=>cT,stringifyArgumentSegment:()=>uT,stringifyArithmeticExpression:()=>MD,stringifyCommand:()=>lT,stringifyCommandChain:()=>cy,stringifyCommandChainThen:()=>aT,stringifyCommandLine:()=>OD,stringifyCommandLineThen:()=>oT,stringifyEnvSegment:()=>LD,stringifyRedirectArgument:()=>Vw,stringifyResolution:()=>_D,stringifyShell:()=>ly,stringifyShellLine:()=>ly,stringifySyml:()=>Ba,stringifyValueArgument:()=>qg});var Ll=yt(()=>{rW();oW();nV()});var sV=_((hbt,vT)=>{"use strict";var eje=t=>{let e=!1,r=!1,o=!1;for(let a=0;a<t.length;a++){let n=t[a];e&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(t=t.slice(0,a)+"-"+t.slice(a),e=!1,o=r,r=!0,a++):r&&o&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,a-1)+"-"+t.slice(a-1),o=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,o=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},iV=(t,e)=>{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let r=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=eje(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(t))};vT.exports=iV;vT.exports.default=iV});var oV=_((gbt,tje)=>{tje.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",e
${this.candidates.map(({usage:a})=>`$ ${a}`).join(`
`)}`}else if(this.candidates.length===1){let[{usage:o}]=this.candidates;this.message=`Command not found; did you mean:
$ ${o}
${xT(e)}`}else this.message=`Command not found; did you mean one of:
${this.candidates.map(({usage:o},a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
`)}
${xT(e)}`}},tP=class extends Error{constructor(e,r){super(),this.input=e,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives:
${this.usages.map((o,a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
`)}
${xT(e)}`}},xT=t=>`While running ${t.filter(e=>e!==Hn.EndOfInput&&e!==Hn.EndOfPartialInput).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function rje(t){let e=t.split(`
`),r=e.filter(a=>a.match(/\S/)),o=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(o).trimRight()).join(`
`)}function Do(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,`
`),t=rje(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
`),t=t.replace(/\n(\n)?\n*/g,(o,a)=>a||" "),r&&(t=t.split(/\n/).map(o=>{let a=o.match(/^\s*[*-][\t ]+(.*)/);if(!a)return o.match(/(.{1,80})(?: |$)/g).join(`
`);let n=o.length-o.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((u,A)=>" ".repeat(n)+(A===0?"- ":" ")+u).join(`
`)}).join(`
`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(o,a,n)=>e.code(a+n+a)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(o,a,n)=>e.bold(a+n+a)),t?`${t}
`:""}var bT,uV,AV,kT=yt(()=>{bT=Array(80).fill("\u2501");for(let t=0;t<=24;++t)bT[bT.length-t]=`\x1B[38;5;${232+t}m\u2501`;uV={header:t=>`\x1B[1m\u2501\u2501\u2501 ${t}${t.length<80-5?` ${bT.slice(t.length+5).join("")}`:":"}\x1B[0m`,bold:t=>`\x1B[1m${t}\x1B[22m`,error:t=>`\x1B[31m\x1B[1m${t}\x1B[22m\x1B[39m`,code:t=>`\x1B[36m${t}\x1B[39m`},AV={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function Ko(t){return{...t,[rI]:!0}}function qu(t,e){return typeof t>"u"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function nP(t,{mergeName:e=!1}={}){let r=t.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,o,a]=r;return e&&(a=a[0].toLowerCase()+a.slice(1)),a=o!=="."||!e?`${o.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function nI(t,e){return e.length===1?new it(`${t}${nP(e[0],{mergeName:!0})}`):new it(`${t}:
${e.map(r=>`
- ${nP(r)}`).join("")}`)}function td(t,e,r){if(typeof r>"u")return e;let o=[],a=[],n=A=>{let p=e;return e=A,n.bind(null,p)};if(!r(e,{errors:o,coercions:a,coercion:n}))throw nI(`Invalid value for ${t}`,o);for(let[,A]of a)A();return e}var rI,yf=yt(()=>{rP();rI=Symbol("clipanion/isOption")});var Vo={};Vt(Vo,{KeyRelationship:()=>Gu,TypeAssertionError:()=>Yp,applyCascade:()=>rd,as:()=>wje,assert:()=>yje,assertWithErrors:()=>Eje,cascade:()=>mV,fn:()=>Ije,hasAtLeastOneKey:()=>OT,hasExactLength:()=>dV,hasForbiddenKeys:()=>Hje,hasKeyRelationship:()=>aI,hasMaxLength:()=>vje,hasMinLength:()=>Bje,hasMutuallyExclusiveKeys:()=>jje,hasRequiredKeys:()=>_je,hasUniqueItems:()=>Dje,isArray:()=>iP,isAtLeast:()=>LT,isAtMost:()=>xje,isBase64:()=>Nje,isBoolean:()=>uje,isDate:()=>fje,isDict:()=>gje,isEnum:()=>Vs,isHexColor:()=>Lje,isISO8601:()=>Tje,isInExclusiveRange:()=>kje,isInInclusiveRange:()=>bje,isInstanceOf:()=>mje,isInteger:()=>NT,isJSON:()=>Oje,isLiteral:()=>pV,isLowerCase:()=>Qje,isMap:()=>hje,isNegative:()=>Pje,isNullable:()=>Uje,isNumber:()=>RT,isObject:()=>hV,isOneOf:()=>TT,isOptional:()=>Mje,isPartial:()=>dje,isPayload:()=>Aje,isPositive:()=>Sje,isRecord:()=>oP,isSet:()=>pje,isString:()=>Ey,isTuple:()=>sP,isUUID4:()=>Rje,isUnknown:()=>FT,isUpperCase:()=>Fje,makeTrait:()=>gV,makeValidator:()=>Hr,matchesRegExp:()=>sI,softAssert:()=>Cje});function jn(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":typeof t=="symbol"?`<${t.toString()}>`:Array.isArray(t)?"an array":JSON.stringify(t)}function yy(t,e){if(t.length===0)return"nothing";if(t.length===1)return jn(t[0]);let r=t.slice(0,-1),o=t[t.length-1],a=t.length>2?`, ${e} `:` ${e} `;return`${r.map(n=>jn(n)).join(", ")}${a}${jn(o)}`}function Gp(t,e){var r,o,a;return typeof e=="number"?`${(r=t?.p)!==null&&r!==void 0?r:"."}[${e}]`:nje.test(e)?`${(o=t?.p)!==null&&o!==void 0?o:""}.${e}`:`${(a=t?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(e)}]`}function QT(t,e,r){return t===1?e:r}function pr({errors:t,p:e}={},r){return t?.push(`${e??"."}: ${r}`),!1}function lje(t,e){return r=>{t[e]=r}}function Yu(t,e){return r=>{let o=t[e];return t[e]=r,Yu(t,e).bind(null,o)}}function iI(t,e,r){let o=()=>(t(r()),a),a=()=>(t(e),o);return o}function FT(){return Hr({test:(t,e)=>!0})}function pV(t){return Hr({test:(e,r)=>e!==t?pr(r,`Expected ${jn(t)} (got ${jn(e)})`):!0})}function Ey(){return Hr({test:(t,e)=>typeof t!="string"?pr(e,`Expected a string (got ${jn(t)})`):!0})}function Vs(t){let e=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeof a=="string"||typeof a=="number"),o=new Set(e);return o.size===1?pV([...o][0]):Hr({test:(a,n)=>o.has(a)?!0:r?pr(n,`Expected one of ${yy(e,"or")} (got ${jn(a)})`):pr(n,`Expected a valid enumeration value (got ${jn(a)})`)})}function uje(){return Hr({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return pr(e,"Unbound coercion result");let o=cje.get(t);if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return pr(e,`Expected a boolean (got ${jn(t)})`)}return!0}})}function RT(){return Hr({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return pr(e,"Unbound coercion result");let o;if(typeof t=="string"){let a;try{a=JSON.parse(t)}catch{}if(typeof a=="number")if(JSON.stringify(a)===t)o=a;else return pr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return pr(e,`Expected a number (got ${jn(t)})`)}return!0}})}function Aje(t){return Hr({test:(e,r)=>{var o;if(typeof r?.coercions>"u")return pr(r,"The isPayload predicate can only be used with coercion enabled");if(typeof r.coercion>"u")return pr(r,"Unbound coercion result");if(typeof e!="string")return pr(r,`Expected a string (got ${jn(e)})`);let a;try{a=JSON.parse(e)}catch{return pr(r,`Expected a JSON string (got ${jn(e)})`)}let n={value:a};return t(a,Object.assign(Object.assign({},r),{coercion:Yu(n,"value")}))?(r.coercions.push([
`;for(let o of e)r+=`
- ${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"})(Gu||(Gu={}));qje={[Gu.Forbids]:{expect:!1,message:"forbids using"},[Gu.Requires]:{expect:!0,message:"requires using"}}});var nt,Wp=yt(()=>{yf();nt=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(()=>(Za(),Vo)),A=u(a(n()),r),p=[],h=[];if(!A(this,{errors:p,coercions:h}))throw nI("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}};nt.isOption=rI;nt.Default=[]});function va(t){ST&&console.log(t)}function EV(){let t={nodes:[]};for(let e=0;e<cn.CustomNode;++e)t.nodes.push($a());return t}function Gje(t){let e=EV(),r=[],o=e.nodes.length;for(let a of t){r.push(o);for(let n=0;n<a.nodes.length;++n)wV(n)||e.nodes.push(Zje(a.nodes[n],o));o+=a.nodes.length-cn.CustomNode+1}for(let a of r)Cy(e,cn.InitialNode,a);return e}function Oc(t,e){return t.nodes.push(e),t.nodes.length-1}function Yje(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 C=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let I of h)C.some(({to:v})=>I.to===v)||C.push(I)}for(let[p,h]of A.dynamics)a.dynamics.some(([C,{to:I}])=>p===C&&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(cn.InitialNode)}function Wje(t,{prefix:e=""}={}){if(ST){va(`${e}Nodes are:`);for(let r=0;r<t.nodes.length;++r)va(`${e} ${r}: ${JSON.stringify(t.nodes[r])}`)}}function Kje(t,e,r=!1){va(`Running a vm on ${JSON.stringify(e)}`);let o=[{node:cn.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];Wje(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:C,state:I}of o){va(` Current node is ${C}`);let v=t.nodes[C];if(C===cn.ErrorNode){h.push({node:C,state:I});continue}console.assert(v.shortcuts.length===0,"Shortcuts should have been eliminated by now");let b=Object.prototype.hasOwnProperty.call(v.statics,u);if(!r||n<a.length-1||b)if(b){let E=v.statics[u];for(let{to:F,reducer:N}of E)h.push({node:F,state:typeof N<"u"?aP(UT,N,I,u,p):I}),va(` Static transition to ${F} found`)}else va(" No static transition found");else{let E=!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"?aP(UT,U,I,u,p):I}),va(` Static transition to ${N} found`);else for(let{to:N}of v.statics[F])h.push({node:N,state:{...I,remainder:F.slice(u.length)}}),va(` Static transition to ${N} found (partial match)`);E=!0}E||va(" No partial static transition found")}if(!A)for(let[E,{to:F,reducer:N}]of v.dynamics)aP($je,E,I,u,p)&&(h.push({node:F,state:typeof N<"u"?aP(UT,N,I,u,p):I}),va(` Dynamic transition to ${F} found (via ${E})`))}if(h.length===0&&A&&e.length===1)return[{node:cn.InitialNode,state:yV}];if(h.length===0)throw new my(e,o.filter(({node:C})=>C!==cn.ErrorNode).map(({state:C})=>({usage:C.candidateUsage,reason:null})));if(h.every(({node:C})=>C===cn.ErrorNode))throw new my(e,h.map(({state:C})=>({usage:C.candidateUsage,reason:C.errorMessage})));o=zje(h)}if(o.length>0){va(" Results:");for(let n of o)va(` - ${n.node} -> ${JSON.stringify(n.state)}`)}els
`),this.context.stdout.write(`
`);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(`
`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.
`)}}}});async function bV(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=QV(t);return as.from(r,e).runExit(o,a)}async function kV(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=QV(t);return as.from(r,e).run(o,a)}function QV(t){let e,r,o,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(o=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof nt||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?o=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],o=t[2]):t[0]&&t[0].prototype instanceof nt||Array.isArray(t[0])?(r=t[0],o=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],o=t[2],a=t[3];break}if(typeof o>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}}function xV(t){return t()}var SV,as,FV=yt(()=>{eP();lP();kT();DV();Wp();PV();SV=Symbol("clipanion/errorCommand");as=class{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:o,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new wy({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=o,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let o=new as(r),a=Array.isArray(e)?e:[e];for(let n of a)o.register(n);return o}register(e){var r;let o=new Map,a=new e;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[nt.isOption]&&o.set(p,h)}let n=this.builder.command(),u=n.cliIndex,A=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof A<"u")for(let p of A)n.addPath(p);this.registrations.set(e,{specs:o,builder:n,index:u});for(let[p,{definition:h}]of o.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{input:o,context:a,partial:n}=typeof e=="object"&&Array.isArray(e)?{input:e,context:r}:e,{contexts:u,process:A}=this.builder.compile(),p=A(o,{partial:n}),h={...as.defaultContext,...a};switch(p.selectedIndex){case ed:{let C=Iy.from(p,u);return C.context=h,C.tokens=p.tokens,C}default:{let{commandClass:C}=u[p.selectedIndex],I=this.registrations.get(C);if(typeof I>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let v=new C;v.context=h,v.tokens=p.tokens,v.path=p.path;try{for(let[b,{transformer:E}]of I.specs.entries())v[b]=E(I.builder,b,p,h);return v}catch(b){throw b[SV]=v,b}}break}}async run(e,r){var o,a;let n,u={...as.defaultContext,...r},A=(o=this.enableColors)!==null&&o!==void 0?o:u.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,u)}catch(C){return u.stdout.write(this.error(C,{colored:A})),1}if(n.help)return u.stdout.write(this.usage(n,{colored:A,detailed:!0})),0;n.context=u,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:C=>this.definition(C),error:(C,I)=>this.error(C,I),format:C=>this.format(C),process:(C,I)=>this.process(C,{...u,...I}),run:(C,I)=>this.run(C,{...u,...I}),usage:(C,I)=>this.usage(C,I)};let p=this.enableCapture&&(a=vV(u))!==null&&a!==void 0?a:xV,h;try{h=await p(()=>n.validateAndExecute().catch(C=>n.catch(C).then(()=>0)))}catch(C){return u.stdout.write(this.error(C,{colored:A,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}definition(e,{colored:r=!1}={}){if(!e.usage)return null;let{usage:o}=this.getUsageByRegistration(e,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(e,{detailed:!0,inlineOptions:!1}),u=typeof e.usage.category<"u"?Do(e.usage.category,{format:this.format(r),paragraphs:!1}):void 0,A=typeof e.usage.description<"u"?Do(e.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof e.usage.details<"u"?Do(e.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof e.usage.examples<"u"?e.usage.examples.map(([C,I])=>[Do(C,{format:this.format(r),paragraphs:!1}),I.replace(/\$0/g,this.binaryName)]):void 0;return
`),(h!==""||C.length>0)&&(A+=`${this.format(r).header("Usage")}
`,A+=`
`);let{usage:I,options:v}=this.getUsageByRegistration(u,{inlineOptions:!1});if(A+=`${this.format(r).bold(a)}${I}
`,v.length>0){A+=`
`,A+=`${this.format(r).header("Options")}
`;let b=v.reduce((E,F)=>Math.max(E,F.definition.length),0);A+=`
`;for(let{definition:E,description:F}of v)A+=` ${this.format(r).bold(E.padEnd(b))} ${Do(F,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(A+=`
`,A+=`${this.format(r).header("Details")}
`,A+=`
`,A+=Do(h,{format:this.format(r),paragraphs:!0})),C.length>0){A+=`
`,A+=`${this.format(r).header("Examples")}
`;for(let[b,E]of C)A+=`
`,A+=Do(b,{format:this.format(r),paragraphs:!1}),A+=`${E.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)}
`}}else{let{usage:p}=this.getUsageByRegistration(u);A+=`${this.format(r).bold(a)}${p}
`}else{let p=new Map;for(let[v,{index:b}]of this.registrations.entries()){if(typeof v.usage>"u")continue;let E=typeof v.usage.category<"u"?Do(v.usage.category,{format:this.format(r),paragraphs:!1}):null,F=p.get(E);typeof F>"u"&&p.set(E,F=[]);let{usage:N}=this.getUsageByIndex(b);F.push({commandClass:v,usage:N})}let h=Array.from(p.keys()).sort((v,b)=>v===null?-1:b===null?1:v.localeCompare(b,"en",{usage:"sort",caseFirst:"upper"})),C=typeof this.binaryLabel<"u",I=typeof this.binaryVersion<"u";C||I?(C&&I?A+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
`:C?A+=`${this.format(r).header(`${this.binaryLabel}`)}
`:A+=`${this.format(r).header(`${this.binaryVersion}`)}
`,A+=` ${this.format(r).bold(a)}${this.binaryName} <command>
`):A+=`${this.format(r).bold(a)}${this.binaryName} <command>
`;for(let v of h){let b=p.get(v).slice().sort((F,N)=>F.usage.localeCompare(N.usage,"en",{usage:"sort",caseFirst:"upper"})),E=v!==null?v.trim():"General commands";A+=`
`,A+=`${this.format(r).header(`${E}`)}
`;for(let{commandClass:F,usage:N}of b){let U=F.usage.description||"undocumented";A+=`
`,A+=` ${this.format(r).bold(N)}
`,A+=` ${Do(U,{format:this.format(r),paragraphs:!1})}`}}A+=`
`,A+=Do("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[SV])!==null&&o!==void 0?o:null}=r===void 0?{}:r;(!e||typeof e!="object"||!("stack"in e))&&(e=new Error(`Execution failed with a non-error rejection (rejected value: ${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}
`;let p=e.clipanion;return typeof p<"u"?p.type==="usage"&&(u+=`
`,u+=this.usage(n)):e.stack&&(u+=`${e.stack.replace(/^.*\n/,"")}
`),u}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:as.defaultContext.colorDepth>1)?uV:AV}getUsageByRegistration(e,r){let o=this.registrations.get(e);if(typeof o>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(o.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};as.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:BV()}});var lI,RV=yt(()=>{Wp();lI=class extends nt{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
`)}};lI.paths=[["--clipanion=definitions"]]});var cI,TV=yt(()=>{Wp();cI=class extends nt{async execute(){this.context.stdout.write(this.cli.usage())}};cI.paths=[["-h"],["--help"]]});function uP(t={}){return Ko({definition(e,r){var o;e.addProxy({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){return o.positionals.map(({value:a})=>a)}})}var HT=yt(()=>{yf()});var uI,LV=yt(()=>{Wp();HT();uI=class extends nt{constructor(){super(...arguments),this.args=uP()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)}
`)}};uI.paths=[["--clipanion=tokens"]]});var AI,NV=yt(()=>{Wp();AI=class extends nt{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:"<unknown>"}
`)}};AI.paths=[["-v"],["--version"]]});var jT={};Vt(jT,{DefinitionsCommand:()=>lI,HelpCommand:()=>cI,TokensCommand:()=>uI,VersionCommand:()=>AI});var OV=yt(()=>{RV();TV();LV();NV()});function MV(t,e,r){let[o,a]=qu(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Ko({definition(p){p.addOption({names:u,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,C){let I,v=typeof o<"u"?[...o]:void 0;for(let{name:b,value:E}of C.options)!A.has(b)||(I=b,v=v??[],v.push(E));return typeof v<"u"?td(I??h,v,a.validator):v}})}var UV=yt(()=>{yf()});function _V(t,e,r){let[o,a]=qu(e,r??{}),n=t.split(","),u=new Set(n);return Ko({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let C=o;for(let{name:I,value:v}of h.options)!u.has(I)||(C=v);return C}})}var HV=yt(()=>{yf()});function jV(t,e,r){let[o,a]=qu(e,r??{}),n=t.split(","),u=new Set(n);return Ko({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let C=o;for(let{name:I,value:v}of h.options)!u.has(I)||(C??(C=0),v?C+=1:C=0);return C}})}var qV=yt(()=>{yf()});function GV(t={}){return Ko({definition(e,r){var o;e.addRest({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){let a=u=>{let A=o.positionals[u];return A.extra===el||A.extra===!1&&u<e.arity.leading.length},n=0;for(;n<o.positionals.length&&a(n);)n+=1;return o.positionals.splice(0,n).map(({value:u})=>u)}})}var YV=yt(()=>{lP();yf()});function eqe(t,e,r){let[o,a]=qu(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Ko({definition(p){p.addOption({names:u,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,C,I){let v,b=o;typeof a.env<"u"&&I.env[a.env]&&(v=a.env,b=I.env[a.env]);for(let{name:E,value:F}of C.options)!A.has(E)||(v=E,b=F);return typeof b=="string"?td(v??h,b,a.validator):b}})}function tqe(t={}){let{required:e=!0}=t;return Ko({definition(r,o){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:o,required:t.required})},transformer(r,o,a){var n;for(let u=0;u<a.positionals.length;++u){if(a.positionals[u].extra===el||e&&a.positionals[u].extra===!0||!e&&a.positionals[u].extra===!1)continue;let[A]=a.positionals.splice(u,1);return td((n=t.name)!==null&&n!==void 0?n:o,A.value,t.validator)}}})}function WV(t,...e){return typeof t=="string"?eqe(t,...e):tqe(t)}var KV=yt(()=>{lP();yf()});var ge={};Vt(ge,{Array:()=>MV,Boolean:()=>_V,Counter:()=>jV,Proxy:()=>uP,Rest:()=>GV,String:()=>WV,applyValidator:()=>td,cleanValidationError:()=>nP,formatError:()=>nI,isOptionSymbol:()=>rI,makeCommandOption:()=>Ko,rerouteArguments:()=>qu});var VV=yt(()=>{yf();HT();UV();HV();qV();YV();KV()});var fI={};Vt(fI,{Builtins:()=>jT,Cli:()=>as,Command:()=>nt,Option:()=>ge,UsageError:()=>it,formatMarkdownish:()=>Do,run:()=>kV,runExit:()=>bV});var qt=yt(()=>{rP();kT();Wp();FV();OV();VV()});var zV=_((Ikt,rqe)=>{rqe.exports={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"
`);let o;for(;(o=oqe.exec(r))!=null;){let a=o[1],n=o[2]||"";n=n.trim();let u=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),u==='"'&&(n=n.replace(/\\n/g,`
`),n=n.replace(/\\r/g,"\r")),e[a]=n}return e}function lqe(t){let e=ZV(t),r=xs.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);let o=XV(t).split(","),a=o.length,n;for(let u=0;u<a;u++)try{let A=o[u].trim(),p=Aqe(r,A);n=xs.decrypt(p.ciphertext,p.key);break}catch(A){if(u+1>=a)throw A}return xs.parse(n)}function cqe(t){console.log(`[dotenv@${YT}][INFO] ${t}`)}function uqe(t){console.log(`[dotenv@${YT}][WARN] ${t}`)}function qT(t){console.log(`[dotenv@${YT}][DEBUG] ${t}`)}function XV(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 Aqe(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: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:u,key:o}}function ZV(t){let e=GT.resolve(process.cwd(),".env");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(".vault")?e:`${e}.vault`}function fqe(t){return t[0]==="~"?GT.join(nqe.homedir(),t.slice(1)):t}function pqe(t){cqe("Loading env from encrypted .env.vault");let e=xs._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),xs.populate(r,e,t),{parsed:e}}function hqe(t){let e=GT.resolve(process.cwd(),".env"),r="utf8",o=Boolean(t&&t.debug);t&&(t.path!=null&&(e=fqe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=xs.parse(JV.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),xs.populate(n,a,t),{parsed:a}}catch(a){return o&&qT(`Failed to load ${e} ${a.message}`),{error:a}}}function gqe(t){let e=ZV(t);return XV(t).length===0?xs.configDotenv(t):JV.existsSync(e)?xs._configVault(t):(uqe(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),xs.configDotenv(t))}function dqe(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=iqe.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 C="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(C)}else if(h){let C="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(C)}else throw console.error("Error: ",u.code),console.error("Error: ",u.message),u}}function mqe(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&&qT(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):t[n]=e[n]}var xs={configDotenv:hqe,_configVault:pqe,_parseVault:lqe,config:gqe,decrypt:dqe,parse:aqe,populate:mqe};Ef.exports.configDotenv=xs.configDotenv;Ef.exports._configVault=xs._configVault;Ef.exports._parseVault=xs._parseVault;Ef.exports.config=xs.config;Ef.exports.decrypt=xs.decrypt;Ef.exports.parse=xs.parse;Ef.exports.populate=xs.populate;Ef.exports=xs});var tz=_((vkt,ez)=>{"use strict";ez.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var nd=_((Dkt,WT)=>{"use strict";var yqe=tz(),rz=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 C=yqe(A,...h);p(C),C.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","(",")","!","|","&","^"],!0,!1),ue=function(Z){return e.queryPattern.test(Z)},ye=function(Z){return e.checkFn(Z)},ae=Re("whitespace"),Ie=/^[ \t\n\r]/,Fe=ke([" "," ",`
`,"\r"],!1,!1),g=0,Ee=0,De=[{line:1,column:1}],ce=0,ne=[],ee=0,we;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function be(){return t.substring(Ee,g)}function ht(){return je(Ee,g)}function H(Z,ie){throw ie=ie!==void 0?ie:je(Ee,g),S([Re(Z)],t.substring(Ee,g),ie)}function lt(Z,ie){throw ie=ie!==void 0?ie:je(Ee,g),w(Z,ie)}function Te(Z,ie){return{type:"literal",text:Z,ignoreCase:ie}}function ke(Z,ie,Pe){return{type:"class",parts:Z,inverted:ie,ignoreCase:Pe}}function xe(){return{type:"any"}}function He(){return{type:"end"}}function Re(Z){return{type:"other",description:Z}}function ze(Z){var ie=De[Z],Pe;if(ie)return ie;for(Pe=Z-1;!De[Pe];)Pe--;for(ie=De[Pe],ie={line:ie.line,column:ie.column};Pe<Z;)t.charCodeAt(Pe)===10?(ie.line++,ie.column=1):ie.column++,Pe++;return De[Z]=ie,ie}function je(Z,ie){var Pe=ze(Z),Le=ze(ie);return{start:{offset:Z,line:Pe.line,column:Pe.column},end:{offset:ie,line:Le.line,column:Le.column}}}function x(Z){g<ce||(g>ce&&(ce=g,ne=[]),ne.push(Z))}function w(Z,ie){return new cd(Z,null,null,ie)}function S(Z,ie,Pe){return new cd(cd.buildMessage(Z,ie),Z,ie,Pe)}function y(){var Z,ie,Pe,Le,ot,dt,jt,$t;if(Z=g,ie=R(),ie!==r){for(Pe=[],Le=g,ot=X(),ot!==r?(t.charCodeAt(g)===124?(dt=n,g++):(dt=r,ee===0&&x(u)),dt===r&&(t.charCodeAt(g)===38?(dt=A,g++):(dt=r,ee===0&&x(p)),dt===r&&(t.charCodeAt(g)===94?(dt=h,g++):(dt=r,ee===0&&x(C)))),dt!==r?(jt=X(),jt!==r?($t=R(),$t!==r?(ot=[ot,dt,jt,$t],Le=ot):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r);Le!==r;)Pe.push(Le),Le=g,ot=X(),ot!==r?(t.charCodeAt(g)===124?(dt=n,g++):(dt=r,ee===0&&x(u)),dt===r&&(t.charCodeAt(g)===38?(dt=A,g++):(dt=r,ee===0&&x(p)),dt===r&&(t.charCodeAt(g)===94?(dt=h,g++):(dt=r,ee===0&&x(C)))),dt!==r?(jt=X(),jt!==r?($t=R(),$t!==r?(ot=[ot,dt,jt,$t],Le=ot):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r);Pe!==r?(Ee=Z,ie=I(ie,Pe),Z=ie):(g=Z,Z=r)}else g=Z,Z=r;return Z}function R(){var Z,ie,Pe,Le,ot,dt;return Z=g,t.charCodeAt(g)===33?(ie=v,g++):(ie=r,ee===0&&x(b)),ie!==r?(Pe=R(),Pe!==r?(Ee=Z,ie=E(Pe),Z=ie):(g=Z,Z=r)):(g=Z,Z=r),Z===r&&(Z=g,t.charCodeAt(g)===40?(ie=F,g++):(ie=r,ee===0&&x(N)),ie!==r?(Pe=X(),Pe!==r?(Le=y(),Le!==r?(ot=X(),ot!==r?(t.charCodeAt(g)===41?(dt=U,g++):(dt=r,ee===0&&x(z)),dt!==r?(Ee=Z,ie=te(Le),Z=ie):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r),Z===r&&(Z=J())),Z}function J(){var Z,ie,Pe,Le,ot;if(Z=g,ie=X(),ie!==r){if(Pe=g,Le=[],le.test(t.charAt(g))?(ot=t.charAt(g),g++):(ot=r,ee===0&&x(pe)),ot!==r)for(;ot!==r;)Le.push(ot),le.test(t.charAt(g))?(ot=t.charAt(g),g++):(ot=r,ee===0&&x(pe));else Le=r;Le!==r?Pe=t.substring(Pe,g):Pe=Le,Pe!==r?(Ee=g,Le=ue(Pe),Le?Le=void 0:Le=r,Le!==r?(Ee=Z,ie=ye(Pe),Z=ie):(g=Z,Z=r)):(g=Z,Z=r)}else g=Z,Z=r;return Z}function X(){var Z,ie;for(ee++,Z=[],Ie.test(t.charAt(g))?(ie=t.charAt(g),g++):(ie=r,ee===0&&x(Fe));ie!==r;)Z.push(ie),Ie.test(t.charAt(g))?(ie=t.charAt(g),g++):(ie=r,ee===0&&x(Fe));return ee--,Z===r&&(ie=r,ee===0&&x(ae)),Z}if(we=a(),we!==r&&g===t.length)return we;throw we!==r&&g<t.length&&x(He()),S(ne,ce<t.length?t.charAt(ce):null,ce<t.length?je(ce,ce+1):je(ce,ce))}$J.exports={SyntaxError:cd,parse:m9e}});var tX=_(DP=>{var{parse:y9e}=eX();DP.makeParser=(t=/[a-z]+/)=>(e,r)=>y9e(e,{queryPattern:t,checkFn:r});DP.parse=DP.makeParser()});var nX=_((wQt,rX)=>{"use strict";rX.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122
`:`
`)+r,a=o+1,o=t.indexOf(`
`,a)}while(o!==-1);return n+=t.substr(a),n};EX.exports={stringReplaceAll:Q9e,stringEncaseCRLFWithFirstIndex:F9e}});var DX=_((bQt,vX)=>{"use strict";var R9e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,wX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,T9e=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,L9e=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,N9e=new Map([["n",`
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function BX(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)):N9e.get(t)||t}function O9e(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(T9e))r.push(a[2].replace(L9e,(A,p,h)=>p?BX(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function M9e(t){wX.lastIndex=0;let e=[],r;for(;(r=wX.exec(t))!==null;){let o=r[1];if(r[2]){let a=O9e(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function IX(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(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}vX.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(R9e,(n,u,A,p,h,C)=>{if(u)a.push(BX(u));else if(p){let I=a.join("");a=[],o.push(r.length===0?I:IX(t,r)(I)),r.push({inverse:A,styles:M9e(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(IX(t,r)(a.join(""))),a=[],r.pop()}else a.push(C)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var IL=_((kQt,bX)=>{"use strict";var vI=BI(),{stdout:yL,stderr:EL}=dL(),{stringReplaceAll:U9e,stringEncaseCRLFWithFirstIndex:_9e}=CX(),PX=["ansi","ansi","ansi256","ansi16m"],Qy=Object.create(null),H9e=(t,e={})=>{if(e.level>3||e.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let r=yL?yL.level:0;t.level=e.level===void 0?r:e.level},CL=class{constructor(e){return SX(e)}},SX=t=>{let e={};return H9e(e,t),e.template=(...r)=>G9e(e.template,...r),Object.setPrototypeOf(e,xP.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=CL,e.template};function xP(t){return SX(t)}for(let[t,e]of Object.entries(vI))Qy[t]={get(){let r=bP(this,wL(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Qy.visible={get(){let t=bP(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var xX=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of xX)Qy[t]={get(){let{level:e}=this;return function(...r){let o=wL(vI.color[PX[e]][t](...r),vI.color.close,this._styler);return bP(this,o,this._isEmpty)}}};for(let t of xX){let e="bg"+t[0].toUpperCase()+t.slice(1);Qy[e]={get(){let{level:r}=this;return function(...o){let a=wL(vI.bgColor[PX[r]][t](...o),vI.bgColor.close,this._styler);return bP(this,a,this._isEmpty)}}}}var j9e=Object.defineProperties(()=>{},{...Qy,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),wL=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},bP=(t,e,r)=>{let o=(...a)=>q9e(o,a.length===1?""+a[0]:a.join(" "));return o.__proto__=j9e,o._generator=t,o._styler=e,o._isEmpty=r,o},q9e=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=U9e(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
`);return n!==-1&&(e=_9e(e,a,o,n)),o+e+a},mL,G9e=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return mL===void 0&&(mL=DX()),mL(t,a.join(""))};Object.defineProperties(xP.prototype,Qy);var DI=xP();DI.supportsColor=yL;DI.stderr=xP({level:EL?EL.level:0});DI.stderr.supportsColor=EL;DI.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};bX.exports=DI});var kP=_(Ul=>{"use strict";Ul.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Ul.find=(t,e)=>t.nodes.find(r=>r.type===e);Ul.exceedsLimit=(t,e,r=1,o)=>o===!1||!Ul.isInteger(t)||!Ul.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=o;Ul.escapeNode=(t,e=0,r)=>{let o=t.nodes[e];!o||(r&&o.type===r||o.type==="open"||o.type==="close")&&o.escaped!==!0&&(o.value="\\"+o.value,o.escaped=!0)};Ul.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;Ul.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Ul.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Ul.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Ul.flatten=(...t)=>{let e=[],r=o=>{for(let a=0;a<o.length;a++){let n=o[a];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var QP=_((FQt,QX)=>{"use strict";var kX=kP();QX.exports=(t,e={})=>{let r=(o,a={})=>{let n=e.escapeInvalid&&kX.isInvalidBrace(a),u=o.invalid===!0&&e.escapeInvalid===!0,A="";if(o.value)return(n||u)&&kX.isOpenOrClose(o)?"\\"+o.value:o.value;if(o.value)return o.value;if(o.nodes)for(let p of o.nodes)A+=r(p);return A};return r(t)}});var RX=_((RQt,FX)=>{"use strict";FX.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var jX=_((TQt,HX)=>{"use strict";var TX=RX(),ud=(t,e,r)=>{if(TX(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(TX(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let o={relaxZeros:!0,...r};typeof o.strictZeros=="boolean"&&(o.relaxZeros=o.strictZeros===!1);let a=String(o.relaxZeros),n=String(o.shorthand),u=String(o.capture),A=String(o.wrap),p=t+":"+e+"="+a+n+u+A;if(ud.cache.hasOwnProperty(p))return ud.cache[p].result;let h=Math.min(t,e),C=Math.max(t,e);if(Math.abs(h-C)===1){let F=t+"|"+e;return o.capture?`(${F})`:o.wrap===!1?F:`(?:${F})`}let I=_X(t)||_X(e),v={min:t,max:e,a:h,b:C},b=[],E=[];if(I&&(v.isPadded=I,v.maxLen=String(v.max).length),h<0){let F=C<0?Math.abs(C):1;E=LX(F,Math.abs(h),v,o),h=v.a=0}return C>=0&&(b=LX(h,C,v,o)),v.negatives=E,v.positives=b,v.result=Y9e(E,b,o),o.capture===!0?v.result=`(${v.result})`:o.wrap!==!1&&b.length+E.length>1&&(v.result=`(?:${v.result})`),ud.cache[p]=v,v.result};function Y9e(t,e,r){let o=BL(t,e,"-",!1,r)||[],a=BL(e,t,"",!1,r)||[],n=BL(t,e,"-?",!0,r)||[];return o.concat(n).concat(a).join("|")}function W9e(t,e){let r=1,o=1,a=OX(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=OX(t,r);for(a=MX(e+1,o)-1;t<a&&a<=e;)n.add(a),o+=1,a=MX(e+1,o)-1;return n=[...n],n.sort(z9e),n}function K9e(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let o=V9e(t,e),a=o.length,n="",u=0;for(let A=0;A<a;A++){let[p,h]=o[A];p===h?n+=p:p!=="0"||h!=="9"?n+=J9e(p,h,r):u++}return u&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[u],digits:a}}function LX(t,e,r,o){let a=W9e(t,e),n=[],u=t,A;for(let p=0;p<a.length;p++){let h=a[p],C=K9e(String(u),String(h),o),I="";if(!r.isPadded&&A&&A.pattern===C.pattern){A.count.length>1&&A.count.pop(),A.count.push(C.count[0]),A.string=A.pattern+UX(A.count),u=h+1;continue}r.isPadded&&(I=X9e(h,r,o)),C.string=I+C.pattern+UX(C.count),n.push(C),u=h+1,A=C}return n}function BL(t,e,r,o,a){let n=[];for(let u of t){let{string:A}=u;!o&&!NX(e,"strin
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var cZ=_((UQt,lZ)=>{"use strict";var u7e=QP(),{MAX_LENGTH:sZ,CHAR_BACKSLASH:SL,CHAR_BACKTICK:A7e,CHAR_COMMA:f7e,CHAR_DOT:p7e,CHAR_LEFT_PARENTHESES:h7e,CHAR_RIGHT_PARENTHESES:g7e,CHAR_LEFT_CURLY_BRACE:d7e,CHAR_RIGHT_CURLY_BRACE:m7e,CHAR_LEFT_SQUARE_BRACKET:oZ,CHAR_RIGHT_SQUARE_BRACKET:aZ,CHAR_DOUBLE_QUOTE:y7e,CHAR_SINGLE_QUOTE:E7e,CHAR_NO_BREAK_SPACE:C7e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:w7e}=iZ(),I7e=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},o=typeof r.maxLength=="number"?Math.min(sZ,r.maxLength):sZ;if(t.length>o)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${o})`);let a={type:"root",input:t,nodes:[]},n=[a],u=a,A=a,p=0,h=t.length,C=0,I=0,v,b={},E=()=>t[C++],F=N=>{if(N.type==="text"&&A.type==="dot"&&(A.type="text"),A&&A.type==="text"&&N.type==="text"){A.value+=N.value;return}return u.nodes.push(N),N.parent=u,N.prev=A,A=N,N};for(F({type:"bos"});C<h;)if(u=n[n.length-1],v=E(),!(v===w7e||v===C7e)){if(v===SL){F({type:"text",value:(e.keepEscaping?v:"")+E()});continue}if(v===aZ){F({type:"text",value:"\\"+v});continue}if(v===oZ){p++;let N=!0,U;for(;C<h&&(U=E());){if(v+=U,U===oZ){p++;continue}if(U===SL){v+=E();continue}if(U===aZ&&(p--,p===0))break}F({type:"text",value:v});continue}if(v===h7e){u=F({type:"paren",nodes:[]}),n.push(u),F({type:"text",value:v});continue}if(v===g7e){if(u.type!=="paren"){F({type:"text",value:v});continue}u=n.pop(),F({type:"text",value:v}),u=n[n.length-1];continue}if(v===y7e||v===E7e||v===A7e){let N=v,U;for(e.keepQuotes!==!0&&(v="");C<h&&(U=E());){if(U===SL){v+=U+E();continue}if(U===N){e.keepQuotes===!0&&(v+=U);break}v+=U}F({type:"text",value:v});continue}if(v===d7e){I++;let U={type:"brace",open:!0,close:!1,dollar:A.value&&A.value.slice(-1)==="$"||u.dollar===!0,depth:I,commas:0,ranges:0,nodes:[]};u=F(U),n.push(u),F({type:"open",value:v});continue}if(v===m7e){if(u.type!=="brace"){F({type:"text",value:v});continue}let N="close";u=n.pop(),u.close=!0,F({type:N,value:v}),I--,u=n[n.length-1];continue}if(v===f7e&&I>0){if(u.ranges>0){u.ranges=0;let N=u.nodes.shift();u.nodes=[N,{type:"text",value:u7e(u)}]}F({type:"comma",value:v}),u.commas++;continue}if(v===p7e&&I>0&&u.commas===0){let N=u.nodes;if(I===0||N.length===0){F({type:"text",value:v});continue}if(A.type==="dot"){if(u.range=[],A.value+=v,A.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,A.type="text";continue}u.ranges++,u.args=[];continue}if(A.type==="range"){N.pop();let U=N[N.length-1];U.value+=A.value+v,A=U,u.ranges--;continue}F({type:"dot",value:v});continue}F({type:"text",value:v})}do if(u=n.pop(),u.type!=="root"){u.nodes.forEach(z=>{z.nodes||(z.type==="open"&&(z.isOpen=!0),z.type==="close"&&(z.isClose=!0),z.nodes||(z.type="text"),z.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(u);N.nodes.splice(U,1,...u.nodes)}while(n.length>0);return F({type:"eos"}),a};lZ.exports=I7e});var fZ=_((_Qt,AZ)=>{"use strict";var uZ=QP(),B7e=$X(),v7e=rZ(),D7e=cZ(),rl=(t,e={})=>{let r=[];if(Array.isArray(t))for(let o of t){let a=rl.create(o,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(rl.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};rl.parse=(t,e={})=>D7e(t,e);rl.stringify=(t,e={})=>uZ(typeof t=="string"?rl.parse(t,e):t,e);rl.compile=(t,e={})=>(typeof t=="string"&&(t=rl.parse(t,e)),B7e(t,e));rl.expand=(t,e={})=>{typeof t=="string"&&(t=rl.parse(t,e));let r=v7e(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};rl.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?rl.compile(t,e):rl.expand(t,e);AZ.exports=rl});var SI=_((HQt,mZ)=>{"use strict";var P7e=Be("path"),Ku="\\\\/",pZ=`[^${Ku}]`,Bf="\\.",S7e="\\+",x7e="\\?",RP="\\/",b7e="(?=.)",hZ="[^/]",xL=`(?:${RP}|$)`,gZ=`(?:^|${R
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var pE,cM=yt(()=>{Yl();xo();pE=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));return o||null}getFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));if(!o)throw new Jt(11,`${jr(r.project.configuration,e)} isn't supported by any available fetcher`);return o}}});var vd,uM=yt(()=>{xo();vd=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,o){return this.getResolverByDescriptor(e,o).bindDescriptor(e,r,o)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,o){return await this.getResolverByDescriptor(e,o).getCandidates(e,r,o)}async getSatisfying(e,r,o,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,o,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));return o||null}getResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!o)throw new Error(`${qn(r.project.configuration,e)} isn't supported by any available resolver`);return o}tryResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));return o||null}getResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));if(!o)throw new Error(`${jr(r.project.configuration,e)} isn't supported by any available resolver`);return o}}});var hE,AM=yt(()=>{Pt();xo();hE=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=Fs(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=Fs(e,a),u=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,u,r)}getLocatorFilename(e){return aE(e)}async ensureVirtualLink(e,r,o){let a=r.packageFs.getRealPath(),n=o.project.configuration.get("virtualFolder"),u=this.getLocatorFilename(e),A=mi.makeVirtualPath(n,u,a),p=new Uu(A,{baseFs:r.packageFs,pathUtils:V});return{...r,packageFs:p}}}});var gE,a1,Lse=yt(()=>{gE=class{static isVirtualDescriptor(e){return!!e.range.startsWith(gE.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(gE.protocol)}supportsDescriptor(e,r){return gE.isVirtualDescriptor(e)}supportsLocator(e,r){return gE.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,r,o){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,o,a){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}},a1=gE;a1.protocol="virtual:"});var dE,fM=yt(()=>{Pt();Bd();dE=class{supports(e){return!!e.reference.startsWith(Xn.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let o=this.getWorkspace(e,r).cwd;return{packageFs:new gn(o),prefixPath:Bt.dot,localPath:o}}get
`,I.message,I.stack);var v=new Error("tunneling socket could not be established, cause="+I.message);v.code="ECONNRESET",e.request.emit("error",v),o.removeSocket(a)}};kf.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var o=this.requests.shift();o&&this.createSocket(o,function(a){o.request.onSocket(a)})}};function jse(t,e){var r=this;kf.prototype.createSocket.call(r,t,function(o){var a=t.request.getHeader("host"),n=IM({},r.options,{socket:o,servername:a?a.replace(/:.*$/,""):t.host}),u=krt.connect(0,n);r.sockets[r.sockets.indexOf(o)]=u,e(u)})}function qse(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function IM(t){for(var e=1,r=arguments.length;e<r;++e){var o=arguments[e];if(typeof o=="object")for(var a=Object.keys(o),n=0,u=a.length;n<u;++n){var A=a[n];o[A]!==void 0&&(t[A]=o[A])}}return t}var sh;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?sh=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:sh=function(){};EE.debug=sh});var Wse=_((rNt,Yse)=>{Yse.exports=Gse()});var Ff=_((Qf,KS)=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var Kse=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Ort(t){return Kse.includes(t)}var Mrt=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...Kse];function Urt(t){return Mrt.includes(t)}var _rt=["null","undefined","string","number","bigint","boolean","symbol"];function Hrt(t){return _rt.includes(t)}function CE(t){return e=>typeof e===t}var{toString:Vse}=Object.prototype,u1=t=>{let e=Vse.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&Se.domElement(t))return"HTMLElement";if(Urt(e))return e},ei=t=>e=>u1(e)===t;function Se(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(Se.observable(t))return"Observable";if(Se.array(t))return"Array";if(Se.buffer(t))return"Buffer";let e=u1(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Se.undefined=CE("undefined");Se.string=CE("string");var jrt=CE("number");Se.number=t=>jrt(t)&&!Se.nan(t);Se.bigint=CE("bigint");Se.function_=CE("function");Se.null_=t=>t===null;Se.class_=t=>Se.function_(t)&&t.toString().startsWith("class ");Se.boolean=t=>t===!0||t===!1;Se.symbol=CE("symbol");Se.numericString=t=>Se.string(t)&&!Se.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));Se.array=(t,e)=>Array.isArray(t)?Se.function_(e)?t.every(e):!0:!1;Se.buffer=t=>{var e,r,o,a;return(a=(o=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||o===void 0?void 0:o.call(r,t))!==null&&a!==void 0?a:!1};Se.nullOrUndefined=t=>Se.null_(t)||Se.undefined(t);Se.object=t=>!Se.null_(t)&&(typeof t=="object"||Se.function_(t));Se.iterable=t=>{var e;return Se.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};Se.asyncIterable=t=>{var e;return Se.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};Se.generator=t=>Se.iterable(t)&&Se.function_(t.next)&&Se.function_(t.throw);Se.asyncGenerator=t=>Se.asyncIterable(t)&&Se.function_(t.next)&&Se.function_(t.throw);Se.nativePromise=t=>ei("Promise")(t);var qrt=t=>{var e,r;return Se.function_((e=t)===null||e===void 0?void 0:e.then)&&Se.function_((r=t)===null||r===void 0?void 0:r.catch)};Se.promise=t=>Se.nativePromise(t)||qrt(t);Se.generatorFunction=ei("GeneratorFunction");Se.asyncGene
Please report this to https://github.com/szmarczak/http2-wrapper/`);E(F)}return}o[0].resolve(b);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 C=`${A}:${u}`,I=!1;try{let v=Znt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(C),...r});v[ea]=0,v[vE]=!1;let b=()=>v[ea]<v.remoteSettings.maxConcurrentStreams,E=!0;v.socket.once("session",N=>{this.tlsSessionCache.set(C,N)}),v.once("error",N=>{for(let{reject:U}of o)U(N);this.tlsSessionCache.delete(C)}),v.setTimeout(this.timeout,()=>{v.destroy()}),v.once("close",()=>{if(I){E&&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)||!b())){for(let N of v[Wl])if(N in this.queue[u]){let{listeners:U}=this.queue[u][N];for(;U.length!==0&&b();)U.shift().resolve(v);let z=this.queue[u];if(z[N].listeners.length===0&&(delete z[N],Object.keys(z).length===0)){delete this.queue[u];break}if(!b())break}}};v.on("origin",()=>{v[Wl]=v.originSet,b()&&(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[Wl]=v.originSet;{let N=this.sessions;if(u in N){let U=N[u];U.splice(tit(U,v,rit),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[Goe]=v.request,v.request=(N,U)=>{if(v[vE])throw new Error("The session is gracefully closing. No new streams are allowed.");let z=v[Goe](N,U);return v.ref(),++v[ea],v[ea]===v.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,z.once("close",()=>{if(E=b(),--v[ea],!v.destroyed&&!v.closed&&(nit(this.sessions[u],v),b()&&!v.closed)){E||(this._freeSessionsCount++,E=!0);let te=v[ea]===0;te&&v.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||v[vE])?v.close():(KM(this.sessions[u],v),F())}}),z}}catch(v){for(let b of o)b.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 tA.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),Xnt.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})}};tA.kCurrentStreamsCount=ea;tA.kGracefullyClosing=vE;Koe.exports={Agent:tA,globalAgent:new tA}});var JM=_((xNt,Voe)=>{"use strict";var{Readable:iit}=Be("stream"),zM=class extends iit{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"
`).reverse(),A=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
`).reverse();for(;A.length!==0&&A[0]===u[0];)u.shift();this.stack=`${this.stack.slice(0,n)}${u.reverse().join(`
`)}${A.reverse().join(`
`)}`}}};Bn.RequestError=Vi;var cx=class extends Vi{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}};Bn.MaxRedirectsError=cx;var ux=class extends Vi{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}};Bn.HTTPError=ux;var Ax=class extends Vi{constructor(e,r){super(e.message,e,r),this.name="CacheError"}};Bn.CacheError=Ax;var fx=class extends Vi{constructor(e,r){super(e.message,e,r),this.name="UploadError"}};Bn.UploadError=fx;var px=class extends Vi{constructor(e,r,o){super(e.message,e,o),this.name="TimeoutError",this.event=e.event,this.timings=r}};Bn.TimeoutError=px;var m1=class extends Vi{constructor(e,r){super(e.message,e,r),this.name="ReadError"}};Bn.ReadError=m1;var hx=class extends Vi{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}};Bn.UnsupportedProtocolError=hx;var Ast=["socket","connect","continue","information","upgrade","timeout"],gx=class extends Oae.Duplex{constructor(e,r={},o){super({autoDestroy:!1,highWaterMark:0}),this[SE]=0,this[bE]=0,this.requestInitialized=!1,this[ox]=new Set,this.redirects=[],this[kE]=!1,this[ax]=!1,this[d1]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof w4.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:u,body:A,form:p}=r;if((u||A||p)&&this._lockWrite(),Bn.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,o)}catch(h){st.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof Git.ReadStream&&await lst(this.options.body);let{url:C}=this.options;if(!C)throw new TypeError("Missing `url` property");if(this.requestUrl=C.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[Zs])===null||h===void 0||h.destroy();return}for(let I of this[d1])I();this[d1].length=0,this.requestInitialized=!0}catch(C){if(C instanceof Vi){this._beforeError(C);return}this.destroyed||this.destroy(C)}})()}static normalizeArguments(e,r,o){var a,n,u,A,p;let h=r;if(st.default.object(e)&&!st.default.urlInstance(e))r={...o,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...o,...r},e!==void 0&&(r.url=e),st.default.urlInstance(r.url)&&(r.url=new oh.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),st.assert.any([st.default.string,st.default.undefined],r.method),st.assert.any([st.default.object,st.default.undefined],r.headers),st.assert.any([st.default.string,st.default.urlInstance,st.default.undefined],r.prefixUrl),st.assert.any([st.default.object,st.default.undefined],r.cookieJar),st.assert.any([st.default.object,st.default.string,st.default.undefined],r.searchParams),st.assert.any([st.default.object,st.default.string,st.default.undefined],r.cache),st.assert.any([st.default.object,st.default.number,st.default.undefined],r.timeout),st.assert.any([st.default.object,st.default.undefined],r.context),st.assert.any([st.default.object,st.default.undefined],r.hooks),st.assert.any([st.default.boolean,st.default.undefined],r.decompress),st.assert.any([st.default.boolean,st.default.undefined],r.ignoreInvalidCookies),st.assert.any([st.default.boolean,st.default.undefined],r.followRedirect),st.assert.any([st.default.number,st.default.undefined],r.maxRedirects),st.assert.any([st.default.boolean,st.default.undefined],r.throwHttpErrors),st.assert.any([st.default.boolean,st.default.undefined],r.http2),st.assert.any([st.default.boolean,st.default.undefined],r.allowGetBody),st.assert.any([st.default.string,st.default.undefined],r.localAddress),st.asser
`)[3];return Vst(e)}function U4(){return typeof Bx.default.availableParallelism<"u"?Bx.default.availableParallelism():Math.max(1,Bx.default.cpus().length)}var Bx,Ile,qst,Ble,vle,Wst,Kst,vx=yt(()=>{Pt();Bx=$e(Be("os"));Dx();jl();Ile=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),qst=typeof Ile<"u"?async t=>{try{return await _4(Ile,[t],{cwd:V.cwd()}),!0}catch{return!1}}:void 0;Wst=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Kst=/\((\S*)(?::(\d+))(?::(\d+))\)/});function Y4(t,e,r,o,a){let n=c1(r);if(o.isArray||o.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((u,A)=>H4(t,`${e}[${A}]`,u,o,a)):String(n).split(/,/).map(u=>H4(t,e,u,o,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return H4(t,e,r,o,a)}function H4(t,e,r,o,a){let n=c1(r);switch(o.type){case"ANY":return GS(n);case"SHAPE":return $st(t,e,r,o,a);case"MAP":return eot(t,e,r,o,a)}if(n===null&&!o.isNullable&&o.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if(o.values?.includes(n))return n;let A=(()=>{if(o.type==="BOOLEAN"&&typeof n!="string")return WI(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${e}" to be a string, got ${typeof n}`);let p=iS(n,{env:t.env});switch(o.type){case"ABSOLUTE_PATH":{let h=a,C=mM(r);return C&&C[0]!=="<"&&(h=V.dirname(C)),V.resolve(h,fe.toPortablePath(p))}case"LOCATOR_LOOSE":return Sf(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return Sf(p);case"BOOLEAN":return WI(p);default:return p}})();if(o.values&&!o.values.includes(A))throw new Error(`Invalid value, expected one of ${o.values.join(", ")}`);return A}function $st(t,e,r,o,a){let n=c1(r);if(typeof n!="object"||Array.isArray(n))throw new it(`Object configuration settings "${e}" must be an object`);let u=W4(t,o,{ignoreArrays:!0});if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=`${e}.${A}`;if(!o.properties[A])throw new it(`Unrecognized configuration settings found: ${e}.${A} - run "yarn config -v" to see the list of settings supported in Yarn`);u.set(A,Y4(t,h,p,o.properties[A],a))}return u}function eot(t,e,r,o,a){let n=c1(r),u=new Map;if(typeof n!="object"||Array.isArray(n))throw new it(`Map configuration settings "${e}" must be an object`);if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=o.normalizeKeys?o.normalizeKeys(A):A,C=`${e}['${h}']`,I=o.valueDefinition;u.set(h,Y4(t,C,p,I,a))}return u}function W4(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case"SHAPE":{if(e.isArray&&!r)return[];let o=new Map;for(let[a,n]of Object.entries(e.properties))o.set(a,W4(t,n));return o}break;case"MAP":return e.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return e.default===null?null:t.projectCwd===null?Array.isArray(e.default)?e.default.map(o=>V.normalize(o)):V.isAbsolute(e.default)?V.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(o=>V.resolve(t.projectCwd,o)):V.resolve(t.projectCwd,e.default);default:return e.default}}function Sx(t,e,r){if(e.type==="SECRET"&&typeof t=="string"&&r.hideSecrets)return Zst;if(e.type==="ABSOLUTE_PATH"&&typeof t=="string"&&r.getNativePaths)return fe.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let o=[];for(let a of t)o.push(Sx(a,e,r));return o}if(e.type==="MAP"&&t instanceof Map){if(t.size===0)return;let o=new Map;for(let[a,n]of t.entries()){let u=Sx(n,e.valueDefinition,r);typeof u<"u"&&o.set(a,u)}return o}if(e.type==="SHAPE"&&t instanceof Map){if(t.size===0)return;let o=new Map;for(let[a,n]of t.entries()){let u=e.properties[a],A=Sx(n,u,r);typeof A<"u"&&o.set(a,A)}return o}return t}function tot(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(xx)&&(e=(0,Ple.default)(e.slice(xx.length)),t[e]=r);return t}function q4(){let t=`${xx}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r=="string")return r;return G4}async function Dle(t){try{return await oe.re
`);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 vd([new a1,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 pE([new hE,new dE,...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=w1(),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=sl(n,u=>u==="current"?e.libc??sl.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(!ba(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=Gy(e,o.identHash),p=[];A.push([o.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:o};for(let C of u.dependencies.values())p.push({...h,type:"Dependency",descriptor:C});for(let C of u.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:C});for(let[C,I]of u.peerDependenciesMeta)for(let[v,b]of Object.entries(I))p.push({...h,type:"PeerDependencyMeta",selector:C,key:v,value:b})};await this.triggerHook(o=>o.registerPackageExtensions,this,r);for(let[o,a]of this.get("packageExtensions"))r(nh(o,!0),nS(a),{userProvided:!0});return e}normalizeLocator(e){return ba(e.reference)?Fs(e,`${this.get("defaultProtocol")}${e.reference}`):QE.test(e.reference)?Fs(e,`${this.get("defaultProtocol")}${e.reference}`):e}normalizeDependency(e){return ba(e.range)?In(e,`${this.get("defaultProtocol")}${e.range}`):QE.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=ZI(e),a=r.get(e.identHash);if(typeof a<"u"){let u=e.version;if(u!==null){for(let[A,p]of a)if(!!xf(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 C=o.peerDependenciesMeta.get(h.selector);(typeof C>"u"||!Object.hasOwn(C,h.key)||C[h.key]!==h.value)&&(h.status="active",ol(o.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:EN(h);break}}}let n=u=>u.scope?`${u.scope}__${u.name}`:`${u.name}`;for(let u of o.peerDependenciesMeta.keys()){let A=Js(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=eA("types",A),h=fn(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(ks(o.dependencies,([,u])=>Sa(u))),o.peerDependencies=new Map(ks(o.peerDependencies,([,u])=>Sa(u))),o}getLimit(e){return ol(this.limits,e,()=>(0,ble.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=rA;Ke.deleteProperty=Symbol(),Ke.telemetry=nul
This command will run a command using Yarn's portable shell.
Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.
Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell.
Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.
For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.
`,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)",`$0 echo '"*.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 al,Wle=yt(()=>{al=class extends Error{constructor(e){super(e),this.name="ShellError"}}});var Nx={};Vt(Nx,{fastGlobOptions:()=>zle,isBraceExpansion:()=>oU,isGlobPattern:()=>fot,match:()=>pot,micromatchOptions:()=>Lx});function fot(t){if(!Tx.default.scan(t,Lx).isGlob)return!1;try{Tx.default.parse(t,Lx)}catch{return!1}return!0}function pot(t,{cwd:e,baseFs:r}){return(0,Kle.default)(t,{...zle,cwd:fe.fromPortablePath(e),fs:RD(Vle.default,new _p(r))})}function oU(t){return Tx.default.scan(t,Lx).isBrace}var Kle,Vle,Tx,Lx,zle,Jle=yt(()=>{Pt();Kle=$e(RS()),Vle=$e(Be("fs")),Tx=$e(Zo()),Lx={strictBrackets:!0},zle={onlyDirectories:!1,onlyFiles:!1}});function aU(){}function lU(){for(let t of bd)t.kill()}function ece(t,e,r,o){return a=>{let n=a[0]instanceof iA.Transform?"pipe":a[0],u=a[1]instanceof iA.Transform?"pipe":a[1],A=a[2]instanceof iA.Transform?"pipe":a[2],p=(0,Zle.default)(t,e,{...o,stdio:[n,u,A]});return bd.add(p),bd.size===1&&(process.on("SIGINT",aU),process.on("SIGTERM",lU)),a[0]instanceof iA.Transform&&a[0].pipe(p.stdin),a[1]instanceof iA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof iA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",C=>{switch(bd.delete(p),bd.size===0&&(process.off("SIGINT",aU),process.off("SIGTERM",lU)),C.code){case"ENOENT":a[2].write(`command not found: ${t}
`),h(127);break;case"EACCES":a[2].write(`permission denied: ${t}
`),h(128);break;default:a[2].write(`uncaught error: ${C.message}
`),h(1);break}}),p.on("close",C=>{bd.delete(p),bd.size===0&&(process.off("SIGINT",aU),process.off("SIGTERM",lU)),h(C!==null?C:129)})})}}}function tce(t){return e=>{let r=e[0]==="pipe"?new iA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function Ox(t,e){return TE.start(t,e)}function Xle(t,e=null){let r=new iA.PassThrough,o=new $le.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(`
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",t(e!==null?`${e} ${p}`:p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function rce(t,{prefix:e}){return{stdout:Xle(r=>t.stdout.write(`${r}
`),t.stdout.isTTY?e:null),stderr:Xle(r=>t.stderr.write(`${r}
`),t.stderr.isTTY?e:null)}}var Zle,iA,$le,bd,Jl,cU,TE,uU=yt(()=>{Zle=$e(sT()),iA=Be("stream"),$le=Be("string_decoder"),bd=new Set;Jl=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},cU=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},TE=class{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:o,stderr:a}){let n=new TE(null,e);return n.stdin=r,n.stdout=o,n.stderr=a,n}pipeTo(e,r=1){let o=new TE(this,e),a=new cU;return o.pipe=a,o.stdout=this.stdout,o.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),o}async exec(){let e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,e[1]=r.get();let o;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");o=this.stderr,e[2]=o.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),o.close(),n))}async run(){let e=[];for(let o=this;o;o=o.ancestor)e.push(o.exec());return(await Promise.all(e))[0]}}});var F1={};Vt(F1,{EntryCommand:()=>FE,ShellError:()=>al,execute:()=>RE,globUtils:()=>Nx});function nce(t,e,r){let o=new ll.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(o,{end:!1}),(e&2)===2&&r.stdin instanceof ll.Writable&&o.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stderr,{end:!1});break;default:throw new al(`Bad file descriptor: "${t}"`)}return o}function Ux(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function got(t,e,r){let o=[],a=new ll.PassThrough;return a.on("data",n=>o.push(n)),await _x(t,e,Ux(r,{stdout:a})),Buffer.concat(o).toString().replace(/[\r\n]+$/,"")}async function ice(t,e,r){let o=t.map(async n=>{let u=await kd(n.args,e,r);return{name:n.name,value:u.join(" ")}});return(await Promise.all(o)).reduce((n,u)=>(n[u.name]=u.value,n),{})}function Mx(t){return t.match(/[^ \r\n\t]+/g)||[]}async function uce(t,e,r,o,a=o){switch(t.name){case"$":o(String(process.pid));break;case"#":o(String(e.args.length));break;case"@":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let u=Mx(n);for(let A=0;A<u.length-1;++A)a(u[A]);o(u[u.length-1])}break;case"*":{let n=e.args.join(" ");if(t.quoted)o(n);else for(let u of Mx(n))a(u)}break;case"PPID":o(String(process.ppid));break;case"RANDOM":o(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),u,A=Number.isFinite(n);if(A?n>=0&&n<e.args.length&&(u=e.args[n]):Object.hasOwn(r.variables,t.name)?u=r.variables[t.name]:Object.hasOwn(r.environment,t.name)&&(u=r.environment[t.name]),typeof u<"u"&&t.alternativeValue?u=(await kd(t.alternativeValue,e,r)).join(" "):typeof u>"u"&&(t.defaultValue?u=(await kd(t.defaultValue,e,r)).join(" "):t.alternativeValue&&(u="")),typeof u>"u")throw A?new al(`Unbound argument #${n}`):new al(`Unbound variable "${t.name}"`);if(t.quoted)o(u);else{let p=Mx(u);for(let C=0;C<p.length-1;++C)a(p[C]);let h=p[p.length-1];typeof h<"u"&&o(h)}}break}}async function b1(t,e,r){if(t.type==="number"){if(Number.isInteger(t.value))return t.value;throw new Error(`Invalid number: "${t.value}", only integers are allowed`)}else if(t.type==="variable"){let o=[];await uce({...t,quoted:!0},e,r,n=>o.push(n));let a=Number(o.join(" "));return Number.isNaN(a)?b1({type:"variable",name:o.join(" ")},e,r):b1
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${u(cy(t))}' has ended
`)})),0}return await oce(t,e,r)}async function Cot(t,e,r,{background:o=!1}={}){let a,n=A=>{a=A,r.variables["?"]=String(A)},u=async A=>{try{return await Eot(A.chain,e,r,{background:o&&typeof A.then>"u"})}catch(p){if(!(p instanceof al))throw p;return r.stderr.write(`${p.message}
`),1}};for(n(await u(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":a===0&&n(await u(t.then.line));break;case"||":a!==0&&n(await u(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return a}async function _x(t,e,r){let o=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:u}of t){if(a=await Cot(n,e,r,{background:u==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=o,a}function Ace(t){switch(t.type){case"variable":return t.name==="@"||t.name==="#"||t.name==="*"||Number.isFinite(parseInt(t.name,10))||"defaultValue"in t&&!!t.defaultValue&&t.defaultValue.some(e=>Q1(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>Q1(e));case"arithmetic":return AU(t.arithmetic);case"shell":return fU(t.shell);default:return!1}}function Q1(t){switch(t.type){case"redirection":return t.args.some(e=>Q1(e));case"argument":return t.segments.some(e=>Ace(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function AU(t){switch(t.type){case"variable":return Ace(t);case"number":return!1;default:return AU(t.left)||AU(t.right)}}function fU(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let o;switch(r.type){case"subshell":o=fU(r.subshell);break;case"command":o=r.envs.some(a=>a.args.some(n=>Q1(n)))||r.args.some(a=>Q1(a));break}if(o)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function RE(t,e=[],{baseFs:r=new Tn,builtins:o={},cwd:a=fe.toPortablePath(process.cwd()),env:n=process.env,stdin:u=process.stdin,stdout:A=process.stdout,stderr:p=process.stderr,variables:h={},glob:C=Nx}={}){let I={};for(let[E,F]of Object.entries(n))typeof F<"u"&&(I[E]=F);let v=new Map(hot);for(let[E,F]of Object.entries(o))v.set(E,F);u===null&&(u=new ll.PassThrough,u.end());let b=ND(t,C);if(!fU(b)&&b.length>0&&e.length>0){let{command:E}=b[b.length-1];for(;E.then;)E=E.then.line;let F=E.chain;for(;F.then;)F=F.then.chain;F.type==="command"&&(F.args=F.args.concat(e.map(N=>({type:"argument",segments:[{type:"text",text:N}]}))))}return await _x(b,{args:e,baseFs:r,builtins:v,initialStdin:u,initialStdout:A,initialStderr:p,glob:C},{cwd:a,environment:I,exitCode:null,procedures:{},stdin:u,stdout:A,stderr:p,variables:Object.assign({},h,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var ace,lce,ll,cce,hot,dot,x1=yt(()=>{Pt();Ll();ace=$e(IL()),lce=Be("os"),ll=Be("stream"),cce=Be("timers/promises");Yle();Wle();Jle();uU();uU();hot=new Map([["cd",async([t=(0,lce.homedir)(),...e],r,o)=>{let a=V.resolve(o.cwd,fe.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(u=>{throw u.code==="ENOENT"?new al(`cd: no such file or directory: ${t}`):u})).isDirectory())throw new al(`cd: not a directory: ${t}`);return o.cwd=a,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${fe.fromPortablePath(r.cwd)}
`),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,o)=>o.exitCode=parseInt(t??o.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")}
`),0)],["sleep",async([t],e,r)=>{if(typeof t>"u")throw new al("sleep: missing operand");let o=Number(t);if(Number.isNaN(o))throw new al(`sleep: invalid time interval '${t}'`);return await(0,cce.setTimeout)(1e3*o,0)}],["__ysh_run_procedure",async(t,e,r)=>{let o=r.procedures[t[0]];return await Ox(o,{stdin:new Jl(r.stdin),stdout:new Jl(r.stdout),stderr:new Jl(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let o=r.stdin,a=r.stdout,n=r.stderr,u=[],A=[],p=[],h=0;for(;t[h]!=="--";){let I=t[h++],{type:v,fd:b}=JSON.parse(I),E=z=>{switch(b){case null:case 0:u.push(z);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},F=z=>{switch(b){case null:case 1:A.push(z);break;case 2:p.push(z);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},N=Number(t[h++]),U=h+N;for(let z=h;z<U;++h,++z)switch(v){case"<":E(()=>e.baseFs.createReadStream(V.resolve(r.cwd,fe.toPortablePath(t[z]))));break;case"<<<":E(()=>{let te=new ll.PassThrough;return process.nextTick(()=>{te.write(`${t[z]}
`),te.end()}),te});break;case"<&":E(()=>nce(Number(t[z]),1,r));break;case">":case">>":{let te=V.resolve(r.cwd,fe.toPortablePath(t[z]));F(te==="/dev/null"?new ll.Writable({autoDestroy:!0,emitClose:!0,write(le,pe,ue){setImmediate(ue)}}):e.baseFs.createWriteStream(te,v===">>"?{flags:"a"}:void 0))}break;case">&":F(nce(Number(t[z]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${v}"`)}}if(u.length>0){let I=new ll.PassThrough;o=I;let v=b=>{if(b===u.length)I.end();else{let E=u[b]();E.pipe(I,{end:!1}),E.on("end",()=>{v(b+1)})}};v(0)}if(A.length>0){let I=new ll.PassThrough;a=I;for(let v of A)I.pipe(v)}if(p.length>0){let I=new ll.PassThrough;n=I;for(let v of p)I.pipe(v)}let C=await Ox(k1(t.slice(h+1),e,r),{stdin:new Jl(o),stdout:new Jl(a),stderr:new Jl(n)}).run();return await Promise.all(A.map(I=>new Promise((v,b)=>{I.on("error",E=>{b(E)}),I.on("close",()=>{v()}),I.end()}))),await Promise.all(p.map(I=>new Promise((v,b)=>{I.on("error",E=>{b(E)}),I.on("close",()=>{v()}),I.end()}))),C}]]);dot={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var Hx=_((JMt,fce)=>{function wot(t,e){for(var r=-1,o=t==null?0:t.length,a=Array(o);++r<o;)a[r]=e(t[r],r,t);return a}fce.exports=wot});var yce=_((XMt,mce)=>{var pce=fd(),Iot=Hx(),Bot=Hl(),vot=fE(),Dot=1/0,hce=pce?pce.prototype:void 0,gce=hce?hce.toString:void 0;function dce(t){if(typeof t=="string")return t;if(Bot(t))return Iot(t,dce)+"";if(vot(t))return gce?gce.call(t):"";var e=t+"";return e=="0"&&1/t==-Dot?"-0":e}mce.exports=dce});var R1=_((ZMt,Ece)=>{var Pot=yce();function Sot(t){return t==null?"":Pot(t)}Ece.exports=Sot});var pU=_(($Mt,Cce)=>{function xot(t,e,r){var o=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(a);++o<a;)n[o]=t[o+e];return n}Cce.exports=xot});var Ice=_((e4t,wce)=>{var bot=pU();function kot(t,e,r){var o=t.length;return r=r===void 0?o:r,!e&&r>=o?t:bot(t,e,r)}wce.exports=kot});var hU=_((t4t,Bce)=>{var Qot="\\ud800-\\udfff",Fot="\\u0300-\\u036f",Rot="\\ufe20-\\ufe2f",Tot="\\u20d0-\\u20ff",Lot=Fot+Rot+Tot,Not="\\ufe0e\\ufe0f",Oot="\\u200d",Mot=RegExp("["+Oot+Qot+Lot+Not+"]");function Uot(t){return Mot.test(t)}Bce.exports=Uot});var Dce=_((r4t,vce)=>{function _ot(t){return t.split("")}vce.exports=_ot});var Rce=_((n4t,Fce)=>{var Pce="\\ud800-\\udfff",Hot="\\u0300-\\u036f",jot="\\ufe20-\\ufe2f",qot="\\u20d0-\\u20ff",Got=Hot+jot+qot,Yot="\\ufe0e\\ufe0f",Wot="["+Pce+"]",gU="["+Got+"]",dU="\\ud83c[\\udffb-\\udfff]",Kot="(?:"+gU+"|"+dU+")",Sce="[^"+Pce+"]",xce="(?:\\ud83c[\\udde6-\\uddff]){2}",bce="[\\ud800-\\udbff][\\udc00-\\udfff]",Vot="\\u200d",kce=Kot+"?",Qce="["+Yot+"]?",zot="(?:"+Vot+"(?:"+[Sce,xce,bce].join("|")+")"+Qce+kce+")*",Jot=Qce+kce+zot,Xot="(?:"+[Sce+gU+"?",gU,xce,bce,Wot].join("|")+")",Zot=RegExp(dU+"(?="+dU+")|"+Xot+Jot,"g");function $ot(t){return t.match(Zot)||[]}Fce.exports=$ot});var Lce=_((i4t,Tce)=>{var eat=Dce(),tat=hU(),rat=Rce();function nat(t){return tat(t)?rat(t):eat(t)}Tce.exports=nat});var Oce=_((s4t,Nce)=>{var iat=Ice(),sat=hU(),oat=Lce(),aat=R1();function lat(t){return function(e){e=aat(e);var r=sat(e)?oat(e):void 0,o=r?r[0]:e.charAt(0),a=r?iat(r,1).join(""):e.slice(1);return o[t]()+a}}Nce.exports=lat});var Uce=_((o4t,Mce)=>{var cat=Oce(),uat=cat("toUpperCase");Mce.exports=uat});var mU=_((a4t,_ce)=>{var Aat=R1(),fat=Uce();function pat(t){return fat(Aat(t).toLowerCase())}_ce.exports=pat});var Hce=_((l4t,jx)=>{function hat(){var t=0,e=1,r=2,o=3,a=4,n=5,u=6,A=7,p=8,h=9,C=10,I=11,v=12,b=13,E=14,F=15,N=16,U=17,z=0,te=1,le=2,pe=3,ue=4;function ye(g,Ee){return 55296<=g.charCodeAt(Ee)&&g.charCodeAt(Ee)<=56319&&56320<=g.charCodeAt(Ee+1)&&g.charCodeAt(Ee+1)<=57343}function ae(g,Ee){Ee===void 0&&(Ee=0);var De=g.charCodeAt(Ee);if(55296<=De&&De<=56319&&Ee<g.length-1){var ce=De,ne=g.charCodeAt(Ee+1);return 56320<=ne&&ne<=57343?(ce-55296)*1024+(ne-56320)+65536:ce}if(56320<=De&&De<=57343&&Ee>=1){var ce=g.charCodeAt(Ee-1),ne=De;return 55296<=ce&&ce<=56319?(ce-55296)*1024+(ne-56320)+65536:ne}return De}function Ie(g,Ee,De){var ce=[g]
`,end:t=>`::endgroup::
`}:Gx.default.TRAVIS?{start:t=>`travis_fold:start:${t}
`,end:t=>`travis_fold:end:${t}
`}:Gx.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${t}
`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,Vce=uh!==null,Wce=new Date,yat=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,Eat=t=>t,Yx=Eat({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),Cat=yat&&Object.keys(Yx).find(t=>{let e=Yx[t];return!(e.date&&(e.date[0]!==Wce.getDate()||e.date[1]!==Wce.getMonth()+1))})||"default";Lt=class extends Xs{constructor({configuration:r,stdout:o,json:a=!1,forceSectionAlignment:n=!1,includeNames:u=!0,includePrefix:A=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:C=h,includeWarnings:I=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(zI(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=u,this.includePrefix=A,this.includeFooter=p,this.includeInfos=C,this.includeWarnings=I,this.json=a,this.stdout=o,r.get("enableProgressBars")&&!a&&o.isTTY&&o.columns>22){let v=r.get("progressBarStyle")||Cat;if(!Object.hasOwn(Yx,v))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=Yx[v];let b=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*b/80)}}static async start(r,o){let a=new this(r),n=process.emitWarning;process.emitWarning=(u,A)=>{if(typeof u!="string"){let h=u;u=h.message,A=A??h.name}let p=typeof A<"u"?`${A}: ${u}`:u;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,md(r.configuration,`Yarn ${tn}`,2));try{await o(a)}catch(u){a.reportExceptionOnce(u)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let o=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,o-10-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}async startSectionPromise({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}startTimerImpl(r,o,a){return{cb:typeof o=="function"?o:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,uh!==null&&!this.json&&this.includeInfos&&this.stdout.write(uh.start(r))},reportFooter:A=>{if(this.indent-=1,uh!==null&&!this.json&&this.includeInfos){this.stdout.write(uh.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&A>200?this.reportInfo(null,`\u2514 Completed in ${_t(this.configuration,A,Et.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof o=="function"?{}:o).skipIfEmpty}}startTimerSync(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionSync(u,n)}async startTimerPromise(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionPromise(u,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,o){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",u=`${this.formatPrefix(n,"blueBright")}${o}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent
`),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)%Gce.length,this.progressTime=r);let o=Gce[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),C=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${C}`}let u=this.formatName(null),A=u?`${u}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${_t(this.configuration,"\u27A4","blueBright")} ${A}${o}${n}${p}
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Yce)}refreshProgress({delta:r=0,force:o=!1}={}){let a=!1,n=!1;if(o||this.progress.size===0)a=!0;else for(let u of this.progress.values()){let A=typeof u.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*u.definition.progress):void 0,p=u.lastScaledSize;u.lastScaledSize=A;let h=u.lastTitle;if(u.lastTitle=u.definition.title,A!==p||(n=h!==u.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:o}={}){return this.progressStyle===null&&(o=!1),typeof o>"u"&&(o=this.configuration.get("preferTruncatedLines")),o&&(r=(0,Kce.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?zce(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,o){return this.includePrefix?`${_t(this.configuration,"\u27A4",o)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?yU(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${mat} `}}});var un={};Vt(un,{PackageManager:()=>Zce,detectPackageManager:()=>$ce,executePackageAccessibleBinary:()=>iue,executePackageScript:()=>Wx,executePackageShellcode:()=>EU,executeWorkspaceAccessibleBinary:()=>Sat,executeWorkspaceLifecycleScript:()=>rue,executeWorkspaceScript:()=>tue,getPackageAccessibleBinaries:()=>Kx,getWorkspaceAccessibleBinaries:()=>nue,hasPackageScript:()=>vat,hasWorkspaceScript:()=>CU,isNodeScript:()=>wU,makeScriptEnv:()=>N1,maybeExecuteWorkspaceLifecycleScript:()=>Pat,prepareExternalProject:()=>Bat});async function Ah(t,e,r,o=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${o.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await oe.writeFilePromise(V.format({dir:t,name:e,ext:".cmd"}),a)}await oe.writeFilePromise(V.join(t,e),`#!/bin/sh
exec "${r}" ${o.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
`,{mode:493})}async function $ce(t){let e=await Ot.tryFind(t);if(e?.packageManager){let o=US(e.packageManager);if(o?.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[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(V.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(V.join(t,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:oe.existsSync(V.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function N1({project:t,locator:e,binFolder:r,ignoreCorepack:o,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let u={};for(let[C,I]of Object.entries(n))typeof I<"u"&&(u[C.toLowerCase()!=="path"?C:"PATH"]=I);let A=fe.fromPortablePath(r);u.BERRY_BIN_FOLDER=fe.fromPortablePath(A);let p=process.env.COREPACK_ROOT&&!o?fe.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([Ah(r,"node",process.execPath),...tn!==null?[Ah(r,"run",process.execPath,[p,"run"]),Ah(r,"yarn",process.execPath,[p]),Ah(r,"yarnpkg",process.execPath,[p]),Ah(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),t&&(u.INIT_CWD=fe.cwd(),u.PROJECT_CWD=fe.fromPortablePath(t.cwd)),u.PATH=u.PATH?`${A}${fe.delimiter}${u.PATH}`:`${A}`,u.npm_execpath=`${A}${fe.sep}yarn`,u.npm_node_execpath=`${A}${fe.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let C=t.tryWorkspaceByLocator(e),I=C?C.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";u.npm_package_name=fn(e),u.npm_package_version=I;let v;if(C)v=C.cwd;else{let b=t.storedPackages.get(e.locatorHash);if(!b)throw new Error(`Package for ${jr(t.configuration,e)} not found in the project`);let E=t.configuration.getLinkers(),F={project:t,report:new Lt({stdout:new fh.PassThrough,configuration:t.configuration})},N=E.find(U=>U.supportsPackage(b,F));if(!N)throw new Error(`The package ${jr(t.configuration,b)} isn't supported by any of the available linkers`);v=await N.findPackageLocation(b,F)}u.npm_package_json=fe.fromPortablePath(V.join(v,dr.manifest))}let h=tn!==null?`yarn/${tn}`:`yarn/${zp("@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(C=>C.setupScriptEnvironment,t,u,async(C,I,v)=>await Ah(r,C,I,v)),u}async function Bat(t,e,{configuration:r,report:o,workspace:a=null,locator:n=null}){await Iat(async()=>{await oe.mktempPromise(async u=>{let A=V.join(u,"pack.log"),p=null,{stdout:h,stderr:C}=r.getSubprocessStreams(A,{prefix:fe.fromPortablePath(t),report:o}),I=n&&Hc(n)?e1(n):n,v=I?xa(I):"an external project";h.write(`Packing ${v} from sources
`);let b=await $ce(t),E;b!==null?(h.write(`Using ${b.packageManager} for bootstrap. Reason: ${b.reason}
`),E=b.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn
`),E="Yarn");let F=E==="Yarn"&&!b?.packageManagerField;await oe.mktempPromise(async N=>{let U=await N1({binFolder:N,ignoreCorepack:F}),te=new Map([["Yarn Classic",async()=>{let pe=a!==null?["workspace",a]:[],ue=V.join(t,dr.manifest),ye=await oe.readFilePromise(ue),ae=await Gc(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:t,env:U,stdin:p,stdout:h,stderr:C,end:1});if(ae.code!==0)return ae.code;await oe.writeFilePromise(ue,ye),await oe.appendFilePromise(V.join(t,".npmignore"),`/.yarn
`),h.write(`
`),delete U.NODE_ENV;let Ie=await Gc("yarn",["install"],{cwd:t,env:U,stdin:p,stdout:h,stderr:C,end:1});if(Ie.code!==0)return Ie.code;h.write(`
`);let Fe=await Gc("yarn",[...pe,"pack","--filename",fe.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:C});return Fe.code!==0?Fe.code:0}],["Yarn",async()=>{let pe=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let ue=V.join(t,dr.lockfile);await oe.existsPromise(ue)||await oe.writeFilePromise(ue,"");let ye=await Gc("yarn",[...pe,"pack","--install-if-needed","--filename",fe.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:C});return ye.code!==0?ye.code:0}],["npm",async()=>{if(a!==null){let Ee=new fh.PassThrough,De=Ky(Ee);Ee.pipe(h,{end:!1});let ce=await Gc("npm",["--version"],{cwd:t,env:U,stdin:p,stdout:Ee,stderr:C,end:0});if(Ee.end(),ce.code!==0)return h.end(),C.end(),ce.code;let ne=(await De).toString().trim();if(!xf(ne,">=7.x")){let ee=eA(null,"npm"),we=In(ee,ne),be=In(ee,">=7.x");throw new Error(`Workspaces aren't supported by ${qn(r,we)}; please upgrade to ${qn(r,be)} (npm has been detected as the primary package manager for ${_t(r,t,Et.PATH)})`)}}let pe=a!==null?["--workspace",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let ue=await Gc("npm",["install","--legacy-peer-deps"],{cwd:t,env:U,stdin:p,stdout:h,stderr:C,end:1});if(ue.code!==0)return ue.code;let ye=new fh.PassThrough,ae=Ky(ye);ye.pipe(h);let Ie=await Gc("npm",["pack","--silent",...pe],{cwd:t,env:U,stdin:p,stdout:ye,stderr:C});if(Ie.code!==0)return Ie.code;let Fe=(await ae).toString().trim().replace(/^.*\n/s,""),g=V.resolve(t,fe.toPortablePath(Fe));return await oe.renamePromise(g,e),0}]]).get(E);if(typeof te>"u")throw new Error("Assertion failed: Unsupported workflow");let le=await te();if(!(le===0||typeof le>"u"))throw oe.detachTemp(u),new Jt(58,`Packing the package failed (exit code ${le}, logs can be found here: ${_t(r,A,Et.PATH)})`)})})})}async function vat(t,e,{project:r}){let o=r.tryWorkspaceByLocator(t);if(o!==null)return CU(o,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${jr(r.configuration,t)} not found in the project`);return await zl.openPromise(async n=>{let u=r.configuration,A=r.configuration.getLinkers(),p={project:r,report:new Lt({stdout:new fh.PassThrough,configuration:u})},h=A.find(b=>b.supportsPackage(a,p));if(!h)throw new Error(`The package ${jr(r.configuration,a)} isn't supported by any of the available linkers`);let C=await h.findPackageLocation(a,p),I=new gn(C,{baseFs:n});return(await Ot.find(Bt.dot,{baseFs:I})).scripts.has(e)})}async function Wx(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await oe.mktempPromise(async p=>{let{manifest:h,env:C,cwd:I}=await eue(t,{project:a,binFolder:p,cwd:o,lifecycleScript:e}),v=h.scripts.get(e);if(typeof v>"u")return 1;let b=async()=>await RE(v,r,{cwd:I,env:C,stdin:n,stdout:u,stderr:A});return await(await a.configuration.reduceHook(F=>F.wrapScriptExecution,b,a,t,e,{script:v,args:r,cwd:I,env:C,stdin:n,stdout:u,stderr:A}))()})}async function EU(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await oe.mktempPromise(async p=>{let{env:h,cwd:C}=await eue(t,{project:a,binFolder:p,cwd:o});return await RE(e,r,{cwd:C,env:h,stdin:n,stdout:u,stderr:A})})}async function Dat(t,{binFolder:e,cwd:r,lifecycleScript:o}){let a=await N1({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:o});return await IU(e,await nue(t)),typeof r>"u"&&(r=V.dirname(await oe.realpathPromise(V.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function eue(t,{project:e,binFolder:r,cwd:o,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return Dat(n,{binFolder:r,cwd:o,lifecycleScript:a});let u=e.storedPackages.get(t.locatorHash);if(!u)throw new Error(`Package for ${jr(e.configuration,t)} not found in the project`);return await zl.openPromise(async A=>{let p=e.configuration,h=e.configuration.getLinkers(),C={project:e,report:new Lt({stdout:new fh.PassThrough,configuration:p})},I=h.find(N=>N.supportsPackage(u,C));if(!I)throw new Error(`The package ${jr(e.configuration,u)} isn't supported by any of the available linkers
`,{stdout:h,stderr:C}=a.getSubprocessStreams(A,{report:o,prefix:jr(a,t.anchoredLocator),header:p});o.reportInfo(36,`Calling the "${e}" lifecycle script`);let I=await tue(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:C});if(h.end(),C.end(),I!==0)throw oe.detachTemp(u),new Jt(36,`${(0,Jce.default)(e)} script failed (exit code ${_t(a,I,Et.NUMBER)}, logs can be found here: ${_t(a,A,Et.PATH)}); run ${_t(a,`yarn ${e}`,Et.CODE)} to investigate`)})}async function Pat(t,e,r){CU(t,e)&&await rue(t,e,r)}function wU(t){let e=V.extname(t);if(e.match(/\.[cm]?[jt]sx?$/))return!0;if(e===".exe"||e===".bin")return!1;let r=Buffer.alloc(4),o;try{o=oe.openSync(t,"r")}catch{return!0}try{oe.readSync(o,r,0,r.length,0)}finally{oe.closeSync(o)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function Kx(t,{project:e}){let r=e.configuration,o=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${jr(r,t)} not found in the project`);let n=new fh.Writable,u=r.getLinkers(),A={project:e,report:new Lt({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let C of a.dependencies.values()){let I=e.storedResolutions.get(C.descriptorHash);if(!I)throw new Error(`Assertion failed: The resolution (${qn(r,C)}) should have been registered`);p.add(I)}let h=await Promise.all(Array.from(p,async C=>{let I=e.storedPackages.get(C);if(!I)throw new Error(`Assertion failed: The package (${C}) should have been registered`);if(I.bin.size===0)return sl.skip;let v=u.find(E=>E.supportsPackage(I,A));if(!v)return sl.skip;let b=null;try{b=await v.findPackageLocation(I,A)}catch(E){if(E.code==="LOCATOR_NOT_INSTALLED")return sl.skip;throw E}return{dependency:I,packageLocation:b}}));for(let C of h){if(C===sl.skip)continue;let{dependency:I,packageLocation:v}=C;for(let[b,E]of I.bin){let F=V.resolve(v,E);o.set(b,[I,fe.fromPortablePath(F),wU(F)])}}return o}async function nue(t){return await Kx(t.anchoredLocator,{project:t.project})}async function IU(t,e){await Promise.all(Array.from(e,([r,[,o,a]])=>a?Ah(t,r,process.execPath,[o]):Ah(t,r,o,[])))}async function iue(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await Kx(t,{project:a});let C=h.get(e);if(!C)throw new Error(`Binary not found (${e}) for ${jr(a.configuration,t)}`);return await oe.mktempPromise(async I=>{let[,v]=C,b=await N1({project:a,locator:t,binFolder:I});await IU(b.BERRY_BIN_FOLDER,h);let E=wU(fe.toPortablePath(v))?Gc(process.execPath,[...p,v,...r],{cwd:o,env:b,stdin:n,stdout:u,stderr:A}):Gc(v,r,{cwd:o,env:b,stdin:n,stdout:u,stderr:A}),F;try{F=await E}finally{await oe.removePromise(b.BERRY_BIN_FOLDER)}return F.code})}async function Sat(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A}){return await iue(t.anchoredLocator,e,r,{project:t.project,cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A})}var Jce,Xce,fh,Zce,wat,Iat,BU=yt(()=>{Pt();Pt();nA();x1();Jce=$e(mU()),Xce=$e(nd()),fh=Be("stream");AE();Yl();L1();T1();Dx();ql();jl();bf();xo();Zce=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(Zce||{});wat=2,Iat=(0,Xce.default)(wat)});var NE=_((k4t,oue)=>{"use strict";var sue=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);oue.exports=t=>t?Object.keys(t).map(e=>[sue.has(e)?sue.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var ME=_((Q4t,gue)=>{"use strict";var aue=typeof process=="object"&&process?process:{stdout:null,stderr:null},xat=Be("events"),lue=Be("stream"),cue=Be("string_decoder").StringDecoder,Nf=Symbol("EOF"),Of=Symbol("maybeEmitEnd"),ph=Symbol("emittedEnd"),Vx=Symbol("emittingEnd"),O1=Symbol("emittedError"),zx=Symbol("closed"),uue=Symbol("read"),Jx=Symbol("flus
`,a=Buffer.byteLength(o),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+o}};H1.parse=(t,e,r)=>new H1(rlt(nlt(t),e),r);var rlt=(t,e)=>e?Object.keys(t).reduce((r,o)=>(r[o]=t[o],r),e):t,nlt=t=>t.replace(/\n$/,"").split(`
`).reduce(ilt,Object.create(null)),ilt=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let o=e.split("="),a=o.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return t;let n=o.join("=");return t[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};bue.exports=H1});var GE=_((q4t,kue)=>{kue.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)==="/";)r=e,e--;return r===-1?t:t.slice(0,r)}});var sb=_((G4t,Que)=>{"use strict";Que.exports=t=>class extends t{warn(e,r,o={}){this.file&&(o.file=this.file),this.cwd&&(o.cwd=this.cwd),o.code=r instanceof Error&&r.code||e,o.tarCode=e,!this.strict&&o.recoverable!==!1?(r instanceof Error&&(o=Object.assign(r,o),r=r.message),this.emit("warn",o.tarCode,r,o)):r instanceof Error?this.emit("error",Object.assign(r,o)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),o))}}});var e3=_((W4t,Fue)=>{"use strict";var ob=["|","<",">","?",":"],$U=ob.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),slt=new Map(ob.map((t,e)=>[t,$U[e]])),olt=new Map($U.map((t,e)=>[t,ob[e]]));Fue.exports={encode:t=>ob.reduce((e,r)=>e.split(r).join(slt.get(r)),t),decode:t=>$U.reduce((e,r)=>e.split(r).join(olt.get(r)),t)}});var t3=_((K4t,Tue)=>{var{isAbsolute:alt,parse:Rue}=Be("path").win32;Tue.exports=t=>{let e="",r=Rue(t);for(;alt(t)||r.root;){let o=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.substr(o.length),e+=o,r=Rue(t)}return[e,t]}});var Nue=_((V4t,Lue)=>{"use strict";Lue.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var A3=_((X4t,Jue)=>{"use strict";var que=ME(),Gue=ib(),Yue=qE(),oA=Be("fs"),Oue=Be("path"),sA=HE(),llt=GE(),Wue=(t,e)=>e?(t=sA(t).replace(/^\.(\/|$)/,""),llt(e)+"/"+t):sA(t),clt=16*1024*1024,Mue=Symbol("process"),Uue=Symbol("file"),_ue=Symbol("directory"),n3=Symbol("symlink"),Hue=Symbol("hardlink"),j1=Symbol("header"),ab=Symbol("read"),i3=Symbol("lstat"),lb=Symbol("onlstat"),s3=Symbol("onread"),o3=Symbol("onreadlink"),a3=Symbol("openfile"),l3=Symbol("onopenfile"),mh=Symbol("close"),ub=Symbol("mode"),c3=Symbol("awaitDrain"),r3=Symbol("ondrain"),aA=Symbol("prefix"),jue=Symbol("hadError"),Kue=sb(),ult=e3(),Vue=t3(),zue=Nue(),Ab=Kue(class extends que{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=sA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||clt,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=sA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?sA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let o=!1;if(!this.preservePaths){let[a,n]=Vue(this.path);a&&(this.path=n,o=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=ult.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=sA(r.absolute||Oue.resolve(this.cwd,e)),this.path===""&&(this.path="./"),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.statCache.has(this.absolute)?this[lb](this.statCache.get(this.absolute)):this[i3]()}emit(e,...r){return e==="error"&&(this[jue]=!0),super.emit(e,...r)}[i3](){oA.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[lb](r)})}[lb](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=flt(e),this.emit("stat",e),this[Mue]()}[Mue](){switch(this.type){case"File":return this[Uue]();case"Directory":return this[_ue]();case"SymbolicLink":return this[n3]();default:return this.end()}}[ub](e){return zue(e,this.type==="Directory",this.portable)}[aA](e){return Wue(e,this.prefix)}[j1](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new Yue({path:
`}),A},o})});var $s={};Vt($s,{emitList:()=>iut,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:C,value:I,children:v}=h,b=[];typeof C<"u"&&b.push(md(e,C,2)),typeof I<"u"&&b.push(_t(e,I[0],I[1])),b.length===0&&b.push(md(e,`${p}`,2));let E=b.join(": ").trim(),F=`\0${o++}\0`,N=u[`${F}${E}`]={};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 yd(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[sut(n)]=e(u));return typeof r.value>"u"?a:{value:yd(r.value[0],r.value[1]),children:a}};return e(t)}function iut(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))}
`);return}let n=(0,tpe.asTree)(rpe(t,{configuration:e}),!1,!1);if(n=n.replace(/\0[0-9]+\0/g,""),a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
$1`).replace(/^│\n/,"")),a>=2)for(let u=0;u<2;++u)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502 (\\n)?
$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function sut(t){return typeof t=="string"?t.replace(/^\0[0-9]+\0/,""):t}var tpe,spe=yt(()=>{tpe=$e(epe());ql()});function r2(t){let e=t.match(out);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_,Vb,Nr,out,u_=yt(()=>{Ye();Pt();Pt();nA();ope=Be("crypto"),l_=$e(Be("fs"));Yl();rh();jl();xo();c_=Vy(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),Vb=Vy(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:[Vb,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`${aE(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=r2(r).hash.slice(0,10);return`${aE(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:o}=r2(e);if(r===null||r<c_)return!1;let a=this.configuration.get("cacheMigrationMode");return!(r<Vb&&a==="always"||o!==this.cacheSpec&&a!=="required-only")}getLocatorPath(e,r){return this.mirrorCwd===null?V.resolve(this.cwd,this.getVersionFilename(e)):r===null?V.resolve(this.cwd,this.getVersionFilename(e)):V.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?V.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await oe.existsPromise(this.cwd))throw new Jt(56,"Cache path does not exist.")}else{await oe.mkdirPromise(this.cwd,{recursive:!0});let e=V.resolve(this.cwd,".gitignore");await oe.changeFilePromise(e,`/.gitignore
*.flock
*.tmp
`)}(this.mirrorCwd||!this.immutable)&&await oe.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,{onHit:o,onMiss:a,loader:n,...u}){let A=this.getLocatorMirrorPath(e),p=new Tn,h=()=>{let ae=new Ji,Ie=V.join(Bt.root,nM(e));return ae.mkdirSync(Ie,{recursive:!0}),ae.writeJsonSync(V.join(Ie,dr.manifest),{name:fn(e),mocked:!0}),ae},C=async(ae,{isColdHit:Ie,controlPath:Fe=null})=>{if(Fe===null&&u.unstablePackages?.has(e.locatorHash))return{isValid:!0,hash:null};let g=r&&!Ie?r2(r).cacheKey:this.cacheKey,Ee=!u.skipIntegrityCheck||!r?`${g}/${await LS(ae)}`:r;if(Fe!==null){let ce=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await LS(Fe)}`:r;if(Ee!==ce)throw new Jt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}let De=null;switch(r!==null&&Ee!==r&&(this.check?De="throw":r2(r).cacheKey!==r2(Ee).cacheKey?De="update":De=this.configuration.get("checksumBehavior")),De){case null:case"update":return{isValid:!0,hash:Ee};case"ignore":return{isValid:!0,hash:r};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Jt(18,"The remote archive doesn't match the expected checksum")}},I=async ae=>{if(!n)throw new Error(`Cache check required but no loader configured for ${jr(this.configuration,e)}`);let Ie=await n(),Fe=Ie.getRealPath();Ie.saveAndClose(),await oe.chmodPromise(Fe,420);let g=await C(ae,{controlPath:Fe,isColdHit:!1});if(!g.isValid)throw new Error("Assertion failed: Expected a valid checksum");return g.hash},v=async()=>{if(A===null||!await oe.existsPromise(A)){let ae=await n(),Ie=ae.getRealPath();return ae.saveAndClose(),{source:"loader",path:Ie}}return{source:"mirror",path:A}},b=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${jr(this.configuration,e)}`);if(this.immutable)throw new Jt(56,`Cache entry required but missing for ${jr(this.configuration,e)}`);let{path:ae,source:Ie}=await v(),{hash:Fe}=await C(ae,{isColdHit:!0}),g=this.getLocatorPath(e,Fe),Ee=[];Ie!=="mirror"&&A!==null&&Ee.push(async()=>{let ce=`${A}${this.cacheId}`;await oe.copyFilePromise(ae,ce,l_.default.constants.COPYFILE_FICLONE),await oe.chmodPromise(ce,420),await oe.renamePromise(ce,A)}),(!u.mirrorWriteOnly||A===null)&&Ee.push(async()=>{let ce=`${g}${this.cacheId}`;await oe.copyFilePromise(ae,ce,l_.default.constants.COPYFILE_FICLONE),await oe.chmodPromise(ce,420),await oe.renamePromise(ce,g)});let De=u.mirrorWriteOnly?A??g:g;return await Promise.all(Ee.map(ce=>ce())),[!1,De,Fe]},E=async()=>{let Ie=(async()=>{let Fe=u.unstablePackages?.has(e.locatorHash),g=Fe||!r||this.isChecksumCompatible(r)?this.getLocatorPath(e,r):null,Ee=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,De=!!u.mockedPackages?.has(e.locatorHash)&&(!this.check||!Ee),ce=De||Ee,ne=ce?o:a;if(ne&&ne(),ce){let ee=null,we=g;if(!De)if(this.check)ee=await I(we);else{let be=await C(we,{isColdHit:!1});if(be.isValid)ee=be.hash;else return b()}return[De,we,ee]}else{if(this.immutable&&Fe)throw new Jt(56,`Cache entry required but missing for ${jr(this.configuration,e)}; consider defining ${de.pretty(this.configuration,"supportedArchitectures",de.Type.CODE)} to cache packages for multiple systems`);return b()}})();this.mutexes.set(e.locatorHash,Ie);try{return await Ie}finally{this.mutexes.delete(e.locatorHash)}};for(let ae;ae=this.mutexes.get(e.locatorHash);)await ae;let[F,N,U]=await E();F||this.markedFiles.add(N);let z,te=F?()=>h():()=>new Ji(N,{baseFs:p,readOnly:!0}),le=new ny(()=>CN(()=>z=te(),ae=>`Failed to open the cache entry for ${jr(this.configuration,e)}: ${ae}`),V),pe=new Uu(N,{baseFs:le,pathUtils:V}),ue=()=>{z?.discardAndClose()},ye=u.unstablePackages?.has(e.locatorHash)?null:U;return[pe,ue,ye]}},out=/^(?:(?<cacheKey>(?<cacheVersion>[0-9]+)(?<cacheSpec>.*))\/)?(?<hash>.*)$/});var zb,ape=yt(()=>{zb=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(zb||{})});var aut,sC,A_=yt(()=>{Pt();Ll();bf();xo();aut=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,o)=>`${r}#commit=${o}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([
`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,o){}async finalize(){this.errorCount>0&&(this.stdout.write(`
`),this.stdout.write(`${_t(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
`),this.suggestInstall&&this.stdout.write(`${_t(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
`))}formatNameWithHyperlink(r){return yU(r,{configuration:this.configuration,json:!1})}}});var oC,f_=yt(()=>{xo();oC=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(OS(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(e,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,o){let a=o.project.storedResolutions.get(e.descriptorHash);if(a){let u=o.project.originalPackages.get(a);if(u)return[u]}let n=o.project.originalPackages.get(OS(e).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}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 o=r.project.originalPackages.get(e.locatorHash);if(!o)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return o}}});function Yf(){}function lut(t,e,r,o,a){for(var n=0,u=e.length,A=0,p=0;n<u;n++){var h=e[n];if(h.removed){if(h.value=t.join(o.slice(p,p+h.count)),p+=h.count,n&&e[n-1].added){var I=e[n-1];e[n-1]=e[n],e[n]=I}}else{if(!h.added&&a){var C=r.slice(A,A+h.count);C=C.map(function(b,E){var F=o[p+E];return F.length>b.length?F:b}),h.value=t.join(C)}else h.value=t.join(r.slice(A,A+h.count));A+=h.count,h.added||(p+=h.count)}}var v=e[u-1];return u>1&&typeof v.value=="string"&&(v.added||v.removed)&&t.equals("",v.value)&&(e[u-2].value+=v.value,e.pop()),e}function cut(t){return{newPos:t.newPos,components:t.components.slice(0)}}function uut(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function Ape(t,e,r){return r=uut(r,{ignoreWhitespace:!0}),m_.diff(t,e,r)}function Aut(t,e,r){return y_.diff(t,e,r)}function Jb(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Jb=function(e){return typeof e}:Jb=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jb(t)}function p_(t){return hut(t)||gut(t)||dut(t)||mut()}function hut(t){if(Array.isArray(t))return h_(t)}function gut(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function dut(t,e){if(!!t){if(typeof t=="string")return h_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h_(t,e)}}function h_(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}function mut(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g_(t,e,r,o,a){e=e||[],r=r||[],o&&(t=o(a,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var u;if(yut.call(t)==="[object Array]"){for(e.push(t),u=new Array(t.length),r.push(u),n=0;n<t.length;n+=1)u[n]=g_(t[n],e,r,o,a);return e.pop(),r.pop(),u}if(t&&t.toJSON&&(t=t.toJSON()),Jb(t)==="object"&&t!==null){e.push(t),u={},r.push(u);var A=[],p;for(p in t)t.hasOwnProperty(p)&&A.push(p);for(A.sort(),n=0;n<A.length;n+=1)p=A[n],u[p]=g_(t[p],e,r,o,p);e.pop(),r.pop()}else u=t;return u}function fpe(t,e,r,o,a,n,u){u||(u={}),typeof u.context>"u"&&(u.context=4);var A=Aut(r,o,u);if(!A)return;A.push({value:"",lines:[]});function p(U){return U.map(function(z){return" "+z})}for(var h=[],C=0,I=0,v=[],b=1,E=1,F=function(z){var te=A[z],le=te.lines||te.value.replace(/\n$/,"").split(`
`);if(te.lines=le,te.added||te.removed){var pe;if(!C){var ue=A[z-1];C=b,I=E,ue&&(v=u.context>0?p(ue.lines.slice(-u.context)):[],C-=v.length,I-=v.length)}(pe=v).push.apply(pe,p_(le.map(function(ce){return(te.added?"+":"-")+ce}))),te.added?E+=le.length:b+=le.length}else{if(C)if(le.length<=u.context*2&&z<A.length-2){var ye;(ye=v).push.apply(ye,p_(p(le)))}else{var ae,Ie=Math.min(le.length,u.context);(ae=v).push.apply(ae,p_(p(le.slice(0,Ie))));var Fe={oldStart:C,oldLines:b-C+Ie,newStart:I,newLines:E-I+Ie,lines:v};if(z>=A.length-2&&le.length<=u.context){var g=/\n$/.test(r),Ee=/\n$/.test(o),De=le.length==0&&v.length>Fe.oldLines;!g&&De&&r.length>0&&v.splice(Fe.oldLines,0,"\\ No newline at end of file"),(!g&&!De||!Ee)&&v.push("\\ No newline at end of file")}h.push(Fe),C=0,I=0,v=[]}b+=le.length,E+=le.length}},N=0;N<A.length;N++)F(N);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:h}}var XUt,cpe,upe,m_,y_,fut,put,yut,n2,d_,E_=yt(()=>{Yf.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,C=A+p;o.maxEditLength&&(C=Math.min(C,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 b(){for(var F=-1*h;F<=h;F+=2){var N=void 0,U=I[F-1],z=I[F+1],te=(z?z.newPos:0)-F;U&&(I[F-1]=void 0);var le=U&&U.newPos+1<A,pe=z&&0<=te&&te<p;if(!le&&!pe){I[F]=void 0;continue}if(!le||pe&&U.newPos<z.newPos?(N=cut(z),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(lut(n,N.components,r,e,n.useLongestToken));I[F]=N}h++}if(a)(function F(){setTimeout(function(){if(h>C)return a();b()||F()},0)})();else for(;h<=C;){var E=b();if(E)return E}},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("")}};XUt=new Yf;cpe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,upe=/\S/,m_=new Yf;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 Yf;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};fut=new Yf;fut.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};put=new Yf;put.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};yut=Object.prototype.toString,n2=new Yf;n2.useLongestToken=!0;n2.tokenize=y_.tokenize;n2.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," ")};n2.equals=function(t,e){return Yf.prototype.equals.call(n2,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};d_=new Yf;d_.tokenize=function(t){return t.s
`;await oe.changeFilePromise(r,o,{automaticNewlines:!0}),this.manifest.raw=e}}});function QAt({project:t,allDescriptors:e,allResolutions:r,allPackages:o,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:u=new Map,peerWarnings:A=[],volatileDescriptors:p=new Set}){let h=new Map,C=[],I=new Map,v=new Map,b=new Map,E=new Map,F=new Map,N=new Map(t.workspaces.map(ue=>{let ye=ue.anchoredLocator.locatorHash,ae=o.get(ye);if(typeof ae>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[ye,ZI(ae)]})),U=()=>{let ue=oe.mktempSync(),ye=V.join(ue,"stacktrace.log"),ae=String(C.length+1).length,Ie=C.map((Fe,g)=>`${`${g+1}.`.padStart(ae," ")} ${xa(Fe)}
`).join("");throw oe.writeFileSync(ye,Ie),oe.detachTemp(ue),new Jt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${fe.fromPortablePath(ye)}`)},z=ue=>{let ye=r.get(ue.descriptorHash);if(typeof ye>"u")throw new Error("Assertion failed: The resolution should have been registered");let ae=o.get(ye);if(!ae)throw new Error("Assertion failed: The package could not be found");return ae},te=(ue,ye,ae,{top:Ie,optional:Fe})=>{C.length>1e3&&U(),C.push(ye);let g=le(ue,ye,ae,{top:Ie,optional:Fe});return C.pop(),g},le=(ue,ye,ae,{top:Ie,optional:Fe})=>{if(a.has(ye.locatorHash))return;a.add(ye.locatorHash),Fe||n.delete(ye.locatorHash);let g=o.get(ye.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${jr(t.configuration,ye)}) should have been registered`);let Ee=[],De=[],ce=[],ne=[],ee=[];for(let be of Array.from(g.dependencies.values())){if(g.peerDependencies.has(be.identHash)&&g.locatorHash!==Ie)continue;if(Pf(be))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");p.delete(be.descriptorHash);let ht=Fe;if(!ht){let Re=g.dependenciesMeta.get(fn(be));if(typeof Re<"u"){let ze=Re.get(null);typeof ze<"u"&&ze.optional&&(ht=!0)}}let H=r.get(be.descriptorHash);if(!H)throw new Error(`Assertion failed: The resolution (${qn(t.configuration,be)}) should have been registered`);let lt=N.get(H)||o.get(H);if(!lt)throw new Error(`Assertion failed: The package (${H}, resolved from ${qn(t.configuration,be)}) should have been registered`);if(lt.peerDependencies.size===0){te(be,lt,new Map,{top:Ie,optional:ht});continue}let Te,ke,xe=new Set,He;De.push(()=>{Te=tM(be,ye.locatorHash),ke=rM(lt,ye.locatorHash),g.dependencies.delete(be.identHash),g.dependencies.set(Te.identHash,Te),r.set(Te.descriptorHash,ke.locatorHash),e.set(Te.descriptorHash,Te),o.set(ke.locatorHash,ke),Ee.push([lt,Te,ke])}),ce.push(()=>{He=new Map;for(let Re of ke.peerDependencies.values()){let ze=g.dependencies.get(Re.identHash);if(!ze&&t1(ye,Re)&&(ue.identHash===ye.identHash?ze=ue:(ze=In(ye,ue.range),e.set(ze.descriptorHash,ze),r.set(ze.descriptorHash,ye.locatorHash),p.delete(ze.descriptorHash))),(!ze||ze.range==="missing:")&&ke.dependencies.has(Re.identHash)){ke.peerDependencies.delete(Re.identHash);continue}ze||(ze=In(Re,"missing:")),ke.dependencies.set(ze.identHash,ze),Pf(ze)&&dd(b,ze.descriptorHash).add(ke.locatorHash),I.set(ze.identHash,ze),ze.range==="missing:"&&xe.add(ze.identHash),He.set(Re.identHash,ae.get(Re.identHash)??ke.locatorHash)}ke.dependencies=new Map(ks(ke.dependencies,([Re,ze])=>fn(ze)))}),ne.push(()=>{if(!o.has(ke.locatorHash))return;let Re=h.get(lt.locatorHash);typeof Re=="number"&&Re>=2&&U();let ze=h.get(lt.locatorHash),je=typeof ze<"u"?ze+1:1;h.set(lt.locatorHash,je),te(Te,ke,He,{top:Ie,optional:ht}),h.set(lt.locatorHash,je-1)}),ee.push(()=>{let Re=g.dependencies.get(be.identHash);if(typeof Re>"u")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let ze=r.get(Re.descriptorHash);if(typeof ze>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");if(dd(F,ze).add(ye.locatorHash),!!o.has(ke.locatorHash)){for(let je of ke.peerDependencies.values()){let x=He.get(je.identHash);if(typeof x>"u")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");Gy(Yy(E,x),fn(je)).push(ke.locatorHash)}for(let je of xe)ke.dependencies.delete(je)}})}for(let be of[...De,...ce])be();let we;do{we=!0;for(let[be,ht,H]of Ee){let lt=Yy(v,be.locatorHash),Te=Qs(...[...H.dependencies.values()].map(Re=>{let ze=Re.range!=="missing:"?r.get(Re.descriptorHash):"missing:";if(typeof ze>"u")throw new Error(`Assertion failed: Expected the resolution for ${qn(t.configuration,Re)} to have been registered`);return ze===Ie?`${ze} (top)`:ze}),ht.identHash),ke=lt.get(Te);if(typeof ke>"u"){lt.set(Te,ht);continue}if(ke===ht)continue;o.delete(H.locatorHash),e.delete(ht.descriptorHash),r.delete(ht.descriptorHash),a.delete(H.locatorHash);let xe=b.get(ht.descriptorHash)||[],He=[g.locatorHash,...xe];b.delete(ht.descri
${[I,v,b].join(`
`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=V.join(this.cwd,dr.lockfile),r=this.configuration.get("defaultLanguageName");if(oe.existsSync(e)){let o=await oe.readFilePromise(e,"utf8");this.lockFileChecksum=zpe(o);let a=Ki(o);if(a.__metadata){let n=a.__metadata.version,u=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<rk;for(let A of Object.keys(a)){if(A==="__metadata")continue;let p=a[A];if(typeof p.resolution>"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);let h=Sf(p.resolution,!0),C=new Ot;C.load(p,{yamlCompatibilityMode:!0});let I=C.version,v=C.languageName||r,b=p.linkType.toUpperCase(),E=p.conditions??null,F=C.dependencies,N=C.peerDependencies,U=C.dependenciesMeta,z=C.peerDependenciesMeta,te=C.bin;if(p.checksum!=null){let pe=typeof u<"u"&&!p.checksum.includes("/")?`${u}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,pe)}let le={...h,version:I,languageName:v,linkType:b,conditions:E,dependencies:F,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:z,bin:te};this.originalPackages.set(le.locatorHash,le);for(let pe of A.split(SAt)){let ue=nh(pe);n<=6&&(ue=this.configuration.normalizeDependency(ue),ue=In(ue,ue.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(ue.descriptorHash,ue),this.storedResolutions.set(ue.descriptorHash,h.locatorHash)}}}else o.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,tk.default)(4),o=async(a,n)=>{if(e.has(n))return a;e.add(n);let u=new lC(n,{project:this});await r(()=>u.setup());let A=a.then(()=>{this.addWorkspace(u)});return Array.from(u.workspacesCwds).reduce(o,A)};await o(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${cs(this.configuration,e.anchoredLocator)}: ${fe.fromPortablePath(e.cwd)} conflicts with ${fe.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){V.isAbsolute(e)||(e=V.resolve(this.cwd,e)),e=V.normalize(e).replace(/\/+$/,"");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let o of this.workspaces)V.relative(o.cwd,e).startsWith("../")||r&&r.cwd.length>=o.cwd.length||(r=o);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r>"u"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${cs(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(Xn.protocol)){let o=e.range.slice(Xn.protocol.length);if(o!=="^"&&o!=="~"&&o!=="*"&&!ba(o))return this.tryWorkspaceByCwd(o)}let r=this.tryWorkspaceByIdent(e);return r===null||(Pf(e)&&(e=$I(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${qn(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Hc(e)&&(e=e1(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${jr(this.configuration,e)})`);return r}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
`;switch(Te.type){case 0:ke+=`# Script name: ${Te.script}
`;break;case 1:ke+=`# Script code: ${Te.script}
`;break}let xe=null;if(!await oe.mktempPromise(async Re=>{let ze=V.join(Re,"build.log"),{stdout:je,stderr:x}=this.configuration.getSubprocessStreams(ze,{header:ke,prefix:jr(this.configuration,we),report:r}),w;try{switch(Te.type){case 0:w=await Wx(we,Te.script,[],{cwd:lt,project:this,stdin:xe,stdout:je,stderr:x});break;case 1:w=await EU(we,Te.script,[],{cwd:lt,project:this,stdin:xe,stdout:je,stderr:x});break}}catch(R){x.write(R.stack),w=1}if(je.end(),x.end(),w===0)return!0;oe.detachTemp(Re);let S=`${jr(this.configuration,we)} couldn't be built successfully (exit code ${_t(this.configuration,w,Et.NUMBER)}, logs can be found here: ${_t(this.configuration,ze,Et.PATH)})`,y=this.optionalBuilds.has(we.locatorHash);return y?r.reportInfo(9,S):r.reportError(9,S),Vce&&r.reportFold(fe.fromPortablePath(ze),oe.readFileSync(ze,"utf8")),y}))return!1}return!0});ne.push(...H,Promise.allSettled(H).then(lt=>{pe.delete(ee),lt.every(Te=>Te.status==="fulfilled"&&Te.value===!0)&&g.set(we.locatorHash,ht)}))}if(await Uc(ne),ce===pe.size){let ee=Array.from(pe).map(we=>{let be=this.storedPackages.get(we);if(!be)throw new Error("Assertion failed: The package should have been registered");return jr(this.configuration,be)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${ee})`);break}}this.storedBuildState=g,this.skippedBuilds=N}async installWithNewReport(e,r){return(await Lt.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(C=>C.validateProject,this,{reportWarning:(C,I)=>{e.report.reportWarning(C,I)},reportError:(C,I)=>{e.report.reportError(C,I),o=!0}})}),o)return;let a=await this.configuration.getPackageExtensions();for(let C of a.values())for(let[,I]of C)for(let v of I)v.status="inactive";let n=V.join(this.cwd,dr.lockfile),u=null;if(e.immutable)try{u=await oe.readFilePromise(n,"utf8")}catch(C){throw C.code==="ENOENT"?new Jt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):C}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[,C]of a)for(let[,I]of C)for(let v of I)if(v.userProvided){let b=_t(this.configuration,v,Et.PACKAGE_EXTENSION);switch(v.status){case"inactive":e.report.reportWarning(68,`${b}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":e.report.reportWarning(69,`${b}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(u!==null){let C=Mg(u,this.generateLockfile());if(C!==u){let I=fpe(n,n,u,C,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 b of v.lines)b.startsWith("+")?e.report.reportError(28,_t(this.configuration,b,Et.ADDED)):b.startsWith("-")?e.report.reportError(28,_t(this.configuration,b,Et.REMOVED)):e.report.reportInfo(null,_t(this.configuration,b,"grey"))}e.report.reportSeparator()}throw new Jt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let C of a.values())for(let[,I]of C)for(let v of I)v.userProvided&&v.status==="active"&&Ke.telemetry?.reportPackageExtension(yd(v,Et.PACKAGE_EXTENSION));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverythi
`,`# Manual changes might be lost - proceed with caution!
`].join("")}
`+Ba(r)}async persistLockfile(){let e=V.join(this.cwd,dr.lockfile),r="";try{r=await oe.readFilePromise(e,"utf8")}catch{}let o=this.generateLockfile(),a=Mg(r,o);a!==r&&(await oe.writeFilePromise(e,a),this.lockFileChecksum=zpe(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let u of Object.values(x_))e.push(...u);let r=(0,ek.default)(this,e),o=b_.default.serialize(r),a=Qs(o);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await oe.mkdirPromise(V.dirname(n),{recursive:!0}),await oe.writeFilePromise(n,await bAt(o)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:o=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let u=await kAt(await oe.readFilePromise(a));n=b_.default.deserialize(u),this.installStateChecksum=Qs(u)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),o&&Object.assign(this,(0,ek.default)(n,x_.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,ek.default)(n,x_.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Qi}),await this.persistInstallStateFile()}async persist(){let e=(0,tk.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return null;let o=new Set([".gitignore"]);if(!CM(e.cwd,this.cwd)||!await oe.existsPromise(e.cwd))return null;let a=[];for(let u of await oe.readdirPromise(e.cwd)){if(o.has(u))continue;let A=V.resolve(e.cwd,u);e.markedFiles.has(A)||(e.immutable?r.reportError(56,`${_t(this.configuration,V.basename(A),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(oe.lstatPromise(A).then(async p=>(await oe.removePromise(A),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((u,A)=>u+A,0)}}}});function RAt(t){let o=Math.floor(t.timeNow/864e5),a=t.updateInterval*864e5,n=t.state.lastUpdate??t.timeNow+a+Math.floor(a*t.randomInitialInterval),u=n+a,A=t.state.lastTips??o*864e5,p=A+864e5+8*36e5-t.timeZone,h=u<=t.timeNow,C=p<=t.timeNow,I=null;return(h||C||!t.state.lastUpdate||!t.state.lastTips)&&(I={},I.lastUpdate=h?t.timeNow:n,I.lastTips=A,I.blocks=h?{}:t.state.blocks,I.displayedTips=t.state.displayedTips),{nextState:I,triggerUpdate:h,triggerTips:C,nextTips:C?o*864e5:A}}var cC,Zpe=yt(()=>{Pt();T1();rh();Ix();jl();bf();cC=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=e;let o=this.getRegistryPath();this.isNew=!oe.existsSync(o),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(e){let r=new Set(this.displayedTips),o=A=>A&&tn?xf(tn,A):!1,a=e.map((A,p)=>p).filter(A=>e[A]&&o(e[A]?.selector));if(a.length===0)return null;let n=a.filter(A=>!r.has(A));if(n.length===0){let A=Math.floor(a.length*.2);this.displayedTips=A>0?this.displayedTips.slice(-A):[],n=a.filter(p=>!r.has(p))}let u=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(u),this.commitTips(),e[u]}reportVersion(e){this.reportValue("version",e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue("commandName",e||"<none>")}reportPluginName(e){this.reportValue("pluginName",e)}reportProject(e){this.reportEnumerator("projectCount",e)}reportInstall(e){this.reportHit("installCount",e)}reportPackageExtension(e){this.reportValue("packageExtension",e)}reportWorkspaceCount(e){this.reportValue("workspaceCount",String(e))}reportDependencyCount(e){this.reportValue("dependencyCount",String(e))}reportValue(e,r){dd(this.values,e).add(r)}reportEnumerator(e,r){dd(this.enumerators,e).add(Qs(r))}reportHit(e,r="*"){let o=Yy(this.hits,e),a=ol(o,r
`),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=C=>o(C,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=MAt,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(!OAt(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};R_.exports=she();R_.exports.create=she});var Lo=_(nn=>{"use strict";var UAt=Object.prototype.toString,rc=Kc(),ohe=!1,T_=[],ahe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};nn.longest=(t,e)=>t.reduce((r,o)=>Math.max(r,e?o[e].length:o.length),0);nn.hasColor=t=>!!t&&rc.hasColor(t);var ik=nn.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);nn.nativeType=t=>UAt.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");nn.isAsyncFn=t=>nn.nativeType(t)==="asyncfunction";nn.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";nn.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;nn.scrollDown=(t=[])=>[...t.slice(1),t[0]];nn.scrollUp=(t=[])=>[t.pop(),...t];nn.reorder=(t=[])=>{let e=t.slice();return e.sort((r,o)=>r.index>o.index?1:r.index<o.index?-1:0),e};nn.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};nn.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};nn.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};nn.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(C=>C.replace(/\n$/,"")),e.padEnd&&(h=h.map(C=>C.padEnd(a," "))),e.padStart&&(h=h.map(C=>C.padStart(a," "))),r+h.join(o)};nn.unmute=t=>{let e=t.stack.find(o=>rc.keys.color.includes(o));return e?rc[e]:t.stack.find(o=>o.slice(2)==="bg")?rc[e.slice(2)]:o=>o};nn.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";nn.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>rc.keys.color.includes(o));if(e){let o=rc["bg"+nn.pascal(e)];return o?o.black:t}let r=t.stack.find(o=>o.slice(0,2)==="bg");return r?rc[r.slice(2).toLowerCase()]||t:rc.none};nn.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>rc.keys.color.includes(o)),r=t.stack.find(o=>o.slice(0,2)==="bg");if(e&&!r)return rc[ahe[e]||e];if(r){let o=r.slice(2).toLowerCase(),a=ahe[o];return a&&rc["bg"+nn.pascal(a)]||t}return rc.none};nn.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};nn.set=(t={},e="",r)=>e.split(".").reduce((o,a,n,u)=>{let A=u.length-1>n?o[a]||{}:r;return!nn.isObject(A)&&n<u.length-1&&(A={}),o[a]=A},t);nn.get=(t={},e="",r)=>{let o=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return o??r};nn.mixin=(t,e)=>{if(!ik(t))return e;if(!ik(e))return t;for(let r of Object.keys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(o.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&ik(o.value)){let a=Object.getOwnPropertyDescriptor(t,r);ik(a.value)?t[r]=nn.merge({},t[r],e[r]):Reflect.defineProperty(t,r,o)}else Reflect.defineProperty(t,r,o);else Reflect.defineProperty(t,r,o)}return t};nn.merge=(...t)=>{let e={};for(let r of t)nn.mixin(e,r);return e};nn.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let o of Object.keys(r)){let a=r[o];typeof a=="function"?nn.define(t,o,a.bind(e)):nn.define(t,o,a)}};nn.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)};nn.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};nn.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=_(pC=>{"use strict";pC.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"};pC.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};pC.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};pC.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};pC.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=_((Y_t,uhe)=>{"use strict";var che=Be("readline"),_At=lhe(),HAt=/^(?:\x1b)([a-zA-Z0-9])$/,jAt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,qAt={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.name="enter";else if(t===" ")o.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")o.name="backspace",o.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")o.name="escape",o.meta=t.length===2;else if(t===" "||t==="\x1B ")o.name="space",o.meta=t.length===2;else if(t<="")o.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),o.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")o.name="number";else if(t.length===1&&t>="a"&&t<="z")o.name=t;else if(t.length===1&&t>="A"&&t<="Z")o.name=t.toLowerCase(),o.shift=!0;else if(r=HAt.exec(t))o.meta=!0,o.shift=/^[A-Z]$/.test(r[1]);else if(r=jAt.exec(t)){let a=[...t];a[0]==="\x1B"&&a[1]==="\x1B"&&(o.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),u=(r[3]||r[5]||1)-1;o.ctrl=!!(u&4),o.meta=!!(u&10),o.shift=!!(u&1),o.code=n,o.name=qAt[n],o.shift=GAt(n)||o.shift,o.ctrl=YAt(n)||o.ctrl}return o};sk.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let o=che.createInterface({terminal:!0,input:r});che.emitKeypressEvents(r,o);let a=(A,p)=>e(A,sk(A,p),o),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),o.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),o.pause(),o.close()}};sk.action=(t,e,r)=>{let o={..._At,...r};return e.ctrl?(e.action=o.ctrl[e.name],e):e.option&&o.option?(e.action=o.option[e.name],e):e.shift?(e.action=o.shift[e.name],e):(e.action=o.keys[e.name],e)};uhe.exports=sk});var phe=_((W_t,fhe)=>{"use strict";fhe.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let o=e[r];typeof o=="number"&&(o={interval:o}),WAt(t,r,o)}};function WAt(t,e,r={}){let o=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;o.frames=r.frames||[],o.loading=!0;let n=setInterval(()=>{o.ms=Date.now()-o.start,o.tick++,t.render()},a);return o.stop=()=>{o.loading=!1,clearInterval(n)},Reflect.defineProperty(o,"interval",{value:n}),t.once("close",()=>o.stop()),o.stop}});var ghe=_((K_t,hhe)=>{"use strict";var{define:KAt,width:VAt}=Lo(),L_=class{constructor(e){let r=e.options;KAt(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=VAt(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};hhe.exports=L_});var mhe=_((V_t,dhe)=>{"use strict";var N_=Lo(),eo=Kc(),O_={default:eo.noop,noop:eo.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||N_.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||N_.complement(this.primary)},primary:eo.cyan,success:eo.green,danger:eo.magenta,strong:eo.bold,warning:eo.yellow,muted:eo.dim,disabled:eo.gray,dark:eo.dim.gray,underline:eo.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typin
`),h=p[0],C=p[p.length-1],v=(o+(r?" "+r:"")).length,b=v<h.length?h.slice(v+1):"";return{header:u,prompt:h,after:b,rest:p.slice(1),last:C}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`
`+this.symbols.pointer+" ";typeof e=="string"?r+=e.trim():r+="Invalid input",this.state.error=`
`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(Gd.cursor.down(e.rest.length)),this.write(`
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=q_.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:o}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>o.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,o){let{options:a,state:n,symbols:u,timers:A}=this,p=A&&A[e];n.timer=p;let h=a[e]||n[e]||u[e],C=r&&r[e]!=null?r[e]:await h;if(C==="")return C;let I=await this.resolve(C,n,r,o);return!I&&r&&r[e]?this.resolve(h,n,r,o):I}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,o=this.state;return o.timer=r,Ra.isObject(e)&&(e=e[o.status]||e.pending),Ra.hasColor(e)?e:(this.styles[o.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return Ra.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,o=this.state;o.timer=r;let a=e[o.status]||e.pending||o.separator,n=await this.resolve(a,o);return Ra.isObject(n)&&(n=n[o.status]||n.pending),Ra.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let o=await this.element("pointer",e,r);if(typeof o=="string"&&Ra.hasColor(o))return o;if(o){let a=this.styles,n=this.index===r,u=n?a.primary:h=>h,A=await this.resolve(o[n?"on":"off"]||o,this.state),p=Ra.hasColor(A)?A:u(A);return n?p:" ".repeat(A.length)}}async indicator(e,r){let o=await this.element("indicator",e,r);if(typeof o=="string"&&Ra.hasColor(o))return o;if(o){let a=this.styles,n=e.enabled===!0,u=n?a.success:a.dark,A=o[n?"on":"off"]||o;return Ra.hasColor(A)?A:u(A)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return Ra.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return Ra.resolve(this,e,...r)}get base(){return a2.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Ra.height(this.stdout,25)}get width(){return this.options.columns||Ra.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,o=[r,e].find(this.isValue.bind(this));return this.isValue(o)?o:this.initial}static get prompt(){return e=>new this(e).run()}};function ift(t){let e=a=>t[a]===void 0||typeof t[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],o=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n=="function"&&e(a)?o.includes(a)||(t[a]=n.bind(t)):typeof t[a]!="function"&&(t[a]=n)}}function sft(t){t
`:" ",o=[];for(let a=0;a<4;a++){let n=r(a);e[a]?o.push(n.repeat(e[a])):o.push("")}return o}xhe.exports=a2});var Qhe=_((Z_t,khe)=>{"use strict";var oft=Lo(),bhe={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 bhe.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=oft.merge({},bhe,e.roles);return r[t]||r.default}});var l2=_(($_t,The)=>{"use strict";var aft=Kc(),lft=hC(),cft=Qhe(),ok=Lo(),{reorder:G_,scrollUp:uft,scrollDown:Aft,isObject:Fhe,swap:fft}=ok,Y_=class extends lft{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");Fhe(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=cft(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,ok.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,aft.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
`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,o].filter(Boolean).join(`
`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,o="",a=await this.header(),n=await this.prefix(),u=await this.separator(),A=await this.message();this.options.promptLine!==!1&&(o=[n,A,u,""].join(" "),this.state.prompt=o);let p=await this.format(),h=await this.error()||await this.hint(),C=await this.renderChoices(),I=await this.footer();p&&(o+=p),h&&!o.includes(h)&&(o+=" "+h),e&&!p&&!C.trim()&&this.multiple&&this.emptyError!=null&&(o+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,C,I].filter(Boolean).join(`
`)),this.write(this.margin[2]),this.restore()}};Lhe.exports=K_});var Ohe=_((t8t,Nhe)=>{"use strict";var hft=Sh(),gft=(t,e)=>{let r=t.toLowerCase();return o=>{let n=o.toLowerCase().indexOf(r),u=e(o.slice(n,n+r.length));return n>=0?o.slice(0,n)+u+o.slice(n+r.length):o}},V_=class extends hft{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:o}=this.state;return this.input=o.slice(0,r)+e+o.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let o=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(o))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=gft(this.input,e),o=this.choices;this.choices=o.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=o}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};Nhe.exports=V_});var J_=_((r8t,Mhe)=>{"use strict";var z_=Lo();Mhe.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:o="",pos:a,showCursor:n=!0,color:u}=e,A=u||t.styles.placeholder,p=z_.inverse(t.styles.primary),h=F=>p(t.styles.black(F)),C=r,I=" ",v=h(I);if(t.blink&&t.blink.off===!0&&(h=F=>F,v=""),n&&a===0&&o===""&&r==="")return h(I);if(n&&a===0&&(r===o||r===""))return h(o[0])+A(o.slice(1));o=z_.isPrimitive(o)?`${o}`:"",r=z_.isPrimitive(r)?`${r}`:"";let b=o&&o.startsWith(r)&&o!==r,E=b?h(o[r.length]):v;if(a!==r.length&&n===!0&&(C=r.slice(0,a)+h(r[a])+r.slice(a+1),E=""),n===!1&&(E=""),b){let F=t.styles.unstyle(C+E);return C+E+A(o.slice(F.length))}return C+E}});var ak=_((n8t,Uhe)=>{"use strict";var dft=Kc(),mft=Sh(),yft=J_(),X_=class extends mft{constructor(e){super({...e,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:o,input:a}=r;return r.value=r.input=a.slice(0,o)+e+a.slice(o),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:o}=e;return e.value=e.input=o.slice(0,r-1)+o.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:o}=e;if(o[r]===void 0)return this.alert();let a=`${o}`.slice(0,r)+`${o}`.slice(r+1);return e.value=e.input=a,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:o}=e;return r&&r.startsWith(o)&&o!
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};Yhe.exports=$_});var Khe=_((a8t,Whe)=>{"use strict";var Pft=lk(),e8=class extends Pft{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};Whe.exports=e8});var zhe=_((l8t,Vhe)=>{"use strict";var Sft=Sh(),xft=ak(),gC=xft.prototype,t8=class extends Sft{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let o=this.focused,a=o.parent||{};return!o.editable&&!a.editable&&(e==="a"||e==="i")?super[e]():gC.dispatch.call(this,e,r)}append(e,r){return gC.append.call(this,e,r)}delete(e,r){return gC.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?gC.next.call(this):super.next()}prev(){return this.focused.editable?gC.prev.call(this):super.prev()}async indicator(e,r){let o=e.indicator||"",a=e.editable?o:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?gC.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let o=r.parent?this.value[r.parent.name]:this.value;if(r.editable?o=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(o=r.enabled===!0),e=await r.validate(o,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};Vhe.exports=t8});var Yd=_((c8t,Jhe)=>{"use strict";var bft=hC(),kft=J_(),{isPrimitive:Qft}=Lo(),r8=class extends bft{constructor(e){super(e),this.initial=Qft(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let o=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!o||o.name!=="return")?this.append(`
`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:o}=this.state;this.input=`${o}`.slice(0,r)+e+`${o}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),o=this.input.slice(e),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=o,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):kft(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),o=await this.separator(),a=await this.message(),n=[r,a,o].filter(Boolean).join(" ");this.state.prompt=n;let u=await this.header(),A=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!A.includes(p)&&(A+=" "+p),n+=" "+A,this.clear(e),this.write([u,n,h].filter(Boolean).join(`
`)),this.restore()}};Jhe.exports=r8});var Zhe=_((u8t,Xhe)=>{"use strict";var Fft=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),ck=t=>Fft(t).filter(Boolean);Xhe.exports=(t,e={},r="")=>{let{past:o=[],present:a=""}=e,n,u;switch(t){case"prev":case"undo":return n=o.slice(0,o.length-1),u=o[o.length-1]||"",{past:ck([r,...n]),present:u};case"next":case"redo":return n=o.slice(1),u=o[0]||"",{past:ck([...n,r]),present:u};case"save":return{past:ck([...o,r]),present:""};case"remove":return u=ck(o.filter(A=>A!==r)),a="",u.length&&(a=u.pop()),{past:u,present:a};default:throw new Error(`Invalid action: "${t}"`)}}});var i8=_((A8t,e0e)=>{"use strict";var Rft=Yd(),$he=Zhe(),n8=class extends Rft{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let o=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:o},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=$he(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){!this.store||(this.data=$he("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};e0e.exports=n8});var r0e=_((f8t,t0e)=>{"use strict";var Tft=Yd(),s8=class extends Tft{format(){return""}};t0e.exports=s8});var i0e=_((p8t,n0e)=>{"use strict";var Lft=Yd(),o8=class extends Lft{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};n0e.exports=o8});var o0e=_((h8t,s0e)=>{"use strict";var Nft=Sh(),a8=class extends Nft{constructor(e){super({...e,multiple:!0})}};s0e.exports=a8});var c8=_((g8t,a0e)=>{"use strict";var Oft=Yd(),l8=class extends Oft{constructor(e={}){super({style:"number",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,o=this.toNumber(this.input);return o>this.max+r?this.alert():(this.input=`${o+r}`,this.render())}down(e){let r=e||this.minor,o=this.toNumber(this.input);return o<this.min-r?this.alert():(this.input=`${o-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format=="function"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=""){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};a0e.exports=l8});var c0e=_((d8t,l0e)=>{l0e.exports=c8()});var A0e=_((m8t,u0e)=>{"use strict";var Mft=Yd(),u8=class extends Mft{constructor(e){super(e),this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}};u0e.exports=u8});var h0e=_((y8t,p0e)=>{"use strict";v
`;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((o,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let o=0;o<this.scale.length;o++)r.scale.push({index:o})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,o){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(o=>` ${o.name} - ${o.message}`)].map(o=>this.styles.muted(o)).join(`
`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let o=this.scaleLength-r.join("").length,a=Math.round(o/(r.length-1)),u=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),A=" ".repeat(this.widths[0]);return this.margin[3]+A+this.margin[1]+u}scaleIndicator(e,r,o){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,o);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let o=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term==="Hyper"?"":" ";return o.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!f0e.hasColor(n)&&(n=this.styles.muted(n));let u=E=>this.margin[3]+E.replace(/\s+$/,"").padEnd(this.widths[0]," "),A=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),C=await this.renderScale(e,r),I=this.margin[1]+this.margin[3];this.scaleLength=Uft.unstyle(C).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-I.length);let b=f0e.wordWrap(h,{width:this.widths[0],newline:A}).split(`
`).map(E=>u(E)+this.margin[1]);return o&&(C=this.styles.info(C),b=b.map(E=>this.styles.info(E))),b[0]+=C,this.linebreak&&b.push(""),[p+a,b.join(`
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),o=await this.renderScaleHeading();return this.margin[0]+[o,...r.map(a=>a.join(" "))].join(`
`)}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u="";this.options.promptLine!==!1&&(u=[o,n,a,""].join(" "),this.state.prompt=u);let A=await this.header(),p=await this.format(),h=await this.renderScaleKey(),C=await this.error()||await this.hint(),I=await this.renderChoices(),v=await this.footer(),b=this.emptyError;p&&(u+=p),C&&!u.includes(C)&&(u+=" "+C),e&&!p&&!I.trim()&&this.multiple&&b!=null&&(u+=this.styles.danger(b)),this.clear(r),this.write([A,u,h,I,v].filter(Boolean).join(`
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};p0e.exports=A8});var m0e=_((E8t,d0e)=>{"use strict";var g0e=Kc(),Hft=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",p8=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=Hft(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},jft=async(t={},e={},r=o=>o)=>{let o=new Set,a=t.fields||[],n=t.template,u=[],A=[],p=[],h=1;typeof n=="function"&&(n=await n());let C=-1,I=()=>n[++C],v=()=>n[C+1],b=E=>{E.line=h,u.push(E)};for(b({type:"bos",value:""});C<n.length-1;){let E=I();if(/^[^\S\n ]$/.test(E)){b({type:"text",value:E});continue}if(E===`
`){b({type:"newline",value:E}),h++;continue}if(E==="\\"){E+=I(),b({type:"text",value:E});continue}if((E==="$"||E==="#"||E==="{")&&v()==="{"){let N=I();E+=N;let U={type:"template",open:E,inner:"",close:"",value:E},z;for(;z=I();){if(z==="}"){v()==="}"&&(z+=I()),U.value+=z,U.close=z;break}z===":"?(U.initial="",U.key=U.inner):U.initial!==void 0&&(U.initial+=z),U.value+=z,U.inner+=z}U.template=U.open+(U.initial||U.inner)+U.close,U.key=U.key||U.inner,e.hasOwnProperty(U.key)&&(U.initial=e[U.key]),U=r(U),b(U),p.push(U.key),o.add(U.key);let te=A.find(le=>le.name===U.key);U.field=a.find(le=>le.name===U.key),te||(te=new p8(U),A.push(te)),te.lines.push(U.line-1);continue}let F=u[u.length-1];F.type==="text"&&F.line===h?F.value+=E:b({type:"text",value:E})}return b({type:"eos",value:""}),{input:n,tabstops:u,unique:o,keys:p,items:A}};d0e.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),o={...e.values,...e.initial},{tabstops:a,items:n,keys:u}=await jft(e,o),A=f8("result",t,e),p=f8("format",t,e),h=f8("validate",t,e,!0),C=t.isValue.bind(t);return async(I={},v=!1)=>{let b=0;I.required=r,I.items=n,I.keys=u,I.output="";let E=async(z,te,le,pe)=>{let ue=await h(z,te,le,pe);return ue===!1?"Invalid field "+le.name:ue};for(let z of a){let te=z.value,le=z.key;if(z.type!=="template"){te&&(I.output+=te);continue}if(z.type==="template"){let pe=n.find(Fe=>Fe.name===le);e.required===!0&&I.required.add(pe.name);let ue=[pe.input,I.values[pe.value],pe.value,te].find(C),ae=(pe.field||{}).message||z.inner;if(v){let Fe=await E(I.values[le],I,pe,b);if(Fe&&typeof Fe=="string"||Fe===!1){I.invalid.set(le,Fe);continue}I.invalid.delete(le);let g=await A(I.values[le],I,pe,b);I.output+=g0e.unstyle(g);continue}pe.placeholder=!1;let Ie=te;te=await p(te,I,pe,b),ue!==te?(I.values[le]=ue,te=t.styles.typing(ue),I.missing.delete(ae)):(I.values[le]=void 0,ue=`<${ae}>`,te=t.styles.primary(ue),pe.placeholder=!0,I.required.has(le)&&I.missing.add(ae)),I.missing.has(ae)&&I.validating&&(te=t.styles.warning(ue)),I.invalid.has(le)&&I.validating&&(te=t.styles.danger(ue)),b===I.index&&(Ie!==te?te=t.styles.underline(te):te=t.styles.heading(g0e.unstyle(te))),b++}te&&(I.output+=te)}let F=I.output.split(`
`).map(z=>" "+z),N=n.length,U=0;for(let z of n)I.invalid.has(z.name)&&z.lines.forEach(te=>{F[te][0]===" "&&(F[te]=I.styles.danger(I.symbols.bullet)+F[te].slice(1))}),t.isValue(I.values[z.name])&&U++;return I.completed=(U/N*100).toFixed(0),I.output=F.join(`
`),I.output}};function f8(t,e,r,o){return(a,n,u,A)=>typeof u.field[t]=="function"?u.field[t].call(e,a,n,u,A):[o,a].find(p=>e.isValue(p))}});var E0e=_((C8t,y0e)=>{"use strict";var qft=Kc(),Gft=m0e(),Yft=hC(),h8=class extends Yft{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await Gft(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let o=this.getItem(),a=o.input.slice(0,this.cursor),n=o.input.slice(this.cursor);this.input=o.input=`${a}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),o=e.input.slice(0,this.cursor-1);this.input=e.input=`${o}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:o,size:a}=this.state,n=[this.options.newline,`
`].find(z=>z!=null),u=await this.prefix(),A=await this.separator(),p=await this.message(),h=[u,p,A].filter(Boolean).join(" ");this.state.prompt=h;let C=await this.header(),I=await this.error()||"",v=await this.hint()||"",b=o?"":await this.interpolate(this.state),E=this.state.key=r[e]||"",F=await this.format(E),N=await this.footer();F&&(h+=" "+F),v&&!F&&this.state.completed===0&&(h+=" "+v),this.clear(a);let U=[C,h,b,N,I.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:o,index:a}=this.state,n=r.find(u=>u.name===o[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:o,values:a}=this.state;if(e.size){let A="";for(let[p,h]of e)A+=`Invalid ${p}: ${h}
`;return this.state.error=A,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let u=qft.unstyle(o).split(`
`).map(A=>A.slice(1)).join(`
`);return this.value={values:a,result:u},super.submit()}};y0e.exports=h8});var w0e=_((w8t,C0e)=>{"use strict";var Wft="(Use <shift>+<up/down> to sort)",Kft=Sh(),g8=class extends Kft{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,Wft].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let o=await super.renderChoice(e,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+o:n+o}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};C0e.exports=g8});var B0e=_((I8t,I0e)=>{"use strict";var Vft=l2(),d8=class extends Vft{constructor(e={}){if(super(e),this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(o=>this.styles.muted(o)),this.state.header=r.join(`
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let o of r)o.scale=zft(5,this.options),o.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],o=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!o,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=this.term==="Hyper",n=a?9:8,u=a?"":" ",A=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=te=>(te?this.styles.success("\u25C9"):"\u25EF")+u,C=r+1+".",I=o?this.styles.heading:this.styles.noop,v=await this.resolve(e.message,this.state,e,r),b=this.indent(e),E=b+e.scale.map((te,le)=>h(le===e.scaleIdx)).join(A),F=te=>te===e.scaleIdx?I(te):te,N=b+e.scale.map((te,le)=>F(le)).join(p),U=()=>[C,v].filter(Boolean).join(" "),z=()=>[U(),E,N," "].filter(Boolean).join(`
`);return o&&(E=this.styles.cyan(E),N=this.styles.cyan(N)),z()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(o,a)=>await this.renderChoice(o,a)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=[o,n,a].filter(Boolean).join(" ");this.state.prompt=u;let A=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),C=await this.renderChoices(),I=await this.footer();(p||!h)&&(u+=" "+p),h&&!u.includes(h)&&(u+=" "+h),e&&!p&&!C&&this.multiple&&this.type!=="form"&&(u+=this.styles.danger(this.emptyError)),this.clear(r),this.write([u,A,C,I].filter(Boolean).join(`
`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function zft(t,e={}){if(Array.isArray(e.scale))return e.scale.map(o=>({...o}));let r=[];for(let o=1;o<t+1;o++)r.push({i:o,selected:!1});return r}I0e.exports=d8});var D0e=_((B8t,v0e)=>{v0e.exports=i8()});var S0e=_((v8t,P0e)=>{"use strict";var Jft=lk(),m8=class extends Jft{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=o=>this.styles.primary.underline(o);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),o=await this.prefix(),a=await this.separator(),n=await this.message(),u=await this.format(),A=await this.error()||await this.hint(),p=await this.footer(),h=[o,n,a,u].join(" ");this.state.prompt=h,A&&!h.includes(A)&&(h+=" "+A),this.clear(e),this.write([r,h,p].filter(Boolean).join(`
`)),this.write(this.margin[2]),this.restore()}};P0e.exports=m8});var b0e=_((D8t,x0e)=>{"use strict";var Xft=Sh(),y8=class extends Xft{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)}}};x0e.exports=y8});var Q0e=_(E8=>{"use strict";var k0e=Lo(),As=(t,e)=>{k0e.defineExport(E8,t,e),k0e.defineExport(E8,t.toLowerCase(),e)};As("AutoComplete",()=>Ohe());As("BasicAuth",()=>Ghe());As("Confirm",()=>Khe());As("Editable",()=>zhe());As("Form",()=>ak());As("Input",()=>i8());As("Invisible",()=>r0e());As("List",()=>i0e());As("MultiSelect",()=>o0e());As("Numeral",()=>c0e());As("Password",()=>A0e());As("Scale",()=>h0e());As("Select",()=>Sh());As("Snippet",()=>E0e());As("Sort",()=>w0e());As("Survey",()=>B0e());As("Text",()=>D0e());As("Toggle",()=>S0e());As("Quiz",()=>b0e())});var R0e=_((S8t,F0e)=>{F0e.exports={ArrayPrompt:l2(),AuthPrompt:Z_(),BooleanPrompt:lk(),NumberPrompt:c8(),StringPrompt:Yd()}});var u2=_((x8t,L0e)=>{"use strict";var T0e=Be("assert"),w8=Be("events"),xh=Lo(),zc=class extends w8{constructor(e,r){super(),this.options=xh.merge({},e),this.answers={...r}}register(e,r){if(xh.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(xh.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=xh.merge({},this.options,e),{type:o,name:a}=e,{set:n,get:u}=xh;if(typeof o=="function"&&(o=await o.call(this,e,this.answers)),!o)return this.answers[a];T0e(this.prompts[o],`Prompt "${o}" is not registered`);let A=new this.prompts[o](r),p=u(this.answers,a);A.state.answers=this.answers,A.enquirer=this,a&&A.on("submit",C=>{this.emit("answer",a,C,A),n(this.answers,a,C)});let h=A.emit.bind(A);return A.emit=(...C)=>(this.emit.call(this,...C),h(...C)),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||hC()}static get prompts(){return Q0e()}static get types(){return R0e()}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 xh.mixinEmitter(e,new w8),e}};xh.mixinEmitter(zc,new w8);var C8=zc.prompts;for(let t of Object.keys(C8)){let e=t.toLowerCase(),r=o=>new C8[t](o).run();zc.prompt[e]=r,zc[e]=r,zc[t]||Reflect.defineProperty(zc,t,{get:()=>C8[t]})}var c2=t=>{xh.defineExport(zc,t,()=>zc.types[t])};c2("ArrayPrompt");c2("AuthPrompt");c2("BooleanPrompt");c2("NumberPrompt");c2("StringPrompt");L0e.exports=zc});var h2=_((uHt,j0e)=>{var npt=Xb();function ipt(t,e,r){var o=t==null?void 0:npt(t,e);return o===void 0?r:o}j0e.exports=ipt});var Y0e=_((dHt,G0e)=>{function spt(t,e){for(var r=-1,o=t==null?0:t.length;++r<o&&e(t[r],r,t)!==!1;);return t}G0e.exports=spt});var K0e=_((mHt,W0e)=>{var opt=gd(),apt=zP();function lpt(t,e){return t&&opt(e,apt(e),t)}W0e.exports=lpt});var z0e=_((yHt,V0e)=>{var cpt=gd(),upt=qy();function Apt(t,e){return t&&cpt(e,upt(e),t)}V0e.exports=Apt});var
${z} at ${te}`:`
${z}`}).join("");h.push({text:`Conflict detected in constraint targeting ${de.pretty(t.configuration,b,de.Type.CODE)}; conflicting values are:${F}`,fixable:!1})}else{let[[F]]=E,N=(0,Ude.default)(v,b);if(N===F)continue;if(!o){let U=typeof N>"u"?`Missing field ${de.pretty(t.configuration,b,de.Type.CODE)}; expected ${de.pretty(t.configuration,F,de.Type.INSPECT)}`:typeof F>"u"?`Extraneous field ${de.pretty(t.configuration,b,de.Type.CODE)} currently set to ${de.pretty(t.configuration,N,de.Type.INSPECT)}`:`Invalid field ${de.pretty(t.configuration,b,de.Type.CODE)}; expected ${de.pretty(t.configuration,F,de.Type.INSPECT)}, found ${de.pretty(t.configuration,N,de.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof F>"u"?(0,jde.default)(v,b):(0,_de.default)(v,b,F),C=!0}C&&a.set(I,v)}h.length>0&&n.set(I,h)}return{changedWorkspaces:a,remainingErrors:n}}function qde(t,{configuration:e}){let r={children:[]};for(let[o,a]of t){let n=[];for(let A of a){let p=A.text.split(/\n/);A.fixable&&(p[0]=`${de.pretty(e,"\u2699","gray")} ${p[0]}`),n.push({value:de.tuple(de.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:de.tuple(de.Type.NO_HINT,h)}))})}let u={value:de.tuple(de.Type.LOCATOR,o.anchoredLocator),children:_e.sortMap(n,A=>A.value[1])};r.children.push(u)}return r.children=_e.sortMap(r.children,o=>o.value[1]),r}var Ude,_de,Hde,jde,CC,Ogt,Mgt,Ugt,I2=yt(()=>{Ye();Ude=$e(h2()),_de=$e(Q8()),Hde=$e(Mde()),jde=$e(T8()),CC=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let o=Object.hasOwn(e,r)?e[r]:void 0;if(typeof o>"u")continue;_e.getArrayWithDefault(this.indexes[r],o).push(e)}return e}find(e){if(typeof e>"u")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let o=[],a;for(let[u,A]of r){let p=u,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){o.push([p,A]);continue}let C=new Set(h.get(A)??[]);if(C.size===0)return[];if(typeof a>"u")a=C;else for(let I of a)C.has(I)||a.delete(I);if(a.size===0)break}let n=[...a??[]];return o.length>0&&(n=n.filter(u=>{for(let[A,p]of o)if(!(typeof p<"u"?Object.hasOwn(u,A)&&u[A]===p:Object.hasOwn(u,A)===!1))return!1;return!0})),n}},Ogt=/^[0-9]+$/,Mgt=/^[a-zA-Z0-9_]+$/,Ugt=new Set(["scripts",...Ot.allDependencies])});var Gde=_((K9t,sH)=>{var jgt;(function(t){var e=function(){return{"append/2":[new t.type.Rule(new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("L")]),new t.type.Term("foldl",[new t.type.Term("append",[]),new t.type.Var("X"),new t.type.Term("[]",[]),new t.type.Var("L")]))],"append/3":[new t.type.Rule(new t.type.Term("append",[new t.type.Term("[]",[]),new t.type.Var("X"),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("append",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("append",[new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("S")]))],"member/2":[new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("_")])]),null),new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")])]),new t.type.Term("member",[new t.type.Var("X"),new t.type.Var("Xs")]))],"permutation/2":[new t.type.Rule(new t.type.Term("permutation",[new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("permutation",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("permutation",[new t.type.Var("T"),new t.type.Var("P")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("P")]),new t.type.Term("append",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("Y")]),new t.type.Var("S")])])]))],"maplist/2":[new t.type.Rule(new t.type.Term("maplist",[new t.type.V
`+p:"")),u.error.method="_execFileSync",u.error.program=a,u.error.args=n,u.error.extMessage=p,u.error.exitCode=+A),Yn.unlinkSync(h),Yn.unlinkSync(C),Yn.unlinkSync(I),Yn.unlinkSync(v),u}function Wgt(t){var e,r={},o,a={env:process.env,encoding:t.encoding};if(a0||(Zd?process.env.PSModulePath?(a0="powershell.exe",mk=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(a0="cscript.exe",mk=["//nologo",__dirname+"\\read.cs.js"]):(a0="/bin/sh",mk=[__dirname+"/read.sh"])),Zd&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),lH.execFileSync){e=zde(t),B2&&B2("execFileSync",e);try{r.input=lH.execFileSync(a0,e,a)}catch(n){o=n.stderr?(n.stderr+"").trim():"",r.error=new Error(Kde+(o?`
`+o:"")),r.error.method="execFileSync",r.error.program=a0,r.error.args=e,r.error.extMessage=o,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=Ygt(t,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function AH(t){var e="",r=t.display,o=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=Wgt(t);if(n.error)throw n.error;return n.input}return uH&&uH(t),function(){var n,u,A;function p(){return n||(n=process.binding("fs"),u=process.binding("constants")),n}if(typeof Vf=="string")if(Vf=null,Zd){if(A=function(h){var C=h.replace(/^\D+/,"").split("."),I=0;return(C[0]=+C[0])&&(I+=C[0]*1e4),(C[1]=+C[1])&&(I+=C[1]*100),(C[2]=+C[2])&&(I+=C[2]),I}(process.version),!(A>=20302&&A<40204||A>=5e4&&A<50100||A>=50600&&A<60200)&&process.stdin.isTTY)process.stdin.pause(),Vf=process.stdin.fd,IC=process.stdin._handle;else try{Vf=p().open("CONIN$",u.O_RDWR,parseInt("0666",8)),IC=new Yde(Vf,!0)}catch{}if(process.stdout.isTTY)Xc=process.stdout.fd;else{try{Xc=Yn.openSync("\\\\.\\CON","w")}catch{}if(typeof Xc!="number")try{Xc=p().open("CONOUT$",u.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Vf=Yn.openSync("/dev/tty","r"),IC=process.stdin._handle}catch{}}else try{Vf=Yn.openSync("/dev/tty","r"),IC=new Yde(Vf,!1)}catch{}if(process.stdout.isTTY)Xc=process.stdout.fd;else try{Xc=Yn.openSync("/dev/tty","w")}catch{}}}(),function(){var n,u,A=!t.hideEchoBack&&!t.keyIn,p,h,C,I,v;yk="";function b(E){return E===Wde?!0:IC.setRawMode(E)!==0?!1:(Wde=E,!0)}if(Vde||!IC||typeof Xc!="number"&&(t.display||!A)){e=a();return}if(t.display&&(Yn.writeSync(Xc,t.display),t.display=""),!t.displayOnly){if(!b(!A)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(u=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){C=0;try{C=Yn.readSync(Vf,p,0,h)}catch(E){if(E.code!=="EOF"){b(!1),e+=a();return}}if(C>0?(I=p.toString(t.encoding,0,C),yk+=I):(I=`
`,yk+=String.fromCharCode(0)),I&&typeof(v=(I.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(I=v,n=!0),I&&(I=I.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),I&&u&&(I=I.replace(u,"")),I&&(A||(t.hideEchoBack?t.mask&&Yn.writeSync(Xc,new Array(I.length+1).join(t.mask)):Yn.writeSync(Xc,I)),e+=I),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!A&&!o&&Yn.writeSync(Xc,`
`),b(!1)}}(),t.print&&!o&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`
`),t.encoding),t.displayOnly?"":hH=t.keepWhitespace||t.keyIn?e:e.trim()}function Kgt(t,e){var r=[];function o(a){a!=null&&(Array.isArray(a)?a.forEach(o):(!e||e(a))&&r.push(a))}return o(t),r}function gH(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function Ts(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(cH),t.unshift(cH))),t.reduce(function(o,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var u;if(!!a.hasOwnProperty(n))switch(u=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":u=u!=null?u+"":"",u&&n!=="limitMessage"&&(u=u.replace(/[\r\n]/g,"")),o[n]=u;break;case"bufferSize":!isNaN(u=parseInt(u,10))&&typeof u=="number"&&(o[n]=u);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":o[n]=!!u;break;case"limit":case"trueValue":case"falseValue":o[n]=Kgt(u,function(A){var p=typeof A;return p==="string"||p==="number"||p==="function"||A instanceof RegExp}).map(function(A){return typeof A=="string"?A.replace(/[\r\n]/g,""):A});break;case"print":case"phContent":case"preCheck":o[n]=typeof u=="function"?u:void 0;break;case"prompt":case"display":o[n]=u??"";break}})),o},{})}function fH(t,e,r){return e.some(function(o){var a=typeof o;return a==="string"?r?t===o:t.toLowerCase()===o.toLowerCase():a==="number"?parseFloat(t)===o:a==="function"?o(t):o instanceof RegExp?o.test(t):!1})}function dH(t,e){var r=l0.normalize(Zd?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=l0.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+gH(r)+"(?=\\/|\\\\|$)",Zd?"i":""),"~")}function BC(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",o=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(u,A,p,h,C,I){var v;return A||typeof(v=e(C))!="string"?p:v?(h||"")+v+(I||""):""}return t.replace(o,n).replace(a,n)}function Jde(t,e,r){var o,a=[],n=-1,u=0,A="",p;function h(C,I){return I.length>3?(C.push(I[0]+"..."+I[I.length-1]),p=!0):I.length&&(C=C.concat(I)),C}return o=t.reduce(function(C,I){return C.concat((I+"").split(""))},[]).reduce(function(C,I){var v,b;return e||(I=I.toLowerCase()),v=/^\d$/.test(I)?1:/^[A-Z]$/.test(I)?2:/^[a-z]$/.test(I)?3:0,r&&v===0?A+=I:(b=I.charCodeAt(0),v&&v===n&&b===u+1?a.push(I):(C=h(C,a),a=[I],n=v),u=b),C},[]),o=h(o,a),A&&(o.push(A),p=!0),{values:o,suppressed:p}}function Xde(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function Zde(t,e){var r,o,a={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!="string")switch(t){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=e.hasOwnProperty(t)?typeof e[t]=="boolean"?e[t]?"on":"off":e[t]+"":"";break;case"limit":case"trueValue":case"falseValue":o=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(a=Jde(o,e.caseSensitive),o=a.values):o=o.filter(function(u){var A=typeof u;return A==="string"||A==="number"}),r=Xde(o,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=hH;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=l0.basename(r):t==="cwdHome"&&(r=dH(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(u){return u.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=Xd[Xd.length-n]||"")}return r}function $de(t){var e=/^(.)-(.)$/.exec(t),r="",o,a,n,u;if(!e)return null;for(o=e[1].charCodeAt(0),a=e[2].charCodeAt(0),u=o<a?1:-1,n=o;n!==a+u;n+=u)r+=String.fromCharCode
`:"")+C}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit="",t.display=BC(t.display+"",p);;){if(e=AH(t),r=!1,o="",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((a=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(e))?(n=Xd[0]||"",a[1]?r=!0:e=n,h(n+`
`),r||(t.displayOnly=!0,AH(t),t.displayOnly=!1)):e&&e!==Xd[Xd.length-1]&&(Xd=[e])),!r&&t.cd&&e)switch(u=pH(e),u[0].toLowerCase()){case"cd":if(u[1])try{process.chdir(dH(u[1],!0))}catch(C){h(C+"")}r=!0;break;case"pwd":h(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(A=t.preCheck(e,t),e=A.res,A.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||fH(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(o=BC(t.limitMessage,p))}h((o?o+`
`:"")+BC(t.displaySrc+"",p))}return eme(e,t)}Yr._DBG_set_useExt=function(t){Vde=t};Yr._DBG_set_checkOptions=function(t){uH=t};Yr._DBG_set_checkMethod=function(t){B2=t};Yr._DBG_clearHistory=function(){hH="",Xd=[]};Yr.setDefaultOptions=function(t){return cH=Ts(!0,t),Ts(!0)};Yr.question=function(t,e){return tme(Ts(Ts(!0,e),{display:t}))};Yr.prompt=function(t){var e=Ts(!0,t);return e.display=e.prompt,tme(e)};Yr.keyIn=function(t,e){var r=Ts(Ts(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(o){var a=typeof o;return a==="string"||a==="number"}).map(function(o){return BC(o+"",$de)}),r.limit=gH(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(o){r[o]=r[o].reduce(function(a,n){var u=typeof n;return u==="string"||u==="number"?a=a.concat((n+"").split("")):a.push(n),a},[])}),r.display=BC(r.display+"",function(o){return Zde(o,r)}),eme(AH(r),r)};Yr.questionEMail=function(t,e){return t==null&&(t="Input e-mail address: "),Yr.question(t,Ts({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:"Input valid e-mail address, please.",trueValue:null,falseValue:null},e,{keepWhitespace:!1,cd:!1}))};Yr.questionNewPassword=function(t,e){var r,o,a,n=Ts({hideEchoBack:!0,mask:"*",limitMessage:`It can include: $<charlist>
And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(b){return b==="charlist"?r.text:b==="length"?o+"..."+a:null}}),u,A,p,h,C,I,v;for(e=e||{},u=BC(e.charlist?e.charlist+"":"$<!-~>",$de),(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=Xde(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: "),C=n.limitMessage;!v;)n.limit=h,n.limitMessage=C,I=Yr.question(t,n),n.limit=[I,""],n.limitMessage=p,v=Yr.question(A,n);return I};function rme(t,e,r){var o;function a(n){return o=r(n),!isNaN(o)&&typeof o=="number"}return Yr.question(t,Ts({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),o}Yr.questionInt=function(t,e){return rme(t,e,function(r){return parseInt(r,10)})};Yr.questionFloat=function(t,e){return rme(t,e,parseFloat)};Yr.questionPath=function(t,e){var r,o="",a=Ts({hideEchoBack:!1,limitMessage:`$<error(
)>Input valid path, 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(C){C.split(/\/|\\/).reduce(function(I,v){var b=l0.resolve(I+=v+l0.sep);if(!Yn.existsSync(b))Yn.mkdirSync(b);else if(!Yn.statSync(b).isDirectory())throw new Error("Non directory already exists: "+b);return I},"")}try{if(u=Yn.existsSync(n),r=u?Yn.realpathSync(n):l0.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(l0.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(C){return o=C+"",!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"): '),Yr.question(t,a),r};function nme(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}Yr.promptCL=function(t,e){var r=Ts({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=nme(t,r);return r.limit=o.limit,r.preCheck=o.preCheck,Yr.prompt(r),o.args};Yr.promptLoop=function(t,e){for(var r=Ts({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t(Yr.prompt(r)););};Yr.promptCLLoop=function(t,e){var r=Ts({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=nme(t,r);for(r.limit=o.limit,r.preCheck=o.preCheck;Yr.prompt(r),!o.hRes;);};Yr.promptSimShell=function(t){return Yr.prompt(Ts({hideEchoBack:!1,history:!0},t,{prompt:function(){return Zd?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function ime(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=Yr.keyIn(t,Ts(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof o=="boolean"?o:""}Yr.keyInYN=function(t,e){return ime(t,e)};Yr.keyInYNStrict=function(t,e){return ime(t,e,"yn")};Yr.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),Yr.keyIn(t,Ts({limit:null},e,{hideEchoBack:!0,mask:""}))};Yr.keyInSelect=function(t,e,r){var o=Ts({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 C=String.fromCharCode(u);a+=C,n[C]=h,A+="["+C+"] "+(p+"").trim()+`
`,u=u===57?97:u+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,A+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
`),o.limit=a,A+=`
`,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),A+=e),n[Yr.keyIn(A,o).toLowerCase()]};Yr.getRawInput=function(){return yk};function v2(t,e){var r;return e.length&&(r={},r[t]=e[0]),Yr.setDefaultOptions(r)[t]}Yr.setPrint=function(){return v2("print",arguments)};Yr.setPrompt=function(){return v2("prompt",arguments)};Yr.setEncoding=function(){return v2("encoding",arguments)};Yr.setMask=function(){return v2("mask",arguments)};Yr.setBufferSize=function(){return v2("bufferSize",arguments)}});var mH=_((z9t,hl)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(w,S,y){var R=tau_file_system.files[w];if(!R){if(y==="read")return null;R={path:w,text:"",type:S,get:function(J,X){return X===this.text.length||X>this.text.length?"end_of_file":this.text.substring(X,X+J)},put:function(J,X){return X==="end_of_file"?(this.text+=J,!0):X==="past_end_of_file"?null:(this.text=this.text.substring(0,X)+J+this.text.substring(X+J.length),!0)},get_byte:function(J){if(J==="end_of_stream")return-1;var X=Math.floor(J/2);if(this.text.length<=X)return-1;var Z=n(this.text[Math.floor(J/2)],0);return J%2===0?Z&255:Z/256>>>0},put_byte:function(J,X){var Z=X==="end_of_stream"?this.text.length:Math.floor(X/2);if(this.text.length<Z)return null;var ie=this.text.length===Z?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(ie=ie/256>>>0,ie=(ie&255)<<8|J&255):(ie=ie&255,ie=(J&255)<<8|ie&255),this.text.length===Z?this.text+=u(ie):this.text=this.text.substring(0,Z)+u(ie)+this.text.substring(Z+1),!0},flush:function(){return!0},close:function(){var J=tau_file_system.files[this.path];return J?!0:null}},tau_file_system.files[w]=R}return y==="write"&&(R.text=""),R}},tau_user_input={buffer:"",get:function(w,S){for(var y;tau_user_input.buffer.length<w;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,w),tau_user_input.buffer=tau_user_input.buffer.substr(w),y}},tau_user_output={put:function(w,S){return console.log(w),!0},flush:function(){return!0}},nodejs_file_system={open:function(w,S,y){var R=Be("fs"),J=R.openSync(w,y[0]);return y==="read"&&!R.existsSync(w)?null:{get:function(X,Z){var ie=new Buffer(X);return R.readSync(J,ie,0,X,Z),ie.toString()},put:function(X,Z){var ie=Buffer.from(X);if(Z==="end_of_file")R.writeSync(J,ie);else{if(Z==="past_end_of_file")return null;R.writeSync(J,ie,0,ie.length,Z)}return!0},get_byte:function(X){return null},put_byte:function(X,Z){return null},flush:function(){return!0},close:function(){return R.closeSync(J),!0}}}},nodejs_user_input={buffer:"",get:function(w,S){for(var y,R=sme();nodejs_user_input.buffer.length<w;)nodejs_user_input.buffer+=R.question();return y=nodejs_user_input.buffer.substr(0,w),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(w),y}},nodejs_user_output={put:function(w,S){return process.stdout.write(w),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(w,S){return w.indexOf(S)}:e=function(w,S){for(var y=w.length,R=0;R<y;R++)if(S===w[R])return R;return-1};var r=function(w,S){if(w.length!==0){for(var y=w[0],R=w.length,J=1;J<R;J++)y=S(y,w[J]);return y}},o;Array.prototype.map?o=function(w,S){return w.map(S)}:o=function(w,S){for(var y=[],R=w.length,J=0;J<R;J++)y.push(S(w[J]));return y};var a;Array.prototype.filter?a=function(w,S){return w.filter(S)}:a=function(w,S){for(var y=[],R=w.length,J=0;J<R;J++)S(w[J])&&y.push(w[J]);return y};var n;String.prototype.codePointAt?n=function(w,S){return w.codePointAt(S)}:n=function(w,S){return w.charCodeAt(S)};var u;String.fromCodePoint?u=function(){return String.fromCodePoint.apply(null,arguments)}:u=function(){return String.fromCharCode.apply(null,arguments)};var A=0,p=1,h=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,C={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function I(w){var S=[],y=!1;return w.replace(h,function(R,J,X,Z,ie,Pe,Le,ot,dt,jt,$t,xt,an,kr,mr,xr,Wr){switch(!0){case dt!==void 0:return S.push(parseInt(dt,16)
`,"\r"," ","\v"].indexOf(X)!==-1)switch(R+=1,X){case"a":y+="a";break;case"b":y+="\b";break;case"f":y+="\f";break;case"n":y+=`
`;break;case"r":y+="\r";break;case"t":y+=" ";break;case"v":y+="\v";break;case"'":y+="'";break;case'"':y+='"';break;case"\\":y+="\\";break}else return null;else y+=J}return y}function b(w){for(var S="",y=0;y<w.length;y++)switch(w.charAt(y)){case"'":S+="\\'";break;case"\\":S+="\\\\";break;case"\b":S+="\\b";break;case"\f":S+="\\f";break;case`
`:S+="\\n";break;case"\r":S+="\\r";break;case" ":S+="\\t";break;case"\v":S+="\\v";break;default:S+=w.charAt(y);break}return S}function E(w){var S=w.substr(2);switch(w.substr(0,2).toLowerCase()){case"0x":return parseInt(S,16);case"0b":return parseInt(S,2);case"0o":return parseInt(S,8);case"0'":return I(S)[0];default:return parseFloat(w)}}var F={whitespace:/^\s*(?:(?:%.*)|(?:\/\*(?:\n|\r|.)*?\*\/)|(?:\s+))\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\!|,|;|[a-z][0-9a-zA-Z_]*|[#\$\&\*\+\-\.\/\:\<\=\>\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function N(w,S){return w.get_flag("char_conversion").id==="on"?S.replace(/./g,function(y){return w.get_char_conversion(y)}):S}function U(w){this.thread=w,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(w){return this.tokens=w},U.prototype.new_text=function(w){this.text=w,this.tokens=[]},U.prototype.get_tokens=function(w){var S,y=0,R=0,J=0,X=[],Z=!1;if(w){var ie=this.tokens[w-1];y=ie.len,S=N(this.thread,this.text.substr(ie.len)),R=ie.line,J=ie.start}else S=this.text;if(/^\s*$/.test(S))return null;for(;S!=="";){var Pe=[],Le=!1;if(/^\n/.exec(S)!==null){R++,J=0,y++,S=S.replace(/\n/,""),Z=!0;continue}for(var ot in F)if(F.hasOwnProperty(ot)){var dt=F[ot].exec(S);dt&&Pe.push({value:dt[0],name:ot,matches:dt})}if(!Pe.length)return this.set_last_tokens([{value:S,matches:[],name:"lexical",line:R,start:J}]);var ie=r(Pe,function(kr,mr){return kr.value.length>=mr.value.length?kr:mr});switch(ie.start=J,ie.line=R,S=S.replace(ie.value,""),J+=ie.value.length,y+=ie.value.length,ie.name){case"atom":ie.raw=ie.value,ie.value.charAt(0)==="'"&&(ie.value=v(ie.value.substr(1,ie.value.length-2),"'"),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence"));break;case"number":ie.float=ie.value.substring(0,2)!=="0x"&&ie.value.match(/[.eE]/)!==null&&ie.value!=="0'.",ie.value=E(ie.value),ie.blank=Le;break;case"string":var jt=ie.value.charAt(0);ie.value=v(ie.value.substr(1,ie.value.length-2),jt),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence");break;case"whitespace":var $t=X[X.length-1];$t&&($t.space=!0),Le=!0;continue;case"r_bracket":X.length>0&&X[X.length-1].name==="l_bracket"&&(ie=X.pop(),ie.name="atom",ie.value="{}",ie.raw="{}",ie.space=!1);break;case"r_brace":X.length>0&&X[X.length-1].name==="l_brace"&&(ie=X.pop(),ie.name="atom",ie.value="[]",ie.raw="[]",ie.space=!1);break}ie.len=y,X.push(ie),Le=!1}var xt=this.set_last_tokens(X);return xt.length===0?null:xt};function z(w,S,y,R,J){if(!S[y])return{type:A,value:x.error.syntax(S[y-1],"expression expected",!0)};var X;if(R==="0"){var Z=S[y];switch(Z.name){case"number":return{type:p,len:y+1,value:new x.type.Num(Z.value,Z.float)};case"variable":return{type:p,len:y+1,value:new x.type.Var(Z.value)};case"string":var ie;switch(w.get_flag("double_quotes").id){case"atom":ie=new H(Z.value,[]);break;case"codes":ie=new H("[]",[]);for(var Pe=Z.value.length-1;Pe>=0;Pe--)ie=new H(".",[new x.type.Num(n(Z.value,Pe),!1),ie]);break;case"chars":ie=new H("[]",[]);for(var Pe=Z.value.length-1;Pe>=0;Pe--)ie=new H(".",[new x.type.Term(Z.value.charAt(Pe),[]),ie]);break}return{type:p,len:y+1,value:ie};case"l_paren":var xt=z(w,S,y+1,w.__get_max_priority(),!0);return xt.type!==p?xt:S[xt.len]&&S[xt.len].name==="r_paren"?(xt.len++,xt):{type:A,derived:!0,value:x.error.syntax(S[xt.len]?S[xt.len]:S[xt.len-1],") or operator expected",!S[xt.len])};case"l_bracket":var xt=z(w,S,y+1,w.__get_max_priority(),!0);return xt.type!==p?xt:S[xt.len]&&S[xt.len].name==="r_bracket"?(xt.len++,xt.value=new H("{}",[xt.value]),xt):{type:A,derived:!0,value:x.error.syntax(S[xt.len]?S[xt.len]:S[xt.len-1],"} or operator expected",!S[xt.len])}}var Le=te(w,S,y,J);return Le.type===p||Le.derived||(Le=le(w,S,y),Le.type===p||Le.derived)?Le:{type:A,derived:!1,value:
`;S+=`
`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)S+=this.rules[key][y].toString(w),S+=`
`;return S},we.prototype.clone=function(){return new we(this.id)},be.prototype.clone=function(){return new be(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)},ke.prototype.clone=function(){var w={};for(var S in this.links)!this.links.hasOwnProperty(S)||(w[S]=this.links[S].clone());return new ke(w)},xe.prototype.clone=function(){return new xe(this.goal.clone(),this.substitution.clone(),this.parent)},He.prototype.clone=function(){return new He(this.head.clone(),this.body!==null?this.body.clone():null)},we.prototype.equals=function(w){return x.type.is_variable(w)&&this.id===w.id},be.prototype.equals=function(w){return x.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float},H.prototype.equals=function(w){if(!x.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 x.type.is_stream(w)&&this.id===w.id},ke.prototype.equals=function(w){var S;if(!x.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},xe.prototype.equals=function(w){return x.type.is_state(w)&&this.goal.equals(w.goal)&&this.substitution.equals(w.substitution)&&this.parent===w.parent},He.prototype.equals=function(w){return x.type.is_rule(w)&&this.head.equals(w.head)&&(this.body===null&&w.body===null||this.body!==null&&this.body.equals(w.body))},we.prototype.rename=function(w){return w.get_free_variable(this)},be.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},He.prototype.rename=function(w){return new He(this.head.rename(w),this.body!==null?this.body.rename(w):null)},we.prototype.variables=function(){return[this.id]},be.prototype.variables=function(){return[]},H.prototype.variables=function(){return[].concat.apply([],o(this.args,function(w){return w.variables()}))},Te.prototype.variables=function(){return[]},He.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},we.prototype.apply=function(w){return w.lookup(this.id)?w.lookup(this.id):this},be.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),J=S.length-1;J>=0;J--)R=new H(".",[S[J],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},He.prototype.apply=function(w){return new He(this.head.apply(w),this.body!==null?this.body.apply(w):null)},ke.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 ke(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(x.type.is_term(w)&&w.ref!==void 0&&this.ref===w.ref)return!0;for(var S=0;S<this.args.length;S++)if(x.type.is_term(this.args[S])&&this.args[S].search(w))return!0;return!1},Re.prototype.get_current_input=function(){return this.current_input},ze.prototype.get_current_input=function(){return this.session.get_current_input()},Re.prototype.get_current_output=function(){return this.current_output},ze.prototype.get_current_output=function(){return this.session.get_current_output()},Re.prototype.set_current_input=function(w){this.current_input=w},ze.prototype.set_current_input=function(w){return t
`,[])])])),S.substitution,S)])},"nl/1":function(w,S,y){var R=y.args[0];w.prepend([new xe(S.goal.replace(new H("put_char",[R,new H(`
`,[])])),S.substitution,S)])},"get_byte/1":function(w,S,y){var R=y.args[0];w.prepend([new xe(S.goal.replace(new H(",",[new H("current_input",[new we("S")]),new H("get_byte",[new we("S"),R])])),S.substitution,S)])},"get_byte/2":function(w,S,y){var R=y.args[0],J=y.args[1],X=x.type.is_stream(R)?R:w.get_stream_by_alias(R.id);if(x.type.is_variable(R))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(J)&&!x.type.is_byte(J))w.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(R)&&!x.type.is_atom(R))w.throw_error(x.error.domain("stream_or_alias",R,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence("stream",R,y.indicator));else if(X.output)w.throw_error(x.error.permission("input","stream",R,y.indicator));else if(X.type==="text")w.throw_error(x.error.permission("input","text_stream",R,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")w.throw_error(x.error.permission("input","past_end_of_stream",R,y.indicator));else{var Z;if(X.position==="end_of_stream")Z="end_of_file",X.position="past_end_of_stream";else{if(Z=X.stream.get_byte(X.position),Z===null){w.throw_error(x.error.representation("byte",y.indicator));return}X.position++}w.prepend([new xe(S.goal.replace(new H("=",[new be(Z,!1),J])),S.substitution,S)])}},"peek_byte/1":function(w,S,y){var R=y.args[0];w.prepend([new xe(S.goal.replace(new H(",",[new H("current_input",[new we("S")]),new H("peek_byte",[new we("S"),R])])),S.substitution,S)])},"peek_byte/2":function(w,S,y){var R=y.args[0],J=y.args[1],X=x.type.is_stream(R)?R:w.get_stream_by_alias(R.id);if(x.type.is_variable(R))w.throw_error(x.error.instantiation(y.indicator));else if(!x.type.is_variable(J)&&!x.type.is_byte(J))w.throw_error(x.error.type("in_byte",char,y.indicator));else if(!x.type.is_stream(R)&&!x.type.is_atom(R))w.throw_error(x.error.domain("stream_or_alias",R,y.indicator));else if(!x.type.is_stream(X)||X.stream===null)w.throw_error(x.error.existence("stream",R,y.indicator));else if(X.output)w.throw_error(x.error.permission("input","stream",R,y.indicator));else if(X.type==="text")w.throw_error(x.error.permission("input","text_stream",R,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")w.throw_error(x.error.permission("input","past_end_of_stream",R,y.indicator));else{var Z;if(X.position==="end_of_stream")Z="end_of_file",X.position="past_end_of_stream";else if(Z=X.stream.get_byte(X.position),Z===null){w.throw_error(x.error.representation("byte",y.indicator));return}w.prepend([new xe(S.goal.replace(new H("=",[new be(Z,!1),J])),S.substitution,S)])}},"put_byte/1":function(w,S,y){var R=y.args[0];w.prepend([new xe(S.goal.replace(new H(",",[new H("current_output",[new we("S")]),new H("put_byte",[new we("S"),R])])),S.substitution,S)])},"put_byte/2":function(w,S,y){var R=y.args[0],J=y.args[1],X=x.type.is_stream(R)?R:w.get_stream_by_alias(R.id);x.type.is_variable(R)||x.type.is_variable(J)?w.throw_error(x.error.instantiation(y.indicator)):x.type.is_byte(J)?!x.type.is_variable(R)&&!x.type.is_stream(R)&&!x.type.is_atom(R)?w.throw_error(x.error.domain("stream_or_alias",R,y.indicator)):!x.type.is_stream(X)||X.stream===null?w.throw_error(x.error.existence("stream",R,y.indicator)):X.input?w.throw_error(x.error.permission("output","stream",R,y.indicator)):X.type==="text"?w.throw_error(x.error.permission("output","text_stream",R,y.indicator)):X.stream.put_byte(J.value,X.position)&&(typeof X.position=="number"&&X.position++,w.success(S)):w.throw_error(x.error.type("byte",J,y.indicator))},"read/1":function(w,S,y){var R=y.args[0];w.prepend([new xe(S.goal.replace(new H(",",[new H("current_input",[new we("S")]),new H("read_term",[new we("S"),R,new H("[]",[])])])),S.substitution,S)])},"read/2":function(w,S,y){var R=y.args[0],J=y.args[1];w.prepend([new xe(S.goal.replace(new H("read_term",[R,J,new H("[]",[])])),S.substitution,S)])},"read_term/2":function(w,S,y){var R=y.args[0],J=y.args[1];w.prepend([new xe(S.goal.replace(new H(",",[new H("current_input",[new we("S")]),new H("read_term",[new
`;for(let r of this.project.workspacesByCwd.values()){let o=r.relativeCwd;e+=`workspace(${u0(o)}).
`,e+=`workspace_ident(${u0(o)}, ${u0(G.stringifyIdent(r.anchoredLocator))}).
`,e+=`workspace_version(${u0(o)}, ${u0(r.manifest.version)}).
`;for(let a of Ame)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${u0(o)}, ${u0(G.stringifyIdent(n))}, ${u0(n.range)}, ${a}).
`}return e+=`workspace(_) :- false.
`,e+=`workspace_ident(_, _) :- false.
`,e+=`workspace_version(_, _) :- false.
`,e+=`workspace_has_dependency(_, _, _, _) :- false.
`,e}getDeclarations(){let e="";return e+=`gen_enforced_dependency(_, _, _, _) :- false.
`,e+=`gen_enforced_field(_, _, _) :- false.
`,e}get fullSource(){return`${this.getProjectDatabase()}
${this.source}
${this.getDeclarations()}`}createSession(){return new CH(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),o=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:u,dependencyType:A}of e){let p=w2([A,G.stringifyIdent(n)]),h=_e.getMapWithDefault(o,a.cwd);_e.getMapWithDefault(h,p).set(u??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:u}of r){let A=w2(n),p=_e.getMapWithDefault(o,a.cwd);_e.getMapWithDefault(p,A).set(JSON.parse(u)??void 0,new Set)}return{manifestUpdates:o,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=V.resolve(this.project.cwd,$d(o.links.WorkspaceCwd)),n=$d(o.links.DependencyIdent),u=$d(o.links.DependencyRange),A=$d(o.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=G.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:u,dependencyType:A})}return _e.sortMap(r,[({dependencyRange:o})=>o!==null?"0":"1",({workspace:o})=>G.stringifyIdent(o.anchoredLocator),({dependencyIdent:o})=>G.stringifyIdent(o)])}async genEnforcedFields(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=V.resolve(this.project.cwd,$d(o.links.WorkspaceCwd)),n=$d(o.links.FieldPath),u=Xgt(o.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let A=this.project.getWorkspaceByCwd(a);r.push({workspace:A,fieldPath:n,fieldValue:u})}return _e.sortMap(r,[({workspace:o})=>G.stringifyIdent(o.anchoredLocator),({fieldPath:o})=>o])}async*query(e){let r=this.createSession();for await(let o of r.makeQuery(e)){let a={};for(let[n,u]of Object.entries(o.links))n!=="_"&&(a[n]=$d(u));yield a}}}});var Ime=_(Ik=>{"use strict";Object.defineProperty(Ik,"__esModule",{value:!0});function q2(t){let e=[...t.caches],r=e.shift();return r===void 0?wme():{get(o,a,n={miss:()=>Promise.resolve()}){return r.get(o,a,n).catch(()=>q2({caches:e}).get(o,a,n))},set(o,a){return r.set(o,a).catch(()=>q2({caches:e}).set(o,a))},delete(o){return r.delete(o).catch(()=>q2({caches:e}).delete(o))},clear(){return r.clear().catch(()=>q2({caches:e}).clear())}}}function wme(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}Ik.createFallbackableCache=q2;Ik.createNullCache=wme});var vme=_((xWt,Bme)=>{Bme.exports=Ime()});var Dme=_(TH=>{"use strict";Object.defineProperty(TH,"__esModule",{value:!0});function ddt(t={serializable:!0}){let e={};return{get(r,o,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let u=o(),A=a&&a.miss||(()=>Promise.resolve());return u.then(p=>A(p)).then(()=>u)},set(r,o){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(o):o,Promise.resolve(o)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}TH.createInMemoryCache=ddt});var Sme=_((kWt,Pme)=>{Pme.exports=Dme()});var bme=_(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});function mdt(t,e,r){let o={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===LH.WithinHeaders?o:{}},queryParameters(){return t===LH.WithinQueryParameters?o:{}}}}function ydt(t){let e=0,r=()=>(e++,new Promise(o=>{setTimeout(()=>{o(t(r))},Math.min(100*e,1e3))}));return t(r)}function xme(t,e=(r,o)=>Promise.resolve()){return Object.assign(t,{wait(r){return xme(t.then(o=>Promise.all([e(o,r),o])).then(o=>o[1]))}})}function Edt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.
`;A!==o&&(o=A,t.write(oEe.default.eraseLines(r)+A),r=A.split(`
`).length)};return n.clear=()=>{t.write(oEe.default.eraseLines(r)),o="",r=0},n.done=()=>{o="",r=0,e||(aEe.default.show(),a=!1)},n};rB.default={create:Nyt}});var uEe=_((aKt,Oyt)=>{Oyt.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var pEe=_(gl=>{"use strict";var fEe=uEe(),pA=process.env;Object.defineProperty(gl,"_vendors",{value:fEe.map(function(t){return t.constant})});gl.name=null;gl.isPR=null;fEe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(o){return AEe(o)});if(gl[t.constant]=r,r)switch(gl.name=t.name,typeof t.pr){case"string":gl.isPR=!!pA[t.pr];break;case"object":"env"in t.pr?gl.isPR=t.pr.env in pA&&pA[t.pr.env]!==t.pr.ne:"any"in t.pr?gl.isPR=t.pr.any.some(function(o){return!!pA[o]}):gl.isPR=AEe(t.pr);break;default:gl.isPR=null}});gl.isCI=!!(pA.CI||pA.CONTINUOUS_INTEGRATION||pA.BUILD_NUMBER||pA.RUN_ID||gl.name);function AEe(t){return typeof t=="string"?!!pA[t]:Object.keys(t).every(function(e){return pA[e]===t[e]})}});var gEe=_((cKt,hEe)=>{"use strict";hEe.exports=pEe().isCI});var mEe=_((uKt,dEe)=>{"use strict";var Myt=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};dEe.exports=(t,{include:e,exclude:r}={})=>{let o=a=>{let n=u=>typeof u=="string"?a===u:u.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of Myt(t.constructor.prototype)){if(n==="constructor"||!o(n))continue;let u=Reflect.getOwnPropertyDescriptor(a,n);u&&typeof u.value=="function"&&(t[n]=t[n].bind(t))}return t}});var vEe=_(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});var UC,sB,Hk,jk,I6;typeof window>"u"||typeof MessageChannel!="function"?(MC=null,d6=null,m6=function(){if(MC!==null)try{var t=kn.unstable_now();MC(!0,t),MC=null}catch(e){throw setTimeout(m6,0),e}},yEe=Date.now(),kn.unstable_now=function(){return Date.now()-yEe},UC=function(t){MC!==null?setTimeout(UC,0,t):(MC=t,setTimeout(m6,0))},sB=function(t,e){d6=setTimeout(t,e)},Hk=function(){clearTimeout(d6)},jk=function(){return!1},I6=kn.unstable_forceFrameRate=function(){}):(Ok=window.perf
in `+(j||"Unknown")+Ae}D+=T,P=P.return}while(P);return D}var yl=[],ao=-1;function Vn(P){0>ao||(P.current=yl[ao],yl[ao]=null,ao--)}function On(P,D){ao++,yl[ao]=P.current,P.current=D}var Li={},Mn={current:Li},_i={current:!1},tr=Li;function Oe(P,D){var T=P.type.contextTypes;if(!T)return Li;var j=P.stateNode;if(j&&j.__reactInternalMemoizedUnmaskedChildContext===D)return j.__reactInternalMemoizedMaskedChildContext;var W={},Ae;for(Ae in T)W[Ae]=D[Ae];return j&&(P=P.stateNode,P.__reactInternalMemoizedUnmaskedChildContext=D,P.__reactInternalMemoizedMaskedChildContext=W),W}function ii(P){return P=P.childContextTypes,P!=null}function Ma(P){Vn(_i,P),Vn(Mn,P)}function hr(P){Vn(_i,P),Vn(Mn,P)}function uc(P,D,T){if(Mn.current!==Li)throw Error(n(168));On(Mn,D,P),On(_i,T,P)}function uu(P,D,T){var j=P.stateNode;if(P=D.childContextTypes,typeof j.getChildContext!="function")return T;j=j.getChildContext();for(var W in j)if(!(W in P))throw Error(n(108,ae(D)||"Unknown",W));return r({},T,{},j)}function Ac(P){var D=P.stateNode;return D=D&&D.__reactInternalMemoizedMergedChildContext||Li,tr=Mn.current,On(Mn,D,P),On(_i,_i.current,P),!0}function El(P,D,T){var j=P.stateNode;if(!j)throw Error(n(169));T?(D=uu(P,D,tr),j.__reactInternalMemoizedMergedChildContext=D,Vn(_i,P),Vn(Mn,P),On(Mn,D,P)):Vn(_i,P),On(_i,T,P)}var vA=a.unstable_runWithPriority,Au=a.unstable_scheduleCallback,Ce=a.unstable_cancelCallback,Rt=a.unstable_shouldYield,fc=a.unstable_requestPaint,Hi=a.unstable_now,fu=a.unstable_getCurrentPriorityLevel,Yt=a.unstable_ImmediatePriority,Cl=a.unstable_UserBlockingPriority,DA=a.unstable_NormalPriority,lp=a.unstable_LowPriority,pc=a.unstable_IdlePriority,PA={},Qn=fc!==void 0?fc:function(){},hi=null,hc=null,SA=!1,sa=Hi(),Ni=1e4>sa?Hi:function(){return Hi()-sa};function _o(){switch(fu()){case Yt:return 99;case Cl:return 98;case DA:return 97;case lp:return 96;case pc:return 95;default:throw Error(n(332))}}function Ze(P){switch(P){case 99:return Yt;case 98:return Cl;case 97:return DA;case 96:return lp;case 95:return pc;default:throw Error(n(332))}}function lo(P,D){return P=Ze(P),vA(P,D)}function gc(P,D,T){return P=Ze(P),Au(P,D,T)}function pu(P){return hi===null?(hi=[P],hc=Au(Yt,hu)):hi.push(P),PA}function ji(){if(hc!==null){var P=hc;hc=null,Ce(P)}hu()}function hu(){if(!SA&&hi!==null){SA=!0;var P=0;try{var D=hi;lo(99,function(){for(;P<D.length;P++){var T=D[P];do T=T(!0);while(T!==null)}}),hi=null}catch(T){throw hi!==null&&(hi=hi.slice(P+1)),Au(Yt,ji),T}finally{SA=!1}}}var xA=3;function Ua(P,D,T){return T/=10,1073741821-(((1073741821-P+D/10)/T|0)+1)*T}function dc(P,D){return P===D&&(P!==0||1/P===1/D)||P!==P&&D!==D}var hs=typeof Object.is=="function"?Object.is:dc,Ut=Object.prototype.hasOwnProperty;function Fn(P,D){if(hs(P,D))return!0;if(typeof P!="object"||P===null||typeof D!="object"||D===null)return!1;var T=Object.keys(P),j=Object.keys(D);if(T.length!==j.length)return!1;for(j=0;j<T.length;j++)if(!Ut.call(D,T[j])||!hs(P[T[j]],D[T[j]]))return!1;return!0}function Ci(P,D){if(P&&P.defaultProps){D=r({},D),P=P.defaultProps;for(var T in P)D[T]===void 0&&(D[T]=P[T])}return D}var oa={current:null},co=null,_s=null,aa=null;function la(){aa=_s=co=null}function Ho(P,D){var T=P.type._context;x?(On(oa,T._currentValue,P),T._currentValue=D):(On(oa,T._currentValue2,P),T._currentValue2=D)}function wi(P){var D=oa.current;Vn(oa,P),P=P.type._context,x?P._currentValue=D:P._currentValue2=D}function gs(P,D){for(;P!==null;){var T=P.alternate;if(P.childExpirationTime<D)P.childExpirationTime=D,T!==null&&T.childExpirationTime<D&&(T.childExpirationTime=D);else if(T!==null&&T.childExpirationTime<D)T.childExpirationTime=D;else break;P=P.return}}function ds(P,D){co=P,aa=_s=null,P=P.dependencies,P!==null&&P.firstContext!==null&&(P.expirationTime>=D&&(qo=!0),P.firstContext=null)}function ms(P,D){if(aa!==P&&D!==!1&&D!==0)if((typeof D!="number"||D===1073741823)&&(aa=P,D=1073741823),D={context:P,observedBits:D,next:null},_s===null){if(co===null)throw Error(n(308));_s=D,co.dependencies={expirationTime:0,firstContext:D,responders:null}}else _s=_s.next=D;return x?P._currentValue:P._currentV
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+ml(W))}Yi!==Pc&&(Yi=Bi),Ae=mg(Ae,W),wt=j;do{switch(wt.tag){case 3:ve=Ae,wt.effectTag|=4096,wt.expirationTime=D;var Ve=Gv(wt,ve,D);It(wt,Ve);break e;case 1:ve=Ae;var At=wt.type,Wt=wt.stateNode;if((wt.effectTag&64)===0&&(typeof At.getDerivedStateFromError=="function"||Wt!==null&&typeof Wt.componentDidCatch=="function"&&(Du===null||!Du.has(Wt)))){wt.effectTag|=4096,wt.expirationTime=D;var vr=Yv(wt,ve,D);It(wt,vr);break e}}wt=wt.return}while(wt!==null)}Or=Jv(Or)}catch(Sn){D=Sn;continue}break}while(1)}function qA(){var P=yp.current;return yp.current=wu,P===null?wu:P}function Pw(P,D){P<Ya&&2<P&&(Ya=P),D!==null&&P<OA&&2<P&&(OA=P,Nm=D)}function _m(P){P>Ep&&(Ep=P)}function fF(){for(;Or!==null;)Or=zv(Or)}function pF(){for(;Or!==null&&!Rt();)Or=zv(Or)}function zv(P){var D=Zv(P.alternate,P,ns);return P.memoizedProps=P.pendingProps,D===null&&(D=Jv(P)),ww.current=null,D}function Jv(P){Or=P;do{var D=Or.alternate;if(P=Or.return,(Or.effectTag&2048)===0){e:{var T=D;D=Or;var j=ns,W=D.pendingProps;switch(D.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:ii(D.type)&&Ma(D);break;case 3:yc(D),hr(D),W=D.stateNode,W.pendingContext&&(W.context=W.pendingContext,W.pendingContext=null),(T===null||T.child===null)&&ja(D)&&pa(D),Bl(D);break;case 5:sg(D);var Ae=ca(mc.current);if(j=D.type,T!==null&&D.stateNode!=null)ts(T,D,j,W,Ae),T.ref!==D.ref&&(D.effectTag|=128);else if(W){if(T=ca(uo.current),ja(D)){if(W=D,!y)throw Error(n(175));T=op(W.stateNode,W.type,W.memoizedProps,Ae,T,W),W.updateQueue=T,T=T!==null,T&&pa(D)}else{var ve=ht(j,W,Ae,T,D);vc(ve,D,!1,!1),D.stateNode=ve,lt(ve,j,W,Ae,T)&&pa(D)}D.ref!==null&&(D.effectTag|=128)}else if(D.stateNode===null)throw Error(n(166));break;case 6:if(T&&D.stateNode!=null)Gr(T,D,T.memoizedProps,W);else{if(typeof W!="string"&&D.stateNode===null)throw Error(n(166));if(T=ca(mc.current),Ae=ca(uo.current),ja(D)){if(T=D,!y)throw Error(n(176));(T=ap(T.stateNode,T.memoizedProps,T))&&pa(D)}else D.stateNode=He(W,T,Ae,D)}break;case 11:break;case 13:if(Vn($n,D),W=D.memoizedState,(D.effectTag&64)!==0){D.expirationTime=j;break e}W=W!==null,Ae=!1,T===null?D.memoizedProps.fallback!==void 0&&ja(D):(j=T.memoizedState,Ae=j!==null,W||j===null||(j=T.child.sibling,j!==null&&(ve=D.firstEffect,ve!==null?(D.firstEffect=j,j.nextEffect=ve):(D.firstEffect=D.lastEffect=j,j.nextEffect=null),j.effectTag=8))),W&&!Ae&&(D.mode&2)!==0&&(T===null&&D.memoizedProps.unstable_avoidThisFallback!==!0||($n.current&1)!==0?Yi===Bu&&(Yi=ha):((Yi===Bu||Yi===ha)&&(Yi=vl),Ep!==0&&gi!==null&&(WA(gi,ns),eD(gi,Ep)))),S&&W&&(D.effectTag|=4),w&&(W||Ae)&&(D.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:yc(D),Bl(D);break;case 10:wi(D);break;case 9:break;case 14:break;case 17:ii(D.type)&&Ma(D);break;case 19:if(Vn($n,D),W=D.memoizedState,W===null)break;if(Ae=(D.effectTag&64)!==0,ve=W.rendering,ve===null){if(Ae)Dc(W,!1);else if(Yi!==Bu||T!==null&&(T.effectTag&64)!==0)for(T=D.child;T!==null;){if(ve=up(T),ve!==null){for(D.effectTag|=64,Dc(W,!1),T=ve.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),W.lastEffect===null&&(D.firstEffect=null),D.lastEffect=W.lastEffect,T=j,W=D.child;W!==null;)Ae=W,j=T,Ae.effectTag&=2,Ae.nextEffect=null,Ae.firstEffect=null,Ae.lastEffect=null,ve=Ae.alternate,ve===null?(Ae.childExpirationTime=0,Ae.expirationTime=j,Ae.child=null,Ae.memoizedProps=null,Ae.memoizedState=null,Ae.updateQueue=null,Ae.dependencies=null):(Ae.childExpirationTime=ve.childExpirationTime,Ae.expirationTime=ve.expirationTime,Ae.child=ve.child,Ae.memoizedProps=ve.memoizedProps,Ae.memoizedState=ve.memoizedState,Ae.updateQueue=ve.updateQueue,j=ve.dependencies,Ae.dependencies=j===null?null:{expirationTime:j.expirationTime,firstContext:j.firstContext,responders:j.responders}),W=W.sibling;On($n,$n.current&1|2,D),D=D.child;break e}T=T.sibling}}else{if(!Ae)if(T=up(ve),T!==null){if(D.effectTag|=64,Ae=!0,T=T.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),Dc(W,!0),W.tail===null&&W.tailMode==="hidden"&&!ve.alternate){D=D.lastEffect=W.
`+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
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,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 om=_((yKt,NEe)=>{"use strict";var Gyt=TEe(),Yyt=LEe(),b6=!1,k6=null;Yyt({},function(t,e){if(!b6){if(b6=!0,t)throw t;k6=e}});if(!b6)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");NEe.exports=Gyt(k6.bind,k6.lib)});var F6=_((EKt,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=_((CKt,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
`))e=Math.max(e,zyt(r));return e};T6.exports=HEe;T6.exports.default=HEe});var jEe=_(lB=>{"use strict";var Jyt=lB&&lB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lB,"__esModule",{value:!0});var Xyt=Jyt(L6()),N6={};lB.default=t=>{if(t.length===0)return{width:0,height:0};if(N6[t])return N6[t];let e=Xyt.default(t),r=t.split(`
`).length;return N6[t]={width:e,height:r},{width:e,height:r}}});var qEe=_(cB=>{"use strict";var Zyt=cB&&cB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cB,"__esModule",{value:!0});var dn=Zyt(om()),$yt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?dn.default.POSITION_TYPE_ABSOLUTE:dn.default.POSITION_TYPE_RELATIVE)},eEt=(t,e)=>{"marginLeft"in e&&t.setMargin(dn.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(dn.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(dn.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(dn.default.EDGE_BOTTOM,e.marginBottom||0)},tEt=(t,e)=>{"paddingLeft"in e&&t.setPadding(dn.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(dn.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(dn.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(dn.default.EDGE_BOTTOM,e.paddingBottom||0)},rEt=(t,e)=>{var r;"flexGrow"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in e&&t.setFlexShrink(typeof e.flexShrink=="number"?e.flexShrink:1),"flexDirection"in e&&(e.flexDirection==="row"&&t.setFlexDirection(dn.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(dn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(dn.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(dn.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in e&&(typeof e.flexBasis=="number"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis=="string"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),"alignItems"in e&&((e.alignItems==="stretch"||!e.alignItems)&&t.setAlignItems(dn.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(dn.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(dn.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(dn.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(dn.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(dn.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(dn.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(dn.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(dn.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(dn.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(dn.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(dn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(dn.default.JUSTIFY_SPACE_AROUND))},nEt=(t,e)=>{var r,o;"width"in e&&(typeof e.width=="number"?t.setWidth(e.width):typeof e.width=="string"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),"height"in e&&(typeof e.height=="number"?t.setHeight(e.height):typeof e.height=="string"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),"minWidth"in e&&(typeof e.minWidth=="string"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in e&&(typeof e.minHeight=="string"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((o=e.minHeight)!==null&&o!==void 0?o:0))},iEt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?dn.default.DISPLAY_FLEX:dn.default.DISPLAY_NONE)},sEt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(dn.default.EDGE_TOP,r),t.setBorder(dn.default.EDGE_BOTTOM,r),t.setBorder(dn.default.EDGE_LEFT,r),t.setBorder(dn.default.EDGE_RIGHT,r)}};cB.default=(t,e={})=>{$yt(t,e),eEt(t,e),tEt(t,e),rEt(t,e),nEt(t,e),iEt(t,e),sEt(t,e)}});var WEe=_((DKt,YEe)=>{"use strict";var uB=Kk(),oEt=NP(),aEt=BI(),M6=new Set(["\x1B","\x9B"]),lEt=39,GEe=t=>`${M6.values().next().value}[${t}m`,cEt=t=>t.split(" ").map(e=>uB(e)),O6=(t,e,r)=>{let o=[...e],a=!1,n=uB(oEt(t[t.length-1]));for(let[u,A]of o.entries()){let p=uB(A)
`);for(let[p,h]of[...o].entries()){if(a+=h,M6.has(h)){let I=parseFloat(/\d[^m]*/.exec(o.slice(p,p+4)));n=I===lEt?null:I}let C=aEt.codes.get(Number(n));n&&C&&(o[p+1]===`
`?a+=GEe(C):h===`
`&&(a+=GEe(n)))}return a};YEe.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
`).split(`
`).map(o=>AEt(o,e,r)).join(`
`)});var zEe=_((PKt,VEe)=>{"use strict";var KEe="[\uD800-\uDBFF][\uDC00-\uDFFF]",fEt=t=>t&&t.exact?new RegExp(`^${KEe}$`):new RegExp(KEe,"g");VEe.exports=fEt});var U6=_((SKt,$Ee)=>{"use strict";var pEt=F6(),hEt=zEe(),JEe=BI(),ZEe=["\x1B","\x9B"],Vk=t=>`${ZEe[0]}[${t}m`,XEe=(t,e,r)=>{let o=[];t=[...t];for(let a of t){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let u=JEe.codes.get(parseInt(a,10));if(u){let A=t.indexOf(u.toString());A>=0?t.splice(A,1):o.push(Vk(e?u:n))}else if(e){o.push(Vk(0));break}else o.push(Vk(n))}if(e&&(o=o.filter((a,n)=>o.indexOf(a)===n),r!==void 0)){let a=Vk(JEe.codes.get(parseInt(r,10)));o=o.reduce((n,u)=>u===a?[u,...n]:[...n,u],[])}return o.join("")};$Ee.exports=(t,e,r)=>{let o=[...t.normalize()],a=[];r=typeof r=="number"?r:o.length;let n=!1,u,A=0,p="";for(let[h,C]of o.entries()){let I=!1;if(ZEe.includes(C)){let v=/\d[^m]*/.exec(t.slice(h,h+18));u=v&&v.length>0?v[0]:void 0,A<r&&(n=!0,u!==void 0&&a.push(u))}else n&&C==="m"&&(n=!1,I=!0);if(!n&&!I&&++A,!hEt({exact:!0}).test(C)&&pEt(C.codePointAt())&&++A,A>e&&A<=r)p+=C;else if(A===e&&!n&&u!==void 0)p=XEe(a);else if(A>=r){p+=XEe(a,!0,u);break}}return p}});var tCe=_((xKt,eCe)=>{"use strict";var y0=U6(),gEt=Kk();function zk(t,e,r){if(t.charAt(e)===" ")return e;for(let o=1;o<=3;o++)if(r){if(t.charAt(e+o)===" ")return e+o}else if(t.charAt(e-o)===" ")return e-o;return e}eCe.exports=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:o,space:a,preferTruncationOnSpace:n}=r,u="\u2026",A=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return u;let p=gEt(t);if(p<=e)return t;if(o==="start"){if(n){let h=zk(t,p-e+1,!0);return u+y0(t,h,p).trim()}return a===!0&&(u+=" ",A=2),u+y0(t,p-e+A,p)}if(o==="middle"){a===!0&&(u=" "+u+" ",A=3);let h=Math.floor(e/2);if(n){let C=zk(t,h),I=zk(t,p-(e-h)+1,!0);return y0(t,0,C)+u+y0(t,I,p).trim()}return y0(t,0,h)+u+y0(t,p-(e-h)+A,p)}if(o==="end"){if(n){let h=zk(t,e-1);return y0(t,0,h)+u}return a===!0&&(u=" "+u,A=2),y0(t,0,e-A)+u}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${o}`)}});var H6=_(AB=>{"use strict";var rCe=AB&&AB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AB,"__esModule",{value:!0});var dEt=rCe(WEe()),mEt=rCe(tCe()),_6={};AB.default=(t,e,r)=>{let o=t+String(e)+String(r);if(_6[o])return _6[o];let a=t;if(r==="wrap"&&(a=dEt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=mEt.default(t,e,{position:n})}return _6[o]=a,a}});var q6=_(j6=>{"use strict";Object.defineProperty(j6,"__esModule",{value:!0});var nCe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let o="";r.nodeName==="#text"?o=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(o=nCe(r)),o.length>0&&typeof r.internal_transform=="function"&&(o=r.internal_transform(o))),e+=o}return e};j6.default=nCe});var G6=_(pi=>{"use strict";var fB=pi&&pi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pi,"__esModule",{value:!0});pi.setTextNodeValue=pi.createTextNode=pi.setStyle=pi.setAttribute=pi.removeChildNode=pi.insertBeforeNode=pi.appendChildNode=pi.createNode=pi.TEXT_NAME=void 0;var yEt=fB(om()),iCe=fB(jEe()),EEt=fB(qEe()),CEt=fB(H6()),wEt=fB(q6());pi.TEXT_NAME="#text";pi.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t==="ink-virtual-text"?void 0:yEt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(IEt.bind(null,r))),r};pi.appendChildNode=(t,e)=>{var r;e.parentNode&&pi.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&Jk(t)};pi.insertBefo
`:`
`)+r,a=o+1,o=t.indexOf(`
`,a)}while(o!==-1);return n+=t.substr(a),n};mCe.exports={stringReplaceAll:PEt,stringEncaseCRLFWithFirstIndex:SEt}});var BCe=_((MKt,ICe)=>{"use strict";var xEt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,ECe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,bEt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,kEt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,QEt=new Map([["n",`
`],["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)):QEt.get(t)||t}function FEt(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(bEt))r.push(a[2].replace(kEt,(A,p,h)=>p?wCe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function REt(t){ECe.lastIndex=0;let e=[],r;for(;(r=ECe.exec(t))!==null;){let o=r[1];if(r[2]){let a=FEt(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(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}ICe.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(xEt,(n,u,A,p,h,C)=>{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:REt(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(C)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var rQ=_((UKt,bCe)=>{"use strict";var gB=BI(),{stdout:K6,stderr:V6}=dL(),{stringReplaceAll:TEt,stringEncaseCRLFWithFirstIndex:LEt}=yCe(),{isArray:Zk}=Array,DCe=["ansi","ansi","ansi256","ansi16m"],_C=Object.create(null),NEt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=K6?K6.level:0;t.level=e.level===void 0?r:e.level},z6=class{constructor(e){return PCe(e)}},PCe=t=>{let e={};return NEt(e,t),e.template=(...r)=>xCe(e.template,...r),Object.setPrototypeOf(e,$k.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=z6,e.template};function $k(t){return PCe(t)}for(let[t,e]of Object.entries(gB))_C[t]={get(){let r=eQ(this,J6(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};_C.visible={get(){let t=eQ(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var SCe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of SCe)_C[t]={get(){let{level:e}=this;return function(...r){let o=J6(gB.color[DCe[e]][t](...r),gB.color.close,this._styler);return eQ(this,o,this._isEmpty)}}};for(let t of SCe){let e="bg"+t[0].toUpperCase()+t.slice(1);_C[e]={get(){let{level:r}=this;return function(...o){let a=J6(gB.bgColor[DCe[r]][t](...o),gB.bgColor.close,this._styler);return eQ(this,a,this._isEmpty)}}}}var OEt=Object.defineProperties(()=>{},{..._C,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),J6=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},eQ=(t,e,r)=>{let o=(...a)=>Zk(a[0])&&Zk(a[0].raw)?vCe(o,xCe(o,...a)):vCe(o,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(o,OEt),o._generator=t,o._styler=e,o._isEmpty=r,o},vCe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=TEt(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
`);return n!==-1&&(e=LEt(e,a,o,n)),o+e+a},W6,xCe=(t,...e)=>{let[r]=e;if(!Zk(r)||!Zk(r.raw))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return W6===void 0&&(W6=BCe()),W6(t,a.join(""))};Object.defineProperties($k.prototype,_C);var tQ=$k();tQ.supportsColor=K6;tQ.stderr=$k({level:V6?V6.level:0});tQ.stderr.supportsColor=V6;bCe.exports=tQ});var X6=_(mB=>{"use strict";var MEt=mB&&mB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mB,"__esModule",{value:!0});var dB=MEt(rQ()),UEt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,_Et=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,nQ=(t,e)=>e==="foreground"?t:"bg"+t[0].toUpperCase()+t.slice(1);mB.default=(t,e,r)=>{if(!e)return t;if(e in dB.default){let a=nQ(e,r);return dB.default[a](t)}if(e.startsWith("#")){let a=nQ("hex",r);return dB.default[a](e)(t)}if(e.startsWith("ansi")){let a=_Et.exec(e);if(!a)return t;let n=nQ(a[1],r),u=Number(a[2]);return dB.default[n](u)(t)}if(e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("hsv")||e.startsWith("hwb")){let a=UEt.exec(e);if(!a)return t;let n=nQ(a[1],r),u=Number(a[2]),A=Number(a[3]),p=Number(a[4]);return dB.default[n](u,A,p)(t)}return t}});var QCe=_(yB=>{"use strict";var kCe=yB&&yB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yB,"__esModule",{value:!0});var HEt=kCe(dCe()),Z6=kCe(X6());yB.default=(t,e,r,o)=>{if(typeof r.style.borderStyle=="string"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),u=r.style.borderColor,A=HEt.default[r.style.borderStyle],p=Z6.default(A.topLeft+A.horizontal.repeat(a-2)+A.topRight,u,"foreground"),h=(Z6.default(A.vertical,u,"foreground")+`
`).repeat(n-2),C=Z6.default(A.bottomLeft+A.horizontal.repeat(a-2)+A.bottomRight,u,"foreground");o.write(t,e,p,{transformers:[]}),o.write(t,e+1,h,{transformers:[]}),o.write(t+a-1,e+1,h,{transformers:[]}),o.write(t,e+n-1,C,{transformers:[]})}}});var RCe=_(EB=>{"use strict";var am=EB&&EB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(EB,"__esModule",{value:!0});var jEt=am(om()),qEt=am(L6()),GEt=am(fCe()),YEt=am(H6()),WEt=am(pCe()),KEt=am(q6()),VEt=am(QCe()),zEt=(t,e)=>{var r;let o=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(o){let a=o.getComputedLeft(),n=o.getComputedTop();e=`
`.repeat(n)+GEt.default(e,a)}return e},FCe=(t,e,r)=>{var o;let{offsetX:a=0,offsetY:n=0,transformers:u=[],skipStaticElements:A}=r;if(A&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===jEt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),C=n+p.getComputedTop(),I=u;if(typeof t.internal_transform=="function"&&(I=[t.internal_transform,...u]),t.nodeName==="ink-text"){let v=KEt.default(t);if(v.length>0){let b=qEt.default(v),E=WEt.default(p);if(b>E){let F=(o=t.style.textWrap)!==null&&o!==void 0?o:"wrap";v=YEt.default(v,E,F)}v=zEt(t,v),e.write(h,C,v,{transformers:I})}return}if(t.nodeName==="ink-box"&&VEt.default(h,C,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let v of t.childNodes)FCe(v,e,{offsetX:h,offsetY:C,transformers:I,skipStaticElements:A})}};EB.default=FCe});var LCe=_((qKt,TCe)=>{"use strict";TCe.exports=t=>{t=Object.assign({onlyFirst:!1},t);let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t.onlyFirst?void 0:"g")}});var OCe=_((GKt,$6)=>{"use strict";var JEt=LCe(),NCe=t=>typeof t=="string"?t.replace(JEt(),""):t;$6.exports=NCe;$6.exports.default=NCe});var _Ce=_((YKt,UCe)=>{"use strict";var MCe="[\uD800-\uDBFF][\uDC00-\uDFFF]";UCe.exports=t=>t&&t.exact?new RegExp(`^${MCe}$`):new RegExp(MCe,"g")});var jCe=_((WKt,ej)=>{"use strict";var XEt=OCe(),ZEt=_Ce(),HCe=t=>XEt(t).replace(ZEt()," ").length;ej.exports=HCe;ej.exports.default=HCe});var YCe=_(CB=>{"use strict";var GCe=CB&&CB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(CB,"__esModule",{value:!0});var qCe=GCe(U6()),$Et=GCe(jCe()),tj=class{constructor(e){this.writes=[];let{width:r,height:o}=e;this.width=r,this.height=o}write(e,r,o,a){let{transformers:n}=a;!o||this.writes.push({x:e,y:r,text:o,transformers:n})}get(){let e=[];for(let o=0;o<this.height;o++)e.push(" ".repeat(this.width));for(let o of this.writes){let{x:a,y:n,text:u,transformers:A}=o,p=u.split(`
`),h=0;for(let C of p){let I=e[n+h];if(!I)continue;let v=$Et.default(C);for(let b of A)C=b(C);e[n+h]=qCe.default(I,0,a)+C+qCe.default(I,a+v),h++}}return{output:e.map(o=>o.trimRight()).join(`
`),height:e.length}}};CB.default=tj});var VCe=_(wB=>{"use strict";var rj=wB&&wB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wB,"__esModule",{value:!0});var eCt=rj(om()),WCe=rj(RCe()),KCe=rj(YCe());wB.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,eCt.default.DIRECTION_LTR);let o=new KCe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});WCe.default(t,o,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new KCe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),WCe.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:u}=o.get();return{output:n,outputHeight:u,staticOutput:a?`${a.get().output}
`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var ZCe=_((zKt,XCe)=>{"use strict";var zCe=Be("stream"),JCe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],nj={},tCt=t=>{let e=new zCe.PassThrough,r=new zCe.PassThrough;e.write=a=>t("stdout",a),r.write=a=>t("stderr",a);let o=new console.Console(e,r);for(let a of JCe)nj[a]=console[a],console[a]=o[a];return()=>{for(let a of JCe)console[a]=nj[a];nj={}}};XCe.exports=tCt});var sj=_(ij=>{"use strict";Object.defineProperty(ij,"__esModule",{value:!0});ij.default=new WeakMap});var aj=_(oj=>{"use strict";Object.defineProperty(oj,"__esModule",{value:!0});var rCt=sn(),$Ce=rCt.createContext({exit:()=>{}});$Ce.displayName="InternalAppContext";oj.default=$Ce});var cj=_(lj=>{"use strict";Object.defineProperty(lj,"__esModule",{value:!0});var nCt=sn(),ewe=nCt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});ewe.displayName="InternalStdinContext";lj.default=ewe});var Aj=_(uj=>{"use strict";Object.defineProperty(uj,"__esModule",{value:!0});var iCt=sn(),twe=iCt.createContext({stdout:void 0,write:()=>{}});twe.displayName="InternalStdoutContext";uj.default=twe});var pj=_(fj=>{"use strict";Object.defineProperty(fj,"__esModule",{value:!0});var sCt=sn(),rwe=sCt.createContext({stderr:void 0,write:()=>{}});rwe.displayName="InternalStderrContext";fj.default=rwe});var iQ=_(hj=>{"use strict";Object.defineProperty(hj,"__esModule",{value:!0});var oCt=sn(),nwe=oCt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});nwe.displayName="InternalFocusContext";hj.default=nwe});var swe=_((rVt,iwe)=>{"use strict";var aCt=/[|\\{}()[\]^$+*?.-]/g;iwe.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(aCt,"\\$&")}});var cwe=_((nVt,lwe)=>{"use strict";var lCt=swe(),cCt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",awe=[].concat(Be("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));awe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var IB=class{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=IB.nodeInternals()),"cwd"in e||(e.cwd=cCt),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,uCt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...awe]}clean(e,r=0){r=" ".repeat(r),Array.isArray(e)||(e=e.split(`
`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let o=!1,a=null,n=[];return e.forEach(u=>{if(u=u.replace(/\\/g,"/"),this._internals.some(p=>p.test(u)))return;let A=/^\s*at /.test(u);o?u=u.trimEnd().replace(/^(\s+)at /,"$1"):(u=u.trim(),A&&(u=u.slice(3))),u=u.replace(`${this._cwd}/`,""),u&&(A?(a&&(n.push(a),a=null),n.push(u)):(o=!0,a=u))}),n.map(u=>`${r}${u}
`).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=1/0);let{stackTraceLimit:o}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=o,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=1/0);let{prepareStackTrace:o,stackTraceLimit:a}=Error;Error.prepareStackTrace=(A,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:u}=n;return Object.assign(Error,{prepareStackTrace:o,stackTraceLimit:a}),u}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let o={line:r.getLineNumber(),column:r.getColumnNumber()};owe(o,r.getFileName(),this._cwd),r.isConstructor()&&(o.constructor=!0),r.isEval()&&(o.evalOrigin=r.getEvalOrigin()),r.isNative()&&(o.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(o.type=a);let n=r.getFunctionName();n&&(o.function=n);let u=r.getMethodName();return u&&n!==u&&(o.method=u),o}parseLine(e){let r=e&&e.match(ACt);if(!r)return null;let o=r[1]==="new",a=r[2],n=r[3],u=r[4],A=Number(r[5]),p=Number(r[6]),h=r[7],C=r[8],I=r[9],v=r[10]==="native",b=r[11]===")",E,F={};if(C&&(F.line=Number(C)),I&&(F.column=Number(I)),b&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")N++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(N--,N===-1&&h.charAt(U-1)===" ")){let z=h.slice(0,U-1);h=h.slice(U+1),a+=` (${z}`;break}}if(a){let N=a.match(fCt);N&&(a=N[1],E=N[2])}return owe(F,h,this._cwd),o&&(F.constructor=!0),n&&(F.evalOrigin=n,F.evalLine=A,F.evalColumn=p,F.evalFile=u&&u.replace(/\\/g,"/")),v&&(F.native=!0),a&&(F.function=a),E&&a!==E&&(F.method=E),F}};function owe(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function uCt(t){if(t.length===0)return[];let e=t.map(r=>lCt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var ACt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),fCt=/^(.*?) \[as (.*?)\]$/;lwe.exports=IB});var Awe=_((iVt,uwe)=>{"use strict";uwe.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var pwe=_((sVt,fwe)=>{"use strict";var pCt=Awe(),hCt=(t,e)=>{let r=[],o=t-e,a=t+e;for(let n=o;n<=a;n++)r.push(n);return r};fwe.exports=(t,e,r)=>{if(typeof t!="string")throw new TypeError("Source code is missing.");if(!e||e<1)throw new TypeError("Line number must start from `1`.");if(t=pCt(t).split(/\r?\n/),!(e>t.length))return r={around:3,...r},hCt(e,r.around).filter(o=>t[o-1]!==void 0).map(o=>({line:o,value:t[o-1]}))}});var sQ=_(ru=>{"use strict";var gCt=ru&&ru.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),dCt=ru&&ru.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mCt=ru&&ru.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&gCt(e,t,r);return dCt(e,t),e},yCt=ru&&ru.__rest||function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(t);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(t,o[a])&&(r[o[a]]=t[o[a]]);return r};Object.defineProperty(ru,"__esModule",{value:!0});var hwe=mCt(sn()),gj=hwe.forwardRef((t,e)=>{var{children:r}=t,o=yCt(t,["children"]);let a=Object.assign(Object.assign({},o),{marginLeft:o.marginLeft||o.marginX||o.margin||0,marginRight:o.marginRight||o.marginX||o.margin||0,marginTop:o.marginTop||o.marginY||o.margin||0,marginBottom:o.marginBottom||o.marginY||o.margin||0,paddingLeft:o.paddingLeft||o.paddingX||o.padding||0,paddingRight:o.paddingRight||o.paddingX||o.padding||0,paddingTop:o.paddingTop||o.paddingY||
`).slice(1):void 0,r=e?ywe.parseLine(e[0]):void 0,o,a=0;if(r?.file&&r?.line&&dwe.existsSync(r.file)){let n=dwe.readFileSync(r.file,"utf8");if(o=BCt.default(n,r.line),o)for(let{line:u}of o)a=Math.max(a,String(u).length)}return fs.default.createElement(Jf.default,{flexDirection:"column",padding:1},fs.default.createElement(Jf.default,null,fs.default.createElement(hA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),fs.default.createElement(hA.default,null," ",t.message)),r&&fs.default.createElement(Jf.default,{marginTop:1},fs.default.createElement(hA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&o&&fs.default.createElement(Jf.default,{marginTop:1,flexDirection:"column"},o.map(({line:n,value:u})=>fs.default.createElement(Jf.default,{key:n},fs.default.createElement(Jf.default,{width:a+1},fs.default.createElement(hA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),fs.default.createElement(hA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+u)))),t.stack&&fs.default.createElement(Jf.default,{marginTop:1,flexDirection:"column"},t.stack.split(`
`).slice(1).map(n=>{let u=ywe.parseLine(n);return u?fs.default.createElement(Jf.default,{key:n},fs.default.createElement(hA.default,{dimColor:!0},"- "),fs.default.createElement(hA.default,{dimColor:!0,bold:!0},u.function),fs.default.createElement(hA.default,{dimColor:!0,color:"gray"}," ","(",u.file,":",u.line,":",u.column,")")):fs.default.createElement(Jf.default,{key:n},fs.default.createElement(hA.default,{dimColor:!0},"- "),fs.default.createElement(hA.default,{dimColor:!0,bold:!0},n))})))};nu.default=vCt});var wwe=_(iu=>{"use strict";var DCt=iu&&iu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),PCt=iu&&iu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),SCt=iu&&iu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&DCt(e,t,r);return PCt(e,t),e},cm=iu&&iu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iu,"__esModule",{value:!0});var lm=SCt(sn()),Cwe=cm(g6()),xCt=cm(aj()),bCt=cm(cj()),kCt=cm(Aj()),QCt=cm(pj()),FCt=cm(iQ()),RCt=cm(Ewe()),TCt=" ",LCt="\x1B[Z",NCt="\x1B",oQ=class extends lm.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),e){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=e=>{e===""&&this.props.exitOnCtrlC&&this.handleExit(),e===NCt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===TCt&&this.focusNext(),e===LCt&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(e=>{let r=e.focusables[0].id;return{activeFocusId:this.findNextFocusable(e)||r}})},this.focusPrevious=()=>{this.setState(e=>{let r=e.focusables[e.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(e)||r}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(o=>{let a=o.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...o.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(o=>o.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{let r=e.focusables.findIndex(o=>o.id===e.activeFocusId);for(let o=r+1;o<e.focusables.length;o++)if(e.focusables[o].isActive)return e.focusables[o].id},this.findPreviousFocusable=e=>{let r=e.focusables.findIndex(o=>o.id===e.activeFocusId);for(let o=r-1;o>=0;o--)if(e.focusables[o].isActive)return e.focusables[o].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return lm.default.createElement(xCt.default.Provider,{value:{exit:this.handleExit}},lm.default.createElement(bCt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},lm.default.createElement(kCt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},lm.default.createElement(QCt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},lm.default.createElement(FCt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious}},this.state.error?lm.default.createElement(RCt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){Cwe.default.hide(this.props.stdout)}componentWillUnmount(){Cwe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};iu.default=oQ;oQ.displayName="InternalApp"});var vwe=_(su=>{"use strict";var OCt=su&&su.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),MCt=su&&su.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),UCt=su&&su.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&OCt(e,t,r);return MCt(e,t),e},ou=su&&su.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(su,"__esModule",{value:!0});var _Ct=ou(sn()),Iwe=lM(),HCt=ou(cEe()),jCt=ou(u6()),qCt=ou(gEe(
`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(jC){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),o>=this.options.stdout.rows){this.options.stdout.write(jCt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},GCt.default(this),this.options=e,this.rootNode=VCt.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:Iwe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=HCt.default.create(e.stdout),this.throttledLog=e.debug?this.log:Iwe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=Ej.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=WCt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),jC||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=_Ct.default.createElement(JCt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);Ej.default.updateContainer(r,this.container,null,Bwe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(jC){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(jC){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),jC?this.options.stdout.write(this.lastOutput+`
`):this.options.debug||this.log.done(),this.isUnmounted=!0,Ej.default.updateContainer(null,this.container,null,Bwe),zCt.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!jC&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=KCt.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};su.default=Cj});var Pwe=_(DB=>{"use strict";var Dwe=DB&&DB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(DB,"__esModule",{value:!0});var XCt=Dwe(vwe()),aQ=Dwe(sj()),ZCt=Be("stream"),$Ct=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},ewt(e)),o=twt(r.stdout,()=>new XCt.default(r));return o.render(t),{rerender:o.render,unmount:()=>o.unmount(),waitUntilExit:o.waitUntilExit,cleanup:()=>aQ.default.delete(r.stdout),clear:o.clear}};DB.default=$Ct;var ewt=(t={})=>t instanceof ZCt.Stream?{stdout:t,stdin:process.stdin}:t,twt=(t,e)=>{let r;return aQ.default.has(t)?r=aQ.default.get(t):(r=e(),aQ.default.set(t,r)),r}});var xwe=_(Xf=>{"use strict";var rwt=Xf&&Xf.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),nwt=Xf&&Xf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),iwt=Xf&&Xf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&rwt(e,t,r);return nwt(e,t),e};Object.defineProperty(Xf,"__esModule",{value:!0});var PB=iwt(sn()),Swe=t=>{let{items:e,children:r,style:o}=t,[a,n]=PB.useState(0),u=PB.useMemo(()=>e.slice(a),[e,a]);PB.useLayoutEffect(()=>{n(e.length)},[e.length]);let A=u.map((h,C)=>r(h,a+C)),p=PB.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},o),[o]);return PB.default.createElement("ink-box",{internal_static:!0,style:p},A)};Swe.displayName="Static";Xf.default=Swe});var kwe=_(SB=>{"use strict";var swt=SB&&SB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(SB,"__esModule",{value:!0});var owt=swt(sn()),bwe=({children:t,transform:e})=>t==null?null:owt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);bwe.displayName="Transform";SB.default=bwe});var Fwe=_(xB=>{"use strict";var awt=xB&&xB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xB,"__esModule",{value:!0});var lwt=awt(sn()),Qwe=({count:t=1})=>lwt.default.createElement("ink-text",null,`
`.repeat(t));Qwe.displayName="Newline";xB.default=Qwe});var Lwe=_(bB=>{"use strict";var Rwe=bB&&bB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bB,"__esModule",{value:!0});var cwt=Rwe(sn()),uwt=Rwe(sQ()),Twe=()=>cwt.default.createElement(uwt.default,{flexGrow:1});Twe.displayName="Spacer";bB.default=Twe});var lQ=_(kB=>{"use strict";var Awt=kB&&kB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kB,"__esModule",{value:!0});var fwt=sn(),pwt=Awt(cj()),hwt=()=>fwt.useContext(pwt.default);kB.default=hwt});var Owe=_(QB=>{"use strict";var gwt=QB&&QB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(QB,"__esModule",{value:!0});var Nwe=sn(),dwt=gwt(lQ()),mwt=(t,e={})=>{let{stdin:r,setRawMode:o,internal_exitOnCtrlC:a}=dwt.default();Nwe.useEffect(()=>{if(e.isActive!==!1)return o(!0),()=>{o(!1)}},[e.isActive,o]),Nwe.useEffect(()=>{if(e.isActive===!1)return;let n=u=>{let A=String(u),p={upArrow:A==="\x1B[A",downArrow:A==="\x1B[B",leftArrow:A==="\x1B[D",rightArrow:A==="\x1B[C",pageDown:A==="\x1B[6~",pageUp:A==="\x1B[5~",return:A==="\r",escape:A==="\x1B",ctrl:!1,shift:!1,tab:A===" "||A==="\x1B[Z",backspace:A==="\b",delete:A==="\x7F"||A==="\x1B[3~",meta:!1};A<=""&&!p.return&&(A=String.fromCharCode(A.charCodeAt(0)+"a".charCodeAt(0)-1),p.ctrl=!0),A.startsWith("\x1B")&&(A=A.slice(1),p.meta=!0);let h=A>="A"&&A<="Z",C=A>="\u0410"&&A<="\u042F";A.length===1&&(h||C)&&(p.shift=!0),p.tab&&A==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(A=""),(!(A==="c"&&p.ctrl)||!a)&&t(A,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[e.isActive,r,a,t])};QB.default=mwt});var Mwe=_(FB=>{"use strict";var ywt=FB&&FB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(FB,"__esModule",{value:!0});var Ewt=sn(),Cwt=ywt(aj()),wwt=()=>Ewt.useContext(Cwt.default);FB.default=wwt});var Uwe=_(RB=>{"use strict";var Iwt=RB&&RB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(RB,"__esModule",{value:!0});var Bwt=sn(),vwt=Iwt(Aj()),Dwt=()=>Bwt.useContext(vwt.default);RB.default=Dwt});var _we=_(TB=>{"use strict";var Pwt=TB&&TB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(TB,"__esModule",{value:!0});var Swt=sn(),xwt=Pwt(pj()),bwt=()=>Swt.useContext(xwt.default);TB.default=bwt});var jwe=_(NB=>{"use strict";var Hwe=NB&&NB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(NB,"__esModule",{value:!0});var LB=sn(),kwt=Hwe(iQ()),Qwt=Hwe(lQ()),Fwt=({isActive:t=!0,autoFocus:e=!1}={})=>{let{isRawModeSupported:r,setRawMode:o}=Qwt.default(),{activeId:a,add:n,remove:u,activate:A,deactivate:p}=LB.useContext(kwt.default),h=LB.useMemo(()=>Math.random().toString().slice(2,7),[]);return LB.useEffect(()=>(n(h,{autoFocus:e}),()=>{u(h)}),[h,e]),LB.useEffect(()=>{t?A(h):p(h)},[t,h]),LB.useEffect(()=>{if(!(!r||!t))return o(!0),()=>{o(!1)}},[t]),{isFocused:Boolean(h)&&a===h}};NB.default=Fwt});var qwe=_(OB=>{"use strict";var Rwt=OB&&OB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(OB,"__esModule",{value:!0});var Twt=sn(),Lwt=Rwt(iQ()),Nwt=()=>{let t=Twt.useContext(Lwt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious}};OB.default=Nwt});var Gwe=_(wj=>{"use strict";Object.defineProperty(wj,"__esModule",{value:!0});wj.default=t=>{var e,r,o,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(o=t.yogaNode)===null||o===void 0?void 0:o.getComputedHeight())!==null&&a!==void 0?a:0}}});var ic=_(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});var Owt=Pwe();Object.defineProperty(ro,"render",{enumerable:!0,get:function(){return Owt.default}});var Mwt=sQ();Object.defineProperty(ro,"Box",{enumerable:!0,get:function(){return Mwt.default}});var Uwt=yj();Object.defineProperty(ro,"Text",{enumerable:!0,get:function(){return Uwt.default}});var
`:"";return u?I+=`@IF EXIST ${u} (\r
${u} ${p} ${a} ${C}%*\r
) ELSE (\r
@SETLOCAL\r
@SET PATHEXT=%PATHEXT:;.JS;=;%\r
${A} ${p} ${a} ${C}%*\r
)\r
`:I+=`@${A} ${p} ${a} ${C}%*\r
`,I}function l1t(t,e,r){let o=sc.relative(sc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n;o=o.split("\\").join("/");let u=sc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,A=r.args||"",p=Aq(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,o=u):(a=u,A="",o="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",C=`#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
case \`uname\` in
*CYGWIN*) basedir=\`cygpath -w "$basedir"\`;;
esac
`,I=r.nodePath?`export NODE_PATH="${p}"
`:"";return n?C+=`${I}if [ -x ${n} ]; then
exec ${n} ${A} ${o} ${h}"$@"
else
exec ${a} ${A} ${o} ${h}"$@"
fi
`:C+=`${I}${a} ${A} ${o} ${h}"$@"
exit $?
`,C}function c1t(t,e,r){let o=sc.relative(sc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,u;o=o.split("\\").join("/");let A=sc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,p=r.args||"",h=Aq(r.nodePath),C=h.win32,I=h.posix;n?(u=`"$basedir/${r.prog}$exe"`,o=A):(n=A,p="",o="");let v=r.progArgs?`${r.progArgs.join(" ")} `:"",b=`#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
${r.nodePath?`$env_node_path=$env:NODE_PATH
$env:NODE_PATH="${C}"
`:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}`;return r.nodePath&&(b+=` else {
$env:NODE_PATH="${I}"
}`),u?b+=`
$ret=0
if (Test-Path ${u}) {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${u} ${p} ${o} ${v}$args
} else {
& ${u} ${p} ${o} ${v}$args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${n} ${p} ${o} ${v}$args
} else {
& ${n} ${p} ${o} ${v}$args
}
$ret=$LASTEXITCODE
}
${r.nodePath?`$env:NODE_PATH=$env_node_path
`:""}exit $ret
`:b+=`
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & ${n} ${p} ${o} ${v}$args
} else {
& ${n} ${p} ${o} ${v}$args
}
${r.nodePath?`$env:NODE_PATH=$env_node_path
`:""}exit $LASTEXITCODE
`,b}function u1t(t,e){return e.fs_.chmod(t,493)}function Aq(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(sc.delimiter):Array.from(t),r={};for(let o=0;o<e.length;o++){let a=e[o].split("/").join("\\"),n=s1e()?e[o].split("\\").join("/").replace(/^([^:\\/]*):/,(u,A)=>`/mnt/${A.toLowerCase()}`):e[o];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[o]={win32:a,posix:n}}return r}a1e.exports=uq});var Pq=_((u$t,k1e)=>{k1e.exports=Be("stream")});var T1e=_((A$t,R1e)=>{"use strict";function Q1e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function T1t(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Q1e(Object(r),!0).forEach(function(o){L1t(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Q1e(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function L1t(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function N1t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function F1e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function O1t(t,e,r){return e&&F1e(t.prototype,e),r&&F1e(t,r),t}var M1t=Be("buffer"),bQ=M1t.Buffer,U1t=Be("util"),Sq=U1t.inspect,_1t=Sq&&Sq.custom||"inspect";function H1t(t,e,r){bQ.prototype.copy.call(t,e,r)}R1e.exports=function(){function t(){N1t(this,t),this.head=null,this.tail=null,this.length=0}return O1t(t,[{key:"push",value:function(r){var o={data:r,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:"unshift",value:function(r){var o={data:r,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var o=this.head,a=""+o.data;o=o.next;)a+=r+o.data;return a}},{key:"concat",value:function(r){if(this.length===0)return bQ.alloc(0);for(var o=bQ.allocUnsafe(r>>>0),a=this.head,n=0;a;)H1t(a.data,o,n),n+=a.data.length,a=a.next;return o}},{key:"consume",value:function(r,o){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=o?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var o=this.head,a=1,n=o.data;for(r-=n.length;o=o.next;){var u=o.data,A=r>u.length?u.length:r;if(A===u.length?n+=u:n+=u.slice(0,r),r-=A,r===0){A===u.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(A));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var o=bQ.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(o),r-=a.data.length;a=a.next;){var u=a.data,A=r>u.length?u.length:r;if(u.copy(o,o.length-r,0,A),r-=A,r===0){A===u.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=u.slice(A));break}++n}return this.length-=n,o}},{key:_1t,value:function(r,o){return Sq(this,T1t({},o,{depth:0,customInspect:!1}))}}]),t}()});var bq=_((f$t,N1e)=>{"use strict";function j1t(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(xq,this,t)):process.nextTick(xq,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,functio
`)),t.linkname&&(e+=nG(" linkpath="+t.linkname+`
`));var r=t.pax;if(r)for(var o in r)e+=nG(" "+o+"="+r[o]+`
`);return Buffer.from(e)};rw.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};rw.encode=function(t){var e=NBt(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(L0(t.mode&jBt,6),100),e.write(L0(t.uid,6),108),e.write(L0(t.gid,6),116),e.write(L0(t.size,11),124),e.write(L0(t.mtime.getTime()/1e3|0,11),136),e[156]=N2e+YBt(t.type),t.linkname&&e.write(t.linkname,157),O2e.copy(e,Pv),UBt.copy(e,iG),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(L0(t.devmajor||0,6),329),e.write(L0(t.devminor||0,6),337),o&&e.write(o,345),e.write(L0(U2e(e),6),148),e)};rw.decode=function(t,e,r){var o=t[156]===0?0:t[156]-N2e,a=tw(t,0,100,e),n=N0(t,100,8),u=N0(t,108,8),A=N0(t,116,8),p=N0(t,124,12),h=N0(t,136,12),C=GBt(o),I=t[157]===0?null:tw(t,157,100,e),v=tw(t,265,32),b=tw(t,297,32),E=N0(t,329,8),F=N0(t,337,8),N=U2e(t);if(N===8*32)return null;if(N!==N0(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(O2e.compare(t,Pv,Pv+6)===0)t[345]&&(a=tw(t,345,155,e)+"/"+a);else if(!(_Bt.compare(t,Pv,Pv+6)===0&&HBt.compare(t,iG,iG+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:C,linkname:I,uname:v,gname:b,devmajor:E,devminor:F}}});var W2e=_((F$t,Y2e)=>{var H2e=Be("util"),KBt=L2e(),Sv=sG(),j2e=ew().Writable,q2e=ew().PassThrough,G2e=function(){},_2e=function(t){return t&=511,t&&512-t},VBt=function(t,e){var r=new YQ(t,e);return r.end(),r},zBt=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},YQ=function(t,e){this._parent=t,this.offset=e,q2e.call(this,{autoDestroy:!1})};H2e.inherits(YQ,q2e);YQ.prototype.destroy=function(t){this._parent.destroy(t)};var ip=function(t){if(!(this instanceof ip))return new ip(t);j2e.call(this,t),t=t||{},this._offset=0,this._buffer=KBt(),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=_2e(e._header.size);v?e._parse(v,u):e._parse(512,I),e._locked||o()},u=function(){e._buffer.consume(_2e(e._header.size)),e._parse(512,I),o()},A=function(){var v=e._header.size;e._paxGlobal=Sv.decodePax(r.slice(0,v)),r.consume(v),n()},p=function(){var v=e._header.size;e._pax=Sv.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=Sv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},C=function(){var v=e._header.size;this._gnuLongLinkPath=Sv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},I=function(){var v=e._offset,b;try{b=e._header=Sv.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(E){e.emit("error",E)}if(r.consume(512),!b){e._parse(512,I),o();return}if(b.type==="gnu-long-path"){e._parse(b.size,h),o();return}if(b.type==="gnu-long-link-path"){e._parse(b.size,C),o();return}if(b.type==="pax-global-header"){e._parse(b.size,A),o();return}if(b.type==="pax-header"){e._parse(b.size,p),o();return}if(e._gnuLongPath&&(b.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(b.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=b=zBt(b,e._pax),e._pax
Wanted: ${r.size}
Found: ${t.length}`);throw A.code="EBADSIZE",A.found=t.length,A.expected=r.size,A.sri=e,A}else{let A=new Error(`Integrity checksum failed when using ${o}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw A.code="EINTEGRITY",A.found=n,A.expected=e,A.algorithm=o,A.sri=e,A}}IA.exports.checkStream=Pvt;function Pvt(t,e,r){r=ia(r);let o=r.Promise||Promise,a=dG(r.concat({integrity:e}));return new o((n,u)=>{t.pipe(a),t.on("error",u),a.on("error",u);let A;a.on("verified",p=>{A=p}),a.on("end",()=>n(A)),a.on("data",()=>{})})}IA.exports.integrityStream=dG;function dG(t){t=ia(t);let e=t.integrity&&wA(t.integrity,t),r=e&&Object.keys(e).length,o=r&&e.pickAlgorithm(t),a=r&&e[o],n=Array.from(new Set(t.algorithms.concat(o?[o]:[]))),u=n.map(kv.createHash),A=0,p=new mvt({transform(h,C,I){A+=h.length,u.forEach(v=>v.update(h,C)),I(null,h,C)}}).on("end",()=>{let h=t.options&&t.options.length?`?${t.options.join("?")}`:"",C=wA(u.map((v,b)=>`${n[b]}-${v.digest("base64")}${h}`).join(" "),t),I=r&&C.match(e,t);if(typeof t.size=="number"&&A!==t.size){let v=new Error(`stream size mismatch when checking ${e}.
Wanted: ${t.size}
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} integrity checksum failed when using ${o}: wanted ${a} but got ${C}. (${A} bytes)`);v.code="EINTEGRITY",v.found=C,v.expected=a,v.algorithm=o,v.sri=e,p.emit("error",v)}else p.emit("size",A),p.emit("integrity",C),I&&p.emit("verified",I)});return p}IA.exports.create=Svt;function Svt(t){t=ia(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",o=e.map(kv.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 M0(`${A}-${p}${r}`,t);if(h.algorithm&&h.digest){let C=h.algorithm;u[C]||(u[C]=[]),u[C].push(h)}return u},new vm)}}}var xvt=new Set(kv.getHashes()),hBe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>xvt.has(t));function bvt(t,e){return hBe.indexOf(t.toLowerCase())>=hBe.indexOf(e.toLowerCase())?t:e}});var YBe=_((iir,GBe)=>{var xDt=cN();function bDt(t){return xDt(t)?void 0:t}GBe.exports=bDt});var KBe=_((sir,WBe)=>{var kDt=Hx(),QDt=b8(),FDt=R8(),RDt=jd(),TDt=gd(),LDt=YBe(),NDt=v_(),ODt=x8(),MDt=1,UDt=2,_Dt=4,HDt=NDt(function(t,e){var r={};if(t==null)return r;var o=!1;e=kDt(e,function(n){return n=RDt(n,t),o||(o=n.length>1),n}),TDt(t,ODt(t),r),o&&(r=QDt(r,MDt|UDt|_Dt,LDt));for(var a=e.length;a--;)FDt(r,e[a]);return r});WBe.exports=HDt});Pt();Ye();Pt();var ZBe=Be("child_process"),$Be=$e($g());qt();var uC=new Map([]);var s2={};Vt(s2,{BaseCommand:()=>ut,WorkspaceRequiredError:()=>rr,getCli:()=>ehe,getDynamicLibs:()=>$pe,getPluginConfiguration:()=>fC,openWorkspace:()=>AC,pluginCommands:()=>uC,runExit:()=>nk});qt();var ut=class extends nt{constructor(){super(...arguments);this.cwd=ge.String("--cwd",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<"u")throw new it("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()}};Ye();Pt();qt();var rr=class extends it{constructor(e,r){let o=V.relative(e,r),a=V.join(e,Ot.fileName);super(`This command can only be run from within a workspace of your project (${o} isn't a workspace of ${a}).`)}};Ye();Pt();nA();Ll();x1();qt();var TAt=$e(Jn());Za();var $pe=()=>new Map([["@yarnpkg/cli",s2],["@yarnpkg/core",i2],["@yarnpkg/fslib",Kw],["@yarnpkg/libzip",S1],["@yarnpkg/parsers",tI],["@yarnpkg/shell",F1],["clipanion",fI],["semver",TAt],["typanion",Vo]]);Ye();async function AC(t,e){let{project:r,workspace:o}=await St.find(t,e);if(!o)throw new rr(r.cwd,e);return o}Ye();Pt();nA();Ll();x1();qt();var JDt=$e(Jn());Za();var $8={};Vt($8,{AddCommand:()=>bh,BinCommand:()=>kh,CacheCleanCommand:()=>Qh,ClipanionCommand:()=>Wd,ConfigCommand:()=>Lh,ConfigGetCommand:()=>Fh,ConfigSetCommand:()=>Rh,ConfigUnsetCommand:()=>Th,DedupeCommand:()=>Nh,EntryCommand:()=>dC,ExecCommand:()=>Oh,ExplainCommand:()=>_h,ExplainPeerRequirementsCommand:()=>Mh,HelpCommand:()=>Kd,InfoCommand:()=>Hh,LinkCommand:()=>qh,NodeCommand:()=>Gh,PluginCheckCommand:()=>Yh,PluginImportCommand:()=>Vh,PluginImportSourcesCommand:()=>zh,PluginListCommand:()=>Wh,PluginRemoveCommand:()=>Jh,PluginRuntimeCommand:()=>Xh,RebuildCommand:()=>Zh,RemoveCommand:()=>$h,RunCommand:()=>e0,RunIndexCommand:()=>Jd,SetResolutionCommand:()=>t0,SetVersionCommand:()=>Uh,SetVersionSourcesCommand:()=>Kh,UnlinkCommand:()=>r0,UpCommand:()=>Kf,VersionCommand:()=>Vd,WhyCommand:()=>n0,WorkspaceCommand:()=>o0,WorkspacesListCommand:()=>s0,YarnCommand:()=>jh,dedupeUtils:()=>pk,default:()=>Pgt,suggestUtils:()=>Jc});var Fde=$e($g());Ye();Ye();Ye();qt();var H0e=$e(u2());Za();var Jc={};Vt(Jc,{Modifier:()=>B8,Strategy:()=>uk,Target:()=>A2,WorkspaceModifier:()=>N0e,applyModifier:()=>ept,extractDescriptorFromPath:()=>v8,extractRangeModifier:()=>O0e,fetchDescriptorFrom:()=>D8,findProjectDescriptors:()=>_0e,getModifier:()=>f2,getSuggestedDescriptors:()=>p2,makeWorkspaceDescriptor:()=>U0e,toWorkspaceModifier:()=>M0e})
Try running the command again with the package name prefixed: ${de.pretty(r,"yarn add",de.Type.CODE)} ${de.pretty(r,G.makeDescriptor(G.makeIdent(null,"my-package"),`${te[0]}...`),de.Type.DESCRIPTOR)}`);if(!z)throw new it(`The ${de.pretty(r,U,de.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let le=rpt(a,z,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(le.map(async ue=>{let ye=await p2(z,{project:o,workspace:a,cache:n,fixed:u,target:ue,modifier:h,strategies:C,maxResults:I});return{request:z,suggestedDescriptors:ye,target:ue}}))})).then(U=>U.flat()),b=await AA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async U=>{for(let{request:z,suggestedDescriptors:{suggestions:te,rejections:le}}of v)if(te.filter(ue=>ue.descriptor!==null).length===0){let[ue]=le;if(typeof ue>"u")throw new Error("Assertion failed: Expected an error to have been set");o.configuration.get("enableNetwork")?U.reportError(27,`${G.prettyDescriptor(r,z)} can't be resolved to a satisfying range`):U.reportError(27,`${G.prettyDescriptor(r,z)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),U.reportSeparator(),U.reportExceptionOnce(ue)}});if(b.hasErrors())return b.exitCode();let E=!1,F=[],N=[];for(let{suggestedDescriptors:{suggestions:U},target:z}of v){let te,le=U.filter(ae=>ae.descriptor!==null),pe=le[0].descriptor,ue=le.every(ae=>G.areDescriptorsEqual(ae.descriptor,pe));le.length===1||ue?te=pe:(E=!0,{answer:te}=await(0,H0e.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:U.map(({descriptor:ae,name:Ie,reason:Fe})=>ae?{name:Ie,hint:Fe,descriptor:ae}:{name:Ie,hint:Fe,disabled:!0}),onCancel:()=>process.exit(130),result(ae){return this.find(ae,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ye=a.manifest[z].get(te.identHash);(typeof ye>"u"||ye.descriptorHash!==te.descriptorHash)&&(a.manifest[z].set(te.identHash,te),this.optional&&(z==="dependencies"?a.manifest.ensureDependencyMeta({...te,range:"unknown"}).optional=!0:z==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...te,range:"unknown"}).optional=!0)),typeof ye>"u"?F.push([a,z,te,C]):N.push([a,z,ye,te]))}return await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyAddition,F),await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyReplacement,N),E&&this.context.stdout.write(`
`),await o.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};bh.paths=[["add"]],bh.usage=nt.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/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the curre
`),0}return(await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async u=>{let A=await un.getPackageAccessibleBinaries(a,{project:o}),h=Array.from(A.keys()).reduce((C,I)=>Math.max(C,I.length),0);for(let[C,[I,v]]of A)u.reportJson({name:C,source:G.stringifyIdent(I),path:v});if(this.verbose)for(let[C,[I]]of A)u.reportInfo(null,`${C.padEnd(h," ")} ${G.prettyLocator(r,I)}`);else for(let C of A.keys())u.reportInfo(null,C)})).exitCode()}};kh.paths=[["bin"]],kh.usage=nt.Usage({description:"get the path to a binary script",details:`
When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.
When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.
`,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]});Ye();Pt();qt();var Qh=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 Lt.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()}};Qh.paths=[["cache","clean"],["cache","clear"]],Qh.usage=nt.Usage({description:"remove the shared cache files",details:`
This command will remove all the files from the cache.
`,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]});Ye();qt();var q0e=$e(h2()),P8=Be("util"),Fh=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 it(`Couldn't find a configuration settings named "${o}"`);let u=r.getSpecial(o,{hideSecrets:!this.unsafe,getNativePaths:!0}),A=_e.convertMapsToIndexableObjects(u),p=a?(0,q0e.default)(A,a):A,h=await Lt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async C=>{C.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
`),h.exitCode();P8.inspect.styles.name="cyan",this.context.stdout.write(`${(0,P8.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})}
`)}return h.exitCode()}};Fh.paths=[["config","get"]],Fh.usage=nt.Usage({description:"read a configuration settings",details:`
This command will print a configuration setting.
Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value.
`,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",`yarn config get '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"]]});Ye();qt();var Rge=$e(k8()),Tge=$e(h2()),Lge=$e(Q8()),F8=Be("util"),Rh=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 it("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 it(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new it("This setting only affects the file it's in, and thus cannot be set from the CLI");let A=this.json?JSON.parse(this.value):this.value;await(this.home?E=>Ke.updateHomeConfiguration(E):E=>Ke.updateConfiguration(o(),E))(E=>{if(n){let F=(0,Rge.default)(E);return(0,Lge.default)(F,this.name,A),F}else return{...E,[a]:A}});let C=(await Ke.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),I=_e.convertMapsToIndexableObjects(C),v=n?(0,Tge.default)(I,n):I;return(await Lt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async E=>{F8.inspect.styles.name="cyan",E.reportInfo(0,`Successfully set ${this.name} to ${(0,F8.inspect)(v,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Rh.paths=[["config","set"]],Rh.usage=nt.Usage({description:"change a configuration settings",details:`
This command will set a configuration setting.
When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).
When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.
`,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",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --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",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]});Ye();qt();var Wge=$e(k8()),Kge=$e(Uge()),Vge=$e(T8()),Th=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 it("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 it(`Couldn't find a configuration settings named "${a}"`);let A=this.home?h=>Ke.updateHomeConfiguration(h):h=>Ke.updateConfiguration(o(),h);return(await Lt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let C=!1;await A(I=>{if(!(0,Kge.default)(I,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),C=!0,I;let v=n?(0,Wge.default)(I):{...I};return(0,Vge.default)(v,this.name),v}),C||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Th.paths=[["config","unset"]],Th.usage=nt.Usage({description:"unset a configuration setting",details:`
This command will unset a configuration setting.
`,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"]]});Ye();Pt();qt();var fk=Be("util"),Lh=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 LE({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 Lt.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,`Invalid configuration key "${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,`No configuration key named "${p}"`);let C=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),I=r.sources.get(p)??"<default>",v=I&&I[0]!=="<"?fe.fromPortablePath(I):I;A.reportJson({key:p,effective:C,source:v,...h})}else{let p={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},h={},C={children:h};for(let I of a){if(this.noDefaults&&!r.sources.has(I))continue;let v=r.settings.get(I),b=r.sources.get(I)??"<default>",E=r.getSpecial(I,{hideSecrets:!0,getNativePaths:!0}),F={Description:{label:"Description",value:de.tuple(de.Type.MARKDOWN,{text:v.description,format:this.cli.format(),paragraphs:!1})},Source:{label:"Source",value:de.tuple(b[0]==="<"?de.Type.CODE:de.Type.PATH,b)}};h[I]={value:de.tuple(de.Type.CODE,I),children:F};let N=(U,z)=>{for(let[te,le]of z)if(le instanceof Map){let pe={};U[te]={children:pe},N(pe,le)}else U[te]={label:te,value:de.tuple(de.Type.NO_HINT,(0,fk.inspect)(le,p))}};E instanceof Map?N(F,E):F.Value={label:"Value",value:de.tuple(de.Type.NO_HINT,(0,fk.inspect)(E,p))}}a.length!==1&&(n=void 0),$s.emitTree(C,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<"u"){let A=a[0],p=(0,fk.inspect)(r.getSpecial(A,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get("enableColors")});this.context.stdout.write(`
`),this.context.stdout.write(`${p}
`)}return u.exitCode()}};Lh.paths=[["config"]],Lh.usage=nt.Usage({description:"display the current configuration",details:`
This command prints the current active configuration settings.
`,examples:[["Print the active configuration settings","$0 config"]]});Ye();qt();Za();var pk={};Vt(pk,{Strategy:()=>g2,acceptedStrategies:()=>M0t,dedupe:()=>L8});Ye();Ye();var zge=$e(Zo()),g2=(e=>(e.HIGHEST="highest",e))(g2||{}),M0t=new Set(Object.values(g2)),U0t={highest:async(t,e,{resolver:r,fetcher:o,resolveOptions:a,fetchOptions:n})=>{let u=new Map;for(let[p,h]of t.storedResolutions){let C=t.storedDescriptors.get(p);if(typeof C>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);_e.getSetWithDefault(u,C.identHash).add(h)}let A=new Map(_e.mapAndFilter(t.storedDescriptors.values(),p=>G.isVirtualDescriptor(p)?_e.mapAndFilter.skip:[p.descriptorHash,_e.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=A.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let C=t.storedResolutions.get(p.descriptorHash);if(typeof C>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let I=t.originalPackages.get(C);if(typeof I>"u")throw new Error(`Assertion failed: The package (${C}) should have been registered`);Promise.resolve().then(async()=>{let v=r.getResolutionDependencies(p,a),b=Object.fromEntries(await _e.allSettledSafe(Object.entries(v).map(async([te,le])=>{let pe=A.get(le.descriptorHash);if(typeof pe>"u")throw new Error(`Assertion failed: The descriptor (${le.descriptorHash}) should have been registered`);let ue=await pe.promise;if(!ue)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[te,ue.updatedPackage]})));if(e.length&&!zge.default.isMatch(G.stringifyIdent(p),e)||!r.shouldPersistResolution(I,a))return I;let E=u.get(p.identHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(E.size===1)return I;let F=[...E].map(te=>{let le=t.originalPackages.get(te);if(typeof le>"u")throw new Error(`Assertion failed: The package (${te}) should have been registered`);return le}),N=await r.getSatisfying(p,b,F,a),U=N.locators?.[0];if(typeof U>"u"||!N.sorted)return I;let z=t.originalPackages.get(U.locatorHash);if(typeof z>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return z}).then(async v=>{let b=await t.preparePackage(v,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:I,updatedPackage:v,resolvedPackage:b})}).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}},C={project:t,resolver:A,report:u,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let I=U0t[e],v=await I(t,r,{resolver:A,resolveOptions:C,fetcher:p,fetchOptions:h}),b=Xs.progressViaCounter(v.length);await a.reportProgress(b);let E=0;await Promise.all(v.map(U=>U.then(z=>{if(z===null||z.currentPackage.locatorHash===z.updatedPackage.locatorHash)return;E++;let{descriptor:te,currentPackage:le,updatedPackage:pe}=z;a.reportInfo(0,`${G.prettyDescriptor(n,te)} can be deduped from ${G.prettyLocator(n,le)} to ${G.prettyLocator(n,pe)}`),a.reportJson({descriptor:G.stringifyDescriptor(te),currentResolution:G.stringifyLocator(le),updatedResolution:G.stringifyLocator(pe)}),t.storedResolutions.set(te.descriptorHash,pe.locatorHash)}).finally(()=>b.tick())));let F;switch(E){case 0:F="No packages";break;case 1:F="One package";break;default:F=`${E} packages`}let N=de.pretty(n,e,de.Type.CODE);return a.reportInfo(0,`${F} can be deduped using the ${N} strategy`),E})}var Nh=class extends ut{constructor(){super(...arguments);this.strategy=ge.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:Vs(g2)});this.check=ge.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when dupl
`)}};Wd.paths=[["--clipanion=definitions"]];var Kd=class extends ut{async execute(){this.context.stdout.write(this.cli.usage(null))}};Kd.paths=[["help"],["--help"],["-h"]];Ye();Pt();qt();var dC=class extends ut{constructor(){super(...arguments);this.leadingArgument=ge.String();this.args=ge.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!G.tryParseIdent(this.leadingArgument)){let r=V.resolve(this.context.cwd,fe.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};Ye();var Vd=class extends ut{async execute(){this.context.stdout.write(`${tn||"<unknown>"}
`)}};Vd.paths=[["-v"],["--version"]];Ye();Ye();qt();var Oh=class extends ut{constructor(){super(...arguments);this.commandName=ge.String();this.args=ge.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await St.find(r,this.context.cwd);return await o.restoreInstallState(),await un.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:o})}};Oh.paths=[["exec"]],Oh.usage=nt.Usage({description:"execute a shell script",details:`
This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.
It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
`,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]});Ye();qt();Za();var Mh=class extends ut{constructor(){super(...arguments);this.hash=ge.String({required:!1,validator:rd(Ey(),[sI(/^p[0-9a-f]{5}$/)])})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);return await o.restoreInstallState({restoreResolutions:!1}),await o.applyLightResolution(),typeof this.hash<"u"?await H0t(this.hash,o,{stdout:this.context.stdout}):(await Lt.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=[([,A])=>G.stringifyLocator(o.storedPackages.get(A.subject)),([,A])=>G.stringifyIdent(A.requested)];for(let[A,p]of _e.sortMap(o.peerRequirements,u)){let h=o.storedPackages.get(p.subject);if(typeof h>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let C=o.storedPackages.get(p.rootRequester);if(typeof C>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let I=h.dependencies.get(p.requested.identHash)??null,v=de.pretty(r,A,de.Type.CODE),b=G.prettyLocator(r,h),E=G.prettyIdent(r,p.requested),F=G.prettyIdent(r,C),N=p.allRequesters.length-1,U=`descendant${N===1?"":"s"}`,z=N>0?` and ${N} ${U}`:"",te=I!==null?"provides":"doesn't provide";n.reportInfo(null,`${v} \u2192 ${b} ${te} ${E} to ${F}${z}`)}})).exitCode()}};Mh.paths=[["explain","peer-requirements"]],Mh.usage=nt.Usage({description:"explain a set of peer requirements",details:`
A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants.
When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not.
When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set.
**Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`).
`,examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]});async function H0t(t,e,r){let{configuration:o}=e,a=e.peerRequirements.get(t);if(typeof a>"u")throw new Error(`No peerDependency requirements found for hash: "${t}"`);return(await Lt.start({configuration:o,stdout:r.stdout,includeFooter:!1},async u=>{let A=e.storedPackages.get(a.subject);if(typeof A>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let p=e.storedPackages.get(a.rootRequester);if(typeof p>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let h=A.dependencies.get(a.requested.identHash)??null,C=h!==null?e.storedResolutions.get(h.descriptorHash):null;if(typeof C>"u")throw new Error("Assertion failed: Expected the resolution to have been registered");let I=C!==null?e.storedPackages.get(C):null;if(typeof I>"u")throw new Error("Assertion failed: Expected the provided package to have been registered");let v=[...a.allRequesters.values()].map(U=>{let z=e.storedPackages.get(U);if(typeof z>"u")throw new Error("Assertion failed: Expected the package to be registered");let te=G.devirtualizeLocator(z),le=e.storedPackages.get(te.locatorHash);if(typeof le>"u")throw new Error("Assertion failed: Expected the package to be registered");let pe=le.peerDependencies.get(a.requested.identHash);if(typeof pe>"u")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:z,peerDependency:pe}});if(I!==null){let U=v.every(({peerDependency:z})=>Qr.satisfiesWithPrereleases(I.version,z.range));u.reportInfo(0,`${G.prettyLocator(o,A)} provides ${G.prettyLocator(o,I)} with version ${G.prettyReference(o,I.version??"<missing>")}, which ${U?"satisfies":"doesn't satisfy"} the following requirements:`)}else u.reportInfo(0,`${G.prettyLocator(o,A)} doesn't provide ${G.prettyIdent(o,a.requested)}, breaking the following requirements:`);u.reportSeparator();let b=de.mark(o),E=[];for(let{pkg:U,peerDependency:z}of _e.sortMap(v,te=>G.stringifyLocator(te.pkg))){let le=(I!==null?Qr.satisfiesWithPrereleases(I.version,z.range):!1)?b.Check:b.Cross;E.push({stringifiedLocator:G.stringifyLocator(U),prettyLocator:G.prettyLocator(o,U),prettyRange:G.prettyRange(o,z.range),mark:le})}let F=Math.max(...E.map(({stringifiedLocator:U})=>U.length)),N=Math.max(...E.map(({prettyRange:U})=>U.length));for(let{stringifiedLocator:U,prettyLocator:z,prettyRange:te,mark:le}of _e.sortMap(E,({stringifiedLocator:pe})=>pe))u.reportInfo(null,`${z.padEnd(F+(z.length-U.length)," ")} \u2192 ${te.padEnd(N," ")} ${le}`);E.length>1&&(u.reportSeparator(),u.reportInfo(0,`Note: these requirements start with ${G.prettyLocator(e.configuration,p)}`))})).exitCode()}Ye();qt();Za();Ye();Ye();Pt();qt();var Xge=$e(Jn()),Uh=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-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&r.get("yarnPath")){let A=r.sources.get("yarnPath");if(!A)throw new Error("Assertion failed: Expected 'yarnPath' to have a source");let p=r.projectCwd??r.startingCwd;if(V.contains(p,A))return 0}let o=()=>{if(typeof tn>"u")throw new it("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},a,n=(A,p)=>({version:p,url:A.replace(/\{\}/g,p)});if(this.version==="self")a={url:o(),version:tn??"self"};else if(this.version==="latest"||this.version==="berry"||this.version==="stable")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await d2(r,"stable"));else if(this.version==="canary")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await d2(r,"canary"));else if(th
${e}`)})}let A=t.projectCwd??t.startingCwd,p=V.resolve(A,".yarn/releases"),h=V.resolve(p,`yarn-${e}.cjs`),C=V.relative(t.startingCwd,h),I=_e.isTaggedYarnVersion(e),v=t.get("yarnPath"),b=!I,E=b||!!v||!!a;if(a===!1){if(b)throw new Jt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");E=!1}else!E&&!process.env.COREPACK_ROOT&&(o.reportWarning(0,`You don't seem to have ${de.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${de.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),E=!0);if(E){let te=await u();o.reportInfo(0,`Saving the new release in ${de.pretty(t,C,"magenta")}`),await oe.removePromise(V.dirname(h)),await oe.mkdirPromise(V.dirname(h),{recursive:!0}),await oe.writeFilePromise(h,te,{mode:493}),await Ke.updateConfiguration(A,{yarnPath:V.relative(A,h)})}else await oe.removePromise(V.dirname(h)),await Ke.updateConfiguration(A,{yarnPath:Ke.deleteProperty});let F=await Ot.tryFind(A)||new Ot;F.packageManager=`yarn@${I?e:await d2(t,"stable")}`;let N={};F.exportTo(N);let U=V.join(A,Ot.fileName),z=`${JSON.stringify(N,null,F.indent)}
`;return await oe.changeFilePromise(U,z,{automaticNewlines:!0}),{bundleVersion:e}}function Zge(t){return wr[AP(t)]}var q0t=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function G0t(t){let r=`https://repo.yarnpkg.com/${_e.isTaggedYarnVersion(tn)?tn:await d2(t,"canary")}/packages/gatsby/content/advanced/error-codes.md`,o=await rn.get(r,{configuration:t});return new Map(Array.from(o.toString().matchAll(q0t),({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 _h=class extends ut{constructor(){super(...arguments);this.code=ge.String({required:!1,validator:rd(Ey(),[sI(/^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=de.pretty(r,o,de.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),A=(await G0t(r)).get(this.code),p=typeof A<"u"?de.jsonOrPretty(this.json,r,de.tuple(de.Type.MARKDOWN,{text:A,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
You can help us by editing this page on GitHub \u{1F642}:
${de.jsonOrPretty(this.json,r,de.tuple(de.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/advanced/error-codes.md"))}
`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:o,details:p})}
`):this.context.stdout.write(`${n}
${p}
`)}else{let o={children:_e.mapAndFilter(Object.entries(wr),([a,n])=>Number.isNaN(Number(a))?_e.mapAndFilter.skip:{label:Wu(Number(a)),value:de.tuple(de.Type.CODE,n)})};$s.emitTree(o,{configuration:r,stdout:this.context.stdout,json:this.json})}}};_h.paths=[["explain"]],_h.usage=nt.Usage({description:"explain an error code",details:`
When the code argument is specified, this command prints its name and its details.
When used without arguments, this command lists all error codes and their names.
`,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]});Ye();Pt();qt();var $ge=$e(Zo()),Hh=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 rr(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=(le,{recursive:pe})=>{let ue=le.anchoredLocator.locatorHash,ye=new Map,ae=[ue];for(;ae.length>0;){let Ie=ae.shift();if(ye.has(Ie))continue;let Fe=o.storedPackages.get(Ie);if(typeof Fe>"u")throw new Error("Assertion failed: Expected the package to be registered");if(ye.set(Ie,Fe),G.isVirtualLocator(Fe)&&ae.push(G.devirtualizeLocator(Fe).locatorHash),!(!pe&&Ie!==ue))for(let g of Fe.dependencies.values()){let Ee=o.storedResolutions.get(g.descriptorHash);if(typeof Ee>"u")throw new Error("Assertion failed: Expected the resolution to be registered");ae.push(Ee)}}return ye.values()},p=({recursive:le})=>{let pe=new Map;for(let ue of o.workspaces)for(let ye of A(ue,{recursive:le}))pe.set(ye.locatorHash,ye);return pe.values()},h=({all:le,recursive:pe})=>le&&pe?o.storedPackages.values():le?p({recursive:pe}):A(a,{recursive:pe}),C=({all:le,recursive:pe})=>{let ue=h({all:le,recursive:pe}),ye=this.patterns.map(Fe=>{let g=G.parseLocator(Fe),Ee=$ge.default.makeRe(G.stringifyIdent(g)),De=G.isVirtualLocator(g),ce=De?G.devirtualizeLocator(g):g;return ne=>{let ee=G.stringifyIdent(ne);if(!Ee.test(ee))return!1;if(g.reference==="unknown")return!0;let we=G.isVirtualLocator(ne),be=we?G.devirtualizeLocator(ne):ne;return!(De&&we&&g.reference!==ne.reference||ce.reference!==be.reference)}}),ae=_e.sortMap([...ue],Fe=>G.stringifyLocator(Fe));return{selection:ae.filter(Fe=>ye.length===0||ye.some(g=>g(Fe))),sortedLookup:ae}},{selection:I,sortedLookup:v}=C({all:this.all,recursive:this.recursive});if(I.length===0)throw new it("No package matched your request");let b=new Map;if(this.dependents)for(let le of v)for(let pe of le.dependencies.values()){let ue=o.storedResolutions.get(pe.descriptorHash);if(typeof ue>"u")throw new Error("Assertion failed: Expected the resolution to be registered");_e.getArrayWithDefault(b,ue).push(le)}let E=new Map;for(let le of v){if(!G.isVirtualLocator(le))continue;let pe=G.devirtualizeLocator(le);_e.getArrayWithDefault(E,pe.locatorHash).push(le)}let F={},N={children:F},U=r.makeFetcher(),z={project:o,fetcher:U,cache:n,checksums:o.storedChecksums,report:new Qi,cacheOptions:{skipIntegrityCheck:!0}},te=[async(le,pe,ue)=>{if(!pe.has("manifest"))return;let ye=await U.fetch(le,z),ae;try{ae=await Ot.find(ye.prefixPath,{baseFs:ye.packageFs})}finally{ye.releaseFs?.()}ue("Manifest",{License:de.tuple(de.Type.NO_HINT,ae.license),Homepage:de.tuple(de.Type.URL,ae.raw.homepage??null)})},async(le,pe,ue)=>{if(!pe.has("cache"))return;let ye=o.storedChecksums.get(le.locatorHash)??null,ae
This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.
`,examples:[["Run a Node script","$0 node ./my-script.js"]]});Ye();qt();var Yh=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 Lt.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 rn.get(A.spec,{configuration:r}),h=wn.makeHash(p);if(A.checksum===h)continue;let C=de.pretty(r,A.path,de.Type.PATH),I=de.pretty(r,A.spec,de.Type.URL),v=`${C} is different from the file provided by ${I}`;n.reportJson({...A,newChecksum:h}),n.reportError(0,v)}})).exitCode()}};Yh.paths=[["plugin","check"]],Yh.usage=nt.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:`
Check only the plugins from https.
If this command detects any plugin differences in the CI environment, it will throw an error.
`,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]});Ye();Ye();Pt();qt();var sde=Be("os");Ye();Pt();qt();var ede=Be("os");Ye();Ll();qt();var z0t="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function zd(t,e){let r=await rn.get(z0t,{configuration:t}),o=Ki(r.toString());return Object.fromEntries(Object.entries(o).filter(([a,n])=>!e||Qr.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var Wh=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 Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await zd(r,tn);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()}};Wh.paths=[["plugin","list"]],Wh.usage=nt.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 `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]});var J0t=/^[0-9]+$/;function tde(t){return J0t.test(t)?`pull/${t}/head`:t}var X0t=({repository:t,branch:e},r)=>[["git","init",fe.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",tde(e)],["git","reset","--hard","FETCH_HEAD"]],Z0t=({branch:t})=>[["git","fetch","origin","--depth=1",tde(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],$0t=({plugins:t,noMinify:e},r,o)=>[["yarn","build:cli",...new Array().concat(...t.map(a=>["--plugin",V.resolve(o,a)])),...e?["--no-minify"]:[],"|"],["mv","packages/yarnpkg-cli/bundles/yarn.js",fe.fromPortablePath(r),"|"]],Kh=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"?V.resolve(this.context.cwd,fe.toPortablePath(this.installPath)):V.resolve(fe.toPortablePath((0,ede.tmpdir)()),"yarnpkg-sources",wn.makeHash(this.repository).slice(0,6));return(await Lt.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=V.join(a,`packages/yarnpkg-cli/bundles/yarn-${A.stdout.trim()}.js`);oe.existsSync(p)||(await m2($0t(this,p,a),{configuration:r,context:this.context,target:a}),u.reportSeparator());let h=await oe.readFilePromise(p);if(!this.dryRun){let{bundleVersion:C}=await N8(r,null,async()=>h,{report:u});this.skipPlugins||await egt(this,C,{project:o,report:u,target:a})}})).exitCode()}};Kh.paths=[["set","version","from","sources"]],Kh.usage=nt.Usage({description:"build Yarn from master",details:`
This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.
By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag.
`,examples:[["Build Yarn from master","$0 set version from sources"]]});async function m2(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(`${de.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(V.join(o,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await m2(Z0t(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 m2(X0t(t,o),{configuration:e,context:t.context,target:o}))}async function egt(t,e,{project:r,report:o,target:a}){let n=await zd(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})}Ye();Ye();Pt();qt();var rde=$e(Jn()),nde=Be("url"),ide=Be("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 Lt.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}[\\/]/)||fe.isAbsolute(this.name)){let p=V.resolve(this.context.cwd,fe.toPortablePath(this.name));a.reportInfo(0,`Reading ${de.pretty(r,p,de.Type.PATH)}`),u=V.relative(n.cwd,p),A=await oe.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new nde.URL(this.name)}catch{throw new Jt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}u=this.name,p=this.name}else{let h=G.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!rde.default.valid(h.reference))throw new Jt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let C=G.stringifyIdent(h),I=await zd(r,tn);if(!Object.hasOwn(I,C)){let v=`Couldn't find a plugin named ${G.prettyIdent(r,h)} on the remote registry.
`;throw r.plugins.has(C)?v+=`A plugin named ${G.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:v+=`Note that only the plugins referenced on our website (${de.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",de.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${de.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",de.Type.URL)}).`,new Jt(51,v)}u=C,p=I[C].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${C}/${h.reference}/`):tn!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${tn}/`))}a.reportInfo(0,`Downloading ${de.pretty(r,p,"green")}`),A=await rn.get(p,{configuration:r})}await _8(u,A,{checksum:this.checksum,project:n,report:a})})).exitCode()}};Vh.paths=[["plugin","import"]],Vh.usage=nt.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.
Three types of plugin references are accepted:
- If the plugin is stored within the Yarn repository, it can be referenced by name.
- Third-party plugins can be referenced directly through their public urls.
- Local plugins can be referenced by their path on the disk.
If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified.
Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package).
`,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,ide.runInNewContext)(e.toString(),{module:A,exports:u});let h=`.yarn/plugins/${A.exports.name}.cjs`,C=V.resolve(o.cwd,h);a.reportInfo(0,`Saving the new plugin in ${de.pretty(n,h,"magenta")}`),await oe.mkdirPromise(V.dirname(C),{recursive:!0}),await oe.writeFilePromise(C,e);let I={path:h,spec:t};r&&(I.checksum=wn.makeHash(e)),await Ke.addPlugin(o.cwd,[I])}var tgt=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],zh=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"?V.resolve(this.context.cwd,fe.toPortablePath(this.installPath)):V.resolve(fe.toPortablePath((0,sde.tmpdir)()),"yarnpkg-sources",wn.makeHash(this.repository).slice(0,6));return(await Lt.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:u}=await St.find(r,this.context.cwd),A=G.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=G.stringifyIdent(A),h=await zd(r,tn);if(!Object.hasOwn(h,p))throw new Jt(51,`Couldn't find a plugin named "${p}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let C=p;await M8(this,{configuration:r,report:n,target:o}),await U8(C,this,{project:u,report:n,target:o})})).exitCode()}};zh.paths=[["plugin","import","from","sources"]],zh.usage=nt.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.
The plugins can be referenced by their short name if sourced from the official Yarn repository.
`,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]});async function U8(t,{context:e,noMinify:r},{project:o,report:a,target:n}){let u=t.replace(/@yarnpkg\//,""),{configuration:A}=o;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${u}`),a.reportSeparator(),await m2(tgt({pluginName:u,noMinify:r},n),{configuration:A,context:e,target:n}),a.reportSeparator();let p=V.resolve(n,`packages/${u}/bundles/${t}.js`),h=await oe.readFilePromise(p);await _8(t,h,{project:o,report:a})}Ye();Pt();qt();var Jh=class extends ut{constructor(){super(...arguments);this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);return(await Lt.start({configuration:r,stdout:this.context.stdout},async n=>{let u=this.name,A=G.parseIdent(u);if(!r.plugins.has(u))throw new it(`${G.prettyIdent(r,A)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${u}.cjs`,h=V.resolve(o.cwd,p);oe.existsSync(h)&&(n.reportInfo(0,`Removing ${de.pretty(r,p,de.Type.PATH)}...`),await oe.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await Ke.updateConfiguration(o.cwd,{plugins:C=>{if(!Array.isArray(C))return C;let I=C.filter(v=>v.path!==p);return I.length===0?Ke.deleteProperty:I.length===C.length?C:I}})})).exitCode()}};Jh.paths=[["plugin","remove"]],Jh.usage=nt.Usage({category:"Plugin-related commands",description:"remove a plugin",details:`
This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.
**Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed.
`,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"]]});Ye();qt();var Xh=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 Lt.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()}};Xh.paths=[["plugin","runtime"]],Xh.usage=nt.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.
`,examples:[["List the currently active plugins","$0 plugin runtime"]]});Ye();Ye();qt();var Zh=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 rr(o.cwd,this.context.cwd);let u=new Set;for(let A of this.idents)u.add(G.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})}};Zh.paths=[["rebuild"]],Zh.usage=nt.Usage({description:"rebuild the project's native packages",details:`
This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.
Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).
By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.
`,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});Ye();Ye();Ye();qt();var H8=$e(Zo());Za();var $h=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:Vs(pl)});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 rr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.all?o.workspaces:[a],A=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,C=[];for(let E of this.patterns){let F=!1,N=G.parseIdent(E);for(let U of u){let z=[...U.manifest.peerDependenciesMeta.keys()];for(let te of(0,H8.default)(z,E))U.manifest.peerDependenciesMeta.delete(te),h=!0,F=!0;for(let te of A){let le=U.manifest.getForScope(te),pe=[...le.values()].map(ue=>G.stringifyIdent(ue));for(let ue of(0,H8.default)(pe,G.stringifyIdent(N))){let{identHash:ye}=G.parseIdent(ue),ae=le.get(ye);if(typeof ae>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[te].delete(ye),C.push([U,te,ae]),h=!0,F=!0}}}F||p.push(E)}let I=p.length>1?"Patterns":"Pattern",v=p.length>1?"don't":"doesn't",b=this.all?"any":"this";if(p.length>0)throw new it(`${I} ${de.prettyList(r,p,de.Type.CODE)} ${v} match any packages referenced by ${b} workspace`);return h?(await r.triggerMultipleHooks(E=>E.afterWorkspaceDependencyRemoval,C),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};$h.paths=[["remove"]],$h.usage=nt.Usage({description:"remove dependencies from the project",details:`
This command will remove the packages matching the specified patterns from the current workspace.
If the \`--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.
This command accepts glob patterns as arguments (if valid Idents 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.
`,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}'"]]});Ye();Ye();var ode=Be("util"),Jd=class extends ut{async execute(){let e=await Ke.find(this.context.cwd,this.context.plugins),{project:r,workspace:o}=await St.find(e,this.context.cwd);if(!o)throw new rr(r.cwd,this.context.cwd);return(await Lt.start({configuration:e,stdout:this.context.stdout},async n=>{let u=o.manifest.scripts,A=_e.sortMap(u.keys(),C=>C),p={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2},h=A.reduce((C,I)=>Math.max(C,I.length),0);for(let[C,I]of u.entries())n.reportInfo(null,`${C.padEnd(h," ")} ${(0,ode.inspect)(I,p)}`)})).exitCode()}};Jd.paths=[["run"]];Ye();Ye();qt();var e0=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 un.hasPackageScript(u,this.scriptName,{project:o}))return await un.executePackageScript(u,this.scriptName,this.args,{project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let A=await un.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 un.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 C=(await Promise.all(o.workspaces.map(async I=>I.manifest.scripts.has(this.scriptName)?I:null))).filter(I=>I!==null);if(C.length===1)return await un.executeWorkspaceScript(C[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 it(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${G.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new it(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${G.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new it("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let h=[this.scriptName].concat(this.args);for(let[C,I]of uC)for(let v
This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:
- If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed.
- Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.
- Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.
Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).
`,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"]]});Ye();Ye();qt();var t0=class extends ut{constructor(){super(...arguments);this.save=ge.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});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 rr(o.cwd,this.context.cwd);let u=G.parseDescriptor(this.descriptor,!0),A=G.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})}};t0.paths=[["set","resolution"]],t0.usage=nt.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, add the `-s,--save` flag which will also edit the `resolutions` field from 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"]]});Ye();Pt();qt();var ade=$e(Zo()),r0=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 rr(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=V.resolve(this.context.cwd,fe.toPortablePath(p));if(_e.isPathLike(p)){let C=await Ke.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:I,workspace:v}=await St.find(C,h);if(!v)throw new rr(I.cwd,h);if(this.all){for(let b of I.workspaces)b.manifest.name&&A.add(G.stringifyIdent(b.anchoredLocator));if(A.size===0)throw new it("No workspace found to be unlinked in the target project")}else{if(!v.manifest.name)throw new it("The target workspace doesn't have a name and thus cannot be unlinked");A.add(G.stringifyIdent(v.anchoredLocator))}}else{let C=[...u.manifest.resolutions.map(({pattern:I})=>I.descriptor.fullName)];for(let I of(0,ade.default)(C,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})}};r0.paths=[["unlink"]],r0.usage=nt.Usage({description:"disconnect the local project from another one",details:`
This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.
`,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}'"]]});Ye();Ye();Ye();qt();var lde=$e(u2()),j8=$e(Zo());Za();var Kf=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:Vs(pl)});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 rr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=[...o.storedDescriptors.values()],A=u.map(C=>G.stringifyIdent(C)),p=new Set;for(let C of this.patterns){if(G.parseDescriptor(C).range!=="unknown")throw new it("Ranges aren't allowed when using --recursive");for(let I of(0,j8.default)(A,C)){let v=G.parseIdent(I);p.add(v.identHash)}}let h=u.filter(C=>p.has(C.identHash));for(let C of h)o.storedDescriptors.delete(C.descriptorHash),o.storedResolutions.delete(C.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 rr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.fixed,A=this.interactive??r.get("preferInteractive"),p=f2(this,o),h=A?["keep","reuse","project","latest"]:["project","latest"],C=[],I=[];for(let N of this.patterns){let U=!1,z=G.parseDescriptor(N),te=G.stringifyIdent(z);for(let le of o.workspaces)for(let pe of["dependencies","devDependencies"]){let ye=[...le.manifest.getForScope(pe).values()].map(Ie=>G.stringifyIdent(Ie)),ae=te==="*"?ye:(0,j8.default)(ye,te);for(let Ie of ae){let Fe=G.parseIdent(Ie),g=le.manifest[pe].get(Fe.identHash);if(typeof g>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let Ee=G.makeDescriptor(Fe,z.range);C.push(Promise.resolve().then(async()=>[le,pe,g,await p2(Ee,{project:o,workspace:le,cache:n,target:pe,fixed:u,modifier:p,strategies:h})])),U=!0}}U||I.push(N)}if(I.length>1)throw new it(`Patterns ${de.prettyList(r,I,de.Type.CODE)} don't match any packages referenced by any workspace`);if(I.length>0)throw new it(`Pattern ${de.prettyList(r,I,de.Type.CODE)} doesn't match any packages referenced by any workspace`);let v=await Promise.all(C),b=await AA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async N=>{for(let[,,U,{suggestions:z,rejections:te}]of v){let le=z.filter(pe=>pe.descriptor!==null);if(le.length===0){let[pe]=te;if(typeof pe>"u")throw new Error("Assertion failed: Expected an error to have been set");let ue=this.cli.error(pe);o.configuration.get("enableNetwork")?N.reportError(27,`${G.prettyDescriptor(r,U)} can't be resolved to a satisfying range
${ue}`):N.reportError(27,`${G.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)
${ue}`)}else le.length>1&&!A&&N.reportError(27,`${G.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(b.hasErrors())return b.exitCode();let E=!1,F=[];for(let[N,U,,{suggestions:z}]of v){let te,le=z.filter(ae=>ae.descriptor!==null),pe=le[0].descriptor,ue=le.every(ae=>G.areDescriptorsEqual(ae.descriptor,pe));le.length===1||ue?te=pe:(E=!0,{answer:te}=await(0,lde.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${G.prettyWorkspace(r,N)} \u276F ${U}?`,choices:z.map(({descriptor:ae,name:Ie,reason:Fe})=>ae?{name:Ie,hint:Fe,descriptor:ae}:{name:Ie,hint:Fe,disabled:!0}),onCancel:()=>process.exit(130),result(ae){return this.find(ae,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ye=N.manifest[U].get(te.identHash);if(typeof ye>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(ye.descriptorHash!==te.descriptorHash)N.manifest[U].set(te.identHash,te),F.push([N,U,ye,te]);else{let ae=r.makeResolver(),Ie={project:o,resolver:ae},Fe=r.normalizeDependency(ye),g=ae.bindDescriptor(Fe,N.anchoredLocator,Ie);o.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,F),E&&this.context.stdout.write(`
`),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Kf.paths=[["up"]],Kf.usage=nt.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 `yarn up` 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 `yarn up` and `yarn up -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 `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` 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'"]]}),Kf.schema=[aI("recursive",Gu.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];Ye();Ye();Ye();qt();var n0=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
This command prints the exact reasons why a package appears in the dependency tree.
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 rgt(t,e,{configuration:r,peers:o}){let a=_e.sortMap(t.storedPackages.values(),A=>G.stringifyLocator(A)),n={},u={children:n};for(let A of a){let p={};for(let C of A.dependencies.values()){if(!o&&A.peerDependencies.has(C.identHash))continue;let I=t.storedResolutions.get(C.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 E=G.stringifyLocator(A);n[E]={value:[A,de.Type.LOCATOR],children:p}}let b=G.stringifyLocator(v);p[b]={value:[{descriptor:C,locator:v},de.Type.DEPENDENT]}}}return u}function ngt(t,e,{configuration:r,peers:o}){let a=_e.sortMap(t.workspaces,v=>G.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 b=!1;v.identHash===e&&(b=!0);for(let E of v.dependencies.values()){if(!o&&v.peerDependencies.has(E.identHash))continue;let F=t.storedResolutions.get(E.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)&&(b=!0)}return b&&u.add(v.locatorHash),b};for(let v of a)A(v.anchoredPackage);let p=new Set,h={},C={children:h},I=(v,b,E)=>{if(!u.has(v.locatorHash))return;let F=E!==null?de.tuple(de.Type.DEPENDENT,{locator:v,descriptor:E}):de.tuple(de.Type.LOCATOR,v),N={},U={value:F,children:N},z=G.stringifyLocator(v);if(b[z]=U,!p.has(v.locatorHash)&&(p.add(v.locatorHash),!(E!==null&&t.tryWorkspaceByLocator(v))))for(let te of v.dependencies.values()){if(!o&&v.peerDependencies.has(te.identHash))continue;let le=t.storedResolutions.get(te.descriptorHash);if(!le)throw new Error("Assertion failed: The resolution should have been registered");let pe=t.storedPackages.get(le);if(!pe)throw new Error("Assertion failed: The package should have been registered");I(pe,N,te)}};for(let v of a)I(v.anchoredPackage,h,null);return C}Ye();var Z8={};Vt(Z8,{GitFetcher:()=>E2,GitResolver:()=>C2,default:()=>vgt,gitUtils:()=>ra});Ye();Pt();var ra={};Vt(ra,{TreeishProtocols:()=>y2,clone:()=>X8,fetchBase:()=>kde,fetchChangedFiles:()=>Qde,fetchChangedWorkspaces:()=>Igt,fetchRoot:()=>bde,isGitUrl:()=>EC,lsRemote:()=>xde,normalizeLocator:()=>wgt,normalizeRepoUrl:()=>mC,resolveUrl:()=>J8,splitRepoUrl:()=>i0,validateRepoUrl:()=>z8});Ye();Pt();qt();var Dde=$e(Ide()),Pde=$e(mU()),yC=$e(Be("querystring")),K8=$e(Jn());function W8(t,e,r){let o=t.indexOf(r);return t.lastIndexOf(e,o>-1?o:1/0)}function Bde(t){try{return new URL(t)}catch{return}}function Egt(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 vde(t){return Bde(t)||Bde(Egt(t))}function mC(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=vde(t);r&&(t=r.href),t=t.replace(/^git\+([^:]+):/,"$1:")}return t}function Sde(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var Cgt=[/^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\/(.+)?$/],y2=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a)
- ${p.join(`
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:A.cwd})}};o0.paths=[["workspace"]],o0.usage=nt.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:`
This command will run a given sub-command on a single workspace.
`,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 Dgt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:Fde.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[Qh,Fh,Rh,Th,t0,Kh,Uh,s0,Wd,Kd,dC,Vd,bh,kh,Lh,Nh,Oh,Mh,_h,Hh,jh,qh,r0,Gh,Yh,zh,Vh,Jh,Wh,Xh,Zh,$h,Jd,e0,Kf,n0,o0]},Pgt=Dgt;var iH={};Vt(iH,{default:()=>xgt});Ye();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
This command will output all matches to the given prolog query.
`,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]});function Zgt(t){return typeof t!="string"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function $gt(t,e){let r=t===0,o=t===e-1;return r&&o?"":r?"\u250C ":o?"\u2514 ":"\u2502 "}Ye();qt();var f0=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(()=>(S2(),P2)),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)}};f0.paths=[["constraints","source"]],f0.usage=nt.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"]]});Ye();Ye();qt();I2();var p0=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 wC(o);else{let{Constraints:h}=await Promise.resolve().then(()=>(S2(),P2));n=await h.find(o)}let u,A=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let C=await n.process();if(!C)break;let{changedWorkspaces:I,remainingErrors:v}=gk(o,C,{fix:this.fix}),b=[];for(let[E,F]of I){let N=E.manifest.indent;E.manifest=new Ot,E.manifest.indent=N,E.manifest.load(F),b.push(E.persistManifest())}if(!(I.size>0&&h>1)){u=qde(v,{configuration:r}),A=!1,p=!0;for(let[,E]of v)for(let F of E)F.fixable?A=!0:p=!1}}if(u.children.length===0)return 0;if(A){let h=p?`Those errors can all be fixed by running ${de.pretty(r,"yarn constraints --fix",de.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${de.pretty(r,"yarn constraints --fix",de.Type.CODE)}`;await Lt.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async C=>{C.reportInfo(0,h),C.reportSeparator()})}return u.children=_e.sortMap(u.children,h=>h.value[1]),$s.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};p0.paths=[["constraints"]],p0.usage=nt.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.
If the \`--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.
For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.
`,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]});I2();var edt={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:[A0,f0,p0],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get("enableConstraintsChecks"))return;let r=await t.loadUserConfig(),o;if(r?.constraints)o=new wC(t);else{let{Constraints:u}=await Promise.resolve().then(()=>(S2(),P2));o=await u.find(t)}let a=await o.process();if(!a)return;let{remainingErrors:n}=gk(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[u,A]of n)for(let p of A)e(84,`${de.pretty(t.configuration,u.anchoredLocator,de.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${de.pretty(t.configuration,"yarn constraints",de.Type.CODE)} for more details`)}}},tdt=edt;var IH={};Vt(IH,{CreateCommand:()=>em,DlxCommand:()=>h0,default:()=>ndt});Ye();qt();var em=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=G.parseDescriptor(o),n=a.name.match(/^create(-|$)/)?a:a.scope?G.makeIdent(a.scope,`create-${a.name}`):G.makeIdent(null,`create-${a.name}`),u=G.stringifyIdent(n);return a.range!=="unknown"&&(u+=`@${a.range}`),this.cli.run(["dlx",...r,u,...this.args])}};em.paths=[["create"]];Ye();Ye();Pt();qt();var h0=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=V.join(r,`dlx-${process.pid}`);await oe.mkdirPromise(o),await oe.writeFilePromise(V.join(o,"package.json"),`{}
`),await oe.writeFilePromise(V.join(o,"yarn.lock"),"");let a=V.join(o,".yarnrc.yml"),n=await Ke.findProjectCwd(this.context.cwd),A={enableGlobalCache:!(await Ke.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Wu(68),level:de.LogLevel.Discard}]},p=n!==null?V.join(n,".yarnrc.yml"):null;p!==null&&oe.existsSync(p)?(await oe.copyFilePromise(p,a),await Ke.updateConfiguration(o,N=>{let U=_e.toMerged(N,A);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(z=>{let te=typeof z=="string"?z:z.path,le=fe.isAbsolute(te)?te:fe.resolve(fe.fromPortablePath(n),te);return typeof z=="string"?le:{path:le,spec:z.spec}})),U})):await oe.writeJsonPromise(a,A);let h=this.packages??[this.command],C=G.parseDescriptor(this.command).name,I=await this.cli.run(["add","--fixed","--",...h],{cwd:o,quiet:this.quiet});if(I!==0)return I;this.quiet||this.context.stdout.write(`
`);let v=await Ke.find(o,this.context.plugins),{project:b,workspace:E}=await St.find(v,o);if(E===null)throw new rr(b.cwd,o);await b.restoreInstallState();let F=await un.getWorkspaceAccessibleBinaries(E);return F.has(C)===!1&&F.size===1&&typeof this.packages>"u"&&(C=Array.from(F)[0][0]),await un.executeWorkspaceAccessibleBinary(E,C,this.args,{packageAccessibleBinaries:F,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};h0.paths=[["dlx"]],h0.usage=nt.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 `yarn dlx` as a replacement of `yarn add` 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",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]});var rdt={commands:[em,h0]},ndt=rdt;var DH={};Vt(DH,{ExecFetcher:()=>b2,ExecResolver:()=>k2,default:()=>odt,execUtils:()=>Ek});Ye();Ye();Pt();var fA="exec:";var Ek={};Vt(Ek,{loadGeneratorFile:()=>x2,makeLocator:()=>vH,makeSpec:()=>gme,parseSpec:()=>BH});Ye();Pt();function BH(t){let{params:e,selector:r}=G.parseRange(t),o=fe.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?G.parseLocator(e.locator):null,path:o}}function gme({parentLocator:t,path:e,generatorHash:r,protocol:o}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return G.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function vH(t,{parentLocator:e,path:r,generatorHash:o,protocol:a}){return G.makeLocator(t,gme({parentLocator:e,path:r,generatorHash:o,protocol:a}))}async function x2(t,e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(t,{protocol:e}),n=V.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:V.relative(Bt.root,n.localPath)}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=V.join(u.prefixPath,a);return await A.readFilePromise(p,"utf8")}var b2=class{supports(e,r){return!!e.reference.startsWith(fA)}getLocalPath(e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(e.reference,{protocol:fA});if(V.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:V.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:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){let o=await x2(e.reference,fA,r);return oe.mktempPromise(async a=>{let n=V.join(a,"generator.js");return await oe.writeFilePromise(n,o),oe.mktempPromise(async u=>{if(await this.generatePackage(u,e,n,r),!oe.existsSync(V.join(u,"build")))throw new Error("The script should have generated a build directory");return await Xi.makeArchiveFromDirectory(V.join(u,"build"),{prefixPath:G.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,o,a){return await oe.mktempPromise(async n=>{let u=await un.makeScriptEnv({project:a.project,binFolder:n}),A=V.join(e,"runtime.js");return await oe.mktempPromise(async p=>{let h=V.join(p,"buildfile.log"),C=V.join(e,"generator"),I=V.join(e,"build");await oe.mkdirPromise(C),await oe.mkdirPromise(I);let v={tempDir:fe.fromPortabl
// Expose 'Module' as a global variable
Object.defineProperty(global, 'Module', {
get: () => require('module'),
configurable: true,
enumerable: false,
});
// Expose non-hidden built-in modules as global variables
for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) {
Object.defineProperty(global, name, {
get: () => require(name),
configurable: true,
enumerable: false,
});
}
// Expose the 'execEnv' global variable
Object.defineProperty(global, 'execEnv', {
value: {
...${JSON.stringify(v)},
},
enumerable: true,
});
`);let b=u.NODE_OPTIONS||"",E=/\s*--require\s+\S*\.pnp\.c?js\s*/g;b=b.replace(E," ").trim(),u.NODE_OPTIONS=b;let{stdout:F,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${G.stringifyLocator(r)})
`,prefix:G.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Ur.pipevp(process.execPath,["--require",fe.fromPortablePath(A),fe.fromPortablePath(o),G.stringifyIdent(r)],{cwd:e,env:u,stdin:null,stdout:F,stderr:N});if(U!==0)throw oe.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${de.pretty(a.project.configuration,h,de.Type.PATH)})`)})})}};Ye();Ye();var idt=2,k2=class{supportsDescriptor(e,r){return!!e.range.startsWith(fA)}supportsLocator(e,r){return!!e.reference.startsWith(fA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return G.bindDescriptor(e,{locator:G.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 x2(G.makeRange({protocol:fA,source:a,selector:a,params:{locator:G.stringifyLocator(n)}}),fA,o.fetchOptions),A=wn.makeHash(`${idt}`,u).slice(0,6);return[vH(e,{parentLocator:n,path:a,generatorHash:A,protocol:fA})]}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 _e.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 sdt={fetchers:[b2],resolvers:[k2]},odt=sdt;var SH={};Vt(SH,{FileFetcher:()=>T2,FileResolver:()=>L2,TarballFileFetcher:()=>N2,TarballFileResolver:()=>O2,default:()=>cdt,fileUtils:()=>tm});Ye();Pt();var DC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,Q2=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,Ui="file:";var tm={};Vt(tm,{fetchArchiveFromLocator:()=>R2,makeArchiveFromLocator:()=>Ck,makeBufferFromLocator:()=>PH,makeLocator:()=>PC,makeSpec:()=>dme,parseSpec:()=>F2});Ye();Pt();function F2(t){let{params:e,selector:r}=G.parseRange(t),o=fe.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?G.parseLocator(e.locator):null,path:o}}function dme({parentLocator:t,path:e,hash:r,protocol:o}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return G.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function PC(t,{parentLocator:e,path:r,hash:o,protocol:a}){return G.makeLocator(t,dme({parentLocator:e,path:r,hash:o,protocol:a}))}async function R2(t,e){let{parentLocator:r,path:o}=G.parseFileStyleRange(t.reference,{protocol:Ui}),a=V.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:V.relative(Bt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let u=n.packageFs,A=V.join(n.prefixPath,o);return await _e.releaseAfterUseAsync(async()=>await u.readFilePromise(A),n.releaseFs)}async function Ck(t,{protocol:e,fetchOptions:r,inMemory:o=!1}){let{parentLocator:a,path:n}=G.parseFileStyleRange(t.reference,{protocol:e}),u=V.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:V.relative(Bt.root,u.localPath)}:u;u!==A&&u.releaseFs&&u.releaseFs();let p=A.packageFs,h=V.join(A.prefixPath,n);return await _e.releaseAfterUseAsync(async()=>await Xi.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:G.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:o}),A.releaseFs)}async function PH(t,{protocol:e,fe
`,{automaticNewlines:!0});let h=[p],C=V.join(this.context.cwd,"README.md");if(oe.existsSync(C)||(await oe.writeFilePromise(C,`# ${G.stringifyIdent(n.name)}
`),h.push(C)),!o||o.cwd===this.context.cwd){let I=V.join(this.context.cwd,dr.lockfile);oe.existsSync(I)||(await oe.writeFilePromise(I,""),h.push(I));let b=[".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 `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/zero-installs","","#!.yarn/cache",".pnp.*"].map(pe=>`${pe}
`).join(""),E=V.join(this.context.cwd,".gitignore");oe.existsSync(E)||(await oe.writeFilePromise(E,b),h.push(E));let N=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(pe=>`${pe}
`).join(""),U=V.join(this.context.cwd,".gitattributes");oe.existsSync(U)||(await oe.writeFilePromise(U,N),h.push(U));let z={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};_e.mergeIntoTarget(z,r.get("initEditorConfig"));let te=`root = true
`;for(let[pe,ue]of Object.entries(z)){te+=`
[${pe}]
`;for(let[ye,ae]of Object.entries(ue)){let Ie=ye.replace(/[A-Z]/g,Fe=>`_${Fe.toLowerCase()}`);te+=`${Ie} = ${ae}
`}}let le=V.join(this.context.cwd,".editorconfig");oe.existsSync(le)||(await oe.writeFilePromise(le,te),h.push(le)),await this.cli.run(["install"],{quiet:!0}),oe.existsSync(V.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}))}}};g0.paths=[["init"]],g0.usage=nt.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 `yarn set version` 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 hdt={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:[g0]},gdt=hdt;var Tj={};Vt(Tj,{SearchCommand:()=>C0,UpgradeInteractiveCommand:()=>I0,default:()=>nIt});Ye();var Cme=$e(Be("os"));function SC({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 Fye=$e(JH()),XH={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},fyt=(0,Fye.default)(XH.appId,XH.apiKey).initIndex(XH.indexName),ZH=async(t,e=0)=>await fyt.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var HB=["regular","dev","peer"],C0=class extends ut{async execute(){SC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(cQ(),Bj)),{ScrollableItems:r}=await Promise.resolve().then(()=>(pQ(),fQ)),{useKeypress:o}=await Promise.resolve().then(()=>(MB(),Kwe)),{useMinistore:a}=await Promise.resolve().then(()=>(bj(),xj)),{renderForm:n}=await Promise.resolve().then(()=>(mQ(),dQ)),{default:u}=await Promise.resolve().then(()=>$e(nIe())),{Box:A,Text:p}=await Promise.resolve().then(()=>$e(ic())),{default:h,useEffect:C,useState:I}=await Promise.resolve().then(()=>$e(sn())),v=await Ke.find(this.context.cwd,this.context.plugins),b=()=>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
This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.
`,examples:[["Open the search window","yarn search"]]});Ye();qt();E_();var uIe=$e(Jn()),cIe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,AIe=(t,e)=>t.length>0?[t.slice(0,e)].concat(AIe(t.slice(e),e)):[],I0=class extends ut{async execute(){SC(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(lIe(),aIe)),{Pad:r}=await Promise.resolve().then(()=>(Rj(),oIe)),{ScrollableItems:o}=await Promise.resolve().then(()=>(pQ(),fQ)),{useMinistore:a}=await Promise.resolve().then(()=>(bj(),xj)),{renderForm:n}=await Promise.resolve().then(()=>(mQ(),dQ)),{Box:u,Text:A}=await Promise.resolve().then(()=>$e(ic())),{default:p,useEffect:h,useRef:C,useState:I}=await Promise.resolve().then(()=>$e(sn())),v=await Ke.find(this.context.cwd,this.context.plugins),{project:b,workspace:E}=await St.find(v,this.context.cwd),F=await Nr.find(v);if(!E)throw new rr(b.cwd,this.context.cwd);await b.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(Ee,De)=>{let ce=Ape(Ee,De),ne="";for(let ee of ce)ee.added?ne+=de.pretty(v,ee.value,"green"):ee.removed||(ne+=ee.value);return ne},z=(Ee,De)=>{if(Ee===De)return De;let ce=G.parseRange(Ee),ne=G.parseRange(De),ee=ce.selector.match(cIe),we=ne.selector.match(cIe);if(!ee||!we)return U(Ee,De);let be=["gray","red","yellow","green","magenta"],ht=null,H="";for(let lt=1;lt<be.length;++lt)ht!==null||ee[lt]!==we[lt]?(ht===null&&(ht=be[lt-1]),H+=de.pretty(v,we[lt],ht)):H+=we[lt];return H},te=async(Ee,De,ce)=>{let ne=await Jc.fetchDescriptorFrom(Ee,ce,{project:b,cache:F,preserveModifier:De,workspace:E});return ne!==null?ne.range:Ee.range},le=async Ee=>{let De=uIe.default.valid(Ee.range)?`^${Ee.range}`:Ee.range,[ce,ne]=await Promise.all([te(Ee,Ee.range,De).catch(()=>null),te(Ee,Ee.range,"latest").catch(()=>null)]),ee=[{value:null,label:Ee.range}];return ce&&ce!==Ee.range?ee.push({value:ce,label:z(Ee.range,ce)}):ee.push({value:null,label:""}),ne&&ne!==ce&&ne!==Ee.range?ee.push({value:ne,label:z(Ee.range,ne)}):ee.push({value:null,label:""}),ee},pe=()=>p.createElement(u,{flexDirection:"row"},p.createElement(u,{flexDirection:"column",width:49},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<up>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<down>")," to select packages.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<left>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<right>")," to select versions."))),p.createElement(u,{flexDirection:"column"},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<enter>")," to install.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),ue=()=>p.createElement(u,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(u,{width:50},p.createElement(A,{bold:!0},p.createElement(A,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Latest"))),ye=({active:Ee,descriptor:De,suggestions:ce})=>{let[ne,ee]=a(De.descriptorHash,null),we=G.stringifyIdent(De),be=Math.max(0,45-we.length);return p.createElement(p.Fragment,null,p.createElement(u,null,p.createElement(u,{width:45},p.createElement(A,{bold:!0},G.prettyIdent(v,De)),p.createElement(r,{active:Ee,length:be})),p.createElement(e,{active:Ee,options:ce,value:ne,skewer:!0,onChange:ee,sizes:[17,17,17]})))},ae=({dependencies:Ee})=>{let[De,ce]=I(Ee.map(()=>null)),ne=C(!0),ee=async we=>{let be=await le(we);return be.filter(ht=>ht.label!=="").length<=1?null:{descriptor:we,suggestions:be}};return h(()=>()=>{ne.current=!1},[]),h(()=>{let we=Math.trunc(N*1.75),be=Ee.slice(0,we),ht=Ee.slice(we),H=AIe(ht,N),lt=be.map(e
This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade.
`,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var rIt={commands:[C0,I0]},nIt=rIt;var Lj={};Vt(Lj,{LinkFetcher:()=>qB,LinkResolver:()=>GB,PortalFetcher:()=>YB,PortalResolver:()=>WB,default:()=>sIt});Ye();Pt();var $f="portal:",ep="link:";var qB=class{supports(e,r){return!!e.reference.startsWith(ep)}getLocalPath(e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(e.reference,{protocol:ep});if(V.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:V.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(e.reference,{protocol:ep}),n=V.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:V.relative(Bt.root,n.localPath),localPath:Bt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=V.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new gn(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,discardFromLookup:!0,localPath:p}:{packageFs:new _u(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,discardFromLookup:!0}}};Ye();Pt();var GB=class{supportsDescriptor(e,r){return!!e.range.startsWith(ep)}supportsLocator(e,r){return!!e.reference.startsWith(ep)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(ep.length);return[G.makeLocator(e,`${ep}${fe.toPortablePath(a)}`)]}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){return{...e,version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};Ye();Pt();var YB=class{supports(e,r){return!!e.reference.startsWith($f)}getLocalPath(e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(e.reference,{protocol:$f});if(V.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:V.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=G.parseFileStyleRange(e.reference,{protocol:$f}),n=V.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:V.relative(Bt.root,n.localPath),localPath:Bt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=V.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new gn(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,localPath:p}:{packageFs:new _u(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot}}};Ye();Ye();Pt();var WB=class{supportsDescriptor(e,r){return!!e.range.startsWith($f)}supportsLocator(e,r){return!!e.reference.startsWith($f)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice($f.length);return[G.makeLocator(e,`${$f}${fe.toPortablePath(a)}`)]}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 _e.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:"SOFT",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var iIt={fetchers:[qB,YB],resolvers:[G
${C}, next tree:
${KB(A)}`);let v=dIe(A);if(v)throw new Error(`${v}, after hoisting finished:
${KB(A)}`)}return n.debugLevel>=2&&console.log(KB(A)),pIt(A)},oIt=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},aIt=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 C;for(let I of t)C=I.dependencies.get(h.name),C&&r.set(C.name,C)}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:C,isHoistBorder:I,hoistPriority:v,dependencyKind:b,hoistedFrom:E,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(C),decoupled:!0,isHoistBorder:I,hoistPriority:v,dependencyKind:b,hoistedFrom:new Map(E),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},lIt=(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},Nj=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},Mj=(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=hIt(u),p=lIt(u,A),h=t==u?new Map:a.fastLookupPossible?oIt(e):aIt(e),C,I=!1,v=!1,b=new Map(Array.from(p.entries()).map(([F,N])=>[F,N[0]])),E=new Map;do{let F=AIt(t,e,r,h,b,p,o,E,a);F.isGraphChanged&&(v=!0),F.anotherRoundNeeded&&(I=!0),C=!1;for(let[N,U]of p)U.length>1&&!u.dependencies.has(N)&&(b.delete(N),U.shift(),b.set(N,U[0]),C=!0)}while(C);for(let F of u.dependencies.values())if(!u.peerNames.has(F.name)&&!r.has(F.locator)){r.add(F.locator);let N=Mj(t,[...e,F],r,E,a);N.isGraphChanged&&(v=!0),N.anotherRoundNeeded&&(I=!0),r.delete(F.locator)}return{anotherRoundNeeded:I,isGraphChanged:v}},cIt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},uIt=(t,e,r,o,a,n,u,A,{outputReason:p,fastLookupPossible:h})=>{let C,I=null,v=new Set;p&&(C=`${Array.from(e).map(N=>no(N)).join("\u2192")}`);let b=r[r.length-1],F=!(o.ident===b.ident);if(p&&!F&&(I="- self-reference"),F&&(F=o.dependencyKind!==1,p&&!F&&(I="- workspace")),F&&o.dependencyKind===2&&(F=!cIt(o),p&&!F&&(I="- external soft link with unhoisted dependencies")),F&&(F=b.dependencyKind!==1||b.hoistedFrom.has(o.name)||e.size===1,p&&!F&&(I=b.reasons.get(o.name))),F&&(F=!t.peerNames.has(o.name),p&&!F&&(I=`- cannot shadow peer: ${no(t.originalDependencies.get(o.name).locator)} at ${C}`)),F){let N=!1,U=a.get(o.name);if(N=!U||U.ident===o.ident,p&&!N&&(I=`- filled by: ${no(U.locator)} at ${C}`),N)for(let z=r.length-1;z>=1;z--){let le=r[z].dependencies.get(o.name);if(le&&le.ident!==o.ident){N=!1;let pe=A.get(b);pe||(pe=new Set,A.set(b,pe)),pe.add(o.name),p&&(I=`- filled by ${no(le.locator)} at ${r.slice(0,z).map(ue=>no(ue.locator)).join("\u2192")}`);break}}F=N}if(F&&(F=n.get(o.name)===o.ident,p&&!F&&(I=`- filled by: ${no(u.get(o.name)[0])} at ${C}`)),F){let N=!0,U=new Set(o.peerNames);for(let z=r.length-1;z>=1;z--){let te=r[z];for(let le of U){if(
${KB(t)}`)}let De=Nj(le);for(let ce of De)if(Fe.has(ce)){let ne=Ie.get(ce);if((a.get(ce.name)===ce.ident||!le.reasons.has(ce.name))&&ne.isHoistable!==0&&le.reasons.set(ce.name,ne.reason),!ce.isHoistBorder&&ye.indexOf(yQ(ce))<0){C.add(le);let we=pIe(le,ce);b([...U,le],ue,ye,we,F),C.delete(le)}}},E,F=new Set(Nj(h)),N=Array.from(e).map(U=>yQ(U));do{E=F,F=new Set;for(let U of E){if(U.locator===h.locator||U.isHoistBorder)continue;let z=pIe(h,U);b([],Array.from(r),N,z,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 C=p.get(h.name),I=()=>`${Array.from(o).concat([n]).map(v=>no(v.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let v=u.get(h.name);(v!==C||!v||v.ident!==h.ident)&&e.push(`${I()} - broken peer promise: expected ${h.ident} but found ${v&&v.ident}`)}else{let v=A.hoistedFrom.get(n.name),b=n.hoistedTo.get(h.name),E=`${v?` hoisted from ${v.join(", ")}`:""}`,F=`${b?` hoisted to ${b}`:""}`,N=`${I()}${E}`;C?C.ident!==h.ident&&e.push(`${N} - broken require promise for ${h.name}${F}: expected ${h.ident}, but found: ${C.ident}`):e.push(`${N} - broken require promise: no required dependency ${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(`
`)},fIt=(t,e)=>{let{identName:r,name:o,reference:a,peerNames:n}=t,u={name:o,references:new Set([a]),locator:Oj(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,C)=>{let I=A.get(h),v=!!I;if(!I){let{name:b,identName:E,reference:F,peerNames:N,hoistPriority:U,dependencyKind:z}=h,te=e.hoistingLimits.get(C.locator);I={name:b,references:new Set([F]),locator:Oj(E,F),ident:fIe(E,F),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(b):!1,hoistPriority:U||0,dependencyKind:z||0,hoistedFrom:new Map,hoistedTo:new Map},A.set(h,I)}if(C.dependencies.set(h.name,I),C.originalDependencies.set(h.name,I),v){let b=new Set,E=F=>{if(!b.has(F)){b.add(F),F.decoupled=!1;for(let N of F.dependencies.values())F.peerNames.has(N.name)||E(N)}};E(I)}else for(let b of h.dependencies)p(b,I)};for(let h of t.dependencies)p(h,u);return u},Uj=t=>t.substring(0,t.indexOf("@",1)),pIt=t=>{let e={name:t.name,identName:Uj(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:C,locator:I}=a;p={name:h,identName:Uj(I),references:C,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},hIt=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 C of A.dependencies.values()){let I=a(C);I.hoistPriority=Math.max(I.hoistPriority,C.hoistPriority),A.peerNames.has(C.name)?I.peerDependents.add(A.ident):n(A,C)}}};for(let u of t.dependencies.values())t.peerNames.has(u.name)||n(t,u);return e},no=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,KB=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,C)=>h.name===C.name?0:h.name>C.name?1:-1),p="";n.add(a);for(let h=0;h<A.length;h++){let C=A[h];if(!a.peerNames.has(C.name)&&C!==a){let I=a.reasons.get(C.name),v=Uj(C.locator);p+=`${u}${h<A.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(C)?">":"")+(v!==C.name?`a:${C.name}:`:"")+no(C.locator)+(I?` ${I}`:"")}
`,p+=r(C,n,`${u}${h<A.length-1?"\u2502 ":" "}`)}}return n.delete(a),p};return r(t,new Set)+(e>hIe?`
Tree is too large, part of the tree has been dunped
`:"")};var VB=(o=>(o.WORKSPACES="workspaces",o.DEPENDENCIES="dependencies",o.NONE="none",o))(VB||{}),mIe="node_modules",pm="$wsroot$";var zB=(t,e)=>{let{packageTree:r,hoistingLimits:o,errors:a,preserveSymlinksRequired:n}=dIt(t,e),u=null;if(a.length===0){let A=gIe(r,{hoistingLimits:o});u=yIt(t,A,e)}return{tree:u,errors:a,preserveSymlinksRequired:n}},gA=t=>`${t.name}@${t.reference}`,Hj=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(V.delimiter).length,u=a.split(V.delimiter).length;return a===o?0:n!==u?u-n:a>o?1:-1});return e},yIe=(t,e)=>{let r=G.isVirtualLocator(t)?G.devirtualizeLocator(t):t,o=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e;return G.areLocatorsEqual(r,o)},_j=(t,e,r,o)=>{if(t.linkType!=="SOFT")return!1;let a=fe.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return V.contains(o,a)===null},gIt=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=fe.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},u=t.getDependencyTreeRoots(),A=new Map,p=new Set,h=(v,b)=>{let E=gA(v);if(p.has(E))return;p.add(E);let F=t.getPackageInformation(v);if(F){let N=b?gA(b):"";if(gA(v)!==N&&F.linkType==="SOFT"&&!_j(F,v,t,o)){let U=EIe(F,v,t);(!A.get(U)||v.reference.startsWith("workspace:"))&&A.set(U,v)}for(let[U,z]of F.packageDependencies)z!==null&&(F.packagePeers.has(U)||h(t.getLocator(U,z),v))}};for(let v of u)h(v,null);let C=o.split(V.sep);for(let v of A.values()){let b=t.getPackageInformation(v),F=fe.toPortablePath(b.packageLocation.slice(0,-1)).split(V.sep).slice(C.length),N=n;for(let U of F){let z=N.children.get(U);z||(z={children:new Map},N.children.set(U,z)),N=z}N.workspaceLocator=v}let I=(v,b)=>{if(v.workspaceLocator){let E=gA(b),F=a.get(E);F||(F=new Set,a.set(E,F)),F.add(v.workspaceLocator)}for(let E of v.children.values())I(E,v.workspaceLocator||b)};for(let v of n.children.values())I(v,n.workspaceLocator);return a},dIt=(t,e)=>{let r=[],o=!1,a=new Map,n=gIt(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=fe.toPortablePath(u.packageLocation.slice(0,-1)),h={name:A.name,identName:A.name,reference:A.reference,peerNames:u.packagePeers,dependencies:new Set,dependencyKind:1},C=new Map,I=(b,E)=>`${gA(E)}:${b}`,v=(b,E,F,N,U,z,te,le)=>{let pe=I(b,F),ue=C.get(pe),ye=!!ue;!ye&&F.name===A.name&&F.reference===A.reference&&(ue=h,C.set(pe,h));let ae=_j(E,F,t,p);if(!ue){let ce=0;ae?ce=2:E.linkType==="SOFT"&&F.name.endsWith(pm)&&(ce=1),ue={name:b,identName:F.name,reference:F.reference,dependencies:new Set,peerNames:ce===1?new Set:E.packagePeers,dependencyKind:ce},C.set(pe,ue)}let Ie;if(ae?Ie=2:U.linkType==="SOFT"?Ie=1:Ie=0,ue.hoistPriority=Math.max(ue.hoistPriority||0,Ie),le&&!ae){let ce=gA({name:N.identName,reference:N.reference}),ne=a.get(ce)||new Set;a.set(ce,ne),ne.add(ue.name)}let Fe=new Map(E.packageDependencies);if(e.project){let ce=e.project.workspacesByCwd.get(fe.toPortablePath(E.packageLocation.slice(0,-1)));if(ce){let ne=new Set([...Array.from(ce.manifest.peerDependencies.values(),ee=>G.stringifyIdent(ee)),...Array.from(ce.manifest.peerDependenciesMeta.keys())]);for(let ee of ne)Fe.has(ee)||(Fe.set(ee,z.get(ee)||null),ue.peerNames.add(ee))}}let g=gA({name:F.name.replace(pm,""),reference:F.reference}),Ee=n.get(g);if(Ee)for(let ce of Ee)Fe.set(`${ce.name}${pm}`,ce.reference);(E!==U||E.linkType!=="SOFT"||
`;for(let n=0,u=t.length;n<u;++n)a+=o+EQ(String(n),t[n],e,o).replace(/^ +/,""),n+1<u&&(a+=","),a+=`
`;return a+=r,a+="]",a}function wIt(t,e,r){let o=Object.keys(t),a="";a+="{";for(let n=0,u=o.length,A=0;n<u;++n){let p=o[n],h=t[p];typeof h>"u"||(A!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=EQ(p,h,e,r).replace(/^ +/g,""),A+=1)}return a+="}",a}function IIt(t,e,r){let o=Object.keys(t),a=`${r} `,n="";n+=r,n+=`{
`;let u=0;for(let A=0,p=o.length;A<p;++A){let h=o[A],C=t[h];typeof C>"u"||(u!==0&&(n+=",",n+=`
`),n+=a,n+=JSON.stringify(h),n+=": ",n+=EQ(h,C,e,a).replace(/^ +/g,""),u+=1)}return u!==0&&(n+=`
`),n+=r,n+="}",n}function EQ(t,e,r,o){let{next:a}=CIe[r],n=a[t]||a["*"];return wIe(e,n,o)}function wIe(t,e,r){let{collapsed:o}=CIe[e];return Array.isArray(t)?o?EIt(t,e,r):CIt(t,e,r):typeof t=="object"&&t!==null?o?wIt(t,e,r):IIt(t,e,r):JSON.stringify(t)}function IIe(t){return wIe(t,"TOP_LEVEL","")}function JB(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let o=[];for(let n of e)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]<A[u]?-1:A[n]>A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function BIt(t){let e=new Map,r=JB(t.fallbackExclusionList||[],[({name:o,reference:a})=>o,({name:o,reference:a})=>a]);for(let{name:o,reference:a}of r){let n=e.get(o);typeof n>"u"&&e.set(o,n=new Set),n.add(a)}return Array.from(e).map(([o,a])=>[o,Array.from(a)])}function vIt(t){return JB(t.fallbackPool||[],([e])=>e)}function DIt(t){let e=[];for(let[r,o]of JB(t.packageRegistry,([a])=>a===null?"0":`1${a}`)){let a=[];e.push([r,a]);for(let[n,{packageLocation:u,packageDependencies:A,packagePeers:p,linkType:h,discardFromLookup:C}]of JB(o,([I])=>I===null?"0":`1${I}`)){let I=[];r!==null&&n!==null&&!A.has(r)&&I.push([r,n]);for(let[E,F]of JB(A.entries(),([N])=>N))I.push([E,F]);let v=p&&p.size>0?Array.from(p):void 0,b=C||void 0;a.push([n,{packageLocation:u,packageDependencies:I,packagePeers:v,linkType:h,discardFromLookup:b}])}}return e}function XB(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,fallbackExclusionList:BIt(t),fallbackPool:vIt(t),packageRegistryData:DIt(t)}}var DIe=$e(vIe());function PIe(t,e){return[t?`${t}
`:"",`/* eslint-disable */
`,`"use strict";
`,`
`,e,`
`,(0,DIe.default)()].join("")}function PIt(t){return JSON.stringify(t,null,2)}function SIt(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
`)}'`}function xIt(t){return[`const RAW_RUNTIME_STATE =
`,`${SIt(IIe(t))};
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
`,`}
`].join("")}function bIt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
`,` const fs = require('fs');
`,` const path = require('path');
`,` const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(dr.pnpData)});
`,` return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname});
`,`}
`].join("")}function SIe(t){let e=XB(t),r=xIt(e);return PIe(t.shebang,r)}function xIe(t){let e=XB(t),r=bIt(),o=PIe(t.shebang,r);return{dataFile:PIt(e),loaderFile:o}}Pt();function qj(t,{basePath:e}){let r=fe.toPortablePath(e),o=V.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,u=new Map(t.packageRegistryData.map(([I,v])=>[I,new Map(v.map(([b,E])=>{if(I===null!=(b===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let F=E.discardFromLookup??!1,N={name:I,reference:b},U=n.get(E.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&F,F||(U.locator=N)):n.set(E.packageLocation,{locator:N,discardFromLookup:F});let z=null;return[b,{packageDependencies:new Map(E.packageDependencies),packagePeers:new Set(E.packagePeers),linkType:E.linkType,discardFromLookup:F,get packageLocation(){return z||(z=V.join(o,E.packageLocation))}}]}))])),A=new Map(t.fallbackExclusionList.map(([I,v])=>[I,new Set(v)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,C=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:C,fallbackExclusionList:A,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:u}}Pt();Pt();var tp=Be("module"),gm=Be("url"),eq=Be("util");var Mo=Be("url");var FIe=$e(Be("assert"));var Gj=Array.isArray,ZB=JSON.stringify,$B=Object.getOwnPropertyNames,hm=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Yj=(t,e)=>RegExp.prototype.exec.call(t,e),Wj=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),B0=(t,...e)=>String.prototype.endsWith.apply(t,e),Kj=(t,...e)=>String.prototype.includes.apply(t,e),Vj=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),ev=(t,...e)=>String.prototype.indexOf.apply(t,e),bIe=(t,...e)=>String.prototype.replace.apply(t,e),v0=(t,...e)=>String.prototype.slice.apply(t,e),dA=(t,...e)=>String.prototype.startsWith.apply(t,e),kIe=Map,QIe=JSON.parse;function tv(t,e,r){return class extends r{constructor(...o){super(e(...o)),this.code=t,this.name=`${r.name} [${t}]`}}}var RIe=tv("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,r)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${r}`,TypeError),zj=tv("ERR_INVALID_MODULE_SPECIFIER",(t,e,r=void 0)=>`Invalid module "${t}" ${e}${r?` imported from ${r}`:""}`,TypeError),TIe=tv("ERR_INVALID_PACKAGE_TARGET",(t,e,r,o=!1,a=void 0)=>{let n=typeof r=="string"&&!o&&r.length&&!dA(r,"./");return e==="."?((0,FIe.default)(o===!1),`Invalid "exports" main target ${ZB(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${o?"imports":"exports"}" target ${ZB(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),rv=tv("ERR_INVALID_PACKAGE_CONFIG",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${r?`. ${r}`:""}`,Error),LIe=tv("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,r=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${r?` imported from ${r}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${r?` imported from ${r}`:""}`,Error);var wQ=Be("url");function NIe(t,e){let r=Object.create(null);for(let o=0;o<e.length;o++){let a=e[o];hm(t,a)&&(r[a]=t[a])}return r}var CQ=new kIe;function kIt(t,e,r,o){let a=CQ.get(t);if(a!==void 0)return a;let n=o(t);if(n===void 0){let b={pjsonPath:t,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return CQ.set(t,b),b}let u;try{u=QIe(n)}catch(b){throw new rv(t,(r?`"${e}" from `:"")+(0,wQ.fileURLToPath)(r||e),b.message)}let{imports:A,main:p,name:h,type:C}=NIe(u,["imports","main","name","type"]),I=hm(u,"exports")?u.exports:void 0;(typeof A!="object"||A===null)&&(A=void 0),typeof p!="string"&&(p=void 0),typeof h!="string"&&(h=void 0),C!=="module"&&C!=="commonjs"&&(C="none");let v={pjsonPath:t,exists:!0,main:p,name:h,type:C,exports:I,imports:A};return CQ.set(t,v),v}function OIe(t,e){let r=new URL("./package.json",t);for(;;){let n=r.pathname;i
`),r;u=t[++n]}else if(u===" "&&!o){a=!0;continue}else if(u==='"'){o=!o;continue}a?(r.push(u),a=!1):r[r.length-1]+=u}return o&&e.push(`invalid value for NODE_OPTIONS (unterminated string)
`),r}Pt();var[sv,$j]=process.versions.node.split(".").map(t=>parseInt(t,10)),zIe=sv>19||sv===19&&$j>=2||sv===18&&$j>=13,CJt=sv>19||sv===19&&$j>=3;function JIe(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>fe.fromPortablePath(mi.resolveVirtual(fe.toPortablePath(e)))),zIe)process.send({"watch:require":t});else for(let e of t)process.send({"watch:require":e})}function tq(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=[],C=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Te of["react-scripts","gatsby"]){let ke=t.packageRegistry.get(Te);if(ke)for(let xe of ke.keys()){if(xe===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Te,reference:xe})}}let{ignorePattern:I,packageRegistry:v,packageLocatorsByLocations:b}=t;function E(Te,ke){return{fn:Te,args:ke,error:null,result:null}}function F(Te){let ke=process.stderr?.hasColors?.()??process.stdout.isTTY,xe=(ze,je)=>`\x1B[${ze}m${je}\x1B[0m`,He=Te.error;console.error(He?xe("31;1",`\u2716 ${Te.error?.message.replace(/\n.*/s,"")}`):xe("33;1","\u203C Resolution")),Te.args.length>0&&console.error();for(let ze of Te.args)console.error(` ${xe("37;1","In \u2190")} ${(0,eq.inspect)(ze,{colors:ke,compact:!0})}`);Te.result&&(console.error(),console.error(` ${xe("37;1","Out \u2192")} ${(0,eq.inspect)(Te.result,{colors:ke,compact:!0})}`));let Re=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(Re.length>0){console.error();for(let ze of Re)console.error(` ${xe("38;5;244",ze)}`)}console.error()}function N(Te,ke){if(e.allowDebug===!1)return ke;if(Number.isFinite(o)){if(o>=2)return(...xe)=>{let He=E(Te,xe);try{return He.result=ke(...xe)}catch(Re){throw He.error=Re}finally{F(He)}};if(o>=1)return(...xe)=>{try{return ke(...xe)}catch(He){let Re=E(Te,xe);throw Re.error=He,F(Re),He}}}return ke}function U(Te){let ke=g(Te);if(!ke)throw $i("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return ke}function z(Te){if(Te.name===null)return!0;for(let ke of t.dependencyTreeRoots)if(ke.name===Te.name&&ke.reference===Te.reference)return!0;return!1}let te=new Set(["node","require",...VIe("--conditions")]);function le(Te,ke=te,xe){let He=ce(V.join(Te,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(He===null)throw $i("INTERNAL",`The locator that owns the "${Te}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:Re}=U(He),ze=V.join(Re,dr.manifest);if(!e.fakeFs.existsSync(ze))return null;let je=JSON.parse(e.fakeFs.readFileSync(ze,"utf8"));if(je.exports==null)return null;let x=V.contains(Re,Te);if(x===null)throw $i("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");x!=="."&&!A.test(x)&&(x=`./${x}`);try{let w=jIe({packageJSONUrl:(0,gm.pathToFileURL)(fe.fromPortablePath(ze)),packageSubpath:x,exports:je.exports,base:xe?(0,gm.pathToFileURL)(fe.fromPortablePath(xe)):null,conditions:ke});return fe.toPortablePath((0,gm.fileURLToPath)(w))}catch(w){throw $i("EXPORTS_RESOLUTION_FAILED",w.message,{unqualifiedPath:au(Te),locator:He,pkgJson:je,subpath:au(x),conditions:ke},w.code)}}function pe(Te,ke,{extensions:xe}){let He;try{ke.push(Te),He=e.fakeFs.statSync(Te)}catch{}if(He&&!He.isDirectory())return e.fakeFs.realpathSync(Te);if(He&&He.isDirectory()){let Re;try{Re=JSON.parse(e.fakeFs.readFileSync(V.join(Te,dr.manifest),"utf8"))}catch{}let ze;if(Re&&Re.main&&(ze=V.resolve(Te,Re.main)),ze&&ze!==Te){let je=pe(ze,ke,{extensions:xe});if(je!==null)return je}}for(let Re=0,ze=xe.length;Re<ze;Re++){let je=`${Te}${xe[Re]}`;if(ke.push(je),e.fakeFs.existsSync(je))return je}if(He&&He.isDirectory())for(let Re=0,ze=xe.length;Re<ze;Re++){let je=V.format({dir:Te,name:"index",ext:xe[Re]});if(ke.push(je),e.fakeFs.existsSync(je)
Require request: "${He}"
Required by: ${Re}
`,{request:He,issuer:Re});return fe.toPortablePath(x)}let ze,je=Te.match(a);if(je){if(!ke)throw $i("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:He,issuer:Re});let[,x,w]=je,S=ce(ke);if(!S){let Le=ye(Te,ke);if(Le===!1)throw $i("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).
Require path: "${He}"
Required by: ${Re}
`,{request:He,issuer:Re});return fe.toPortablePath(Le)}let R=U(S).packageDependencies.get(x),J=null;if(R==null&&S.name!==null){let Le=t.fallbackExclusionList.get(S.name);if(!Le||!Le.has(S.reference)){for(let dt=0,jt=h.length;dt<jt;++dt){let xt=U(h[dt]).packageDependencies.get(x);if(xt!=null){r?J=xt:R=xt;break}}if(t.enableTopLevelFallback&&R==null&&J===null){let dt=t.fallbackPool.get(x);dt!=null&&(J=dt)}}}let X=null;if(R===null)if(z(S))X=$i("MISSING_PEER_DEPENDENCY",`Your application tried to access ${x} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
Required package: ${x}${x!==He?` (via "${He}")`:""}
Required by: ${Re}
`,{request:He,issuer:Re,dependencyName:x});else{let Le=De(x,S);Le.every(ot=>z(ot))?X=$i("MISSING_PEER_DEPENDENCY",`${S.name} tried to access ${x} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
Required package: ${x}${x!==He?` (via "${He}")`:""}
Required by: ${S.name}@${S.reference} (via ${Re})
${Le.map(ot=>`Ancestor breaking the chain: ${ot.name}@${ot.reference}
`).join("")}
`,{request:He,issuer:Re,issuerLocator:Object.assign({},S),dependencyName:x,brokenAncestors:Le}):X=$i("MISSING_PEER_DEPENDENCY",`${S.name} tried to access ${x} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
Required package: ${x}${x!==He?` (via "${He}")`:""}
Required by: ${S.name}@${S.reference} (via ${Re})
${Le.map(ot=>`Ancestor breaking the chain: ${ot.name}@${ot.reference}
`).join("")}
`,{request:He,issuer:Re,issuerLocator:Object.assign({},S),dependencyName:x,brokenAncestors:Le})}else R===void 0&&(!xe&&(0,tp.isBuiltin)(Te)?z(S)?X=$i("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
Required package: ${x}${x!==He?` (via "${He}")`:""}
Required by: ${Re}
`,{request:He,issuer:Re,dependencyName:x}):X=$i("UNDECLARED_DEPENDENCY",`${S.name} tried to access ${x}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${x} isn't otherwise declared in ${S.name}'s dependencies, this makes the require call ambiguous and unsound.
Required package: ${x}${x!==He?` (via "${He}")`:""}
Required by: ${Re}
`,{request:He,issuer:Re,issuerLocator:Object.assign({},S),dependencyName:x}):z(S)?X=$i("UNDECLARED_DEPENDENCY",`Your application tried to access ${x}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
Required package: ${x}${x!==He?` (via "${He}")`:""}
Required by: ${Re}
`,{request:He,issuer:Re,dependencyName:x}):X=$i("UNDECLARED_DEPENDENCY",`${S.name} tried to access ${x}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: ${x}${x!==He?` (via "${He}")`:""}
Required by: ${S.name}@${S.reference} (via ${Re})
`,{request:He,issuer:Re,issuerLocator:Object.assign({},S),dependencyName:x}));if(R==null){if(J===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");R=J;let Le=X.message.replace(/\n.*/g,"");X.message=Le,!C.has(Le)&&o!==0&&(C.add(Le),process.emitWarning(X))}let Z=Array.isArray(R)?{name:R[0],reference:R[1]}:{name:x,reference:R},ie=U(Z);if(!ie.packageLocation)throw $i("MISSING_DEPENDENCY",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.
Required package: ${Z.name}@${Z.reference}${Z.name!==He?` (via "${He}")`:""}
Required by: ${S.name}@${S.reference} (via ${Re})
`,{request:He,issuer:Re,dependencyLocator:Object.assign({},Z)});let Pe=ie.packageLocation;w?ze=V.join(Pe,w):ze=Pe}else if(V.isAbsolute(Te))ze=V.normalize(Te);else{if(!ke)throw $i("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:He,issuer:Re});let x=V.resolve(ke);ke.match(u)?ze=V.normalize(V.join(x,Te)):ze=V.normalize(V.join(V.dirname(x),Te))}return V.normalize(ze)}function we(Te,ke,xe=te,He){if(n.test(Te))return ke;let Re=le(ke,xe,He);return Re?V.normalize(Re):ke}function be(Te,{extensions:ke=Object.keys(tp.Module._extensions)}={}){let xe=[],He=pe(Te,xe,{extensions:ke});if(He)return V.normalize(He);{JIe(xe.map(je=>fe.fromPortablePath(je)));let Re=au(Te),ze=ce(Te);if(ze){let{packageLocation:je}=U(ze),x=!0;try{e.fakeFs.accessSync(je)}catch(w){if(w?.code==="ENOENT")x=!1;else{let S=(w?.message??w??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw $i("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${S}).
Missing package: ${ze.name}@${ze.reference}
Expected package location: ${au(je)}
`,{unqualifiedPath:Re,extensions:ke})}}if(!x){let w=je.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 $i("QUALIFIED_PATH_RESOLUTION_FAILED",`${w}
Missing package: ${ze.name}@${ze.reference}
Expected package location: ${au(je)}
`,{unqualifiedPath:Re,extensions:ke})}}throw $i("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
Source path: ${Re}
${xe.map(je=>`Not found: ${au(je)}
`).join("")}`,{unqualifiedPath:Re,extensions:ke})}}function ht(Te,ke,xe){if(!ke)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let He=qIe({name:Te,base:(0,gm.pathToFileURL)(fe.fromPortablePath(ke)),conditions:xe.conditions??te,readFileSyncFn:ne});if(He instanceof URL)return be(fe.toPortablePath((0,gm.fileURLToPath)(He)),{extensions:xe.extensions});if(He.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return H(He,ke,xe)}function H(Te,ke,xe={}){try{if(Te.startsWith("#"))return ht(Te,ke,xe);let{considerBuiltins:He,extensions:Re,conditions:ze}=xe,je=ee(Te,ke,{considerBuiltins:He});if(Te==="pnpapi")return je;if(je===null)return null;let x=()=>ke!==null?ae(ke):!1,w=(!He||!(0,tp.isBuiltin)(Te))&&!x()?we(Te,je,ze,ke):je;return be(w,{extensions:Re})}catch(He){throw Object.hasOwn(He,"pnpCode")&&Object.assign(He.data,{request:au(Te),issuer:ke&&au(ke)}),He}}function lt(Te){let ke=V.normalize(Te),xe=mi.resolveVirtual(ke);return xe!==ke?xe:null}return{VERSIONS:Ie,topLevel:Fe,getLocator:(Te,ke)=>Array.isArray(ke)?{name:ke[0],reference:ke[1]}:{name:Te,reference:ke},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Te=[];for(let[ke,xe]of v)for(let He of xe.keys())ke!==null&&He!==null&&Te.push({name:ke,reference:He});return Te},getPackageInformation:Te=>{let ke=g(Te);if(ke===null)return null;let xe=fe.fromPortablePath(ke.packageLocation);return{...ke,packageLocation:xe}},findPackageLocator:Te=>ce(fe.toPortablePath(Te)),resolveToUnqualified:N("resolveToUnqualified",(Te,ke,xe)=>{let He=ke!==null?fe.toPortablePath(ke):null,Re=ee(fe.toPortablePath(Te),He,xe);return Re===null?null:fe.fromPortablePath(Re)}),resolveUnqualified:N("resolveUnqualified",(Te,ke)=>fe.fromPortablePath(be(fe.toPortablePath(Te),ke))),resolveRequest:N("resolveRequest",(Te,ke,xe)=>{let He=ke!==null?fe.toPortablePath(ke):null,Re=H(fe.toPortablePath(Te),He,xe);return Re===null?null:fe.fromPortablePath(Re)}),resolveVirtual:N("resolveVirtual",Te=>{let ke=lt(fe.toPortablePath(Te));return ke!==null?fe.fromPortablePath(ke):null})}}Pt();var XIe=(t,e,r)=>{let o=XB(t),a=qj(o,{basePath:e}),n=fe.join(e,dr.pnpCjs);return tq(a,{fakeFs:r,pnpapiResolution:n})};var nq=$e($Ie());qt();var mA={};Vt(mA,{checkManifestCompatibility:()=>e1e,extractBuildRequest:()=>IQ,getExtractHint:()=>iq,hasBindingGyp:()=>sq});Ye();Pt();function e1e(t){return G.isPackageCompatible(t,zi.getArchitectureSet())}function IQ(t,e,r,{configuration:o}){let a=[];for(let n of["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,`${G.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,`${G.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,`${G.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,`${G.prettyLocator(o,t)} The ${zi.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var jIt=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function iq(t){return t.packageFs.getExtractHint({relevantExtensions:jIt})}function sq(t){let e=V.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var av={};Vt(av,{getUnpluggedPath:()=>ov});Ye();Pt();function ov(t,{configuration:e}){return V.resolve(e.get("pnpUnpluggedFolder"),G.slugifyLocator(t))}var qIt=new Set([G.makeIdent(null,"open").identHash,G.makeIdent(null,"opn").identHash]),D0=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return
`,n+=`# cause your node_modules installation to become invalidated.
`,n+=`
`,n+=`__metadata:
`,n+=` version: ${p1e}
`,n+=` nmMode: ${o.value}
`;let u=Array.from(e.keys()).sort(),A=G.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let C of u){let I=e.get(C);n+=`
`,n+=`${JSON.stringify(C)}:
`,n+=` locations:
`;for(let v of I.locations){let b=V.contains(t.cwd,v);if(b===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` - ${JSON.stringify(b)}
`}if(I.aliases.length>0){n+=` aliases:
`;for(let v of I.aliases)n+=` - ${JSON.stringify(v)}
`}if(C===A&&r.size>0){n+=` bin:
`;for(let[v,b]of r){let E=V.contains(t.cwd,v);if(E===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` ${JSON.stringify(E)}:
`;for(let[F,N]of b){let U=V.relative(V.join(v,Pi),N);n+=` ${JSON.stringify(F)}: ${JSON.stringify(U)}
`}}}}let p=t.cwd,h=V.join(p,Pi,h1e);a&&await oe.removePromise(h),await oe.changeFilePromise(h,n,{automaticNewlines:!0})}async function pq(t,{unrollAliases:e=!1}={}){let r=t.cwd,o=V.join(r,Pi,h1e),a;try{a=await oe.statPromise(o)}catch{}if(!a)return null;let n=Ki(await oe.readFilePromise(o,"utf8"));if(n.__metadata.version>p1e)return null;let u=n.__metadata.nmMode||"classic",A=new Map,p=new Map;delete n.__metadata;for(let[h,C]of Object.entries(n)){let I=C.locations.map(b=>V.join(r,b)),v=C.bin;if(v)for(let[b,E]of Object.entries(v)){let F=V.join(r,fe.toPortablePath(b)),N=_e.getMapWithDefault(p,F);for(let[U,z]of Object.entries(E))N.set(U,fe.toPortablePath([F,Pi,z].join(V.sep)))}if(A.set(h,{target:Bt.dot,linkType:"HARD",locations:I,aliases:C.aliases||[]}),e&&C.aliases)for(let b of C.aliases){let{scope:E,name:F}=G.parseLocator(h),N=G.makeLocator(G.makeIdent(E,F),b),U=G.stringifyLocator(N);A.set(U,{target:Bt.dot,linkType:"HARD",locations:I,aliases:[]})}}return{locatorMap:A,binSymlinks:p,locationTree:g1e(A,{skipPrefix:t.cwd}),nmMode:u,mtimeMs:a.mtimeMs}}var YC=async(t,e)=>{if(t.split(V.sep).indexOf(Pi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{if(!e.innerLoop){let o=e.allowSymlink?await oe.statPromise(t):await oe.lstatPromise(t);if(e.allowSymlink&&!o.isDirectory()||!e.allowSymlink&&o.isSymbolicLink()){await oe.unlinkPromise(t);return}}let r=await oe.readdirPromise(t,{withFileTypes:!0});for(let o of r){let a=V.join(t,o.name);o.isDirectory()?(o.name!==Pi||e&&e.innerLoop)&&await YC(a,{innerLoop:!0,contentsOnly:!1}):await oe.unlinkPromise(a)}e.contentsOnly||await oe.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},c1e=4,vQ=(t,{skipPrefix:e})=>{let r=V.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let o=r.split(V.sep).filter(p=>p!==""),a=o.indexOf(Pi),n=o.slice(0,a).join(V.sep),u=V.join(e,n),A=o.slice(a);return{locationRoot:u,segments:A}},g1e=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let o=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of t.entries()){if(n.linkType==="SOFT"&&V.contains(e,n.target)!==null){let A=_e.getFactoryWithDefault(r,n.target,o);A.locator=a,A.linkType=n.linkType}for(let u of n.locations){let{locationRoot:A,segments:p}=vQ(u,{skipPrefix:e}),h=_e.getFactoryWithDefault(r,A,o);for(let C=0;C<p.length;++C){let I=p[C];if(I!=="."){let v=_e.getFactoryWithDefault(h.children,I,o);h.children.set(I,v),h=v}C===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},dq=async(t,e,r)=>{if(process.platform==="win32"&&r==="junctions"){let o;try{o=await oe.lstatPromise(t)}catch{}if(!o||o.isDirectory()){await oe.symlinkPromise(t,e,"junction");return}}await oe.symlinkPromise(V.relative(V.dirname(e),t),e)};async function d1e(t,e,r){let o=V.join(t,`${hq.default.randomBytes(16).toString("hex")}.tmp`);try{await oe.writeFilePromise(o,r);try{await oe.linkPromise(o,e)}catch{}}finally{await oe.unlinkPromise(o)}}async function h1t({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:o,baseFs:a,nmMode:n}){if(r.kind===m1e.FILE){if(n.value==="hardlinks-global"&&o&&r.digest){let A=V.join(o,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await oe.statPromise(A);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-A1t))if(await wn.checksumFile(A,{baseFs:oe,algorithm:"sha1"})!==r.digest){let I=V.join(o,`${hq.default.randomBytes(16).toString("hex")}.tmp`);await oe.renamePromise(A,I);let v=await a.readFilePromise(t);await oe.writeFilePromise(I,v);try{await oe.linkPromise(I,A),r.mtimeMs=new Date().getTime(),await oe.unlinkPromise(I)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await oe.linkPromise(A,e),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(t);await d1e(o,A,h),r.mtimeMs=new Date().getTime();try{await oe.linkPromise(A,e)}catch(C){C&&C.code&&C.code=="EXDEV"&&(n.value="hardlinks-local",await a.copyFilePromise(t,e))}}}else await a.copyFilePromise(t,e);let u=r.mode&511;u!==420&&await oe.chmodPromise(e,u)}}var m1e
`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:o}=await(0,Iq.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`
`),o}function SQ(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 KC(t){return{["npm-otp"]:t}}var fv=class{supports(e,r){if(!e.reference.startsWith(Wn))return!1;let{selector:o,params:a}=G.parseRange(e.reference);return!(!P1e.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,`${G.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:G.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let{params:o}=G.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 Xi.convertToZip(a,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}};Ye();var pv=class{supportsDescriptor(e,r){return!(!e.range.startsWith(Wn)||!G.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(G.parseDescriptor(e.range.slice(Wn.length),!0));return r.resolver.getResolutionDependencies(o,r)}async getCandidates(e,r,o){let a=o.project.configuration.normalizeDependency(G.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(G.parseDescriptor(e.range.slice(Wn.length),!0));return a.resolver.getSatisfying(n,r,o,a)}resolve(e,r){throw new Error("Unreachable")}};Ye();Ye();var S1e=$e(Jn()),x1e=Be("url");var dl=class{supports(e,r){if(!e.reference.startsWith(Wn))return!1;let o=new x1e.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,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o;try{o=await ym(dl.getLocatorUrl(e),{customErrorMessage:mm,configuration:r.project.configuration,ident:e})}catch{o=await ym(dl.getLocatorUrl(e).replace(/%2f/g,"/"),{customErrorMessage:mm,configuration:r.project.configuration,ident:e})}return await Xi.convertToZip(o,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:o}){let a=WC(e.scope,{configuration:o}),n=dl.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=Qr.clean(e.reference.slice(Wn.length));if(r===null)throw new Jt(10,"The npm semver resolver got selected, but the version isn't semver");return`${DQ(e)}/-/${e.name}-${r}.tgz`}};Ye();Ye();Ye();var Dq=$e(Jn());var xQ=G.makeIdent(null,"node-gyp"),R1t=/\b(node-gyp|prebuild-install)\b/,hv=class{supportsDescriptor(e,r){return e.range.startsWith(Wn)?!!Qr.validRange(e.range.slice(Wn.length)):!1}supportsLocator(e,r){if(!e.reference.star
`;try{a=await oe.readFilePromise(e,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var mG={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}},wBe={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"}},Fvt={configuration:{...mG,...wBe,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...mG,...wBe}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:oc,valueDefinition:{description:"",type:"SHAPE",properties:{...mG}}}},fetchers:[fv,dl],resolvers:[pv,hv,gv]},Rvt=Fvt;var SG={};Vt(SG,{NpmAuditCommand:()=>U0,NpmInfoCommand:()=>_0,NpmLoginCommand:()=>H0,NpmLogoutCommand:()=>j0,NpmPublishCommand:()=>q0,NpmTagAddCommand:()=>Y0,NpmTagListCommand:()=>G0,NpmTagRemoveCommand:()=>W0,NpmWhoamiCommand:()=>K0,default:()=>Uvt,npmAuditTypes:()=>Rv,npmAuditUtils:()=>ZQ});Ye();Ye();qt();var BG=$e(Zo());Za();var Rv={};Vt(Rv,{Environment:()=>Qv,Severity:()=>Fv});var Qv=(o=>(o.All="all",o.Production="production",o.Development="development",o))(Qv||{}),Fv=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(Fv||{});var ZQ={};Vt(ZQ,{allSeverities:()=>ow,getPackages:()=>IG,getReportTree:()=>CG,getSeverityInclusions:()=>EG,getTopLevelDependencies:()=>wG});Ye();var IBe=$e(Jn());var ow=["info","low","moderate","high","critical"];function EG(t){if(typeof t>"u")return new Set(ow);let e=ow.indexOf(t),r=ow.slice(e);return new Set(r)}function CG(t){let e={},r={children:e};for(let[o,a]of _e.sortMap(Object.entries(t),n=>n[0]))for(let n of _e.sortMap(a,u=>`${u.id}`))e[`${o}/${n.id}`]={value:de.tuple(de.Type.IDENT,G.parseIdent(o)),children:{ID:typeof n.id<"u"&&{label:"ID",value:de.tuple(de.Type.ID,n.id)},Issue:{label:"Issue",value:de.tuple(de.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:de.tuple(de.Type.URL,n.url)},Severity:{label:"Severity",value:de.tuple(de.Type.NO_HINT,n.severity)},["Vulnerable Versions"]:{label:"Vulnerable Versions",value:de.tuple(de.Type.RANGE,n.vulnerable_versions)},["Tree Versions"]:{label:"Tree Versions",children:[...n.versions].sort(IBe.default.compare).map(u=>({value:de.tuple(de.Type.REFERENCE,u)}))},Dependents:{label:"Dependents",children:_e.sortMap(n.dependents,u=>G.stringifyLocator(u)).map(u=>({value:de.tuple(de.Type.LOCATOR,u)}))}}};return r}function wG(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 IG(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 C=t.storedPackages.get(h);if(typeof C>"u")throw new Error("Assertion failed: The package should have been registered");if(G.ensureDevirtualizedLocator(C).reference.startsWith("npm:")&&C.version!==null){let v=G.stringifyIdent(C),b=_e.getMapWithDefault(o,v);_e.getArrayWithDefault(b,C.version).push(A)}if(r)for(let v of C.dependencies.values())n.push([C,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 U0=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",
This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).
For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.
Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${ow.map(r=>`\`${r}\``).join(", ")}.
If the \`--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.
If certain packages produce false positives for a particular environment, 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.
If particular advisories are needed to be ignored, 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.
To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--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"]]});Ye();Ye();Pt();qt();var vG=$e(Jn()),DG=Be("util"),_0=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 Lt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let C;if(h==="."){let le=o.topLevelWorkspace;if(!le.manifest.name)throw new it(`Missing ${de.pretty(r,"name",de.Type.CODE)} field in ${fe.fromPortablePath(V.join(le.cwd,dr.manifest))}`);C=G.makeDescriptor(le.manifest.name,"unknown")}else C=G.parseDescriptor(h);let I=on.getIdentUrl(C),v=PG(await on.get(I,{configuration:r,ident:C,jsonResponse:!0,customErrorMessage:on.customPackageError})),b=Object.keys(v.versions).sort(vG.default.compareLoose),F=v["dist-tags"].latest||b[b.length-1],N=Qr.validRange(C.range);if(N){let le=vG.default.maxSatisfying(b,N);le!==null?F=le:(p.reportWarning(0,`Unmet range ${G.prettyRange(r,C.range)}; falling back to the latest version`),u=!0)}else Object.hasOwn(v["dist-tags"],C.range)?F=v["dist-tags"][C.range]:C.range!=="unknown"&&(p.reportWarning(0,`Unknown tag ${G.prettyRange(r,C.range)}; falling back to the latest version`),u=!0);let U=v.versions[F],z={...v,...U,version:F,versions:b},te;if(a!==null){te={};for(let le of a){let pe=z[le];if(typeof pe<"u")te[le]=pe;else{p.reportWarning(1,`The ${de.pretty(r,le,de.Type.CODE)} field doesn't exist inside ${G.prettyIdent(r,C)}'s information`),u=!0;continue}}}else this.json||(delete z.dist,delete z.readme,delete z.users),te=z;p.reportJson(te),this.json||n.push(te)}});DG.inspect.styles.name="cyan";for(let p of n)(p!==n[0]||u)&&this.context.stdout.write(`
`),this.context.stdout.write(`${(0,DG.inspect)(p,{depth:1/0,colors:!0,compact:!1})}
`);return A.exitCode()}};_0.paths=[["npm","info"]],_0.usage=nt.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 PG(t){if(Array.isArray(t)){let e=[];for(let r of t)r=PG(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=PG(t[r]);o&&(e[r]=o)}return e}else return t||null}Ye();Ye();qt();var BBe=$e(u2()),H0=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 $Q({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Lt.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=await Lvt({configuration:r,registry:o,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),A=`/-/user/org.couchdb.user:${encodeURIComponent(u.name)}`,p=await on.put(A,u,{attemptedAs:u.name,configuration:r,registry:o,jsonResponse:!0,authType:on.AuthType.NO_AUTH});return await Tvt(o,p.token,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};H0.paths=[["npm","login"]],H0.usage=nt.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"],
This command will list all tags of a package from the npm registry.
If the package is not specified, Yarn will default to the current workspace.
`,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});async function Tv(t,e){let r=`/-/package${on.getIdentUrl(t)}/dist-tags`;return on.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:on.customPackageError})}var Y0=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=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 rr(o.cwd,this.context.cwd);let n=G.parseDescriptor(this.package,!0),u=n.range;if(!DBe.default.valid(u))throw new it(`The range ${de.pretty(r,n.range,de.Type.RANGE)} must be a valid semver version`);let A=Zn.getPublishRegistry(a.manifest,{configuration:r}),p=de.pretty(r,n,de.Type.IDENT),h=de.pretty(r,u,de.Type.RANGE),C=de.pretty(r,this.tag,de.Type.CODE);return(await Lt.start({configuration:r,stdout:this.context.stdout},async v=>{let b=await Tv(n,r);Object.hasOwn(b,this.tag)&&b[this.tag]===u&&v.reportWarning(0,`Tag ${C} is already set to version ${h}`);let E=`/-/package${on.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await on.put(E,u,{configuration:r,registry:A,ident:n,jsonRequest:!0,jsonResponse:!0}),v.reportInfo(0,`Tag ${C} added to version ${h} of package ${p}`)})).exitCode()}};Y0.paths=[["npm","tag","add"]],Y0.usage=nt.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:`
This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.
`,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"]]});Ye();qt();var W0=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}async execute(){if(this.tag==="latest")throw new it("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 rr(o.cwd,this.context.cwd);let n=G.parseIdent(this.package),u=Zn.getPublishRegistry(a.manifest,{configuration:r}),A=de.pretty(r,this.tag,de.Type.CODE),p=de.pretty(r,n,de.Type.IDENT),h=await Tv(n,r);if(!Object.hasOwn(h,this.tag))throw new it(`${A} is not a tag of package ${p}`);return(await Lt.start({configuration:r,stdout:this.context.stdout},async I=>{let v=`/-/package${on.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await on.del(v,{configuration:r,registry:u,ident:n,jsonResponse:!0}),I.reportInfo(0,`Tag ${A} removed from package ${p}`)})).exitCode()}};W0.paths=[["npm","tag","remove"]],W0.usage=nt.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:`
This command will remove a tag from a package from the npm registry.
`,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});Ye();Ye();qt();var K0=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=Zn.getScopeRegistry(this.scope,{configuration:r,type:Zn.RegistryType.PUBLISH_REGISTRY}):this.scope?o=Zn.getScopeRegistry(this.scope,{configuration:r}):this.publish?o=Zn.getPublishRegistry((await AC(r,this.context.cwd)).manifest,{configuration:r}):o=Zn.getDefaultRegistry({configuration:r}),(await Lt.start({configuration:r,stdout:this.context.stdout},async n=>{let u;try{u=await on.get("/-/whoami",{configuration:r,registry:o,authType:on.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?G.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()}};K0.paths=[["npm","whoami"]],K0.usage=nt.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 Mvt={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:[U0,_0,H0,j0,q0,Y0,G0,W0,K0]},Uvt=Mvt;var TG={};Vt(TG,{PatchCommand:()=>J0,PatchCommitCommand:()=>z0,PatchFetcher:()=>Uv,PatchResolver:()=>_v,default:()=>nDt,patchUtils:()=>Dm});Ye();Ye();Pt();nA();var Dm={};Vt(Dm,{applyPatchFile:()=>tF,diffFolders:()=>FG,ensureUnpatchedDescriptor:()=>xG,ensureUnpatchedLocator:()=>nF,extractPackageToDisk:()=>QG,extractPatchFlags:()=>FBe,isParentRequired:()=>kG,isPatchDescriptor:()=>rF,isPatchLocator:()=>V0,loadPatchFiles:()=>Mv,makeDescriptor:()=>iF,makeLocator:()=>bG,makePatchHash:()=>RG,parseDescriptor:()=>Nv,parseLocator:()=>Ov,parsePatchFile:()=>Lv,unpatchDescriptor:()=>eDt,unpatchLocator:()=>tDt});Ye();Pt();Ye();Pt();var _vt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function lw(t){return V.relative(Bt.root,V.resolve(Bt.root,fe.toPortablePath(t)))}function Hvt(t){let e=t.trim().match(_vt);if(!e)throw new Error(`Bad header line: '${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,qvt=493;var PBe=()=>({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}),Gvt=t=>({header:Hvt(t),parts:[]}),Yvt={["@"]:"header",["-"]:"deletion",["+"]:"insertion",[" "]:"context",["\\"]:"pragma",undefined:"context"};function Wvt(t){let e=[],r=PBe(),o="parsing header
`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
`):"";await e.mkdirpPromise(V.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 uw(e,a.path,async()=>{await Xvt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let u=(await e.statPromise(a.path)).mode;if(SBe(a.newMode)!==SBe(u))continue;await uw(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:_e.assertNever(a);break}}function SBe(t){return(t&64)>0}function xBe(t){return t.replace(/\s+$/,"")}function Jvt(t,e){return xBe(t)===xBe(e)}async function Xvt({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),b=Math.max(0,v-h),E=Math.max(0,u.length-v-I.header.original.length),F=Math.max(b,E),N=0,U=0,z=null;for(;N<=F;){if(N<=b&&(U=v-N,z=bBe(I,u,U),z!==null)){N=-N;break}if(N<=E&&(U=v+N,z=bBe(I,u,U),z!==null))break;N+=1}if(z===null)throw new cw(t.indexOf(I),I);A.push(z),p+=N,h=U+I.header.original.length}if(o)return;let C=0;for(let I of A)for(let v of I)switch(v.type){case"splice":{let b=v.index+C;u.splice(b,v.numToDelete,...v.linesToInsert),C+=v.linesToInsert.length-v.numToDelete}break;case"pop":u.pop();break;case"push":u.push(v.line);break;default:_e.assertNever(v);break}await r.writeFilePromise(e,u.join(`
`),{mode:a})}function bBe(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||!Jvt(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:_e.assertNever(a.type);break}return o}var $vt=/^builtin<([^>]+)>$/;function Aw(t,e){let{protocol:r,source:o,selector:a,params:n}=G.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(C=>fe.toPortablePath(C)):[],A=n&&typeof n.locator=="string"?G.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 rF(t){return t.range.startsWith("patch:")}function V0(t){return t.reference.startsWith("patch:")}function Nv(t){let{sourceItem:e,...r}=Aw(t.range,G.parseDescriptor);return{...r,sourceDescriptor:e}}function Ov(t){let{sourceItem:e,...r}=Aw(t.reference,G.parseLocator);return{...r,sourceLocator:e}}function eDt(t){let{sourceItem:e}=Aw(t.range,G.parseDescriptor);return e}function tDt(t){let{sourceItem:e}=Aw(t.reference,G.parseLocator);return e}function xG(t){if(!rF(t))return t;let{sourceItem:e}=Aw(t.range,G.parseDescriptor);return e}function nF(t){if(!V0(t))return t;let{sourceItem:e}=Aw(t.reference,G.parseLocator);return e}function kBe({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:o,patchHash:a},n){let u=t!==null?{locator:G.stringifyLocator(t)}:{},A=typeof o<"u"?{version:o}:{},p=typeof a<"u"?{hash:a}:{};return G.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...A,...p,...u}})}function iF(t,{parentLocator:e,sourceDescriptor:r,patchPaths:o}){return G.makeDescriptor(t,kBe({parentLocator:e,sourceItem:r,patchPaths:o},G.stringifyDescriptor))}function bG(t,{parentLocator:e,sourcePackage:r,patchPaths:o,patchHash:a}){return G.makeLocator(t,kBe({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:o,patchHash:a},G.stringifyLocator))}function QBe({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:o},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let u=a.match($vt);return u!==null?o(u[1]):a.startsWith("~/")?r(a.slice(2)):V.isAbsolute(a)?t(a):e(a)}function FBe(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function kG(t){return QBe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function Mv(t,e,r){let o=t!==null?await r.fetcher.fetch(t,r):null,a=o&&o.localPath?{packageFs:new gn(Bt.root),prefixPath:V.relative(Bt.root,o.localPath)}:o;o&&o!==a&&o.releaseFs&&o.releaseFs();let n=await _e.releaseAfterUseAsync(async()=>await Promise.all(e.map(async u=>{let A=FBe(u),p=await QBe({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(V.join(a.prefixPath,h),"utf8")},onProject:async h=>await oe.readFilePromise(V.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(C=>C.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 QG(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=nF(t),n=r.storedChecksums,u=new Qi,A=await oe.mktempPromise(),p=V.join(A,"source"),h=V.join(A,"user"),C=V.join(A,".yarn-patch.json"),I=r.configuration.makeFetcher(),v=[];try{let b,E;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?.()),b=F,E=F}else b=await I.fetch(t,{cache:e,project:r,fetcher:I,checksums:n,report:u}),v.push(()=>b.releaseFs?.()),E=await I.fetch(t,{cache:e,project:r,fetcher:I,checksums:n,report:u}),v.push(()=>E.releaseFs?.());await Promise.all([oe.copyPromise(p,b.prefixPath,{baseFs:b.packageFs}),oe.copyPromise(h,E.prefixPath,{baseFs:E.packageFs}),oe.writeJsonPromise(C,{locator:G.stringifyLocator(t),version:o.version})])}finally{for(let b of v)b()}return oe.detachTemp(A),h}async function FG(t,e){let r=fe.fromPortablePath(t).replace(/\\/g,"/"),o=fe.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:fe.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.
The following error was reported by 'git':
${n}`);let u=r.startsWith("/")?A=>A.slice(1):A=>A;return a.replace(new RegExp(`(a|b)(${_e.escapeRegExp(`/${u(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${_e.escapeRegExp(`/${u(o)}/`)}`,"g"),"$1/").replace(new RegExp(_e.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(_e.escapeRegExp(`${o}/`),"g"),"")}function RG(t,e){let r=[];for(let{source:o}of t){if(o===null)continue;let a=Lv(o);for(let n of a){let{semverExclusivity:u,...A}=n;u!==null&&e!==null&&!Qr.satisfiesWithPrereleases(e,u)||r.push(JSON.stringify(A))}}return wn.makeHash(`${3}`,...r).slice(0,6)}Ye();function RBe(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,` ${de.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${de.pretty(e,a,de.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${de.pretty(e,a,de.Type.ADDED)}`);break;default:_e.assertNever(o.type)}}var Uv=class{supports(e,r){return!!V0(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,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async patchPackage(e,r){let{parentLocator:o,sourceLocator:a,sourceVersion:n,patchPaths:u}=Ov(e),A=await Mv(o,u,r),p=await oe.mktempPromise(),h=V.join(p,"current.zip"),C=await r.fetcher.fetch(a,r),I=G.getIdentVendorPath(e),v=new Ji(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await _e.releaseAfterUseAsync(async()=>{await v.copyPromise(I,C.prefixPath,{baseFs:C.packageFs,stableSort:!0})},C.releaseFs),v.saveAndClose();for(let{source:b,optional:E}of A){if(b===null)continue;let F=new Ji(h,{level:r.project.configuration.get("compressionLevel")}),N=new gn(V.resolve(Bt.root,I),{baseFs:F});try{await tF(Lv(b),{baseFs:N,version:n})}catch(U){if(!(U instanceof cw))throw U;let z=r.project.configuration.get("enableInlineHunks"),te=!z&&!E?" (set enableInlineHunks for details)":"",le=`${G.prettyLocator(r.project.configuration,e)}: ${U.message}${te}`,pe=ue=>{!z||RBe(U.hunk,{configuration:r.project.configuration,report:ue})};if(F.discardAndClose(),E){r.report.reportWarningOnce(66,le,{reportExtra:pe});continue}else throw new Jt(66,le,pe)}F.saveAndClose()}return new Ji(h,{level:r.project.configuration.get("compressionLevel")})}};Ye();var _v=class{supportsDescriptor(e,r){return!!rF(e)}supportsLocator(e,r){return!!V0(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){let{patchPaths:a}=Nv(e);return a.every(n=>!kG(n))?e:G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:o}=Nv(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}=Nv(e),u=await Mv(a,n,o.fetchOptions),A=r.sourceDescriptor;if(typeof A>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=RG(u,A.version);return[bG(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}=Ov(e);return{...await r.resolver.resolve(o,r),...e}}};Ye();Pt();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 rr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=V.resolve(this.context.cwd,fe.toPortablePat
${A.map(p=>`
- ${G.prettyLocator(r,p)}`).join("")}`);u=A[0]}if(!o.storedPackages.has(u.locatorHash))throw new it("No package found in the project for the given locator");await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=nF(u),h=await QG(u,{cache:n,project:o});A.reportJson({locator:G.stringifyLocator(p),path:fe.fromPortablePath(h)});let C=this.update?" along with its current modifications":"";A.reportInfo(0,`Package ${G.prettyLocator(r,p)} got extracted with success${C}!`),A.reportInfo(0,`You can now edit the following folder: ${de.pretty(r,fe.fromPortablePath(h),"magenta")}`),A.reportInfo(0,`Once you are done run ${de.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${fe.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};J0.paths=[["patch"]],J0.usage=nt.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 "});var rDt={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,J0],fetchers:[Uv],resolvers:[_v]},nDt=rDt;var OG={};Vt(OG,{PnpmLinker:()=>Hv,default:()=>lDt});Ye();Pt();qt();var Hv=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new it(`The project in ${de.pretty(r.project.configuration,`${r.project.cwd}/package.json`,de.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>"u")throw new it(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new it(`The project in ${de.pretty(r.project.configuration,`${r.project.cwd}/package.json`,de.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let u=e,A=e;do{A=u,u=V.dirname(A);let p=a.locatorByPath.get(A);if(p)return p}while(u!==A);return null}makeInstaller(e){return new LG(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},LG=class{constructor(e){this.opts=e;this.asyncActions=new _e.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=PD(oe,{indexPath:V.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,o){switch(e.linkType){case"SOFT":return this.installPackageSoft(e,r,o);case"HARD":return this.installPackageHard(e,r,o)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,o){let a=V.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?V.join(a,dr.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{pa
${uDt}
`,"--",...o],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(o=>fe.fromPortablePath(o.path));await Ur.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var gDt=[UBe],X0=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 dDt(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 mDt(n,I))A.add(v);let p=new Set([r.get("rcFilename"),dr.lockfile,dr.manifest]),h=await a.filterChanges(n,A,p),C=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${C}
`);else for(let I of h)this.context.stdout.write(`${fe.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,C):(await a.makeStage(n,h),this.context.stdout.write(C))}};X0.paths=[["stage"]],X0.usage=nt.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 dDt(t){let e=null,r=null;for(let o of gDt)if((r=await o.findRoot(t))!==null){e=o;break}if(e===null||r===null)throw new it("No stage driver has been found for your current project");return{driver:e,root:r}}function mDt(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=V.resolve(V.dirname(e),oe.readlinkSync(e));else break}return r}var yDt={commands:[X0]},EDt=yDt;var YG={};Vt(YG,{default:()=>SDt});Ye();Ye();Pt();var jBe=$e(Jn());Ye();var _Be=$e(JH()),CDt="e8e1bd300d860104bb8c58453ffa1eb4",wDt="OFCNCOG2CU",HBe=async(t,e)=>{let r=G.stringifyIdent(t),a=IDt(e).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},IDt=t=>(0,_Be.default)(wDt,CDt,{requester:{async send(r){try{let o=await rn.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 qBe=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,BDt=async(t,e,r,o)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??oe.existsSync(V.join(a.cwd,"tsconfig.json"))))return;let A=n.makeResolver(),p={project:a,resolver:A,report:new Qi};if(!await HBe(r,n))return;let C=qBe(r),I=G.parseRange(r.range).selector;if(!Qr.validRange(I)){let N=n.normalizeDependency(r),U=await A.getCandidates(N,{},p);I=G.parseRange(U[0].reference).selector}let v=jBe.default.coerce(I);if(v===null)return;let b=`${Jc.Modifier.CARET}${v.major}`,E=G.makeDescriptor(G.makeIdent("types",C),b),F=_e.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,z=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&z!==r.descriptorHash)return _e.mapAndFind.skip;let te=[];for(let le of Ot.allDependencies){let pe=N.manifest[le].get(E.identHash);typeof pe>"u"||te.push([le,pe])}return te.length===0?_e.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(E);if((await A.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[Jc.Target.DEVELOPMENT].set(E.identHash,E)}},vDt=async(t,e,r)=>{if(r.scope==="types")return;let{project:o}=t,{configuration:a}=o;if(!(a.get("tsEnableAutoTypes")??oe.existsSync(V.join(o.cwd,"tsconfig.json"))))return;let u=qBe(r),A=G.makeIdent("types",u);for(let p of Ot.allDependencies)typeof t.manifest[p].get(A.identHash)>"u"||t.manifest[p].delete(A.identHash)},DDt=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings
- ${A.map(b=>fe.fromPortablePath(b)).join(`
- `)}`);let p=new Set(_e.mapAndFilter(n,b=>{let E=t.tryWorkspaceByFilePath(b);return E===null?_e.mapAndFilter.skip:E}));if(A.length===0&&p.size===0&&!e)return null;let h=A.length===1?A[0]:V.join(u,`${wn.makeHash(Math.random().toString()).slice(0,8)}.yml`),C=oe.existsSync(h)?await oe.readFilePromise(h,"utf8"):"{}",I=Ki(C),v=new Map;for(let b of I.declined||[]){let E=G.parseIdent(b),F=t.getWorkspaceByIdent(E);v.set(F,"decline")}for(let[b,E]of Object.entries(I.releases||{})){let F=G.parseIdent(b),N=t.getWorkspaceByIdent(F);v.set(N,fw(E))}return{project:t,root:o,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(b=>b.manifest.version!==null)),releases:v,async saveAll(){let b={},E=[],F=[];for(let N of t.workspaces){if(N.manifest.version===null)continue;let U=G.stringifyIdent(N.anchoredLocator),z=v.get(N);z==="decline"?E.push(U):typeof z<"u"?b[U]=fw(z):p.has(N)&&F.push(U)}await oe.mkdirPromise(V.dirname(h),{recursive:!0}),await oe.changeFilePromise(h,Ba(new Ba.PreserveOrdering({releases:Object.keys(b).length>0?b:void 0,declined:E.length>0?E:void 0,undecided:F.length>0?F:void 0})))}}}function qDt(t){return aF(t).size>0||qv(t).length>0}function aF(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function qv(t,{include:e=new Set}={}){let r=[],o=new Map(_e.mapAndFilter([...t.releases],([n,u])=>u==="decline"?_e.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(_e.mapAndFilter([...t.releases],([n,u])=>u!=="decline"?_e.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||o.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let u of Ot.hardDependencies)for(let A of n.manifest.getForScope(u).values()){let p=t.project.tryWorkspaceByDescriptor(A);p!==null&&o.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function VG(t,e){let r=BA.default.clean(e);for(let o of Object.values(pw))if(o!=="undecided"&&o!=="decline"&&BA.default.inc(t,o)===r)return o;return null}function lF(t,e){if(BA.default.valid(e))return e;if(t===null)throw new it(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!BA.default.valid(t))throw new it(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=BA.default.inc(t,e);if(r===null)throw new it(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function zG(t,e,{report:r}){let o=new Map;for(let a of t.workspaces)for(let n of Ot.allDependencies)for(let u of a.manifest[n].values()){let A=t.tryWorkspaceByDescriptor(u);if(A===null||!e.has(A))continue;_e.getArrayWithDefault(o,A).push([a,n,u.identHash])}for(let[a,n]of e){let u=a.manifest.version;a.manifest.version=n,BA.default.prerelease(n)===null?delete a.manifest.raw.stableVersion:a.manifest.raw.stableVersion||(a.manifest.raw.stableVersion=u);let A=a.manifest.name!==null?G.stringifyIdent(a.manifest.name):null;r.reportInfo(0,`${G.prettyLocator(t.configuration,a.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:fe.fromPortablePath(a.cwd),ident:A,oldVersion:u,newVersion:n});let p=o.get(a);if(!(typeof p>"u"))for(let[h,C,I]of p){let v=h.manifest[C].get(I);if(typeof v>"u")throw new Error("Assertion failed: The dependency should have existed");let b=v.range,E=!1;if(b.startsWith(Xn.protocol)&&(b=b.slice(Xn.protocol.length),E=!0,b===a.relativeCwd))continue;let F=b.match(jDt);if(!F){r.reportWarning(0,`Couldn't auto-upgrade range ${b} (in ${G.prettyLocator(t.configuration,h.anchoredLocator)})`);continue}let N=`${F[1]}${n}`;E&&(N=`${Xn.protocol}${N}`);let U=G.makeDescriptor(v,N);h.manifest[C].set(I,U)}}}var GDt=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function zBe(t,{current:e,prerelease:r}){let o=new BA.default.SemVer(e),a=o.prerelease.slice(),n=[];o.prerelease=[],o.format()!==t&&(a.length=0);let u=!0,A=r.split(/\./g);for(let p of A){let h=GDt.get
This command will apply the deferred version changes and remove their definitions from the repository.
Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%d\`) will be used on all new versions and the version definitions will be kept as-is.
By default only the current workspace will be bumped, but you can configure this behavior by using one of:
- \`--recursive\` to also apply the version bump on its dependencies
- \`--all\` to apply the version bump on all packages in the repository
Note that this command will also update the \`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"]]});Ye();Pt();qt();var cF=$e(Jn());var $0=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(){SC(this.context);let{Gem:r}=await Promise.resolve().then(()=>(cQ(),Bj)),{ScrollableItems:o}=await Promise.resolve().then(()=>(pQ(),fQ)),{FocusRequest:a}=await Promise.resolve().then(()=>(Dj(),zwe)),{useListInput:n}=await Promise.resolve().then(()=>(AQ(),Jwe)),{renderForm:u}=await Promise.resolve().then(()=>(mQ(),dQ)),{Box:A,Text:p}=await Promise.resolve().then(()=>$e(ic())),{default:h,useCallback:C,useState:I}=await Promise.resolve().then(()=>$e(sn())),v=await Ke.find(this.context.cwd,this.context.plugins),{project:b,workspace:E}=await St.find(v,this.context.cwd);if(!E)throw new rr(b.cwd,this.context.cwd);await b.restoreInstallState();let F=await hw(b);if(F===null||F.releaseRoots.size===0)return 0;if(F.root===null)throw new it("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:ye,active:ae,decision:Ie,setDecision:Fe})=>{let g=ye.manifest.raw.stableVersion??ye.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${G.prettyLocator(v,ye.anchoredLocator)})`);if(cF.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let Ee=["undecided","decline","patch","minor","major"];n(Ie,Ee,{active:ae,minus:"left",plus:"right",set:Fe});let De=Ie==="undecided"?h.createElement(p,{color:"yellow"},g):Ie==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},cF.default.valid(Ie)?Ie:cF.default.inc(g,Ie)));return h.createElement(A,{flexDirection:"column"},h.createElement(A,null,h.createElement(p,null,G.prettyLocator(v,ye.anchoredLocator)," - ",De)),h.createElement(A,null,Ee.map(ce=>h.createElement(A,{key:ce,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:ce===Ie})," ",ce)))))},z=ye=>{let ae=new Set(F.releaseRoots),Ie=new Map([...ye].filter(([Fe])=>ae.has(Fe)));for(;;){let Fe=qv({project:F.project,releases:Ie}),g=!1;if(Fe.length>0){for(let[Ee]of Fe)if(!ae.has(Ee)){ae.add(Ee),g=!0;let De=ye.get(Ee);typeof De<"u"&&Ie.set(Ee,De)}}if(!g)break}return{relevantWorkspaces:ae,relevantReleases:Ie}},te=()=>{let[ye,ae]=I(()=>new Map(F.releases)),Ie=C((Fe,g)=>{let Ee=new Map(ye);g!=="undecided"?Ee.set(Fe,g):Ee.delete(Fe);let{relevantReleases:De}=z(Ee);ae(De)},[ye,ae]);return[ye,Ie]},le=({workspaces:ye,releases:ae})=>{let Ie=[];Ie.push(`${ye.size} total`);let Fe=0,g=0;for(let Ee of ye){let De=ae.get(Ee);typeof De>"u"?g+=1:De!=="decline"&&(Fe+=1)}return Ie.push(`${Fe} release${Fe===1?"":"s"}`),Ie.push(`${g} remaining`),h.createElement(p,{color:"yellow"},Ie.join(", "))},ue=await u(({useSubmit:ye})=>{let[ae,Ie]=te();ye(ae);let{relevantWorkspaces:Fe}=z(ae),g=new Set([...Fe].fil
`)},p=()=>{let ae=this.from.map(Ie=>dw.default.matcher(Ie));return o.workspaces.filter(Ie=>{let Fe=G.stringifyIdent(Ie.anchoredLocator),g=Ie.relativeCwd;return ae.some(Ee=>Ee(Fe)||Ee(g))})},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 ae of h)A(`
- ${ae.relativeCwd}
${G.prettyLocator(r,ae.anchoredLocator)}`);h.length>0&&A("")}let C;if(this.recursive?this.since?(A("Option --recursive --since is set; recursively selecting all dependent workspaces"),C=new Set(h.map(ae=>[...ae.getRecursiveWorkspaceDependents()]).flat())):(A("Option --recursive is set; recursively selecting all transitive dependencies"),C=new Set(h.map(ae=>[...ae.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(A("Option --worktree is set; recursively selecting all nested workspaces"),C=new Set(h.map(ae=>[...ae.getRecursiveWorkspaceChildren()]).flat())):C=null,C!==null&&(h=[...new Set([...h,...C])],this.dryRun))for(let ae of C)A(`
- ${ae.relativeCwd}
${G.prettyLocator(r,ae.anchoredLocator)}`);let I=[],v=!1;if(u?.includes(":")){for(let ae of o.workspaces)if(ae.manifest.scripts.has(u)&&(v=!v,v===!1))break}for(let ae of h){if(u&&!ae.manifest.scripts.has(u)&&!v&&!(await un.getWorkspaceAccessibleBinaries(ae)).has(u)){A(`Excluding ${ae.relativeCwd} because it doesn't have a "${u}" script`);continue}if(!(u===r.env.npm_lifecycle_event&&ae.cwd===a.cwd)){if(this.include.length>0&&!dw.default.isMatch(G.stringifyIdent(ae.anchoredLocator),this.include)&&!dw.default.isMatch(ae.relativeCwd,this.include)){A(`Excluding ${ae.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(dw.default.isMatch(G.stringifyIdent(ae.anchoredLocator),this.exclude)||dw.default.isMatch(ae.relativeCwd,this.exclude))){A(`Excluding ${ae.relativeCwd} because it matches the --include filter`);continue}if(this.publicOnly&&ae.manifest.private===!0){A(`Excluding ${ae.relativeCwd} because it's a private workspace and --no-private was set`);continue}I.push(ae)}}if(this.dryRun)return 0;let b=this.verbose??this.context.stdout.isTTY,E=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(zi.availableParallelism()/2):1,F=E===1?!1:this.parallel,N=F?this.interlaced:!0,U=(0,XBe.default)(E),z=new Map,te=new Set,le=0,pe=null,ue=!1,ye=await Lt.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async ae=>{let Ie=async(Fe,{commandIndex:g})=>{if(ue)return-1;!F&&b&&g>1&&ae.reportSeparator();let Ee=KDt(Fe,{configuration:r,verbose:b,commandIndex:g}),[De,ce]=JBe(ae,{prefix:Ee,interlaced:N}),[ne,ee]=JBe(ae,{prefix:Ee,interlaced:N});try{b&&ae.reportInfo(null,`${Ee} Process started`);let we=Date.now(),be=await this.cli.run([this.commandName,...this.args],{cwd:Fe.cwd,stdout:De,stderr:ne})||0;De.end(),ne.end(),await ce,await ee;let ht=Date.now();if(b){let H=r.get("enableTimers")?`, completed in ${de.pretty(r,ht-we,de.Type.DURATION)}`:"";ae.reportInfo(null,`${Ee} Process exited (exit code ${be})${H}`)}return be===130&&(ue=!0,pe=be),be}catch(we){throw De.end(),ne.end(),await ce,await ee,we}};for(let Fe of I)z.set(Fe.anchoredLocator.locatorHash,Fe);for(;z.size>0&&!ae.hasErrors();){let Fe=[];for(let[De,ce]of z){if(te.has(ce.anchoredDescriptor.descriptorHash))continue;let ne=!0;if(this.topological||this.topologicalDev){let ee=this.topologicalDev?new Map([...ce.manifest.dependencies,...ce.manifest.devDependencies]):ce.manifest.dependencies;for(let we of ee.values()){let be=o.tryWorkspaceByDescriptor(we);if(ne=be===null||!z.has(be.anchoredLocator.locatorHash),!ne)break}}if(!!ne&&(te.add(ce.anchoredDescriptor.descriptorHash),Fe.push(U(async()=>{let ee=await Ie(ce,{commandIndex:++le});return z.delete(De),te.delete(ce.anchoredDescriptor.descriptorHash),ee})),!F))break}if(Fe.length===0){let De=Array.from(z.values()).map(ce=>G.prettyLocator(r,ce.anchoredLocator)).join(", ");ae.reportError(3,`Dependency cycle detected (${De})`);return}let Ee=(await Promise.all(Fe)).find(De=>De!==0);pe===null&&(pe=typeof Ee<"u"?1:pe),(this.topological||this.topologicalDev)&&typeof Ee<"u"&&ae.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return pe!==null?pe:ye.exitCode()}};sp.paths=[["workspaces","foreach"]],sp.usage=nt.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; 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't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes hav
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*!
* buildToken
* Builds OAuth token prefix (helper function)
*
* @name buildToken
* @function
* @param {GitUrl} obj The parsed Git url object.
* @return {String} token prefix
*/
/*!
* fill-range <https://github.com/jonschlinkert/fill-range>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Licensed under the MIT License.
*/
/*!
* is-extglob <https://github.com/jonschlinkert/is-extglob>
*
* Copyright (c) 2014-2016, Jon Schlinkert.
* Licensed under the MIT License.
*/
/*!
* is-glob <https://github.com/jonschlinkert/is-glob>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
/*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.
*/
/*!
* is-windows <https://github.com/jonschlinkert/is-windows>
*
* Copyright © 2015-2018, Jon Schlinkert.
* Released under the MIT License.
*/
/*!
* to-regex-range <https://github.com/micromatch/to-regex-range>
*
* Copyright (c) 2015-present, Jon Schlinkert.
* Released under the MIT License.
*/
/**
@license
Copyright (c) 2015, Rebecca Turner
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
*/
/**
@license
Copyright Joyent, Inc. and other Node contributors.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
@license
Copyright Node.js contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
*/
/**
@license
The MIT License (MIT)
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/** @license React v0.18.0
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v0.24.0
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/