| "use strict";var require$$0$2=require("fs");var require$$0$1=require("util");var require$$0$5=require("os");var require$$0$6=require("path");var require$$0$3=require("constants");var require$$0$4=require("stream");var require$$5=require("assert");var require$$0$7=require("url");var require$$1$5=require("string_decoder");var require$$0$8=require("child_process");var require$$2$1=require("events");var require$$4=require("zlib");var require$$0$9=require("readline");var require$$1$6=require("tty");var require$$2$2=require("timers");var require$$1$7=require("module");var commonjsGlobal=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x["default"]:x}function getAugmentedNamespace(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var f=n.default;if(typeof f=="function"){var a=function a(){var isInstance=false;try{isInstance=this instanceof a}catch{}if(isInstance){return Reflect.construct(f,arguments,this.constructor)}return f.apply(this,arguments)};a.prototype=f.prototype}else a={};Object.defineProperty(a,"__esModule",{value:true});Object.keys(n).forEach((function(k){var d=Object.getOwnPropertyDescriptor(n,k);Object.defineProperty(a,k,d.get?d:{enumerable:true,get:function(){return n[k]}})}));return a}var lifecycleHooks$1={};var pathExists={exports:{}};var hasRequiredPathExists;function requirePathExists(){if(hasRequiredPathExists)return pathExists.exports;hasRequiredPathExists=1;const fs=require$$0$2;const{promisify:promisify}=require$$0$1;const pAccess=promisify(fs.access);pathExists.exports=async path=>{try{await pAccess(path);return true}catch(_){return false}};pathExists.exports.sync=path=>{try{fs.accessSync(path);return true}catch(_){return false}};return pathExists.exports}var lib$o={};var lib$n={};var lib$m={};var hasRequiredLib$n;function requireLib$n(){if(hasRequiredLib$n)return lib$m;hasRequiredLib$n=1;Object.defineProperty(lib$m,"__esModule",{value:true});lib$m.WORKSPACE_MANIFEST_FILENAME=lib$m.LAYOUT_VERSION=lib$m.ENGINE_NAME=lib$m.LOCKFILE_VERSION_V6=lib$m.LOCKFILE_VERSION=lib$m.WANTED_LOCKFILE=void 0;lib$m.WANTED_LOCKFILE="pnpm-lock.yaml";lib$m.LOCKFILE_VERSION=5.4;lib$m.LOCKFILE_VERSION_V6="6.0";lib$m.ENGINE_NAME=`${process.platform}-${process.arch}-node-${process.version.split(".")[0]}`;lib$m.LAYOUT_VERSION=5;lib$m.WORKSPACE_MANIFEST_FILENAME="pnpm-workspace.yaml";return lib$m}var hasRequiredLib$m;function requireLib$m(){if(hasRequiredLib$m)return lib$n;hasRequiredLib$m=1;Object.defineProperty(lib$n,"__esModule",{value:true});lib$n.LockfileMissingDependencyError=lib$n.FetchError=lib$n.PnpmError=void 0;const constants_1=requireLib$n();class PnpmError extends Error{constructor(code,message,opts){super(message);this.code=`ERR_PNPM_${code}`;this.hint=opts?.hint;this.attempts=opts?.attempts}}lib$n.PnpmError=PnpmError;class FetchError extends PnpmError{constructor(request,response,hint){const message=`GET ${request.url}: ${response.statusText} - ${response.status}`;const authHeaderValue=request.authHeaderValue?hideAuthInformation(request.authHeaderValue):undefined;if(response.status===401||response.status===403||response.status===404){hint=hint?`${hint}\n\n`:"";if(authHeaderValue){hint+=`An authorization header was used: ${authHeaderValue}`}else{hint+="No authorization header was set for the request."}}super(`FETCH_${response.status}`,message,{hint:hint});this.request=request;this.response=response}}lib$n.FetchError=FetchError;function hideAuthInformation(authHeaderValue){const[authType,token]=authHeaderValue.split(" ");return`${authType} ${token.substring(0,4)}[hidden]`}class LockfileMissingDependencyError extends PnpmError{constructor(depPath){const message=`Broken lockfile: no entry for '${depPath}' in ${constants_1.WANTED_LOCKFILE}`;super("LOCKFILE_MISSING_DEPENDENCY",message,{hint:"This issue is probably caused by a badly resolved merge conflict.\n"+"To fix the lockfile, run 'pnpm install --no-frozen-lockfile'."})}}lib$n.LockfileMissingDependencyError=LockfileMissingDependencyError;return lib$n}var loadJsonFile={exports:{}};var polyfills;var hasRequiredPolyfills;function requirePolyfills(){if(hasRequiredPolyfills)return polyfills;hasRequiredPolyfills=1;var constants=require$$0$3;var origCwd=process.cwd;var cwd=null;var platform=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){if(!cwd)cwd=origCwd.call(process);return cwd};try{process.cwd()}catch(er){}if(typeof process.chdir==="function"){var chdir=process.chdir;process.chdir=function(d){cwd=null;chdir.call(process,d)};if(Object.setPrototypeOf)Object.setPrototypeOf(process.chdir,chdir)}polyfills=patch;function patch(fs){if(constants.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)){patchLchmod(fs)}if(!fs.lutimes){patchLutimes(fs)}fs.chown=chownFix(fs.chown);fs.fchown=chownFix(fs.fchown);fs.lchown=chownFix(fs.lchown);fs.chmod=chmodFix(fs.chmod);fs.fchmod=chmodFix(fs.fchmod);fs.lchmod=chmodFix(fs.lchmod);fs.chownSync=chownFixSync(fs.chownSync);fs.fchownSync=chownFixSync(fs.fchownSync);fs.lchownSync=chownFixSync(fs.lchownSync);fs.chmodSync=chmodFixSync(fs.chmodSync);fs.fchmodSync=chmodFixSync(fs.fchmodSync);fs.lchmodSync=chmodFixSync(fs.lchmodSync);fs.stat=statFix(fs.stat);fs.fstat=statFix(fs.fstat);fs.lstat=statFix(fs.lstat);fs.statSync=statFixSync(fs.statSync);fs.fstatSync=statFixSync(fs.fstatSync);fs.lstatSync=statFixSync(fs.lstatSync);if(fs.chmod&&!fs.lchmod){fs.lchmod=function(path,mode,cb){if(cb)process.nextTick(cb)};fs.lchmodSync=function(){}}if(fs.chown&&!fs.lchown){fs.lchown=function(path,uid,gid,cb){if(cb)process.nextTick(cb)};fs.lchownSync=function(){}}if(platform==="win32"){fs.rename=typeof fs.rename!=="function"?fs.rename:function(fs$rename){function rename(from,to,cb){var start=Date.now();var backoff=0;fs$rename(from,to,(function CB(er){if(er&&(er.code==="EACCES"||er.code==="EPERM"||er.code==="EBUSY")&&Date.now()-start<6e4){setTimeout((function(){fs.stat(to,(function(stater,st){if(stater&&stater.code==="ENOENT")fs$rename(from,to,CB);else cb(er)}))}),backoff);if(backoff<100)backoff+=10;return}if(cb)cb(er)}))}if(Object.setPrototypeOf)Object.setPrototypeOf(rename,fs$rename);return rename}(fs.rename)}fs.read=typeof fs.read!=="function"?fs.read:function(fs$read){function read(fd,buffer,offset,length,position,callback_){var callback;if(callback_&&typeof callback_==="function"){var eagCounter=0;callback=function(er,_,__){if(er&&er.code==="EAGAIN"&&eagCounter<10){eagCounter++;return fs$read.call(fs,fd,buffer,offset,length,position,callback)}callback_.apply(this,arguments)}}return fs$read.call(fs,fd,buffer,offset,length,position,callback)}if(Object.setPrototypeOf)Object.setPrototypeOf(read,fs$read);return read}(fs.read);fs.readSync=typeof fs.readSync!=="function"?fs.readSync:function(fs$readSync){return function(fd,buffer,offset,length,position){var eagCounter=0;while(true){try{return fs$readSync.call(fs,fd,buffer,offset,length,position)}catch(er){if(er.code==="EAGAIN"&&eagCounter<10){eagCounter++;continue}throw er}}}}(fs.readSync);function patchLchmod(fs){fs.lchmod=function(path,mode,callback){fs.open(path,constants.O_WRONLY|constants.O_SYMLINK,mode,(function(err,fd){if(err){if(callback)callback(err);return}fs.fchmod(fd,mode,(function(err){fs.close(fd,(function(err2){if(callback)callback(err||err2)}))}))}))};fs.lchmodSync=function(path,mode){var fd=fs.openSync(path,constants.O_WRONLY|constants.O_SYMLINK,mode);var threw=true;var ret;try{ret=fs.fchmodSync(fd,mode);threw=false}finally{if(threw){try{fs.closeSync(fd)}catch(er){}}else{fs.closeSync(fd)}}return ret}}function patchLutimes(fs){if(constants.hasOwnProperty("O_SYMLINK")&&fs.futimes){fs.lutimes=function(path,at,mt,cb){fs.open(path,constants.O_SYMLINK,(function(er,fd){if(er){if(cb)cb(er);return}fs.futimes(fd,at,mt,(function(er){fs.close(fd,(function(er2){if(cb)cb(er||er2)}))}))}))};fs.lutimesSync=function(path,at,mt){var fd=fs.openSync(path,constants.O_SYMLINK);var ret;var threw=true;try{ret=fs.futimesSync(fd,at,mt);threw=false}finally{if(threw){try{fs.closeSync(fd)}catch(er){}}else{fs.closeSync(fd)}}return ret}}else if(fs.futimes){fs.lutimes=function(_a,_b,_c,cb){if(cb)process.nextTick(cb)};fs.lutimesSync=function(){}}}function chmodFix(orig){if(!orig)return orig;return function(target,mode,cb){return orig.call(fs,target,mode,(function(er){if(chownErOk(er))er=null;if(cb)cb.apply(this,arguments)}))}}function chmodFixSync(orig){if(!orig)return orig;return function(target,mode){try{return orig.call(fs,target,mode)}catch(er){if(!chownErOk(er))throw er}}}function chownFix(orig){if(!orig)return orig;return function(target,uid,gid,cb){return orig.call(fs,target,uid,gid,(function(er){if(chownErOk(er))er=null;if(cb)cb.apply(this,arguments)}))}}function chownFixSync(orig){if(!orig)return orig;return function(target,uid,gid){try{return orig.call(fs,target,uid,gid)}catch(er){if(!chownErOk(er))throw er}}}function statFix(orig){if(!orig)return orig;return function(target,options,cb){if(typeof options==="function"){cb=options;options=null}function callback(er,stats){if(stats){if(stats.uid<0)stats.uid+=4294967296;if(stats.gid<0)stats.gid+=4294967296}if(cb)cb.apply(this,arguments)}return options?orig.call(fs,target,options,callback):orig.call(fs,target,callback)}}function statFixSync(orig){if(!orig)return orig;return function(target,options){var stats=options?orig.call(fs,target,options):orig.call(fs,target);if(stats){if(stats.uid<0)stats.uid+=4294967296;if(stats.gid<0)stats.gid+=4294967296}return stats}}function chownErOk(er){if(!er)return true;if(er.code==="ENOSYS")return true;var nonroot=!process.getuid||process.getuid()!==0;if(nonroot){if(er.code==="EINVAL"||er.code==="EPERM")return true}return false}}return polyfills}var legacyStreams;var hasRequiredLegacyStreams;function requireLegacyStreams(){if(hasRequiredLegacyStreams)return legacyStreams;hasRequiredLegacyStreams=1;var Stream=require$$0$4.Stream;legacyStreams=legacy;function legacy(fs){return{ReadStream:ReadStream,WriteStream:WriteStream};function ReadStream(path,options){if(!(this instanceof ReadStream))return new ReadStream(path,options);Stream.call(this);var self=this;this.path=path;this.fd=null;this.readable=true;this.paused=false;this.flags="r";this.mode=438;this.bufferSize=64*1024;options=options||{};var keys=Object.keys(options);for(var index=0,length=keys.length;index<length;index++){var key=keys[index];this[key]=options[key]}if(this.encoding)this.setEncoding(this.encoding);if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.end===undefined){this.end=Infinity}else if("number"!==typeof this.end){throw TypeError("end must be a Number")}if(this.start>this.end){throw new Error("start must be <= end")}this.pos=this.start}if(this.fd!==null){process.nextTick((function(){self._read()}));return}fs.open(this.path,this.flags,this.mode,(function(err,fd){if(err){self.emit("error",err);self.readable=false;return}self.fd=fd;self.emit("open",fd);self._read()}))}function WriteStream(path,options){if(!(this instanceof WriteStream))return new WriteStream(path,options);Stream.call(this);this.path=path;this.fd=null;this.writable=true;this.flags="w";this.encoding="binary";this.mode=438;this.bytesWritten=0;options=options||{};var keys=Object.keys(options);for(var index=0,length=keys.length;index<length;index++){var key=keys[index];this[key]=options[key]}if(this.start!==undefined){if("number"!==typeof this.start){throw TypeError("start must be a Number")}if(this.start<0){throw new Error("start must be >= zero")}this.pos=this.start}this.busy=false;this._queue=[];if(this.fd===null){this._open=fs.open;this._queue.push([this._open,this.path,this.flags,this.mode,undefined]);this.flush()}}}return legacyStreams}var clone_1;var hasRequiredClone;function requireClone(){if(hasRequiredClone)return clone_1;hasRequiredClone=1;clone_1=clone;var getPrototypeOf=Object.getPrototypeOf||function(obj){return obj.__proto__};function clone(obj){if(obj===null||typeof obj!=="object")return obj;if(obj instanceof Object)var copy={__proto__:getPrototypeOf(obj)};else var copy=Object.create(null);Object.getOwnPropertyNames(obj).forEach((function(key){Object.defineProperty(copy,key,Object.getOwnPropertyDescriptor(obj,key))}));return copy}return clone_1}var gracefulFs;var hasRequiredGracefulFs;function requireGracefulFs(){if(hasRequiredGracefulFs)return gracefulFs;hasRequiredGracefulFs=1;var fs=require$$0$2;var polyfills=requirePolyfills();var legacy=requireLegacyStreams();var clone=requireClone();var util=require$$0$1;var gracefulQueue;var previousSymbol;if(typeof Symbol==="function"&&typeof Symbol.for==="function"){gracefulQueue=Symbol.for("graceful-fs.queue");previousSymbol=Symbol.for("graceful-fs.previous")}else{gracefulQueue="___graceful-fs.queue";previousSymbol="___graceful-fs.previous"}function noop(){}function publishQueue(context,queue){Object.defineProperty(context,gracefulQueue,{get:function(){return queue}})}var debug=noop;if(util.debuglog)debug=util.debuglog("gfs4");else if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||""))debug=function(){var m=util.format.apply(util,arguments);m="GFS4: "+m.split(/\n/).join("\nGFS4: ");console.error(m)};if(!fs[gracefulQueue]){var queue=commonjsGlobal[gracefulQueue]||[];publishQueue(fs,queue);fs.close=function(fs$close){function close(fd,cb){return fs$close.call(fs,fd,(function(err){if(!err){resetQueue()}if(typeof cb==="function")cb.apply(this,arguments)}))}Object.defineProperty(close,previousSymbol,{value:fs$close});return close}(fs.close);fs.closeSync=function(fs$closeSync){function closeSync(fd){fs$closeSync.apply(fs,arguments);resetQueue()}Object.defineProperty(closeSync,previousSymbol,{value:fs$closeSync});return closeSync}(fs.closeSync);if(/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")){process.on("exit",(function(){debug(fs[gracefulQueue]);require$$5.equal(fs[gracefulQueue].length,0)}))}}if(!commonjsGlobal[gracefulQueue]){publishQueue(commonjsGlobal,fs[gracefulQueue])}gracefulFs=patch(clone(fs));if(process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!fs.__patched){gracefulFs=patch(fs);fs.__patched=true}function patch(fs){polyfills(fs);fs.gracefulify=patch;fs.createReadStream=createReadStream;fs.createWriteStream=createWriteStream;var fs$readFile=fs.readFile;fs.readFile=readFile;function readFile(path,options,cb){if(typeof options==="function")cb=options,options=null;return go$readFile(path,options,cb);function go$readFile(path,options,cb,startTime){return fs$readFile(path,options,(function(err){if(err&&(err.code==="EMFILE"||err.code==="ENFILE"))enqueue([go$readFile,[path,options,cb],err,startTime||Date.now(),Date.now()]);else{if(typeof cb==="function")cb.apply(this,arguments)}}))}}var fs$writeFile=fs.writeFile;fs.writeFile=writeFile;function writeFile(path,data,options,cb){if(typeof options==="function")cb=options,options=null;return go$writeFile(path,data,options,cb);function go$writeFile(path,data,options,cb,startTime){return fs$writeFile(path,data,options,(function(err){if(err&&(err.code==="EMFILE"||err.code==="ENFILE"))enqueue([go$writeFile,[path,data,options,cb],err,startTime||Date.now(),Date.now()]);else{if(typeof cb==="function")cb.apply(this,arguments)}}))}}var fs$appendFile=fs.appendFile;if(fs$appendFile)fs.appendFile=appendFile;function appendFile(path,data,options,cb){if(typeof options==="function")cb=options,options=null;return go$appendFile(path,data,options,cb);function go$appendFile(path,data,options,cb,startTime){return fs$appendFile(path,data,options,(function(err){if(err&&(err.code==="EMFILE"||err.code==="ENFILE"))enqueue([go$appendFile,[path,data,options,cb],err,startTime||Date.now(),Date.now()]);else{if(typeof cb==="function")cb.apply(this,arguments)}}))}}var fs$copyFile=fs.copyFile;if(fs$copyFile)fs.copyFile=copyFile;function copyFile(src,dest,flags,cb){if(typeof flags==="function"){cb=flags;flags=0}return go$copyFile(src,dest,flags,cb);function go$copyFile(src,dest,flags,cb,startTime){return fs$copyFile(src,dest,flags,(function(err){if(err&&(err.code==="EMFILE"||err.code==="ENFILE"))enqueue([go$copyFile,[src,dest,flags,cb],err,startTime||Date.now(),Date.now()]);else{if(typeof cb==="function")cb.apply(this,arguments)}}))}}var fs$readdir=fs.readdir;fs.readdir=readdir;var noReaddirOptionVersions=/^v[0-5]\./;function readdir(path,options,cb){if(typeof options==="function")cb=options,options=null;var go$readdir=noReaddirOptionVersions.test(process.version)?function go$readdir(path,options,cb,startTime){return fs$readdir(path,fs$readdirCallback(path,options,cb,startTime))}:function go$readdir(path,options,cb,startTime){return fs$readdir(path,options,fs$readdirCallback(path,options,cb,startTime))};return go$readdir(path,options,cb);function fs$readdirCallback(path,options,cb,startTime){return function(err,files){if(err&&(err.code==="EMFILE"||err.code==="ENFILE"))enqueue([go$readdir,[path,options,cb],err,startTime||Date.now(),Date.now()]);else{if(files&&files.sort)files.sort();if(typeof cb==="function")cb.call(this,err,files)}}}}if(process.version.substr(0,4)==="v0.8"){var legStreams=legacy(fs);ReadStream=legStreams.ReadStream;WriteStream=legStreams.WriteStream}var fs$ReadStream=fs.ReadStream;if(fs$ReadStream){ReadStream.prototype=Object.create(fs$ReadStream.prototype);ReadStream.prototype.open=ReadStream$open}var fs$WriteStream=fs.WriteStream;if(fs$WriteStream){WriteStream.prototype=Object.create(fs$WriteStream.prototype);WriteStream.prototype.open=WriteStream$open}Object.defineProperty(fs,"ReadStream",{get:function(){return ReadStream},set:function(val){ReadStream=val},enumerable:true,configurable:true});Object.defineProperty(fs,"WriteStream",{get:function(){return WriteStream},set:function(val){WriteStream=val},enumerable:true,configurable:true});var FileReadStream=ReadStream;Object.defineProperty(fs,"FileReadStream",{get:function(){return FileReadStream},set:function(val){FileReadStream=val},enumerable:true,configurable:true});var FileWriteStream=WriteStream;Object.defineProperty(fs,"FileWriteStream",{get:function(){return FileWriteStream},set:function(val){FileWriteStream=val},enumerable:true,configurable:true});function ReadStream(path,options){if(this instanceof ReadStream)return fs$ReadStream.apply(this,arguments),this;else return ReadStream.apply(Object.create(ReadStream.prototype),arguments)}function ReadStream$open(){var that=this;open(that.path,that.flags,that.mode,(function(err,fd){if(err){if(that.autoClose)that.destroy();that.emit("error",err)}else{that.fd=fd;that.emit("open",fd);that.read()}}))}function WriteStream(path,options){if(this instanceof WriteStream)return fs$WriteStream.apply(this,arguments),this;else return WriteStream.apply(Object.create(WriteStream.prototype),arguments)}function WriteStream$open(){var that=this;open(that.path,that.flags,that.mode,(function(err,fd){if(err){that.destroy();that.emit("error",err)}else{that.fd=fd;that.emit("open",fd)}}))}function createReadStream(path,options){return new fs.ReadStream(path,options)}function createWriteStream(path,options){return new fs.WriteStream(path,options)}var fs$open=fs.open;fs.open=open;function open(path,flags,mode,cb){if(typeof mode==="function")cb=mode,mode=null;return go$open(path,flags,mode,cb);function go$open(path,flags,mode,cb,startTime){return fs$open(path,flags,mode,(function(err,fd){if(err&&(err.code==="EMFILE"||err.code==="ENFILE"))enqueue([go$open,[path,flags,mode,cb],err,startTime||Date.now(),Date.now()]);else{if(typeof cb==="function")cb.apply(this,arguments)}}))}}return fs}function enqueue(elem){debug("ENQUEUE",elem[0].name,elem[1]);fs[gracefulQueue].push(elem);retry()}var retryTimer;function resetQueue(){var now=Date.now();for(var i=0;i<fs[gracefulQueue].length;++i){if(fs[gracefulQueue][i].length>2){fs[gracefulQueue][i][3]=now;fs[gracefulQueue][i][4]=now}}retry()}function retry(){clearTimeout(retryTimer);retryTimer=undefined;if(fs[gracefulQueue].length===0)return;var elem=fs[gracefulQueue].shift();var fn=elem[0];var args=elem[1];var err=elem[2];var startTime=elem[3];var lastTime=elem[4];if(startTime===undefined){debug("RETRY",fn.name,args);fn.apply(null,args)}else if(Date.now()-startTime>=6e4){debug("TIMEOUT",fn.name,args);var cb=args.pop();if(typeof cb==="function")cb.call(null,err)}else{var sinceAttempt=Date.now()-lastTime;var sinceStart=Math.max(lastTime-startTime,1);var desiredDelay=Math.min(sinceStart*1.2,100);if(sinceAttempt>=desiredDelay){debug("RETRY",fn.name,args);fn.apply(null,args.concat([startTime]))}else{fs[gracefulQueue].push(elem)}}if(retryTimer===undefined){retryTimer=setTimeout(retry,0)}}return gracefulFs}var stripBom;var hasRequiredStripBom;function requireStripBom(){if(hasRequiredStripBom)return stripBom;hasRequiredStripBom=1;stripBom=string=>{if(typeof string!=="string"){throw new TypeError(`Expected a string, got ${typeof string}`)}if(string.charCodeAt(0)===65279){return string.slice(1)}return string};return stripBom}var isArrayish;var hasRequiredIsArrayish;function requireIsArrayish(){if(hasRequiredIsArrayish)return isArrayish;hasRequiredIsArrayish=1;isArrayish=function isArrayish(obj){if(!obj){return false}return obj instanceof Array||Array.isArray(obj)||obj.length>=0&&obj.splice instanceof Function};return isArrayish}var errorEx_1;var hasRequiredErrorEx;function requireErrorEx(){if(hasRequiredErrorEx)return errorEx_1;hasRequiredErrorEx=1;var util=require$$0$1;var isArrayish=requireIsArrayish();var errorEx=function errorEx(name,properties){if(!name||name.constructor!==String){properties=name||{};name=Error.name}var errorExError=function ErrorEXError(message){if(!this){return new ErrorEXError(message)}message=message instanceof Error?message.message:message||this.message;Error.call(this,message);Error.captureStackTrace(this,errorExError);this.name=name;Object.defineProperty(this,"message",{configurable:true,enumerable:false,get:function(){var newMessage=message.split(/\r?\n/g);for(var key in properties){if(!properties.hasOwnProperty(key)){continue}var modifier=properties[key];if("message"in modifier){newMessage=modifier.message(this[key],newMessage)||newMessage;if(!isArrayish(newMessage)){newMessage=[newMessage]}}}return newMessage.join("\n")},set:function(v){message=v}});var overwrittenStack=null;var stackDescriptor=Object.getOwnPropertyDescriptor(this,"stack");var stackGetter=stackDescriptor.get;var stackValue=stackDescriptor.value;delete stackDescriptor.value;delete stackDescriptor.writable;stackDescriptor.set=function(newstack){overwrittenStack=newstack};stackDescriptor.get=function(){var stack=(overwrittenStack||(stackGetter?stackGetter.call(this):stackValue)).split(/\r?\n+/g);if(!overwrittenStack){stack[0]=this.name+": "+this.message}var lineCount=1;for(var key in properties){if(!properties.hasOwnProperty(key)){continue}var modifier=properties[key];if("line"in modifier){var line=modifier.line(this[key]);if(line){stack.splice(lineCount++,0," "+line)}}if("stack"in modifier){modifier.stack(this[key],stack)}}return stack.join("\n")};Object.defineProperty(this,"stack",stackDescriptor)};if(Object.setPrototypeOf){Object.setPrototypeOf(errorExError.prototype,Error.prototype);Object.setPrototypeOf(errorExError,Error)}else{util.inherits(errorExError,Error)}return errorExError};errorEx.append=function(str,def){return{message:function(v,message){v=v||def;if(v){message[0]+=" "+str.replace("%s",v.toString())}return message}}};errorEx.line=function(str,def){return{line:function(v){v=v||def;if(v){return str.replace("%s",v.toString())}return null}}};errorEx_1=errorEx;return errorEx_1}var jsonParseEvenBetterErrors;var hasRequiredJsonParseEvenBetterErrors;function requireJsonParseEvenBetterErrors(){if(hasRequiredJsonParseEvenBetterErrors)return jsonParseEvenBetterErrors;hasRequiredJsonParseEvenBetterErrors=1;const hexify=char=>{const h=char.charCodeAt(0).toString(16).toUpperCase();return"0x"+(h.length%2?"0":"")+h};const parseError=(e,txt,context)=>{if(!txt){return{message:e.message+" while parsing empty string",position:0}}const badToken=e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i);const errIdx=badToken?+badToken[2]:e.message.match(/^Unexpected end of JSON.*/i)?txt.length-1:null;const msg=badToken?e.message.replace(/^Unexpected token ./,`Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`):e.message;if(errIdx!==null&&errIdx!==undefined){const start=errIdx<=context?0:errIdx-context;const end=errIdx+context>=txt.length?txt.length:errIdx+context;const slice=(start===0?"":"...")+txt.slice(start,end)+(end===txt.length?"":"...");const near=txt===slice?"":"near ";return{message:msg+` while parsing ${near}${JSON.stringify(slice)}`,position:errIdx}}else{return{message:msg+` while parsing '${txt.slice(0,context*2)}'`,position:0}}};class JSONParseError extends SyntaxError{constructor(er,txt,context,caller){context=context||20;const metadata=parseError(er,txt,context);super(metadata.message);Object.assign(this,metadata);this.code="EJSONPARSE";this.systemError=er;Error.captureStackTrace(this,caller||this.constructor)}get name(){return this.constructor.name}set name(n){}get[Symbol.toStringTag](){return this.constructor.name}}const kIndent=Symbol.for("indent");const kNewline=Symbol.for("newline");const formatRE=/^\s*[{\[]((?:\r?\n)+)([\s\t]*)/;const emptyRE=/^(?:\{\}|\[\])((?:\r?\n)+)?$/;const parseJson=(txt,reviver,context)=>{const parseText=stripBOM(txt);context=context||20;try{const[,newline="\n",indent=" "]=parseText.match(emptyRE)||parseText.match(formatRE)||[,"",""];const result=JSON.parse(parseText,reviver);if(result&&typeof result==="object"){result[kNewline]=newline;result[kIndent]=indent}return result}catch(e){if(typeof txt!=="string"&&!Buffer.isBuffer(txt)){const isEmptyArray=Array.isArray(txt)&&txt.length===0;throw Object.assign(new TypeError(`Cannot parse ${isEmptyArray?"an empty array":String(txt)}`),{code:"EJSONPARSE",systemError:e})}throw new JSONParseError(e,parseText,context,parseJson)}};const stripBOM=txt=>String(txt).replace(/^\uFEFF/,"");jsonParseEvenBetterErrors=parseJson;parseJson.JSONParseError=JSONParseError;parseJson.noExceptions=(txt,reviver)=>{try{return JSON.parse(stripBOM(txt),reviver)}catch(e){}};return jsonParseEvenBetterErrors}var build={};var hasRequiredBuild;function requireBuild(){if(hasRequiredBuild)return build;hasRequiredBuild=1;(function(exports){exports.__esModule=true;exports.LinesAndColumns=void 0;var LF="\n";var CR="\r";var LinesAndColumns=function(){function LinesAndColumns(string){this.string=string;var offsets=[0];for(var offset=0;offset<string.length;){switch(string[offset]){case LF:offset+=LF.length;offsets.push(offset);break;case CR:offset+=CR.length;if(string[offset]===LF){offset+=LF.length}offsets.push(offset);break;default:offset++;break}}this.offsets=offsets}LinesAndColumns.prototype.locationForIndex=function(index){if(index<0||index>this.string.length){return null}var line=0;var offsets=this.offsets;while(offsets[line+1]<=index){line++}var column=index-offsets[line];return{line:line,column:column}};LinesAndColumns.prototype.indexForLocation=function(location){var line=location.line,column=location.column;if(line<0||line>=this.offsets.length){return null}if(column<0||column>this.lengthOfLine(line)){return null}return this.offsets[line]+column};LinesAndColumns.prototype.lengthOfLine=function(line){var offset=this.offsets[line];var nextOffset=line===this.offsets.length-1?this.string.length:this.offsets[line+1];return nextOffset-offset};return LinesAndColumns}();exports.LinesAndColumns=LinesAndColumns;exports["default"]=LinesAndColumns})(build);return build}var lib$l={};var lib$k={};var jsTokens={};var hasRequiredJsTokens;function requireJsTokens(){if(hasRequiredJsTokens)return jsTokens;hasRequiredJsTokens=1;Object.defineProperty(jsTokens,"__esModule",{value:true});jsTokens.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;jsTokens.matchToToken=function(match){var token={type:"invalid",value:match[0],closed:undefined};if(match[1])token.type="string",token.closed=!!(match[3]||match[4]);else if(match[5])token.type="comment";else if(match[6])token.type="comment",token.closed=!!match[7];else if(match[8])token.type="regex";else if(match[9])token.type="number";else if(match[10])token.type="name";else if(match[11])token.type="punctuator";else if(match[12])token.type="whitespace";return token};return jsTokens}var lib$j={};var identifier={};var hasRequiredIdentifier;function requireIdentifier(){if(hasRequiredIdentifier)return identifier;hasRequiredIdentifier=1;Object.defineProperty(identifier,"__esModule",{value:true});identifier.isIdentifierChar=isIdentifierChar;identifier.isIdentifierName=isIdentifierName;identifier.isIdentifierStart=isIdentifierStart;let nonASCIIidentifierStartChars="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";let nonASCIIidentifierChars="\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";const nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]");const nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");nonASCIIidentifierStartChars=nonASCIIidentifierChars=null;const astralIdentifierStartCodes=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191];const astralIdentifierCodes=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function isInAstralSet(code,set){let pos=65536;for(let i=0,length=set.length;i<length;i+=2){pos+=set[i];if(pos>code)return false;pos+=set[i+1];if(pos>=code)return true}return false}function isIdentifierStart(code){if(code<65)return code===36;if(code<=90)return true;if(code<97)return code===95;if(code<=122)return true;if(code<=65535){return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code))}return isInAstralSet(code,astralIdentifierStartCodes)}function isIdentifierChar(code){if(code<48)return code===36;if(code<58)return true;if(code<65)return false;if(code<=90)return true;if(code<97)return code===95;if(code<=122)return true;if(code<=65535){return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code))}return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}function isIdentifierName(name){let isFirst=true;for(let i=0;i<name.length;i++){let cp=name.charCodeAt(i);if((cp&64512)===55296&&i+1<name.length){const trail=name.charCodeAt(++i);if((trail&64512)===56320){cp=65536+((cp&1023)<<10)+(trail&1023)}}if(isFirst){isFirst=false;if(!isIdentifierStart(cp)){return false}}else if(!isIdentifierChar(cp)){return false}}return!isFirst}return identifier}var keyword={};var hasRequiredKeyword;function requireKeyword(){if(hasRequiredKeyword)return keyword;hasRequiredKeyword=1;Object.defineProperty(keyword,"__esModule",{value:true});keyword.isKeyword=isKeyword;keyword.isReservedWord=isReservedWord;keyword.isStrictBindOnlyReservedWord=isStrictBindOnlyReservedWord;keyword.isStrictBindReservedWord=isStrictBindReservedWord;keyword.isStrictReservedWord=isStrictReservedWord;const reservedWords={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]};const keywords=new Set(reservedWords.keyword);const reservedWordsStrictSet=new Set(reservedWords.strict);const reservedWordsStrictBindSet=new Set(reservedWords.strictBind);function isReservedWord(word,inModule){return inModule&&word==="await"||word==="enum"}function isStrictReservedWord(word,inModule){return isReservedWord(word,inModule)||reservedWordsStrictSet.has(word)}function isStrictBindOnlyReservedWord(word){return reservedWordsStrictBindSet.has(word)}function isStrictBindReservedWord(word,inModule){return isStrictReservedWord(word,inModule)||isStrictBindOnlyReservedWord(word)}function isKeyword(word){return keywords.has(word)}return keyword}var hasRequiredLib$l;function requireLib$l(){if(hasRequiredLib$l)return lib$j;hasRequiredLib$l=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"isIdentifierChar",{enumerable:true,get:function(){return _identifier.isIdentifierChar}});Object.defineProperty(exports,"isIdentifierName",{enumerable:true,get:function(){return _identifier.isIdentifierName}});Object.defineProperty(exports,"isIdentifierStart",{enumerable:true,get:function(){return _identifier.isIdentifierStart}});Object.defineProperty(exports,"isKeyword",{enumerable:true,get:function(){return _keyword.isKeyword}});Object.defineProperty(exports,"isReservedWord",{enumerable:true,get:function(){return _keyword.isReservedWord}});Object.defineProperty(exports,"isStrictBindOnlyReservedWord",{enumerable:true,get:function(){return _keyword.isStrictBindOnlyReservedWord}});Object.defineProperty(exports,"isStrictBindReservedWord",{enumerable:true,get:function(){return _keyword.isStrictBindReservedWord}});Object.defineProperty(exports,"isStrictReservedWord",{enumerable:true,get:function(){return _keyword.isStrictReservedWord}});var _identifier=requireIdentifier();var _keyword=requireKeyword()})(lib$j);return lib$j}var chalk={exports:{}};var escapeStringRegexp;var hasRequiredEscapeStringRegexp;function requireEscapeStringRegexp(){if(hasRequiredEscapeStringRegexp)return escapeStringRegexp;hasRequiredEscapeStringRegexp=1;var matchOperatorsRe=/[|\\{}()[\]^$+*?.]/g;escapeStringRegexp=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}return str.replace(matchOperatorsRe,"\\$&")};return escapeStringRegexp}var ansiStyles$1={exports:{}};var conversions$1={exports:{}};var colorName$1;var hasRequiredColorName$1;function requireColorName$1(){if(hasRequiredColorName$1)return colorName$1;hasRequiredColorName$1=1;colorName$1={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],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};return colorName$1}var hasRequiredConversions$1;function requireConversions$1(){if(hasRequiredConversions$1)return conversions$1.exports;hasRequiredConversions$1=1;var cssKeywords=requireColorName$1();var reverseKeywords={};for(var key in cssKeywords){if(cssKeywords.hasOwnProperty(key)){reverseKeywords[cssKeywords[key]]=key}}var convert=conversions$1.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var model in convert){if(convert.hasOwnProperty(model)){if(!("channels"in convert[model])){throw new Error("missing channels property: "+model)}if(!("labels"in convert[model])){throw new Error("missing channel labels property: "+model)}if(convert[model].labels.length!==convert[model].channels){throw new Error("channel and label counts mismatch: "+model)}var channels=convert[model].channels;var labels=convert[model].labels;delete convert[model].channels;delete convert[model].labels;Object.defineProperty(convert[model],"channels",{value:channels});Object.defineProperty(convert[model],"labels",{value:labels})}}convert.rgb.hsl=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var min=Math.min(r,g,b);var max=Math.max(r,g,b);var delta=max-min;var h;var s;var l;if(max===min){h=0}else if(r===max){h=(g-b)/delta}else if(g===max){h=2+(b-r)/delta}else if(b===max){h=4+(r-g)/delta}h=Math.min(h*60,360);if(h<0){h+=360}l=(min+max)/2;if(max===min){s=0}else if(l<=.5){s=delta/(max+min)}else{s=delta/(2-max-min)}return[h,s*100,l*100]};convert.rgb.hsv=function(rgb){var rdif;var gdif;var bdif;var h;var s;var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var v=Math.max(r,g,b);var diff=v-Math.min(r,g,b);var diffc=function(c){return(v-c)/6/diff+1/2};if(diff===0){h=s=0}else{s=diff/v;rdif=diffc(r);gdif=diffc(g);bdif=diffc(b);if(r===v){h=bdif-gdif}else if(g===v){h=1/3+rdif-bdif}else if(b===v){h=2/3+gdif-rdif}if(h<0){h+=1}else if(h>1){h-=1}}return[h*360,s*100,v*100]};convert.rgb.hwb=function(rgb){var r=rgb[0];var g=rgb[1];var b=rgb[2];var h=convert.rgb.hsl(rgb)[0];var w=1/255*Math.min(r,Math.min(g,b));b=1-1/255*Math.max(r,Math.max(g,b));return[h,w*100,b*100]};convert.rgb.cmyk=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var c;var m;var y;var k;k=Math.min(1-r,1-g,1-b);c=(1-r-k)/(1-k)||0;m=(1-g-k)/(1-k)||0;y=(1-b-k)/(1-k)||0;return[c*100,m*100,y*100,k*100]};function comparativeDistance(x,y){return Math.pow(x[0]-y[0],2)+Math.pow(x[1]-y[1],2)+Math.pow(x[2]-y[2],2)}convert.rgb.keyword=function(rgb){var reversed=reverseKeywords[rgb];if(reversed){return reversed}var currentClosestDistance=Infinity;var currentClosestKeyword;for(var keyword in cssKeywords){if(cssKeywords.hasOwnProperty(keyword)){var value=cssKeywords[keyword];var distance=comparativeDistance(rgb,value);if(distance<currentClosestDistance){currentClosestDistance=distance;currentClosestKeyword=keyword}}}return currentClosestKeyword};convert.keyword.rgb=function(keyword){return cssKeywords[keyword]};convert.rgb.xyz=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;g=g>.04045?Math.pow((g+.055)/1.055,2.4):g/12.92;b=b>.04045?Math.pow((b+.055)/1.055,2.4):b/12.92;var x=r*.4124+g*.3576+b*.1805;var y=r*.2126+g*.7152+b*.0722;var z=r*.0193+g*.1192+b*.9505;return[x*100,y*100,z*100]};convert.rgb.lab=function(rgb){var xyz=convert.rgb.xyz(rgb);var x=xyz[0];var y=xyz[1];var z=xyz[2];var l;var a;var b;x/=95.047;y/=100;z/=108.883;x=x>.008856?Math.pow(x,1/3):7.787*x+16/116;y=y>.008856?Math.pow(y,1/3):7.787*y+16/116;z=z>.008856?Math.pow(z,1/3):7.787*z+16/116;l=116*y-16;a=500*(x-y);b=200*(y-z);return[l,a,b]};convert.hsl.rgb=function(hsl){var h=hsl[0]/360;var s=hsl[1]/100;var l=hsl[2]/100;var t1;var t2;var t3;var rgb;var val;if(s===0){val=l*255;return[val,val,val]}if(l<.5){t2=l*(1+s)}else{t2=l+s-l*s}t1=2*l-t2;rgb=[0,0,0];for(var i=0;i<3;i++){t3=h+1/3*-(i-1);if(t3<0){t3++}if(t3>1){t3--}if(6*t3<1){val=t1+(t2-t1)*6*t3}else if(2*t3<1){val=t2}else if(3*t3<2){val=t1+(t2-t1)*(2/3-t3)*6}else{val=t1}rgb[i]=val*255}return rgb};convert.hsl.hsv=function(hsl){var h=hsl[0];var s=hsl[1]/100;var l=hsl[2]/100;var smin=s;var lmin=Math.max(l,.01);var sv;var v;l*=2;s*=l<=1?l:2-l;smin*=lmin<=1?lmin:2-lmin;v=(l+s)/2;sv=l===0?2*smin/(lmin+smin):2*s/(l+s);return[h,sv*100,v*100]};convert.hsv.rgb=function(hsv){var h=hsv[0]/60;var s=hsv[1]/100;var v=hsv[2]/100;var hi=Math.floor(h)%6;var f=h-Math.floor(h);var p=255*v*(1-s);var q=255*v*(1-s*f);var t=255*v*(1-s*(1-f));v*=255;switch(hi){case 0:return[v,t,p];case 1:return[q,v,p];case 2:return[p,v,t];case 3:return[p,q,v];case 4:return[t,p,v];case 5:return[v,p,q]}};convert.hsv.hsl=function(hsv){var h=hsv[0];var s=hsv[1]/100;var v=hsv[2]/100;var vmin=Math.max(v,.01);var lmin;var sl;var l;l=(2-s)*v;lmin=(2-s)*vmin;sl=s*vmin;sl/=lmin<=1?lmin:2-lmin;sl=sl||0;l/=2;return[h,sl*100,l*100]};convert.hwb.rgb=function(hwb){var h=hwb[0]/360;var wh=hwb[1]/100;var bl=hwb[2]/100;var ratio=wh+bl;var i;var v;var f;var n;if(ratio>1){wh/=ratio;bl/=ratio}i=Math.floor(6*h);v=1-bl;f=6*h-i;if((i&1)!==0){f=1-f}n=wh+f*(v-wh);var r;var g;var b;switch(i){default:case 6:case 0:r=v;g=n;b=wh;break;case 1:r=n;g=v;b=wh;break;case 2:r=wh;g=v;b=n;break;case 3:r=wh;g=n;b=v;break;case 4:r=n;g=wh;b=v;break;case 5:r=v;g=wh;b=n;break}return[r*255,g*255,b*255]};convert.cmyk.rgb=function(cmyk){var c=cmyk[0]/100;var m=cmyk[1]/100;var y=cmyk[2]/100;var k=cmyk[3]/100;var r;var g;var b;r=1-Math.min(1,c*(1-k)+k);g=1-Math.min(1,m*(1-k)+k);b=1-Math.min(1,y*(1-k)+k);return[r*255,g*255,b*255]};convert.xyz.rgb=function(xyz){var x=xyz[0]/100;var y=xyz[1]/100;var z=xyz[2]/100;var r;var g;var b;r=x*3.2406+y*-1.5372+z*-.4986;g=x*-.9689+y*1.8758+z*.0415;b=x*.0557+y*-.204+z*1.057;r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*12.92;g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:g*12.92;b=b>.0031308?1.055*Math.pow(b,1/2.4)-.055:b*12.92;r=Math.min(Math.max(0,r),1);g=Math.min(Math.max(0,g),1);b=Math.min(Math.max(0,b),1);return[r*255,g*255,b*255]};convert.xyz.lab=function(xyz){var x=xyz[0];var y=xyz[1];var z=xyz[2];var l;var a;var b;x/=95.047;y/=100;z/=108.883;x=x>.008856?Math.pow(x,1/3):7.787*x+16/116;y=y>.008856?Math.pow(y,1/3):7.787*y+16/116;z=z>.008856?Math.pow(z,1/3):7.787*z+16/116;l=116*y-16;a=500*(x-y);b=200*(y-z);return[l,a,b]};convert.lab.xyz=function(lab){var l=lab[0];var a=lab[1];var b=lab[2];var x;var y;var z;y=(l+16)/116;x=a/500+y;z=y-b/200;var y2=Math.pow(y,3);var x2=Math.pow(x,3);var z2=Math.pow(z,3);y=y2>.008856?y2:(y-16/116)/7.787;x=x2>.008856?x2:(x-16/116)/7.787;z=z2>.008856?z2:(z-16/116)/7.787;x*=95.047;y*=100;z*=108.883;return[x,y,z]};convert.lab.lch=function(lab){var l=lab[0];var a=lab[1];var b=lab[2];var hr;var h;var c;hr=Math.atan2(b,a);h=hr*360/2/Math.PI;if(h<0){h+=360}c=Math.sqrt(a*a+b*b);return[l,c,h]};convert.lch.lab=function(lch){var l=lch[0];var c=lch[1];var h=lch[2];var a;var b;var hr;hr=h/360*2*Math.PI;a=c*Math.cos(hr);b=c*Math.sin(hr);return[l,a,b]};convert.rgb.ansi16=function(args){var r=args[0];var g=args[1];var b=args[2];var value=1 in arguments?arguments[1]:convert.rgb.hsv(args)[2];value=Math.round(value/50);if(value===0){return 30}var ansi=30+(Math.round(b/255)<<2|Math.round(g/255)<<1|Math.round(r/255));if(value===2){ansi+=60}return ansi};convert.hsv.ansi16=function(args){return convert.rgb.ansi16(convert.hsv.rgb(args),args[2])};convert.rgb.ansi256=function(args){var r=args[0];var g=args[1];var b=args[2];if(r===g&&g===b){if(r<8){return 16}if(r>248){return 231}return Math.round((r-8)/247*24)+232}var ansi=16+36*Math.round(r/255*5)+6*Math.round(g/255*5)+Math.round(b/255*5);return ansi};convert.ansi16.rgb=function(args){var color=args%10;if(color===0||color===7){if(args>50){color+=3.5}color=color/10.5*255;return[color,color,color]}var mult=(~~(args>50)+1)*.5;var r=(color&1)*mult*255;var g=(color>>1&1)*mult*255;var b=(color>>2&1)*mult*255;return[r,g,b]};convert.ansi256.rgb=function(args){if(args>=232){var c=(args-232)*10+8;return[c,c,c]}args-=16;var rem;var r=Math.floor(args/36)/5*255;var g=Math.floor((rem=args%36)/6)/5*255;var b=rem%6/5*255;return[r,g,b]};convert.rgb.hex=function(args){var integer=((Math.round(args[0])&255)<<16)+((Math.round(args[1])&255)<<8)+(Math.round(args[2])&255);var string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert.hex.rgb=function(args){var match=args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!match){return[0,0,0]}var colorString=match[0];if(match[0].length===3){colorString=colorString.split("").map((function(char){return char+char})).join("")}var integer=parseInt(colorString,16);var r=integer>>16&255;var g=integer>>8&255;var b=integer&255;return[r,g,b]};convert.rgb.hcg=function(rgb){var r=rgb[0]/255;var g=rgb[1]/255;var b=rgb[2]/255;var max=Math.max(Math.max(r,g),b);var min=Math.min(Math.min(r,g),b);var chroma=max-min;var grayscale;var hue;if(chroma<1){grayscale=min/(1-chroma)}else{grayscale=0}if(chroma<=0){hue=0}else if(max===r){hue=(g-b)/chroma%6}else if(max===g){hue=2+(b-r)/chroma}else{hue=4+(r-g)/chroma+4}hue/=6;hue%=1;return[hue*360,chroma*100,grayscale*100]};convert.hsl.hcg=function(hsl){var s=hsl[1]/100;var l=hsl[2]/100;var c=1;var f=0;if(l<.5){c=2*s*l}else{c=2*s*(1-l)}if(c<1){f=(l-.5*c)/(1-c)}return[hsl[0],c*100,f*100]};convert.hsv.hcg=function(hsv){var s=hsv[1]/100;var v=hsv[2]/100;var c=s*v;var f=0;if(c<1){f=(v-c)/(1-c)}return[hsv[0],c*100,f*100]};convert.hcg.rgb=function(hcg){var h=hcg[0]/360;var c=hcg[1]/100;var g=hcg[2]/100;if(c===0){return[g*255,g*255,g*255]}var pure=[0,0,0];var hi=h%1*6;var v=hi%1;var w=1-v;var mg=0;switch(Math.floor(hi)){case 0:pure[0]=1;pure[1]=v;pure[2]=0;break;case 1:pure[0]=w;pure[1]=1;pure[2]=0;break;case 2:pure[0]=0;pure[1]=1;pure[2]=v;break;case 3:pure[0]=0;pure[1]=w;pure[2]=1;break;case 4:pure[0]=v;pure[1]=0;pure[2]=1;break;default:pure[0]=1;pure[1]=0;pure[2]=w}mg=(1-c)*g;return[(c*pure[0]+mg)*255,(c*pure[1]+mg)*255,(c*pure[2]+mg)*255]};convert.hcg.hsv=function(hcg){var c=hcg[1]/100;var g=hcg[2]/100;var v=c+g*(1-c);var f=0;if(v>0){f=c/v}return[hcg[0],f*100,v*100]};convert.hcg.hsl=function(hcg){var c=hcg[1]/100;var g=hcg[2]/100;var l=g*(1-c)+.5*c;var s=0;if(l>0&&l<.5){s=c/(2*l)}else if(l>=.5&&l<1){s=c/(2*(1-l))}return[hcg[0],s*100,l*100]};convert.hcg.hwb=function(hcg){var c=hcg[1]/100;var g=hcg[2]/100;var v=c+g*(1-c);return[hcg[0],(v-c)*100,(1-v)*100]};convert.hwb.hcg=function(hwb){var w=hwb[1]/100;var b=hwb[2]/100;var v=1-b;var c=v-w;var g=0;if(c<1){g=(v-c)/(1-c)}return[hwb[0],c*100,g*100]};convert.apple.rgb=function(apple){return[apple[0]/65535*255,apple[1]/65535*255,apple[2]/65535*255]};convert.rgb.apple=function(rgb){return[rgb[0]/255*65535,rgb[1]/255*65535,rgb[2]/255*65535]};convert.gray.rgb=function(args){return[args[0]/100*255,args[0]/100*255,args[0]/100*255]};convert.gray.hsl=convert.gray.hsv=function(args){return[0,0,args[0]]};convert.gray.hwb=function(gray){return[0,100,gray[0]]};convert.gray.cmyk=function(gray){return[0,0,0,gray[0]]};convert.gray.lab=function(gray){return[gray[0],0,0]};convert.gray.hex=function(gray){var val=Math.round(gray[0]/100*255)&255;var integer=(val<<16)+(val<<8)+val;var string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert.rgb.gray=function(rgb){var val=(rgb[0]+rgb[1]+rgb[2])/3;return[val/255*100]};return conversions$1.exports}var route$1;var hasRequiredRoute$1;function requireRoute$1(){if(hasRequiredRoute$1)return route$1;hasRequiredRoute$1=1;var conversions=requireConversions$1();function buildGraph(){var graph={};var models=Object.keys(conversions);for(var len=models.length,i=0;i<len;i++){graph[models[i]]={distance:-1,parent:null}}return graph}function deriveBFS(fromModel){var graph=buildGraph();var queue=[fromModel];graph[fromModel].distance=0;while(queue.length){var current=queue.pop();var adjacents=Object.keys(conversions[current]);for(var len=adjacents.length,i=0;i<len;i++){var adjacent=adjacents[i];var node=graph[adjacent];if(node.distance===-1){node.distance=graph[current].distance+1;node.parent=current;queue.unshift(adjacent)}}}return graph}function link(from,to){return function(args){return to(from(args))}}function wrapConversion(toModel,graph){var path=[graph[toModel].parent,toModel];var fn=conversions[graph[toModel].parent][toModel];var cur=graph[toModel].parent;while(graph[cur].parent){path.unshift(graph[cur].parent);fn=link(conversions[graph[cur].parent][cur],fn);cur=graph[cur].parent}fn.conversion=path;return fn}route$1=function(fromModel){var graph=deriveBFS(fromModel);var conversion={};var models=Object.keys(graph);for(var len=models.length,i=0;i<len;i++){var toModel=models[i];var node=graph[toModel];if(node.parent===null){continue}conversion[toModel]=wrapConversion(toModel,graph)}return conversion};return route$1}var colorConvert$1;var hasRequiredColorConvert$1;function requireColorConvert$1(){if(hasRequiredColorConvert$1)return colorConvert$1;hasRequiredColorConvert$1=1;var conversions=requireConversions$1();var route=requireRoute$1();var convert={};var models=Object.keys(conversions);function wrapRaw(fn){var wrappedFn=function(args){if(args===undefined||args===null){return args}if(arguments.length>1){args=Array.prototype.slice.call(arguments)}return fn(args)};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}function wrapRounded(fn){var wrappedFn=function(args){if(args===undefined||args===null){return args}if(arguments.length>1){args=Array.prototype.slice.call(arguments)}var result=fn(args);if(typeof result==="object"){for(var len=result.length,i=0;i<len;i++){result[i]=Math.round(result[i])}}return result};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}models.forEach((function(fromModel){convert[fromModel]={};Object.defineProperty(convert[fromModel],"channels",{value:conversions[fromModel].channels});Object.defineProperty(convert[fromModel],"labels",{value:conversions[fromModel].labels});var routes=route(fromModel);var routeModels=Object.keys(routes);routeModels.forEach((function(toModel){var fn=routes[toModel];convert[fromModel][toModel]=wrapRounded(fn);convert[fromModel][toModel].raw=wrapRaw(fn)}))}));colorConvert$1=convert;return colorConvert$1}ansiStyles$1.exports;var hasRequiredAnsiStyles$1;function requireAnsiStyles$1(){if(hasRequiredAnsiStyles$1)return ansiStyles$1.exports;hasRequiredAnsiStyles$1=1;(function(module){const colorConvert=requireColorConvert$1();const wrapAnsi16=(fn,offset)=>function(){const code=fn.apply(colorConvert,arguments);return`\x1b[${code+offset}m`};const wrapAnsi256=(fn,offset)=>function(){const code=fn.apply(colorConvert,arguments);return`\x1b[${38+offset};5;${code}m`};const wrapAnsi16m=(fn,offset)=>function(){const rgb=fn.apply(colorConvert,arguments);return`\x1b[${38+offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`};function assembleStyles(){const codes=new Map;const styles={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};styles.color.grey=styles.color.gray;for(const groupName of Object.keys(styles)){const group=styles[groupName];for(const styleName of Object.keys(group)){const style=group[styleName];styles[styleName]={open:`\x1b[${style[0]}m`,close:`\x1b[${style[1]}m`};group[styleName]=styles[styleName];codes.set(style[0],style[1])}Object.defineProperty(styles,groupName,{value:group,enumerable:false});Object.defineProperty(styles,"codes",{value:codes,enumerable:false})}const ansi2ansi=n=>n;const rgb2rgb=(r,g,b)=>[r,g,b];styles.color.close="\x1b[39m";styles.bgColor.close="\x1b[49m";styles.color.ansi={ansi:wrapAnsi16(ansi2ansi,0)};styles.color.ansi256={ansi256:wrapAnsi256(ansi2ansi,0)};styles.color.ansi16m={rgb:wrapAnsi16m(rgb2rgb,0)};styles.bgColor.ansi={ansi:wrapAnsi16(ansi2ansi,10)};styles.bgColor.ansi256={ansi256:wrapAnsi256(ansi2ansi,10)};styles.bgColor.ansi16m={rgb:wrapAnsi16m(rgb2rgb,10)};for(let key of Object.keys(colorConvert)){if(typeof colorConvert[key]!=="object"){continue}const suite=colorConvert[key];if(key==="ansi16"){key="ansi"}if("ansi16"in suite){styles.color.ansi[key]=wrapAnsi16(suite.ansi16,0);styles.bgColor.ansi[key]=wrapAnsi16(suite.ansi16,10)}if("ansi256"in suite){styles.color.ansi256[key]=wrapAnsi256(suite.ansi256,0);styles.bgColor.ansi256[key]=wrapAnsi256(suite.ansi256,10)}if("rgb"in suite){styles.color.ansi16m[key]=wrapAnsi16m(suite.rgb,0);styles.bgColor.ansi16m[key]=wrapAnsi16m(suite.rgb,10)}}return styles}Object.defineProperty(module,"exports",{enumerable:true,get:assembleStyles})})(ansiStyles$1);return ansiStyles$1.exports}var hasFlag$1;var hasRequiredHasFlag$1;function requireHasFlag$1(){if(hasRequiredHasFlag$1)return hasFlag$1;hasRequiredHasFlag$1=1;hasFlag$1=(flag,argv)=>{argv=argv||process.argv;const prefix=flag.startsWith("-")?"":flag.length===1?"-":"--";const pos=argv.indexOf(prefix+flag);const terminatorPos=argv.indexOf("--");return pos!==-1&&(terminatorPos===-1?true:pos<terminatorPos)};return hasFlag$1}var supportsColor_1$1;var hasRequiredSupportsColor$1;function requireSupportsColor$1(){if(hasRequiredSupportsColor$1)return supportsColor_1$1;hasRequiredSupportsColor$1=1;const os=require$$0$5;const hasFlag=requireHasFlag$1();const env=process.env;let forceColor;if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")){forceColor=false}else if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){forceColor=true}if("FORCE_COLOR"in env){forceColor=env.FORCE_COLOR.length===0||parseInt(env.FORCE_COLOR,10)!==0}function translateLevel(level){if(level===0){return false}return{level:level,hasBasic:true,has256:level>=2,has16m:level>=3}}function supportsColor(stream){if(forceColor===false){return 0}if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor")){return 3}if(hasFlag("color=256")){return 2}if(stream&&!stream.isTTY&&forceColor!==true){return 0}const min=forceColor?1:0;if(process.platform==="win32"){const osRelease=os.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(osRelease[0])>=10&&Number(osRelease[2])>=10586){return Number(osRelease[2])>=14931?3:2}return 1}if("CI"in env){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((sign=>sign in env))||env.CI_NAME==="codeship"){return 1}return min}if("TEAMCITY_VERSION"in env){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION)?1:0}if(env.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in env){const version=parseInt((env.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env.TERM_PROGRAM){case"iTerm.app":return version>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(env.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)){return 1}if("COLORTERM"in env){return 1}if(env.TERM==="dumb"){return min}return min}function getSupportLevel(stream){const level=supportsColor(stream);return translateLevel(level)}supportsColor_1$1={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)};return supportsColor_1$1}var templates$1;var hasRequiredTemplates$1;function requireTemplates$1(){if(hasRequiredTemplates$1)return templates$1;hasRequiredTemplates$1=1;const TEMPLATE_REGEX=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const STYLE_REGEX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const STRING_REGEX=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const ESCAPE_REGEX=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;const ESCAPES=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1b"],["a","\x07"]]);function unescape(c){if(c[0]==="u"&&c.length===5||c[0]==="x"&&c.length===3){return String.fromCharCode(parseInt(c.slice(1),16))}return ESCAPES.get(c)||c}function parseArguments(name,args){const results=[];const chunks=args.trim().split(/\s*,\s*/g);let matches;for(const chunk of chunks){if(!isNaN(chunk)){results.push(Number(chunk))}else if(matches=chunk.match(STRING_REGEX)){results.push(matches[2].replace(ESCAPE_REGEX,((m,escape,chr)=>escape?unescape(escape):chr)))}else{throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`)}}return results}function parseStyle(style){STYLE_REGEX.lastIndex=0;const results=[];let matches;while((matches=STYLE_REGEX.exec(style))!==null){const name=matches[1];if(matches[2]){const args=parseArguments(name,matches[2]);results.push([name].concat(args))}else{results.push([name])}}return results}function buildStyle(chalk,styles){const enabled={};for(const layer of styles){for(const style of layer.styles){enabled[style[0]]=layer.inverse?null:style.slice(1)}}let current=chalk;for(const styleName of Object.keys(enabled)){if(Array.isArray(enabled[styleName])){if(!(styleName in current)){throw new Error(`Unknown Chalk style: ${styleName}`)}if(enabled[styleName].length>0){current=current[styleName].apply(current,enabled[styleName])}else{current=current[styleName]}}}return current}templates$1=(chalk,tmp)=>{const styles=[];const chunks=[];let chunk=[];tmp.replace(TEMPLATE_REGEX,((m,escapeChar,inverse,style,close,chr)=>{if(escapeChar){chunk.push(unescape(escapeChar))}else if(style){const str=chunk.join("");chunk=[];chunks.push(styles.length===0?str:buildStyle(chalk,styles)(str));styles.push({inverse:inverse,styles:parseStyle(style)})}else if(close){if(styles.length===0){throw new Error("Found extraneous } in Chalk template literal")}chunks.push(buildStyle(chalk,styles)(chunk.join("")));chunk=[];styles.pop()}else{chunk.push(chr)}}));chunks.push(chunk.join(""));if(styles.length>0){const errMsg=`Chalk template literal is missing ${styles.length} closing bracket${styles.length===1?"":"s"} (\`}\`)`;throw new Error(errMsg)}return chunks.join("")};return templates$1}var hasRequiredChalk;function requireChalk(){if(hasRequiredChalk)return chalk.exports;hasRequiredChalk=1;(function(module){const escapeStringRegexp=requireEscapeStringRegexp();const ansiStyles=requireAnsiStyles$1();const stdoutColor=requireSupportsColor$1().stdout;const template=requireTemplates$1();const isSimpleWindowsTerm=process.platform==="win32"&&!(process.env.TERM||"").toLowerCase().startsWith("xterm");const levelMapping=["ansi","ansi","ansi256","ansi16m"];const skipModels=new Set(["gray"]);const styles=Object.create(null);function applyOptions(obj,options){options=options||{};const scLevel=stdoutColor?stdoutColor.level:0;obj.level=options.level===undefined?scLevel:options.level;obj.enabled="enabled"in options?options.enabled:obj.level>0}function Chalk(options){if(!this||!(this instanceof Chalk)||this.template){const chalk={};applyOptions(chalk,options);chalk.template=function(){const args=[].slice.call(arguments);return chalkTag.apply(null,[chalk.template].concat(args))};Object.setPrototypeOf(chalk,Chalk.prototype);Object.setPrototypeOf(chalk.template,chalk);chalk.template.constructor=Chalk;return chalk.template}applyOptions(this,options)}if(isSimpleWindowsTerm){ansiStyles.blue.open="\x1b[94m"}for(const key of Object.keys(ansiStyles)){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");styles[key]={get(){const codes=ansiStyles[key];return build.call(this,this._styles?this._styles.concat(codes):[codes],this._empty,key)}}}styles.visible={get(){return build.call(this,this._styles||[],true,"visible")}};ansiStyles.color.closeRe=new RegExp(escapeStringRegexp(ansiStyles.color.close),"g");for(const model of Object.keys(ansiStyles.color.ansi)){if(skipModels.has(model)){continue}styles[model]={get(){const level=this.level;return function(){const open=ansiStyles.color[levelMapping[level]][model].apply(null,arguments);const codes={open:open,close:ansiStyles.color.close,closeRe:ansiStyles.color.closeRe};return build.call(this,this._styles?this._styles.concat(codes):[codes],this._empty,model)}}}}ansiStyles.bgColor.closeRe=new RegExp(escapeStringRegexp(ansiStyles.bgColor.close),"g");for(const model of Object.keys(ansiStyles.bgColor.ansi)){if(skipModels.has(model)){continue}const bgModel="bg"+model[0].toUpperCase()+model.slice(1);styles[bgModel]={get(){const level=this.level;return function(){const open=ansiStyles.bgColor[levelMapping[level]][model].apply(null,arguments);const codes={open:open,close:ansiStyles.bgColor.close,closeRe:ansiStyles.bgColor.closeRe};return build.call(this,this._styles?this._styles.concat(codes):[codes],this._empty,model)}}}}const proto=Object.defineProperties((()=>{}),styles);function build(_styles,_empty,key){const builder=function(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder._empty=_empty;const self=this;Object.defineProperty(builder,"level",{enumerable:true,get(){return self.level},set(level){self.level=level}});Object.defineProperty(builder,"enabled",{enumerable:true,get(){return self.enabled},set(enabled){self.enabled=enabled}});builder.hasGrey=this.hasGrey||key==="gray"||key==="grey";builder.__proto__=proto;return builder}function applyStyle(){const args=arguments;const argsLen=args.length;let str=String(arguments[0]);if(argsLen===0){return""}if(argsLen>1){for(let a=1;a<argsLen;a++){str+=" "+args[a]}}if(!this.enabled||this.level<=0||!str){return this._empty?"":str}const originalDim=ansiStyles.dim.open;if(isSimpleWindowsTerm&&this.hasGrey){ansiStyles.dim.open=""}for(const code of this._styles.slice().reverse()){str=code.open+str.replace(code.closeRe,code.open)+code.close;str=str.replace(/\r?\n/g,`${code.close}$&${code.open}`)}ansiStyles.dim.open=originalDim;return str}function chalkTag(chalk,strings){if(!Array.isArray(strings)){return[].slice.call(arguments,1).join(" ")}const args=[].slice.call(arguments,2);const parts=[strings.raw[0]];for(let i=1;i<strings.length;i++){parts.push(String(args[i-1]).replace(/[{}\\]/g,"\\$&"));parts.push(String(strings.raw[i]))}return template(chalk,parts.join(""))}Object.defineProperties(Chalk.prototype,styles);module.exports=Chalk();module.exports.supportsColor=stdoutColor;module.exports.default=module.exports})(chalk);return chalk.exports}var hasRequiredLib$k;function requireLib$k(){if(hasRequiredLib$k)return lib$k;hasRequiredLib$k=1;Object.defineProperty(lib$k,"__esModule",{value:true});lib$k.default=highlight;lib$k.getChalk=getChalk;lib$k.shouldHighlight=shouldHighlight;var _jsTokens=requireJsTokens();var _helperValidatorIdentifier=requireLib$l();var _chalk=requireChalk();const sometimesKeywords=new Set(["as","async","from","get","of","set"]);function getDefs(chalk){return{keyword:chalk.cyan,capitalized:chalk.yellow,jsxIdentifier:chalk.yellow,punctuator:chalk.yellow,number:chalk.magenta,string:chalk.green,regex:chalk.magenta,comment:chalk.grey,invalid:chalk.white.bgRed.bold}}const NEWLINE=/\r\n|[\n\r\u2028\u2029]/;const BRACKET=/^[()[\]{}]$/;let tokenize;{const JSX_TAG=/^[a-z][\w-]*$/i;const getTokenType=function(token,offset,text){if(token.type==="name"){if((0,_helperValidatorIdentifier.isKeyword)(token.value)||(0,_helperValidatorIdentifier.isStrictReservedWord)(token.value,true)||sometimesKeywords.has(token.value)){return"keyword"}if(JSX_TAG.test(token.value)&&(text[offset-1]==="<"||text.slice(offset-2,offset)=="</")){return"jsxIdentifier"}if(token.value[0]!==token.value[0].toLowerCase()){return"capitalized"}}if(token.type==="punctuator"&&BRACKET.test(token.value)){return"bracket"}if(token.type==="invalid"&&(token.value==="@"||token.value==="#")){return"punctuator"}return token.type};tokenize=function*(text){let match;while(match=_jsTokens.default.exec(text)){const token=_jsTokens.matchToToken(match);yield{type:getTokenType(token,match.index,text),value:token.value}}}}function highlightTokens(defs,text){let highlighted="";for(const{type:type,value:value}of tokenize(text)){const colorize=defs[type];if(colorize){highlighted+=value.split(NEWLINE).map((str=>colorize(str))).join("\n")}else{highlighted+=value}}return highlighted}function shouldHighlight(options){return!!_chalk.supportsColor||options.forceColor}function getChalk(options){return options.forceColor?new _chalk.constructor({enabled:true,level:1}):_chalk}function highlight(code,options={}){if(code!==""&&shouldHighlight(options)){const chalk=getChalk(options);const defs=getDefs(chalk);return highlightTokens(defs,code)}else{return code}}return lib$k}var hasRequiredLib$j;function requireLib$j(){if(hasRequiredLib$j)return lib$l;hasRequiredLib$j=1;Object.defineProperty(lib$l,"__esModule",{value:true});lib$l.codeFrameColumns=codeFrameColumns;lib$l.default=_default;var _highlight=requireLib$k();let deprecationWarningShown=false;function getDefs(chalk){return{gutter:chalk.grey,marker:chalk.red.bold,message:chalk.red.bold}}const NEWLINE=/\r\n|[\n\r\u2028\u2029]/;function getMarkerLines(loc,source,opts){const startLoc=Object.assign({column:0,line:-1},loc.start);const endLoc=Object.assign({},startLoc,loc.end);const{linesAbove:linesAbove=2,linesBelow:linesBelow=3}=opts||{};const startLine=startLoc.line;const startColumn=startLoc.column;const endLine=endLoc.line;const endColumn=endLoc.column;let start=Math.max(startLine-(linesAbove+1),0);let end=Math.min(source.length,endLine+linesBelow);if(startLine===-1){start=0}if(endLine===-1){end=source.length}const lineDiff=endLine-startLine;const markerLines={};if(lineDiff){for(let i=0;i<=lineDiff;i++){const lineNumber=i+startLine;if(!startColumn){markerLines[lineNumber]=true}else if(i===0){const sourceLength=source[lineNumber-1].length;markerLines[lineNumber]=[startColumn,sourceLength-startColumn+1]}else if(i===lineDiff){markerLines[lineNumber]=[0,endColumn]}else{const sourceLength=source[lineNumber-i].length;markerLines[lineNumber]=[0,sourceLength]}}}else{if(startColumn===endColumn){if(startColumn){markerLines[startLine]=[startColumn,0]}else{markerLines[startLine]=true}}else{markerLines[startLine]=[startColumn,endColumn-startColumn]}}return{start:start,end:end,markerLines:markerLines}}function codeFrameColumns(rawLines,loc,opts={}){const highlighted=(opts.highlightCode||opts.forceColor)&&(0,_highlight.shouldHighlight)(opts);const chalk=(0,_highlight.getChalk)(opts);const defs=getDefs(chalk);const maybeHighlight=(chalkFn,string)=>highlighted?chalkFn(string):string;const lines=rawLines.split(NEWLINE);const{start:start,end:end,markerLines:markerLines}=getMarkerLines(loc,lines,opts);const hasColumns=loc.start&&typeof loc.start.column==="number";const numberMaxWidth=String(end).length;const highlightedLines=highlighted?(0,_highlight.default)(rawLines,opts):rawLines;let frame=highlightedLines.split(NEWLINE,end).slice(start,end).map(((line,index)=>{const number=start+1+index;const paddedNumber=` ${number}`.slice(-numberMaxWidth);const gutter=` ${paddedNumber} |`;const hasMarker=markerLines[number];const lastMarkerLine=!markerLines[number+1];if(hasMarker){let markerLine="";if(Array.isArray(hasMarker)){const markerSpacing=line.slice(0,Math.max(hasMarker[0]-1,0)).replace(/[^\t]/g," ");const numberOfMarkers=hasMarker[1]||1;markerLine=["\n ",maybeHighlight(defs.gutter,gutter.replace(/\d/g," "))," ",markerSpacing,maybeHighlight(defs.marker,"^").repeat(numberOfMarkers)].join("");if(lastMarkerLine&&opts.message){markerLine+=" "+maybeHighlight(defs.message,opts.message)}}return[maybeHighlight(defs.marker,">"),maybeHighlight(defs.gutter,gutter),line.length>0?` ${line}`:"",markerLine].join("")}else{return` ${maybeHighlight(defs.gutter,gutter)}${line.length>0?` ${line}`:""}`}})).join("\n");if(opts.message&&!hasColumns){frame=`${" ".repeat(numberMaxWidth+1)}${opts.message}\n${frame}`}if(highlighted){return chalk.reset(frame)}else{return frame}}function _default(rawLines,lineNumber,colNumber,opts={}){if(!deprecationWarningShown){deprecationWarningShown=true;const message="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";if(process.emitWarning){process.emitWarning(message,"DeprecationWarning")}else{const deprecationError=new Error(message);deprecationError.name="DeprecationWarning";console.warn(new Error(message))}}colNumber=Math.max(colNumber,0);const location={start:{column:colNumber,line:lineNumber}};return codeFrameColumns(rawLines,location,opts)}return lib$l}var parseJson_1;var hasRequiredParseJson;function requireParseJson(){if(hasRequiredParseJson)return parseJson_1;hasRequiredParseJson=1;const errorEx=requireErrorEx();const fallback=requireJsonParseEvenBetterErrors();const{default:LinesAndColumns}=requireBuild();const{codeFrameColumns:codeFrameColumns}=requireLib$j();const JSONError=errorEx("JSONError",{fileName:errorEx.append("in %s"),codeFrame:errorEx.append("\n\n%s\n")});const parseJson=(string,reviver,filename)=>{if(typeof reviver==="string"){filename=reviver;reviver=null}try{try{return JSON.parse(string,reviver)}catch(error){fallback(string,reviver);throw error}}catch(error){error.message=error.message.replace(/\n/g,"");const indexMatch=error.message.match(/in JSON at position (\d+) while parsing/);const jsonError=new JSONError(error);if(filename){jsonError.fileName=filename}if(indexMatch&&indexMatch.length>0){const lines=new LinesAndColumns(string);const index=Number(indexMatch[1]);const location=lines.locationForIndex(index);const codeFrame=codeFrameColumns(string,{start:{line:location.line+1,column:location.column+1}},{highlightCode:true});jsonError.codeFrame=codeFrame}throw jsonError}};parseJson.JSONError=JSONError;parseJson_1=parseJson;return parseJson_1}var hasRequiredLoadJsonFile;function requireLoadJsonFile(){if(hasRequiredLoadJsonFile)return loadJsonFile.exports;hasRequiredLoadJsonFile=1;const path=require$$0$6;const{promisify:promisify}=require$$0$1;const fs=requireGracefulFs();const stripBom=requireStripBom();const parseJson=requireParseJson();const parse=(data,filePath,options={})=>{data=stripBom(data);if(typeof options.beforeParse==="function"){data=options.beforeParse(data)}return parseJson(data,options.reviver,path.relative(process.cwd(),filePath))};loadJsonFile.exports=async(filePath,options)=>parse(await promisify(fs.readFile)(filePath,"utf8"),filePath,options);loadJsonFile.exports.sync=(filePath,options)=>parse(fs.readFileSync(filePath,"utf8"),filePath,options);return loadJsonFile.exports}var constants$5;var hasRequiredConstants$4;function requireConstants$4(){if(hasRequiredConstants$4)return constants$5;hasRequiredConstants$4=1;const SEMVER_SPEC_VERSION="2.0.0";const MAX_LENGTH=256;const MAX_SAFE_INTEGER=Number.MAX_SAFE_INTEGER||9007199254740991;const MAX_SAFE_COMPONENT_LENGTH=16;constants$5={SEMVER_SPEC_VERSION:SEMVER_SPEC_VERSION,MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MAX_SAFE_COMPONENT_LENGTH:MAX_SAFE_COMPONENT_LENGTH};return constants$5}var re={exports:{}};var debug_1;var hasRequiredDebug;function requireDebug(){if(hasRequiredDebug)return debug_1;hasRequiredDebug=1;const debug=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...args)=>console.error("SEMVER",...args):()=>{};debug_1=debug;return debug_1}var hasRequiredRe;function requireRe(){if(hasRequiredRe)return re.exports;hasRequiredRe=1;(function(module,exports){const{MAX_SAFE_COMPONENT_LENGTH:MAX_SAFE_COMPONENT_LENGTH}=requireConstants$4();const debug=requireDebug();exports=module.exports={};const re=exports.re=[];const src=exports.src=[];const t=exports.t={};let R=0;const createToken=(name,value,isGlobal)=>{const index=R++;debug(name,index,value);t[name]=index;src[index]=value;re[index]=new RegExp(value,isGlobal?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","[0-9]+");createToken("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");createToken("MAINVERSION",`(${src[t.NUMERICIDENTIFIER]})\\.`+`(${src[t.NUMERICIDENTIFIER]})\\.`+`(${src[t.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.`+`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.`+`(${src[t.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER","[0-9A-Za-z-]+");createToken("BUILD",`(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);createToken("FULL",`^${src[t.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);createToken("LOOSE",`^${src[t.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${src[t.XRANGEIDENTIFIER]})`+`(?:\\.(${src[t.XRANGEIDENTIFIER]})`+`(?:\\.(${src[t.XRANGEIDENTIFIER]})`+`(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})`+`(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})`+`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`+`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",src[t.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${src[t.LONETILDE]}\\s+`,true);exports.tildeTrimReplace="$1~";createToken("TILDE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${src[t.LONECARET]}\\s+`,true);exports.caretTrimReplace="$1^";createToken("CARET",`^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`,true);exports.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${src[t.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${src[t.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${src[t.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${src[t.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(re,re.exports);return re.exports}var parseOptions_1;var hasRequiredParseOptions;function requireParseOptions(){if(hasRequiredParseOptions)return parseOptions_1;hasRequiredParseOptions=1;const opts=["includePrerelease","loose","rtl"];const parseOptions=options=>!options?{}:typeof options!=="object"?{loose:true}:opts.filter((k=>options[k])).reduce(((o,k)=>{o[k]=true;return o}),{});parseOptions_1=parseOptions;return parseOptions_1}var identifiers;var hasRequiredIdentifiers;function requireIdentifiers(){if(hasRequiredIdentifiers)return identifiers;hasRequiredIdentifiers=1;const numeric=/^[0-9]+$/;const compareIdentifiers=(a,b)=>{const anum=numeric.test(a);const bnum=numeric.test(b);if(anum&&bnum){a=+a;b=+b}return a===b?0:anum&&!bnum?-1:bnum&&!anum?1:a<b?-1:1};const rcompareIdentifiers=(a,b)=>compareIdentifiers(b,a);identifiers={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers};return identifiers}var semver;var hasRequiredSemver;function requireSemver(){if(hasRequiredSemver)return semver;hasRequiredSemver=1;const debug=requireDebug();const{MAX_LENGTH:MAX_LENGTH,MAX_SAFE_INTEGER:MAX_SAFE_INTEGER}=requireConstants$4();const{re:re,t:t}=requireRe();const parseOptions=requireParseOptions();const{compareIdentifiers:compareIdentifiers}=requireIdentifiers();class SemVer{constructor(version,options){options=parseOptions(options);if(version instanceof SemVer){if(version.loose===!!options.loose&&version.includePrerelease===!!options.includePrerelease){return version}else{version=version.version}}else if(typeof version!=="string"){throw new TypeError(`Invalid Version: ${version}`)}if(version.length>MAX_LENGTH){throw new TypeError(`version is longer than ${MAX_LENGTH} characters`)}debug("SemVer",version,options);this.options=options;this.loose=!!options.loose;this.includePrerelease=!!options.includePrerelease;const m=version.trim().match(options.loose?re[t.LOOSE]:re[t.FULL]);if(!m){throw new TypeError(`Invalid Version: ${version}`)}this.raw=version;this.major=+m[1];this.minor=+m[2];this.patch=+m[3];if(this.major>MAX_SAFE_INTEGER||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>MAX_SAFE_INTEGER||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>MAX_SAFE_INTEGER||this.patch<0){throw new TypeError("Invalid patch version")}if(!m[4]){this.prerelease=[]}else{this.prerelease=m[4].split(".").map((id=>{if(/^[0-9]+$/.test(id)){const num=+id;if(num>=0&&num<MAX_SAFE_INTEGER){return num}}return id}))}this.build=m[5]?m[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(other){debug("SemVer.compare",this.version,this.options,other);if(!(other instanceof SemVer)){if(typeof other==="string"&&other===this.version){return 0}other=new SemVer(other,this.options)}if(other.version===this.version){return 0}return this.compareMain(other)||this.comparePre(other)}compareMain(other){if(!(other instanceof SemVer)){other=new SemVer(other,this.options)}return compareIdentifiers(this.major,other.major)||compareIdentifiers(this.minor,other.minor)||compareIdentifiers(this.patch,other.patch)}comparePre(other){if(!(other instanceof SemVer)){other=new SemVer(other,this.options)}if(this.prerelease.length&&!other.prerelease.length){return-1}else if(!this.prerelease.length&&other.prerelease.length){return 1}else if(!this.prerelease.length&&!other.prerelease.length){return 0}let i=0;do{const a=this.prerelease[i];const b=other.prerelease[i];debug("prerelease compare",i,a,b);if(a===undefined&&b===undefined){return 0}else if(b===undefined){return 1}else if(a===undefined){return-1}else if(a===b){continue}else{return compareIdentifiers(a,b)}}while(++i)}compareBuild(other){if(!(other instanceof SemVer)){other=new SemVer(other,this.options)}let i=0;do{const a=this.build[i];const b=other.build[i];debug("prerelease compare",i,a,b);if(a===undefined&&b===undefined){return 0}else if(b===undefined){return 1}else if(a===undefined){return-1}else if(a===b){continue}else{return compareIdentifiers(a,b)}}while(++i)}inc(release,identifier){switch(release){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",identifier);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",identifier);break;case"prepatch":this.prerelease.length=0;this.inc("patch",identifier);this.inc("pre",identifier);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",identifier)}this.inc("pre",identifier);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":if(this.prerelease.length===0){this.prerelease=[0]}else{let i=this.prerelease.length;while(--i>=0){if(typeof this.prerelease[i]==="number"){this.prerelease[i]++;i=-2}}if(i===-1){this.prerelease.push(0)}}if(identifier){if(compareIdentifiers(this.prerelease[0],identifier)===0){if(isNaN(this.prerelease[1])){this.prerelease=[identifier,0]}}else{this.prerelease=[identifier,0]}}break;default:throw new Error(`invalid increment argument: ${release}`)}this.format();this.raw=this.version;return this}}semver=SemVer;return semver}var parse_1$3;var hasRequiredParse$4;function requireParse$4(){if(hasRequiredParse$4)return parse_1$3;hasRequiredParse$4=1;const{MAX_LENGTH:MAX_LENGTH}=requireConstants$4();const{re:re,t:t}=requireRe();const SemVer=requireSemver();const parseOptions=requireParseOptions();const parse=(version,options)=>{options=parseOptions(options);if(version instanceof SemVer){return version}if(typeof version!=="string"){return null}if(version.length>MAX_LENGTH){return null}const r=options.loose?re[t.LOOSE]:re[t.FULL];if(!r.test(version)){return null}try{return new SemVer(version,options)}catch(er){return null}};parse_1$3=parse;return parse_1$3}var valid_1;var hasRequiredValid;function requireValid(){if(hasRequiredValid)return valid_1;hasRequiredValid=1;const parse=requireParse$4();const valid=(version,options)=>{const v=parse(version,options);return v?v.version:null};valid_1=valid;return valid_1}var clean_1;var hasRequiredClean;function requireClean(){if(hasRequiredClean)return clean_1;hasRequiredClean=1;const parse=requireParse$4();const clean=(version,options)=>{const s=parse(version.trim().replace(/^[=v]+/,""),options);return s?s.version:null};clean_1=clean;return clean_1}var require$$1$4=["0BSD","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","AMDPLPA","AML","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Glyph","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Protection","BSD-Source-Code","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Borceux","Brian-Gladman-3-Clause","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-4.0","CC-PDDC","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Crossword","CrystalStacker","Cube","D-FSL-1.0","DL-DE-BY-2.0","DOC","DRL-1.0","DSDP","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FDK-AAC","FSFAP","FSFUL","FSFULLR","FSFULLRWD","FTL","Fair","Frameworx-1.0","FreeBSD-DOC","FreeImage","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Giftware","Glide","Glulxe","Graphics-Gems","HP-1986","HPND","HPND-Markus-Kuhn","HPND-export-US","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ImageMagick","Imlib2","Info-ZIP","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-copyleft","MIT","MIT-0","MIT-CMU","MIT-Modern-Variant","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MITNFA","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","MakeIndex","Martin-Birgmeier","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCGL-UK-2.0","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-fallback","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTP","NTP-0","Naumen","Net-SNMP","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OML","OPL-1.0","OPUBL-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OpenPBS-2.3","OpenSSL","PDDL-1.0","PHP-3.0","PHP-3.01","PSF-2.0","Parity-6.0.0","Parity-7.0.0","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","SAX-PD","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SMLNJ","SMPPL","SNIA","SPL-1.0","SSH-OpenSSH","SSH-short","SSPL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","SimPL-2.0","Sleepycat","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TU-Berlin-1.0","TU-Berlin-2.0","UCAR","UCL-1.0","UPL-1.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","Unlicense","VOSTROM","VSL-1.0","Vim","W3C","W3C-19980720","W3C-20150513","WTFPL","Watcom-1.0","Wsuipa","X11","X11-distribute-modifications-variant","XFree86-1.1","XSkat","Xerox","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","blessing","bzip2-1.0.6","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","diffmark","dvipdfm","eGenix","etalab-2.0","gSOAP-1.3b","gnuplot","iMatix","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","mpi-permissive","mpich2","mplus","psfrag","psutils","snprintf","w3m","xinetd","xlock","xpp","zlib-acknowledgement"];var require$$1$3=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"];var require$$2=["389-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-3.1","gnu-javamail-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","i2p-gpl-java-exception","Libtool-exception","Linux-syscall-note","LLVM-exception","LZMA-exception","mif-exception","Nokia-Qt-exception-1.1","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","Swift-exception","u-boot-exception-2.0","Universal-FOSS-exception-1.0","WxWindows-exception-3.1"];var scan;var hasRequiredScan$1;function requireScan$1(){if(hasRequiredScan$1)return scan;hasRequiredScan$1=1;var licenses=[].concat(require$$1$4).concat(require$$1$3);var exceptions=require$$2;scan=function(source){var index=0;function hasMore(){return index<source.length}function read(value){if(value instanceof RegExp){var chars=source.slice(index);var match=chars.match(value);if(match){index+=match[0].length;return match[0]}}else{if(source.indexOf(value,index)===index){index+=value.length;return value}}}function skipWhitespace(){read(/[ ]*/)}function operator(){var string;var possibilities=["WITH","AND","OR","(",")",":","+"];for(var i=0;i<possibilities.length;i++){string=read(possibilities[i]);if(string){break}}if(string==="+"&&index>1&&source[index-2]===" "){throw new Error("Space before `+`")}return string&&{type:"OPERATOR",string:string}}function idstring(){return read(/[A-Za-z0-9-.]+/)}function expectIdstring(){var string=idstring();if(!string){throw new Error("Expected idstring at offset "+index)}return string}function documentRef(){if(read("DocumentRef-")){var string=expectIdstring();return{type:"DOCUMENTREF",string:string}}}function licenseRef(){if(read("LicenseRef-")){var string=expectIdstring();return{type:"LICENSEREF",string:string}}}function identifier(){var begin=index;var string=idstring();if(licenses.indexOf(string)!==-1){return{type:"LICENSE",string:string}}else if(exceptions.indexOf(string)!==-1){return{type:"EXCEPTION",string:string}}index=begin}function parseToken(){return operator()||documentRef()||licenseRef()||identifier()}var tokens=[];while(hasMore()){skipWhitespace();if(!hasMore()){break}var token=parseToken();if(!token){throw new Error("Unexpected `"+source[index]+"` at offset "+index)}tokens.push(token)}return tokens};return scan}var parse$1;var hasRequiredParse$3;function requireParse$3(){if(hasRequiredParse$3)return parse$1;hasRequiredParse$3=1;parse$1=function(tokens){var index=0;function hasMore(){return index<tokens.length}function token(){return hasMore()?tokens[index]:null}function next(){if(!hasMore()){throw new Error}index++}function parseOperator(operator){var t=token();if(t&&t.type==="OPERATOR"&&operator===t.string){next();return t.string}}function parseWith(){if(parseOperator("WITH")){var t=token();if(t&&t.type==="EXCEPTION"){next();return t.string}throw new Error("Expected exception after `WITH`")}}function parseLicenseRef(){var begin=index;var string="";var t=token();if(t.type==="DOCUMENTREF"){next();string+="DocumentRef-"+t.string+":";if(!parseOperator(":")){throw new Error("Expected `:` after `DocumentRef-...`")}}t=token();if(t.type==="LICENSEREF"){next();string+="LicenseRef-"+t.string;return{license:string}}index=begin}function parseLicense(){var t=token();if(t&&t.type==="LICENSE"){next();var node={license:t.string};if(parseOperator("+")){node.plus=true}var exception=parseWith();if(exception){node.exception=exception}return node}}function parseParenthesizedExpression(){var left=parseOperator("(");if(!left){return}var expr=parseExpression();if(!parseOperator(")")){throw new Error("Expected `)`")}return expr}function parseAtom(){return parseParenthesizedExpression()||parseLicenseRef()||parseLicense()}function makeBinaryOpParser(operator,nextParser){return function parseBinaryOp(){var left=nextParser();if(!left){return}if(!parseOperator(operator)){return left}var right=parseBinaryOp();if(!right){throw new Error("Expected expression")}return{left:left,conjunction:operator.toLowerCase(),right:right}}}var parseAnd=makeBinaryOpParser("AND",parseAtom);var parseExpression=makeBinaryOpParser("OR",parseAnd);var node=parseExpression();if(!node||hasMore()){throw new Error("Syntax error")}return node};return parse$1}var spdxExpressionParse;var hasRequiredSpdxExpressionParse;function requireSpdxExpressionParse(){if(hasRequiredSpdxExpressionParse)return spdxExpressionParse;hasRequiredSpdxExpressionParse=1;var scan=requireScan$1();var parse=requireParse$3();spdxExpressionParse=function(source){return parse(scan(source))};return spdxExpressionParse}var spdxCorrect;var hasRequiredSpdxCorrect;function requireSpdxCorrect(){if(hasRequiredSpdxCorrect)return spdxCorrect;hasRequiredSpdxCorrect=1;var parse=requireSpdxExpressionParse();var spdxLicenseIds=require$$1$4;function valid(string){try{parse(string);return true}catch(error){return false}}function sortTranspositions(a,b){var length=b[0].length-a[0].length;if(length!==0)return length;return a[0].toUpperCase().localeCompare(b[0].toUpperCase())}var transpositions=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(sortTranspositions);var TRANSPOSED=0;var CORRECT=1;var transforms=[function(argument){return argument.toUpperCase()},function(argument){return argument.trim()},function(argument){return argument.replace(/\./g,"")},function(argument){return argument.replace(/\s+/g,"")},function(argument){return argument.replace(/\s+/g,"-")},function(argument){return argument.replace("v","-")},function(argument){return argument.replace(/,?\s*(\d)/,"-$1")},function(argument){return argument.replace(/,?\s*(\d)/,"-$1.0")},function(argument){return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(argument){return argument.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(argument){return argument[0].toUpperCase()+argument.slice(1)},function(argument){return argument.replace("/","-")},function(argument){return argument.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(argument){if(argument.indexOf("3.0")!==-1){return argument+"-or-later"}else{return argument+"-only"}},function(argument){return argument+"only"},function(argument){return argument.replace(/(\d)$/,"-$1.0")},function(argument){return argument.replace(/(-| )?(\d)$/,"-$2-Clause")},function(argument){return argument.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(argument){return argument.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(argument){return argument.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(argument){return argument.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(argument){return argument.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(argument){return argument.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(argument){return"CC-"+argument},function(argument){return"CC-"+argument+"-4.0"},function(argument){return argument.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(argument){return"CC-"+argument.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}];var licensesWithVersions=spdxLicenseIds.map((function(id){var match=/^(.*)-\d+\.\d+$/.exec(id);return match?[match[0],match[1]]:[id,null]})).reduce((function(objectMap,item){var key=item[1];objectMap[key]=objectMap[key]||[];objectMap[key].push(item[0]);return objectMap}),{});var licensesWithOneVersion=Object.keys(licensesWithVersions).map((function makeEntries(key){return[key,licensesWithVersions[key]]})).filter((function identifySoleVersions(item){return item[1].length===1&&item[0]!==null&&item[0]!=="APL"})).map((function createLastResorts(item){return[item[0],item[1][0]]}));licensesWithVersions=undefined;var lastResorts=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(licensesWithOneVersion).sort(sortTranspositions);var SUBSTRING=0;var IDENTIFIER=1;var validTransformation=function(identifier){for(var i=0;i<transforms.length;i++){var transformed=transforms[i](identifier).trim();if(transformed!==identifier&&valid(transformed)){return transformed}}return null};var validLastResort=function(identifier){var upperCased=identifier.toUpperCase();for(var i=0;i<lastResorts.length;i++){var lastResort=lastResorts[i];if(upperCased.indexOf(lastResort[SUBSTRING])>-1){return lastResort[IDENTIFIER]}}return null};var anyCorrection=function(identifier,check){for(var i=0;i<transpositions.length;i++){var transposition=transpositions[i];var transposed=transposition[TRANSPOSED];if(identifier.indexOf(transposed)>-1){var corrected=identifier.replace(transposed,transposition[CORRECT]);var checked=check(corrected);if(checked!==null){return checked}}}return null};spdxCorrect=function(identifier,options){options=options||{};var upgrade=options.upgrade===undefined?true:!!options.upgrade;function postprocess(value){return upgrade?upgradeGPLs(value):value}var validArugment=typeof identifier==="string"&&identifier.trim().length!==0;if(!validArugment){throw Error("Invalid argument. Expected non-empty string.")}identifier=identifier.trim();if(valid(identifier)){return postprocess(identifier)}var noPlus=identifier.replace(/\+$/,"").trim();if(valid(noPlus)){return postprocess(noPlus)}var transformed=validTransformation(identifier);if(transformed!==null){return postprocess(transformed)}transformed=anyCorrection(identifier,(function(argument){if(valid(argument)){return argument}return validTransformation(argument)}));if(transformed!==null){return postprocess(transformed)}transformed=validLastResort(identifier);if(transformed!==null){return postprocess(transformed)}transformed=anyCorrection(identifier,validLastResort);if(transformed!==null){return postprocess(transformed)}return null};function upgradeGPLs(value){if(["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(value)!==-1){return value+"-only"}else if(["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(value)!==-1){return value.replace(/\+$/,"-or-later")}else if(["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(value)!==-1){return value+"-or-later"}else{return value}}return spdxCorrect}var validateNpmPackageLicense;var hasRequiredValidateNpmPackageLicense;function requireValidateNpmPackageLicense(){if(hasRequiredValidateNpmPackageLicense)return validateNpmPackageLicense;hasRequiredValidateNpmPackageLicense=1;var parse=requireSpdxExpressionParse();var correct=requireSpdxCorrect();var genericWarning="license should be "+'a valid SPDX license expression (without "LicenseRef"), '+'"UNLICENSED", or '+'"SEE LICENSE IN <filename>"';var fileReferenceRE=/^SEE LICEN[CS]E IN (.+)$/;function startsWith(prefix,string){return string.slice(0,prefix.length)===prefix}function usesLicenseRef(ast){if(ast.hasOwnProperty("license")){var license=ast.license;return startsWith("LicenseRef",license)||startsWith("DocumentRef",license)}else{return usesLicenseRef(ast.left)||usesLicenseRef(ast.right)}}validateNpmPackageLicense=function(argument){var ast;try{ast=parse(argument)}catch(e){var match;if(argument==="UNLICENSED"||argument==="UNLICENCED"){return{validForOldPackages:true,validForNewPackages:true,unlicensed:true}}else if(match=fileReferenceRE.exec(argument)){return{validForOldPackages:true,validForNewPackages:true,inFile:match[1]}}else{var result={validForOldPackages:false,validForNewPackages:false,warnings:[genericWarning]};if(argument.trim().length!==0){var corrected=correct(argument);if(corrected){result.warnings.push('license is similar to the valid expression "'+corrected+'"')}}return result}}if(usesLicenseRef(ast)){return{validForNewPackages:false,validForOldPackages:false,spdx:true,warnings:[genericWarning]}}else{return{validForNewPackages:true,validForOldPackages:true,spdx:true}}};return validateNpmPackageLicense}var lruCache;var hasRequiredLruCache;function requireLruCache(){if(hasRequiredLruCache)return lruCache;hasRequiredLruCache=1;const perf=typeof performance==="object"&&performance&&typeof performance.now==="function"?performance:Date;const hasAbortController=typeof AbortController==="function";const AC=hasAbortController?AbortController:class AbortController{constructor(){this.signal=new AS}abort(reason=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||reason;this.signal.aborted=true;this.signal.dispatchEvent({type:"abort",target:this.signal})}};const hasAbortSignal=typeof AbortSignal==="function";const hasACAbortSignal=typeof AC.AbortSignal==="function";const AS=hasAbortSignal?AbortSignal:hasACAbortSignal?AC.AbortController:class AbortSignal{constructor(){this.reason=undefined;this.aborted=false;this._listeners=[]}dispatchEvent(e){if(e.type==="abort"){this.aborted=true;this.onabort(e);this._listeners.forEach((f=>f(e)),this)}}onabort(){}addEventListener(ev,fn){if(ev==="abort"){this._listeners.push(fn)}}removeEventListener(ev,fn){if(ev==="abort"){this._listeners=this._listeners.filter((f=>f!==fn))}}};const warned=new Set;const deprecatedOption=(opt,instead)=>{const code=`LRU_CACHE_OPTION_${opt}`;if(shouldWarn(code)){warn(code,`${opt} option`,`options.${instead}`,LRUCache)}};const deprecatedMethod=(method,instead)=>{const code=`LRU_CACHE_METHOD_${method}`;if(shouldWarn(code)){const{prototype:prototype}=LRUCache;const{get:get}=Object.getOwnPropertyDescriptor(prototype,method);warn(code,`${method} method`,`cache.${instead}()`,get)}};const deprecatedProperty=(field,instead)=>{const code=`LRU_CACHE_PROPERTY_${field}`;if(shouldWarn(code)){const{prototype:prototype}=LRUCache;const{get:get}=Object.getOwnPropertyDescriptor(prototype,field);warn(code,`${field} property`,`cache.${instead}`,get)}};const emitWarning=(...a)=>{typeof process==="object"&&process&&typeof process.emitWarning==="function"?process.emitWarning(...a):console.error(...a)};const shouldWarn=code=>!warned.has(code);const warn=(code,what,instead,fn)=>{warned.add(code);const msg=`The ${what} is deprecated. Please use ${instead} instead.`;emitWarning(msg,"DeprecationWarning",code,fn)};const isPosInt=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n);const getUintArray=max=>!isPosInt(max)?null:max<=Math.pow(2,8)?Uint8Array:max<=Math.pow(2,16)?Uint16Array:max<=Math.pow(2,32)?Uint32Array:max<=Number.MAX_SAFE_INTEGER?ZeroArray:null;class ZeroArray extends Array{constructor(size){super(size);this.fill(0)}}class Stack{constructor(max){if(max===0){return[]}const UintArray=getUintArray(max);this.heap=new UintArray(max);this.length=0}push(n){this.heap[this.length++]=n}pop(){return this.heap[--this.length]}}class LRUCache{constructor(options={}){const{max:max=0,ttl:ttl,ttlResolution:ttlResolution=1,ttlAutopurge:ttlAutopurge,updateAgeOnGet:updateAgeOnGet,updateAgeOnHas:updateAgeOnHas,allowStale:allowStale,dispose:dispose,disposeAfter:disposeAfter,noDisposeOnSet:noDisposeOnSet,noUpdateTTL:noUpdateTTL,maxSize:maxSize=0,maxEntrySize:maxEntrySize=0,sizeCalculation:sizeCalculation,fetchMethod:fetchMethod,fetchContext:fetchContext,noDeleteOnFetchRejection:noDeleteOnFetchRejection,noDeleteOnStaleGet:noDeleteOnStaleGet,allowStaleOnFetchRejection:allowStaleOnFetchRejection,allowStaleOnFetchAbort:allowStaleOnFetchAbort,ignoreFetchAbort:ignoreFetchAbort}=options;const{length:length,maxAge:maxAge,stale:stale}=options instanceof LRUCache?{}:options;if(max!==0&&!isPosInt(max)){throw new TypeError("max option must be a nonnegative integer")}const UintArray=max?getUintArray(max):Array;if(!UintArray){throw new Error("invalid max value: "+max)}this.max=max;this.maxSize=maxSize;this.maxEntrySize=maxEntrySize||this.maxSize;this.sizeCalculation=sizeCalculation||length;if(this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize){throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize")}if(typeof this.sizeCalculation!=="function"){throw new TypeError("sizeCalculation set to non-function")}}this.fetchMethod=fetchMethod||null;if(this.fetchMethod&&typeof this.fetchMethod!=="function"){throw new TypeError("fetchMethod must be a function if specified")}this.fetchContext=fetchContext;if(!this.fetchMethod&&fetchContext!==undefined){throw new TypeError("cannot set fetchContext without fetchMethod")}this.keyMap=new Map;this.keyList=new Array(max).fill(null);this.valList=new Array(max).fill(null);this.next=new UintArray(max);this.prev=new UintArray(max);this.head=0;this.tail=0;this.free=new Stack(max);this.initialFill=1;this.size=0;if(typeof dispose==="function"){this.dispose=dispose}if(typeof disposeAfter==="function"){this.disposeAfter=disposeAfter;this.disposed=[]}else{this.disposeAfter=null;this.disposed=null}this.noDisposeOnSet=!!noDisposeOnSet;this.noUpdateTTL=!!noUpdateTTL;this.noDeleteOnFetchRejection=!!noDeleteOnFetchRejection;this.allowStaleOnFetchRejection=!!allowStaleOnFetchRejection;this.allowStaleOnFetchAbort=!!allowStaleOnFetchAbort;this.ignoreFetchAbort=!!ignoreFetchAbort;if(this.maxEntrySize!==0){if(this.maxSize!==0){if(!isPosInt(this.maxSize)){throw new TypeError("maxSize must be a positive integer if specified")}}if(!isPosInt(this.maxEntrySize)){throw new TypeError("maxEntrySize must be a positive integer if specified")}this.initializeSizeTracking()}this.allowStale=!!allowStale||!!stale;this.noDeleteOnStaleGet=!!noDeleteOnStaleGet;this.updateAgeOnGet=!!updateAgeOnGet;this.updateAgeOnHas=!!updateAgeOnHas;this.ttlResolution=isPosInt(ttlResolution)||ttlResolution===0?ttlResolution:1;this.ttlAutopurge=!!ttlAutopurge;this.ttl=ttl||maxAge||0;if(this.ttl){if(!isPosInt(this.ttl)){throw new TypeError("ttl must be a positive integer if specified")}this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0){throw new TypeError("At least one of max, maxSize, or ttl is required")}if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const code="LRU_CACHE_UNBOUNDED";if(shouldWarn(code)){warned.add(code);const msg="TTL caching without ttlAutopurge, max, or maxSize can "+"result in unbounded memory consumption.";emitWarning(msg,"UnboundedCacheWarning",code,LRUCache)}}if(stale){deprecatedOption("stale","allowStale")}if(maxAge){deprecatedOption("maxAge","ttl")}if(length){deprecatedOption("length","sizeCalculation")}}getRemainingTTL(key){return this.has(key,{updateAgeOnHas:false})?Infinity:0}initializeTTLTracking(){this.ttls=new ZeroArray(this.max);this.starts=new ZeroArray(this.max);this.setItemTTL=(index,ttl,start=perf.now())=>{this.starts[index]=ttl!==0?start:0;this.ttls[index]=ttl;if(ttl!==0&&this.ttlAutopurge){const t=setTimeout((()=>{if(this.isStale(index)){this.delete(this.keyList[index])}}),ttl+1);if(t.unref){t.unref()}}};this.updateItemAge=index=>{this.starts[index]=this.ttls[index]!==0?perf.now():0};this.statusTTL=(status,index)=>{if(status){status.ttl=this.ttls[index];status.start=this.starts[index];status.now=cachedNow||getNow();status.remainingTTL=status.now+status.ttl-status.start}};let cachedNow=0;const getNow=()=>{const n=perf.now();if(this.ttlResolution>0){cachedNow=n;const t=setTimeout((()=>cachedNow=0),this.ttlResolution);if(t.unref){t.unref()}}return n};this.getRemainingTTL=key=>{const index=this.keyMap.get(key);if(index===undefined){return 0}return this.ttls[index]===0||this.starts[index]===0?Infinity:this.starts[index]+this.ttls[index]-(cachedNow||getNow())};this.isStale=index=>this.ttls[index]!==0&&this.starts[index]!==0&&(cachedNow||getNow())-this.starts[index]>this.ttls[index]}updateItemAge(_index){}statusTTL(_status,_index){}setItemTTL(_index,_ttl,_start){}isStale(_index){return false}initializeSizeTracking(){this.calculatedSize=0;this.sizes=new ZeroArray(this.max);this.removeItemSize=index=>{this.calculatedSize-=this.sizes[index];this.sizes[index]=0};this.requireSize=(k,v,size,sizeCalculation)=>{if(this.isBackgroundFetch(v)){return 0}if(!isPosInt(size)){if(sizeCalculation){if(typeof sizeCalculation!=="function"){throw new TypeError("sizeCalculation must be a function")}size=sizeCalculation(v,k);if(!isPosInt(size)){throw new TypeError("sizeCalculation return invalid (expect positive integer)")}}else{throw new TypeError("invalid size value (must be positive integer). "+"When maxSize or maxEntrySize is used, sizeCalculation or size "+"must be set.")}}return size};this.addItemSize=(index,size,status)=>{this.sizes[index]=size;if(this.maxSize){const maxSize=this.maxSize-this.sizes[index];while(this.calculatedSize>maxSize){this.evict(true)}}this.calculatedSize+=this.sizes[index];if(status){status.entrySize=size;status.totalCalculatedSize=this.calculatedSize}}}removeItemSize(_index){}addItemSize(_index,_size){}requireSize(_k,_v,size,sizeCalculation){if(size||sizeCalculation){throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}}*indexes({allowStale:allowStale=this.allowStale}={}){if(this.size){for(let i=this.tail;true;){if(!this.isValidIndex(i)){break}if(allowStale||!this.isStale(i)){yield i}if(i===this.head){break}else{i=this.prev[i]}}}}*rindexes({allowStale:allowStale=this.allowStale}={}){if(this.size){for(let i=this.head;true;){if(!this.isValidIndex(i)){break}if(allowStale||!this.isStale(i)){yield i}if(i===this.tail){break}else{i=this.next[i]}}}}isValidIndex(index){return index!==undefined&&this.keyMap.get(this.keyList[index])===index}*entries(){for(const i of this.indexes()){if(this.valList[i]!==undefined&&this.keyList[i]!==undefined&&!this.isBackgroundFetch(this.valList[i])){yield[this.keyList[i],this.valList[i]]}}}*rentries(){for(const i of this.rindexes()){if(this.valList[i]!==undefined&&this.keyList[i]!==undefined&&!this.isBackgroundFetch(this.valList[i])){yield[this.keyList[i],this.valList[i]]}}}*keys(){for(const i of this.indexes()){if(this.keyList[i]!==undefined&&!this.isBackgroundFetch(this.valList[i])){yield this.keyList[i]}}}*rkeys(){for(const i of this.rindexes()){if(this.keyList[i]!==undefined&&!this.isBackgroundFetch(this.valList[i])){yield this.keyList[i]}}}*values(){for(const i of this.indexes()){if(this.valList[i]!==undefined&&!this.isBackgroundFetch(this.valList[i])){yield this.valList[i]}}}*rvalues(){for(const i of this.rindexes()){if(this.valList[i]!==undefined&&!this.isBackgroundFetch(this.valList[i])){yield this.valList[i]}}}[Symbol.iterator](){return this.entries()}find(fn,getOptions){for(const i of this.indexes()){const v=this.valList[i];const value=this.isBackgroundFetch(v)?v.__staleWhileFetching:v;if(value===undefined)continue;if(fn(value,this.keyList[i],this)){return this.get(this.keyList[i],getOptions)}}}forEach(fn,thisp=this){for(const i of this.indexes()){const v=this.valList[i];const value=this.isBackgroundFetch(v)?v.__staleWhileFetching:v;if(value===undefined)continue;fn.call(thisp,value,this.keyList[i],this)}}rforEach(fn,thisp=this){for(const i of this.rindexes()){const v=this.valList[i];const value=this.isBackgroundFetch(v)?v.__staleWhileFetching:v;if(value===undefined)continue;fn.call(thisp,value,this.keyList[i],this)}}get prune(){deprecatedMethod("prune","purgeStale");return this.purgeStale}purgeStale(){let deleted=false;for(const i of this.rindexes({allowStale:true})){if(this.isStale(i)){this.delete(this.keyList[i]);deleted=true}}return deleted}dump(){const arr=[];for(const i of this.indexes({allowStale:true})){const key=this.keyList[i];const v=this.valList[i];const value=this.isBackgroundFetch(v)?v.__staleWhileFetching:v;if(value===undefined)continue;const entry={value:value};if(this.ttls){entry.ttl=this.ttls[i];const age=perf.now()-this.starts[i];entry.start=Math.floor(Date.now()-age)}if(this.sizes){entry.size=this.sizes[i]}arr.unshift([key,entry])}return arr}load(arr){this.clear();for(const[key,entry]of arr){if(entry.start){const age=Date.now()-entry.start;entry.start=perf.now()-age}this.set(key,entry.value,entry)}}dispose(_v,_k,_reason){}set(k,v,{ttl:ttl=this.ttl,start:start,noDisposeOnSet:noDisposeOnSet=this.noDisposeOnSet,size:size=0,sizeCalculation:sizeCalculation=this.sizeCalculation,noUpdateTTL:noUpdateTTL=this.noUpdateTTL,status:status}={}){size=this.requireSize(k,v,size,sizeCalculation);if(this.maxEntrySize&&size>this.maxEntrySize){if(status){status.set="miss";status.maxEntrySizeExceeded=true}this.delete(k);return this}let index=this.size===0?undefined:this.keyMap.get(k);if(index===undefined){index=this.newIndex();this.keyList[index]=k;this.valList[index]=v;this.keyMap.set(k,index);this.next[this.tail]=index;this.prev[index]=this.tail;this.tail=index;this.size++;this.addItemSize(index,size,status);if(status){status.set="add"}noUpdateTTL=false}else{this.moveToTail(index);const oldVal=this.valList[index];if(v!==oldVal){if(this.isBackgroundFetch(oldVal)){oldVal.__abortController.abort(new Error("replaced"))}else{if(!noDisposeOnSet){this.dispose(oldVal,k,"set");if(this.disposeAfter){this.disposed.push([oldVal,k,"set"])}}}this.removeItemSize(index);this.valList[index]=v;this.addItemSize(index,size,status);if(status){status.set="replace";const oldValue=oldVal&&this.isBackgroundFetch(oldVal)?oldVal.__staleWhileFetching:oldVal;if(oldValue!==undefined)status.oldValue=oldValue}}else if(status){status.set="update"}}if(ttl!==0&&this.ttl===0&&!this.ttls){this.initializeTTLTracking()}if(!noUpdateTTL){this.setItemTTL(index,ttl,start)}this.statusTTL(status,index);if(this.disposeAfter){while(this.disposed.length){this.disposeAfter(...this.disposed.shift())}}return this}newIndex(){if(this.size===0){return this.tail}if(this.size===this.max&&this.max!==0){return this.evict(false)}if(this.free.length!==0){return this.free.pop()}return this.initialFill++}pop(){if(this.size){const val=this.valList[this.head];this.evict(true);return val}}evict(free){const head=this.head;const k=this.keyList[head];const v=this.valList[head];if(this.isBackgroundFetch(v)){v.__abortController.abort(new Error("evicted"))}else{this.dispose(v,k,"evict");if(this.disposeAfter){this.disposed.push([v,k,"evict"])}}this.removeItemSize(head);if(free){this.keyList[head]=null;this.valList[head]=null;this.free.push(head)}this.head=this.next[head];this.keyMap.delete(k);this.size--;return head}has(k,{updateAgeOnHas:updateAgeOnHas=this.updateAgeOnHas,status:status}={}){const index=this.keyMap.get(k);if(index!==undefined){if(!this.isStale(index)){if(updateAgeOnHas){this.updateItemAge(index)}if(status)status.has="hit";this.statusTTL(status,index);return true}else if(status){status.has="stale";this.statusTTL(status,index)}}else if(status){status.has="miss"}return false}peek(k,{allowStale:allowStale=this.allowStale}={}){const index=this.keyMap.get(k);if(index!==undefined&&(allowStale||!this.isStale(index))){const v=this.valList[index];return this.isBackgroundFetch(v)?v.__staleWhileFetching:v}}backgroundFetch(k,index,options,context){const v=index===undefined?undefined:this.valList[index];if(this.isBackgroundFetch(v)){return v}const ac=new AC;if(options.signal){options.signal.addEventListener("abort",(()=>ac.abort(options.signal.reason)))}const fetchOpts={signal:ac.signal,options:options,context:context};const cb=(v,updateCache=false)=>{const{aborted:aborted}=ac.signal;const ignoreAbort=options.ignoreFetchAbort&&v!==undefined;if(options.status){if(aborted&&!updateCache){options.status.fetchAborted=true;options.status.fetchError=ac.signal.reason;if(ignoreAbort)options.status.fetchAbortIgnored=true}else{options.status.fetchResolved=true}}if(aborted&&!ignoreAbort&&!updateCache){return fetchFail(ac.signal.reason)}if(this.valList[index]===p){if(v===undefined){if(p.__staleWhileFetching){this.valList[index]=p.__staleWhileFetching}else{this.delete(k)}}else{if(options.status)options.status.fetchUpdated=true;this.set(k,v,fetchOpts.options)}}return v};const eb=er=>{if(options.status){options.status.fetchRejected=true;options.status.fetchError=er}return fetchFail(er)};const fetchFail=er=>{const{aborted:aborted}=ac.signal;const allowStaleAborted=aborted&&options.allowStaleOnFetchAbort;const allowStale=allowStaleAborted||options.allowStaleOnFetchRejection;const noDelete=allowStale||options.noDeleteOnFetchRejection;if(this.valList[index]===p){const del=!noDelete||p.__staleWhileFetching===undefined;if(del){this.delete(k)}else if(!allowStaleAborted){this.valList[index]=p.__staleWhileFetching}}if(allowStale){if(options.status&&p.__staleWhileFetching!==undefined){options.status.returnedStale=true}return p.__staleWhileFetching}else if(p.__returned===p){throw er}};const pcall=(res,rej)=>{this.fetchMethod(k,v,fetchOpts).then((v=>res(v)),rej);ac.signal.addEventListener("abort",(()=>{if(!options.ignoreFetchAbort||options.allowStaleOnFetchAbort){res();if(options.allowStaleOnFetchAbort){res=v=>cb(v,true)}}}))};if(options.status)options.status.fetchDispatched=true;const p=new Promise(pcall).then(cb,eb);p.__abortController=ac;p.__staleWhileFetching=v;p.__returned=null;if(index===undefined){this.set(k,p,{...fetchOpts.options,status:undefined});index=this.keyMap.get(k)}else{this.valList[index]=p}return p}isBackgroundFetch(p){return p&&typeof p==="object"&&typeof p.then==="function"&&Object.prototype.hasOwnProperty.call(p,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(p,"__returned")&&(p.__returned===p||p.__returned===null)}async fetch(k,{allowStale:allowStale=this.allowStale,updateAgeOnGet:updateAgeOnGet=this.updateAgeOnGet,noDeleteOnStaleGet:noDeleteOnStaleGet=this.noDeleteOnStaleGet,ttl:ttl=this.ttl,noDisposeOnSet:noDisposeOnSet=this.noDisposeOnSet,size:size=0,sizeCalculation:sizeCalculation=this.sizeCalculation,noUpdateTTL:noUpdateTTL=this.noUpdateTTL,noDeleteOnFetchRejection:noDeleteOnFetchRejection=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:allowStaleOnFetchRejection=this.allowStaleOnFetchRejection,ignoreFetchAbort:ignoreFetchAbort=this.ignoreFetchAbort,allowStaleOnFetchAbort:allowStaleOnFetchAbort=this.allowStaleOnFetchAbort,fetchContext:fetchContext=this.fetchContext,forceRefresh:forceRefresh=false,status:status,signal:signal}={}){if(!this.fetchMethod){if(status)status.fetch="get";return this.get(k,{allowStale:allowStale,updateAgeOnGet:updateAgeOnGet,noDeleteOnStaleGet:noDeleteOnStaleGet,status:status})}const options={allowStale:allowStale,updateAgeOnGet:updateAgeOnGet,noDeleteOnStaleGet:noDeleteOnStaleGet,ttl:ttl,noDisposeOnSet:noDisposeOnSet,size:size,sizeCalculation:sizeCalculation,noUpdateTTL:noUpdateTTL,noDeleteOnFetchRejection:noDeleteOnFetchRejection,allowStaleOnFetchRejection:allowStaleOnFetchRejection,allowStaleOnFetchAbort:allowStaleOnFetchAbort,ignoreFetchAbort:ignoreFetchAbort,status:status,signal:signal};let index=this.keyMap.get(k);if(index===undefined){if(status)status.fetch="miss";const p=this.backgroundFetch(k,index,options,fetchContext);return p.__returned=p}else{const v=this.valList[index];if(this.isBackgroundFetch(v)){const stale=allowStale&&v.__staleWhileFetching!==undefined;if(status){status.fetch="inflight";if(stale)status.returnedStale=true}return stale?v.__staleWhileFetching:v.__returned=v}const isStale=this.isStale(index);if(!forceRefresh&&!isStale){if(status)status.fetch="hit";this.moveToTail(index);if(updateAgeOnGet){this.updateItemAge(index)}this.statusTTL(status,index);return v}const p=this.backgroundFetch(k,index,options,fetchContext);const hasStale=p.__staleWhileFetching!==undefined;const staleVal=hasStale&&allowStale;if(status){status.fetch=hasStale&&isStale?"stale":"refresh";if(staleVal&&isStale)status.returnedStale=true}return staleVal?p.__staleWhileFetching:p.__returned=p}}get(k,{allowStale:allowStale=this.allowStale,updateAgeOnGet:updateAgeOnGet=this.updateAgeOnGet,noDeleteOnStaleGet:noDeleteOnStaleGet=this.noDeleteOnStaleGet,status:status}={}){const index=this.keyMap.get(k);if(index!==undefined){const value=this.valList[index];const fetching=this.isBackgroundFetch(value);this.statusTTL(status,index);if(this.isStale(index)){if(status)status.get="stale";if(!fetching){if(!noDeleteOnStaleGet){this.delete(k)}if(status)status.returnedStale=allowStale;return allowStale?value:undefined}else{if(status){status.returnedStale=allowStale&&value.__staleWhileFetching!==undefined}return allowStale?value.__staleWhileFetching:undefined}}else{if(status)status.get="hit";if(fetching){return value.__staleWhileFetching}this.moveToTail(index);if(updateAgeOnGet){this.updateItemAge(index)}return value}}else if(status){status.get="miss"}}connect(p,n){this.prev[n]=p;this.next[p]=n}moveToTail(index){if(index!==this.tail){if(index===this.head){this.head=this.next[index]}else{this.connect(this.prev[index],this.next[index])}this.connect(this.tail,index);this.tail=index}}get del(){deprecatedMethod("del","delete");return this.delete}delete(k){let deleted=false;if(this.size!==0){const index=this.keyMap.get(k);if(index!==undefined){deleted=true;if(this.size===1){this.clear()}else{this.removeItemSize(index);const v=this.valList[index];if(this.isBackgroundFetch(v)){v.__abortController.abort(new Error("deleted"))}else{this.dispose(v,k,"delete");if(this.disposeAfter){this.disposed.push([v,k,"delete"])}}this.keyMap.delete(k);this.keyList[index]=null;this.valList[index]=null;if(index===this.tail){this.tail=this.prev[index]}else if(index===this.head){this.head=this.next[index]}else{this.next[this.prev[index]]=this.next[index];this.prev[this.next[index]]=this.prev[index]}this.size--;this.free.push(index)}}}if(this.disposed){while(this.disposed.length){this.disposeAfter(...this.disposed.shift())}}return deleted}clear(){for(const index of this.rindexes({allowStale:true})){const v=this.valList[index];if(this.isBackgroundFetch(v)){v.__abortController.abort(new Error("deleted"))}else{const k=this.keyList[index];this.dispose(v,k,"delete");if(this.disposeAfter){this.disposed.push([v,k,"delete"])}}}this.keyMap.clear();this.valList.fill(null);this.keyList.fill(null);if(this.ttls){this.ttls.fill(0);this.starts.fill(0)}if(this.sizes){this.sizes.fill(0)}this.head=0;this.tail=0;this.initialFill=1;this.free.length=0;this.calculatedSize=0;this.size=0;if(this.disposed){while(this.disposed.length){this.disposeAfter(...this.disposed.shift())}}}get reset(){deprecatedMethod("reset","clear");return this.clear}get length(){deprecatedProperty("length","size");return this.size}static get AbortController(){return AC}static get AbortSignal(){return AS}}lruCache=LRUCache;return lruCache}var hosts_1;var hasRequiredHosts;function requireHosts(){if(hasRequiredHosts)return hosts_1;hasRequiredHosts=1;const maybeJoin=(...args)=>args.every((arg=>arg))?args.join(""):"";const maybeEncode=arg=>arg?encodeURIComponent(arg):"";const formatHashFragment=f=>f.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-");const defaults={sshtemplate:({domain:domain,user:user,project:project,committish:committish})=>`git@${domain}:${user}/${project}.git${maybeJoin("#",committish)}`,sshurltemplate:({domain:domain,user:user,project:project,committish:committish})=>`git+ssh://git@${domain}/${user}/${project}.git${maybeJoin("#",committish)}`,edittemplate:({domain:domain,user:user,project:project,committish:committish,editpath:editpath,path:path})=>`https://${domain}/${user}/${project}${maybeJoin("/",editpath,"/",maybeEncode(committish||"HEAD"),"/",path)}`,browsetemplate:({domain:domain,user:user,project:project,committish:committish,treepath:treepath})=>`https://${domain}/${user}/${project}${maybeJoin("/",treepath,"/",maybeEncode(committish))}`,browsetreetemplate:({domain:domain,user:user,project:project,committish:committish,treepath:treepath,path:path,fragment:fragment,hashformat:hashformat})=>`https://${domain}/${user}/${project}/${treepath}/${maybeEncode(committish||"HEAD")}/${path}${maybeJoin("#",hashformat(fragment||""))}`,browseblobtemplate:({domain:domain,user:user,project:project,committish:committish,blobpath:blobpath,path:path,fragment:fragment,hashformat:hashformat})=>`https://${domain}/${user}/${project}/${blobpath}/${maybeEncode(committish||"HEAD")}/${path}${maybeJoin("#",hashformat(fragment||""))}`,docstemplate:({domain:domain,user:user,project:project,treepath:treepath,committish:committish})=>`https://${domain}/${user}/${project}${maybeJoin("/",treepath,"/",maybeEncode(committish))}#readme`,httpstemplate:({auth:auth,domain:domain,user:user,project:project,committish:committish})=>`git+https://${maybeJoin(auth,"@")}${domain}/${user}/${project}.git${maybeJoin("#",committish)}`,filetemplate:({domain:domain,user:user,project:project,committish:committish,path:path})=>`https://${domain}/${user}/${project}/raw/${maybeEncode(committish||"HEAD")}/${path}`,shortcuttemplate:({type:type,user:user,project:project,committish:committish})=>`${type}:${user}/${project}${maybeJoin("#",committish)}`,pathtemplate:({user:user,project:project,committish:committish})=>`${user}/${project}${maybeJoin("#",committish)}`,bugstemplate:({domain:domain,user:user,project:project})=>`https://${domain}/${user}/${project}/issues`,hashformat:formatHashFragment};const hosts={};hosts.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:auth,user:user,project:project,committish:committish,path:path})=>`https://${maybeJoin(auth,"@")}raw.githubusercontent.com/${user}/${project}/${maybeEncode(committish||"HEAD")}/${path}`,gittemplate:({auth:auth,domain:domain,user:user,project:project,committish:committish})=>`git://${maybeJoin(auth,"@")}${domain}/${user}/${project}.git${maybeJoin("#",committish)}`,tarballtemplate:({domain:domain,user:user,project:project,committish:committish})=>`https://codeload.${domain}/${user}/${project}/tar.gz/${maybeEncode(committish||"HEAD")}`,extract:url=>{let[,user,project,type,committish]=url.pathname.split("/",5);if(type&&type!=="tree"){return}if(!type){committish=url.hash.slice(1)}if(project&&project.endsWith(".git")){project=project.slice(0,-4)}if(!user||!project){return}return{user:user,project:project,committish:committish}}};hosts.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:domain,user:user,project:project,committish:committish,treepath:treepath,path:path,editpath:editpath})=>`https://${domain}/${user}/${project}${maybeJoin("/",treepath,"/",maybeEncode(committish||"HEAD"),"/",path,editpath)}`,tarballtemplate:({domain:domain,user:user,project:project,committish:committish})=>`https://${domain}/${user}/${project}/get/${maybeEncode(committish||"HEAD")}.tar.gz`,extract:url=>{let[,user,project,aux]=url.pathname.split("/",4);if(["get"].includes(aux)){return}if(project&&project.endsWith(".git")){project=project.slice(0,-4)}if(!user||!project){return}return{user:user,project:project,committish:url.hash.slice(1)}}};hosts.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:auth,domain:domain,user:user,project:project,committish:committish})=>`git+https://${maybeJoin(auth,"@")}${domain}/${user}/${project}.git${maybeJoin("#",committish)}`,tarballtemplate:({domain:domain,user:user,project:project,committish:committish})=>`https://${domain}/${user}/${project}/repository/archive.tar.gz?ref=${maybeEncode(committish||"HEAD")}`,extract:url=>{const path=url.pathname.slice(1);if(path.includes("/-/")||path.includes("/archive.tar.gz")){return}const segments=path.split("/");let project=segments.pop();if(project.endsWith(".git")){project=project.slice(0,-4)}const user=segments.join("/");if(!user||!project){return}return{user:user,project:project,committish:url.hash.slice(1)}}};hosts.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:domain,project:project,committish:committish})=>`git@${domain}:${project}.git${maybeJoin("#",committish)}`,sshurltemplate:({domain:domain,project:project,committish:committish})=>`git+ssh://git@${domain}/${project}.git${maybeJoin("#",committish)}`,edittemplate:({domain:domain,user:user,project:project,committish:committish,editpath:editpath})=>`https://${domain}/${user}/${project}${maybeJoin("/",maybeEncode(committish))}/${editpath}`,browsetemplate:({domain:domain,project:project,committish:committish})=>`https://${domain}/${project}${maybeJoin("/",maybeEncode(committish))}`,browsetreetemplate:({domain:domain,project:project,committish:committish,path:path,hashformat:hashformat})=>`https://${domain}/${project}${maybeJoin("/",maybeEncode(committish))}${maybeJoin("#",hashformat(path))}`,browseblobtemplate:({domain:domain,project:project,committish:committish,path:path,hashformat:hashformat})=>`https://${domain}/${project}${maybeJoin("/",maybeEncode(committish))}${maybeJoin("#",hashformat(path))}`,docstemplate:({domain:domain,project:project,committish:committish})=>`https://${domain}/${project}${maybeJoin("/",maybeEncode(committish))}`,httpstemplate:({domain:domain,project:project,committish:committish})=>`git+https://${domain}/${project}.git${maybeJoin("#",committish)}`,filetemplate:({user:user,project:project,committish:committish,path:path})=>`https://gist.githubusercontent.com/${user}/${project}/raw${maybeJoin("/",maybeEncode(committish))}/${path}`,shortcuttemplate:({type:type,project:project,committish:committish})=>`${type}:${project}${maybeJoin("#",committish)}`,pathtemplate:({project:project,committish:committish})=>`${project}${maybeJoin("#",committish)}`,bugstemplate:({domain:domain,project:project})=>`https://${domain}/${project}`,gittemplate:({domain:domain,project:project,committish:committish})=>`git://${domain}/${project}.git${maybeJoin("#",committish)}`,tarballtemplate:({project:project,committish:committish})=>`https://codeload.github.com/gist/${project}/tar.gz/${maybeEncode(committish||"HEAD")}`,extract:url=>{let[,user,project,aux]=url.pathname.split("/",4);if(aux==="raw"){return}if(!project){if(!user){return}project=user;user=null}if(project.endsWith(".git")){project=project.slice(0,-4)}return{user:user,project:project,committish:url.hash.slice(1)}},hashformat:function(fragment){return fragment&&"file-"+formatHashFragment(fragment)}};hosts.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:domain,user:user,project:project,committish:committish,path:path})=>`https://${domain}/${user}/${project}/blob/${maybeEncode(committish)||"HEAD"}/${path}`,httpstemplate:({domain:domain,user:user,project:project,committish:committish})=>`https://${domain}/${user}/${project}.git${maybeJoin("#",committish)}`,tarballtemplate:({domain:domain,user:user,project:project,committish:committish})=>`https://${domain}/${user}/${project}/archive/${maybeEncode(committish)||"HEAD"}.tar.gz`,bugstemplate:({user:user,project:project})=>`https://todo.sr.ht/${user}/${project}`,extract:url=>{let[,user,project,aux]=url.pathname.split("/",4);if(["archive"].includes(aux)){return}if(project&&project.endsWith(".git")){project=project.slice(0,-4)}if(!user||!project){return}return{user:user,project:project,committish:url.hash.slice(1)}}};for(const[name,host]of Object.entries(hosts)){hosts[name]=Object.assign({},defaults,host)}hosts_1=hosts;return hosts_1}var parseUrl;var hasRequiredParseUrl;function requireParseUrl(){if(hasRequiredParseUrl)return parseUrl;hasRequiredParseUrl=1;const url=require$$0$7;const lastIndexOfBefore=(str,char,beforeChar)=>{const startPosition=str.indexOf(beforeChar);return str.lastIndexOf(char,startPosition>-1?startPosition:Infinity)};const safeUrl=u=>{try{return new url.URL(u)}catch{}};const correctProtocol=(arg,protocols)=>{const firstColon=arg.indexOf(":");const proto=arg.slice(0,firstColon+1);if(Object.prototype.hasOwnProperty.call(protocols,proto)){return arg}const firstAt=arg.indexOf("@");if(firstAt>-1){if(firstAt>firstColon){return`git+ssh://${arg}`}else{return arg}}const doubleSlash=arg.indexOf("//");if(doubleSlash===firstColon+1){return arg}return`${arg.slice(0,firstColon+1)}//${arg.slice(firstColon+1)}`};const correctUrl=giturl=>{const firstAt=lastIndexOfBefore(giturl,"@","#");const lastColonBeforeHash=lastIndexOfBefore(giturl,":","#");if(lastColonBeforeHash>firstAt){giturl=giturl.slice(0,lastColonBeforeHash)+"/"+giturl.slice(lastColonBeforeHash+1)}if(lastIndexOfBefore(giturl,":","#")===-1&&giturl.indexOf("//")===-1){giturl=`git+ssh://${giturl}`}return giturl};parseUrl=(giturl,protocols)=>{const withProtocol=protocols?correctProtocol(giturl,protocols):giturl;return safeUrl(withProtocol)||safeUrl(correctUrl(withProtocol))};return parseUrl}var fromUrl;var hasRequiredFromUrl;function requireFromUrl(){if(hasRequiredFromUrl)return fromUrl;hasRequiredFromUrl=1;const parseUrl=requireParseUrl();const isGitHubShorthand=arg=>{const firstHash=arg.indexOf("#");const firstSlash=arg.indexOf("/");const secondSlash=arg.indexOf("/",firstSlash+1);const firstColon=arg.indexOf(":");const firstSpace=/\s/.exec(arg);const firstAt=arg.indexOf("@");const spaceOnlyAfterHash=!firstSpace||firstHash>-1&&firstSpace.index>firstHash;const atOnlyAfterHash=firstAt===-1||firstHash>-1&&firstAt>firstHash;const colonOnlyAfterHash=firstColon===-1||firstHash>-1&&firstColon>firstHash;const secondSlashOnlyAfterHash=secondSlash===-1||firstHash>-1&&secondSlash>firstHash;const hasSlash=firstSlash>0;const doesNotEndWithSlash=firstHash>-1?arg[firstHash-1]!=="/":!arg.endsWith("/");const doesNotStartWithDot=!arg.startsWith(".");return spaceOnlyAfterHash&&hasSlash&&doesNotEndWithSlash&&doesNotStartWithDot&&atOnlyAfterHash&&colonOnlyAfterHash&&secondSlashOnlyAfterHash};fromUrl=(giturl,opts,{gitHosts:gitHosts,protocols:protocols})=>{if(!giturl){return}const correctedUrl=isGitHubShorthand(giturl)?`github:${giturl}`:giturl;const parsed=parseUrl(correctedUrl,protocols);if(!parsed){return}const gitHostShortcut=gitHosts.byShortcut[parsed.protocol];const gitHostDomain=gitHosts.byDomain[parsed.hostname.startsWith("www.")?parsed.hostname.slice(4):parsed.hostname];const gitHostName=gitHostShortcut||gitHostDomain;if(!gitHostName){return}const gitHostInfo=gitHosts[gitHostShortcut||gitHostDomain];let auth=null;if(protocols[parsed.protocol]?.auth&&(parsed.username||parsed.password)){auth=`${parsed.username}${parsed.password?":"+parsed.password:""}`}let committish=null;let user=null;let project=null;let defaultRepresentation=null;try{if(gitHostShortcut){let pathname=parsed.pathname.startsWith("/")?parsed.pathname.slice(1):parsed.pathname;const firstAt=pathname.indexOf("@");if(firstAt>-1){pathname=pathname.slice(firstAt+1)}const lastSlash=pathname.lastIndexOf("/");if(lastSlash>-1){user=decodeURIComponent(pathname.slice(0,lastSlash));if(!user){user=null}project=decodeURIComponent(pathname.slice(lastSlash+1))}else{project=decodeURIComponent(pathname)}if(project.endsWith(".git")){project=project.slice(0,-4)}if(parsed.hash){committish=decodeURIComponent(parsed.hash.slice(1))}defaultRepresentation="shortcut"}else{if(!gitHostInfo.protocols.includes(parsed.protocol)){return}const segments=gitHostInfo.extract(parsed);if(!segments){return}user=segments.user&&decodeURIComponent(segments.user);project=decodeURIComponent(segments.project);committish=decodeURIComponent(segments.committish);defaultRepresentation=protocols[parsed.protocol]?.name||parsed.protocol.slice(0,-1)}}catch(err){if(err instanceof URIError){return}else{throw err}}return[gitHostName,user,auth,project,committish,defaultRepresentation,opts]};return fromUrl}var lib$i;var hasRequiredLib$i;function requireLib$i(){if(hasRequiredLib$i)return lib$i;hasRequiredLib$i=1;const LRU=requireLruCache();const hosts=requireHosts();const fromUrl=requireFromUrl();const parseUrl=requireParseUrl();const cache=new LRU({max:1e3});class GitHost{constructor(type,user,auth,project,committish,defaultRepresentation,opts={}){Object.assign(this,GitHost.#gitHosts[type],{type:type,user:user,auth:auth,project:project,committish:committish,default:defaultRepresentation,opts:opts})}static#gitHosts={byShortcut:{},byDomain:{}};static#protocols={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:true},"git:":{auth:true},"http:":{auth:true},"https:":{auth:true},"git+http:":{auth:true}};static addHost(name,host){GitHost.#gitHosts[name]=host;GitHost.#gitHosts.byDomain[host.domain]=name;GitHost.#gitHosts.byShortcut[`${name}:`]=name;GitHost.#protocols[`${name}:`]={name:name}}static fromUrl(giturl,opts){if(typeof giturl!=="string"){return}const key=giturl+JSON.stringify(opts||{});if(!cache.has(key)){const hostArgs=fromUrl(giturl,opts,{gitHosts:GitHost.#gitHosts,protocols:GitHost.#protocols});cache.set(key,hostArgs?new GitHost(...hostArgs):undefined)}return cache.get(key)}static parseUrl(url){return parseUrl(url)}#fill(template,opts){if(typeof template!=="function"){return null}const options={...this,...this.opts,...opts};if(!options.path){options.path=""}if(options.path.startsWith("/")){options.path=options.path.slice(1)}if(options.noCommittish){options.committish=null}const result=template(options);return options.noGitPlus&&result.startsWith("git+")?result.slice(4):result}hash(){return this.committish?`#${this.committish}`:""}ssh(opts){return this.#fill(this.sshtemplate,opts)}sshurl(opts){return this.#fill(this.sshurltemplate,opts)}browse(path,...args){if(typeof path!=="string"){return this.#fill(this.browsetemplate,path)}if(typeof args[0]!=="string"){return this.#fill(this.browsetreetemplate,{...args[0],path:path})}return this.#fill(this.browsetreetemplate,{...args[1],fragment:args[0],path:path})}browseFile(path,...args){if(typeof args[0]!=="string"){return this.#fill(this.browseblobtemplate,{...args[0],path:path})}return this.#fill(this.browseblobtemplate,{...args[1],fragment:args[0],path:path})}docs(opts){return this.#fill(this.docstemplate,opts)}bugs(opts){return this.#fill(this.bugstemplate,opts)}https(opts){return this.#fill(this.httpstemplate,opts)}git(opts){return this.#fill(this.gittemplate,opts)}shortcut(opts){return this.#fill(this.shortcuttemplate,opts)}path(opts){return this.#fill(this.pathtemplate,opts)}tarball(opts){return this.#fill(this.tarballtemplate,{...opts,noCommittish:false})}file(path,opts){return this.#fill(this.filetemplate,{...opts,path:path})}edit(path,opts){return this.#fill(this.edittemplate,{...opts,path:path})}getDefaultRepresentation(){return this.default}toString(opts){if(this.default&&typeof this[this.default]==="function"){return this[this.default](opts)}return this.sshurl(opts)}}for(const[name,host]of Object.entries(hosts)){GitHost.addHost(name,host)}lib$i=GitHost;return lib$i}var implementation;var hasRequiredImplementation;function requireImplementation(){if(hasRequiredImplementation)return implementation;hasRequiredImplementation=1;var ERROR_MESSAGE="Function.prototype.bind called on incompatible ";var slice=Array.prototype.slice;var toStr=Object.prototype.toString;var funcType="[object Function]";implementation=function bind(that){var target=this;if(typeof target!=="function"||toStr.call(target)!==funcType){throw new TypeError(ERROR_MESSAGE+target)}var args=slice.call(arguments,1);var bound;var binder=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));if(Object(result)===result){return result}return this}else{return target.apply(that,args.concat(slice.call(arguments)))}};var boundLength=Math.max(0,target.length-args.length);var boundArgs=[];for(var i=0;i<boundLength;i++){boundArgs.push("$"+i)}bound=Function("binder","return function ("+boundArgs.join(",")+"){ return binder.apply(this,arguments); }")(binder);if(target.prototype){var Empty=function Empty(){};Empty.prototype=target.prototype;bound.prototype=new Empty;Empty.prototype=null}return bound};return implementation}var functionBind;var hasRequiredFunctionBind;function requireFunctionBind(){if(hasRequiredFunctionBind)return functionBind;hasRequiredFunctionBind=1;var implementation=requireImplementation();functionBind=Function.prototype.bind||implementation;return functionBind}var src;var hasRequiredSrc;function requireSrc(){if(hasRequiredSrc)return src;hasRequiredSrc=1;var bind=requireFunctionBind();src=bind.call(Function.call,Object.prototype.hasOwnProperty);return src}var assert=true;var async_hooks=">= 8";var buffer_ieee754=">= 0.5 && < 0.9.7";var buffer$1=true;var child_process=true;var cluster=">= 0.5";var console$1=true;var constants$4=true;var crypto=true;var _debug_agent=">= 1 && < 8";var _debugger="< 8";var dgram=true;var diagnostics_channel=[">= 14.17 && < 15",">= 15.1"];var dns=true;var domain=">= 0.7.12";var events=true;var freelist="< 6";var fs$5=true;var _http_agent=">= 0.11.1";var _http_client=">= 0.11.1";var _http_common=">= 0.11.1";var _http_incoming=">= 0.11.1";var _http_outgoing=">= 0.11.1";var _http_server=">= 0.11.1";var http=true;var http2=">= 8.8";var https=true;var inspector=">= 8";var _linklist="< 8";var module$1=true;var net=true;var os=true;var path$3=true;var perf_hooks=">= 8.5";var process$1=">= 1";var punycode=">= 0.5";var querystring=true;var readline=true;var repl=true;var smalloc=">= 0.11.5 && < 3";var _stream_duplex=">= 0.9.4";var _stream_transform=">= 0.9.4";var _stream_wrap=">= 1.4.1";var _stream_passthrough=">= 0.9.4";var _stream_readable=">= 0.9.4";var _stream_writable=">= 0.9.4";var stream$4=true;var string_decoder=true;var sys=[">= 0.4 && < 0.7",">= 0.8"];var timers=true;var _tls_common=">= 0.11.13";var _tls_legacy=">= 0.11.3 && < 10";var _tls_wrap=">= 0.11.3";var tls=true;var trace_events=">= 10";var tty=true;var url=true;var util$2=true;var v8=">= 1";var vm=true;var wasi=">= 13.4 && < 13.5";var worker_threads=">= 11.7";var zlib=">= 0.5";var require$$1$2={assert:assert,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:async_hooks,"node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:buffer_ieee754,buffer:buffer$1,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:child_process,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:cluster,"node:cluster":[">= 14.18 && < 15",">= 16"],console:console$1,"node:console":[">= 14.18 && < 15",">= 16"],constants:constants$4,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:crypto,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:_debug_agent,_debugger:_debugger,dgram:dgram,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:diagnostics_channel,"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:dns,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:domain,"node:domain":[">= 14.18 && < 15",">= 16"],events:events,"node:events":[">= 14.18 && < 15",">= 16"],freelist:freelist,fs:fs$5,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:_http_agent,"node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:_http_client,"node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:_http_common,"node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:_http_incoming,"node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:_http_outgoing,"node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:_http_server,"node:_http_server":[">= 14.18 && < 15",">= 16"],http:http,"node:http":[">= 14.18 && < 15",">= 16"],http2:http2,"node:http2":[">= 14.18 && < 15",">= 16"],https:https,"node:https":[">= 14.18 && < 15",">= 16"],inspector:inspector,"node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:_linklist,module:module$1,"node:module":[">= 14.18 && < 15",">= 16"],net:net,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:os,"node:os":[">= 14.18 && < 15",">= 16"],path:path$3,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:perf_hooks,"node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:process$1,"node:process":[">= 14.18 && < 15",">= 16"],punycode:punycode,"node:punycode":[">= 14.18 && < 15",">= 16"],querystring:querystring,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:readline,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:repl,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:smalloc,_stream_duplex:_stream_duplex,"node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:_stream_transform,"node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:_stream_wrap,"node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:_stream_passthrough,"node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:_stream_readable,"node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:_stream_writable,"node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:stream$4,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:string_decoder,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:sys,"node:sys":[">= 14.18 && < 15",">= 16"],"node:test":[">= 16.17 && < 17",">= 18"],timers:timers,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:_tls_common,"node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:_tls_legacy,_tls_wrap:_tls_wrap,"node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:tls,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:trace_events,"node:trace_events":[">= 14.18 && < 15",">= 16"],tty:tty,"node:tty":[">= 14.18 && < 15",">= 16"],url:url,"node:url":[">= 14.18 && < 15",">= 16"],util:util$2,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:v8,"node:v8":[">= 14.18 && < 15",">= 16"],vm:vm,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:wasi,worker_threads:worker_threads,"node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:zlib,"node:zlib":[">= 14.18 && < 15",">= 16"]};var isCoreModule;var hasRequiredIsCoreModule;function requireIsCoreModule(){if(hasRequiredIsCoreModule)return isCoreModule;hasRequiredIsCoreModule=1;var has=requireSrc();function specifierIncluded(current,specifier){var nodeParts=current.split(".");var parts=specifier.split(" ");var op=parts.length>1?parts[0]:"=";var versionParts=(parts.length>1?parts[1]:parts[0]).split(".");for(var i=0;i<3;++i){var cur=parseInt(nodeParts[i]||0,10);var ver=parseInt(versionParts[i]||0,10);if(cur===ver){continue}if(op==="<"){return cur<ver}if(op===">="){return cur>=ver}return false}return op===">="}function matchesRange(current,range){var specifiers=range.split(/ ?&& ?/);if(specifiers.length===0){return false}for(var i=0;i<specifiers.length;++i){if(!specifierIncluded(current,specifiers[i])){return false}}return true}function versionIncluded(nodeVersion,specifierValue){if(typeof specifierValue==="boolean"){return specifierValue}var current=typeof nodeVersion==="undefined"?process.versions&&process.versions.node:nodeVersion;if(typeof current!=="string"){throw new TypeError(typeof nodeVersion==="undefined"?"Unable to determine current node version":"If provided, a valid node version is required")}if(specifierValue&&typeof specifierValue==="object"){for(var i=0;i<specifierValue.length;++i){if(matchesRange(current,specifierValue[i])){return true}}return false}return matchesRange(current,specifierValue)}var data=require$$1$2;isCoreModule=function isCore(x,nodeVersion){return has(data,x)&&versionIncluded(nodeVersion,data[x])};return isCoreModule}var extract_description;var hasRequiredExtract_description;function requireExtract_description(){if(hasRequiredExtract_description)return extract_description;hasRequiredExtract_description=1;extract_description=extractDescription;function extractDescription(d){if(!d){return}if(d==="ERROR: No README data found!"){return}d=d.trim().split("\n");let s=0;while(d[s]&&d[s].trim().match(/^(#|$)/)){s++}const l=d.length;let e=s+1;while(e<l&&d[e].trim()){e++}return d.slice(s,e).join(" ").trim()}return extract_description}var topLevel={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"};var bugs={web:"url",name:"url"};var script={server:"start",tests:"test"};var require$$7={topLevel:topLevel,bugs:bugs,script:script};var fixer;var hasRequiredFixer;function requireFixer(){if(hasRequiredFixer)return fixer;hasRequiredFixer=1;var isValidSemver=requireValid();var cleanSemver=requireClean();var validateLicense=requireValidateNpmPackageLicense();var hostedGitInfo=requireLib$i();var isBuiltinModule=requireIsCoreModule();var depTypes=["dependencies","devDependencies","optionalDependencies"];var extractDescription=requireExtract_description();var url=require$$0$7;var typos=require$$7;var isEmail=str=>str.includes("@")&&str.indexOf("@")<str.lastIndexOf(".");fixer={warn:function(){},fixRepositoryField:function(data){if(data.repositories){this.warn("repositories");data.repository=data.repositories[0]}if(!data.repository){return this.warn("missingRepository")}if(typeof data.repository==="string"){data.repository={type:"git",url:data.repository}}var r=data.repository.url||"";if(r){var hosted=hostedGitInfo.fromUrl(r);if(hosted){r=data.repository.url=hosted.getDefaultRepresentation()==="shortcut"?hosted.https():hosted.toString()}}if(r.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)){this.warn("brokenGitUrl",r)}},fixTypos:function(data){Object.keys(typos.topLevel).forEach((function(d){if(Object.prototype.hasOwnProperty.call(data,d)){this.warn("typo",d,typos.topLevel[d])}}),this)},fixScriptsField:function(data){if(!data.scripts){return}if(typeof data.scripts!=="object"){this.warn("nonObjectScripts");delete data.scripts;return}Object.keys(data.scripts).forEach((function(k){if(typeof data.scripts[k]!=="string"){this.warn("nonStringScript");delete data.scripts[k]}else if(typos.script[k]&&!data.scripts[typos.script[k]]){this.warn("typo",k,typos.script[k],"scripts")}}),this)},fixFilesField:function(data){var files=data.files;if(files&&!Array.isArray(files)){this.warn("nonArrayFiles");delete data.files}else if(data.files){data.files=data.files.filter((function(file){if(!file||typeof file!=="string"){this.warn("invalidFilename",file);return false}else{return true}}),this)}},fixBinField:function(data){if(!data.bin){return}if(typeof data.bin==="string"){var b={};var match;if(match=data.name.match(/^@[^/]+[/](.*)$/)){b[match[1]]=data.bin}else{b[data.name]=data.bin}data.bin=b}},fixManField:function(data){if(!data.man){return}if(typeof data.man==="string"){data.man=[data.man]}},fixBundleDependenciesField:function(data){var bdd="bundledDependencies";var bd="bundleDependencies";if(data[bdd]&&!data[bd]){data[bd]=data[bdd];delete data[bdd]}if(data[bd]&&!Array.isArray(data[bd])){this.warn("nonArrayBundleDependencies");delete data[bd]}else if(data[bd]){data[bd]=data[bd].filter((function(filtered){if(!filtered||typeof filtered!=="string"){this.warn("nonStringBundleDependency",filtered);return false}else{if(!data.dependencies){data.dependencies={}}if(!Object.prototype.hasOwnProperty.call(data.dependencies,filtered)){this.warn("nonDependencyBundleDependency",filtered);data.dependencies[filtered]="*"}return true}}),this)}},fixDependencies:function(data,strict){objectifyDeps(data,this.warn);addOptionalDepsToDeps(data,this.warn);this.fixBundleDependenciesField(data);["dependencies","devDependencies"].forEach((function(deps){if(!(deps in data)){return}if(!data[deps]||typeof data[deps]!=="object"){this.warn("nonObjectDependencies",deps);delete data[deps];return}Object.keys(data[deps]).forEach((function(d){var r=data[deps][d];if(typeof r!=="string"){this.warn("nonStringDependency",d,JSON.stringify(r));delete data[deps][d]}var hosted=hostedGitInfo.fromUrl(data[deps][d]);if(hosted){data[deps][d]=hosted.toString()}}),this)}),this)},fixModulesField:function(data){if(data.modules){this.warn("deprecatedModules");delete data.modules}},fixKeywordsField:function(data){if(typeof data.keywords==="string"){data.keywords=data.keywords.split(/,\s+/)}if(data.keywords&&!Array.isArray(data.keywords)){delete data.keywords;this.warn("nonArrayKeywords")}else if(data.keywords){data.keywords=data.keywords.filter((function(kw){if(typeof kw!=="string"||!kw){this.warn("nonStringKeyword");return false}else{return true}}),this)}},fixVersionField:function(data,strict){var loose=!strict;if(!data.version){data.version="";return true}if(!isValidSemver(data.version,loose)){throw new Error('Invalid version: "'+data.version+'"')}data.version=cleanSemver(data.version,loose);return true},fixPeople:function(data){modifyPeople(data,unParsePerson);modifyPeople(data,parsePerson)},fixNameField:function(data,options){if(typeof options==="boolean"){options={strict:options}}else if(typeof options==="undefined"){options={}}var strict=options.strict;if(!data.name&&!strict){data.name="";return}if(typeof data.name!=="string"){throw new Error("name field must be a string.")}if(!strict){data.name=data.name.trim()}ensureValidName(data.name,strict,options.allowLegacyCase);if(isBuiltinModule(data.name)){this.warn("conflictingName",data.name)}},fixDescriptionField:function(data){if(data.description&&typeof data.description!=="string"){this.warn("nonStringDescription");delete data.description}if(data.readme&&!data.description){data.description=extractDescription(data.readme)}if(data.description===undefined){delete data.description}if(!data.description){this.warn("missingDescription")}},fixReadmeField:function(data){if(!data.readme){this.warn("missingReadme");data.readme="ERROR: No README data found!"}},fixBugsField:function(data){if(!data.bugs&&data.repository&&data.repository.url){var hosted=hostedGitInfo.fromUrl(data.repository.url);if(hosted&&hosted.bugs()){data.bugs={url:hosted.bugs()}}}else if(data.bugs){if(typeof data.bugs==="string"){if(isEmail(data.bugs)){data.bugs={email:data.bugs}}else if(url.parse(data.bugs).protocol){data.bugs={url:data.bugs}}else{this.warn("nonEmailUrlBugsString")}}else{bugsTypos(data.bugs,this.warn);var oldBugs=data.bugs;data.bugs={};if(oldBugs.url){if(typeof oldBugs.url==="string"&&url.parse(oldBugs.url).protocol){data.bugs.url=oldBugs.url}else{this.warn("nonUrlBugsUrlField")}}if(oldBugs.email){if(typeof oldBugs.email==="string"&&isEmail(oldBugs.email)){data.bugs.email=oldBugs.email}else{this.warn("nonEmailBugsEmailField")}}}if(!data.bugs.email&&!data.bugs.url){delete data.bugs;this.warn("emptyNormalizedBugs")}}},fixHomepageField:function(data){if(!data.homepage&&data.repository&&data.repository.url){var hosted=hostedGitInfo.fromUrl(data.repository.url);if(hosted&&hosted.docs()){data.homepage=hosted.docs()}}if(!data.homepage){return}if(typeof data.homepage!=="string"){this.warn("nonUrlHomepage");return delete data.homepage}if(!url.parse(data.homepage).protocol){data.homepage="http://"+data.homepage}},fixLicenseField:function(data){const license=data.license||data.licence;if(!license){return this.warn("missingLicense")}if(typeof license!=="string"||license.length<1||license.trim()===""){return this.warn("invalidLicense")}if(!validateLicense(license).validForNewPackages){return this.warn("invalidLicense")}}};function isValidScopedPackageName(spec){if(spec.charAt(0)!=="@"){return false}var rest=spec.slice(1).split("/");if(rest.length!==2){return false}return rest[0]&&rest[1]&&rest[0]===encodeURIComponent(rest[0])&&rest[1]===encodeURIComponent(rest[1])}function isCorrectlyEncodedName(spec){return!spec.match(/[/@\s+%:]/)&&spec===encodeURIComponent(spec)}function ensureValidName(name,strict,allowLegacyCase){if(name.charAt(0)==="."||!(isValidScopedPackageName(name)||isCorrectlyEncodedName(name))||strict&&!allowLegacyCase&&name!==name.toLowerCase()||name.toLowerCase()==="node_modules"||name.toLowerCase()==="favicon.ico"){throw new Error("Invalid name: "+JSON.stringify(name))}}function modifyPeople(data,fn){if(data.author){data.author=fn(data.author)}["maintainers","contributors"].forEach((function(set){if(!Array.isArray(data[set])){return}data[set]=data[set].map(fn)}));return data}function unParsePerson(person){if(typeof person==="string"){return person}var name=person.name||"";var u=person.url||person.web;var wrappedUrl=u?" ("+u+")":"";var e=person.email||person.mail;var wrappedEmail=e?" <"+e+">":"";return name+wrappedEmail+wrappedUrl}function parsePerson(person){if(typeof person!=="string"){return person}var matchedName=person.match(/^([^(<]+)/);var matchedUrl=person.match(/\(([^()]+)\)/);var matchedEmail=person.match(/<([^<>]+)>/);var obj={};if(matchedName&&matchedName[0].trim()){obj.name=matchedName[0].trim()}if(matchedEmail){obj.email=matchedEmail[1]}if(matchedUrl){obj.url=matchedUrl[1]}return obj}function addOptionalDepsToDeps(data,warn){var o=data.optionalDependencies;if(!o){return}var d=data.dependencies||{};Object.keys(o).forEach((function(k){d[k]=o[k]}));data.dependencies=d}function depObjectify(deps,type,warn){if(!deps){return{}}if(typeof deps==="string"){deps=deps.trim().split(/[\n\r\s\t ,]+/)}if(!Array.isArray(deps)){return deps}warn("deprecatedArrayDependencies",type);var o={};deps.filter((function(d){return typeof d==="string"})).forEach((function(d){d=d.trim().split(/(:?[@\s><=])/);var dn=d.shift();var dv=d.join("");dv=dv.trim();dv=dv.replace(/^@/,"");o[dn]=dv}));return o}function objectifyDeps(data,warn){depTypes.forEach((function(type){if(!data[type]){return}data[type]=depObjectify(data[type],type,warn)}))}function bugsTypos(bugs,warn){if(!bugs){return}Object.keys(bugs).forEach((function(k){if(typos.bugs[k]){warn("typo",k,typos.bugs[k],"bugs");bugs[typos.bugs[k]]=bugs[k];delete bugs[k]}}))}return fixer}var repositories="'repositories' (plural) Not supported. Please pick one as the 'repository' field";var missingRepository="No repository field.";var brokenGitUrl="Probably broken git url: %s";var nonObjectScripts="scripts must be an object";var nonStringScript="script values must be string commands";var nonArrayFiles="Invalid 'files' member";var invalidFilename="Invalid filename in 'files' list: %s";var nonArrayBundleDependencies="Invalid 'bundleDependencies' list. Must be array of package names";var nonStringBundleDependency="Invalid bundleDependencies member: %s";var nonDependencyBundleDependency="Non-dependency in bundleDependencies: %s";var nonObjectDependencies="%s field must be an object";var nonStringDependency="Invalid dependency: %s %s";var deprecatedArrayDependencies="specifying %s as array is deprecated";var deprecatedModules="modules field is deprecated";var nonArrayKeywords="keywords should be an array of strings";var nonStringKeyword="keywords should be an array of strings";var conflictingName="%s is also the name of a node core module.";var nonStringDescription="'description' field should be a string";var missingDescription="No description";var missingReadme="No README data";var missingLicense="No license field.";var nonEmailUrlBugsString="Bug string field must be url, email, or {email,url}";var nonUrlBugsUrlField="bugs.url field must be a string url. Deleted.";var nonEmailBugsEmailField="bugs.email field must be a string email. Deleted.";var emptyNormalizedBugs="Normalized value of bugs field is an empty object. Deleted.";var nonUrlHomepage="homepage field must be a string url. Deleted.";var invalidLicense="license should be a valid SPDX license expression";var typo="%s should probably be %s.";var require$$1$1={repositories:repositories,missingRepository:missingRepository,brokenGitUrl:brokenGitUrl,nonObjectScripts:nonObjectScripts,nonStringScript:nonStringScript,nonArrayFiles:nonArrayFiles,invalidFilename:invalidFilename,nonArrayBundleDependencies:nonArrayBundleDependencies,nonStringBundleDependency:nonStringBundleDependency,nonDependencyBundleDependency:nonDependencyBundleDependency,nonObjectDependencies:nonObjectDependencies,nonStringDependency:nonStringDependency,deprecatedArrayDependencies:deprecatedArrayDependencies,deprecatedModules:deprecatedModules,nonArrayKeywords:nonArrayKeywords,nonStringKeyword:nonStringKeyword,conflictingName:conflictingName,nonStringDescription:nonStringDescription,missingDescription:missingDescription,missingReadme:missingReadme,missingLicense:missingLicense,nonEmailUrlBugsString:nonEmailUrlBugsString,nonUrlBugsUrlField:nonUrlBugsUrlField,nonEmailBugsEmailField:nonEmailBugsEmailField,emptyNormalizedBugs:emptyNormalizedBugs,nonUrlHomepage:nonUrlHomepage,invalidLicense:invalidLicense,typo:typo};var make_warning;var hasRequiredMake_warning;function requireMake_warning(){if(hasRequiredMake_warning)return make_warning;hasRequiredMake_warning=1;var util=require$$0$1;var messages=require$$1$1;make_warning=function(){var args=Array.prototype.slice.call(arguments,0);var warningName=args.shift();if(warningName==="typo"){return makeTypoWarning.apply(null,args)}else{var msgTemplate=messages[warningName]?messages[warningName]:warningName+": '%s'";args.unshift(msgTemplate);return util.format.apply(null,args)}};function makeTypoWarning(providedName,probableName,field){if(field){providedName=field+"['"+providedName+"']";probableName=field+"['"+probableName+"']"}return util.format(messages.typo,providedName,probableName)}return make_warning}var normalize_1;var hasRequiredNormalize;function requireNormalize(){if(hasRequiredNormalize)return normalize_1;hasRequiredNormalize=1;normalize_1=normalize;var fixer=requireFixer();normalize.fixer=fixer;var makeWarning=requireMake_warning();var fieldsToFix=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"];var otherThingsToFix=["dependencies","people","typos"];var thingsToFix=fieldsToFix.map((function(fieldName){return ucFirst(fieldName)+"Field"}));thingsToFix=thingsToFix.concat(otherThingsToFix);function normalize(data,warn,strict){if(warn===true){warn=null;strict=true}if(!strict){strict=false}if(!warn||data.private){warn=function(msg){}}if(data.scripts&&data.scripts.install==="node-gyp rebuild"&&!data.scripts.preinstall){data.gypfile=true}fixer.warn=function(){warn(makeWarning.apply(null,arguments))};thingsToFix.forEach((function(thingName){fixer["fix"+ucFirst(thingName)](data,strict)}));data._id=data.name+"@"+data.version}function ucFirst(string){return string.charAt(0).toUpperCase()+string.slice(1)}return normalize_1}var hasRequiredLib$h;function requireLib$h(){if(hasRequiredLib$h)return lib$o;hasRequiredLib$h=1;var __importDefault=lib$o&&lib$o.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(lib$o,"__esModule",{value:true});lib$o.safeReadPackageJsonFromDir=lib$o.safeReadPackageJson=lib$o.readPackageJsonFromDir=lib$o.readPackageJson=void 0;const path_1=__importDefault(require$$0$6);const error_1=requireLib$m();const load_json_file_1=__importDefault(requireLoadJsonFile());const normalize_package_data_1=__importDefault(requireNormalize());async function readPackageJson(pkgPath){try{const manifest=await(0,load_json_file_1.default)(pkgPath);(0,normalize_package_data_1.default)(manifest);return manifest}catch(err){if(err.code)throw err;throw new error_1.PnpmError("BAD_PACKAGE_JSON",`${pkgPath}: ${err.message}`)}}lib$o.readPackageJson=readPackageJson;async function readPackageJsonFromDir(pkgPath){return readPackageJson(path_1.default.join(pkgPath,"package.json"))}lib$o.readPackageJsonFromDir=readPackageJsonFromDir;async function safeReadPackageJson(pkgPath){try{return await readPackageJson(pkgPath)}catch(err){if(err.code!=="ENOENT")throw err;return null}}lib$o.safeReadPackageJson=safeReadPackageJson;async function safeReadPackageJsonFromDir(pkgPath){return safeReadPackageJson(path_1.default.join(pkgPath,"package.json"))}lib$o.safeReadPackageJsonFromDir=safeReadPackageJsonFromDir;return lib$o}var lib$h={};var runLifecycleHook={};var lib$g={};var all={};var contextLogger={};var lib$f={};var logger={};var fastSafeStringify;var hasRequiredFastSafeStringify;function requireFastSafeStringify(){if(hasRequiredFastSafeStringify)return fastSafeStringify;hasRequiredFastSafeStringify=1;fastSafeStringify=stringify;stringify.default=stringify;stringify.stable=deterministicStringify;stringify.stableStringify=deterministicStringify;var LIMIT_REPLACE_NODE="[...]";var CIRCULAR_REPLACE_NODE="[Circular]";var arr=[];var replacerStack=[];function defaultOptions(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function stringify(obj,replacer,spacer,options){if(typeof options==="undefined"){options=defaultOptions()}decirc(obj,"",0,[],undefined,0,options);var res;try{if(replacerStack.length===0){res=JSON.stringify(obj,replacer,spacer)}else{res=JSON.stringify(obj,replaceGetterValues(replacer),spacer)}}catch(_){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{while(arr.length!==0){var part=arr.pop();if(part.length===4){Object.defineProperty(part[0],part[1],part[3])}else{part[0][part[1]]=part[2]}}}return res}function setReplace(replace,val,k,parent){var propertyDescriptor=Object.getOwnPropertyDescriptor(parent,k);if(propertyDescriptor.get!==undefined){if(propertyDescriptor.configurable){Object.defineProperty(parent,k,{value:replace});arr.push([parent,k,val,propertyDescriptor])}else{replacerStack.push([val,k,replace])}}else{parent[k]=replace;arr.push([parent,k,val])}}function decirc(val,k,edgeIndex,stack,parent,depth,options){depth+=1;var i;if(typeof val==="object"&&val!==null){for(i=0;i<stack.length;i++){if(stack[i]===val){setReplace(CIRCULAR_REPLACE_NODE,val,k,parent);return}}if(typeof options.depthLimit!=="undefined"&&depth>options.depthLimit){setReplace(LIMIT_REPLACE_NODE,val,k,parent);return}if(typeof options.edgesLimit!=="undefined"&&edgeIndex+1>options.edgesLimit){setReplace(LIMIT_REPLACE_NODE,val,k,parent);return}stack.push(val);if(Array.isArray(val)){for(i=0;i<val.length;i++){decirc(val[i],i,i,stack,val,depth,options)}}else{var keys=Object.keys(val);for(i=0;i<keys.length;i++){var key=keys[i];decirc(val[key],key,i,stack,val,depth,options)}}stack.pop()}}function compareFunction(a,b){if(a<b){return-1}if(a>b){return 1}return 0}function deterministicStringify(obj,replacer,spacer,options){if(typeof options==="undefined"){options=defaultOptions()}var tmp=deterministicDecirc(obj,"",0,[],undefined,0,options)||obj;var res;try{if(replacerStack.length===0){res=JSON.stringify(tmp,replacer,spacer)}else{res=JSON.stringify(tmp,replaceGetterValues(replacer),spacer)}}catch(_){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{while(arr.length!==0){var part=arr.pop();if(part.length===4){Object.defineProperty(part[0],part[1],part[3])}else{part[0][part[1]]=part[2]}}}return res}function deterministicDecirc(val,k,edgeIndex,stack,parent,depth,options){depth+=1;var i;if(typeof val==="object"&&val!==null){for(i=0;i<stack.length;i++){if(stack[i]===val){setReplace(CIRCULAR_REPLACE_NODE,val,k,parent);return}}try{if(typeof val.toJSON==="function"){return}}catch(_){return}if(typeof options.depthLimit!=="undefined"&&depth>options.depthLimit){setReplace(LIMIT_REPLACE_NODE,val,k,parent);return}if(typeof options.edgesLimit!=="undefined"&&edgeIndex+1>options.edgesLimit){setReplace(LIMIT_REPLACE_NODE,val,k,parent);return}stack.push(val);if(Array.isArray(val)){for(i=0;i<val.length;i++){deterministicDecirc(val[i],i,i,stack,val,depth,options)}}else{var tmp={};var keys=Object.keys(val).sort(compareFunction);for(i=0;i<keys.length;i++){var key=keys[i];deterministicDecirc(val[key],key,i,stack,val,depth,options);tmp[key]=val[key]}if(typeof parent!=="undefined"){arr.push([parent,k,val]);parent[k]=tmp}else{return tmp}}stack.pop()}}function replaceGetterValues(replacer){replacer=typeof replacer!=="undefined"?replacer:function(k,v){return v};return function(key,val){if(replacerStack.length>0){for(var i=0;i<replacerStack.length;i++){var part=replacerStack[i];if(part[1]===key&&part[0]===val){val=part[2];replacerStack.splice(i,1);break}}}return replacer.call(this,key,val)}}return fastSafeStringify}var individual;var hasRequiredIndividual;function requireIndividual(){if(hasRequiredIndividual)return individual;hasRequiredIndividual=1;var root=typeof window!=="undefined"?window:typeof commonjsGlobal!=="undefined"?commonjsGlobal:{};individual=Individual;function Individual(key,value){if(key in root){return root[key]}root[key]=value;return value}return individual}var format_1;var hasRequiredFormat;function requireFormat(){if(hasRequiredFormat)return format_1;hasRequiredFormat=1;const utilformat=require$$0$1.format;function format(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16){if(a16!==undefined){return utilformat(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16)}if(a15!==undefined){return utilformat(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15)}if(a14!==undefined){return utilformat(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14)}if(a13!==undefined){return utilformat(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13)}if(a12!==undefined){return utilformat(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12)}if(a11!==undefined){return utilformat(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11)}if(a10!==undefined){return utilformat(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)}if(a9!==undefined){return utilformat(a1,a2,a3,a4,a5,a6,a7,a8,a9)}if(a8!==undefined){return utilformat(a1,a2,a3,a4,a5,a6,a7,a8)}if(a7!==undefined){return utilformat(a1,a2,a3,a4,a5,a6,a7)}if(a6!==undefined){return utilformat(a1,a2,a3,a4,a5,a6)}if(a5!==undefined){return utilformat(a1,a2,a3,a4,a5)}if(a4!==undefined){return utilformat(a1,a2,a3,a4)}if(a3!==undefined){return utilformat(a1,a2,a3)}if(a2!==undefined){return utilformat(a1,a2)}return a1}format_1=format;return format_1}var bole_1;var hasRequiredBole;function requireBole(){if(hasRequiredBole)return bole_1;hasRequiredBole=1;const _stringify=requireFastSafeStringify();const individual=requireIndividual()("$$bole",{fastTime:false});const format=requireFormat();const levels="debug info warn error".split(" ");const os=require$$0$5;const pid=process.pid;let hasObjMode=false;const scache=[];let hostname;try{hostname=os.hostname()}catch(e){hostname=os.version().indexOf("Windows 7 ")===0?"windows7":"hostname-unknown"}const hostnameSt=_stringify(hostname);for(const level of levels){scache[level]=',"hostname":'+hostnameSt+',"pid":'+pid+',"level":"'+level;if(!Array.isArray(individual[level])){individual[level]=[]}}function stackToString(e){let s=e.stack;let ce;if(typeof e.cause==="function"&&(ce=e.cause())){s+="\nCaused by: "+stackToString(ce)}return s}function errorToOut(err,out){out.err={name:err.name,message:err.message,code:err.code,stack:stackToString(err)}}function requestToOut(req,out){out.req={method:req.method,url:req.url,headers:req.headers,remoteAddress:req.connection.remoteAddress,remotePort:req.connection.remotePort}}function objectToOut(obj,out){for(const k in obj){if(Object.prototype.hasOwnProperty.call(obj,k)&&obj[k]!==undefined){out[k]=obj[k]}}}function objectMode(stream){return stream._writableState&&stream._writableState.objectMode===true}function stringify(level,name,message,obj){let s='{"time":'+(individual.fastTime?Date.now():'"'+(new Date).toISOString()+'"')+scache[level]+'","name":'+name+(message!==undefined?',"message":'+_stringify(message):"");for(const k in obj){s+=","+_stringify(k)+":"+_stringify(obj[k])}s+="}";return s}function extend(level,name,message,obj){const newObj={time:individual.fastTime?Date.now():(new Date).toISOString(),hostname:hostname,pid:pid,level:level,name:name};if(message!==undefined){obj.message=message}for(const k in obj){newObj[k]=obj[k]}return newObj}function levelLogger(level,name){const outputs=individual[level];const nameSt=_stringify(name);return function namedLevelLogger(inp,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16){if(outputs.length===0){return}const out={};let objectOut;let i=0;const l=outputs.length;let stringified;let message;if(typeof inp==="string"||inp==null){if(!(message=format(inp,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16))){message=undefined}}else{if(inp instanceof Error){if(typeof a2==="object"){objectToOut(a2,out);errorToOut(inp,out);if(!(message=format(a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16))){message=undefined}}else{errorToOut(inp,out);if(!(message=format(a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16))){message=undefined}}}else{if(!(message=format(a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16))){message=undefined}}if(typeof inp==="boolean"){message=String(inp)}else if(typeof inp==="object"&&!(inp instanceof Error)){if(inp.method&&inp.url&&inp.headers&&inp.socket){requestToOut(inp,out)}else{objectToOut(inp,out)}}}if(l===1&&!hasObjMode){outputs[0].write(Buffer.from(stringify(level,nameSt,message,out)+"\n"));return}for(;i<l;i++){if(objectMode(outputs[i])){if(objectOut===undefined){objectOut=extend(level,name,message,out)}outputs[i].write(objectOut)}else{if(stringified===undefined){stringified=Buffer.from(stringify(level,nameSt,message,out)+"\n")}outputs[i].write(stringified)}}}}function bole(name){function boleLogger(subname){return bole(name+":"+subname)}function makeLogger(p,level){p[level]=levelLogger(level,name);return p}return levels.reduce(makeLogger,boleLogger)}bole.output=function output(opt){let b=false;if(Array.isArray(opt)){opt.forEach(bole.output);return bole}if(typeof opt.level!=="string"){throw new TypeError('Must provide a "level" option')}for(const level of levels){if(!b&&level===opt.level){b=true}if(b){if(opt.stream&&objectMode(opt.stream)){hasObjMode=true}individual[level].push(opt.stream)}}return bole};bole.reset=function reset(){for(const level of levels){individual[level].splice(0,individual[level].length)}individual.fastTime=false;return bole};bole.setFastTime=function setFastTime(b){if(!arguments.length){individual.fastTime=true}else{individual.fastTime=b}return bole};bole_1=bole;return bole_1}var hasRequiredLogger;function requireLogger(){if(hasRequiredLogger)return logger;hasRequiredLogger=1;var __importDefault=logger&&logger.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(logger,"__esModule",{value:true});logger.globalInfo=logger.globalWarn=logger.logger=void 0;const bole_1=__importDefault(requireBole());bole_1.default.setFastTime();logger.logger=(0,bole_1.default)("pnpm");const globalLogger=(0,bole_1.default)("pnpm:global");function globalWarn(message){globalLogger.warn(message)}logger.globalWarn=globalWarn;function globalInfo(message){globalLogger.info(message)}logger.globalInfo=globalInfo;return logger}var streamParser={};var ndjson={};var through2={exports:{}};var hasRequiredThrough2;function requireThrough2(){if(hasRequiredThrough2)return through2.exports;hasRequiredThrough2=1;const{Transform:Transform}=require$$0$4;function inherits(fn,sup){fn.super_=sup;fn.prototype=Object.create(sup.prototype,{constructor:{value:fn,enumerable:false,writable:true,configurable:true}})}function through2$1(construct){return(options,transform,flush)=>{if(typeof options==="function"){flush=transform;transform=options;options={}}if(typeof transform!=="function"){transform=(chunk,enc,cb)=>cb(null,chunk)}if(typeof flush!=="function"){flush=null}return construct(options,transform,flush)}}const make=through2$1(((options,transform,flush)=>{const t2=new Transform(options);t2._transform=transform;if(flush){t2._flush=flush}return t2}));const ctor=through2$1(((options,transform,flush)=>{function Through2(override){if(!(this instanceof Through2)){return new Through2(override)}this.options=Object.assign({},options,override);Transform.call(this,this.options);this._transform=transform;if(flush){this._flush=flush}}inherits(Through2,Transform);return Through2}));const obj=through2$1((function(options,transform,flush){const t2=new Transform(Object.assign({objectMode:true,highWaterMark:16},options));t2._transform=transform;if(flush){t2._flush=flush}return t2}));through2.exports=make;through2.exports.ctor=ctor;through2.exports.obj=obj;return through2.exports}var split2;var hasRequiredSplit2;function requireSplit2(){if(hasRequiredSplit2)return split2;hasRequiredSplit2=1;const{Transform:Transform}=require$$0$4;const{StringDecoder:StringDecoder}=require$$1$5;const kLast=Symbol("last");const kDecoder=Symbol("decoder");function transform(chunk,enc,cb){var list;if(this.overflow){var buf=this[kDecoder].write(chunk);list=buf.split(this.matcher);if(list.length===1)return cb();list.shift();this.overflow=false}else{this[kLast]+=this[kDecoder].write(chunk);list=this[kLast].split(this.matcher)}this[kLast]=list.pop();for(var i=0;i<list.length;i++){try{push(this,this.mapper(list[i]))}catch(error){return cb(error)}}this.overflow=this[kLast].length>this.maxLength;if(this.overflow&&!this.skipOverflow)return cb(new Error("maximum buffer reached"));cb()}function flush(cb){this[kLast]+=this[kDecoder].end();if(this[kLast]){try{push(this,this.mapper(this[kLast]))}catch(error){return cb(error)}}cb()}function push(self,val){if(val!==undefined){self.push(val)}}function noop(incoming){return incoming}function split(matcher,mapper,options){matcher=matcher||/\r?\n/;mapper=mapper||noop;options=options||{};switch(arguments.length){case 1:if(typeof matcher==="function"){mapper=matcher;matcher=/\r?\n/}else if(typeof matcher==="object"&&!(matcher instanceof RegExp)){options=matcher;matcher=/\r?\n/}break;case 2:if(typeof matcher==="function"){options=mapper;mapper=matcher;matcher=/\r?\n/}else if(typeof mapper==="object"){options=mapper;mapper=noop}}options=Object.assign({},options);options.transform=transform;options.flush=flush;options.readableObjectMode=true;const stream=new Transform(options);stream[kLast]="";stream[kDecoder]=new StringDecoder("utf8");stream.matcher=matcher;stream.mapper=mapper;stream.maxLength=options.maxLength;stream.skipOverflow=options.skipOverflow;stream.overflow=false;return stream}split2=split;return split2}var stringify$2={exports:{}};var hasRequiredStringify$1;function requireStringify$1(){if(hasRequiredStringify$1)return stringify$2.exports;hasRequiredStringify$1=1;(function(module,exports){exports=module.exports=stringify;exports.getSerialize=serializer;function stringify(obj,replacer,spaces,cycleReplacer){return JSON.stringify(obj,serializer(replacer,cycleReplacer),spaces)}function serializer(replacer,cycleReplacer){var stack=[],keys=[];if(cycleReplacer==null)cycleReplacer=function(key,value){if(stack[0]===value)return"[Circular ~]";return"[Circular ~."+keys.slice(0,stack.indexOf(value)).join(".")+"]"};return function(key,value){if(stack.length>0){var thisPos=stack.indexOf(this);~thisPos?stack.splice(thisPos+1):stack.push(this);~thisPos?keys.splice(thisPos,Infinity,key):keys.push(key);if(~stack.indexOf(value))value=cycleReplacer.call(this,key,value)}else stack.push(value);return replacer==null?value:replacer.call(this,key,value)}}})(stringify$2,stringify$2.exports);return stringify$2.exports}var hasRequiredNdjson;function requireNdjson(){if(hasRequiredNdjson)return ndjson;hasRequiredNdjson=1;const through=requireThrough2();const split=requireSplit2();const{EOL:EOL}=require$$0$5;const stringify=requireStringify$1();ndjson.stringify=opts=>through.obj(opts,((obj,_,cb)=>{cb(null,stringify(obj)+EOL)}));ndjson.parse=opts=>{opts=opts||{};opts.strict=opts.strict!==false;function parseRow(row){try{if(row)return JSON.parse(row)}catch(e){if(opts.strict){this.emit("error",new Error("Could not parse row "+row.slice(0,50)+"..."))}}}return split(parseRow,opts)};return ndjson}var hasRequiredStreamParser;function requireStreamParser(){if(hasRequiredStreamParser)return streamParser;hasRequiredStreamParser=1;var __importDefault=streamParser&&streamParser.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(streamParser,"__esModule",{value:true});streamParser.createStreamParser=streamParser.streamParser=void 0;const bole_1=__importDefault(requireBole());const ndjson_1=__importDefault(requireNdjson());streamParser.streamParser=createStreamParser();function createStreamParser(){const sp=ndjson_1.default.parse();bole_1.default.output([{level:"debug",stream:sp}]);return sp}streamParser.createStreamParser=createStreamParser;return streamParser}var writeToConsole={};var hasRequiredWriteToConsole;function requireWriteToConsole(){if(hasRequiredWriteToConsole)return writeToConsole;hasRequiredWriteToConsole=1;var __importDefault=writeToConsole&&writeToConsole.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(writeToConsole,"__esModule",{value:true});writeToConsole.writeToConsole=void 0;const bole_1=__importDefault(requireBole());function writeToConsole$1(){bole_1.default.output([{level:"debug",stream:process.stdout}])}writeToConsole.writeToConsole=writeToConsole$1;return writeToConsole}var hasRequiredLib$g;function requireLib$g(){if(hasRequiredLib$g)return lib$f;hasRequiredLib$g=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.writeToConsole=exports.streamParser=exports.createStreamParser=exports.globalWarn=exports.globalInfo=exports.logger=void 0;var logger_1=requireLogger();Object.defineProperty(exports,"logger",{enumerable:true,get:function(){return logger_1.logger}});Object.defineProperty(exports,"globalInfo",{enumerable:true,get:function(){return logger_1.globalInfo}});Object.defineProperty(exports,"globalWarn",{enumerable:true,get:function(){return logger_1.globalWarn}});var streamParser_1=requireStreamParser();Object.defineProperty(exports,"createStreamParser",{enumerable:true,get:function(){return streamParser_1.createStreamParser}});Object.defineProperty(exports,"streamParser",{enumerable:true,get:function(){return streamParser_1.streamParser}});var writeToConsole_1=requireWriteToConsole();Object.defineProperty(exports,"writeToConsole",{enumerable:true,get:function(){return writeToConsole_1.writeToConsole}})})(lib$f);return lib$f}var hasRequiredContextLogger;function requireContextLogger(){if(hasRequiredContextLogger)return contextLogger;hasRequiredContextLogger=1;Object.defineProperty(contextLogger,"__esModule",{value:true});contextLogger.contextLogger=void 0;const logger_1=requireLib$g();contextLogger.contextLogger=(0,logger_1.logger)("context");return contextLogger}var deprecationLogger={};var hasRequiredDeprecationLogger;function requireDeprecationLogger(){if(hasRequiredDeprecationLogger)return deprecationLogger;hasRequiredDeprecationLogger=1;Object.defineProperty(deprecationLogger,"__esModule",{value:true});deprecationLogger.deprecationLogger=void 0;const logger_1=requireLib$g();deprecationLogger.deprecationLogger=(0,logger_1.logger)("deprecation");return deprecationLogger}var fetchingProgressLogger={};var hasRequiredFetchingProgressLogger;function requireFetchingProgressLogger(){if(hasRequiredFetchingProgressLogger)return fetchingProgressLogger;hasRequiredFetchingProgressLogger=1;Object.defineProperty(fetchingProgressLogger,"__esModule",{value:true});fetchingProgressLogger.fetchingProgressLogger=void 0;const logger_1=requireLib$g();fetchingProgressLogger.fetchingProgressLogger=(0,logger_1.logger)("fetching-progress");return fetchingProgressLogger}var hookLogger={};var hasRequiredHookLogger;function requireHookLogger(){if(hasRequiredHookLogger)return hookLogger;hasRequiredHookLogger=1;Object.defineProperty(hookLogger,"__esModule",{value:true});hookLogger.hookLogger=void 0;const logger_1=requireLib$g();hookLogger.hookLogger=(0,logger_1.logger)("hook");return hookLogger}var installCheckLogger={};var hasRequiredInstallCheckLogger;function requireInstallCheckLogger(){if(hasRequiredInstallCheckLogger)return installCheckLogger;hasRequiredInstallCheckLogger=1;Object.defineProperty(installCheckLogger,"__esModule",{value:true});installCheckLogger.installCheckLogger=void 0;const logger_1=requireLib$g();installCheckLogger.installCheckLogger=(0,logger_1.logger)("install-check");return installCheckLogger}var lifecycleLogger={};var hasRequiredLifecycleLogger;function requireLifecycleLogger(){if(hasRequiredLifecycleLogger)return lifecycleLogger;hasRequiredLifecycleLogger=1;Object.defineProperty(lifecycleLogger,"__esModule",{value:true});lifecycleLogger.lifecycleLogger=void 0;const logger_1=requireLib$g();lifecycleLogger.lifecycleLogger=(0,logger_1.logger)("lifecycle");return lifecycleLogger}var linkLogger={};var hasRequiredLinkLogger;function requireLinkLogger(){if(hasRequiredLinkLogger)return linkLogger;hasRequiredLinkLogger=1;Object.defineProperty(linkLogger,"__esModule",{value:true});linkLogger.linkLogger=void 0;const logger_1=requireLib$g();linkLogger.linkLogger=(0,logger_1.logger)("link");return linkLogger}var packageImportMethodLogger={};var hasRequiredPackageImportMethodLogger;function requirePackageImportMethodLogger(){if(hasRequiredPackageImportMethodLogger)return packageImportMethodLogger;hasRequiredPackageImportMethodLogger=1;Object.defineProperty(packageImportMethodLogger,"__esModule",{value:true});packageImportMethodLogger.packageImportMethodLogger=void 0;const logger_1=requireLib$g();packageImportMethodLogger.packageImportMethodLogger=(0,logger_1.logger)("package-import-method");return packageImportMethodLogger}var packageManifestLogger={};var hasRequiredPackageManifestLogger;function requirePackageManifestLogger(){if(hasRequiredPackageManifestLogger)return packageManifestLogger;hasRequiredPackageManifestLogger=1;Object.defineProperty(packageManifestLogger,"__esModule",{value:true});packageManifestLogger.packageManifestLogger=void 0;const logger_1=requireLib$g();packageManifestLogger.packageManifestLogger=(0,logger_1.logger)("package-manifest");return packageManifestLogger}var peerDependencyIssues={};var hasRequiredPeerDependencyIssues;function requirePeerDependencyIssues(){if(hasRequiredPeerDependencyIssues)return peerDependencyIssues;hasRequiredPeerDependencyIssues=1;Object.defineProperty(peerDependencyIssues,"__esModule",{value:true});peerDependencyIssues.peerDependencyIssuesLogger=void 0;const logger_1=requireLib$g();peerDependencyIssues.peerDependencyIssuesLogger=(0,logger_1.logger)("peer-dependency-issues");return peerDependencyIssues}var progressLogger={};var hasRequiredProgressLogger;function requireProgressLogger(){if(hasRequiredProgressLogger)return progressLogger;hasRequiredProgressLogger=1;Object.defineProperty(progressLogger,"__esModule",{value:true});progressLogger.progressLogger=void 0;const logger_1=requireLib$g();progressLogger.progressLogger=(0,logger_1.logger)("progress");return progressLogger}var registryLogger={};var hasRequiredRegistryLogger;function requireRegistryLogger(){if(hasRequiredRegistryLogger)return registryLogger;hasRequiredRegistryLogger=1;Object.defineProperty(registryLogger,"__esModule",{value:true});return registryLogger}var removalLogger={};var hasRequiredRemovalLogger;function requireRemovalLogger(){if(hasRequiredRemovalLogger)return removalLogger;hasRequiredRemovalLogger=1;Object.defineProperty(removalLogger,"__esModule",{value:true});removalLogger.removalLogger=void 0;const logger_1=requireLib$g();removalLogger.removalLogger=(0,logger_1.logger)("removal");return removalLogger}var requestRetryLogger={};var hasRequiredRequestRetryLogger;function requireRequestRetryLogger(){if(hasRequiredRequestRetryLogger)return requestRetryLogger;hasRequiredRequestRetryLogger=1;Object.defineProperty(requestRetryLogger,"__esModule",{value:true});requestRetryLogger.requestRetryLogger=void 0;const logger_1=requireLib$g();requestRetryLogger.requestRetryLogger=(0,logger_1.logger)("request-retry");return requestRetryLogger}var rootLogger={};var hasRequiredRootLogger;function requireRootLogger(){if(hasRequiredRootLogger)return rootLogger;hasRequiredRootLogger=1;Object.defineProperty(rootLogger,"__esModule",{value:true});rootLogger.rootLogger=void 0;const logger_1=requireLib$g();rootLogger.rootLogger=(0,logger_1.logger)("root");return rootLogger}var scopeLogger={};var hasRequiredScopeLogger;function requireScopeLogger(){if(hasRequiredScopeLogger)return scopeLogger;hasRequiredScopeLogger=1;Object.defineProperty(scopeLogger,"__esModule",{value:true});scopeLogger.scopeLogger=void 0;const logger_1=requireLib$g();scopeLogger.scopeLogger=(0,logger_1.logger)("scope");return scopeLogger}var skippedOptionalDependencyLogger={};var hasRequiredSkippedOptionalDependencyLogger;function requireSkippedOptionalDependencyLogger(){if(hasRequiredSkippedOptionalDependencyLogger)return skippedOptionalDependencyLogger;hasRequiredSkippedOptionalDependencyLogger=1;Object.defineProperty(skippedOptionalDependencyLogger,"__esModule",{value:true});skippedOptionalDependencyLogger.skippedOptionalDependencyLogger=void 0;const logger_1=requireLib$g();skippedOptionalDependencyLogger.skippedOptionalDependencyLogger=(0,logger_1.logger)("skipped-optional-dependency");return skippedOptionalDependencyLogger}var stageLogger={};var hasRequiredStageLogger;function requireStageLogger(){if(hasRequiredStageLogger)return stageLogger;hasRequiredStageLogger=1;Object.defineProperty(stageLogger,"__esModule",{value:true});stageLogger.stageLogger=void 0;const logger_1=requireLib$g();stageLogger.stageLogger=(0,logger_1.logger)("stage");return stageLogger}var statsLogger={};var hasRequiredStatsLogger;function requireStatsLogger(){if(hasRequiredStatsLogger)return statsLogger;hasRequiredStatsLogger=1;Object.defineProperty(statsLogger,"__esModule",{value:true});statsLogger.statsLogger=void 0;const logger_1=requireLib$g();statsLogger.statsLogger=(0,logger_1.logger)("stats");return statsLogger}var summaryLogger={};var hasRequiredSummaryLogger;function requireSummaryLogger(){if(hasRequiredSummaryLogger)return summaryLogger;hasRequiredSummaryLogger=1;Object.defineProperty(summaryLogger,"__esModule",{value:true});summaryLogger.summaryLogger=void 0;const logger_1=requireLib$g();summaryLogger.summaryLogger=(0,logger_1.logger)("summary");return summaryLogger}var updateCheckLogger={};var hasRequiredUpdateCheckLogger;function requireUpdateCheckLogger(){if(hasRequiredUpdateCheckLogger)return updateCheckLogger;hasRequiredUpdateCheckLogger=1;Object.defineProperty(updateCheckLogger,"__esModule",{value:true});updateCheckLogger.updateCheckLogger=void 0;const logger_1=requireLib$g();updateCheckLogger.updateCheckLogger=(0,logger_1.logger)("update-check");return updateCheckLogger}var executionTimeLogger={};var hasRequiredExecutionTimeLogger;function requireExecutionTimeLogger(){if(hasRequiredExecutionTimeLogger)return executionTimeLogger;hasRequiredExecutionTimeLogger=1;Object.defineProperty(executionTimeLogger,"__esModule",{value:true});executionTimeLogger.executionTimeLogger=void 0;const logger_1=requireLib$g();executionTimeLogger.executionTimeLogger=(0,logger_1.logger)("execution-time");return executionTimeLogger}var hasRequiredAll;function requireAll(){if(hasRequiredAll)return all;hasRequiredAll=1;(function(exports){var __createBinding=all&&all.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;var desc=Object.getOwnPropertyDescriptor(m,k);if(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable)){desc={enumerable:true,get:function(){return m[k]}}}Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __exportStar=all&&all.__exportStar||function(m,exports){for(var p in m)if(p!=="default"&&!Object.prototype.hasOwnProperty.call(exports,p))__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:true});__exportStar(requireContextLogger(),exports);__exportStar(requireDeprecationLogger(),exports);__exportStar(requireFetchingProgressLogger(),exports);__exportStar(requireHookLogger(),exports);__exportStar(requireInstallCheckLogger(),exports);__exportStar(requireLifecycleLogger(),exports);__exportStar(requireLinkLogger(),exports);__exportStar(requirePackageImportMethodLogger(),exports);__exportStar(requirePackageManifestLogger(),exports);__exportStar(requirePeerDependencyIssues(),exports);__exportStar(requireProgressLogger(),exports);__exportStar(requireRegistryLogger(),exports);__exportStar(requireRemovalLogger(),exports);__exportStar(requireRequestRetryLogger(),exports);__exportStar(requireRootLogger(),exports);__exportStar(requireScopeLogger(),exports);__exportStar(requireSkippedOptionalDependencyLogger(),exports);__exportStar(requireStageLogger(),exports);__exportStar(requireStatsLogger(),exports);__exportStar(requireSummaryLogger(),exports);__exportStar(requireUpdateCheckLogger(),exports);__exportStar(requireExecutionTimeLogger(),exports)})(all);return all}var hasRequiredLib$f;function requireLib$f(){if(hasRequiredLib$f)return lib$g;hasRequiredLib$f=1;(function(exports){var __createBinding=lib$g&&lib$g.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;var desc=Object.getOwnPropertyDescriptor(m,k);if(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable)){desc={enumerable:true,get:function(){return m[k]}}}Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __exportStar=lib$g&&lib$g.__exportStar||function(m,exports){for(var p in m)if(p!=="default"&&!Object.prototype.hasOwnProperty.call(exports,p))__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:true});__exportStar(requireAll(),exports)})(lib$g);return lib$g}var npmLifecycle={exports:{}};var spawn_1;var hasRequiredSpawn;function requireSpawn(){if(hasRequiredSpawn)return spawn_1;hasRequiredSpawn=1;spawn_1=spawn;const _spawn=require$$0$8.spawn;const EventEmitter=require$$2$1.EventEmitter;let progressEnabled;let running=0;function startRunning(log){if(progressEnabled==null)progressEnabled=log.progressEnabled;if(progressEnabled)log.disableProgress();++running}function stopRunning(log){--running;if(progressEnabled&&running===0)log.enableProgress()}function willCmdOutput(stdio){if(stdio==="inherit")return true;if(!Array.isArray(stdio))return false;for(let fh=1;fh<=2;++fh){if(stdio[fh]==="inherit")return true;if(stdio[fh]===1||stdio[fh]===2)return true}return false}function spawn(cmd,args,options,log){const cmdWillOutput=willCmdOutput(options&&options.stdio);if(cmdWillOutput)startRunning(log);const raw=_spawn(cmd,args,options);const cooked=new EventEmitter;raw.on("error",(function(er){if(cmdWillOutput)stopRunning(log);er.file=cmd;cooked.emit("error",er)})).on("close",(function(code,signal){if(cmdWillOutput)stopRunning(log);if(code===127){const er=new Error("spawn ENOENT");er.code="ENOENT";er.errno="ENOENT";er.syscall="spawn";er.file=cmd;cooked.emit("error",er)}else{cooked.emit("close",code,signal)}}));cooked.stdin=raw.stdin;cooked.stdout=raw.stdout;cooked.stderr=raw.stderr;cooked.kill=function(sig){return raw.kill(sig)};return cooked}return spawn_1}var lib$e={}; |
| /*! ***************************************************************************** |
| Copyright (c) Microsoft Corporation. |
| |
| Permission to use, copy, modify, and/or distribute this software for any |
| purpose with or without fee is hereby granted. |
| |
| 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. |
| ***************************************************************************** */var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b}||function(d,b){for(var p in b)if(b.hasOwnProperty(p))d[p]=b[p]};return extendStatics(d,b)};function __extends(d,b){extendStatics(d,b);function __(){this.constructor=d}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __)}var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i<n;i++){s=arguments[i];for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p))t[p]=s[p]}return t};return __assign.apply(this,arguments)};function __rest(s,e){var t={};for(var p in s)if(Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0)t[p]=s[p];if(s!=null&&typeof Object.getOwnPropertySymbols==="function")for(var i=0,p=Object.getOwnPropertySymbols(s);i<p.length;i++){if(e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i]))t[p[i]]=s[p[i]]}return t}function __decorate(decorators,target,key,desc){var c=arguments.length,r=c<3?target:desc===null?desc=Object.getOwnPropertyDescriptor(target,key):desc,d;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")r=Reflect.decorate(decorators,target,key,desc);else for(var i=decorators.length-1;i>=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r}function __param(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex)}}function __metadata(metadataKey,metadataValue){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(metadataKey,metadataValue)}function __awaiter(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P((function(resolve){resolve(value)}))}return new(P||(P=Promise))((function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))}function __generator(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),throw:verb(1),return:verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this}),g;function verb(n){return function(v){return step([n,v])}}function step(op){if(f)throw new TypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return{value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(op[0]===6&&_.label<t[1]){_.label=t[1];t=op;break}if(t&&_.label<t[2]){_.label=t[2];_.ops.push(op);break}if(t[2])_.ops.pop();_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e];y=0}finally{f=t=0}if(op[0]&5)throw op[1];return{value:op[0]?op[1]:void 0,done:true}}}function __createBinding(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]}function __exportStar(m,exports){for(var p in m)if(p!=="default"&&!exports.hasOwnProperty(p))exports[p]=m[p]}function __values(o){var s=typeof Symbol==="function"&&Symbol.iterator,m=s&&o[s],i=0;if(m)return m.call(o);if(o&&typeof o.length==="number")return{next:function(){if(o&&i>=o.length)o=void 0;return{value:o&&o[i++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")}function __read(o,n){var m=typeof Symbol==="function"&&o[Symbol.iterator];if(!m)return o;var i=m.call(o),r,ar=[],e;try{while((n===void 0||n-- >0)&&!(r=i.next()).done)ar.push(r.value)}catch(error){e={error:error}}finally{try{if(r&&!r.done&&(m=i["return"]))m.call(i)}finally{if(e)throw e.error}}return ar}function __spread(){for(var ar=[],i=0;i<arguments.length;i++)ar=ar.concat(__read(arguments[i]));return ar}function __spreadArrays(){for(var s=0,i=0,il=arguments.length;i<il;i++)s+=arguments[i].length;for(var r=Array(s),k=0,i=0;i<il;i++)for(var a=arguments[i],j=0,jl=a.length;j<jl;j++,k++)r[k]=a[j];return r}function __await(v){return this instanceof __await?(this.v=v,this):new __await(v)}function __asyncGenerator(thisArg,_arguments,generator){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var g=generator.apply(thisArg,_arguments||[]),i,q=[];return i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i;function verb(n){if(g[n])i[n]=function(v){return new Promise((function(a,b){q.push([n,v,a,b])>1||resume(n,v)}))}}function resume(n,v){try{step(g[n](v))}catch(e){settle(q[0][3],e)}}function step(r){r.value instanceof __await?Promise.resolve(r.value.v).then(fulfill,reject):settle(q[0][2],r)}function fulfill(value){resume("next",value)}function reject(value){resume("throw",value)}function settle(f,v){if(f(v),q.shift(),q.length)resume(q[0][0],q[0][1])}}function __asyncDelegator(o){var i,p;return i={},verb("next"),verb("throw",(function(e){throw e})),verb("return"),i[Symbol.iterator]=function(){return this},i;function verb(n,f){i[n]=o[n]?function(v){return(p=!p)?{value:__await(o[n](v)),done:n==="return"}:f?f(v):v}:f}}function __asyncValues(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var m=o[Symbol.asyncIterator],i;return m?m.call(o):(o=typeof __values==="function"?__values(o):o[Symbol.iterator](),i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this},i);function verb(n){i[n]=o[n]&&function(v){return new Promise((function(resolve,reject){v=o[n](v),settle(resolve,reject,v.done,v.value)}))}}function settle(resolve,reject,d,v){Promise.resolve(v).then((function(v){resolve({value:v,done:d})}),reject)}}function __makeTemplateObject(cooked,raw){if(Object.defineProperty){Object.defineProperty(cooked,"raw",{value:raw})}else{cooked.raw=raw}return cooked}function __importStar(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k in mod)if(Object.hasOwnProperty.call(mod,k))result[k]=mod[k];result.default=mod;return result}function __importDefault(mod){return mod&&mod.__esModule?mod:{default:mod}}function __classPrivateFieldGet(receiver,privateMap){if(!privateMap.has(receiver)){throw new TypeError("attempted to get private field on non-instance")}return privateMap.get(receiver)}function __classPrivateFieldSet(receiver,privateMap,value){if(!privateMap.has(receiver)){throw new TypeError("attempted to set private field on non-instance")}privateMap.set(receiver,value);return value}var tslib_es6=Object.freeze({__proto__:null,get __assign(){return __assign},__asyncDelegator:__asyncDelegator,__asyncGenerator:__asyncGenerator,__asyncValues:__asyncValues,__await:__await,__awaiter:__awaiter,__classPrivateFieldGet:__classPrivateFieldGet,__classPrivateFieldSet:__classPrivateFieldSet,__createBinding:__createBinding,__decorate:__decorate,__exportStar:__exportStar,__extends:__extends,__generator:__generator,__importDefault:__importDefault,__importStar:__importStar,__makeTemplateObject:__makeTemplateObject,__metadata:__metadata,__param:__param,__read:__read,__rest:__rest,__spread:__spread,__spreadArrays:__spreadArrays,__values:__values});var require$$0=getAugmentedNamespace(tslib_es6);var lib$d={};var constants$3={};var hasRequiredConstants$3;function requireConstants$3(){if(hasRequiredConstants$3)return constants$3;hasRequiredConstants$3=1;Object.defineProperty(constants$3,"__esModule",{value:true});constants$3.SAFE_TIME=constants$3.S_IFLNK=constants$3.S_IFREG=constants$3.S_IFDIR=constants$3.S_IFMT=void 0;constants$3.S_IFMT=61440;constants$3.S_IFDIR=16384;constants$3.S_IFREG=32768;constants$3.S_IFLNK=40960;constants$3.SAFE_TIME=456789e3;return constants$3}var statUtils={};var hasRequiredStatUtils;function requireStatUtils(){if(hasRequiredStatUtils)return statUtils;hasRequiredStatUtils=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.areStatsEqual=exports.convertToBigIntStats=exports.clearStats=exports.makeEmptyStats=exports.makeDefaultStats=exports.BigIntStatsEntry=exports.StatEntry=exports.DirEntry=exports.DEFAULT_MODE=void 0;const tslib_1=require$$0;const nodeUtils=tslib_1.__importStar(require$$0$1);const constants_1=requireConstants$3();exports.DEFAULT_MODE=constants_1.S_IFREG|420;class DirEntry{constructor(){this.name=``;this.mode=0}isBlockDevice(){return false}isCharacterDevice(){return false}isDirectory(){return(this.mode&constants_1.S_IFMT)===constants_1.S_IFDIR}isFIFO(){return false}isFile(){return(this.mode&constants_1.S_IFMT)===constants_1.S_IFREG}isSocket(){return false}isSymbolicLink(){return(this.mode&constants_1.S_IFMT)===constants_1.S_IFLNK}}exports.DirEntry=DirEntry;class StatEntry{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.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=exports.DEFAULT_MODE;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return false}isCharacterDevice(){return false}isDirectory(){return(this.mode&constants_1.S_IFMT)===constants_1.S_IFDIR}isFIFO(){return false}isFile(){return(this.mode&constants_1.S_IFMT)===constants_1.S_IFREG}isSocket(){return false}isSymbolicLink(){return(this.mode&constants_1.S_IFMT)===constants_1.S_IFLNK}}exports.StatEntry=StatEntry;class BigIntStatsEntry{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(exports.DEFAULT_MODE);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return false}isCharacterDevice(){return false}isDirectory(){return(this.mode&BigInt(constants_1.S_IFMT))===BigInt(constants_1.S_IFDIR)}isFIFO(){return false}isFile(){return(this.mode&BigInt(constants_1.S_IFMT))===BigInt(constants_1.S_IFREG)}isSocket(){return false}isSymbolicLink(){return(this.mode&BigInt(constants_1.S_IFMT))===BigInt(constants_1.S_IFLNK)}}exports.BigIntStatsEntry=BigIntStatsEntry;function makeDefaultStats(){return new StatEntry}exports.makeDefaultStats=makeDefaultStats;function makeEmptyStats(){return clearStats(makeDefaultStats())}exports.makeEmptyStats=makeEmptyStats;function clearStats(stats){for(const key in stats){if(Object.prototype.hasOwnProperty.call(stats,key)){const element=stats[key];if(typeof element===`number`){stats[key]=0}else if(typeof element===`bigint`){stats[key]=BigInt(0)}else if(nodeUtils.types.isDate(element)){stats[key]=new Date(0)}}}return stats}exports.clearStats=clearStats;function convertToBigIntStats(stats){const bigintStats=new BigIntStatsEntry;for(const key in stats){if(Object.prototype.hasOwnProperty.call(stats,key)){const element=stats[key];if(typeof element===`number`){bigintStats[key]=BigInt(element)}else if(nodeUtils.types.isDate(element)){bigintStats[key]=new Date(element)}}}bigintStats.atimeNs=bigintStats.atimeMs*BigInt(1e6);bigintStats.mtimeNs=bigintStats.mtimeMs*BigInt(1e6);bigintStats.ctimeNs=bigintStats.ctimeMs*BigInt(1e6);bigintStats.birthtimeNs=bigintStats.birthtimeMs*BigInt(1e6);return bigintStats}exports.convertToBigIntStats=convertToBigIntStats;function areStatsEqual(a,b){if(a.atimeMs!==b.atimeMs)return false;if(a.birthtimeMs!==b.birthtimeMs)return false;if(a.blksize!==b.blksize)return false;if(a.blocks!==b.blocks)return false;if(a.ctimeMs!==b.ctimeMs)return false;if(a.dev!==b.dev)return false;if(a.gid!==b.gid)return false;if(a.ino!==b.ino)return false;if(a.isBlockDevice()!==b.isBlockDevice())return false;if(a.isCharacterDevice()!==b.isCharacterDevice())return false;if(a.isDirectory()!==b.isDirectory())return false;if(a.isFIFO()!==b.isFIFO())return false;if(a.isFile()!==b.isFile())return false;if(a.isSocket()!==b.isSocket())return false;if(a.isSymbolicLink()!==b.isSymbolicLink())return false;if(a.mode!==b.mode)return false;if(a.mtimeMs!==b.mtimeMs)return false;if(a.nlink!==b.nlink)return false;if(a.rdev!==b.rdev)return false;if(a.size!==b.size)return false;if(a.uid!==b.uid)return false;const aN=a;const bN=b;if(aN.atimeNs!==bN.atimeNs)return false;if(aN.mtimeNs!==bN.mtimeNs)return false;if(aN.ctimeNs!==bN.ctimeNs)return false;if(aN.birthtimeNs!==bN.birthtimeNs)return false;return true}exports.areStatsEqual=areStatsEqual})(statUtils);return statUtils}var copyPromise={};var path$2={};var hasRequiredPath$2;function requirePath$2(){if(hasRequiredPath$2)return path$2;hasRequiredPath$2=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.toFilename=exports.convertPath=exports.ppath=exports.npath=exports.Filename=exports.PortablePath=void 0;const tslib_1=require$$0;const path_1=tslib_1.__importDefault(require$$0$6);var PathType;(function(PathType){PathType[PathType["File"]=0]="File";PathType[PathType["Portable"]=1]="Portable";PathType[PathType["Native"]=2]="Native"})(PathType||(PathType={}));exports.PortablePath={root:`/`,dot:`.`,parent:`..`};exports.Filename={nodeModules:`node_modules`,manifest:`package.json`,lockfile:`yarn.lock`,virtual:`__virtual__`,pnpJs:`.pnp.js`,pnpCjs:`.pnp.cjs`,rc:`.yarnrc.yml`};exports.npath=Object.create(path_1.default);exports.ppath=Object.create(path_1.default.posix);exports.npath.cwd=()=>process.cwd();exports.ppath.cwd=()=>toPortablePath(process.cwd());exports.ppath.resolve=(...segments)=>{if(segments.length>0&&exports.ppath.isAbsolute(segments[0])){return path_1.default.posix.resolve(...segments)}else{return path_1.default.posix.resolve(exports.ppath.cwd(),...segments)}};const contains=function(pathUtils,from,to){from=pathUtils.normalize(from);to=pathUtils.normalize(to);if(from===to)return`.`;if(!from.endsWith(pathUtils.sep))from=from+pathUtils.sep;if(to.startsWith(from)){return to.slice(from.length)}else{return null}};exports.npath.fromPortablePath=fromPortablePath;exports.npath.toPortablePath=toPortablePath;exports.npath.contains=(from,to)=>contains(exports.npath,from,to);exports.ppath.contains=(from,to)=>contains(exports.ppath,from,to);const WINDOWS_PATH_REGEXP=/^([a-zA-Z]:.*)$/;const UNC_WINDOWS_PATH_REGEXP=/^\/\/(\.\/)?(.*)$/;const PORTABLE_PATH_REGEXP=/^\/([a-zA-Z]:.*)$/;const UNC_PORTABLE_PATH_REGEXP=/^\/unc\/(\.dot\/)?(.*)$/;function fromPortablePath(p){if(process.platform!==`win32`)return p;let portablePathMatch,uncPortablePathMatch;if(portablePathMatch=p.match(PORTABLE_PATH_REGEXP))p=portablePathMatch[1];else if(uncPortablePathMatch=p.match(UNC_PORTABLE_PATH_REGEXP))p=`\\\\${uncPortablePathMatch[1]?`.\\`:``}${uncPortablePathMatch[2]}`;else return p;return p.replace(/\//g,`\\`)}function toPortablePath(p){if(process.platform!==`win32`)return p;p=p.replace(/\\/g,`/`);let windowsPathMatch,uncWindowsPathMatch;if(windowsPathMatch=p.match(WINDOWS_PATH_REGEXP))p=`/${windowsPathMatch[1]}`;else if(uncWindowsPathMatch=p.match(UNC_WINDOWS_PATH_REGEXP))p=`/unc/${uncWindowsPathMatch[1]?`.dot/`:``}${uncWindowsPathMatch[2]}`;return p}function convertPath(targetPathUtils,sourcePath){return targetPathUtils===exports.npath?fromPortablePath(sourcePath):toPortablePath(sourcePath)}exports.convertPath=convertPath;function toFilename(filename){if(exports.npath.parse(filename).dir!==``||exports.ppath.parse(filename).dir!==``)throw new Error(`Invalid filename: "${filename}"`);return filename}exports.toFilename=toFilename})(path$2);return path$2}var hasRequiredCopyPromise;function requireCopyPromise(){if(hasRequiredCopyPromise)return copyPromise;hasRequiredCopyPromise=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.copyPromise=exports.LinkStrategy=void 0;const tslib_1=require$$0;const fs_1=tslib_1.__importDefault(require$$0$2);const constants=tslib_1.__importStar(requireConstants$3());const path_1=requirePath$2();const defaultTime=new Date(constants.SAFE_TIME*1e3);var LinkStrategy;(function(LinkStrategy){LinkStrategy["Allow"]="allow";LinkStrategy["ReadOnly"]="readOnly"})(LinkStrategy=exports.LinkStrategy||(exports.LinkStrategy={}));async function copyPromise(destinationFs,destination,sourceFs,source,opts){const normalizedDestination=destinationFs.pathUtils.normalize(destination);const normalizedSource=sourceFs.pathUtils.normalize(source);const prelayout=[];const postlayout=[];const{atime:atime,mtime:mtime}=opts.stableTime?{atime:defaultTime,mtime:defaultTime}:await sourceFs.lstatPromise(normalizedSource);await destinationFs.mkdirpPromise(destinationFs.pathUtils.dirname(destination),{utimes:[atime,mtime]});const updateTime=typeof destinationFs.lutimesPromise===`function`?destinationFs.lutimesPromise.bind(destinationFs):destinationFs.utimesPromise.bind(destinationFs);await copyImpl(prelayout,postlayout,updateTime,destinationFs,normalizedDestination,sourceFs,normalizedSource,{...opts,didParentExist:true});for(const operation of prelayout)await operation();await Promise.all(postlayout.map((operation=>operation())))}exports.copyPromise=copyPromise;async function copyImpl(prelayout,postlayout,updateTime,destinationFs,destination,sourceFs,source,opts){var _a,_b;const destinationStat=opts.didParentExist?await maybeLStat(destinationFs,destination):null;const sourceStat=await sourceFs.lstatPromise(source);const{atime:atime,mtime:mtime}=opts.stableTime?{atime:defaultTime,mtime:defaultTime}:sourceStat;let updated;switch(true){case sourceStat.isDirectory():{updated=await copyFolder(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts)}break;case sourceStat.isFile():{updated=await copyFile(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts)}break;case sourceStat.isSymbolicLink():{updated=await copySymlink(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts)}break;default:{throw new Error(`Unsupported file type (${sourceStat.mode})`)}}if(updated||((_a=destinationStat===null||destinationStat===void 0?void 0:destinationStat.mtime)===null||_a===void 0?void 0:_a.getTime())!==mtime.getTime()||((_b=destinationStat===null||destinationStat===void 0?void 0:destinationStat.atime)===null||_b===void 0?void 0:_b.getTime())!==atime.getTime()){postlayout.push((()=>updateTime(destination,atime,mtime)));updated=true}if(destinationStat===null||(destinationStat.mode&511)!==(sourceStat.mode&511)){postlayout.push((()=>destinationFs.chmodPromise(destination,sourceStat.mode&511)));updated=true}return updated}async function maybeLStat(baseFs,p){try{return await baseFs.lstatPromise(p)}catch(e){return null}}async function copyFolder(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts){if(destinationStat!==null&&!destinationStat.isDirectory()){if(opts.overwrite){prelayout.push((async()=>destinationFs.removePromise(destination)));destinationStat=null}else{return false}}let updated=false;if(destinationStat===null){prelayout.push((async()=>{try{await destinationFs.mkdirPromise(destination,{mode:sourceStat.mode})}catch(err){if(err.code!==`EEXIST`){throw err}}}));updated=true}const entries=await sourceFs.readdirPromise(source);const nextOpts=opts.didParentExist&&!destinationStat?{...opts,didParentExist:false}:opts;if(opts.stableSort){for(const entry of entries.sort()){if(await copyImpl(prelayout,postlayout,updateTime,destinationFs,destinationFs.pathUtils.join(destination,entry),sourceFs,sourceFs.pathUtils.join(source,entry),nextOpts)){updated=true}}}else{const entriesUpdateStatus=await Promise.all(entries.map((async entry=>{await copyImpl(prelayout,postlayout,updateTime,destinationFs,destinationFs.pathUtils.join(destination,entry),sourceFs,sourceFs.pathUtils.join(source,entry),nextOpts)})));if(entriesUpdateStatus.some((status=>status))){updated=true}}return updated}const isCloneSupportedCache=new WeakMap;function makeLinkOperation(opFs,destination,source,sourceStat,linkStrategy){return async()=>{await opFs.linkPromise(source,destination);if(linkStrategy===LinkStrategy.ReadOnly){sourceStat.mode&=-147;await opFs.chmodPromise(destination,sourceStat.mode)}}}function makeCloneLinkOperation(opFs,destination,source,sourceStat,linkStrategy){const isCloneSupported=isCloneSupportedCache.get(opFs);if(typeof isCloneSupported===`undefined`){return async()=>{try{await opFs.copyFilePromise(source,destination,fs_1.default.constants.COPYFILE_FICLONE_FORCE);isCloneSupportedCache.set(opFs,true)}catch(err){if(err.code===`ENOSYS`||err.code===`ENOTSUP`){isCloneSupportedCache.set(opFs,false);await makeLinkOperation(opFs,destination,source,sourceStat,linkStrategy)()}else{throw err}}}}else{if(isCloneSupported){return async()=>opFs.copyFilePromise(source,destination,fs_1.default.constants.COPYFILE_FICLONE_FORCE)}else{return makeLinkOperation(opFs,destination,source,sourceStat,linkStrategy)}}}async function copyFile(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts){var _a;if(destinationStat!==null){if(opts.overwrite){prelayout.push((async()=>destinationFs.removePromise(destination)));destinationStat=null}else{return false}}const linkStrategy=(_a=opts.linkStrategy)!==null&&_a!==void 0?_a:null;const op=destinationFs===sourceFs?linkStrategy!==null?makeCloneLinkOperation(destinationFs,destination,source,sourceStat,linkStrategy):async()=>destinationFs.copyFilePromise(source,destination,fs_1.default.constants.COPYFILE_FICLONE):linkStrategy!==null?makeLinkOperation(destinationFs,destination,source,sourceStat,linkStrategy):async()=>destinationFs.writeFilePromise(destination,await sourceFs.readFilePromise(source));prelayout.push((async()=>op()));return true}async function copySymlink(prelayout,postlayout,updateTime,destinationFs,destination,destinationStat,sourceFs,source,sourceStat,opts){if(destinationStat!==null){if(opts.overwrite){prelayout.push((async()=>destinationFs.removePromise(destination)));destinationStat=null}else{return false}}prelayout.push((async()=>{await destinationFs.symlinkPromise((0,path_1.convertPath)(destinationFs.pathUtils,await sourceFs.readlinkPromise(source)),destination)}));return true}})(copyPromise);return copyPromise}var opendir={};var errors$1={};var hasRequiredErrors$1;function requireErrors$1(){if(hasRequiredErrors$1)return errors$1;hasRequiredErrors$1=1;Object.defineProperty(errors$1,"__esModule",{value:true});errors$1.LibzipError=errors$1.ERR_DIR_CLOSED=errors$1.EOPNOTSUPP=errors$1.ENOTEMPTY=errors$1.EROFS=errors$1.EEXIST=errors$1.EISDIR=errors$1.ENOTDIR=errors$1.ENOENT=errors$1.EBADF=errors$1.EINVAL=errors$1.ENOSYS=errors$1.EBUSY=void 0;function makeError(code,message){return Object.assign(new Error(`${code}: ${message}`),{code:code})}function EBUSY(message){return makeError(`EBUSY`,message)}errors$1.EBUSY=EBUSY;function ENOSYS(message,reason){return makeError(`ENOSYS`,`${message}, ${reason}`)}errors$1.ENOSYS=ENOSYS;function EINVAL(reason){return makeError(`EINVAL`,`invalid argument, ${reason}`)}errors$1.EINVAL=EINVAL;function EBADF(reason){return makeError(`EBADF`,`bad file descriptor, ${reason}`)}errors$1.EBADF=EBADF;function ENOENT(reason){return makeError(`ENOENT`,`no such file or directory, ${reason}`)}errors$1.ENOENT=ENOENT;function ENOTDIR(reason){return makeError(`ENOTDIR`,`not a directory, ${reason}`)}errors$1.ENOTDIR=ENOTDIR;function EISDIR(reason){return makeError(`EISDIR`,`illegal operation on a directory, ${reason}`)}errors$1.EISDIR=EISDIR;function EEXIST(reason){return makeError(`EEXIST`,`file already exists, ${reason}`)}errors$1.EEXIST=EEXIST;function EROFS(reason){return makeError(`EROFS`,`read-only filesystem, ${reason}`)}errors$1.EROFS=EROFS;function ENOTEMPTY(reason){return makeError(`ENOTEMPTY`,`directory not empty, ${reason}`)}errors$1.ENOTEMPTY=ENOTEMPTY;function EOPNOTSUPP(reason){return makeError(`EOPNOTSUPP`,`operation not supported, ${reason}`)}errors$1.EOPNOTSUPP=EOPNOTSUPP;function ERR_DIR_CLOSED(){return makeError(`ERR_DIR_CLOSED`,`Directory handle was closed`)}errors$1.ERR_DIR_CLOSED=ERR_DIR_CLOSED;class LibzipError extends Error{constructor(message,code){super(message);this.name=`Libzip Error`;this.code=code}}errors$1.LibzipError=LibzipError;return errors$1}var hasRequiredOpendir;function requireOpendir(){if(hasRequiredOpendir)return opendir;hasRequiredOpendir=1;Object.defineProperty(opendir,"__esModule",{value:true});opendir.opendir=opendir.CustomDir=void 0;const tslib_1=require$$0;const errors=tslib_1.__importStar(requireErrors$1());class CustomDir{constructor(path,nextDirent,opts={}){this.path=path;this.nextDirent=nextDirent;this.opts=opts;this.closed=false}throwIfClosed(){if(this.closed){throw errors.ERR_DIR_CLOSED()}}async*[Symbol.asyncIterator](){try{let dirent;while((dirent=await this.read())!==null){yield dirent}}finally{await this.close()}}read(cb){const dirent=this.readSync();if(typeof cb!==`undefined`)return cb(null,dirent);return Promise.resolve(dirent)}readSync(){this.throwIfClosed();return this.nextDirent()}close(cb){this.closeSync();if(typeof cb!==`undefined`)return cb(null);return Promise.resolve()}closeSync(){var _a,_b;this.throwIfClosed();(_b=(_a=this.opts).onClose)===null||_b===void 0?void 0:_b.call(_a);this.closed=true}}opendir.CustomDir=CustomDir;function opendir$1(fakeFs,path,entries,opts){const nextDirent=()=>{const filename=entries.shift();if(typeof filename===`undefined`)return null;return Object.assign(fakeFs.statSync(fakeFs.pathUtils.join(path,filename)),{name:filename})};return new CustomDir(path,nextDirent,opts)}opendir.opendir=opendir$1;return opendir}var FakeFS={};var hasRequiredFakeFS;function requireFakeFS(){if(hasRequiredFakeFS)return FakeFS;hasRequiredFakeFS=1;Object.defineProperty(FakeFS,"__esModule",{value:true});FakeFS.normalizeLineEndings=FakeFS.BasePortableFakeFS=FakeFS.FakeFS=void 0;const os_1=require$$0$5;const copyPromise_1=requireCopyPromise();const path_1=requirePath$2();let FakeFS$1=class FakeFS{constructor(pathUtils){this.pathUtils=pathUtils}async*genTraversePromise(init,{stableSort:stableSort=false}={}){const stack=[init];while(stack.length>0){const p=stack.shift();const entry=await this.lstatPromise(p);if(entry.isDirectory()){const entries=await this.readdirPromise(p);if(stableSort){for(const entry of entries.sort()){stack.push(this.pathUtils.join(p,entry))}}else{throw new Error(`Not supported`)}}else{yield p}}}async removePromise(p,{recursive:recursive=true,maxRetries:maxRetries=5}={}){let stat;try{stat=await this.lstatPromise(p)}catch(error){if(error.code===`ENOENT`){return}else{throw error}}if(stat.isDirectory()){if(recursive){const entries=await this.readdirPromise(p);await Promise.all(entries.map((entry=>this.removePromise(this.pathUtils.resolve(p,entry)))))}for(let t=0;t<=maxRetries;t++){try{await this.rmdirPromise(p);break}catch(error){if(error.code!==`EBUSY`&&error.code!==`ENOTEMPTY`){throw error}else if(t<maxRetries){await new Promise((resolve=>setTimeout(resolve,t*100)))}}}}else{await this.unlinkPromise(p)}}removeSync(p,{recursive:recursive=true}={}){let stat;try{stat=this.lstatSync(p)}catch(error){if(error.code===`ENOENT`){return}else{throw error}}if(stat.isDirectory()){if(recursive)for(const entry of this.readdirSync(p))this.removeSync(this.pathUtils.resolve(p,entry));this.rmdirSync(p)}else{this.unlinkSync(p)}}async mkdirpPromise(p,{chmod:chmod,utimes:utimes}={}){p=this.resolve(p);if(p===this.pathUtils.dirname(p))return undefined;const parts=p.split(this.pathUtils.sep);let createdDirectory;for(let u=2;u<=parts.length;++u){const subPath=parts.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(subPath)){try{await this.mkdirPromise(subPath)}catch(error){if(error.code===`EEXIST`){continue}else{throw error}}createdDirectory!==null&&createdDirectory!==void 0?createdDirectory:createdDirectory=subPath;if(chmod!=null)await this.chmodPromise(subPath,chmod);if(utimes!=null){await this.utimesPromise(subPath,utimes[0],utimes[1])}else{const parentStat=await this.statPromise(this.pathUtils.dirname(subPath));await this.utimesPromise(subPath,parentStat.atime,parentStat.mtime)}}}return createdDirectory}mkdirpSync(p,{chmod:chmod,utimes:utimes}={}){p=this.resolve(p);if(p===this.pathUtils.dirname(p))return undefined;const parts=p.split(this.pathUtils.sep);let createdDirectory;for(let u=2;u<=parts.length;++u){const subPath=parts.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(subPath)){try{this.mkdirSync(subPath)}catch(error){if(error.code===`EEXIST`){continue}else{throw error}}createdDirectory!==null&&createdDirectory!==void 0?createdDirectory:createdDirectory=subPath;if(chmod!=null)this.chmodSync(subPath,chmod);if(utimes!=null){this.utimesSync(subPath,utimes[0],utimes[1])}else{const parentStat=this.statSync(this.pathUtils.dirname(subPath));this.utimesSync(subPath,parentStat.atime,parentStat.mtime)}}}return createdDirectory}async copyPromise(destination,source,{baseFs:baseFs=this,overwrite:overwrite=true,stableSort:stableSort=false,stableTime:stableTime=false,linkStrategy:linkStrategy=null}={}){return await(0,copyPromise_1.copyPromise)(this,destination,baseFs,source,{overwrite:overwrite,stableSort:stableSort,stableTime:stableTime,linkStrategy:linkStrategy})}copySync(destination,source,{baseFs:baseFs=this,overwrite:overwrite=true}={}){const stat=baseFs.lstatSync(source);const exists=this.existsSync(destination);if(stat.isDirectory()){this.mkdirpSync(destination);const directoryListing=baseFs.readdirSync(source);for(const entry of directoryListing){this.copySync(this.pathUtils.join(destination,entry),baseFs.pathUtils.join(source,entry),{baseFs:baseFs,overwrite:overwrite})}}else if(stat.isFile()){if(!exists||overwrite){if(exists)this.removeSync(destination);const content=baseFs.readFileSync(source);this.writeFileSync(destination,content)}}else if(stat.isSymbolicLink()){if(!exists||overwrite){if(exists)this.removeSync(destination);const target=baseFs.readlinkSync(source);this.symlinkSync((0,path_1.convertPath)(this.pathUtils,target),destination)}}else{throw new Error(`Unsupported file type (file: ${source}, mode: 0o${stat.mode.toString(8).padStart(6,`0`)})`)}const mode=stat.mode&511;this.chmodSync(destination,mode)}async changeFilePromise(p,content,opts={}){if(Buffer.isBuffer(content)){return this.changeFileBufferPromise(p,content,opts)}else{return this.changeFileTextPromise(p,content,opts)}}async changeFileBufferPromise(p,content,{mode:mode}={}){let current=Buffer.alloc(0);try{current=await this.readFilePromise(p)}catch(error){}if(Buffer.compare(current,content)===0)return;await this.writeFilePromise(p,content,{mode:mode})}async changeFileTextPromise(p,content,{automaticNewlines:automaticNewlines,mode:mode}={}){let current=``;try{current=await this.readFilePromise(p,`utf8`)}catch(error){}const normalizedContent=automaticNewlines?normalizeLineEndings(current,content):content;if(current===normalizedContent)return;await this.writeFilePromise(p,normalizedContent,{mode:mode})}changeFileSync(p,content,opts={}){if(Buffer.isBuffer(content)){return this.changeFileBufferSync(p,content,opts)}else{return this.changeFileTextSync(p,content,opts)}}changeFileBufferSync(p,content,{mode:mode}={}){let current=Buffer.alloc(0);try{current=this.readFileSync(p)}catch(error){}if(Buffer.compare(current,content)===0)return;this.writeFileSync(p,content,{mode:mode})}changeFileTextSync(p,content,{automaticNewlines:automaticNewlines=false,mode:mode}={}){let current=``;try{current=this.readFileSync(p,`utf8`)}catch(error){}const normalizedContent=automaticNewlines?normalizeLineEndings(current,content):content;if(current===normalizedContent)return;this.writeFileSync(p,normalizedContent,{mode:mode})}async movePromise(fromP,toP){try{await this.renamePromise(fromP,toP)}catch(error){if(error.code===`EXDEV`){await this.copyPromise(toP,fromP);await this.removePromise(fromP)}else{throw error}}}moveSync(fromP,toP){try{this.renameSync(fromP,toP)}catch(error){if(error.code===`EXDEV`){this.copySync(toP,fromP);this.removeSync(fromP)}else{throw error}}}async lockPromise(affectedPath,callback){const lockPath=`${affectedPath}.flock`;const interval=1e3/60;const startTime=Date.now();let fd=null;const isAlive=async()=>{let pid;try{[pid]=await this.readJsonPromise(lockPath)}catch(error){return Date.now()-startTime<500}try{process.kill(pid,0);return true}catch(error){return false}};while(fd===null){try{fd=await this.openPromise(lockPath,`wx`)}catch(error){if(error.code===`EEXIST`){if(!await isAlive()){try{await this.unlinkPromise(lockPath);continue}catch(error){}}if(Date.now()-startTime<60*1e3){await new Promise((resolve=>setTimeout(resolve,interval)))}else{throw new Error(`Couldn't acquire a lock in a reasonable time (via ${lockPath})`)}}else{throw error}}}await this.writePromise(fd,JSON.stringify([process.pid]));try{return await callback()}finally{try{await this.closePromise(fd);await this.unlinkPromise(lockPath)}catch(error){}}}async readJsonPromise(p){const content=await this.readFilePromise(p,`utf8`);try{return JSON.parse(content)}catch(error){error.message+=` (in ${p})`;throw error}}readJsonSync(p){const content=this.readFileSync(p,`utf8`);try{return JSON.parse(content)}catch(error){error.message+=` (in ${p})`;throw error}}async writeJsonPromise(p,data){return await this.writeFilePromise(p,`${JSON.stringify(data,null,2)}\n`)}writeJsonSync(p,data){return this.writeFileSync(p,`${JSON.stringify(data,null,2)}\n`)}async preserveTimePromise(p,cb){const stat=await this.lstatPromise(p);const result=await cb();if(typeof result!==`undefined`)p=result;if(this.lutimesPromise){await this.lutimesPromise(p,stat.atime,stat.mtime)}else if(!stat.isSymbolicLink()){await this.utimesPromise(p,stat.atime,stat.mtime)}}async preserveTimeSync(p,cb){const stat=this.lstatSync(p);const result=cb();if(typeof result!==`undefined`)p=result;if(this.lutimesSync){this.lutimesSync(p,stat.atime,stat.mtime)}else if(!stat.isSymbolicLink()){this.utimesSync(p,stat.atime,stat.mtime)}}};FakeFS.FakeFS=FakeFS$1;class BasePortableFakeFS extends FakeFS$1{constructor(){super(path_1.ppath)}}FakeFS.BasePortableFakeFS=BasePortableFakeFS;function getEndOfLine(content){const matches=content.match(/\r?\n/g);if(matches===null)return os_1.EOL;const crlf=matches.filter((nl=>nl===`\r\n`)).length;const lf=matches.length-crlf;return crlf>lf?`\r\n`:`\n`}function normalizeLineEndings(originalContent,newContent){return newContent.replace(/\r?\n/g,getEndOfLine(originalContent))}FakeFS.normalizeLineEndings=normalizeLineEndings;return FakeFS}var ZipFS={};var NodeFS={};var hasRequiredNodeFS;function requireNodeFS(){if(hasRequiredNodeFS)return NodeFS;hasRequiredNodeFS=1;Object.defineProperty(NodeFS,"__esModule",{value:true});NodeFS.NodeFS=void 0;const tslib_1=require$$0;const fs_1=tslib_1.__importDefault(require$$0$2);const FakeFS_1=requireFakeFS();const errors_1=requireErrors$1();const path_1=requirePath$2();let NodeFS$1=class NodeFS extends FakeFS_1.BasePortableFakeFS{constructor(realFs=fs_1.default){super();this.realFs=realFs;if(typeof this.realFs.lutimes!==`undefined`){this.lutimesPromise=this.lutimesPromiseImpl;this.lutimesSync=this.lutimesSyncImpl}}getExtractHint(){return false}getRealPath(){return path_1.PortablePath.root}resolve(p){return path_1.ppath.resolve(p)}async openPromise(p,flags,mode){return await new Promise(((resolve,reject)=>{this.realFs.open(path_1.npath.fromPortablePath(p),flags,mode,this.makeCallback(resolve,reject))}))}openSync(p,flags,mode){return this.realFs.openSync(path_1.npath.fromPortablePath(p),flags,mode)}async opendirPromise(p,opts){return await new Promise(((resolve,reject)=>{if(typeof opts!==`undefined`){this.realFs.opendir(path_1.npath.fromPortablePath(p),opts,this.makeCallback(resolve,reject))}else{this.realFs.opendir(path_1.npath.fromPortablePath(p),this.makeCallback(resolve,reject))}})).then((dir=>Object.defineProperty(dir,`path`,{value:p,configurable:true,writable:true})))}opendirSync(p,opts){const dir=typeof opts!==`undefined`?this.realFs.opendirSync(path_1.npath.fromPortablePath(p),opts):this.realFs.opendirSync(path_1.npath.fromPortablePath(p));return Object.defineProperty(dir,`path`,{value:p,configurable:true,writable:true})}async readPromise(fd,buffer,offset=0,length=0,position=-1){return await new Promise(((resolve,reject)=>{this.realFs.read(fd,buffer,offset,length,position,((error,bytesRead)=>{if(error){reject(error)}else{resolve(bytesRead)}}))}))}readSync(fd,buffer,offset,length,position){return this.realFs.readSync(fd,buffer,offset,length,position)}async writePromise(fd,buffer,offset,length,position){return await new Promise(((resolve,reject)=>{if(typeof buffer===`string`){return this.realFs.write(fd,buffer,offset,this.makeCallback(resolve,reject))}else{return this.realFs.write(fd,buffer,offset,length,position,this.makeCallback(resolve,reject))}}))}writeSync(fd,buffer,offset,length,position){if(typeof buffer===`string`){return this.realFs.writeSync(fd,buffer,offset)}else{return this.realFs.writeSync(fd,buffer,offset,length,position)}}async closePromise(fd){await new Promise(((resolve,reject)=>{this.realFs.close(fd,this.makeCallback(resolve,reject))}))}closeSync(fd){this.realFs.closeSync(fd)}createReadStream(p,opts){const realPath=p!==null?path_1.npath.fromPortablePath(p):p;return this.realFs.createReadStream(realPath,opts)}createWriteStream(p,opts){const realPath=p!==null?path_1.npath.fromPortablePath(p):p;return this.realFs.createWriteStream(realPath,opts)}async realpathPromise(p){return await new Promise(((resolve,reject)=>{this.realFs.realpath(path_1.npath.fromPortablePath(p),{},this.makeCallback(resolve,reject))})).then((path=>path_1.npath.toPortablePath(path)))}realpathSync(p){return path_1.npath.toPortablePath(this.realFs.realpathSync(path_1.npath.fromPortablePath(p),{}))}async existsPromise(p){return await new Promise((resolve=>{this.realFs.exists(path_1.npath.fromPortablePath(p),resolve)}))}accessSync(p,mode){return this.realFs.accessSync(path_1.npath.fromPortablePath(p),mode)}async accessPromise(p,mode){return await new Promise(((resolve,reject)=>{this.realFs.access(path_1.npath.fromPortablePath(p),mode,this.makeCallback(resolve,reject))}))}existsSync(p){return this.realFs.existsSync(path_1.npath.fromPortablePath(p))}async statPromise(p,opts){return await new Promise(((resolve,reject)=>{if(opts){this.realFs.stat(path_1.npath.fromPortablePath(p),opts,this.makeCallback(resolve,reject))}else{this.realFs.stat(path_1.npath.fromPortablePath(p),this.makeCallback(resolve,reject))}}))}statSync(p,opts){if(opts){return this.realFs.statSync(path_1.npath.fromPortablePath(p),opts)}else{return this.realFs.statSync(path_1.npath.fromPortablePath(p))}}async fstatPromise(fd,opts){return await new Promise(((resolve,reject)=>{if(opts){this.realFs.fstat(fd,opts,this.makeCallback(resolve,reject))}else{this.realFs.fstat(fd,this.makeCallback(resolve,reject))}}))}fstatSync(fd,opts){if(opts){return this.realFs.fstatSync(fd,opts)}else{return this.realFs.fstatSync(fd)}}async lstatPromise(p,opts){return await new Promise(((resolve,reject)=>{if(opts){this.realFs.lstat(path_1.npath.fromPortablePath(p),opts,this.makeCallback(resolve,reject))}else{this.realFs.lstat(path_1.npath.fromPortablePath(p),this.makeCallback(resolve,reject))}}))}lstatSync(p,opts){if(opts){return this.realFs.lstatSync(path_1.npath.fromPortablePath(p),opts)}else{return this.realFs.lstatSync(path_1.npath.fromPortablePath(p))}}async fchmodPromise(fd,mask){return await new Promise(((resolve,reject)=>{this.realFs.fchmod(fd,mask,this.makeCallback(resolve,reject))}))}fchmodSync(fd,mask){return this.realFs.fchmodSync(fd,mask)}async chmodPromise(p,mask){return await new Promise(((resolve,reject)=>{this.realFs.chmod(path_1.npath.fromPortablePath(p),mask,this.makeCallback(resolve,reject))}))}chmodSync(p,mask){return this.realFs.chmodSync(path_1.npath.fromPortablePath(p),mask)}async fchownPromise(fd,uid,gid){return await new Promise(((resolve,reject)=>{this.realFs.fchown(fd,uid,gid,this.makeCallback(resolve,reject))}))}fchownSync(fd,uid,gid){return this.realFs.fchownSync(fd,uid,gid)}async chownPromise(p,uid,gid){return await new Promise(((resolve,reject)=>{this.realFs.chown(path_1.npath.fromPortablePath(p),uid,gid,this.makeCallback(resolve,reject))}))}chownSync(p,uid,gid){return this.realFs.chownSync(path_1.npath.fromPortablePath(p),uid,gid)}async renamePromise(oldP,newP){return await new Promise(((resolve,reject)=>{this.realFs.rename(path_1.npath.fromPortablePath(oldP),path_1.npath.fromPortablePath(newP),this.makeCallback(resolve,reject))}))}renameSync(oldP,newP){return this.realFs.renameSync(path_1.npath.fromPortablePath(oldP),path_1.npath.fromPortablePath(newP))}async copyFilePromise(sourceP,destP,flags=0){return await new Promise(((resolve,reject)=>{this.realFs.copyFile(path_1.npath.fromPortablePath(sourceP),path_1.npath.fromPortablePath(destP),flags,this.makeCallback(resolve,reject))}))}copyFileSync(sourceP,destP,flags=0){return this.realFs.copyFileSync(path_1.npath.fromPortablePath(sourceP),path_1.npath.fromPortablePath(destP),flags)}async appendFilePromise(p,content,opts){return await new Promise(((resolve,reject)=>{const fsNativePath=typeof p===`string`?path_1.npath.fromPortablePath(p):p;if(opts){this.realFs.appendFile(fsNativePath,content,opts,this.makeCallback(resolve,reject))}else{this.realFs.appendFile(fsNativePath,content,this.makeCallback(resolve,reject))}}))}appendFileSync(p,content,opts){const fsNativePath=typeof p===`string`?path_1.npath.fromPortablePath(p):p;if(opts){this.realFs.appendFileSync(fsNativePath,content,opts)}else{this.realFs.appendFileSync(fsNativePath,content)}}async writeFilePromise(p,content,opts){return await new Promise(((resolve,reject)=>{const fsNativePath=typeof p===`string`?path_1.npath.fromPortablePath(p):p;if(opts){this.realFs.writeFile(fsNativePath,content,opts,this.makeCallback(resolve,reject))}else{this.realFs.writeFile(fsNativePath,content,this.makeCallback(resolve,reject))}}))}writeFileSync(p,content,opts){const fsNativePath=typeof p===`string`?path_1.npath.fromPortablePath(p):p;if(opts){this.realFs.writeFileSync(fsNativePath,content,opts)}else{this.realFs.writeFileSync(fsNativePath,content)}}async unlinkPromise(p){return await new Promise(((resolve,reject)=>{this.realFs.unlink(path_1.npath.fromPortablePath(p),this.makeCallback(resolve,reject))}))}unlinkSync(p){return this.realFs.unlinkSync(path_1.npath.fromPortablePath(p))}async utimesPromise(p,atime,mtime){return await new Promise(((resolve,reject)=>{this.realFs.utimes(path_1.npath.fromPortablePath(p),atime,mtime,this.makeCallback(resolve,reject))}))}utimesSync(p,atime,mtime){this.realFs.utimesSync(path_1.npath.fromPortablePath(p),atime,mtime)}async lutimesPromiseImpl(p,atime,mtime){const lutimes=this.realFs.lutimes;if(typeof lutimes===`undefined`)throw(0,errors_1.ENOSYS)(`unavailable Node binding`,`lutimes '${p}'`);return await new Promise(((resolve,reject)=>{lutimes.call(this.realFs,path_1.npath.fromPortablePath(p),atime,mtime,this.makeCallback(resolve,reject))}))}lutimesSyncImpl(p,atime,mtime){const lutimesSync=this.realFs.lutimesSync;if(typeof lutimesSync===`undefined`)throw(0,errors_1.ENOSYS)(`unavailable Node binding`,`lutimes '${p}'`);lutimesSync.call(this.realFs,path_1.npath.fromPortablePath(p),atime,mtime)}async mkdirPromise(p,opts){return await new Promise(((resolve,reject)=>{this.realFs.mkdir(path_1.npath.fromPortablePath(p),opts,this.makeCallback(resolve,reject))}))}mkdirSync(p,opts){return this.realFs.mkdirSync(path_1.npath.fromPortablePath(p),opts)}async rmdirPromise(p,opts){return await new Promise(((resolve,reject)=>{if(opts){this.realFs.rmdir(path_1.npath.fromPortablePath(p),opts,this.makeCallback(resolve,reject))}else{this.realFs.rmdir(path_1.npath.fromPortablePath(p),this.makeCallback(resolve,reject))}}))}rmdirSync(p,opts){return this.realFs.rmdirSync(path_1.npath.fromPortablePath(p),opts)}async linkPromise(existingP,newP){return await new Promise(((resolve,reject)=>{this.realFs.link(path_1.npath.fromPortablePath(existingP),path_1.npath.fromPortablePath(newP),this.makeCallback(resolve,reject))}))}linkSync(existingP,newP){return this.realFs.linkSync(path_1.npath.fromPortablePath(existingP),path_1.npath.fromPortablePath(newP))}async symlinkPromise(target,p,type){return await new Promise(((resolve,reject)=>{this.realFs.symlink(path_1.npath.fromPortablePath(target.replace(/\/+$/,``)),path_1.npath.fromPortablePath(p),type,this.makeCallback(resolve,reject))}))}symlinkSync(target,p,type){return this.realFs.symlinkSync(path_1.npath.fromPortablePath(target.replace(/\/+$/,``)),path_1.npath.fromPortablePath(p),type)}async readFilePromise(p,encoding){return await new Promise(((resolve,reject)=>{const fsNativePath=typeof p===`string`?path_1.npath.fromPortablePath(p):p;this.realFs.readFile(fsNativePath,encoding,this.makeCallback(resolve,reject))}))}readFileSync(p,encoding){const fsNativePath=typeof p===`string`?path_1.npath.fromPortablePath(p):p;return this.realFs.readFileSync(fsNativePath,encoding)}async readdirPromise(p,opts){return await new Promise(((resolve,reject)=>{if(opts===null||opts===void 0?void 0:opts.withFileTypes){this.realFs.readdir(path_1.npath.fromPortablePath(p),{withFileTypes:true},this.makeCallback(resolve,reject))}else{this.realFs.readdir(path_1.npath.fromPortablePath(p),this.makeCallback((value=>resolve(value)),reject))}}))}readdirSync(p,opts){if(opts===null||opts===void 0?void 0:opts.withFileTypes){return this.realFs.readdirSync(path_1.npath.fromPortablePath(p),{withFileTypes:true})}else{return this.realFs.readdirSync(path_1.npath.fromPortablePath(p))}}async readlinkPromise(p){return await new Promise(((resolve,reject)=>{this.realFs.readlink(path_1.npath.fromPortablePath(p),this.makeCallback(resolve,reject))})).then((path=>path_1.npath.toPortablePath(path)))}readlinkSync(p){return path_1.npath.toPortablePath(this.realFs.readlinkSync(path_1.npath.fromPortablePath(p)))}async truncatePromise(p,len){return await new Promise(((resolve,reject)=>{this.realFs.truncate(path_1.npath.fromPortablePath(p),len,this.makeCallback(resolve,reject))}))}truncateSync(p,len){return this.realFs.truncateSync(path_1.npath.fromPortablePath(p),len)}async ftruncatePromise(fd,len){return await new Promise(((resolve,reject)=>{this.realFs.ftruncate(fd,len,this.makeCallback(resolve,reject))}))}ftruncateSync(fd,len){return this.realFs.ftruncateSync(fd,len)}watch(p,a,b){return this.realFs.watch(path_1.npath.fromPortablePath(p),a,b)}watchFile(p,a,b){return this.realFs.watchFile(path_1.npath.fromPortablePath(p),a,b)}unwatchFile(p,cb){return this.realFs.unwatchFile(path_1.npath.fromPortablePath(p),cb)}makeCallback(resolve,reject){return(err,result)=>{if(err){reject(err)}else{resolve(result)}}}};NodeFS.NodeFS=NodeFS$1;return NodeFS}var watchFile={};var CustomStatWatcher={};var hasRequiredCustomStatWatcher;function requireCustomStatWatcher(){if(hasRequiredCustomStatWatcher)return CustomStatWatcher;hasRequiredCustomStatWatcher=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.CustomStatWatcher=exports.assertStatus=exports.Status=exports.Event=void 0;const tslib_1=require$$0;const events_1=require$$2$1;const statUtils=tslib_1.__importStar(requireStatUtils());var Event;(function(Event){Event["Change"]="change";Event["Stop"]="stop"})(Event=exports.Event||(exports.Event={}));var Status;(function(Status){Status["Ready"]="ready";Status["Running"]="running";Status["Stopped"]="stopped"})(Status=exports.Status||(exports.Status={}));function assertStatus(current,expected){if(current!==expected){throw new Error(`Invalid StatWatcher status: expected '${expected}', got '${current}'`)}}exports.assertStatus=assertStatus;class CustomStatWatcher extends events_1.EventEmitter{static create(fakeFs,path,opts){const statWatcher=new CustomStatWatcher(fakeFs,path,opts);statWatcher.start();return statWatcher}constructor(fakeFs,path,{bigint:bigint=false}={}){super();this.status=Status.Ready;this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=fakeFs;this.path=path;this.bigint=bigint;this.lastStats=this.stat()}start(){assertStatus(this.status,Status.Ready);this.status=Status.Running;this.startTimeout=setTimeout((()=>{this.startTimeout=null;if(!this.fakeFs.existsSync(this.path)){this.emit(Event.Change,this.lastStats,this.lastStats)}}),3)}stop(){assertStatus(this.status,Status.Running);this.status=Status.Stopped;if(this.startTimeout!==null){clearTimeout(this.startTimeout);this.startTimeout=null}this.emit(Event.Stop)}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch(error){const statInstance=this.bigint?new statUtils.BigIntStatsEntry:new statUtils.StatEntry;return statUtils.clearStats(statInstance)}}makeInterval(opts){const interval=setInterval((()=>{const currentStats=this.stat();const previousStats=this.lastStats;if(statUtils.areStatsEqual(currentStats,previousStats))return;this.lastStats=currentStats;this.emit(Event.Change,currentStats,previousStats)}),opts.interval);return opts.persistent?interval:interval.unref()}registerChangeListener(listener,opts){this.addListener(Event.Change,listener);this.changeListeners.set(listener,this.makeInterval(opts))}unregisterChangeListener(listener){this.removeListener(Event.Change,listener);const interval=this.changeListeners.get(listener);if(typeof interval!==`undefined`)clearInterval(interval);this.changeListeners.delete(listener)}unregisterAllChangeListeners(){for(const listener of this.changeListeners.keys()){this.unregisterChangeListener(listener)}}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(const interval of this.changeListeners.values())interval.ref();return this}unref(){for(const interval of this.changeListeners.values())interval.unref();return this}}exports.CustomStatWatcher=CustomStatWatcher})(CustomStatWatcher);return CustomStatWatcher}var hasRequiredWatchFile;function requireWatchFile(){if(hasRequiredWatchFile)return watchFile;hasRequiredWatchFile=1;Object.defineProperty(watchFile,"__esModule",{value:true});watchFile.unwatchAllFiles=watchFile.unwatchFile=watchFile.watchFile=void 0;const CustomStatWatcher_1=requireCustomStatWatcher();const statWatchersByFakeFS=new WeakMap;function watchFile$1(fakeFs,path,a,b){let bigint;let persistent;let interval;let listener;switch(typeof a){case`function`:{bigint=false;persistent=true;interval=5007;listener=a}break;default:{({bigint:bigint=false,persistent:persistent=true,interval:interval=5007}=a);listener=b}break}let statWatchers=statWatchersByFakeFS.get(fakeFs);if(typeof statWatchers===`undefined`)statWatchersByFakeFS.set(fakeFs,statWatchers=new Map);let statWatcher=statWatchers.get(path);if(typeof statWatcher===`undefined`){statWatcher=CustomStatWatcher_1.CustomStatWatcher.create(fakeFs,path,{bigint:bigint});statWatchers.set(path,statWatcher)}statWatcher.registerChangeListener(listener,{persistent:persistent,interval:interval});return statWatcher}watchFile.watchFile=watchFile$1;function unwatchFile(fakeFs,path,cb){const statWatchers=statWatchersByFakeFS.get(fakeFs);if(typeof statWatchers===`undefined`)return;const statWatcher=statWatchers.get(path);if(typeof statWatcher===`undefined`)return;if(typeof cb===`undefined`)statWatcher.unregisterAllChangeListeners();else statWatcher.unregisterChangeListener(cb);if(!statWatcher.hasChangeListeners()){statWatcher.stop();statWatchers.delete(path)}}watchFile.unwatchFile=unwatchFile;function unwatchAllFiles(fakeFs){const statWatchers=statWatchersByFakeFS.get(fakeFs);if(typeof statWatchers===`undefined`)return;for(const path of statWatchers.keys()){unwatchFile(fakeFs,path)}}watchFile.unwatchAllFiles=unwatchAllFiles;return watchFile}var hasRequiredZipFS;function requireZipFS(){if(hasRequiredZipFS)return ZipFS;hasRequiredZipFS=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.ZipFS=exports.makeEmptyArchive=exports.DEFAULT_COMPRESSION_LEVEL=void 0;const tslib_1=require$$0;const fs_1=require$$0$2;const stream_1=require$$0$4;const util_1=require$$0$1;const zlib_1=tslib_1.__importDefault(require$$4);const FakeFS_1=requireFakeFS();const NodeFS_1=requireNodeFS();const opendir_1=requireOpendir();const watchFile_1=requireWatchFile();const constants_1=requireConstants$3();const errors=tslib_1.__importStar(requireErrors$1());const path_1=requirePath$2();const statUtils=tslib_1.__importStar(requireStatUtils());exports.DEFAULT_COMPRESSION_LEVEL=`mixed`;function toUnixTimestamp(time){if(typeof time===`string`&&String(+time)===time)return+time;if(typeof time===`number`&&Number.isFinite(time)){if(time<0){return Date.now()/1e3}else{return time}}if(util_1.types.isDate(time))return time.getTime()/1e3;throw new Error(`Invalid time`)}function makeEmptyArchive(){return Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}exports.makeEmptyArchive=makeEmptyArchive;class ZipFS extends FakeFS_1.BasePortableFakeFS{constructor(source,opts){super();this.lzSource=null;this.listings=new Map;this.entries=new Map;this.fileSources=new Map;this.fds=new Map;this.nextFd=0;this.ready=false;this.readOnly=false;this.libzip=opts.libzip;const pathOptions=opts;this.level=typeof pathOptions.level!==`undefined`?pathOptions.level:exports.DEFAULT_COMPRESSION_LEVEL;source!==null&&source!==void 0?source:source=makeEmptyArchive();if(typeof source===`string`){const{baseFs:baseFs=new NodeFS_1.NodeFS}=pathOptions;this.baseFs=baseFs;this.path=source}else{this.path=null;this.baseFs=null}if(opts.stats){this.stats=opts.stats}else{if(typeof source===`string`){try{this.stats=this.baseFs.statSync(source)}catch(error){if(error.code===`ENOENT`&&pathOptions.create){this.stats=statUtils.makeDefaultStats()}else{throw error}}}else{this.stats=statUtils.makeDefaultStats()}}const errPtr=this.libzip.malloc(4);try{let flags=0;if(typeof source===`string`&&pathOptions.create)flags|=this.libzip.ZIP_CREATE|this.libzip.ZIP_TRUNCATE;if(opts.readOnly){flags|=this.libzip.ZIP_RDONLY;this.readOnly=true}if(typeof source===`string`){this.zip=this.libzip.open(path_1.npath.fromPortablePath(source),flags,errPtr)}else{const lzSource=this.allocateUnattachedSource(source);try{this.zip=this.libzip.openFromSource(lzSource,flags,errPtr);this.lzSource=lzSource}catch(error){this.libzip.source.free(lzSource);throw error}}if(this.zip===0){const error=this.libzip.struct.errorS();this.libzip.error.initWithCode(error,this.libzip.getValue(errPtr,`i32`));throw this.makeLibzipError(error)}}finally{this.libzip.free(errPtr)}this.listings.set(path_1.PortablePath.root,new Set);const entryCount=this.libzip.getNumEntries(this.zip,0);for(let t=0;t<entryCount;++t){const raw=this.libzip.getName(this.zip,t,0);if(path_1.ppath.isAbsolute(raw))continue;const p=path_1.ppath.resolve(path_1.PortablePath.root,raw);this.registerEntry(p,t);if(raw.endsWith(`/`)){this.registerListing(p)}}this.symlinkCount=this.libzip.ext.countSymlinks(this.zip);if(this.symlinkCount===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));this.ready=true}makeLibzipError(error){const errorCode=this.libzip.struct.errorCodeZip(error);const strerror=this.libzip.error.strerror(error);const libzipError=new errors.LibzipError(strerror,this.libzip.errors[errorCode]);if(errorCode===this.libzip.errors.ZIP_ER_CHANGED)throw new Error(`Assertion failed: Unexpected libzip error: ${libzipError.message}`);return libzipError}getExtractHint(hints){for(const fileName of this.entries.keys()){const ext=this.pathUtils.extname(fileName);if(hints.relevantExtensions.has(ext)){return true}}return false}getAllFiles(){return Array.from(this.entries.keys())}getRealPath(){if(!this.path)throw new Error(`ZipFS don't have real paths when loaded from a buffer`);return this.path}getBufferAndClose(){this.prepareClose();if(!this.lzSource)throw new Error(`ZipFS was not created from a Buffer`);if(this.entries.size===0){this.discardAndClose();return makeEmptyArchive()}try{this.libzip.source.keep(this.lzSource);if(this.libzip.close(this.zip)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.libzip.source.open(this.lzSource)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_END)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));const size=this.libzip.source.tell(this.lzSource);if(size===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));if(this.libzip.source.seek(this.lzSource,0,0,this.libzip.SEEK_SET)===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));const buffer=this.libzip.malloc(size);if(!buffer)throw new Error(`Couldn't allocate enough memory`);try{const rc=this.libzip.source.read(this.lzSource,buffer,size);if(rc===-1)throw this.makeLibzipError(this.libzip.source.error(this.lzSource));else if(rc<size)throw new Error(`Incomplete read`);else if(rc>size)throw new Error(`Overread`);const memory=this.libzip.HEAPU8.subarray(buffer,buffer+size);return Buffer.from(memory)}finally{this.libzip.free(buffer)}}finally{this.libzip.source.close(this.lzSource);this.libzip.source.free(this.lzSource);this.ready=false}}prepareClose(){if(!this.ready)throw errors.EBUSY(`archive closed, close`);(0,watchFile_1.unwatchAllFiles)(this)}saveAndClose(){if(!this.path||!this.baseFs)throw new Error(`ZipFS cannot be saved and must be discarded when loaded from a buffer`);this.prepareClose();if(this.readOnly){this.discardAndClose();return}const newMode=this.baseFs.existsSync(this.path)||this.stats.mode===statUtils.DEFAULT_MODE?undefined:this.stats.mode;if(this.entries.size===0){this.discardAndClose();this.baseFs.writeFileSync(this.path,makeEmptyArchive(),{mode:newMode})}else{const rc=this.libzip.close(this.zip);if(rc===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(typeof newMode!==`undefined`){this.baseFs.chmodSync(this.path,newMode)}}this.ready=false}discardAndClose(){this.prepareClose();this.libzip.discard(this.zip);this.ready=false}resolve(p){return path_1.ppath.resolve(path_1.PortablePath.root,p)}async openPromise(p,flags,mode){return this.openSync(p,flags,mode)}openSync(p,flags,mode){const fd=this.nextFd++;this.fds.set(fd,{cursor:0,p:p});return fd}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(p,opts){return this.opendirSync(p,opts)}opendirSync(p,opts={}){const resolvedP=this.resolveFilename(`opendir '${p}'`,p);if(!this.entries.has(resolvedP)&&!this.listings.has(resolvedP))throw errors.ENOENT(`opendir '${p}'`);const directoryListing=this.listings.get(resolvedP);if(!directoryListing)throw errors.ENOTDIR(`opendir '${p}'`);const entries=[...directoryListing];const fd=this.openSync(resolvedP,`r`);const onClose=()=>{this.closeSync(fd)};return(0,opendir_1.opendir)(this,resolvedP,entries,{onClose:onClose})}async readPromise(fd,buffer,offset,length,position){return this.readSync(fd,buffer,offset,length,position)}readSync(fd,buffer,offset=0,length=buffer.byteLength,position=-1){const entry=this.fds.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`read`);const realPosition=position===-1||position===null?entry.cursor:position;const source=this.readFileSync(entry.p);source.copy(buffer,offset,realPosition,realPosition+length);const bytesRead=Math.max(0,Math.min(source.length-realPosition,length));if(position===-1||position===null)entry.cursor+=bytesRead;return bytesRead}async writePromise(fd,buffer,offset,length,position){if(typeof buffer===`string`){return this.writeSync(fd,buffer,position)}else{return this.writeSync(fd,buffer,offset,length,position)}}writeSync(fd,buffer,offset,length,position){const entry=this.fds.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`read`);throw new Error(`Unimplemented`)}async closePromise(fd){return this.closeSync(fd)}closeSync(fd){const entry=this.fds.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`read`);this.fds.delete(fd)}createReadStream(p,{encoding:encoding}={}){if(p===null)throw new Error(`Unimplemented`);const fd=this.openSync(p,`r`);const stream=Object.assign(new stream_1.PassThrough({emitClose:true,autoDestroy:true,destroy:(error,callback)=>{clearImmediate(immediate);this.closeSync(fd);callback(error)}}),{close(){stream.destroy()},bytesRead:0,path:p});const immediate=setImmediate((async()=>{try{const data=await this.readFilePromise(p,encoding);stream.bytesRead=data.length;stream.end(data)}catch(error){stream.destroy(error)}}));return stream}createWriteStream(p,{encoding:encoding}={}){if(this.readOnly)throw errors.EROFS(`open '${p}'`);if(p===null)throw new Error(`Unimplemented`);const chunks=[];const fd=this.openSync(p,`w`);const stream=Object.assign(new stream_1.PassThrough({autoDestroy:true,emitClose:true,destroy:(error,callback)=>{try{if(error){callback(error)}else{this.writeFileSync(p,Buffer.concat(chunks),encoding);callback(null)}}catch(err){callback(err)}finally{this.closeSync(fd)}}}),{bytesWritten:0,path:p,close(){stream.destroy()}});stream.on(`data`,(chunk=>{const chunkBuffer=Buffer.from(chunk);stream.bytesWritten+=chunkBuffer.length;chunks.push(chunkBuffer)}));return stream}async realpathPromise(p){return this.realpathSync(p)}realpathSync(p){const resolvedP=this.resolveFilename(`lstat '${p}'`,p);if(!this.entries.has(resolvedP)&&!this.listings.has(resolvedP))throw errors.ENOENT(`lstat '${p}'`);return resolvedP}async existsPromise(p){return this.existsSync(p)}existsSync(p){if(!this.ready)throw errors.EBUSY(`archive closed, existsSync '${p}'`);if(this.symlinkCount===0){const resolvedP=path_1.ppath.resolve(path_1.PortablePath.root,p);return this.entries.has(resolvedP)||this.listings.has(resolvedP)}let resolvedP;try{resolvedP=this.resolveFilename(`stat '${p}'`,p,undefined,false)}catch(error){return false}if(resolvedP===undefined)return false;return this.entries.has(resolvedP)||this.listings.has(resolvedP)}async accessPromise(p,mode){return this.accessSync(p,mode)}accessSync(p,mode=fs_1.constants.F_OK){const resolvedP=this.resolveFilename(`access '${p}'`,p);if(!this.entries.has(resolvedP)&&!this.listings.has(resolvedP))throw errors.ENOENT(`access '${p}'`);if(this.readOnly&&mode&fs_1.constants.W_OK){throw errors.EROFS(`access '${p}'`)}}async statPromise(p,opts={bigint:false}){if(opts.bigint)return this.statSync(p,{bigint:true});return this.statSync(p)}statSync(p,opts={bigint:false,throwIfNoEntry:true}){const resolvedP=this.resolveFilename(`stat '${p}'`,p,undefined,opts.throwIfNoEntry);if(resolvedP===undefined)return undefined;if(!this.entries.has(resolvedP)&&!this.listings.has(resolvedP)){if(opts.throwIfNoEntry===false)return undefined;throw errors.ENOENT(`stat '${p}'`)}if(p[p.length-1]===`/`&&!this.listings.has(resolvedP))throw errors.ENOTDIR(`stat '${p}'`);return this.statImpl(`stat '${p}'`,resolvedP,opts)}async fstatPromise(fd,opts){return this.fstatSync(fd,opts)}fstatSync(fd,opts){const entry=this.fds.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`fstatSync`);const{p:p}=entry;const resolvedP=this.resolveFilename(`stat '${p}'`,p);if(!this.entries.has(resolvedP)&&!this.listings.has(resolvedP))throw errors.ENOENT(`stat '${p}'`);if(p[p.length-1]===`/`&&!this.listings.has(resolvedP))throw errors.ENOTDIR(`stat '${p}'`);return this.statImpl(`fstat '${p}'`,resolvedP,opts)}async lstatPromise(p,opts={bigint:false}){if(opts.bigint)return this.lstatSync(p,{bigint:true});return this.lstatSync(p)}lstatSync(p,opts={bigint:false,throwIfNoEntry:true}){const resolvedP=this.resolveFilename(`lstat '${p}'`,p,false,opts.throwIfNoEntry);if(resolvedP===undefined)return undefined;if(!this.entries.has(resolvedP)&&!this.listings.has(resolvedP)){if(opts.throwIfNoEntry===false)return undefined;throw errors.ENOENT(`lstat '${p}'`)}if(p[p.length-1]===`/`&&!this.listings.has(resolvedP))throw errors.ENOTDIR(`lstat '${p}'`);return this.statImpl(`lstat '${p}'`,resolvedP,opts)}statImpl(reason,p,opts={}){const entry=this.entries.get(p);if(typeof entry!==`undefined`){const stat=this.libzip.struct.statS();const rc=this.libzip.statIndex(this.zip,entry,0,0,stat);if(rc===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));const uid=this.stats.uid;const gid=this.stats.gid;const size=this.libzip.struct.statSize(stat)>>>0;const blksize=512;const blocks=Math.ceil(size/blksize);const mtimeMs=(this.libzip.struct.statMtime(stat)>>>0)*1e3;const atimeMs=mtimeMs;const birthtimeMs=mtimeMs;const ctimeMs=mtimeMs;const atime=new Date(atimeMs);const birthtime=new Date(birthtimeMs);const ctime=new Date(ctimeMs);const mtime=new Date(mtimeMs);const type=this.listings.has(p)?constants_1.S_IFDIR:this.isSymbolicLink(entry)?constants_1.S_IFLNK:constants_1.S_IFREG;const defaultMode=type===constants_1.S_IFDIR?493:420;const mode=type|this.getUnixMode(entry,defaultMode)&511;const crc=this.libzip.struct.statCrc(stat);const statInstance=Object.assign(new statUtils.StatEntry,{uid:uid,gid:gid,size:size,blksize:blksize,blocks:blocks,atime:atime,birthtime:birthtime,ctime:ctime,mtime:mtime,atimeMs:atimeMs,birthtimeMs:birthtimeMs,ctimeMs:ctimeMs,mtimeMs:mtimeMs,mode:mode,crc:crc});return opts.bigint===true?statUtils.convertToBigIntStats(statInstance):statInstance}if(this.listings.has(p)){const uid=this.stats.uid;const gid=this.stats.gid;const size=0;const blksize=512;const blocks=0;const atimeMs=this.stats.mtimeMs;const birthtimeMs=this.stats.mtimeMs;const ctimeMs=this.stats.mtimeMs;const mtimeMs=this.stats.mtimeMs;const atime=new Date(atimeMs);const birthtime=new Date(birthtimeMs);const ctime=new Date(ctimeMs);const mtime=new Date(mtimeMs);const mode=constants_1.S_IFDIR|493;const crc=0;const statInstance=Object.assign(new statUtils.StatEntry,{uid:uid,gid:gid,size:size,blksize:blksize,blocks:blocks,atime:atime,birthtime:birthtime,ctime:ctime,mtime:mtime,atimeMs:atimeMs,birthtimeMs:birthtimeMs,ctimeMs:ctimeMs,mtimeMs:mtimeMs,mode:mode,crc:crc});return opts.bigint===true?statUtils.convertToBigIntStats(statInstance):statInstance}throw new Error(`Unreachable`)}getUnixMode(index,defaultMode){const rc=this.libzip.file.getExternalAttributes(this.zip,index,0,0,this.libzip.uint08S,this.libzip.uint32S);if(rc===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));const opsys=this.libzip.getValue(this.libzip.uint08S,`i8`)>>>0;if(opsys!==this.libzip.ZIP_OPSYS_UNIX)return defaultMode;return this.libzip.getValue(this.libzip.uint32S,`i32`)>>>16}registerListing(p){const existingListing=this.listings.get(p);if(existingListing)return existingListing;const parentListing=this.registerListing(path_1.ppath.dirname(p));parentListing.add(path_1.ppath.basename(p));const newListing=new Set;this.listings.set(p,newListing);return newListing}registerEntry(p,index){const parentListing=this.registerListing(path_1.ppath.dirname(p));parentListing.add(path_1.ppath.basename(p));this.entries.set(p,index)}unregisterListing(p){this.listings.delete(p);const parentListing=this.listings.get(path_1.ppath.dirname(p));parentListing===null||parentListing===void 0?void 0:parentListing.delete(path_1.ppath.basename(p))}unregisterEntry(p){this.unregisterListing(p);const entry=this.entries.get(p);this.entries.delete(p);if(typeof entry===`undefined`)return;this.fileSources.delete(entry);if(this.isSymbolicLink(entry)){this.symlinkCount--}}deleteEntry(p,index){this.unregisterEntry(p);const rc=this.libzip.delete(this.zip,index);if(rc===-1){throw this.makeLibzipError(this.libzip.getError(this.zip))}}resolveFilename(reason,p,resolveLastComponent=true,throwIfNoEntry=true){if(!this.ready)throw errors.EBUSY(`archive closed, ${reason}`);let resolvedP=path_1.ppath.resolve(path_1.PortablePath.root,p);if(resolvedP===`/`)return path_1.PortablePath.root;const fileIndex=this.entries.get(resolvedP);if(resolveLastComponent&&fileIndex!==undefined){if(this.symlinkCount!==0&&this.isSymbolicLink(fileIndex)){const target=this.getFileSource(fileIndex).toString();return this.resolveFilename(reason,path_1.ppath.resolve(path_1.ppath.dirname(resolvedP),target),true,throwIfNoEntry)}else{return resolvedP}}while(true){const parentP=this.resolveFilename(reason,path_1.ppath.dirname(resolvedP),true,throwIfNoEntry);if(parentP===undefined)return parentP;const isDir=this.listings.has(parentP);const doesExist=this.entries.has(parentP);if(!isDir&&!doesExist){if(throwIfNoEntry===false)return undefined;throw errors.ENOENT(reason)}if(!isDir)throw errors.ENOTDIR(reason);resolvedP=path_1.ppath.resolve(parentP,path_1.ppath.basename(resolvedP));if(!resolveLastComponent||this.symlinkCount===0)break;const index=this.libzip.name.locate(this.zip,resolvedP.slice(1),0);if(index===-1)break;if(this.isSymbolicLink(index)){const target=this.getFileSource(index).toString();resolvedP=path_1.ppath.resolve(path_1.ppath.dirname(resolvedP),target)}else{break}}return resolvedP}allocateBuffer(content){if(!Buffer.isBuffer(content))content=Buffer.from(content);const buffer=this.libzip.malloc(content.byteLength);if(!buffer)throw new Error(`Couldn't allocate enough memory`);const heap=new Uint8Array(this.libzip.HEAPU8.buffer,buffer,content.byteLength);heap.set(content);return{buffer:buffer,byteLength:content.byteLength}}allocateUnattachedSource(content){const error=this.libzip.struct.errorS();const{buffer:buffer,byteLength:byteLength}=this.allocateBuffer(content);const source=this.libzip.source.fromUnattachedBuffer(buffer,byteLength,0,1,error);if(source===0){this.libzip.free(error);throw this.makeLibzipError(error)}return source}allocateSource(content){const{buffer:buffer,byteLength:byteLength}=this.allocateBuffer(content);const source=this.libzip.source.fromBuffer(this.zip,buffer,byteLength,0,1);if(source===0){this.libzip.free(buffer);throw this.makeLibzipError(this.libzip.getError(this.zip))}return source}setFileSource(p,content){const buffer=Buffer.isBuffer(content)?content:Buffer.from(content);const target=path_1.ppath.relative(path_1.PortablePath.root,p);const lzSource=this.allocateSource(content);try{const newIndex=this.libzip.file.add(this.zip,target,lzSource,this.libzip.ZIP_FL_OVERWRITE);if(newIndex===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.level!==`mixed`){const method=this.level===0?this.libzip.ZIP_CM_STORE:this.libzip.ZIP_CM_DEFLATE;const rc=this.libzip.file.setCompression(this.zip,newIndex,0,method,this.level);if(rc===-1){throw this.makeLibzipError(this.libzip.getError(this.zip))}}this.fileSources.set(newIndex,buffer);return newIndex}catch(error){this.libzip.source.free(lzSource);throw error}}isSymbolicLink(index){if(this.symlinkCount===0)return false;const attrs=this.libzip.file.getExternalAttributes(this.zip,index,0,0,this.libzip.uint08S,this.libzip.uint32S);if(attrs===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));const opsys=this.libzip.getValue(this.libzip.uint08S,`i8`)>>>0;if(opsys!==this.libzip.ZIP_OPSYS_UNIX)return false;const attributes=this.libzip.getValue(this.libzip.uint32S,`i32`)>>>16;return(attributes&constants_1.S_IFMT)===constants_1.S_IFLNK}getFileSource(index,opts={asyncDecompress:false}){const cachedFileSource=this.fileSources.get(index);if(typeof cachedFileSource!==`undefined`)return cachedFileSource;const stat=this.libzip.struct.statS();const rc=this.libzip.statIndex(this.zip,index,0,0,stat);if(rc===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));const size=this.libzip.struct.statCompSize(stat);const compressionMethod=this.libzip.struct.statCompMethod(stat);const buffer=this.libzip.malloc(size);try{const file=this.libzip.fopenIndex(this.zip,index,0,this.libzip.ZIP_FL_COMPRESSED);if(file===0)throw this.makeLibzipError(this.libzip.getError(this.zip));try{const rc=this.libzip.fread(file,buffer,size,0);if(rc===-1)throw this.makeLibzipError(this.libzip.file.getError(file));else if(rc<size)throw new Error(`Incomplete read`);else if(rc>size)throw new Error(`Overread`);const memory=this.libzip.HEAPU8.subarray(buffer,buffer+size);const data=Buffer.from(memory);if(compressionMethod===0){this.fileSources.set(index,data);return data}else if(opts.asyncDecompress){return new Promise(((resolve,reject)=>{zlib_1.default.inflateRaw(data,((error,result)=>{if(error){reject(error)}else{this.fileSources.set(index,result);resolve(result)}}))}))}else{const decompressedData=zlib_1.default.inflateRawSync(data);this.fileSources.set(index,decompressedData);return decompressedData}}finally{this.libzip.fclose(file)}}finally{this.libzip.free(buffer)}}async fchmodPromise(fd,mask){return this.chmodPromise(this.fdToPath(fd,`fchmod`),mask)}fchmodSync(fd,mask){return this.chmodSync(this.fdToPath(fd,`fchmodSync`),mask)}async chmodPromise(p,mask){return this.chmodSync(p,mask)}chmodSync(p,mask){if(this.readOnly)throw errors.EROFS(`chmod '${p}'`);mask&=493;const resolvedP=this.resolveFilename(`chmod '${p}'`,p,false);const entry=this.entries.get(resolvedP);if(typeof entry===`undefined`)throw new Error(`Assertion failed: The entry should have been registered (${resolvedP})`);const oldMod=this.getUnixMode(entry,constants_1.S_IFREG|0);const newMod=oldMod&-512|mask;const rc=this.libzip.file.setExternalAttributes(this.zip,entry,0,0,this.libzip.ZIP_OPSYS_UNIX,newMod<<16);if(rc===-1){throw this.makeLibzipError(this.libzip.getError(this.zip))}}async fchownPromise(fd,uid,gid){return this.chownPromise(this.fdToPath(fd,`fchown`),uid,gid)}fchownSync(fd,uid,gid){return this.chownSync(this.fdToPath(fd,`fchownSync`),uid,gid)}async chownPromise(p,uid,gid){return this.chownSync(p,uid,gid)}chownSync(p,uid,gid){throw new Error(`Unimplemented`)}async renamePromise(oldP,newP){return this.renameSync(oldP,newP)}renameSync(oldP,newP){throw new Error(`Unimplemented`)}async copyFilePromise(sourceP,destP,flags){const{indexSource:indexSource,indexDest:indexDest,resolvedDestP:resolvedDestP}=this.prepareCopyFile(sourceP,destP,flags);const source=await this.getFileSource(indexSource,{asyncDecompress:true});const newIndex=this.setFileSource(resolvedDestP,source);if(newIndex!==indexDest){this.registerEntry(resolvedDestP,newIndex)}}copyFileSync(sourceP,destP,flags=0){const{indexSource:indexSource,indexDest:indexDest,resolvedDestP:resolvedDestP}=this.prepareCopyFile(sourceP,destP,flags);const source=this.getFileSource(indexSource);const newIndex=this.setFileSource(resolvedDestP,source);if(newIndex!==indexDest){this.registerEntry(resolvedDestP,newIndex)}}prepareCopyFile(sourceP,destP,flags=0){if(this.readOnly)throw errors.EROFS(`copyfile '${sourceP} -> '${destP}'`);if((flags&fs_1.constants.COPYFILE_FICLONE_FORCE)!==0)throw errors.ENOSYS(`unsupported clone operation`,`copyfile '${sourceP}' -> ${destP}'`);const resolvedSourceP=this.resolveFilename(`copyfile '${sourceP} -> ${destP}'`,sourceP);const indexSource=this.entries.get(resolvedSourceP);if(typeof indexSource===`undefined`)throw errors.EINVAL(`copyfile '${sourceP}' -> '${destP}'`);const resolvedDestP=this.resolveFilename(`copyfile '${sourceP}' -> ${destP}'`,destP);const indexDest=this.entries.get(resolvedDestP);if((flags&(fs_1.constants.COPYFILE_EXCL|fs_1.constants.COPYFILE_FICLONE_FORCE))!==0&&typeof indexDest!==`undefined`)throw errors.EEXIST(`copyfile '${sourceP}' -> '${destP}'`);return{indexSource:indexSource,resolvedDestP:resolvedDestP,indexDest:indexDest}}async appendFilePromise(p,content,opts){if(this.readOnly)throw errors.EROFS(`open '${p}'`);if(typeof opts===`undefined`)opts={flag:`a`};else if(typeof opts===`string`)opts={flag:`a`,encoding:opts};else if(typeof opts.flag===`undefined`)opts={flag:`a`,...opts};return this.writeFilePromise(p,content,opts)}appendFileSync(p,content,opts={}){if(this.readOnly)throw errors.EROFS(`open '${p}'`);if(typeof opts===`undefined`)opts={flag:`a`};else if(typeof opts===`string`)opts={flag:`a`,encoding:opts};else if(typeof opts.flag===`undefined`)opts={flag:`a`,...opts};return this.writeFileSync(p,content,opts)}fdToPath(fd,reason){var _a;const path=(_a=this.fds.get(fd))===null||_a===void 0?void 0:_a.p;if(typeof path===`undefined`)throw errors.EBADF(reason);return path}async writeFilePromise(p,content,opts){const{encoding:encoding,mode:mode,index:index,resolvedP:resolvedP}=this.prepareWriteFile(p,opts);if(index!==undefined&&typeof opts===`object`&&opts.flag&&opts.flag.includes(`a`))content=Buffer.concat([await this.getFileSource(index,{asyncDecompress:true}),Buffer.from(content)]);if(encoding!==null)content=content.toString(encoding);const newIndex=this.setFileSource(resolvedP,content);if(newIndex!==index)this.registerEntry(resolvedP,newIndex);if(mode!==null){await this.chmodPromise(resolvedP,mode)}}writeFileSync(p,content,opts){const{encoding:encoding,mode:mode,index:index,resolvedP:resolvedP}=this.prepareWriteFile(p,opts);if(index!==undefined&&typeof opts===`object`&&opts.flag&&opts.flag.includes(`a`))content=Buffer.concat([this.getFileSource(index),Buffer.from(content)]);if(encoding!==null)content=content.toString(encoding);const newIndex=this.setFileSource(resolvedP,content);if(newIndex!==index)this.registerEntry(resolvedP,newIndex);if(mode!==null){this.chmodSync(resolvedP,mode)}}prepareWriteFile(p,opts){if(typeof p===`number`)p=this.fdToPath(p,`read`);if(this.readOnly)throw errors.EROFS(`open '${p}'`);const resolvedP=this.resolveFilename(`open '${p}'`,p);if(this.listings.has(resolvedP))throw errors.EISDIR(`open '${p}'`);let encoding=null,mode=null;if(typeof opts===`string`){encoding=opts}else if(typeof opts===`object`){({encoding:encoding=null,mode:mode=null}=opts)}const index=this.entries.get(resolvedP);return{encoding:encoding,mode:mode,resolvedP:resolvedP,index:index}}async unlinkPromise(p){return this.unlinkSync(p)}unlinkSync(p){if(this.readOnly)throw errors.EROFS(`unlink '${p}'`);const resolvedP=this.resolveFilename(`unlink '${p}'`,p);if(this.listings.has(resolvedP))throw errors.EISDIR(`unlink '${p}'`);const index=this.entries.get(resolvedP);if(typeof index===`undefined`)throw errors.EINVAL(`unlink '${p}'`);this.deleteEntry(resolvedP,index)}async utimesPromise(p,atime,mtime){return this.utimesSync(p,atime,mtime)}utimesSync(p,atime,mtime){if(this.readOnly)throw errors.EROFS(`utimes '${p}'`);const resolvedP=this.resolveFilename(`utimes '${p}'`,p);this.utimesImpl(resolvedP,mtime)}async lutimesPromise(p,atime,mtime){return this.lutimesSync(p,atime,mtime)}lutimesSync(p,atime,mtime){if(this.readOnly)throw errors.EROFS(`lutimes '${p}'`);const resolvedP=this.resolveFilename(`utimes '${p}'`,p,false);this.utimesImpl(resolvedP,mtime)}utimesImpl(resolvedP,mtime){if(this.listings.has(resolvedP))if(!this.entries.has(resolvedP))this.hydrateDirectory(resolvedP);const entry=this.entries.get(resolvedP);if(entry===undefined)throw new Error(`Unreachable`);const rc=this.libzip.file.setMtime(this.zip,entry,0,toUnixTimestamp(mtime),0);if(rc===-1){throw this.makeLibzipError(this.libzip.getError(this.zip))}}async mkdirPromise(p,opts){return this.mkdirSync(p,opts)}mkdirSync(p,{mode:mode=493,recursive:recursive=false}={}){if(recursive)return this.mkdirpSync(p,{chmod:mode});if(this.readOnly)throw errors.EROFS(`mkdir '${p}'`);const resolvedP=this.resolveFilename(`mkdir '${p}'`,p);if(this.entries.has(resolvedP)||this.listings.has(resolvedP))throw errors.EEXIST(`mkdir '${p}'`);this.hydrateDirectory(resolvedP);this.chmodSync(resolvedP,mode);return undefined}async rmdirPromise(p,opts){return this.rmdirSync(p,opts)}rmdirSync(p,{recursive:recursive=false}={}){if(this.readOnly)throw errors.EROFS(`rmdir '${p}'`);if(recursive){this.removeSync(p);return}const resolvedP=this.resolveFilename(`rmdir '${p}'`,p);const directoryListing=this.listings.get(resolvedP);if(!directoryListing)throw errors.ENOTDIR(`rmdir '${p}'`);if(directoryListing.size>0)throw errors.ENOTEMPTY(`rmdir '${p}'`);const index=this.entries.get(resolvedP);if(typeof index===`undefined`)throw errors.EINVAL(`rmdir '${p}'`);this.deleteEntry(p,index)}hydrateDirectory(resolvedP){const index=this.libzip.dir.add(this.zip,path_1.ppath.relative(path_1.PortablePath.root,resolvedP));if(index===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));this.registerListing(resolvedP);this.registerEntry(resolvedP,index);return index}async linkPromise(existingP,newP){return this.linkSync(existingP,newP)}linkSync(existingP,newP){throw errors.EOPNOTSUPP(`link '${existingP}' -> '${newP}'`)}async symlinkPromise(target,p){return this.symlinkSync(target,p)}symlinkSync(target,p){if(this.readOnly)throw errors.EROFS(`symlink '${target}' -> '${p}'`);const resolvedP=this.resolveFilename(`symlink '${target}' -> '${p}'`,p);if(this.listings.has(resolvedP))throw errors.EISDIR(`symlink '${target}' -> '${p}'`);if(this.entries.has(resolvedP))throw errors.EEXIST(`symlink '${target}' -> '${p}'`);const index=this.setFileSource(resolvedP,target);this.registerEntry(resolvedP,index);const rc=this.libzip.file.setExternalAttributes(this.zip,index,0,0,this.libzip.ZIP_OPSYS_UNIX,(constants_1.S_IFLNK|511)<<16);if(rc===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));this.symlinkCount+=1}async readFilePromise(p,encoding){if(typeof encoding===`object`)encoding=encoding?encoding.encoding:undefined;const data=await this.readFileBuffer(p,{asyncDecompress:true});return encoding?data.toString(encoding):data}readFileSync(p,encoding){if(typeof encoding===`object`)encoding=encoding?encoding.encoding:undefined;const data=this.readFileBuffer(p);return encoding?data.toString(encoding):data}readFileBuffer(p,opts={asyncDecompress:false}){if(typeof p===`number`)p=this.fdToPath(p,`read`);const resolvedP=this.resolveFilename(`open '${p}'`,p);if(!this.entries.has(resolvedP)&&!this.listings.has(resolvedP))throw errors.ENOENT(`open '${p}'`);if(p[p.length-1]===`/`&&!this.listings.has(resolvedP))throw errors.ENOTDIR(`open '${p}'`);if(this.listings.has(resolvedP))throw errors.EISDIR(`read`);const entry=this.entries.get(resolvedP);if(entry===undefined)throw new Error(`Unreachable`);return this.getFileSource(entry,opts)}async readdirPromise(p,opts){return this.readdirSync(p,opts)}readdirSync(p,opts){const resolvedP=this.resolveFilename(`scandir '${p}'`,p);if(!this.entries.has(resolvedP)&&!this.listings.has(resolvedP))throw errors.ENOENT(`scandir '${p}'`);const directoryListing=this.listings.get(resolvedP);if(!directoryListing)throw errors.ENOTDIR(`scandir '${p}'`);const entries=[...directoryListing];if(!(opts===null||opts===void 0?void 0:opts.withFileTypes))return entries;return entries.map((name=>Object.assign(this.statImpl(`lstat`,path_1.ppath.join(p,name)),{name:name})))}async readlinkPromise(p){const entry=this.prepareReadlink(p);return(await this.getFileSource(entry,{asyncDecompress:true})).toString()}readlinkSync(p){const entry=this.prepareReadlink(p);return this.getFileSource(entry).toString()}prepareReadlink(p){const resolvedP=this.resolveFilename(`readlink '${p}'`,p,false);if(!this.entries.has(resolvedP)&&!this.listings.has(resolvedP))throw errors.ENOENT(`readlink '${p}'`);if(p[p.length-1]===`/`&&!this.listings.has(resolvedP))throw errors.ENOTDIR(`open '${p}'`);if(this.listings.has(resolvedP))throw errors.EINVAL(`readlink '${p}'`);const entry=this.entries.get(resolvedP);if(entry===undefined)throw new Error(`Unreachable`);if(!this.isSymbolicLink(entry))throw errors.EINVAL(`readlink '${p}'`);return entry}async truncatePromise(p,len=0){const resolvedP=this.resolveFilename(`open '${p}'`,p);const index=this.entries.get(resolvedP);if(typeof index===`undefined`)throw errors.EINVAL(`open '${p}'`);const source=await this.getFileSource(index,{asyncDecompress:true});const truncated=Buffer.alloc(len,0);source.copy(truncated);return await this.writeFilePromise(p,truncated)}truncateSync(p,len=0){const resolvedP=this.resolveFilename(`open '${p}'`,p);const index=this.entries.get(resolvedP);if(typeof index===`undefined`)throw errors.EINVAL(`open '${p}'`);const source=this.getFileSource(index);const truncated=Buffer.alloc(len,0);source.copy(truncated);return this.writeFileSync(p,truncated)}async ftruncatePromise(fd,len){return this.truncatePromise(this.fdToPath(fd,`ftruncate`),len)}ftruncateSync(fd,len){return this.truncateSync(this.fdToPath(fd,`ftruncateSync`),len)}watch(p,a,b){let persistent;switch(typeof a){case`function`:case`string`:case`undefined`:{persistent=true}break;default:{({persistent:persistent=true}=a)}break}if(!persistent)return{on:()=>{},close:()=>{}};const interval=setInterval((()=>{}),24*60*60*1e3);return{on:()=>{},close:()=>{clearInterval(interval)}}}watchFile(p,a,b){const resolvedP=path_1.ppath.resolve(path_1.PortablePath.root,p);return(0,watchFile_1.watchFile)(this,resolvedP,a,b)}unwatchFile(p,cb){const resolvedP=path_1.ppath.resolve(path_1.PortablePath.root,p);return(0,watchFile_1.unwatchFile)(this,resolvedP,cb)}}exports.ZipFS=ZipFS})(ZipFS);return ZipFS}var AliasFS={};var ProxiedFS={};var hasRequiredProxiedFS;function requireProxiedFS(){if(hasRequiredProxiedFS)return ProxiedFS;hasRequiredProxiedFS=1;Object.defineProperty(ProxiedFS,"__esModule",{value:true});ProxiedFS.ProxiedFS=void 0;const FakeFS_1=requireFakeFS();let ProxiedFS$1=class ProxiedFS extends FakeFS_1.FakeFS{getExtractHint(hints){return this.baseFs.getExtractHint(hints)}resolve(path){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(path)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(p,flags,mode){return this.baseFs.openPromise(this.mapToBase(p),flags,mode)}openSync(p,flags,mode){return this.baseFs.openSync(this.mapToBase(p),flags,mode)}async opendirPromise(p,opts){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(p),opts),{path:p})}opendirSync(p,opts){return Object.assign(this.baseFs.opendirSync(this.mapToBase(p),opts),{path:p})}async readPromise(fd,buffer,offset,length,position){return await this.baseFs.readPromise(fd,buffer,offset,length,position)}readSync(fd,buffer,offset,length,position){return this.baseFs.readSync(fd,buffer,offset,length,position)}async writePromise(fd,buffer,offset,length,position){if(typeof buffer===`string`){return await this.baseFs.writePromise(fd,buffer,offset)}else{return await this.baseFs.writePromise(fd,buffer,offset,length,position)}}writeSync(fd,buffer,offset,length,position){if(typeof buffer===`string`){return this.baseFs.writeSync(fd,buffer,offset)}else{return this.baseFs.writeSync(fd,buffer,offset,length,position)}}async closePromise(fd){return this.baseFs.closePromise(fd)}closeSync(fd){this.baseFs.closeSync(fd)}createReadStream(p,opts){return this.baseFs.createReadStream(p!==null?this.mapToBase(p):p,opts)}createWriteStream(p,opts){return this.baseFs.createWriteStream(p!==null?this.mapToBase(p):p,opts)}async realpathPromise(p){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(p)))}realpathSync(p){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(p)))}async existsPromise(p){return this.baseFs.existsPromise(this.mapToBase(p))}existsSync(p){return this.baseFs.existsSync(this.mapToBase(p))}accessSync(p,mode){return this.baseFs.accessSync(this.mapToBase(p),mode)}async accessPromise(p,mode){return this.baseFs.accessPromise(this.mapToBase(p),mode)}async statPromise(p,opts){return this.baseFs.statPromise(this.mapToBase(p),opts)}statSync(p,opts){return this.baseFs.statSync(this.mapToBase(p),opts)}async fstatPromise(fd,opts){return this.baseFs.fstatPromise(fd,opts)}fstatSync(fd,opts){return this.baseFs.fstatSync(fd,opts)}lstatPromise(p,opts){return this.baseFs.lstatPromise(this.mapToBase(p),opts)}lstatSync(p,opts){return this.baseFs.lstatSync(this.mapToBase(p),opts)}async fchmodPromise(fd,mask){return this.baseFs.fchmodPromise(fd,mask)}fchmodSync(fd,mask){return this.baseFs.fchmodSync(fd,mask)}async chmodPromise(p,mask){return this.baseFs.chmodPromise(this.mapToBase(p),mask)}chmodSync(p,mask){return this.baseFs.chmodSync(this.mapToBase(p),mask)}async fchownPromise(fd,uid,gid){return this.baseFs.fchownPromise(fd,uid,gid)}fchownSync(fd,uid,gid){return this.baseFs.fchownSync(fd,uid,gid)}async chownPromise(p,uid,gid){return this.baseFs.chownPromise(this.mapToBase(p),uid,gid)}chownSync(p,uid,gid){return this.baseFs.chownSync(this.mapToBase(p),uid,gid)}async renamePromise(oldP,newP){return this.baseFs.renamePromise(this.mapToBase(oldP),this.mapToBase(newP))}renameSync(oldP,newP){return this.baseFs.renameSync(this.mapToBase(oldP),this.mapToBase(newP))}async copyFilePromise(sourceP,destP,flags=0){return this.baseFs.copyFilePromise(this.mapToBase(sourceP),this.mapToBase(destP),flags)}copyFileSync(sourceP,destP,flags=0){return this.baseFs.copyFileSync(this.mapToBase(sourceP),this.mapToBase(destP),flags)}async appendFilePromise(p,content,opts){return this.baseFs.appendFilePromise(this.fsMapToBase(p),content,opts)}appendFileSync(p,content,opts){return this.baseFs.appendFileSync(this.fsMapToBase(p),content,opts)}async writeFilePromise(p,content,opts){return this.baseFs.writeFilePromise(this.fsMapToBase(p),content,opts)}writeFileSync(p,content,opts){return this.baseFs.writeFileSync(this.fsMapToBase(p),content,opts)}async unlinkPromise(p){return this.baseFs.unlinkPromise(this.mapToBase(p))}unlinkSync(p){return this.baseFs.unlinkSync(this.mapToBase(p))}async utimesPromise(p,atime,mtime){return this.baseFs.utimesPromise(this.mapToBase(p),atime,mtime)}utimesSync(p,atime,mtime){return this.baseFs.utimesSync(this.mapToBase(p),atime,mtime)}async mkdirPromise(p,opts){return this.baseFs.mkdirPromise(this.mapToBase(p),opts)}mkdirSync(p,opts){return this.baseFs.mkdirSync(this.mapToBase(p),opts)}async rmdirPromise(p,opts){return this.baseFs.rmdirPromise(this.mapToBase(p),opts)}rmdirSync(p,opts){return this.baseFs.rmdirSync(this.mapToBase(p),opts)}async linkPromise(existingP,newP){return this.baseFs.linkPromise(this.mapToBase(existingP),this.mapToBase(newP))}linkSync(existingP,newP){return this.baseFs.linkSync(this.mapToBase(existingP),this.mapToBase(newP))}async symlinkPromise(target,p,type){const mappedP=this.mapToBase(p);if(this.pathUtils.isAbsolute(target))return this.baseFs.symlinkPromise(this.mapToBase(target),mappedP,type);const mappedAbsoluteTarget=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(p),target));const mappedTarget=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(mappedP),mappedAbsoluteTarget);return this.baseFs.symlinkPromise(mappedTarget,mappedP,type)}symlinkSync(target,p,type){const mappedP=this.mapToBase(p);if(this.pathUtils.isAbsolute(target))return this.baseFs.symlinkSync(this.mapToBase(target),mappedP,type);const mappedAbsoluteTarget=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(p),target));const mappedTarget=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(mappedP),mappedAbsoluteTarget);return this.baseFs.symlinkSync(mappedTarget,mappedP,type)}async readFilePromise(p,encoding){if(encoding===`utf8`){return this.baseFs.readFilePromise(this.fsMapToBase(p),encoding)}else{return this.baseFs.readFilePromise(this.fsMapToBase(p),encoding)}}readFileSync(p,encoding){if(encoding===`utf8`){return this.baseFs.readFileSync(this.fsMapToBase(p),encoding)}else{return this.baseFs.readFileSync(this.fsMapToBase(p),encoding)}}async readdirPromise(p,opts){return this.baseFs.readdirPromise(this.mapToBase(p),opts)}readdirSync(p,opts){return this.baseFs.readdirSync(this.mapToBase(p),opts)}async readlinkPromise(p){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(p)))}readlinkSync(p){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(p)))}async truncatePromise(p,len){return this.baseFs.truncatePromise(this.mapToBase(p),len)}truncateSync(p,len){return this.baseFs.truncateSync(this.mapToBase(p),len)}async ftruncatePromise(fd,len){return this.baseFs.ftruncatePromise(fd,len)}ftruncateSync(fd,len){return this.baseFs.ftruncateSync(fd,len)}watch(p,a,b){return this.baseFs.watch(this.mapToBase(p),a,b)}watchFile(p,a,b){return this.baseFs.watchFile(this.mapToBase(p),a,b)}unwatchFile(p,cb){return this.baseFs.unwatchFile(this.mapToBase(p),cb)}fsMapToBase(p){if(typeof p===`number`){return p}else{return this.mapToBase(p)}}};ProxiedFS.ProxiedFS=ProxiedFS$1;return ProxiedFS}var hasRequiredAliasFS;function requireAliasFS(){if(hasRequiredAliasFS)return AliasFS;hasRequiredAliasFS=1;Object.defineProperty(AliasFS,"__esModule",{value:true});AliasFS.AliasFS=void 0;const ProxiedFS_1=requireProxiedFS();let AliasFS$1=class AliasFS extends ProxiedFS_1.ProxiedFS{constructor(target,{baseFs:baseFs,pathUtils:pathUtils}){super(pathUtils);this.target=target;this.baseFs=baseFs}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(p){return p}mapToBase(p){return p}};AliasFS.AliasFS=AliasFS$1;return AliasFS}var CwdFS={};var hasRequiredCwdFS;function requireCwdFS(){if(hasRequiredCwdFS)return CwdFS;hasRequiredCwdFS=1;Object.defineProperty(CwdFS,"__esModule",{value:true});CwdFS.CwdFS=void 0;const NodeFS_1=requireNodeFS();const ProxiedFS_1=requireProxiedFS();const path_1=requirePath$2();let CwdFS$1=class CwdFS extends ProxiedFS_1.ProxiedFS{constructor(target,{baseFs:baseFs=new NodeFS_1.NodeFS}={}){super(path_1.ppath);this.target=this.pathUtils.normalize(target);this.baseFs=baseFs}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(p){if(this.pathUtils.isAbsolute(p)){return path_1.ppath.normalize(p)}else{return this.baseFs.resolve(path_1.ppath.join(this.target,p))}}mapFromBase(path){return path}mapToBase(path){if(this.pathUtils.isAbsolute(path)){return path}else{return this.pathUtils.join(this.target,path)}}};CwdFS.CwdFS=CwdFS$1;return CwdFS}var JailFS={};var hasRequiredJailFS;function requireJailFS(){if(hasRequiredJailFS)return JailFS;hasRequiredJailFS=1;Object.defineProperty(JailFS,"__esModule",{value:true});JailFS.JailFS=void 0;const NodeFS_1=requireNodeFS();const ProxiedFS_1=requireProxiedFS();const path_1=requirePath$2();const JAIL_ROOT=path_1.PortablePath.root;let JailFS$1=class JailFS extends ProxiedFS_1.ProxiedFS{constructor(target,{baseFs:baseFs=new NodeFS_1.NodeFS}={}){super(path_1.ppath);this.target=this.pathUtils.resolve(path_1.PortablePath.root,target);this.baseFs=baseFs}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(path_1.PortablePath.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(p){const normalized=this.pathUtils.normalize(p);if(this.pathUtils.isAbsolute(p))return this.pathUtils.resolve(this.target,this.pathUtils.relative(JAIL_ROOT,p));if(normalized.match(/^\.\.\/?/))throw new Error(`Resolving this path (${p}) would escape the jail`);return this.pathUtils.resolve(this.target,p)}mapFromBase(p){return this.pathUtils.resolve(JAIL_ROOT,this.pathUtils.relative(this.target,p))}};JailFS.JailFS=JailFS$1;return JailFS}var LazyFS={};var hasRequiredLazyFS;function requireLazyFS(){if(hasRequiredLazyFS)return LazyFS;hasRequiredLazyFS=1;Object.defineProperty(LazyFS,"__esModule",{value:true});LazyFS.LazyFS=void 0;const ProxiedFS_1=requireProxiedFS();let LazyFS$1=class LazyFS extends ProxiedFS_1.ProxiedFS{constructor(factory,pathUtils){super(pathUtils);this.instance=null;this.factory=factory}get baseFs(){if(!this.instance)this.instance=this.factory();return this.instance}set baseFs(value){this.instance=value}mapFromBase(p){return p}mapToBase(p){return p}};LazyFS.LazyFS=LazyFS$1;return LazyFS}var NoFS={};var hasRequiredNoFS;function requireNoFS(){if(hasRequiredNoFS)return NoFS;hasRequiredNoFS=1;Object.defineProperty(NoFS,"__esModule",{value:true});NoFS.NoFS=void 0;const FakeFS_1=requireFakeFS();const path_1=requirePath$2();const makeError=()=>Object.assign(new Error(`ENOSYS: unsupported filesystem access`),{code:`ENOSYS`});let NoFS$1=class NoFS extends FakeFS_1.FakeFS{constructor(){super(path_1.ppath)}getExtractHint(){throw makeError()}getRealPath(){throw makeError()}resolve(){throw makeError()}async openPromise(){throw makeError()}openSync(){throw makeError()}async opendirPromise(){throw makeError()}opendirSync(){throw makeError()}async readPromise(){throw makeError()}readSync(){throw makeError()}async writePromise(){throw makeError()}writeSync(){throw makeError()}async closePromise(){throw makeError()}closeSync(){throw makeError()}createWriteStream(){throw makeError()}createReadStream(){throw makeError()}async realpathPromise(){throw makeError()}realpathSync(){throw makeError()}async readdirPromise(){throw makeError()}readdirSync(){throw makeError()}async existsPromise(p){throw makeError()}existsSync(p){throw makeError()}async accessPromise(){throw makeError()}accessSync(){throw makeError()}async statPromise(){throw makeError()}statSync(){throw makeError()}async fstatPromise(fd){throw makeError()}fstatSync(fd){throw makeError()}async lstatPromise(p){throw makeError()}lstatSync(p){throw makeError()}async fchmodPromise(){throw makeError()}fchmodSync(){throw makeError()}async chmodPromise(){throw makeError()}chmodSync(){throw makeError()}async fchownPromise(){throw makeError()}fchownSync(){throw makeError()}async chownPromise(){throw makeError()}chownSync(){throw makeError()}async mkdirPromise(){throw makeError()}mkdirSync(){throw makeError()}async rmdirPromise(){throw makeError()}rmdirSync(){throw makeError()}async linkPromise(){throw makeError()}linkSync(){throw makeError()}async symlinkPromise(){throw makeError()}symlinkSync(){throw makeError()}async renamePromise(){throw makeError()}renameSync(){throw makeError()}async copyFilePromise(){throw makeError()}copyFileSync(){throw makeError()}async appendFilePromise(){throw makeError()}appendFileSync(){throw makeError()}async writeFilePromise(){throw makeError()}writeFileSync(){throw makeError()}async unlinkPromise(){throw makeError()}unlinkSync(){throw makeError()}async utimesPromise(){throw makeError()}utimesSync(){throw makeError()}async readFilePromise(){throw makeError()}readFileSync(){throw makeError()}async readlinkPromise(){throw makeError()}readlinkSync(){throw makeError()}async truncatePromise(){throw makeError()}truncateSync(){throw makeError()}async ftruncatePromise(fd,len){throw makeError()}ftruncateSync(fd,len){throw makeError()}watch(){throw makeError()}watchFile(){throw makeError()}unwatchFile(){throw makeError()}};NoFS$1.instance=new NoFS$1;NoFS.NoFS=NoFS$1;return NoFS}var PosixFS={};var hasRequiredPosixFS;function requirePosixFS(){if(hasRequiredPosixFS)return PosixFS;hasRequiredPosixFS=1;Object.defineProperty(PosixFS,"__esModule",{value:true});PosixFS.PosixFS=void 0;const ProxiedFS_1=requireProxiedFS();const path_1=requirePath$2();let PosixFS$1=class PosixFS extends ProxiedFS_1.ProxiedFS{constructor(baseFs){super(path_1.npath);this.baseFs=baseFs}mapFromBase(path){return path_1.npath.fromPortablePath(path)}mapToBase(path){return path_1.npath.toPortablePath(path)}};PosixFS.PosixFS=PosixFS$1;return PosixFS}var VirtualFS={};var hasRequiredVirtualFS;function requireVirtualFS(){if(hasRequiredVirtualFS)return VirtualFS;hasRequiredVirtualFS=1;Object.defineProperty(VirtualFS,"__esModule",{value:true});VirtualFS.VirtualFS=void 0;const NodeFS_1=requireNodeFS();const ProxiedFS_1=requireProxiedFS();const path_1=requirePath$2();const NUMBER_REGEXP=/^[0-9]+$/;const VIRTUAL_REGEXP=/^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/;const VALID_COMPONENT=/^([^/]+-)?[a-f0-9]+$/;let VirtualFS$1=class VirtualFS extends ProxiedFS_1.ProxiedFS{static makeVirtualPath(base,component,to){if(path_1.ppath.basename(base)!==`__virtual__`)throw new Error(`Assertion failed: Virtual folders must be named "__virtual__"`);if(!path_1.ppath.basename(component).match(VALID_COMPONENT))throw new Error(`Assertion failed: Virtual components must be ended by an hexadecimal hash`);const target=path_1.ppath.relative(path_1.ppath.dirname(base),to);const segments=target.split(`/`);let depth=0;while(depth<segments.length&&segments[depth]===`..`)depth+=1;const finalSegments=segments.slice(depth);const fullVirtualPath=path_1.ppath.join(base,component,String(depth),...finalSegments);return fullVirtualPath}static resolveVirtual(p){const match=p.match(VIRTUAL_REGEXP);if(!match||!match[3]&&match[5])return p;const target=path_1.ppath.dirname(match[1]);if(!match[3]||!match[4])return target;const isnum=NUMBER_REGEXP.test(match[4]);if(!isnum)return p;const depth=Number(match[4]);const backstep=`../`.repeat(depth);const subpath=match[5]||`.`;return VirtualFS.resolveVirtual(path_1.ppath.join(target,backstep,subpath))}constructor({baseFs:baseFs=new NodeFS_1.NodeFS}={}){super(path_1.ppath);this.baseFs=baseFs}getExtractHint(hints){return this.baseFs.getExtractHint(hints)}getRealPath(){return this.baseFs.getRealPath()}realpathSync(p){const match=p.match(VIRTUAL_REGEXP);if(!match)return this.baseFs.realpathSync(p);if(!match[5])return p;const realpath=this.baseFs.realpathSync(this.mapToBase(p));return VirtualFS.makeVirtualPath(match[1],match[3],realpath)}async realpathPromise(p){const match=p.match(VIRTUAL_REGEXP);if(!match)return await this.baseFs.realpathPromise(p);if(!match[5])return p;const realpath=await this.baseFs.realpathPromise(this.mapToBase(p));return VirtualFS.makeVirtualPath(match[1],match[3],realpath)}mapToBase(p){if(p===``)return p;if(this.pathUtils.isAbsolute(p))return VirtualFS.resolveVirtual(p);const resolvedRoot=VirtualFS.resolveVirtual(this.baseFs.resolve(path_1.PortablePath.dot));const resolvedP=VirtualFS.resolveVirtual(this.baseFs.resolve(p));return path_1.ppath.relative(resolvedRoot,resolvedP)||path_1.PortablePath.dot}mapFromBase(p){return p}};VirtualFS.VirtualFS=VirtualFS$1;return VirtualFS}var ZipOpenFS={};var hasRequiredZipOpenFS;function requireZipOpenFS(){if(hasRequiredZipOpenFS)return ZipOpenFS;hasRequiredZipOpenFS=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.ZipOpenFS=exports.getArchivePart=void 0;const tslib_1=require$$0;const fs_1=require$$0$2;const FakeFS_1=requireFakeFS();const NodeFS_1=requireNodeFS();const ZipFS_1=requireZipFS();const watchFile_1=requireWatchFile();const errors=tslib_1.__importStar(requireErrors$1());const path_1=requirePath$2();const ZIP_MASK=4278190080;const ZIP_MAGIC=704643072;const getArchivePart=(path,extension)=>{let idx=path.indexOf(extension);if(idx<=0)return null;let nextCharIdx=idx;while(idx>=0){nextCharIdx=idx+extension.length;if(path[nextCharIdx]===path_1.ppath.sep)break;if(path[idx-1]===path_1.ppath.sep)return null;idx=path.indexOf(extension,nextCharIdx)}if(path.length>nextCharIdx&&path[nextCharIdx]!==path_1.ppath.sep)return null;return path.slice(0,nextCharIdx)};exports.getArchivePart=getArchivePart;class ZipOpenFS extends FakeFS_1.BasePortableFakeFS{static async openPromise(fn,opts){const zipOpenFs=new ZipOpenFS(opts);try{return await fn(zipOpenFs)}finally{zipOpenFs.saveAndClose()}}get libzip(){if(typeof this.libzipInstance===`undefined`)this.libzipInstance=this.libzipFactory();return this.libzipInstance}constructor({libzip:libzip,baseFs:baseFs=new NodeFS_1.NodeFS,filter:filter=null,maxOpenFiles:maxOpenFiles=Infinity,readOnlyArchives:readOnlyArchives=false,useCache:useCache=true,maxAge:maxAge=5e3,fileExtensions:fileExtensions=null}){super();this.fdMap=new Map;this.nextFd=3;this.isZip=new Set;this.notZip=new Set;this.realPaths=new Map;this.limitOpenFilesTimeout=null;this.libzipFactory=typeof libzip!==`function`?()=>libzip:libzip;this.baseFs=baseFs;this.zipInstances=useCache?new Map:null;this.filter=filter;this.maxOpenFiles=maxOpenFiles;this.readOnlyArchives=readOnlyArchives;this.maxAge=maxAge;this.fileExtensions=fileExtensions}getExtractHint(hints){return this.baseFs.getExtractHint(hints)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){(0,watchFile_1.unwatchAllFiles)(this);if(this.zipInstances){for(const[path,{zipFs:zipFs}]of this.zipInstances.entries()){zipFs.saveAndClose();this.zipInstances.delete(path)}}}discardAndClose(){(0,watchFile_1.unwatchAllFiles)(this);if(this.zipInstances){for(const[path,{zipFs:zipFs}]of this.zipInstances.entries()){zipFs.discardAndClose();this.zipInstances.delete(path)}}}resolve(p){return this.baseFs.resolve(p)}remapFd(zipFs,fd){const remappedFd=this.nextFd++|ZIP_MAGIC;this.fdMap.set(remappedFd,[zipFs,fd]);return remappedFd}async openPromise(p,flags,mode){return await this.makeCallPromise(p,(async()=>await this.baseFs.openPromise(p,flags,mode)),(async(zipFs,{subPath:subPath})=>this.remapFd(zipFs,await zipFs.openPromise(subPath,flags,mode))))}openSync(p,flags,mode){return this.makeCallSync(p,(()=>this.baseFs.openSync(p,flags,mode)),((zipFs,{subPath:subPath})=>this.remapFd(zipFs,zipFs.openSync(subPath,flags,mode))))}async opendirPromise(p,opts){return await this.makeCallPromise(p,(async()=>await this.baseFs.opendirPromise(p,opts)),(async(zipFs,{subPath:subPath})=>await zipFs.opendirPromise(subPath,opts)),{requireSubpath:false})}opendirSync(p,opts){return this.makeCallSync(p,(()=>this.baseFs.opendirSync(p,opts)),((zipFs,{subPath:subPath})=>zipFs.opendirSync(subPath,opts)),{requireSubpath:false})}async readPromise(fd,buffer,offset,length,position){if((fd&ZIP_MASK)!==ZIP_MAGIC)return await this.baseFs.readPromise(fd,buffer,offset,length,position);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`read`);const[zipFs,realFd]=entry;return await zipFs.readPromise(realFd,buffer,offset,length,position)}readSync(fd,buffer,offset,length,position){if((fd&ZIP_MASK)!==ZIP_MAGIC)return this.baseFs.readSync(fd,buffer,offset,length,position);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`readSync`);const[zipFs,realFd]=entry;return zipFs.readSync(realFd,buffer,offset,length,position)}async writePromise(fd,buffer,offset,length,position){if((fd&ZIP_MASK)!==ZIP_MAGIC){if(typeof buffer===`string`){return await this.baseFs.writePromise(fd,buffer,offset)}else{return await this.baseFs.writePromise(fd,buffer,offset,length,position)}}const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`write`);const[zipFs,realFd]=entry;if(typeof buffer===`string`){return await zipFs.writePromise(realFd,buffer,offset)}else{return await zipFs.writePromise(realFd,buffer,offset,length,position)}}writeSync(fd,buffer,offset,length,position){if((fd&ZIP_MASK)!==ZIP_MAGIC){if(typeof buffer===`string`){return this.baseFs.writeSync(fd,buffer,offset)}else{return this.baseFs.writeSync(fd,buffer,offset,length,position)}}const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`writeSync`);const[zipFs,realFd]=entry;if(typeof buffer===`string`){return zipFs.writeSync(realFd,buffer,offset)}else{return zipFs.writeSync(realFd,buffer,offset,length,position)}}async closePromise(fd){if((fd&ZIP_MASK)!==ZIP_MAGIC)return await this.baseFs.closePromise(fd);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`close`);this.fdMap.delete(fd);const[zipFs,realFd]=entry;return await zipFs.closePromise(realFd)}closeSync(fd){if((fd&ZIP_MASK)!==ZIP_MAGIC)return this.baseFs.closeSync(fd);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`closeSync`);this.fdMap.delete(fd);const[zipFs,realFd]=entry;return zipFs.closeSync(realFd)}createReadStream(p,opts){if(p===null)return this.baseFs.createReadStream(p,opts);return this.makeCallSync(p,(()=>this.baseFs.createReadStream(p,opts)),((zipFs,{archivePath:archivePath,subPath:subPath})=>{const stream=zipFs.createReadStream(subPath,opts);stream.path=path_1.npath.fromPortablePath(this.pathUtils.join(archivePath,subPath));return stream}))}createWriteStream(p,opts){if(p===null)return this.baseFs.createWriteStream(p,opts);return this.makeCallSync(p,(()=>this.baseFs.createWriteStream(p,opts)),((zipFs,{subPath:subPath})=>zipFs.createWriteStream(subPath,opts)))}async realpathPromise(p){return await this.makeCallPromise(p,(async()=>await this.baseFs.realpathPromise(p)),(async(zipFs,{archivePath:archivePath,subPath:subPath})=>{let realArchivePath=this.realPaths.get(archivePath);if(typeof realArchivePath===`undefined`){realArchivePath=await this.baseFs.realpathPromise(archivePath);this.realPaths.set(archivePath,realArchivePath)}return this.pathUtils.join(realArchivePath,this.pathUtils.relative(path_1.PortablePath.root,await zipFs.realpathPromise(subPath)))}))}realpathSync(p){return this.makeCallSync(p,(()=>this.baseFs.realpathSync(p)),((zipFs,{archivePath:archivePath,subPath:subPath})=>{let realArchivePath=this.realPaths.get(archivePath);if(typeof realArchivePath===`undefined`){realArchivePath=this.baseFs.realpathSync(archivePath);this.realPaths.set(archivePath,realArchivePath)}return this.pathUtils.join(realArchivePath,this.pathUtils.relative(path_1.PortablePath.root,zipFs.realpathSync(subPath)))}))}async existsPromise(p){return await this.makeCallPromise(p,(async()=>await this.baseFs.existsPromise(p)),(async(zipFs,{subPath:subPath})=>await zipFs.existsPromise(subPath)))}existsSync(p){return this.makeCallSync(p,(()=>this.baseFs.existsSync(p)),((zipFs,{subPath:subPath})=>zipFs.existsSync(subPath)))}async accessPromise(p,mode){return await this.makeCallPromise(p,(async()=>await this.baseFs.accessPromise(p,mode)),(async(zipFs,{subPath:subPath})=>await zipFs.accessPromise(subPath,mode)))}accessSync(p,mode){return this.makeCallSync(p,(()=>this.baseFs.accessSync(p,mode)),((zipFs,{subPath:subPath})=>zipFs.accessSync(subPath,mode)))}async statPromise(p,opts){return await this.makeCallPromise(p,(async()=>await this.baseFs.statPromise(p,opts)),(async(zipFs,{subPath:subPath})=>await zipFs.statPromise(subPath,opts)))}statSync(p,opts){return this.makeCallSync(p,(()=>this.baseFs.statSync(p,opts)),((zipFs,{subPath:subPath})=>zipFs.statSync(subPath,opts)))}async fstatPromise(fd,opts){if((fd&ZIP_MASK)!==ZIP_MAGIC)return this.baseFs.fstatPromise(fd,opts);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`fstat`);const[zipFs,realFd]=entry;return zipFs.fstatPromise(realFd,opts)}fstatSync(fd,opts){if((fd&ZIP_MASK)!==ZIP_MAGIC)return this.baseFs.fstatSync(fd,opts);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`fstatSync`);const[zipFs,realFd]=entry;return zipFs.fstatSync(realFd,opts)}async lstatPromise(p,opts){return await this.makeCallPromise(p,(async()=>await this.baseFs.lstatPromise(p,opts)),(async(zipFs,{subPath:subPath})=>await zipFs.lstatPromise(subPath,opts)))}lstatSync(p,opts){return this.makeCallSync(p,(()=>this.baseFs.lstatSync(p,opts)),((zipFs,{subPath:subPath})=>zipFs.lstatSync(subPath,opts)))}async fchmodPromise(fd,mask){if((fd&ZIP_MASK)!==ZIP_MAGIC)return this.baseFs.fchmodPromise(fd,mask);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`fchmod`);const[zipFs,realFd]=entry;return zipFs.fchmodPromise(realFd,mask)}fchmodSync(fd,mask){if((fd&ZIP_MASK)!==ZIP_MAGIC)return this.baseFs.fchmodSync(fd,mask);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`fchmodSync`);const[zipFs,realFd]=entry;return zipFs.fchmodSync(realFd,mask)}async chmodPromise(p,mask){return await this.makeCallPromise(p,(async()=>await this.baseFs.chmodPromise(p,mask)),(async(zipFs,{subPath:subPath})=>await zipFs.chmodPromise(subPath,mask)))}chmodSync(p,mask){return this.makeCallSync(p,(()=>this.baseFs.chmodSync(p,mask)),((zipFs,{subPath:subPath})=>zipFs.chmodSync(subPath,mask)))}async fchownPromise(fd,uid,gid){if((fd&ZIP_MASK)!==ZIP_MAGIC)return this.baseFs.fchownPromise(fd,uid,gid);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`fchown`);const[zipFs,realFd]=entry;return zipFs.fchownPromise(realFd,uid,gid)}fchownSync(fd,uid,gid){if((fd&ZIP_MASK)!==ZIP_MAGIC)return this.baseFs.fchownSync(fd,uid,gid);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`fchownSync`);const[zipFs,realFd]=entry;return zipFs.fchownSync(realFd,uid,gid)}async chownPromise(p,uid,gid){return await this.makeCallPromise(p,(async()=>await this.baseFs.chownPromise(p,uid,gid)),(async(zipFs,{subPath:subPath})=>await zipFs.chownPromise(subPath,uid,gid)))}chownSync(p,uid,gid){return this.makeCallSync(p,(()=>this.baseFs.chownSync(p,uid,gid)),((zipFs,{subPath:subPath})=>zipFs.chownSync(subPath,uid,gid)))}async renamePromise(oldP,newP){return await this.makeCallPromise(oldP,(async()=>await this.makeCallPromise(newP,(async()=>await this.baseFs.renamePromise(oldP,newP)),(async()=>{throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`),{code:`EEXDEV`})}))),(async(zipFsO,{subPath:subPathO})=>await this.makeCallPromise(newP,(async()=>{throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`),{code:`EEXDEV`})}),(async(zipFsN,{subPath:subPathN})=>{if(zipFsO!==zipFsN){throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`),{code:`EEXDEV`})}else{return await zipFsO.renamePromise(subPathO,subPathN)}}))))}renameSync(oldP,newP){return this.makeCallSync(oldP,(()=>this.makeCallSync(newP,(()=>this.baseFs.renameSync(oldP,newP)),(()=>{throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`),{code:`EEXDEV`})}))),((zipFsO,{subPath:subPathO})=>this.makeCallSync(newP,(()=>{throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`),{code:`EEXDEV`})}),((zipFsN,{subPath:subPathN})=>{if(zipFsO!==zipFsN){throw Object.assign(new Error(`EEXDEV: cross-device link not permitted`),{code:`EEXDEV`})}else{return zipFsO.renameSync(subPathO,subPathN)}}))))}async copyFilePromise(sourceP,destP,flags=0){const fallback=async(sourceFs,sourceP,destFs,destP)=>{if((flags&fs_1.constants.COPYFILE_FICLONE_FORCE)!==0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP}' -> ${destP}'`),{code:`EXDEV`});if(flags&fs_1.constants.COPYFILE_EXCL&&await this.existsPromise(sourceP))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP}' -> '${destP}'`),{code:`EEXIST`});let content;try{content=await sourceFs.readFilePromise(sourceP)}catch(error){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP}' -> '${destP}'`),{code:`EINVAL`})}await destFs.writeFilePromise(destP,content)};return await this.makeCallPromise(sourceP,(async()=>await this.makeCallPromise(destP,(async()=>await this.baseFs.copyFilePromise(sourceP,destP,flags)),(async(zipFsD,{subPath:subPathD})=>await fallback(this.baseFs,sourceP,zipFsD,subPathD)))),(async(zipFsS,{subPath:subPathS})=>await this.makeCallPromise(destP,(async()=>await fallback(zipFsS,subPathS,this.baseFs,destP)),(async(zipFsD,{subPath:subPathD})=>{if(zipFsS!==zipFsD){return await fallback(zipFsS,subPathS,zipFsD,subPathD)}else{return await zipFsS.copyFilePromise(subPathS,subPathD,flags)}}))))}copyFileSync(sourceP,destP,flags=0){const fallback=(sourceFs,sourceP,destFs,destP)=>{if((flags&fs_1.constants.COPYFILE_FICLONE_FORCE)!==0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${sourceP}' -> ${destP}'`),{code:`EXDEV`});if(flags&fs_1.constants.COPYFILE_EXCL&&this.existsSync(sourceP))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${sourceP}' -> '${destP}'`),{code:`EEXIST`});let content;try{content=sourceFs.readFileSync(sourceP)}catch(error){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${sourceP}' -> '${destP}'`),{code:`EINVAL`})}destFs.writeFileSync(destP,content)};return this.makeCallSync(sourceP,(()=>this.makeCallSync(destP,(()=>this.baseFs.copyFileSync(sourceP,destP,flags)),((zipFsD,{subPath:subPathD})=>fallback(this.baseFs,sourceP,zipFsD,subPathD)))),((zipFsS,{subPath:subPathS})=>this.makeCallSync(destP,(()=>fallback(zipFsS,subPathS,this.baseFs,destP)),((zipFsD,{subPath:subPathD})=>{if(zipFsS!==zipFsD){return fallback(zipFsS,subPathS,zipFsD,subPathD)}else{return zipFsS.copyFileSync(subPathS,subPathD,flags)}}))))}async appendFilePromise(p,content,opts){return await this.makeCallPromise(p,(async()=>await this.baseFs.appendFilePromise(p,content,opts)),(async(zipFs,{subPath:subPath})=>await zipFs.appendFilePromise(subPath,content,opts)))}appendFileSync(p,content,opts){return this.makeCallSync(p,(()=>this.baseFs.appendFileSync(p,content,opts)),((zipFs,{subPath:subPath})=>zipFs.appendFileSync(subPath,content,opts)))}async writeFilePromise(p,content,opts){return await this.makeCallPromise(p,(async()=>await this.baseFs.writeFilePromise(p,content,opts)),(async(zipFs,{subPath:subPath})=>await zipFs.writeFilePromise(subPath,content,opts)))}writeFileSync(p,content,opts){return this.makeCallSync(p,(()=>this.baseFs.writeFileSync(p,content,opts)),((zipFs,{subPath:subPath})=>zipFs.writeFileSync(subPath,content,opts)))}async unlinkPromise(p){return await this.makeCallPromise(p,(async()=>await this.baseFs.unlinkPromise(p)),(async(zipFs,{subPath:subPath})=>await zipFs.unlinkPromise(subPath)))}unlinkSync(p){return this.makeCallSync(p,(()=>this.baseFs.unlinkSync(p)),((zipFs,{subPath:subPath})=>zipFs.unlinkSync(subPath)))}async utimesPromise(p,atime,mtime){return await this.makeCallPromise(p,(async()=>await this.baseFs.utimesPromise(p,atime,mtime)),(async(zipFs,{subPath:subPath})=>await zipFs.utimesPromise(subPath,atime,mtime)))}utimesSync(p,atime,mtime){return this.makeCallSync(p,(()=>this.baseFs.utimesSync(p,atime,mtime)),((zipFs,{subPath:subPath})=>zipFs.utimesSync(subPath,atime,mtime)))}async mkdirPromise(p,opts){return await this.makeCallPromise(p,(async()=>await this.baseFs.mkdirPromise(p,opts)),(async(zipFs,{subPath:subPath})=>await zipFs.mkdirPromise(subPath,opts)))}mkdirSync(p,opts){return this.makeCallSync(p,(()=>this.baseFs.mkdirSync(p,opts)),((zipFs,{subPath:subPath})=>zipFs.mkdirSync(subPath,opts)))}async rmdirPromise(p,opts){return await this.makeCallPromise(p,(async()=>await this.baseFs.rmdirPromise(p,opts)),(async(zipFs,{subPath:subPath})=>await zipFs.rmdirPromise(subPath,opts)))}rmdirSync(p,opts){return this.makeCallSync(p,(()=>this.baseFs.rmdirSync(p,opts)),((zipFs,{subPath:subPath})=>zipFs.rmdirSync(subPath,opts)))}async linkPromise(existingP,newP){return await this.makeCallPromise(newP,(async()=>await this.baseFs.linkPromise(existingP,newP)),(async(zipFs,{subPath:subPath})=>await zipFs.linkPromise(existingP,subPath)))}linkSync(existingP,newP){return this.makeCallSync(newP,(()=>this.baseFs.linkSync(existingP,newP)),((zipFs,{subPath:subPath})=>zipFs.linkSync(existingP,subPath)))}async symlinkPromise(target,p,type){return await this.makeCallPromise(p,(async()=>await this.baseFs.symlinkPromise(target,p,type)),(async(zipFs,{subPath:subPath})=>await zipFs.symlinkPromise(target,subPath)))}symlinkSync(target,p,type){return this.makeCallSync(p,(()=>this.baseFs.symlinkSync(target,p,type)),((zipFs,{subPath:subPath})=>zipFs.symlinkSync(target,subPath)))}async readFilePromise(p,encoding){return this.makeCallPromise(p,(async()=>{switch(encoding){case`utf8`:return await this.baseFs.readFilePromise(p,encoding);default:return await this.baseFs.readFilePromise(p,encoding)}}),(async(zipFs,{subPath:subPath})=>await zipFs.readFilePromise(subPath,encoding)))}readFileSync(p,encoding){return this.makeCallSync(p,(()=>{switch(encoding){case`utf8`:return this.baseFs.readFileSync(p,encoding);default:return this.baseFs.readFileSync(p,encoding)}}),((zipFs,{subPath:subPath})=>zipFs.readFileSync(subPath,encoding)))}async readdirPromise(p,opts){return await this.makeCallPromise(p,(async()=>await this.baseFs.readdirPromise(p,opts)),(async(zipFs,{subPath:subPath})=>await zipFs.readdirPromise(subPath,opts)),{requireSubpath:false})}readdirSync(p,opts){return this.makeCallSync(p,(()=>this.baseFs.readdirSync(p,opts)),((zipFs,{subPath:subPath})=>zipFs.readdirSync(subPath,opts)),{requireSubpath:false})}async readlinkPromise(p){return await this.makeCallPromise(p,(async()=>await this.baseFs.readlinkPromise(p)),(async(zipFs,{subPath:subPath})=>await zipFs.readlinkPromise(subPath)))}readlinkSync(p){return this.makeCallSync(p,(()=>this.baseFs.readlinkSync(p)),((zipFs,{subPath:subPath})=>zipFs.readlinkSync(subPath)))}async truncatePromise(p,len){return await this.makeCallPromise(p,(async()=>await this.baseFs.truncatePromise(p,len)),(async(zipFs,{subPath:subPath})=>await zipFs.truncatePromise(subPath,len)))}truncateSync(p,len){return this.makeCallSync(p,(()=>this.baseFs.truncateSync(p,len)),((zipFs,{subPath:subPath})=>zipFs.truncateSync(subPath,len)))}async ftruncatePromise(fd,len){if((fd&ZIP_MASK)!==ZIP_MAGIC)return this.baseFs.ftruncatePromise(fd,len);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`ftruncate`);const[zipFs,realFd]=entry;return zipFs.ftruncatePromise(realFd,len)}ftruncateSync(fd,len){if((fd&ZIP_MASK)!==ZIP_MAGIC)return this.baseFs.ftruncateSync(fd,len);const entry=this.fdMap.get(fd);if(typeof entry===`undefined`)throw errors.EBADF(`ftruncateSync`);const[zipFs,realFd]=entry;return zipFs.ftruncateSync(realFd,len)}watch(p,a,b){return this.makeCallSync(p,(()=>this.baseFs.watch(p,a,b)),((zipFs,{subPath:subPath})=>zipFs.watch(subPath,a,b)))}watchFile(p,a,b){return this.makeCallSync(p,(()=>this.baseFs.watchFile(p,a,b)),(()=>(0,watchFile_1.watchFile)(this,p,a,b)))}unwatchFile(p,cb){return this.makeCallSync(p,(()=>this.baseFs.unwatchFile(p,cb)),(()=>(0,watchFile_1.unwatchFile)(this,p,cb)))}async makeCallPromise(p,discard,accept,{requireSubpath:requireSubpath=true}={}){if(typeof p!==`string`)return await discard();const normalizedP=this.resolve(p);const zipInfo=this.findZip(normalizedP);if(!zipInfo)return await discard();if(requireSubpath&&zipInfo.subPath===`/`)return await discard();return await this.getZipPromise(zipInfo.archivePath,(async zipFs=>await accept(zipFs,zipInfo)))}makeCallSync(p,discard,accept,{requireSubpath:requireSubpath=true}={}){if(typeof p!==`string`)return discard();const normalizedP=this.resolve(p);const zipInfo=this.findZip(normalizedP);if(!zipInfo)return discard();if(requireSubpath&&zipInfo.subPath===`/`)return discard();return this.getZipSync(zipInfo.archivePath,(zipFs=>accept(zipFs,zipInfo)))}findZip(p){if(this.filter&&!this.filter.test(p))return null;let filePath=``;while(true){const pathPartWithArchive=p.substring(filePath.length);let archivePart;if(!this.fileExtensions){archivePart=(0,exports.getArchivePart)(pathPartWithArchive,`.zip`)}else{for(const ext of this.fileExtensions){archivePart=(0,exports.getArchivePart)(pathPartWithArchive,ext);if(archivePart){break}}}if(!archivePart)return null;filePath=this.pathUtils.join(filePath,archivePart);if(this.isZip.has(filePath)===false){if(this.notZip.has(filePath))continue;try{if(!this.baseFs.lstatSync(filePath).isFile()){this.notZip.add(filePath);continue}}catch{return null}this.isZip.add(filePath)}return{archivePath:filePath,subPath:this.pathUtils.join(path_1.PortablePath.root,p.substring(filePath.length))}}}limitOpenFiles(max){if(this.zipInstances===null)return;const now=Date.now();let nextExpiresAt=now+this.maxAge;let closeCount=max===null?0:this.zipInstances.size-max;for(const[path,{zipFs:zipFs,expiresAt:expiresAt,refCount:refCount}]of this.zipInstances.entries()){if(refCount!==0||zipFs.hasOpenFileHandles()){continue}else if(now>=expiresAt){zipFs.saveAndClose();this.zipInstances.delete(path);closeCount-=1;continue}else if(max===null||closeCount<=0){nextExpiresAt=expiresAt;break}zipFs.saveAndClose();this.zipInstances.delete(path);closeCount-=1}if(this.limitOpenFilesTimeout===null&&(max===null&&this.zipInstances.size>0||max!==null)){this.limitOpenFilesTimeout=setTimeout((()=>{this.limitOpenFilesTimeout=null;this.limitOpenFiles(null)}),nextExpiresAt-now).unref()}}async getZipPromise(p,accept){const getZipOptions=async()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:await this.baseFs.statPromise(p)});if(this.zipInstances){let cachedZipFs=this.zipInstances.get(p);if(!cachedZipFs){const zipOptions=await getZipOptions();cachedZipFs=this.zipInstances.get(p);if(!cachedZipFs){cachedZipFs={zipFs:new ZipFS_1.ZipFS(p,zipOptions),expiresAt:0,refCount:0}}}this.zipInstances.delete(p);this.limitOpenFiles(this.maxOpenFiles-1);this.zipInstances.set(p,cachedZipFs);cachedZipFs.expiresAt=Date.now()+this.maxAge;cachedZipFs.refCount+=1;try{return await accept(cachedZipFs.zipFs)}finally{cachedZipFs.refCount-=1}}else{const zipFs=new ZipFS_1.ZipFS(p,await getZipOptions());try{return await accept(zipFs)}finally{zipFs.saveAndClose()}}}getZipSync(p,accept){const getZipOptions=()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:this.baseFs.statSync(p)});if(this.zipInstances){let cachedZipFs=this.zipInstances.get(p);if(!cachedZipFs){cachedZipFs={zipFs:new ZipFS_1.ZipFS(p,getZipOptions()),expiresAt:0,refCount:0}}this.zipInstances.delete(p);this.limitOpenFiles(this.maxOpenFiles-1);this.zipInstances.set(p,cachedZipFs);cachedZipFs.expiresAt=Date.now()+this.maxAge;return accept(cachedZipFs.zipFs)}else{const zipFs=new ZipFS_1.ZipFS(p,getZipOptions());try{return accept(zipFs)}finally{zipFs.saveAndClose()}}}}exports.ZipOpenFS=ZipOpenFS})(ZipOpenFS);return ZipOpenFS}var patchFs={};var NodePathFS={};var hasRequiredNodePathFS;function requireNodePathFS(){if(hasRequiredNodePathFS)return NodePathFS;hasRequiredNodePathFS=1;Object.defineProperty(NodePathFS,"__esModule",{value:true});NodePathFS.NodePathFS=void 0;const url_1=require$$0$7;const util_1=require$$0$1;const ProxiedFS_1=requireProxiedFS();const path_1=requirePath$2();let NodePathFS$1=class NodePathFS extends ProxiedFS_1.ProxiedFS{constructor(baseFs){super(path_1.npath);this.baseFs=baseFs}mapFromBase(path){return path}mapToBase(path){if(typeof path===`string`)return path;if(path instanceof url_1.URL)return(0,url_1.fileURLToPath)(path);if(Buffer.isBuffer(path)){const str=path.toString();if(Buffer.byteLength(str)!==path.byteLength)throw new Error(`Non-utf8 buffers are not supported at the moment. Please upvote the following issue if you encounter this error: https://github.com/yarnpkg/berry/issues/4942`);return str}throw new Error(`Unsupported path type: ${(0,util_1.inspect)(path)}`)}};NodePathFS.NodePathFS=NodePathFS$1;return NodePathFS}var FileHandle={};var hasRequiredFileHandle;function requireFileHandle(){if(hasRequiredFileHandle)return FileHandle;hasRequiredFileHandle=1;var _a,_b,_c,_d;Object.defineProperty(FileHandle,"__esModule",{value:true});FileHandle.FileHandle=void 0;const readline_1=require$$0$9;const kBaseFs=Symbol(`kBaseFs`);const kFd=Symbol(`kFd`);const kClosePromise=Symbol(`kClosePromise`);const kCloseResolve=Symbol(`kCloseResolve`);const kCloseReject=Symbol(`kCloseReject`);const kRefs=Symbol(`kRefs`);const kRef=Symbol(`kRef`);const kUnref=Symbol(`kUnref`);let FileHandle$1=class FileHandle{constructor(fd,baseFs){this[_a]=1;this[_b]=undefined;this[_c]=undefined;this[_d]=undefined;this[kBaseFs]=baseFs;this[kFd]=fd}get fd(){return this[kFd]}async appendFile(data,options){var _e;try{this[kRef](this.appendFile);const encoding=(_e=typeof options===`string`?options:options===null||options===void 0?void 0:options.encoding)!==null&&_e!==void 0?_e:undefined;return await this[kBaseFs].appendFilePromise(this.fd,data,encoding?{encoding:encoding}:undefined)}finally{this[kUnref]()}}async chown(uid,gid){try{this[kRef](this.chown);return await this[kBaseFs].fchownPromise(this.fd,uid,gid)}finally{this[kUnref]()}}async chmod(mode){try{this[kRef](this.chmod);return await this[kBaseFs].fchmodPromise(this.fd,mode)}finally{this[kUnref]()}}createReadStream(options){return this[kBaseFs].createReadStream(null,{...options,fd:this.fd})}createWriteStream(options){return this[kBaseFs].createWriteStream(null,{...options,fd:this.fd})}datasync(){throw new Error(`Method not implemented.`)}sync(){throw new Error(`Method not implemented.`)}async read(bufferOrOptions,offset,length,position){var _e,_f,_g;try{this[kRef](this.read);let buffer;if(!Buffer.isBuffer(bufferOrOptions)){bufferOrOptions!==null&&bufferOrOptions!==void 0?bufferOrOptions:bufferOrOptions={};buffer=(_e=bufferOrOptions.buffer)!==null&&_e!==void 0?_e:Buffer.alloc(16384);offset=bufferOrOptions.offset||0;length=(_f=bufferOrOptions.length)!==null&&_f!==void 0?_f:buffer.byteLength;position=(_g=bufferOrOptions.position)!==null&&_g!==void 0?_g:null}else{buffer=bufferOrOptions}offset!==null&&offset!==void 0?offset:offset=0;length!==null&&length!==void 0?length:length=0;if(length===0){return{bytesRead:length,buffer:buffer}}const bytesRead=await this[kBaseFs].readPromise(this.fd,buffer,offset,length,position);return{bytesRead:bytesRead,buffer:buffer}}finally{this[kUnref]()}}async readFile(options){var _e;try{this[kRef](this.readFile);const encoding=(_e=typeof options===`string`?options:options===null||options===void 0?void 0:options.encoding)!==null&&_e!==void 0?_e:undefined;return await this[kBaseFs].readFilePromise(this.fd,encoding)}finally{this[kUnref]()}}readLines(options){return(0,readline_1.createInterface)({input:this.createReadStream(options),crlfDelay:Infinity})}async stat(opts){try{this[kRef](this.stat);return await this[kBaseFs].fstatPromise(this.fd,opts)}finally{this[kUnref]()}}async truncate(len){try{this[kRef](this.truncate);return await this[kBaseFs].ftruncatePromise(this.fd,len)}finally{this[kUnref]()}}utimes(atime,mtime){throw new Error(`Method not implemented.`)}async writeFile(data,options){var _e;try{this[kRef](this.writeFile);const encoding=(_e=typeof options===`string`?options:options===null||options===void 0?void 0:options.encoding)!==null&&_e!==void 0?_e:undefined;await this[kBaseFs].writeFilePromise(this.fd,data,encoding)}finally{this[kUnref]()}}async write(...args){try{this[kRef](this.write);if(ArrayBuffer.isView(args[0])){const[buffer,offset,length,position]=args;const bytesWritten=await this[kBaseFs].writePromise(this.fd,buffer,offset!==null&&offset!==void 0?offset:undefined,length!==null&&length!==void 0?length:undefined,position!==null&&position!==void 0?position:undefined);return{bytesWritten:bytesWritten,buffer:buffer}}else{const[data,position,encoding]=args;const bytesWritten=await this[kBaseFs].writePromise(this.fd,data,position,encoding);return{bytesWritten:bytesWritten,buffer:data}}}finally{this[kUnref]()}}async writev(buffers,position){try{this[kRef](this.writev);let bytesWritten=0;if(typeof position!==`undefined`){for(const buffer of buffers){const writeResult=await this.write(buffer,undefined,undefined,position);bytesWritten+=writeResult.bytesWritten;position+=writeResult.bytesWritten}}else{for(const buffer of buffers){const writeResult=await this.write(buffer);bytesWritten+=writeResult.bytesWritten}}return{buffers:buffers,bytesWritten:bytesWritten}}finally{this[kUnref]()}}readv(buffers,position){throw new Error(`Method not implemented.`)}close(){if(this[kFd]===-1)return Promise.resolve();if(this[kClosePromise])return this[kClosePromise];this[kRefs]--;if(this[kRefs]===0){const fd=this[kFd];this[kFd]=-1;this[kClosePromise]=this[kBaseFs].closePromise(fd).finally((()=>{this[kClosePromise]=undefined}))}else{this[kClosePromise]=new Promise(((resolve,reject)=>{this[kCloseResolve]=resolve;this[kCloseReject]=reject})).finally((()=>{this[kClosePromise]=undefined;this[kCloseReject]=undefined;this[kCloseResolve]=undefined}))}return this[kClosePromise]}[(_a=kRefs,_b=kClosePromise,_c=kCloseResolve,_d=kCloseReject,kRef)](caller){if(this[kFd]===-1){const err=new Error(`file closed`);err.code=`EBADF`;err.syscall=caller.name;throw err}this[kRefs]++}[kUnref](){this[kRefs]--;if(this[kRefs]===0){const fd=this[kFd];this[kFd]=-1;this[kBaseFs].closePromise(fd).then(this[kCloseResolve],this[kCloseReject])}}};FileHandle.FileHandle=FileHandle$1;return FileHandle}var hasRequiredPatchFs;function requirePatchFs(){if(hasRequiredPatchFs)return patchFs;hasRequiredPatchFs=1;Object.defineProperty(patchFs,"__esModule",{value:true});patchFs.extendFs=patchFs.patchFs=void 0;const util_1=require$$0$1;const NodePathFS_1=requireNodePathFS();const FileHandle_1=requireFileHandle();const SYNC_IMPLEMENTATIONS=new Set([`accessSync`,`appendFileSync`,`createReadStream`,`createWriteStream`,`chmodSync`,`fchmodSync`,`chownSync`,`fchownSync`,`closeSync`,`copyFileSync`,`linkSync`,`lstatSync`,`fstatSync`,`lutimesSync`,`mkdirSync`,`openSync`,`opendirSync`,`readlinkSync`,`readFileSync`,`readdirSync`,`readlinkSync`,`realpathSync`,`renameSync`,`rmdirSync`,`statSync`,`symlinkSync`,`truncateSync`,`ftruncateSync`,`unlinkSync`,`unwatchFile`,`utimesSync`,`watch`,`watchFile`,`writeFileSync`,`writeSync`]);const ASYNC_IMPLEMENTATIONS=new Set([`accessPromise`,`appendFilePromise`,`fchmodPromise`,`chmodPromise`,`fchownPromise`,`chownPromise`,`closePromise`,`copyFilePromise`,`linkPromise`,`fstatPromise`,`lstatPromise`,`lutimesPromise`,`mkdirPromise`,`openPromise`,`opendirPromise`,`readdirPromise`,`realpathPromise`,`readFilePromise`,`readdirPromise`,`readlinkPromise`,`renamePromise`,`rmdirPromise`,`statPromise`,`symlinkPromise`,`truncatePromise`,`ftruncatePromise`,`unlinkPromise`,`utimesPromise`,`writeFilePromise`,`writeSync`]);function patchFs$1(patchedFs,fakeFs){fakeFs=new NodePathFS_1.NodePathFS(fakeFs);const setupFn=(target,name,replacement)=>{const orig=target[name];target[name]=replacement;if(typeof(orig===null||orig===void 0?void 0:orig[util_1.promisify.custom])!==`undefined`){replacement[util_1.promisify.custom]=orig[util_1.promisify.custom]}};{setupFn(patchedFs,`exists`,((p,...args)=>{const hasCallback=typeof args[args.length-1]===`function`;const callback=hasCallback?args.pop():()=>{};process.nextTick((()=>{fakeFs.existsPromise(p).then((exists=>{callback(exists)}),(()=>{callback(false)}))}))}));setupFn(patchedFs,`read`,((...args)=>{let[fd,buffer,offset,length,position,callback]=args;if(args.length<=3){let options={};if(args.length<3){callback=args[1]}else{options=args[1];callback=args[2]}({buffer:buffer=Buffer.alloc(16384),offset:offset=0,length:length=buffer.byteLength,position:position}=options)}if(offset==null)offset=0;length|=0;if(length===0){process.nextTick((()=>{callback(null,0,buffer)}));return}if(position==null)position=-1;process.nextTick((()=>{fakeFs.readPromise(fd,buffer,offset,length,position).then((bytesRead=>{callback(null,bytesRead,buffer)}),(error=>{callback(error,0,buffer)}))}))}));for(const fnName of ASYNC_IMPLEMENTATIONS){const origName=fnName.replace(/Promise$/,``);if(typeof patchedFs[origName]===`undefined`)continue;const fakeImpl=fakeFs[fnName];if(typeof fakeImpl===`undefined`)continue;const wrapper=(...args)=>{const hasCallback=typeof args[args.length-1]===`function`;const callback=hasCallback?args.pop():()=>{};process.nextTick((()=>{fakeImpl.apply(fakeFs,args).then((result=>{callback(null,result)}),(error=>{callback(error)}))}))};setupFn(patchedFs,origName,wrapper)}patchedFs.realpath.native=patchedFs.realpath}{setupFn(patchedFs,`existsSync`,(p=>{try{return fakeFs.existsSync(p)}catch(error){return false}}));setupFn(patchedFs,`readSync`,((...args)=>{let[fd,buffer,offset,length,position]=args;if(args.length<=3){const options=args[2]||{};({offset:offset=0,length:length=buffer.byteLength,position:position}=options)}if(offset==null)offset=0;length|=0;if(length===0)return 0;if(position==null)position=-1;return fakeFs.readSync(fd,buffer,offset,length,position)}));for(const fnName of SYNC_IMPLEMENTATIONS){const origName=fnName;if(typeof patchedFs[origName]===`undefined`)continue;const fakeImpl=fakeFs[fnName];if(typeof fakeImpl===`undefined`)continue;setupFn(patchedFs,origName,fakeImpl.bind(fakeFs))}patchedFs.realpathSync.native=patchedFs.realpathSync}{const origEmitWarning=process.emitWarning;process.emitWarning=()=>{};let patchedFsPromises;try{patchedFsPromises=patchedFs.promises}finally{process.emitWarning=origEmitWarning}if(typeof patchedFsPromises!==`undefined`){for(const fnName of ASYNC_IMPLEMENTATIONS){const origName=fnName.replace(/Promise$/,``);if(typeof patchedFsPromises[origName]===`undefined`)continue;const fakeImpl=fakeFs[fnName];if(typeof fakeImpl===`undefined`)continue;if(fnName===`open`)continue;setupFn(patchedFsPromises,origName,((pathLike,...args)=>{if(pathLike instanceof FileHandle_1.FileHandle){return pathLike[origName].apply(pathLike,args)}else{return fakeImpl.call(fakeFs,pathLike,...args)}}))}setupFn(patchedFsPromises,`open`,(async(...args)=>{const fd=await fakeFs.openPromise(...args);return new FileHandle_1.FileHandle(fd,fakeFs)}))}}{patchedFs.read[util_1.promisify.custom]=async(fd,buffer,...args)=>{const res=fakeFs.readPromise(fd,buffer,...args);return{bytesRead:await res,buffer:buffer}};patchedFs.write[util_1.promisify.custom]=async(fd,buffer,...args)=>{const res=fakeFs.writePromise(fd,buffer,...args);return{bytesWritten:await res,buffer:buffer}}}}patchFs.patchFs=patchFs$1;function extendFs(realFs,fakeFs){const patchedFs=Object.create(realFs);patchFs$1(patchedFs,fakeFs);return patchedFs}patchFs.extendFs=extendFs;return patchFs}var xfs={};var hasRequiredXfs;function requireXfs(){if(hasRequiredXfs)return xfs;hasRequiredXfs=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.xfs=void 0;const tslib_1=require$$0;const os_1=tslib_1.__importDefault(require$$0$5);const NodeFS_1=requireNodeFS();const path_1=requirePath$2();function getTempName(prefix){const hash=Math.ceil(Math.random()*4294967296).toString(16).padStart(8,`0`);return`${prefix}${hash}`}const tmpdirs=new Set;let tmpEnv=null;function initTmpEnv(){if(tmpEnv)return tmpEnv;const tmpdir=path_1.npath.toPortablePath(os_1.default.tmpdir());const realTmpdir=exports.xfs.realpathSync(tmpdir);process.once(`exit`,(()=>{exports.xfs.rmtempSync()}));return tmpEnv={tmpdir:tmpdir,realTmpdir:realTmpdir}}exports.xfs=Object.assign(new NodeFS_1.NodeFS,{detachTemp(p){tmpdirs.delete(p)},mktempSync(cb){const{tmpdir:tmpdir,realTmpdir:realTmpdir}=initTmpEnv();while(true){const name=getTempName(`xfs-`);try{this.mkdirSync(path_1.ppath.join(tmpdir,name))}catch(error){if(error.code===`EEXIST`){continue}else{throw error}}const realP=path_1.ppath.join(realTmpdir,name);tmpdirs.add(realP);if(typeof cb===`undefined`)return realP;try{return cb(realP)}finally{if(tmpdirs.has(realP)){tmpdirs.delete(realP);try{this.removeSync(realP)}catch{}}}}},async mktempPromise(cb){const{tmpdir:tmpdir,realTmpdir:realTmpdir}=initTmpEnv();while(true){const name=getTempName(`xfs-`);try{await this.mkdirPromise(path_1.ppath.join(tmpdir,name))}catch(error){if(error.code===`EEXIST`){continue}else{throw error}}const realP=path_1.ppath.join(realTmpdir,name);tmpdirs.add(realP);if(typeof cb===`undefined`)return realP;try{return await cb(realP)}finally{if(tmpdirs.has(realP)){tmpdirs.delete(realP);try{await this.removePromise(realP)}catch{}}}}},async rmtempPromise(){await Promise.all(Array.from(tmpdirs.values()).map((async p=>{try{await exports.xfs.removePromise(p,{maxRetries:0});tmpdirs.delete(p)}catch{}})))},rmtempSync(){for(const p of tmpdirs){try{exports.xfs.removeSync(p);tmpdirs.delete(p)}catch{}}}})})(xfs);return xfs}var hasRequiredLib$e;function requireLib$e(){if(hasRequiredLib$e)return lib$d;hasRequiredLib$e=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.xfs=exports.extendFs=exports.patchFs=exports.ZipOpenFS=exports.ZipFS=exports.VirtualFS=exports.ProxiedFS=exports.PosixFS=exports.NodeFS=exports.NoFS=exports.LazyFS=exports.JailFS=exports.CwdFS=exports.FakeFS=exports.AliasFS=exports.toFilename=exports.ppath=exports.npath=exports.Filename=exports.PortablePath=exports.DEFAULT_COMPRESSION_LEVEL=exports.normalizeLineEndings=exports.statUtils=exports.opendir=exports.LinkStrategy=exports.constants=void 0;const tslib_1=require$$0;const constants=tslib_1.__importStar(requireConstants$3());exports.constants=constants;const statUtils=tslib_1.__importStar(requireStatUtils());exports.statUtils=statUtils;var copyPromise_1=requireCopyPromise();Object.defineProperty(exports,"LinkStrategy",{enumerable:true,get:function(){return copyPromise_1.LinkStrategy}});var opendir_1=requireOpendir();Object.defineProperty(exports,"opendir",{enumerable:true,get:function(){return opendir_1.opendir}});var FakeFS_1=requireFakeFS();Object.defineProperty(exports,"normalizeLineEndings",{enumerable:true,get:function(){return FakeFS_1.normalizeLineEndings}});var ZipFS_1=requireZipFS();Object.defineProperty(exports,"DEFAULT_COMPRESSION_LEVEL",{enumerable:true,get:function(){return ZipFS_1.DEFAULT_COMPRESSION_LEVEL}});var path_1=requirePath$2();Object.defineProperty(exports,"PortablePath",{enumerable:true,get:function(){return path_1.PortablePath}});Object.defineProperty(exports,"Filename",{enumerable:true,get:function(){return path_1.Filename}});var path_2=requirePath$2();Object.defineProperty(exports,"npath",{enumerable:true,get:function(){return path_2.npath}});Object.defineProperty(exports,"ppath",{enumerable:true,get:function(){return path_2.ppath}});Object.defineProperty(exports,"toFilename",{enumerable:true,get:function(){return path_2.toFilename}});var AliasFS_1=requireAliasFS();Object.defineProperty(exports,"AliasFS",{enumerable:true,get:function(){return AliasFS_1.AliasFS}});var FakeFS_2=requireFakeFS();Object.defineProperty(exports,"FakeFS",{enumerable:true,get:function(){return FakeFS_2.FakeFS}});var CwdFS_1=requireCwdFS();Object.defineProperty(exports,"CwdFS",{enumerable:true,get:function(){return CwdFS_1.CwdFS}});var JailFS_1=requireJailFS();Object.defineProperty(exports,"JailFS",{enumerable:true,get:function(){return JailFS_1.JailFS}});var LazyFS_1=requireLazyFS();Object.defineProperty(exports,"LazyFS",{enumerable:true,get:function(){return LazyFS_1.LazyFS}});var NoFS_1=requireNoFS();Object.defineProperty(exports,"NoFS",{enumerable:true,get:function(){return NoFS_1.NoFS}});var NodeFS_1=requireNodeFS();Object.defineProperty(exports,"NodeFS",{enumerable:true,get:function(){return NodeFS_1.NodeFS}});var PosixFS_1=requirePosixFS();Object.defineProperty(exports,"PosixFS",{enumerable:true,get:function(){return PosixFS_1.PosixFS}});var ProxiedFS_1=requireProxiedFS();Object.defineProperty(exports,"ProxiedFS",{enumerable:true,get:function(){return ProxiedFS_1.ProxiedFS}});var VirtualFS_1=requireVirtualFS();Object.defineProperty(exports,"VirtualFS",{enumerable:true,get:function(){return VirtualFS_1.VirtualFS}});var ZipFS_2=requireZipFS();Object.defineProperty(exports,"ZipFS",{enumerable:true,get:function(){return ZipFS_2.ZipFS}});var ZipOpenFS_1=requireZipOpenFS();Object.defineProperty(exports,"ZipOpenFS",{enumerable:true,get:function(){return ZipOpenFS_1.ZipOpenFS}});var patchFs_1=requirePatchFs();Object.defineProperty(exports,"patchFs",{enumerable:true,get:function(){return patchFs_1.patchFs}});Object.defineProperty(exports,"extendFs",{enumerable:true,get:function(){return patchFs_1.extendFs}});var xfs_1=requireXfs();Object.defineProperty(exports,"xfs",{enumerable:true,get:function(){return xfs_1.xfs}})})(lib$d);return lib$d}var lib$c={};var shell$1={};var shell;var hasRequiredShell$1;function requireShell$1(){if(hasRequiredShell$1)return shell;hasRequiredShell$1=1;function peg$subclass(child,parent){function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor}function peg$SyntaxError(message,expected,found,location){this.message=message;this.expected=expected;this.found=found;this.location=location;this.name="SyntaxError";if(typeof Error.captureStackTrace==="function"){Error.captureStackTrace(this,peg$SyntaxError)}}peg$subclass(peg$SyntaxError,Error);peg$SyntaxError.buildMessage=function(expected,found){var DESCRIBE_EXPECTATION_FNS={literal:function(expectation){return'"'+literalEscape(expectation.text)+'"'},class:function(expectation){var escapedParts="",i;for(i=0;i<expectation.parts.length;i++){escapedParts+=expectation.parts[i]instanceof Array?classEscape(expectation.parts[i][0])+"-"+classEscape(expectation.parts[i][1]):classEscape(expectation.parts[i])}return"["+(expectation.inverted?"^":"")+escapedParts+"]"},any:function(expectation){return"any character"},end:function(expectation){return"end of input"},other:function(expectation){return expectation.description}};function hex(ch){return ch.charCodeAt(0).toString(16).toUpperCase()}function literalEscape(s){return s.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(ch){return"\\x0"+hex(ch)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(ch){return"\\x"+hex(ch)}))}function classEscape(s){return s.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(ch){return"\\x0"+hex(ch)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(ch){return"\\x"+hex(ch)}))}function describeExpectation(expectation){return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation)}function describeExpected(expected){var descriptions=new Array(expected.length),i,j;for(i=0;i<expected.length;i++){descriptions[i]=describeExpectation(expected[i])}descriptions.sort();if(descriptions.length>0){for(i=1,j=1;i<descriptions.length;i++){if(descriptions[i-1]!==descriptions[i]){descriptions[j]=descriptions[i];j++}}descriptions.length=j}switch(descriptions.length){case 1:return descriptions[0];case 2:return descriptions[0]+" or "+descriptions[1];default:return descriptions.slice(0,-1).join(", ")+", or "+descriptions[descriptions.length-1]}}function describeFound(found){return found?'"'+literalEscape(found)+'"':"end of input"}return"Expected "+describeExpected(expected)+" but "+describeFound(found)+" found."};function peg$parse(input,options){options=options!==void 0?options:{};var peg$FAILED={},peg$startRuleFunctions={Start:peg$parseStart},peg$startRuleFunction=peg$parseStart,peg$c0=function(line){return line?line:[]},peg$c1=function(command,type,then){return[{command:command,type:type}].concat(then||[])},peg$c2=function(command,type){return[{command:command,type:type||";"}]},peg$c3=function(then){return then},peg$c4=";",peg$c5=peg$literalExpectation(";",false),peg$c6="&",peg$c7=peg$literalExpectation("&",false),peg$c8=function(chain,then){return then?{chain:chain,then:then}:{chain:chain}},peg$c9=function(type,then){return{type:type,line:then}},peg$c10="&&",peg$c11=peg$literalExpectation("&&",false),peg$c12="||",peg$c13=peg$literalExpectation("||",false),peg$c14=function(main,then){return then?{...main,then:then}:main},peg$c15=function(type,then){return{type:type,chain:then}},peg$c16="|&",peg$c17=peg$literalExpectation("|&",false),peg$c18="|",peg$c19=peg$literalExpectation("|",false),peg$c20="=",peg$c21=peg$literalExpectation("=",false),peg$c22=function(name,arg){return{name:name,args:[arg]}},peg$c23=function(name){return{name:name,args:[]}},peg$c24="(",peg$c25=peg$literalExpectation("(",false),peg$c26=")",peg$c27=peg$literalExpectation(")",false),peg$c28=function(subshell,args){return{type:`subshell`,subshell:subshell,args:args}},peg$c29="{",peg$c30=peg$literalExpectation("{",false),peg$c31="}",peg$c32=peg$literalExpectation("}",false),peg$c33=function(group,args){return{type:`group`,group:group,args:args}},peg$c34=function(envs,args){return{type:`command`,args:args,envs:envs}},peg$c35=function(envs){return{type:`envs`,envs:envs}},peg$c36=function(args){return args},peg$c37=function(arg){return arg},peg$c38=/^[0-9]/,peg$c39=peg$classExpectation([["0","9"]],false,false),peg$c40=function(fd,redirect,arg){return{type:`redirection`,subtype:redirect,fd:fd!==null?parseInt(fd):null,args:[arg]}},peg$c41=">>",peg$c42=peg$literalExpectation(">>",false),peg$c43=">&",peg$c44=peg$literalExpectation(">&",false),peg$c45=">",peg$c46=peg$literalExpectation(">",false),peg$c47="<<<",peg$c48=peg$literalExpectation("<<<",false),peg$c49="<&",peg$c50=peg$literalExpectation("<&",false),peg$c51="<",peg$c52=peg$literalExpectation("<",false),peg$c53=function(segments){return{type:`argument`,segments:[].concat(...segments)}},peg$c54=function(string){return string},peg$c55="$'",peg$c56=peg$literalExpectation("$'",false),peg$c57="'",peg$c58=peg$literalExpectation("'",false),peg$c59=function(text){return[{type:`text`,text:text}]},peg$c60='""',peg$c61=peg$literalExpectation('""',false),peg$c62=function(){return{type:`text`,text:``}},peg$c63='"',peg$c64=peg$literalExpectation('"',false),peg$c65=function(segments){return segments},peg$c66=function(arithmetic){return{type:`arithmetic`,arithmetic:arithmetic,quoted:true}},peg$c67=function(shell){return{type:`shell`,shell:shell,quoted:true}},peg$c68=function(variable){return{type:`variable`,...variable,quoted:true}},peg$c69=function(text){return{type:`text`,text:text}},peg$c70=function(arithmetic){return{type:`arithmetic`,arithmetic:arithmetic,quoted:false}},peg$c71=function(shell){return{type:`shell`,shell:shell,quoted:false}},peg$c72=function(variable){return{type:`variable`,...variable,quoted:false}},peg$c73=function(pattern){return{type:`glob`,pattern:pattern}},peg$c74=/^[^']/,peg$c75=peg$classExpectation(["'"],true,false),peg$c76=function(chars){return chars.join(``)},peg$c77=/^[^$"]/,peg$c78=peg$classExpectation(["$",'"'],true,false),peg$c79="\\\n",peg$c80=peg$literalExpectation("\\\n",false),peg$c81=function(){return``},peg$c82="\\",peg$c83=peg$literalExpectation("\\",false),peg$c84=/^[\\$"`]/,peg$c85=peg$classExpectation(["\\","$",'"',"`"],false,false),peg$c86=function(c){return c},peg$c87="\\a",peg$c88=peg$literalExpectation("\\a",false),peg$c89=function(){return"a"},peg$c90="\\b",peg$c91=peg$literalExpectation("\\b",false),peg$c92=function(){return"\b"},peg$c93=/^[Ee]/,peg$c94=peg$classExpectation(["E","e"],false,false),peg$c95=function(){return"\x1b"},peg$c96="\\f",peg$c97=peg$literalExpectation("\\f",false),peg$c98=function(){return"\f"},peg$c99="\\n",peg$c100=peg$literalExpectation("\\n",false),peg$c101=function(){return"\n"},peg$c102="\\r",peg$c103=peg$literalExpectation("\\r",false),peg$c104=function(){return"\r"},peg$c105="\\t",peg$c106=peg$literalExpectation("\\t",false),peg$c107=function(){return"\t"},peg$c108="\\v",peg$c109=peg$literalExpectation("\\v",false),peg$c110=function(){return"\v"},peg$c111=/^[\\'"?]/,peg$c112=peg$classExpectation(["\\","'",'"',"?"],false,false),peg$c113=function(c){return String.fromCharCode(parseInt(c,16))},peg$c114="\\x",peg$c115=peg$literalExpectation("\\x",false),peg$c116="\\u",peg$c117=peg$literalExpectation("\\u",false),peg$c118="\\U",peg$c119=peg$literalExpectation("\\U",false),peg$c120=function(c){return String.fromCodePoint(parseInt(c,16))},peg$c121=/^[0-7]/,peg$c122=peg$classExpectation([["0","7"]],false,false),peg$c123=/^[0-9a-fA-f]/,peg$c124=peg$classExpectation([["0","9"],["a","f"],["A","f"]],false,false),peg$c125=peg$anyExpectation(),peg$c126="-",peg$c127=peg$literalExpectation("-",false),peg$c128="+",peg$c129=peg$literalExpectation("+",false),peg$c130=".",peg$c131=peg$literalExpectation(".",false),peg$c132=function(sign,left,right){return{type:`number`,value:(sign==="-"?-1:1)*parseFloat(left.join(``)+`.`+right.join(``))}},peg$c133=function(sign,value){return{type:`number`,value:(sign==="-"?-1:1)*parseInt(value.join(``))}},peg$c134=function(variable){return{type:`variable`,...variable}},peg$c135=function(name){return{type:`variable`,name:name}},peg$c136=function(value){return value},peg$c137="*",peg$c138=peg$literalExpectation("*",false),peg$c139="/",peg$c140=peg$literalExpectation("/",false),peg$c141=function(left,op,right){return{type:op===`*`?`multiplication`:`division`,right:right}},peg$c142=function(left,rest){return rest.reduce(((left,right)=>({left:left,...right})),left)},peg$c143=function(left,op,right){return{type:op===`+`?`addition`:`subtraction`,right:right}},peg$c144="$((",peg$c145=peg$literalExpectation("$((",false),peg$c146="))",peg$c147=peg$literalExpectation("))",false),peg$c148=function(arithmetic){return arithmetic},peg$c149="$(",peg$c150=peg$literalExpectation("$(",false),peg$c151=function(command){return command},peg$c152="${",peg$c153=peg$literalExpectation("${",false),peg$c154=":-",peg$c155=peg$literalExpectation(":-",false),peg$c156=function(name,arg){return{name:name,defaultValue:arg}},peg$c157=":-}",peg$c158=peg$literalExpectation(":-}",false),peg$c159=function(name){return{name:name,defaultValue:[]}},peg$c160=":+",peg$c161=peg$literalExpectation(":+",false),peg$c162=function(name,arg){return{name:name,alternativeValue:arg}},peg$c163=":+}",peg$c164=peg$literalExpectation(":+}",false),peg$c165=function(name){return{name:name,alternativeValue:[]}},peg$c166=function(name){return{name:name}},peg$c167="$",peg$c168=peg$literalExpectation("$",false),peg$c169=function(pattern){return options.isGlobPattern(pattern)},peg$c170=function(pattern){return pattern},peg$c171=/^[a-zA-Z0-9_]/,peg$c172=peg$classExpectation([["a","z"],["A","Z"],["0","9"],"_"],false,false),peg$c173=function(){return text()},peg$c174=/^[$@*?#a-zA-Z0-9_\-]/,peg$c175=peg$classExpectation(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],false,false),peg$c176=/^[(){}<>$|&; \t"']/,peg$c177=peg$classExpectation(["(",")","{","}","<",">","$","|","&",";"," ","\t",'"',"'"],false,false),peg$c178=/^[<>&; \t"']/,peg$c179=peg$classExpectation(["<",">","&",";"," ","\t",'"',"'"],false,false),peg$c180=/^[ \t]/,peg$c181=peg$classExpectation([" ","\t"],false,false),peg$currPos=0,peg$savedPos=0,peg$posDetailsCache=[{line:1,column:1}],peg$maxFailPos=0,peg$maxFailExpected=[],peg$silentFails=0,peg$result;if("startRule"in options){if(!(options.startRule in peg$startRuleFunctions)){throw new Error("Can't start parsing from rule \""+options.startRule+'".')}peg$startRuleFunction=peg$startRuleFunctions[options.startRule]}function text(){return input.substring(peg$savedPos,peg$currPos)}function peg$literalExpectation(text,ignoreCase){return{type:"literal",text:text,ignoreCase:ignoreCase}}function peg$classExpectation(parts,inverted,ignoreCase){return{type:"class",parts:parts,inverted:inverted,ignoreCase:ignoreCase}}function peg$anyExpectation(){return{type:"any"}}function peg$endExpectation(){return{type:"end"}}function peg$computePosDetails(pos){var details=peg$posDetailsCache[pos],p;if(details){return details}else{p=pos-1;while(!peg$posDetailsCache[p]){p--}details=peg$posDetailsCache[p];details={line:details.line,column:details.column};while(p<pos){if(input.charCodeAt(p)===10){details.line++;details.column=1}else{details.column++}p++}peg$posDetailsCache[pos]=details;return details}}function peg$computeLocation(startPos,endPos){var startPosDetails=peg$computePosDetails(startPos),endPosDetails=peg$computePosDetails(endPos);return{start:{offset:startPos,line:startPosDetails.line,column:startPosDetails.column},end:{offset:endPos,line:endPosDetails.line,column:endPosDetails.column}}}function peg$fail(expected){if(peg$currPos<peg$maxFailPos){return}if(peg$currPos>peg$maxFailPos){peg$maxFailPos=peg$currPos;peg$maxFailExpected=[]}peg$maxFailExpected.push(expected)}function peg$buildStructuredError(expected,found,location){return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected,found),expected,found,location)}function peg$parseStart(){var s0,s1;s0=peg$currPos;s1=peg$parseShellLine();if(s1===peg$FAILED){s1=null}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c0(s1)}s0=s1;return s0}function peg$parseShellLine(){var s0,s1,s2,s3,s4;s0=peg$currPos;s1=peg$parseCommandLine();if(s1!==peg$FAILED){s2=[];s3=peg$parseS();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseS()}if(s2!==peg$FAILED){s3=peg$parseShellLineType();if(s3!==peg$FAILED){s4=peg$parseShellLineThen();if(s4===peg$FAILED){s4=null}if(s4!==peg$FAILED){peg$savedPos=s0;s1=peg$c1(s1,s3,s4);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseCommandLine();if(s1!==peg$FAILED){s2=[];s3=peg$parseS();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseS()}if(s2!==peg$FAILED){s3=peg$parseShellLineType();if(s3===peg$FAILED){s3=null}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c2(s1,s3);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}return s0}function peg$parseShellLineThen(){var s0,s1,s2,s3,s4;s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parseShellLine();if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c3(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseShellLineType(){var s0;if(input.charCodeAt(peg$currPos)===59){s0=peg$c4;peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c5)}}if(s0===peg$FAILED){if(input.charCodeAt(peg$currPos)===38){s0=peg$c6;peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c7)}}}return s0}function peg$parseCommandLine(){var s0,s1,s2;s0=peg$currPos;s1=peg$parseCommandChain();if(s1!==peg$FAILED){s2=peg$parseCommandLineThen();if(s2===peg$FAILED){s2=null}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c8(s1,s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseCommandLineThen(){var s0,s1,s2,s3,s4,s5,s6;s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parseCommandLineType();if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){s4=peg$parseCommandLine();if(s4!==peg$FAILED){s5=[];s6=peg$parseS();while(s6!==peg$FAILED){s5.push(s6);s6=peg$parseS()}if(s5!==peg$FAILED){peg$savedPos=s0;s1=peg$c9(s2,s4);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseCommandLineType(){var s0;if(input.substr(peg$currPos,2)===peg$c10){s0=peg$c10;peg$currPos+=2}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c11)}}if(s0===peg$FAILED){if(input.substr(peg$currPos,2)===peg$c12){s0=peg$c12;peg$currPos+=2}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c13)}}}return s0}function peg$parseCommandChain(){var s0,s1,s2;s0=peg$currPos;s1=peg$parseCommand();if(s1!==peg$FAILED){s2=peg$parseCommandChainThen();if(s2===peg$FAILED){s2=null}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c14(s1,s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseCommandChainThen(){var s0,s1,s2,s3,s4,s5,s6;s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parseCommandChainType();if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){s4=peg$parseCommandChain();if(s4!==peg$FAILED){s5=[];s6=peg$parseS();while(s6!==peg$FAILED){s5.push(s6);s6=peg$parseS()}if(s5!==peg$FAILED){peg$savedPos=s0;s1=peg$c15(s2,s4);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseCommandChainType(){var s0;if(input.substr(peg$currPos,2)===peg$c16){s0=peg$c16;peg$currPos+=2}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c17)}}if(s0===peg$FAILED){if(input.charCodeAt(peg$currPos)===124){s0=peg$c18;peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c19)}}}return s0}function peg$parseVariableAssignment(){var s0,s1,s2,s3,s4,s5;s0=peg$currPos;s1=peg$parseEnvVariable();if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===61){s2=peg$c20;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c21)}}if(s2!==peg$FAILED){s3=peg$parseStrictValueArgument();if(s3!==peg$FAILED){s4=[];s5=peg$parseS();while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseS()}if(s4!==peg$FAILED){peg$savedPos=s0;s1=peg$c22(s1,s3);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseEnvVariable();if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===61){s2=peg$c20;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c21)}}if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c23(s1);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}return s0}function peg$parseCommand(){var s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10;s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===40){s2=peg$c24;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c25)}}if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){s4=peg$parseShellLine();if(s4!==peg$FAILED){s5=[];s6=peg$parseS();while(s6!==peg$FAILED){s5.push(s6);s6=peg$parseS()}if(s5!==peg$FAILED){if(input.charCodeAt(peg$currPos)===41){s6=peg$c26;peg$currPos++}else{s6=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c27)}}if(s6!==peg$FAILED){s7=[];s8=peg$parseS();while(s8!==peg$FAILED){s7.push(s8);s8=peg$parseS()}if(s7!==peg$FAILED){s8=[];s9=peg$parseRedirectArgument();while(s9!==peg$FAILED){s8.push(s9);s9=peg$parseRedirectArgument()}if(s8!==peg$FAILED){s9=[];s10=peg$parseS();while(s10!==peg$FAILED){s9.push(s10);s10=peg$parseS()}if(s9!==peg$FAILED){peg$savedPos=s0;s1=peg$c28(s4,s8);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===123){s2=peg$c29;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c30)}}if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){s4=peg$parseShellLine();if(s4!==peg$FAILED){s5=[];s6=peg$parseS();while(s6!==peg$FAILED){s5.push(s6);s6=peg$parseS()}if(s5!==peg$FAILED){if(input.charCodeAt(peg$currPos)===125){s6=peg$c31;peg$currPos++}else{s6=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c32)}}if(s6!==peg$FAILED){s7=[];s8=peg$parseS();while(s8!==peg$FAILED){s7.push(s8);s8=peg$parseS()}if(s7!==peg$FAILED){s8=[];s9=peg$parseRedirectArgument();while(s9!==peg$FAILED){s8.push(s9);s9=peg$parseRedirectArgument()}if(s8!==peg$FAILED){s9=[];s10=peg$parseS();while(s10!==peg$FAILED){s9.push(s10);s10=peg$parseS()}if(s9!==peg$FAILED){peg$savedPos=s0;s1=peg$c33(s4,s8);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=[];s3=peg$parseVariableAssignment();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseVariableAssignment()}if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){s4=[];s5=peg$parseArgument();if(s5!==peg$FAILED){while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseArgument()}}else{s4=peg$FAILED}if(s4!==peg$FAILED){s5=[];s6=peg$parseS();while(s6!==peg$FAILED){s5.push(s6);s6=peg$parseS()}if(s5!==peg$FAILED){peg$savedPos=s0;s1=peg$c34(s2,s4);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=[];s3=peg$parseVariableAssignment();if(s3!==peg$FAILED){while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseVariableAssignment()}}else{s2=peg$FAILED}if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c35(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}}}return s0}function peg$parseCommandString(){var s0,s1,s2,s3,s4;s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=[];s3=peg$parseValueArgument();if(s3!==peg$FAILED){while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseValueArgument()}}else{s2=peg$FAILED}if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c36(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseArgument(){var s0,s1,s2;s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parseRedirectArgument();if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c37(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parseValueArgument();if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c37(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}return s0}function peg$parseRedirectArgument(){var s0,s1,s2,s3,s4;s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){if(peg$c38.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c39)}}if(s2===peg$FAILED){s2=null}if(s2!==peg$FAILED){s3=peg$parseRedirectType();if(s3!==peg$FAILED){s4=peg$parseValueArgument();if(s4!==peg$FAILED){peg$savedPos=s0;s1=peg$c40(s2,s3,s4);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseRedirectType(){var s0;if(input.substr(peg$currPos,2)===peg$c41){s0=peg$c41;peg$currPos+=2}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c42)}}if(s0===peg$FAILED){if(input.substr(peg$currPos,2)===peg$c43){s0=peg$c43;peg$currPos+=2}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c44)}}if(s0===peg$FAILED){if(input.charCodeAt(peg$currPos)===62){s0=peg$c45;peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c46)}}if(s0===peg$FAILED){if(input.substr(peg$currPos,3)===peg$c47){s0=peg$c47;peg$currPos+=3}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c48)}}if(s0===peg$FAILED){if(input.substr(peg$currPos,2)===peg$c49){s0=peg$c49;peg$currPos+=2}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c50)}}if(s0===peg$FAILED){if(input.charCodeAt(peg$currPos)===60){s0=peg$c51;peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c52)}}}}}}}return s0}function peg$parseValueArgument(){var s0,s1,s2;s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parseStrictValueArgument();if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c37(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseStrictValueArgument(){var s0,s1,s2;s0=peg$currPos;s1=[];s2=peg$parseArgumentSegment();if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseArgumentSegment()}}else{s1=peg$FAILED}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c53(s1)}s0=s1;return s0}function peg$parseArgumentSegment(){var s0,s1;s0=peg$currPos;s1=peg$parseCQuoteString();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c54(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseSglQuoteString();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c54(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseDblQuoteString();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c54(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parsePlainString();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c54(s1)}s0=s1}}}return s0}function peg$parseCQuoteString(){var s0,s1,s2,s3;s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c55){s1=peg$c55;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c56)}}if(s1!==peg$FAILED){s2=peg$parseCQuoteStringText();if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===39){s3=peg$c57;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c58)}}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c59(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseSglQuoteString(){var s0,s1,s2,s3;s0=peg$currPos;if(input.charCodeAt(peg$currPos)===39){s1=peg$c57;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c58)}}if(s1!==peg$FAILED){s2=peg$parseSglQuoteStringText();if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===39){s3=peg$c57;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c58)}}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c59(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseDblQuoteString(){var s0,s1,s2,s3;s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c60){s1=peg$c60;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c61)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c62()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===34){s1=peg$c63;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c64)}}if(s1!==peg$FAILED){s2=[];s3=peg$parseDblQuoteStringSegment();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseDblQuoteStringSegment()}if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===34){s3=peg$c63;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c64)}}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c65(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}return s0}function peg$parsePlainString(){var s0,s1,s2;s0=peg$currPos;s1=[];s2=peg$parsePlainStringSegment();if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);s2=peg$parsePlainStringSegment()}}else{s1=peg$FAILED}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c65(s1)}s0=s1;return s0}function peg$parseDblQuoteStringSegment(){var s0,s1;s0=peg$currPos;s1=peg$parseArithmetic();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c66(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseSubshell();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c67(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseVariable();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c68(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseDblQuoteStringText();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c69(s1)}s0=s1}}}return s0}function peg$parsePlainStringSegment(){var s0,s1;s0=peg$currPos;s1=peg$parseArithmetic();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c70(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseSubshell();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c71(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseVariable();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c72(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseGlob();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c73(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parsePlainStringText();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c69(s1)}s0=s1}}}}return s0}function peg$parseSglQuoteStringText(){var s0,s1,s2;s0=peg$currPos;s1=[];if(peg$c74.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c75)}}while(s2!==peg$FAILED){s1.push(s2);if(peg$c74.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c75)}}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c76(s1)}s0=s1;return s0}function peg$parseDblQuoteStringText(){var s0,s1,s2;s0=peg$currPos;s1=[];s2=peg$parseDblQuoteEscapedChar();if(s2===peg$FAILED){if(peg$c77.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c78)}}}if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseDblQuoteEscapedChar();if(s2===peg$FAILED){if(peg$c77.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c78)}}}}}else{s1=peg$FAILED}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c76(s1)}s0=s1;return s0}function peg$parseDblQuoteEscapedChar(){var s0,s1,s2;s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c79){s1=peg$c79;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c80)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c81()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===92){s1=peg$c82;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c83)}}if(s1!==peg$FAILED){if(peg$c84.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c85)}}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c86(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}return s0}function peg$parseCQuoteStringText(){var s0,s1,s2;s0=peg$currPos;s1=[];s2=peg$parseCQuoteEscapedChar();if(s2===peg$FAILED){if(peg$c74.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c75)}}}while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseCQuoteEscapedChar();if(s2===peg$FAILED){if(peg$c74.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c75)}}}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c76(s1)}s0=s1;return s0}function peg$parseCQuoteEscapedChar(){var s0,s1,s2;s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c87){s1=peg$c87;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c88)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c89()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c90){s1=peg$c90;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c91)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c92()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===92){s1=peg$c82;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c83)}}if(s1!==peg$FAILED){if(peg$c93.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c94)}}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c95();s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c96){s1=peg$c96;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c97)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c98()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c99){s1=peg$c99;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c100)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c101()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c102){s1=peg$c102;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c103)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c104()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c105){s1=peg$c105;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c106)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c107()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c108){s1=peg$c108;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c109)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c110()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===92){s1=peg$c82;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c83)}}if(s1!==peg$FAILED){if(peg$c111.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c112)}}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c86(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$parseHexCodeString()}}}}}}}}}return s0}function peg$parseHexCodeString(){var s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11;s0=peg$currPos;if(input.charCodeAt(peg$currPos)===92){s1=peg$c82;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c83)}}if(s1!==peg$FAILED){s2=peg$parseHexCodeChar0();if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c113(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c114){s1=peg$c114;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c115)}}if(s1!==peg$FAILED){s2=peg$currPos;s3=peg$currPos;s4=peg$parseHexCodeChar0();if(s4!==peg$FAILED){s5=peg$parseHexCodeChar();if(s5!==peg$FAILED){s4=[s4,s5];s3=s4}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}if(s3===peg$FAILED){s3=peg$parseHexCodeChar0()}if(s3!==peg$FAILED){s2=input.substring(s2,peg$currPos)}else{s2=s3}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c113(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c116){s1=peg$c116;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c117)}}if(s1!==peg$FAILED){s2=peg$currPos;s3=peg$currPos;s4=peg$parseHexCodeChar();if(s4!==peg$FAILED){s5=peg$parseHexCodeChar();if(s5!==peg$FAILED){s6=peg$parseHexCodeChar();if(s6!==peg$FAILED){s7=peg$parseHexCodeChar();if(s7!==peg$FAILED){s4=[s4,s5,s6,s7];s3=s4}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}if(s3!==peg$FAILED){s2=input.substring(s2,peg$currPos)}else{s2=s3}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c113(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c118){s1=peg$c118;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c119)}}if(s1!==peg$FAILED){s2=peg$currPos;s3=peg$currPos;s4=peg$parseHexCodeChar();if(s4!==peg$FAILED){s5=peg$parseHexCodeChar();if(s5!==peg$FAILED){s6=peg$parseHexCodeChar();if(s6!==peg$FAILED){s7=peg$parseHexCodeChar();if(s7!==peg$FAILED){s8=peg$parseHexCodeChar();if(s8!==peg$FAILED){s9=peg$parseHexCodeChar();if(s9!==peg$FAILED){s10=peg$parseHexCodeChar();if(s10!==peg$FAILED){s11=peg$parseHexCodeChar();if(s11!==peg$FAILED){s4=[s4,s5,s6,s7,s8,s9,s10,s11];s3=s4}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}if(s3!==peg$FAILED){s2=input.substring(s2,peg$currPos)}else{s2=s3}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c120(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}}}return s0}function peg$parseHexCodeChar0(){var s0;if(peg$c121.test(input.charAt(peg$currPos))){s0=input.charAt(peg$currPos);peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c122)}}return s0}function peg$parseHexCodeChar(){var s0;if(peg$c123.test(input.charAt(peg$currPos))){s0=input.charAt(peg$currPos);peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c124)}}return s0}function peg$parsePlainStringText(){var s0,s1,s2,s3,s4;s0=peg$currPos;s1=[];s2=peg$currPos;if(input.charCodeAt(peg$currPos)===92){s3=peg$c82;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c83)}}if(s3!==peg$FAILED){if(input.length>peg$currPos){s4=input.charAt(peg$currPos);peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c125)}}if(s4!==peg$FAILED){peg$savedPos=s2;s3=peg$c86(s4);s2=s3}else{peg$currPos=s2;s2=peg$FAILED}}else{peg$currPos=s2;s2=peg$FAILED}if(s2===peg$FAILED){s2=peg$currPos;s3=peg$currPos;peg$silentFails++;s4=peg$parseSpecialShellChars();peg$silentFails--;if(s4===peg$FAILED){s3=void 0}else{peg$currPos=s3;s3=peg$FAILED}if(s3!==peg$FAILED){if(input.length>peg$currPos){s4=input.charAt(peg$currPos);peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c125)}}if(s4!==peg$FAILED){peg$savedPos=s2;s3=peg$c86(s4);s2=s3}else{peg$currPos=s2;s2=peg$FAILED}}else{peg$currPos=s2;s2=peg$FAILED}}if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);s2=peg$currPos;if(input.charCodeAt(peg$currPos)===92){s3=peg$c82;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c83)}}if(s3!==peg$FAILED){if(input.length>peg$currPos){s4=input.charAt(peg$currPos);peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c125)}}if(s4!==peg$FAILED){peg$savedPos=s2;s3=peg$c86(s4);s2=s3}else{peg$currPos=s2;s2=peg$FAILED}}else{peg$currPos=s2;s2=peg$FAILED}if(s2===peg$FAILED){s2=peg$currPos;s3=peg$currPos;peg$silentFails++;s4=peg$parseSpecialShellChars();peg$silentFails--;if(s4===peg$FAILED){s3=void 0}else{peg$currPos=s3;s3=peg$FAILED}if(s3!==peg$FAILED){if(input.length>peg$currPos){s4=input.charAt(peg$currPos);peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c125)}}if(s4!==peg$FAILED){peg$savedPos=s2;s3=peg$c86(s4);s2=s3}else{peg$currPos=s2;s2=peg$FAILED}}else{peg$currPos=s2;s2=peg$FAILED}}}}else{s1=peg$FAILED}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c76(s1)}s0=s1;return s0}function peg$parseArithmeticPrimary(){var s0,s1,s2,s3,s4,s5;s0=peg$currPos;if(input.charCodeAt(peg$currPos)===45){s1=peg$c126;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c127)}}if(s1===peg$FAILED){if(input.charCodeAt(peg$currPos)===43){s1=peg$c128;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c129)}}}if(s1===peg$FAILED){s1=null}if(s1!==peg$FAILED){s2=[];if(peg$c38.test(input.charAt(peg$currPos))){s3=input.charAt(peg$currPos);peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c39)}}if(s3!==peg$FAILED){while(s3!==peg$FAILED){s2.push(s3);if(peg$c38.test(input.charAt(peg$currPos))){s3=input.charAt(peg$currPos);peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c39)}}}}else{s2=peg$FAILED}if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===46){s3=peg$c130;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c131)}}if(s3!==peg$FAILED){s4=[];if(peg$c38.test(input.charAt(peg$currPos))){s5=input.charAt(peg$currPos);peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c39)}}if(s5!==peg$FAILED){while(s5!==peg$FAILED){s4.push(s5);if(peg$c38.test(input.charAt(peg$currPos))){s5=input.charAt(peg$currPos);peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c39)}}}}else{s4=peg$FAILED}if(s4!==peg$FAILED){peg$savedPos=s0;s1=peg$c132(s1,s2,s4);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===45){s1=peg$c126;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c127)}}if(s1===peg$FAILED){if(input.charCodeAt(peg$currPos)===43){s1=peg$c128;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c129)}}}if(s1===peg$FAILED){s1=null}if(s1!==peg$FAILED){s2=[];if(peg$c38.test(input.charAt(peg$currPos))){s3=input.charAt(peg$currPos);peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c39)}}if(s3!==peg$FAILED){while(s3!==peg$FAILED){s2.push(s3);if(peg$c38.test(input.charAt(peg$currPos))){s3=input.charAt(peg$currPos);peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c39)}}}}else{s2=peg$FAILED}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c133(s1,s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseVariable();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c134(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseIdentifier();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c135(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===40){s1=peg$c24;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c25)}}if(s1!==peg$FAILED){s2=[];s3=peg$parseS();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseS()}if(s2!==peg$FAILED){s3=peg$parseArithmeticExpression();if(s3!==peg$FAILED){s4=[];s5=peg$parseS();while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseS()}if(s4!==peg$FAILED){if(input.charCodeAt(peg$currPos)===41){s5=peg$c26;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c27)}}if(s5!==peg$FAILED){peg$savedPos=s0;s1=peg$c136(s3);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}}}}return s0}function peg$parseArithmeticTimesExpression(){var s0,s1,s2,s3,s4,s5,s6,s7;s0=peg$currPos;s1=peg$parseArithmeticPrimary();if(s1!==peg$FAILED){s2=[];s3=peg$currPos;s4=[];s5=peg$parseS();while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseS()}if(s4!==peg$FAILED){if(input.charCodeAt(peg$currPos)===42){s5=peg$c137;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c138)}}if(s5===peg$FAILED){if(input.charCodeAt(peg$currPos)===47){s5=peg$c139;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c140)}}}if(s5!==peg$FAILED){s6=[];s7=peg$parseS();while(s7!==peg$FAILED){s6.push(s7);s7=peg$parseS()}if(s6!==peg$FAILED){s7=peg$parseArithmeticPrimary();if(s7!==peg$FAILED){peg$savedPos=s3;s4=peg$c141(s1,s5,s7);s3=s4}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}while(s3!==peg$FAILED){s2.push(s3);s3=peg$currPos;s4=[];s5=peg$parseS();while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseS()}if(s4!==peg$FAILED){if(input.charCodeAt(peg$currPos)===42){s5=peg$c137;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c138)}}if(s5===peg$FAILED){if(input.charCodeAt(peg$currPos)===47){s5=peg$c139;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c140)}}}if(s5!==peg$FAILED){s6=[];s7=peg$parseS();while(s7!==peg$FAILED){s6.push(s7);s7=peg$parseS()}if(s6!==peg$FAILED){s7=peg$parseArithmeticPrimary();if(s7!==peg$FAILED){peg$savedPos=s3;s4=peg$c141(s1,s5,s7);s3=s4}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c142(s1,s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseArithmeticExpression(){var s0,s1,s2,s3,s4,s5,s6,s7;s0=peg$currPos;s1=peg$parseArithmeticTimesExpression();if(s1!==peg$FAILED){s2=[];s3=peg$currPos;s4=[];s5=peg$parseS();while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseS()}if(s4!==peg$FAILED){if(input.charCodeAt(peg$currPos)===43){s5=peg$c128;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c129)}}if(s5===peg$FAILED){if(input.charCodeAt(peg$currPos)===45){s5=peg$c126;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c127)}}}if(s5!==peg$FAILED){s6=[];s7=peg$parseS();while(s7!==peg$FAILED){s6.push(s7);s7=peg$parseS()}if(s6!==peg$FAILED){s7=peg$parseArithmeticTimesExpression();if(s7!==peg$FAILED){peg$savedPos=s3;s4=peg$c143(s1,s5,s7);s3=s4}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}while(s3!==peg$FAILED){s2.push(s3);s3=peg$currPos;s4=[];s5=peg$parseS();while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseS()}if(s4!==peg$FAILED){if(input.charCodeAt(peg$currPos)===43){s5=peg$c128;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c129)}}if(s5===peg$FAILED){if(input.charCodeAt(peg$currPos)===45){s5=peg$c126;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c127)}}}if(s5!==peg$FAILED){s6=[];s7=peg$parseS();while(s7!==peg$FAILED){s6.push(s7);s7=peg$parseS()}if(s6!==peg$FAILED){s7=peg$parseArithmeticTimesExpression();if(s7!==peg$FAILED){peg$savedPos=s3;s4=peg$c143(s1,s5,s7);s3=s4}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c142(s1,s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseArithmetic(){var s0,s1,s2,s3,s4,s5;s0=peg$currPos;if(input.substr(peg$currPos,3)===peg$c144){s1=peg$c144;peg$currPos+=3}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c145)}}if(s1!==peg$FAILED){s2=[];s3=peg$parseS();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseS()}if(s2!==peg$FAILED){s3=peg$parseArithmeticExpression();if(s3!==peg$FAILED){s4=[];s5=peg$parseS();while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseS()}if(s4!==peg$FAILED){if(input.substr(peg$currPos,2)===peg$c146){s5=peg$c146;peg$currPos+=2}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c147)}}if(s5!==peg$FAILED){peg$savedPos=s0;s1=peg$c148(s3);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseSubshell(){var s0,s1,s2,s3;s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c149){s1=peg$c149;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c150)}}if(s1!==peg$FAILED){s2=peg$parseShellLine();if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===41){s3=peg$c26;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c27)}}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c151(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseVariable(){var s0,s1,s2,s3,s4,s5;s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c152){s1=peg$c152;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c153)}}if(s1!==peg$FAILED){s2=peg$parseIdentifier();if(s2!==peg$FAILED){if(input.substr(peg$currPos,2)===peg$c154){s3=peg$c154;peg$currPos+=2}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c155)}}if(s3!==peg$FAILED){s4=peg$parseCommandString();if(s4!==peg$FAILED){if(input.charCodeAt(peg$currPos)===125){s5=peg$c31;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c32)}}if(s5!==peg$FAILED){peg$savedPos=s0;s1=peg$c156(s2,s4);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c152){s1=peg$c152;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c153)}}if(s1!==peg$FAILED){s2=peg$parseIdentifier();if(s2!==peg$FAILED){if(input.substr(peg$currPos,3)===peg$c157){s3=peg$c157;peg$currPos+=3}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c158)}}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c159(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c152){s1=peg$c152;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c153)}}if(s1!==peg$FAILED){s2=peg$parseIdentifier();if(s2!==peg$FAILED){if(input.substr(peg$currPos,2)===peg$c160){s3=peg$c160;peg$currPos+=2}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c161)}}if(s3!==peg$FAILED){s4=peg$parseCommandString();if(s4!==peg$FAILED){if(input.charCodeAt(peg$currPos)===125){s5=peg$c31;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c32)}}if(s5!==peg$FAILED){peg$savedPos=s0;s1=peg$c162(s2,s4);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c152){s1=peg$c152;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c153)}}if(s1!==peg$FAILED){s2=peg$parseIdentifier();if(s2!==peg$FAILED){if(input.substr(peg$currPos,3)===peg$c163){s3=peg$c163;peg$currPos+=3}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c164)}}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c165(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c152){s1=peg$c152;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c153)}}if(s1!==peg$FAILED){s2=peg$parseIdentifier();if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===125){s3=peg$c31;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c32)}}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c166(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===36){s1=peg$c167;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c168)}}if(s1!==peg$FAILED){s2=peg$parseIdentifier();if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c166(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}}}}}return s0}function peg$parseGlob(){var s0,s1,s2;s0=peg$currPos;s1=peg$parseGlobText();if(s1!==peg$FAILED){peg$savedPos=peg$currPos;s2=peg$c169(s1);if(s2){s2=void 0}else{s2=peg$FAILED}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c170(s1);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseGlobText(){var s0,s1,s2,s3,s4;s0=peg$currPos;s1=[];s2=peg$currPos;s3=peg$currPos;peg$silentFails++;s4=peg$parseGlobSpecialShellChars();peg$silentFails--;if(s4===peg$FAILED){s3=void 0}else{peg$currPos=s3;s3=peg$FAILED}if(s3!==peg$FAILED){if(input.length>peg$currPos){s4=input.charAt(peg$currPos);peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c125)}}if(s4!==peg$FAILED){peg$savedPos=s2;s3=peg$c86(s4);s2=s3}else{peg$currPos=s2;s2=peg$FAILED}}else{peg$currPos=s2;s2=peg$FAILED}if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);s2=peg$currPos;s3=peg$currPos;peg$silentFails++;s4=peg$parseGlobSpecialShellChars();peg$silentFails--;if(s4===peg$FAILED){s3=void 0}else{peg$currPos=s3;s3=peg$FAILED}if(s3!==peg$FAILED){if(input.length>peg$currPos){s4=input.charAt(peg$currPos);peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c125)}}if(s4!==peg$FAILED){peg$savedPos=s2;s3=peg$c86(s4);s2=s3}else{peg$currPos=s2;s2=peg$FAILED}}else{peg$currPos=s2;s2=peg$FAILED}}}else{s1=peg$FAILED}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c76(s1)}s0=s1;return s0}function peg$parseEnvVariable(){var s0,s1,s2;s0=peg$currPos;s1=[];if(peg$c171.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c172)}}if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);if(peg$c171.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c172)}}}}else{s1=peg$FAILED}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c173()}s0=s1;return s0}function peg$parseIdentifier(){var s0,s1,s2;s0=peg$currPos;s1=[];if(peg$c174.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c175)}}if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);if(peg$c174.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c175)}}}}else{s1=peg$FAILED}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c173()}s0=s1;return s0}function peg$parseSpecialShellChars(){var s0;if(peg$c176.test(input.charAt(peg$currPos))){s0=input.charAt(peg$currPos);peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c177)}}return s0}function peg$parseGlobSpecialShellChars(){var s0;if(peg$c178.test(input.charAt(peg$currPos))){s0=input.charAt(peg$currPos);peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c179)}}return s0}function peg$parseS(){var s0,s1;s0=[];if(peg$c180.test(input.charAt(peg$currPos))){s1=input.charAt(peg$currPos);peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c181)}}if(s1!==peg$FAILED){while(s1!==peg$FAILED){s0.push(s1);if(peg$c180.test(input.charAt(peg$currPos))){s1=input.charAt(peg$currPos);peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c181)}}}}else{s0=peg$FAILED}return s0}peg$result=peg$startRuleFunction();if(peg$result!==peg$FAILED&&peg$currPos===input.length){return peg$result}else{if(peg$result!==peg$FAILED&&peg$currPos<input.length){peg$fail(peg$endExpectation())}throw peg$buildStructuredError(peg$maxFailExpected,peg$maxFailPos<input.length?input.charAt(peg$maxFailPos):null,peg$maxFailPos<input.length?peg$computeLocation(peg$maxFailPos,peg$maxFailPos+1):peg$computeLocation(peg$maxFailPos,peg$maxFailPos))}}shell={SyntaxError:peg$SyntaxError,parse:peg$parse};return shell}var hasRequiredShell;function requireShell(){if(hasRequiredShell)return shell$1;hasRequiredShell=1;Object.defineProperty(shell$1,"__esModule",{value:true});shell$1.stringifyShell=shell$1.stringifyArithmeticExpression=shell$1.stringifyArgumentSegment=shell$1.stringifyValueArgument=shell$1.stringifyRedirectArgument=shell$1.stringifyArgument=shell$1.stringifyEnvSegment=shell$1.stringifyCommand=shell$1.stringifyCommandChainThen=shell$1.stringifyCommandChain=shell$1.stringifyCommandLineThen=shell$1.stringifyCommandLine=shell$1.stringifyShellLine=shell$1.parseShell=void 0;const shell_1=requireShell$1();function parseShell(source,options={isGlobPattern:()=>false}){try{return(0,shell_1.parse)(source,options)}catch(error){if(error.location)error.message=error.message.replace(/(\.)?$/,` (line ${error.location.start.line}, column ${error.location.start.column})$1`);throw error}}shell$1.parseShell=parseShell;function stringifyShellLine(shellLine,{endSemicolon:endSemicolon=false}={}){return shellLine.map((({command:command,type:type},index)=>`${stringifyCommandLine(command)}${type===`;`?index!==shellLine.length-1||endSemicolon?`;`:``:` &`}`)).join(` `)}shell$1.stringifyShellLine=stringifyShellLine;shell$1.stringifyShell=stringifyShellLine;function stringifyCommandLine(commandLine){return`${stringifyCommandChain(commandLine.chain)}${commandLine.then?` ${stringifyCommandLineThen(commandLine.then)}`:``}`}shell$1.stringifyCommandLine=stringifyCommandLine;function stringifyCommandLineThen(commandLineThen){return`${commandLineThen.type} ${stringifyCommandLine(commandLineThen.line)}`}shell$1.stringifyCommandLineThen=stringifyCommandLineThen;function stringifyCommandChain(commandChain){return`${stringifyCommand(commandChain)}${commandChain.then?` ${stringifyCommandChainThen(commandChain.then)}`:``}`}shell$1.stringifyCommandChain=stringifyCommandChain;function stringifyCommandChainThen(commandChainThen){return`${commandChainThen.type} ${stringifyCommandChain(commandChainThen.chain)}`}shell$1.stringifyCommandChainThen=stringifyCommandChainThen;function stringifyCommand(command){switch(command.type){case`command`:return`${command.envs.length>0?`${command.envs.map((env=>stringifyEnvSegment(env))).join(` `)} `:``}${command.args.map((argument=>stringifyArgument(argument))).join(` `)}`;case`subshell`:return`(${stringifyShellLine(command.subshell)})${command.args.length>0?` ${command.args.map((argument=>stringifyRedirectArgument(argument))).join(` `)}`:``}`;case`group`:return`{ ${stringifyShellLine(command.group,{endSemicolon:true})} }${command.args.length>0?` ${command.args.map((argument=>stringifyRedirectArgument(argument))).join(` `)}`:``}`;case`envs`:return command.envs.map((env=>stringifyEnvSegment(env))).join(` `);default:throw new Error(`Unsupported command type: "${command.type}"`)}}shell$1.stringifyCommand=stringifyCommand;function stringifyEnvSegment(envSegment){return`${envSegment.name}=${envSegment.args[0]?stringifyValueArgument(envSegment.args[0]):``}`}shell$1.stringifyEnvSegment=stringifyEnvSegment;function stringifyArgument(argument){switch(argument.type){case`redirection`:return stringifyRedirectArgument(argument);case`argument`:return stringifyValueArgument(argument);default:throw new Error(`Unsupported argument type: "${argument.type}"`)}}shell$1.stringifyArgument=stringifyArgument;function stringifyRedirectArgument(argument){return`${argument.subtype} ${argument.args.map((argument=>stringifyValueArgument(argument))).join(` `)}`}shell$1.stringifyRedirectArgument=stringifyRedirectArgument;function stringifyValueArgument(argument){return argument.segments.map((segment=>stringifyArgumentSegment(segment))).join(``)}shell$1.stringifyValueArgument=stringifyValueArgument;function stringifyArgumentSegment(argumentSegment){const doubleQuoteIfRequested=(string,quote)=>quote?`"${string}"`:string;const quoteIfNeeded=text=>{if(text===``)return`""`;if(!text.match(/[(){}<>$|&; \t"']/))return text;return`$'${text.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`).replace(/\f/g,`\\f`).replace(/\n/g,`\\n`).replace(/\r/g,`\\r`).replace(/\t/g,`\\t`).replace(/\v/g,`\\v`).replace(/\0/g,`\\0`)}'`};switch(argumentSegment.type){case`text`:return quoteIfNeeded(argumentSegment.text);case`glob`:return argumentSegment.pattern;case`shell`:return doubleQuoteIfRequested(`\${${stringifyShellLine(argumentSegment.shell)}}`,argumentSegment.quoted);case`variable`:return doubleQuoteIfRequested(typeof argumentSegment.defaultValue===`undefined`?typeof argumentSegment.alternativeValue===`undefined`?`\${${argumentSegment.name}}`:argumentSegment.alternativeValue.length===0?`\${${argumentSegment.name}:+}`:`\${${argumentSegment.name}:+${argumentSegment.alternativeValue.map((argument=>stringifyValueArgument(argument))).join(` `)}}`:argumentSegment.defaultValue.length===0?`\${${argumentSegment.name}:-}`:`\${${argumentSegment.name}:-${argumentSegment.defaultValue.map((argument=>stringifyValueArgument(argument))).join(` `)}}`,argumentSegment.quoted);case`arithmetic`:return`$(( ${stringifyArithmeticExpression(argumentSegment.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: "${argumentSegment.type}"`)}}shell$1.stringifyArgumentSegment=stringifyArgumentSegment;function stringifyArithmeticExpression(argument){const getOperator=type=>{switch(type){case`addition`:return`+`;case`subtraction`:return`-`;case`multiplication`:return`*`;case`division`:return`/`;default:throw new Error(`Can't extract operator from arithmetic expression of type "${type}"`)}};const parenthesizeIfRequested=(string,parenthesize)=>parenthesize?`( ${string} )`:string;const stringifyAndParenthesizeIfNeeded=expression=>parenthesizeIfRequested(stringifyArithmeticExpression(expression),![`number`,`variable`].includes(expression.type));switch(argument.type){case`number`:return String(argument.value);case`variable`:return argument.name;default:return`${stringifyAndParenthesizeIfNeeded(argument.left)} ${getOperator(argument.type)} ${stringifyAndParenthesizeIfNeeded(argument.right)}`}}shell$1.stringifyArithmeticExpression=stringifyArithmeticExpression;return shell$1}var resolution$1={};var resolution;var hasRequiredResolution$1;function requireResolution$1(){if(hasRequiredResolution$1)return resolution;hasRequiredResolution$1=1;function peg$subclass(child,parent){function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor}function peg$SyntaxError(message,expected,found,location){this.message=message;this.expected=expected;this.found=found;this.location=location;this.name="SyntaxError";if(typeof Error.captureStackTrace==="function"){Error.captureStackTrace(this,peg$SyntaxError)}}peg$subclass(peg$SyntaxError,Error);peg$SyntaxError.buildMessage=function(expected,found){var DESCRIBE_EXPECTATION_FNS={literal:function(expectation){return'"'+literalEscape(expectation.text)+'"'},class:function(expectation){var escapedParts="",i;for(i=0;i<expectation.parts.length;i++){escapedParts+=expectation.parts[i]instanceof Array?classEscape(expectation.parts[i][0])+"-"+classEscape(expectation.parts[i][1]):classEscape(expectation.parts[i])}return"["+(expectation.inverted?"^":"")+escapedParts+"]"},any:function(expectation){return"any character"},end:function(expectation){return"end of input"},other:function(expectation){return expectation.description}};function hex(ch){return ch.charCodeAt(0).toString(16).toUpperCase()}function literalEscape(s){return s.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(ch){return"\\x0"+hex(ch)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(ch){return"\\x"+hex(ch)}))}function classEscape(s){return s.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(ch){return"\\x0"+hex(ch)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(ch){return"\\x"+hex(ch)}))}function describeExpectation(expectation){return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation)}function describeExpected(expected){var descriptions=new Array(expected.length),i,j;for(i=0;i<expected.length;i++){descriptions[i]=describeExpectation(expected[i])}descriptions.sort();if(descriptions.length>0){for(i=1,j=1;i<descriptions.length;i++){if(descriptions[i-1]!==descriptions[i]){descriptions[j]=descriptions[i];j++}}descriptions.length=j}switch(descriptions.length){case 1:return descriptions[0];case 2:return descriptions[0]+" or "+descriptions[1];default:return descriptions.slice(0,-1).join(", ")+", or "+descriptions[descriptions.length-1]}}function describeFound(found){return found?'"'+literalEscape(found)+'"':"end of input"}return"Expected "+describeExpected(expected)+" but "+describeFound(found)+" found."};function peg$parse(input,options){options=options!==void 0?options:{};var peg$FAILED={},peg$startRuleFunctions={resolution:peg$parseresolution},peg$startRuleFunction=peg$parseresolution,peg$c0="/",peg$c1=peg$literalExpectation("/",false),peg$c2=function(from,descriptor){return{from:from,descriptor:descriptor}},peg$c3=function(descriptor){return{descriptor:descriptor}},peg$c4="@",peg$c5=peg$literalExpectation("@",false),peg$c6=function(fullName,description){return{fullName:fullName,description:description}},peg$c7=function(fullName){return{fullName:fullName}},peg$c8=function(){return text()},peg$c9=/^[^\/@]/,peg$c10=peg$classExpectation(["/","@"],true,false),peg$c11=/^[^\/]/,peg$c12=peg$classExpectation(["/"],true,false),peg$currPos=0,peg$savedPos=0,peg$posDetailsCache=[{line:1,column:1}],peg$maxFailPos=0,peg$maxFailExpected=[],peg$result;if("startRule"in options){if(!(options.startRule in peg$startRuleFunctions)){throw new Error("Can't start parsing from rule \""+options.startRule+'".')}peg$startRuleFunction=peg$startRuleFunctions[options.startRule]}function text(){return input.substring(peg$savedPos,peg$currPos)}function peg$literalExpectation(text,ignoreCase){return{type:"literal",text:text,ignoreCase:ignoreCase}}function peg$classExpectation(parts,inverted,ignoreCase){return{type:"class",parts:parts,inverted:inverted,ignoreCase:ignoreCase}}function peg$endExpectation(){return{type:"end"}}function peg$computePosDetails(pos){var details=peg$posDetailsCache[pos],p;if(details){return details}else{p=pos-1;while(!peg$posDetailsCache[p]){p--}details=peg$posDetailsCache[p];details={line:details.line,column:details.column};while(p<pos){if(input.charCodeAt(p)===10){details.line++;details.column=1}else{details.column++}p++}peg$posDetailsCache[pos]=details;return details}}function peg$computeLocation(startPos,endPos){var startPosDetails=peg$computePosDetails(startPos),endPosDetails=peg$computePosDetails(endPos);return{start:{offset:startPos,line:startPosDetails.line,column:startPosDetails.column},end:{offset:endPos,line:endPosDetails.line,column:endPosDetails.column}}}function peg$fail(expected){if(peg$currPos<peg$maxFailPos){return}if(peg$currPos>peg$maxFailPos){peg$maxFailPos=peg$currPos;peg$maxFailExpected=[]}peg$maxFailExpected.push(expected)}function peg$buildStructuredError(expected,found,location){return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected,found),expected,found,location)}function peg$parseresolution(){var s0,s1,s2,s3;s0=peg$currPos;s1=peg$parsespecifier();if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===47){s2=peg$c0;peg$currPos++}else{s2=peg$FAILED;{peg$fail(peg$c1)}}if(s2!==peg$FAILED){s3=peg$parsespecifier();if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c2(s1,s3);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parsespecifier();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c3(s1)}s0=s1}return s0}function peg$parsespecifier(){var s0,s1,s2,s3;s0=peg$currPos;s1=peg$parsefullName();if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===64){s2=peg$c4;peg$currPos++}else{s2=peg$FAILED;{peg$fail(peg$c5)}}if(s2!==peg$FAILED){s3=peg$parsedescription();if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c6(s1,s3);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parsefullName();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c7(s1)}s0=s1}return s0}function peg$parsefullName(){var s0,s1,s2,s3,s4;s0=peg$currPos;if(input.charCodeAt(peg$currPos)===64){s1=peg$c4;peg$currPos++}else{s1=peg$FAILED;{peg$fail(peg$c5)}}if(s1!==peg$FAILED){s2=peg$parseident();if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===47){s3=peg$c0;peg$currPos++}else{s3=peg$FAILED;{peg$fail(peg$c1)}}if(s3!==peg$FAILED){s4=peg$parseident();if(s4!==peg$FAILED){peg$savedPos=s0;s1=peg$c8();s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseident();if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c8()}s0=s1}return s0}function peg$parseident(){var s0,s1,s2;s0=peg$currPos;s1=[];if(peg$c9.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;{peg$fail(peg$c10)}}if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);if(peg$c9.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;{peg$fail(peg$c10)}}}}else{s1=peg$FAILED}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c8()}s0=s1;return s0}function peg$parsedescription(){var s0,s1,s2;s0=peg$currPos;s1=[];if(peg$c11.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;{peg$fail(peg$c12)}}if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);if(peg$c11.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;{peg$fail(peg$c12)}}}}else{s1=peg$FAILED}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c8()}s0=s1;return s0}peg$result=peg$startRuleFunction();if(peg$result!==peg$FAILED&&peg$currPos===input.length){return peg$result}else{if(peg$result!==peg$FAILED&&peg$currPos<input.length){peg$fail(peg$endExpectation())}throw peg$buildStructuredError(peg$maxFailExpected,peg$maxFailPos<input.length?input.charAt(peg$maxFailPos):null,peg$maxFailPos<input.length?peg$computeLocation(peg$maxFailPos,peg$maxFailPos+1):peg$computeLocation(peg$maxFailPos,peg$maxFailPos))}}resolution={SyntaxError:peg$SyntaxError,parse:peg$parse};return resolution}var hasRequiredResolution;function requireResolution(){if(hasRequiredResolution)return resolution$1;hasRequiredResolution=1;Object.defineProperty(resolution$1,"__esModule",{value:true});resolution$1.stringifyResolution=resolution$1.parseResolution=void 0;const resolution_1=requireResolution$1();function parseResolution(source){const legacyResolution=source.match(/^\*{1,2}\/(.*)/);if(legacyResolution)throw new Error(`The override for '${source}' includes a glob pattern. Glob patterns have been removed since their behaviours don't match what you'd expect. Set the override to '${legacyResolution[1]}' instead.`);try{return(0,resolution_1.parse)(source)}catch(error){if(error.location)error.message=error.message.replace(/(\.)?$/,` (line ${error.location.start.line}, column ${error.location.start.column})$1`);throw error}}resolution$1.parseResolution=parseResolution;function stringifyResolution(resolution){let str=``;if(resolution.from){str+=resolution.from.fullName;if(resolution.from.description)str+=`@${resolution.from.description}`;str+=`/`}str+=resolution.descriptor.fullName;if(resolution.descriptor.description)str+=`@${resolution.descriptor.description}`;return str}resolution$1.stringifyResolution=stringifyResolution;return resolution$1}var syml$1={};var jsYaml$3={};var loader$2={};var common$5={};var hasRequiredCommon$5;function requireCommon$5(){if(hasRequiredCommon$5)return common$5;hasRequiredCommon$5=1;function isNothing(subject){return typeof subject==="undefined"||subject===null}function isObject(subject){return typeof subject==="object"&&subject!==null}function toArray(sequence){if(Array.isArray(sequence))return sequence;else if(isNothing(sequence))return[];return[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=Object.keys(source);for(index=0,length=sourceKeys.length;index<length;index+=1){key=sourceKeys[index];target[key]=source[key]}}return target}function repeat(string,count){var result="",cycle;for(cycle=0;cycle<count;cycle+=1){result+=string}return result}function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number}common$5.isNothing=isNothing;common$5.isObject=isObject;common$5.toArray=toArray;common$5.repeat=repeat;common$5.isNegativeZero=isNegativeZero;common$5.extend=extend;return common$5}var exception$2;var hasRequiredException$2;function requireException$2(){if(hasRequiredException$2)return exception$2;hasRequiredException$2=1;function YAMLException(reason,mark){Error.call(this);this.name="YAMLException";this.reason=reason;this.mark=mark;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"");if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(compact){var result=this.name+": ";result+=this.reason||"(unknown reason)";if(!compact&&this.mark){result+=" "+this.mark.toString()}return result};exception$2=YAMLException;return exception$2}var mark;var hasRequiredMark;function requireMark(){if(hasRequiredMark)return mark;hasRequiredMark=1;var common=requireCommon$5();function Mark(name,buffer,position,line,column){this.name=name;this.buffer=buffer;this.position=position;this.line=line;this.column=column}Mark.prototype.getSnippet=function getSnippet(indent,maxLength){var head,start,tail,end,snippet;if(!this.buffer)return null;indent=indent||4;maxLength=maxLength||75;head="";start=this.position;while(start>0&&"\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(start-1))===-1){start-=1;if(this.position-start>maxLength/2-1){head=" ... ";start+=5;break}}tail="";end=this.position;while(end<this.buffer.length&&"\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(end))===-1){end+=1;if(end-this.position>maxLength/2-1){tail=" ... ";end-=5;break}}snippet=this.buffer.slice(start,end);return common.repeat(" ",indent)+head+snippet+tail+"\n"+common.repeat(" ",indent+this.position-start+head.length)+"^"};Mark.prototype.toString=function toString(compact){var snippet,where="";if(this.name){where+='in "'+this.name+'" '}where+="at line "+(this.line+1)+", column "+(this.column+1);if(!compact){snippet=this.getSnippet();if(snippet){where+=":\n"+snippet}}return where};mark=Mark;return mark}var type$2;var hasRequiredType$2;function requireType$2(){if(hasRequiredType$2)return type$2;hasRequiredType$2=1;var YAMLException=requireException$2();var TYPE_CONSTRUCTOR_OPTIONS=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(map){var result={};if(map!==null){Object.keys(map).forEach((function(style){map[style].forEach((function(alias){result[String(alias)]=style}))}))}return result}function Type(tag,options){options=options||{};Object.keys(options).forEach((function(name){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)===-1){throw new YAMLException('Unknown option "'+name+'" is met in definition of "'+tag+'" YAML type.')}}));this.tag=tag;this.kind=options["kind"]||null;this.resolve=options["resolve"]||function(){return true};this.construct=options["construct"]||function(data){return data};this.instanceOf=options["instanceOf"]||null;this.predicate=options["predicate"]||null;this.represent=options["represent"]||null;this.defaultStyle=options["defaultStyle"]||null;this.styleAliases=compileStyleAliases(options["styleAliases"]||null);if(YAML_NODE_KINDS.indexOf(this.kind)===-1){throw new YAMLException('Unknown kind "'+this.kind+'" is specified for "'+tag+'" YAML type.')}}type$2=Type;return type$2}var schema$2;var hasRequiredSchema$2;function requireSchema$2(){if(hasRequiredSchema$2)return schema$2;hasRequiredSchema$2=1;var common=requireCommon$5();var YAMLException=requireException$2();var Type=requireType$2();function compileList(schema,name,result){var exclude=[];schema.include.forEach((function(includedSchema){result=compileList(includedSchema,name,result)}));schema[name].forEach((function(currentType){result.forEach((function(previousType,previousIndex){if(previousType.tag===currentType.tag&&previousType.kind===currentType.kind){exclude.push(previousIndex)}}));result.push(currentType)}));return result.filter((function(type,index){return exclude.indexOf(index)===-1}))}function compileMap(){var result={scalar:{},sequence:{},mapping:{},fallback:{}},index,length;function collectType(type){result[type.kind][type.tag]=result["fallback"][type.tag]=type}for(index=0,length=arguments.length;index<length;index+=1){arguments[index].forEach(collectType)}return result}function Schema(definition){this.include=definition.include||[];this.implicit=definition.implicit||[];this.explicit=definition.explicit||[];this.implicit.forEach((function(type){if(type.loadKind&&type.loadKind!=="scalar"){throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}}));this.compiledImplicit=compileList(this,"implicit",[]);this.compiledExplicit=compileList(this,"explicit",[]);this.compiledTypeMap=compileMap(this.compiledImplicit,this.compiledExplicit)}Schema.DEFAULT=null;Schema.create=function createSchema(){var schemas,types;switch(arguments.length){case 1:schemas=Schema.DEFAULT;types=arguments[0];break;case 2:schemas=arguments[0];types=arguments[1];break;default:throw new YAMLException("Wrong number of arguments for Schema.create function")}schemas=common.toArray(schemas);types=common.toArray(types);if(!schemas.every((function(schema){return schema instanceof Schema}))){throw new YAMLException("Specified list of super schemas (or a single Schema object) contains a non-Schema object.")}if(!types.every((function(type){return type instanceof Type}))){throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.")}return new Schema({include:schemas,explicit:types})};schema$2=Schema;return schema$2}var str$2;var hasRequiredStr$2;function requireStr$2(){if(hasRequiredStr$2)return str$2;hasRequiredStr$2=1;var Type=requireType$2();str$2=new Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(data){return data!==null?data:""}});return str$2}var seq$2;var hasRequiredSeq$2;function requireSeq$2(){if(hasRequiredSeq$2)return seq$2;hasRequiredSeq$2=1;var Type=requireType$2();seq$2=new Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(data){return data!==null?data:[]}});return seq$2}var map$2;var hasRequiredMap$2;function requireMap$2(){if(hasRequiredMap$2)return map$2;hasRequiredMap$2=1;var Type=requireType$2();map$2=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return data!==null?data:{}}});return map$2}var failsafe$2;var hasRequiredFailsafe$2;function requireFailsafe$2(){if(hasRequiredFailsafe$2)return failsafe$2;hasRequiredFailsafe$2=1;var Schema=requireSchema$2();failsafe$2=new Schema({explicit:[requireStr$2(),requireSeq$2(),requireMap$2()]});return failsafe$2}var _null$2;var hasRequired_null$2;function require_null$2(){if(hasRequired_null$2)return _null$2;hasRequired_null$2=1;var Type=requireType$2();function resolveYamlNull(data){if(data===null)return true;var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return object===null}_null$2=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"});return _null$2}var bool$2;var hasRequiredBool$2;function requireBool$2(){if(hasRequiredBool$2)return bool$2;hasRequiredBool$2=1;var Type=requireType$2();function resolveYamlBoolean(data){if(data===null)return false;var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}bool$2=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"});return bool$2}var int$2;var hasRequiredInt$2;function requireInt$2(){if(hasRequiredInt$2)return int$2;hasRequiredInt$2=1;var common=requireCommon$5();var Type=requireType$2();function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(data===null)return false;var max=data.length,index=0,hasDigits=false,ch;if(!max)return false;ch=data[index];if(ch==="-"||ch==="+"){ch=data[++index]}if(ch==="0"){if(index+1===max)return true;ch=data[++index];if(ch==="b"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(ch!=="0"&&ch!=="1")return false;hasDigits=true}return hasDigits&&ch!=="_"}if(ch==="x"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isHexCode(data.charCodeAt(index)))return false;hasDigits=true}return hasDigits&&ch!=="_"}for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isOctCode(data.charCodeAt(index)))return false;hasDigits=true}return hasDigits&&ch!=="_"}if(ch==="_")return false;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(ch===":")break;if(!isDecCode(data.charCodeAt(index))){return false}hasDigits=true}if(!hasDigits||ch==="_")return false;if(ch!==":")return true;return/^(:[0-5]?[0-9])+$/.test(data.slice(index))}function constructYamlInteger(data){var value=data,sign=1,ch,base,digits=[];if(value.indexOf("_")!==-1){value=value.replace(/_/g,"")}ch=value[0];if(ch==="-"||ch==="+"){if(ch==="-")sign=-1;value=value.slice(1);ch=value[0]}if(value==="0")return 0;if(ch==="0"){if(value[1]==="b")return sign*parseInt(value.slice(2),2);if(value[1]==="x")return sign*parseInt(value,16);return sign*parseInt(value,8)}if(value.indexOf(":")!==-1){value.split(":").forEach((function(v){digits.unshift(parseInt(v,10))}));value=0;base=1;digits.forEach((function(d){value+=d*base;base*=60}));return sign*value}return sign*parseInt(value,10)}function isInteger(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1===0&&!common.isNegativeZero(object))}int$2=new Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(obj){return obj>=0?"0b"+obj.toString(2):"-0b"+obj.toString(2).slice(1)},octal:function(obj){return obj>=0?"0"+obj.toString(8):"-0"+obj.toString(8).slice(1)},decimal:function(obj){return obj.toString(10)},hexadecimal:function(obj){return obj>=0?"0x"+obj.toString(16).toUpperCase():"-0x"+obj.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}});return int$2}var float$2;var hasRequiredFloat$2;function requireFloat$2(){if(hasRequiredFloat$2)return float$2;hasRequiredFloat$2=1;var common=requireCommon$5();var Type=requireType$2();var YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){if(data===null)return false;if(!YAML_FLOAT_PATTERN.test(data)||data[data.length-1]==="_"){return false}return true}function constructYamlFloat(data){var value,sign,base,digits;value=data.replace(/_/g,"").toLowerCase();sign=value[0]==="-"?-1:1;digits=[];if("+-".indexOf(value[0])>=0){value=value.slice(1)}if(value===".inf"){return sign===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(value===".nan"){return NaN}else if(value.indexOf(":")>=0){value.split(":").forEach((function(v){digits.unshift(parseFloat(v,10))}));value=0;base=1;digits.forEach((function(d){value+=d*base;base*=60}));return sign*value}return sign*parseFloat(value,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,style){var res;if(isNaN(object)){switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===object){switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===object){switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(common.isNegativeZero(object)){return"-0.0"}res=object.toString(10);return SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common.isNegativeZero(object))}float$2=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"});return float$2}var json$2;var hasRequiredJson$2;function requireJson$2(){if(hasRequiredJson$2)return json$2;hasRequiredJson$2=1;var Schema=requireSchema$2();json$2=new Schema({include:[requireFailsafe$2()],implicit:[require_null$2(),requireBool$2(),requireInt$2(),requireFloat$2()]});return json$2}var core$2;var hasRequiredCore$2;function requireCore$2(){if(hasRequiredCore$2)return core$2;hasRequiredCore$2=1;var Schema=requireSchema$2();core$2=new Schema({include:[requireJson$2()]});return core$2}var timestamp$2;var hasRequiredTimestamp$2;function requireTimestamp$2(){if(hasRequiredTimestamp$2)return timestamp$2;hasRequiredTimestamp$2=1;var Type=requireType$2();var YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(data){if(data===null)return false;if(YAML_DATE_REGEXP.exec(data)!==null)return true;if(YAML_TIMESTAMP_REGEXP.exec(data)!==null)return true;return false}function constructYamlTimestamp(data){var match,year,month,day,hour,minute,second,fraction=0,delta=null,tz_hour,tz_minute,date;match=YAML_DATE_REGEXP.exec(data);if(match===null)match=YAML_TIMESTAMP_REGEXP.exec(data);if(match===null)throw new Error("Date resolve error");year=+match[1];month=+match[2]-1;day=+match[3];if(!match[4]){return new Date(Date.UTC(year,month,day))}hour=+match[4];minute=+match[5];second=+match[6];if(match[7]){fraction=match[7].slice(0,3);while(fraction.length<3){fraction+="0"}fraction=+fraction}if(match[9]){tz_hour=+match[10];tz_minute=+(match[11]||0);delta=(tz_hour*60+tz_minute)*6e4;if(match[9]==="-")delta=-delta}date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction));if(delta)date.setTime(date.getTime()-delta);return date}function representYamlTimestamp(object){return object.toISOString()}timestamp$2=new Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});return timestamp$2}var merge$2;var hasRequiredMerge$2;function requireMerge$2(){if(hasRequiredMerge$2)return merge$2;hasRequiredMerge$2=1;var Type=requireType$2();function resolveYamlMerge(data){return data==="<<"||data===null}merge$2=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge});return merge$2}function commonjsRequire(path){throw new Error('Could not dynamically require "'+path+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var binary$2;var hasRequiredBinary$2;function requireBinary$2(){if(hasRequiredBinary$2)return binary$2;hasRequiredBinary$2=1;var NodeBuffer;try{var _require=commonjsRequire;NodeBuffer=_require("buffer").Buffer}catch(__){}var Type=requireType$2();var BASE64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(data){if(data===null)return false;var code,idx,bitlen=0,max=data.length,map=BASE64_MAP;for(idx=0;idx<max;idx++){code=map.indexOf(data.charAt(idx));if(code>64)continue;if(code<0)return false;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx<max;idx++){if(idx%4===0&&idx){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}bits=bits<<6|map.indexOf(input.charAt(idx))}tailbits=max%4*6;if(tailbits===0){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}else if(tailbits===18){result.push(bits>>10&255);result.push(bits>>2&255)}else if(tailbits===12){result.push(bits>>4&255)}if(NodeBuffer){return NodeBuffer.from?NodeBuffer.from(result):new NodeBuffer(result)}return result}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map=BASE64_MAP;for(idx=0;idx<max;idx++){if(idx%3===0&&idx){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}bits=(bits<<8)+object[idx]}tail=max%3;if(tail===0){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}else if(tail===2){result+=map[bits>>10&63];result+=map[bits>>4&63];result+=map[bits<<2&63];result+=map[64]}else if(tail===1){result+=map[bits>>2&63];result+=map[bits<<4&63];result+=map[64];result+=map[64]}return result}function isBinary(object){return NodeBuffer&&NodeBuffer.isBuffer(object)}binary$2=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary});return binary$2}var omap$2;var hasRequiredOmap$2;function requireOmap$2(){if(hasRequiredOmap$2)return omap$2;hasRequiredOmap$2=1;var Type=requireType$2();var _hasOwnProperty=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(data){if(data===null)return true;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index<length;index+=1){pair=object[index];pairHasKey=false;if(_toString.call(pair)!=="[object Object]")return false;for(pairKey in pair){if(_hasOwnProperty.call(pair,pairKey)){if(!pairHasKey)pairHasKey=true;else return false}}if(!pairHasKey)return false;if(objectKeys.indexOf(pairKey)===-1)objectKeys.push(pairKey);else return false}return true}function constructYamlOmap(data){return data!==null?data:[]}omap$2=new Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap});return omap$2}var pairs$2;var hasRequiredPairs$2;function requirePairs$2(){if(hasRequiredPairs$2)return pairs$2;hasRequiredPairs$2=1;var Type=requireType$2();var _toString=Object.prototype.toString;function resolveYamlPairs(data){if(data===null)return true;var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];if(_toString.call(pair)!=="[object Object]")return false;keys=Object.keys(pair);if(keys.length!==1)return false;result[index]=[keys[0],pair[keys[0]]]}return true}function constructYamlPairs(data){if(data===null)return[];var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];keys=Object.keys(pair);result[index]=[keys[0],pair[keys[0]]]}return result}pairs$2=new Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs});return pairs$2}var set$2;var hasRequiredSet$2;function requireSet$2(){if(hasRequiredSet$2)return set$2;hasRequiredSet$2=1;var Type=requireType$2();var _hasOwnProperty=Object.prototype.hasOwnProperty;function resolveYamlSet(data){if(data===null)return true;var key,object=data;for(key in object){if(_hasOwnProperty.call(object,key)){if(object[key]!==null)return false}}return true}function constructYamlSet(data){return data!==null?data:{}}set$2=new Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet});return set$2}var default_safe;var hasRequiredDefault_safe;function requireDefault_safe(){if(hasRequiredDefault_safe)return default_safe;hasRequiredDefault_safe=1;var Schema=requireSchema$2();default_safe=new Schema({include:[requireCore$2()],implicit:[requireTimestamp$2(),requireMerge$2()],explicit:[requireBinary$2(),requireOmap$2(),requirePairs$2(),requireSet$2()]});return default_safe}var _undefined;var hasRequired_undefined;function require_undefined(){if(hasRequired_undefined)return _undefined;hasRequired_undefined=1;var Type=requireType$2();function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(object){return typeof object==="undefined"}_undefined=new Type("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined});return _undefined}var regexp;var hasRequiredRegexp;function requireRegexp(){if(hasRequiredRegexp)return regexp;hasRequiredRegexp=1;var Type=requireType$2();function resolveJavascriptRegExp(data){if(data===null)return false;if(data.length===0)return false;var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];if(modifiers.length>3)return false;if(regexp[regexp.length-modifiers.length-1]!=="/")return false}return true}function constructJavascriptRegExp(data){var regexp=data,tail=/\/([gim]*)$/.exec(data),modifiers="";if(regexp[0]==="/"){if(tail)modifiers=tail[1];regexp=regexp.slice(1,regexp.length-modifiers.length-1)}return new RegExp(regexp,modifiers)}function representJavascriptRegExp(object){var result="/"+object.source+"/";if(object.global)result+="g";if(object.multiline)result+="m";if(object.ignoreCase)result+="i";return result}function isRegExp(object){return Object.prototype.toString.call(object)==="[object RegExp]"}regexp=new Type("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp});return regexp}var _function;var hasRequired_function;function require_function(){if(hasRequired_function)return _function;hasRequired_function=1;var esprima;try{var _require=commonjsRequire;esprima=_require("esprima")}catch(_){if(typeof window!=="undefined")esprima=window.esprima}var Type=requireType$2();function resolveJavascriptFunction(data){if(data===null)return false;try{var source="("+data+")",ast=esprima.parse(source,{range:true});if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="ArrowFunctionExpression"&&ast.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(err){return false}}function constructJavascriptFunction(data){var source="("+data+")",ast=esprima.parse(source,{range:true}),params=[],body;if(ast.type!=="Program"||ast.body.length!==1||ast.body[0].type!=="ExpressionStatement"||ast.body[0].expression.type!=="ArrowFunctionExpression"&&ast.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}ast.body[0].expression.params.forEach((function(param){params.push(param.name)}));body=ast.body[0].expression.body.range;if(ast.body[0].expression.body.type==="BlockStatement"){return new Function(params,source.slice(body[0]+1,body[1]-1))}return new Function(params,"return "+source.slice(body[0],body[1]))}function representJavascriptFunction(object){return object.toString()}function isFunction(object){return Object.prototype.toString.call(object)==="[object Function]"}_function=new Type("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction});return _function}var default_full;var hasRequiredDefault_full;function requireDefault_full(){if(hasRequiredDefault_full)return default_full;hasRequiredDefault_full=1;var Schema=requireSchema$2();default_full=Schema.DEFAULT=new Schema({include:[requireDefault_safe()],explicit:[require_undefined(),requireRegexp(),require_function()]});return default_full}var hasRequiredLoader$2;function requireLoader$2(){if(hasRequiredLoader$2)return loader$2;hasRequiredLoader$2=1;var common=requireCommon$5();var YAMLException=requireException$2();var Mark=requireMark();var DEFAULT_SAFE_SCHEMA=requireDefault_safe();var DEFAULT_FULL_SCHEMA=requireDefault_full();var _hasOwnProperty=Object.prototype.hasOwnProperty;var CONTEXT_FLOW_IN=1;var CONTEXT_FLOW_OUT=2;var CONTEXT_BLOCK_IN=3;var CONTEXT_BLOCK_OUT=4;var CHOMPING_CLIP=1;var CHOMPING_STRIP=2;var CHOMPING_KEEP=3;var PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/;var PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/;var PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i;var PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(obj){return Object.prototype.toString.call(obj)}function is_EOL(c){return c===10||c===13}function is_WHITE_SPACE(c){return c===9||c===32}function is_WS_OR_EOL(c){return c===9||c===32||c===10||c===13}function is_FLOW_INDICATOR(c){return c===44||c===91||c===93||c===123||c===125}function fromHexCode(c){var lc;if(48<=c&&c<=57){return c-48}lc=c|32;if(97<=lc&&lc<=102){return lc-97+10}return-1}function escapedHexLen(c){if(c===120){return 2}if(c===117){return 4}if(c===85){return 8}return 0}function fromDecimalCode(c){if(48<=c&&c<=57){return c-48}return-1}function simpleEscapeSequence(c){return c===48?"\0":c===97?"\x07":c===98?"\b":c===116?"\t":c===9?"\t":c===110?"\n":c===118?"\v":c===102?"\f":c===114?"\r":c===101?"\x1b":c===32?" ":c===34?'"':c===47?"/":c===92?"\\":c===78?"\x85":c===95?"\xa0":c===76?"\u2028":c===80?"\u2029":""}function charFromCodepoint(c){if(c<=65535){return String.fromCharCode(c)}return String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256);var simpleEscapeMap=new Array(256);for(var i=0;i<256;i++){simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0;simpleEscapeMap[i]=simpleEscapeSequence(i)}function State(input,options){this.input=input;this.filename=options["filename"]||null;this.schema=options["schema"]||DEFAULT_FULL_SCHEMA;this.onWarning=options["onWarning"]||null;this.legacy=options["legacy"]||false;this.json=options["json"]||false;this.listener=options["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(state,message){return new YAMLException(message,new Mark(state.filename,state.input,state.position,state.line,state.position-state.lineStart))}function throwError(state,message){throw generateError(state,message)}function throwWarning(state,message){if(state.onWarning){state.onWarning.call(null,generateError(state,message))}}var directiveHandlers={YAML:function handleYamlDirective(state,name,args){var match,major,minor;if(state.version!==null){throwError(state,"duplication of %YAML directive")}if(args.length!==1){throwError(state,"YAML directive accepts exactly one argument")}match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(match===null){throwError(state,"ill-formed argument of the YAML directive")}major=parseInt(match[1],10);minor=parseInt(match[2],10);if(major!==1){throwError(state,"unacceptable YAML version of the document")}state.version=args[0];state.checkLineBreaks=minor<2;if(minor!==1&&minor!==2){throwWarning(state,"unsupported YAML version of the document")}},TAG:function handleTagDirective(state,name,args){var handle,prefix;if(args.length!==2){throwError(state,"TAG directive accepts exactly two arguments")}handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle)){throwError(state,"ill-formed tag handle (first argument) of the TAG directive")}if(_hasOwnProperty.call(state.tagMap,handle)){throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle')}if(!PATTERN_TAG_URI.test(prefix)){throwError(state,"ill-formed tag prefix (second argument) of the TAG directive")}state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start<end){_result=state.input.slice(start,end);if(checkJson){for(_position=0,_length=_result.length;_position<_length;_position+=1){_character=_result.charCodeAt(_position);if(!(_character===9||32<=_character&&_character<=1114111)){throwError(state,"expected valid JSON character")}}}else if(PATTERN_NON_PRINTABLE.test(_result)){throwError(state,"the stream contains non-printable characters")}state.result+=_result}}function mergeMappings(state,destination,source,overridableKeys){var sourceKeys,key,index,quantity;if(!common.isObject(source)){throwError(state,"cannot merge mappings; the provided source object is unacceptable")}sourceKeys=Object.keys(source);for(index=0,quantity=sourceKeys.length;index<quantity;index+=1){key=sourceKeys[index];if(!_hasOwnProperty.call(destination,key)){destination[key]=source[key];overridableKeys[key]=true}}}function storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,startLine,startPos){var index,quantity;if(Array.isArray(keyNode)){keyNode=Array.prototype.slice.call(keyNode);for(index=0,quantity=keyNode.length;index<quantity;index+=1){if(Array.isArray(keyNode[index])){throwError(state,"nested arrays are not supported inside keys")}if(typeof keyNode==="object"&&_class(keyNode[index])==="[object Object]"){keyNode[index]="[object Object]"}}}if(typeof keyNode==="object"&&_class(keyNode)==="[object Object]"){keyNode="[object Object]"}keyNode=String(keyNode);if(_result===null){_result={}}if(keyTag==="tag:yaml.org,2002:merge"){if(Array.isArray(valueNode)){for(index=0,quantity=valueNode.length;index<quantity;index+=1){mergeMappings(state,_result,valueNode[index],overridableKeys)}}else{mergeMappings(state,_result,valueNode,overridableKeys)}}else{if(!state.json&&!_hasOwnProperty.call(overridableKeys,keyNode)&&_hasOwnProperty.call(_result,keyNode)){state.line=startLine||state.line;state.position=startPos||state.position;throwError(state,"duplicated mapping key")}_result[keyNode]=valueNode;delete overridableKeys[keyNode]}return _result}function readLineBreak(state){var ch;ch=state.input.charCodeAt(state.position);if(ch===10){state.position++}else if(ch===13){state.position++;if(state.input.charCodeAt(state.position)===10){state.position++}}else{throwError(state,"a line break is expected")}state.line+=1;state.lineStart=state.position}function skipSeparationSpace(state,allowComments,checkIndent){var lineBreaks=0,ch=state.input.charCodeAt(state.position);while(ch!==0){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(allowComments&&ch===35){do{ch=state.input.charCodeAt(++state.position)}while(ch!==10&&ch!==13&&ch!==0)}if(is_EOL(ch)){readLineBreak(state);ch=state.input.charCodeAt(state.position);lineBreaks++;state.lineIndent=0;while(ch===32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}}else{break}}if(checkIndent!==-1&&lineBreaks!==0&&state.lineIndent<checkIndent){throwWarning(state,"deficient indentation")}return lineBreaks}function testDocumentSeparator(state){var _position=state.position,ch;ch=state.input.charCodeAt(_position);if((ch===45||ch===46)&&ch===state.input.charCodeAt(_position+1)&&ch===state.input.charCodeAt(_position+2)){_position+=3;ch=state.input.charCodeAt(_position);if(ch===0||is_WS_OR_EOL(ch)){return true}}return false}function writeFoldedLines(state,count){if(count===1){state.result+=" "}else if(count>1){state.result+=common.repeat("\n",count-1)}}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;ch=state.input.charCodeAt(state.position);if(is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===64||ch===96){return false}if(ch===63||ch===45){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){return false}}state.kind="scalar";state.result="";captureStart=captureEnd=state.position;hasPendingContent=false;while(ch!==0){if(ch===58){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){break}}else if(ch===35){preceding=state.input.charCodeAt(state.position-1);if(is_WS_OR_EOL(preceding)){break}}else if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch)){break}else if(is_EOL(ch)){_line=state.line;_lineStart=state.lineStart;_lineIndent=state.lineIndent;skipSeparationSpace(state,false,-1);if(state.lineIndent>=nodeIndent){hasPendingContent=true;ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd;state.line=_line;state.lineStart=_lineStart;state.lineIndent=_lineIndent;break}}if(hasPendingContent){captureSegment(state,captureStart,captureEnd,false);writeFoldedLines(state,state.line-_line);captureStart=captureEnd=state.position;hasPendingContent=false}if(!is_WHITE_SPACE(ch)){captureEnd=state.position+1}ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,captureEnd,false);if(state.result){return true}state.kind=_kind;state.result=_result;return false}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;ch=state.input.charCodeAt(state.position);if(ch!==39){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===39){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(ch===39){captureStart=state.position;state.position++;captureEnd=state.position}else{return true}}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a single quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch!==34){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===34){captureSegment(state,captureStart,state.position,true);state.position++;return true}else if(ch===92){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(is_EOL(ch)){skipSeparationSpace(state,false,nodeIndent)}else if(ch<256&&simpleEscapeCheck[ch]){state.result+=simpleEscapeMap[ch];state.position++}else if((tmp=escapedHexLen(ch))>0){hexLength=tmp;hexResult=0;for(;hexLength>0;hexLength--){ch=state.input.charCodeAt(++state.position);if((tmp=fromHexCode(ch))>=0){hexResult=(hexResult<<4)+tmp}else{throwError(state,"expected hexadecimal character")}}state.result+=charFromCodepoint(hexResult);state.position++}else{throwError(state,"unknown escape sequence")}captureStart=captureEnd=state.position}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a double quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=true,_line,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys={},keyNode,keyTag,valueNode,ch;ch=state.input.charCodeAt(state.position);if(ch===91){terminator=93;isMapping=false;_result=[]}else if(ch===123){terminator=125;isMapping=true;_result={}}else{return false}if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(++state.position);while(ch!==0){skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===terminator){state.position++;state.tag=_tag;state.anchor=_anchor;state.kind=isMapping?"mapping":"sequence";state.result=_result;return true}else if(!readNext){throwError(state,"missed comma between flow collection entries")}keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(ch===63){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)){isPair=isExplicitPair=true;state.position++;skipSeparationSpace(state,true,nodeIndent)}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=state.tag;keyNode=state.result;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if((isExplicitPair||state.line===_line)&&ch===58){isPair=true;ch=state.input.charCodeAt(++state.position);skipSeparationSpace(state,true,nodeIndent);composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=state.result}if(isMapping){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode)}else if(isPair){_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode))}else{_result.push(keyNode)}skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===44){readNext=true;ch=state.input.charCodeAt(++state.position)}else{readNext=false}}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=false,detectedIndent=false,textIndent=nodeIndent,emptyLines=0,atMoreIndented=false,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch===124){folding=false}else if(ch===62){folding=true}else{return false}state.kind="scalar";state.result="";while(ch!==0){ch=state.input.charCodeAt(++state.position);if(ch===43||ch===45){if(CHOMPING_CLIP===chomping){chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP}else{throwError(state,"repeat of a chomping mode identifier")}}else if((tmp=fromDecimalCode(ch))>=0){if(tmp===0){throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!detectedIndent){textIndent=nodeIndent+tmp-1;detectedIndent=true}else{throwError(state,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(ch)){do{ch=state.input.charCodeAt(++state.position)}while(is_WHITE_SPACE(ch));if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(!is_EOL(ch)&&ch!==0)}}while(ch!==0){readLineBreak(state);state.lineIndent=0;ch=state.input.charCodeAt(state.position);while((!detectedIndent||state.lineIndent<textIndent)&&ch===32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}if(!detectedIndent&&state.lineIndent>textIndent){textIndent=state.lineIndent}if(is_EOL(ch)){emptyLines++;continue}if(state.lineIndent<textIndent){if(chomping===CHOMPING_KEEP){state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}else if(chomping===CHOMPING_CLIP){if(didReadContent){state.result+="\n"}}break}if(folding){if(is_WHITE_SPACE(ch)){atMoreIndented=true;state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}else if(atMoreIndented){atMoreIndented=false;state.result+=common.repeat("\n",emptyLines+1)}else if(emptyLines===0){if(didReadContent){state.result+=" "}}else{state.result+=common.repeat("\n",emptyLines)}}else{state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}didReadContent=true;detectedIndent=true;emptyLines=0;captureStart=state.position;while(!is_EOL(ch)&&ch!==0){ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,state.position,false)}return true}function readBlockSequence(state,nodeIndent){var _line,_tag=state.tag,_anchor=state.anchor,_result=[],following,detected=false,ch;if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(state.position);while(ch!==0){if(ch!==45){break}following=state.input.charCodeAt(state.position+1);if(!is_WS_OR_EOL(following)){break}detected=true;state.position++;if(skipSeparationSpace(state,true,-1)){if(state.lineIndent<=nodeIndent){_result.push(null);ch=state.input.charCodeAt(state.position);continue}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_BLOCK_IN,false,true);_result.push(state.result);skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if((state.line===_line||state.lineIndent>nodeIndent)&&ch!==0){throwError(state,"bad indentation of a sequence entry")}else if(state.lineIndent<nodeIndent){break}}if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="sequence";state.result=_result;return true}return false}function readBlockMapping(state,nodeIndent,flowIndent){var following,allowCompact,_line,_pos,_tag=state.tag,_anchor=state.anchor,_result={},overridableKeys={},keyTag=null,keyNode=null,valueNode=null,atExplicitKey=false,detected=false,ch;if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(state.position);while(ch!==0){following=state.input.charCodeAt(state.position+1);_line=state.line;_pos=state.position;if((ch===63||ch===58)&&is_WS_OR_EOL(following)){if(ch===63){if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=true;allowCompact=true}else if(atExplicitKey){atExplicitKey=false;allowCompact=true}else{throwError(state,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}state.position+=1;ch=following}else if(composeNode(state,flowIndent,CONTEXT_FLOW_OUT,false,true)){if(state.line===_line){ch=state.input.charCodeAt(state.position);while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(ch===58){ch=state.input.charCodeAt(++state.position);if(!is_WS_OR_EOL(ch)){throwError(state,"a whitespace character is expected after the key-value separator within a block mapping")}if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=false;allowCompact=false;keyTag=state.tag;keyNode=state.result}else if(detected){throwError(state,"can not read an implicit mapping pair; a colon is missed")}else{state.tag=_tag;state.anchor=_anchor;return true}}else if(detected){throwError(state,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{state.tag=_tag;state.anchor=_anchor;return true}}else{break}if(state.line===_line||state.lineIndent>nodeIndent){if(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact)){if(atExplicitKey){keyNode=state.result}else{valueNode=state.result}}if(!atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_line,_pos);keyTag=keyNode=valueNode=null}skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position)}if(state.lineIndent>nodeIndent&&ch!==0){throwError(state,"bad indentation of a mapping entry")}else if(state.lineIndent<nodeIndent){break}}if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null)}if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="mapping";state.result=_result}return detected}function readTagProperty(state){var _position,isVerbatim=false,isNamed=false,tagHandle,tagName,ch;ch=state.input.charCodeAt(state.position);if(ch!==33)return false;if(state.tag!==null){throwError(state,"duplication of a tag property")}ch=state.input.charCodeAt(++state.position);if(ch===60){isVerbatim=true;ch=state.input.charCodeAt(++state.position)}else if(ch===33){isNamed=true;tagHandle="!!";ch=state.input.charCodeAt(++state.position)}else{tagHandle="!"}_position=state.position;if(isVerbatim){do{ch=state.input.charCodeAt(++state.position)}while(ch!==0&&ch!==62);if(state.position<state.length){tagName=state.input.slice(_position,state.position);ch=state.input.charCodeAt(++state.position)}else{throwError(state,"unexpected end of the stream within a verbatim tag")}}else{while(ch!==0&&!is_WS_OR_EOL(ch)){if(ch===33){if(!isNamed){tagHandle=state.input.slice(_position-1,state.position+1);if(!PATTERN_TAG_HANDLE.test(tagHandle)){throwError(state,"named tag handle cannot contain such characters")}isNamed=true;_position=state.position+1}else{throwError(state,"tag suffix cannot contain exclamation marks")}}ch=state.input.charCodeAt(++state.position)}tagName=state.input.slice(_position,state.position);if(PATTERN_FLOW_INDICATORS.test(tagName)){throwError(state,"tag suffix cannot contain flow indicator characters")}}if(tagName&&!PATTERN_TAG_URI.test(tagName)){throwError(state,"tag name cannot contain such characters: "+tagName)}if(isVerbatim){state.tag=tagName}else if(_hasOwnProperty.call(state.tagMap,tagHandle)){state.tag=state.tagMap[tagHandle]+tagName}else if(tagHandle==="!"){state.tag="!"+tagName}else if(tagHandle==="!!"){state.tag="tag:yaml.org,2002:"+tagName}else{throwError(state,'undeclared tag handle "'+tagHandle+'"')}return true}function readAnchorProperty(state){var _position,ch;ch=state.input.charCodeAt(state.position);if(ch!==38)return false;if(state.anchor!==null){throwError(state,"duplication of an anchor property")}ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch)){ch=state.input.charCodeAt(++state.position)}if(state.position===_position){throwError(state,"name of an anchor node must contain at least one character")}state.anchor=state.input.slice(_position,state.position);return true}function readAlias(state){var _position,alias,ch;ch=state.input.charCodeAt(state.position);if(ch!==42)return false;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch)){ch=state.input.charCodeAt(++state.position)}if(state.position===_position){throwError(state,"name of an alias node must contain at least one character")}alias=state.input.slice(_position,state.position);if(!_hasOwnProperty.call(state.anchorMap,alias)){throwError(state,'unidentified alias "'+alias+'"')}state.result=state.anchorMap[alias];skipSeparationSpace(state,true,-1);return true}function composeNode(state,parentIndent,nodeContext,allowToSeek,allowCompact){var allowBlockStyles,allowBlockScalars,allowBlockCollections,indentStatus=1,atNewLine=false,hasContent=false,typeIndex,typeQuantity,type,flowIndent,blockIndent;if(state.listener!==null){state.listener("open",state)}state.tag=null;state.anchor=null;state.kind=null;state.result=null;allowBlockStyles=allowBlockScalars=allowBlockCollections=CONTEXT_BLOCK_OUT===nodeContext||CONTEXT_BLOCK_IN===nodeContext;if(allowToSeek){if(skipSeparationSpace(state,true,-1)){atNewLine=true;if(state.lineIndent>parentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent<parentIndent){indentStatus=-1}}}if(indentStatus===1){while(readTagProperty(state)||readAnchorProperty(state)){if(skipSeparationSpace(state,true,-1)){atNewLine=true;allowBlockCollections=allowBlockStyles;if(state.lineIndent>parentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent<parentIndent){indentStatus=-1}}else{allowBlockCollections=false}}}if(allowBlockCollections){allowBlockCollections=atNewLine||allowCompact}if(indentStatus===1||CONTEXT_BLOCK_OUT===nodeContext){if(CONTEXT_FLOW_IN===nodeContext||CONTEXT_FLOW_OUT===nodeContext){flowIndent=parentIndent}else{flowIndent=parentIndent+1}blockIndent=state.position-state.lineStart;if(indentStatus===1){if(allowBlockCollections&&(readBlockSequence(state,blockIndent)||readBlockMapping(state,blockIndent,flowIndent))||readFlowCollection(state,flowIndent)){hasContent=true}else{if(allowBlockScalars&&readBlockScalar(state,flowIndent)||readSingleQuotedScalar(state,flowIndent)||readDoubleQuotedScalar(state,flowIndent)){hasContent=true}else if(readAlias(state)){hasContent=true;if(state.tag!==null||state.anchor!==null){throwError(state,"alias node should not have any properties")}}else if(readPlainScalar(state,flowIndent,CONTEXT_FLOW_IN===nodeContext)){hasContent=true;if(state.tag===null){state.tag="?"}}if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}}else if(indentStatus===0){hasContent=allowBlockCollections&&readBlockSequence(state,blockIndent)}}if(state.tag!==null&&state.tag!=="!"){if(state.tag==="?"){if(state.result!==null&&state.kind!=="scalar"){throwError(state,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+state.kind+'"')}for(typeIndex=0,typeQuantity=state.implicitTypes.length;typeIndex<typeQuantity;typeIndex+=1){type=state.implicitTypes[typeIndex];if(type.resolve(state.result)){state.result=type.construct(state.result);state.tag=type.tag;if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}break}}}else if(_hasOwnProperty.call(state.typeMap[state.kind||"fallback"],state.tag)){type=state.typeMap[state.kind||"fallback"][state.tag];if(state.result!==null&&type.kind!==state.kind){throwError(state,"unacceptable node kind for !<"+state.tag+'> tag; it should be "'+type.kind+'", not "'+state.kind+'"')}if(!type.resolve(state.result)){throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")}else{state.result=type.construct(state.result);if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}}else{throwError(state,"unknown tag !<"+state.tag+">")}}if(state.listener!==null){state.listener("close",state)}return state.tag!==null||state.anchor!==null||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=state.legacy;state.tagMap={};state.anchorMap={};while((ch=state.input.charCodeAt(state.position))!==0){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>0||ch!==37){break}hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1){throwError(state,"directive name must not be less than one character in length")}while(ch!==0){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveArgs.push(state.input.slice(_position,state.position))}if(ch!==0)readLineBreak(state);if(_hasOwnProperty.call(directiveHandlers,directiveName)){directiveHandlers[directiveName](state,directiveName,directiveArgs)}else{throwWarning(state,'unknown document directive "'+directiveName+'"')}}skipSeparationSpace(state,true,-1);if(state.lineIndent===0&&state.input.charCodeAt(state.position)===45&&state.input.charCodeAt(state.position+1)===45&&state.input.charCodeAt(state.position+2)===45){state.position+=3;skipSeparationSpace(state,true,-1)}else if(hasDirectives){throwError(state,"directives end mark is expected")}composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))){throwWarning(state,"non-ASCII line breaks are interpreted as content")}state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(state.input.charCodeAt(state.position)===46){state.position+=3;skipSeparationSpace(state,true,-1)}return}if(state.position<state.length-1){throwError(state,"end of the stream or a document separator is expected")}else{return}}function loadDocuments(input,options){input=String(input);options=options||{};if(input.length!==0){if(input.charCodeAt(input.length-1)!==10&&input.charCodeAt(input.length-1)!==13){input+="\n"}if(input.charCodeAt(0)===65279){input=input.slice(1)}}var state=new State(input,options);var nullpos=input.indexOf("\0");if(nullpos!==-1){state.position=nullpos;throwError(state,"null byte is not allowed in input")}state.input+="\0";while(state.input.charCodeAt(state.position)===32){state.lineIndent+=1;state.position+=1}while(state.position<state.length-1){readDocument(state)}return state.documents}function loadAll(input,iterator,options){if(iterator!==null&&typeof iterator==="object"&&typeof options==="undefined"){options=iterator;iterator=null}var documents=loadDocuments(input,options);if(typeof iterator!=="function"){return documents}for(var index=0,length=documents.length;index<length;index+=1){iterator(documents[index])}}function load(input,options){var documents=loadDocuments(input,options);if(documents.length===0){return undefined}else if(documents.length===1){return documents[0]}throw new YAMLException("expected a single document in the stream, but found more")}function safeLoadAll(input,iterator,options){if(typeof iterator==="object"&&iterator!==null&&typeof options==="undefined"){options=iterator;iterator=null}return loadAll(input,iterator,common.extend({schema:DEFAULT_SAFE_SCHEMA},options))}function safeLoad(input,options){return load(input,common.extend({schema:DEFAULT_SAFE_SCHEMA},options))}loader$2.loadAll=loadAll;loader$2.load=load;loader$2.safeLoadAll=safeLoadAll;loader$2.safeLoad=safeLoad;return loader$2}var dumper$2={};var hasRequiredDumper$2;function requireDumper$2(){if(hasRequiredDumper$2)return dumper$2;hasRequiredDumper$2=1;var common=requireCommon$5();var YAMLException=requireException$2();var DEFAULT_FULL_SCHEMA=requireDefault_full();var DEFAULT_SAFE_SCHEMA=requireDefault_safe();var _toString=Object.prototype.toString;var _hasOwnProperty=Object.prototype.hasOwnProperty;var CHAR_TAB=9;var CHAR_LINE_FEED=10;var CHAR_CARRIAGE_RETURN=13;var CHAR_SPACE=32;var CHAR_EXCLAMATION=33;var CHAR_DOUBLE_QUOTE=34;var CHAR_SHARP=35;var CHAR_PERCENT=37;var CHAR_AMPERSAND=38;var CHAR_SINGLE_QUOTE=39;var CHAR_ASTERISK=42;var CHAR_COMMA=44;var CHAR_MINUS=45;var CHAR_COLON=58;var CHAR_EQUALS=61;var CHAR_GREATER_THAN=62;var CHAR_QUESTION=63;var CHAR_COMMERCIAL_AT=64;var CHAR_LEFT_SQUARE_BRACKET=91;var CHAR_RIGHT_SQUARE_BRACKET=93;var CHAR_GRAVE_ACCENT=96;var CHAR_LEFT_CURLY_BRACKET=123;var CHAR_VERTICAL_LINE=124;var CHAR_RIGHT_CURLY_BRACKET=125;var ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0";ESCAPE_SEQUENCES[7]="\\a";ESCAPE_SEQUENCES[8]="\\b";ESCAPE_SEQUENCES[9]="\\t";ESCAPE_SEQUENCES[10]="\\n";ESCAPE_SEQUENCES[11]="\\v";ESCAPE_SEQUENCES[12]="\\f";ESCAPE_SEQUENCES[13]="\\r";ESCAPE_SEQUENCES[27]="\\e";ESCAPE_SEQUENCES[34]='\\"';ESCAPE_SEQUENCES[92]="\\\\";ESCAPE_SEQUENCES[133]="\\N";ESCAPE_SEQUENCES[160]="\\_";ESCAPE_SEQUENCES[8232]="\\L";ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function compileStyleMap(schema,map){var result,keys,index,length,tag,style,type;if(map===null)return{};result={};keys=Object.keys(map);for(index=0,length=keys.length;index<length;index+=1){tag=keys[index];style=String(map[tag]);if(tag.slice(0,2)==="!!"){tag="tag:yaml.org,2002:"+tag.slice(2)}type=schema.compiledTypeMap["fallback"][tag];if(type&&_hasOwnProperty.call(type.styleAliases,style)){style=type.styleAliases[style]}result[tag]=style}return result}function encodeHex(character){var string,handle,length;string=character.toString(16).toUpperCase();if(character<=255){handle="x";length=2}else if(character<=65535){handle="u";length=4}else if(character<=4294967295){handle="U";length=8}else{throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+handle+common.repeat("0",length-string.length)+string}function State(options){this.schema=options["schema"]||DEFAULT_FULL_SCHEMA;this.indent=Math.max(1,options["indent"]||2);this.noArrayIndent=options["noArrayIndent"]||false;this.skipInvalid=options["skipInvalid"]||false;this.flowLevel=common.isNothing(options["flowLevel"])?-1:options["flowLevel"];this.styleMap=compileStyleMap(this.schema,options["styles"]||null);this.sortKeys=options["sortKeys"]||false;this.lineWidth=options["lineWidth"]||80;this.noRefs=options["noRefs"]||false;this.noCompatMode=options["noCompatMode"]||false;this.condenseFlow=options["condenseFlow"]||false;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(string,spaces){var ind=common.repeat(" ",spaces),position=0,next=-1,result="",line,length=string.length;while(position<length){next=string.indexOf("\n",position);if(next===-1){line=string.slice(position);position=length}else{line=string.slice(position,next+1);position=next+1}if(line.length&&line!=="\n")result+=ind;result+=line}return result}function generateNextLine(state,level){return"\n"+common.repeat(" ",state.indent*level)}function testImplicitResolving(state,str){var index,length,type;for(index=0,length=state.implicitTypes.length;index<length;index+=1){type=state.implicitTypes[index];if(type.resolve(str)){return true}}return false}function isWhitespace(c){return c===CHAR_SPACE||c===CHAR_TAB}function isPrintable(c){return 32<=c&&c<=126||161<=c&&c<=55295&&c!==8232&&c!==8233||57344<=c&&c<=65533&&c!==65279||65536<=c&&c<=1114111}function isNsChar(c){return isPrintable(c)&&!isWhitespace(c)&&c!==65279&&c!==CHAR_CARRIAGE_RETURN&&c!==CHAR_LINE_FEED}function isPlainSafe(c,prev){return isPrintable(c)&&c!==65279&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_COLON&&(c!==CHAR_SHARP||prev&&isNsChar(prev))}function isPlainSafeFirst(c){return isPrintable(c)&&c!==65279&&!isWhitespace(c)&&c!==CHAR_MINUS&&c!==CHAR_QUESTION&&c!==CHAR_COLON&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_SHARP&&c!==CHAR_AMPERSAND&&c!==CHAR_ASTERISK&&c!==CHAR_EXCLAMATION&&c!==CHAR_VERTICAL_LINE&&c!==CHAR_EQUALS&&c!==CHAR_GREATER_THAN&&c!==CHAR_SINGLE_QUOTE&&c!==CHAR_DOUBLE_QUOTE&&c!==CHAR_PERCENT&&c!==CHAR_COMMERCIAL_AT&&c!==CHAR_GRAVE_ACCENT}function needIndentIndicator(string){var leadingSpaceRe=/^\n* /;return leadingSpaceRe.test(string)}var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(string,singleLineOnly,indentPerLevel,lineWidth,testAmbiguousType){var i;var char,prev_char;var hasLineBreak=false;var hasFoldableLine=false;var shouldTrackWidth=lineWidth!==-1;var previousLineBreak=-1;var plain=isPlainSafeFirst(string.charCodeAt(0))&&!isWhitespace(string.charCodeAt(string.length-1));if(singleLineOnly){for(i=0;i<string.length;i++){char=string.charCodeAt(i);if(!isPrintable(char)){return STYLE_DOUBLE}prev_char=i>0?string.charCodeAt(i-1):null;plain=plain&&isPlainSafe(char,prev_char)}}else{for(i=0;i<string.length;i++){char=string.charCodeAt(i);if(char===CHAR_LINE_FEED){hasLineBreak=true;if(shouldTrackWidth){hasFoldableLine=hasFoldableLine||i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ";previousLineBreak=i}}else if(!isPrintable(char)){return STYLE_DOUBLE}prev_char=i>0?string.charCodeAt(i-1):null;plain=plain&&isPlainSafe(char,prev_char)}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&(i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ")}if(!hasLineBreak&&!hasFoldableLine){return plain&&!testAmbiguousType(string)?STYLE_PLAIN:STYLE_SINGLE}if(indentPerLevel>9&&needIndentIndicator(string)){return STYLE_DOUBLE}return hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}function writeScalar(state,string,level,iskey){state.dump=function(){if(string.length===0){return"''"}if(!state.noCompatMode&&DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1){return"'"+string+"'"}var indent=state.indent*Math.max(1,level);var lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent);var singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;function testAmbiguity(string){return testImplicitResolving(state,string)}switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return">"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string)+'"';default:throw new YAMLException("impossible error: invalid scalar style")}}()}function blockHeader(string,indentPerLevel){var indentIndicator=needIndentIndicator(string)?String(indentPerLevel):"";var clip=string[string.length-1]==="\n";var keep=clip&&(string[string.length-2]==="\n"||string==="\n");var chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+"\n"}function dropEndingNewline(string){return string[string.length-1]==="\n"?string.slice(0,-1):string}function foldString(string,width){var lineRe=/(\n+)([^\n]*)/g;var result=function(){var nextLF=string.indexOf("\n");nextLF=nextLF!==-1?nextLF:string.length;lineRe.lastIndex=nextLF;return foldLine(string.slice(0,nextLF),width)}();var prevMoreIndented=string[0]==="\n"||string[0]===" ";var moreIndented;var match;while(match=lineRe.exec(string)){var prefix=match[1],line=match[2];moreIndented=line[0]===" ";result+=prefix+(!prevMoreIndented&&!moreIndented&&line!==""?"\n":"")+foldLine(line,width);prevMoreIndented=moreIndented}return result}function foldLine(line,width){if(line===""||line[0]===" ")return line;var breakRe=/ [^ ]/g;var match;var start=0,end,curr=0,next=0;var result="";while(match=breakRe.exec(line)){next=match.index;if(next-start>width){end=curr>start?curr:next;result+="\n"+line.slice(start,end);start=end+1}curr=next}result+="\n";if(line.length-start>width&&curr>start){result+=line.slice(start,curr)+"\n"+line.slice(curr+1)}else{result+=line.slice(start)}return result.slice(1)}function escapeString(string){var result="";var char,nextChar;var escapeSeq;for(var i=0;i<string.length;i++){char=string.charCodeAt(i);if(char>=55296&&char<=56319){nextChar=string.charCodeAt(i+1);if(nextChar>=56320&&nextChar<=57343){result+=encodeHex((char-55296)*1024+nextChar-56320+65536);i++;continue}}escapeSeq=ESCAPE_SEQUENCES[char];result+=!escapeSeq&&isPrintable(char)?string[i]:escapeSeq||encodeHex(char)}return result}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index<length;index+=1){if(writeNode(state,level,object[index],false,false)){if(index!==0)_result+=","+(!state.condenseFlow?" ":"");_result+=state.dump}}state.tag=_tag;state.dump="["+_result+"]"}function writeBlockSequence(state,level,object,compact){var _result="",_tag=state.tag,index,length;for(index=0,length=object.length;index<length;index+=1){if(writeNode(state,level+1,object[index],true,true)){if(!compact||index!==0){_result+=generateNextLine(state,level)}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){_result+="-"}else{_result+="- "}_result+=state.dump}}state.tag=_tag;state.dump=_result||"[]"}function writeFlowMapping(state,level,object){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,pairBuffer;for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer="";if(index!==0)pairBuffer+=", ";if(state.condenseFlow)pairBuffer+='"';objectKey=objectKeyList[index];objectValue=object[objectKey];if(!writeNode(state,level,objectKey,false,false)){continue}if(state.dump.length>1024)pairBuffer+="? ";pairBuffer+=state.dump+(state.condenseFlow?'"':"")+":"+(state.condenseFlow?"":" ");if(!writeNode(state,level,objectValue,false,false)){continue}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state.sortKeys===true){objectKeyList.sort()}else if(typeof state.sortKeys==="function"){objectKeyList.sort(state.sortKeys)}else if(state.sortKeys){throw new YAMLException("sortKeys must be a boolean or a function")}for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer="";if(!compact||index!==0){pairBuffer+=generateNextLine(state,level)}objectKey=objectKeyList[index];objectValue=object[objectKey];if(!writeNode(state,level+1,objectKey,true,true,true)){continue}explicitPair=state.tag!==null&&state.tag!=="?"||state.dump&&state.dump.length>1024;if(explicitPair){if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+="?"}else{pairBuffer+="? "}}pairBuffer+=state.dump;if(explicitPair){pairBuffer+=generateNextLine(state,level)}if(!writeNode(state,level+1,objectValue,true,explicitPair)){continue}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+=":"}else{pairBuffer+=": "}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;typeList=explicit?state.explicitTypes:state.implicitTypes;for(index=0,length=typeList.length;index<length;index+=1){type=typeList[index];if((type.instanceOf||type.predicate)&&(!type.instanceOf||typeof object==="object"&&object instanceof type.instanceOf)&&(!type.predicate||type.predicate(object))){state.tag=explicit?type.tag:"?";if(type.represent){style=state.styleMap[type.tag]||type.defaultStyle;if(_toString.call(type.represent)==="[object Function]"){_result=type.represent(object,style)}else if(_hasOwnProperty.call(type.represent,style)){_result=type.represent[style](object,style)}else{throw new YAMLException("!<"+type.tag+'> tag resolver accepts not "'+style+'" style')}state.dump=_result}return true}}return false}function writeNode(state,level,object,block,compact,iskey){state.tag=null;state.dump=object;if(!detectType(state,object,false)){detectType(state,object,true)}var type=_toString.call(state.dump);if(block){block=state.flowLevel<0||state.flowLevel>level}var objectOrArray=type==="[object Object]"||type==="[object Array]",duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1}if(state.tag!==null&&state.tag!=="?"||duplicate||state.indent!==2&&level>0){compact=false}if(duplicate&&state.usedDuplicates[duplicateIndex]){state.dump="*ref_"+duplicateIndex}else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]){state.usedDuplicates[duplicateIndex]=true}if(type==="[object Object]"){if(block&&Object.keys(state.dump).length!==0){writeBlockMapping(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowMapping(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object Array]"){var arrayLevel=state.noArrayIndent&&level>0?level-1:level;if(block&&state.dump.length!==0){writeBlockSequence(state,arrayLevel,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowSequence(state,arrayLevel,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object String]"){if(state.tag!=="?"){writeScalar(state,state.dump,level,iskey)}}else{if(state.skipInvalid)return false;throw new YAMLException("unacceptable kind of an object to dump "+type)}if(state.tag!==null&&state.tag!=="?"){state.dump="!<"+state.tag+"> "+state.dump}}return true}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index<length;index+=1){state.duplicates.push(objects[duplicatesIndexes[index]])}state.usedDuplicates=new Array(length)}function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(object!==null&&typeof object==="object"){index=objects.indexOf(object);if(index!==-1){if(duplicatesIndexes.indexOf(index)===-1){duplicatesIndexes.push(index)}}else{objects.push(object);if(Array.isArray(object)){for(index=0,length=object.length;index<length;index+=1){inspectNode(object[index],objects,duplicatesIndexes)}}else{objectKeyList=Object.keys(object);for(index=0,length=objectKeyList.length;index<length;index+=1){inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes)}}}}}function dump(input,options){options=options||{};var state=new State(options);if(!state.noRefs)getDuplicateReferences(input,state);if(writeNode(state,0,input,true,true))return state.dump+"\n";return""}function safeDump(input,options){return dump(input,common.extend({schema:DEFAULT_SAFE_SCHEMA},options))}dumper$2.dump=dump;dumper$2.safeDump=safeDump;return dumper$2}var hasRequiredJsYaml$3;function requireJsYaml$3(){if(hasRequiredJsYaml$3)return jsYaml$3;hasRequiredJsYaml$3=1;var loader=requireLoader$2();var dumper=requireDumper$2();function deprecated(name){return function(){throw new Error("Function "+name+" is deprecated and cannot be used.")}}jsYaml$3.Type=requireType$2();jsYaml$3.Schema=requireSchema$2();jsYaml$3.FAILSAFE_SCHEMA=requireFailsafe$2();jsYaml$3.JSON_SCHEMA=requireJson$2();jsYaml$3.CORE_SCHEMA=requireCore$2();jsYaml$3.DEFAULT_SAFE_SCHEMA=requireDefault_safe();jsYaml$3.DEFAULT_FULL_SCHEMA=requireDefault_full();jsYaml$3.load=loader.load;jsYaml$3.loadAll=loader.loadAll;jsYaml$3.safeLoad=loader.safeLoad;jsYaml$3.safeLoadAll=loader.safeLoadAll;jsYaml$3.dump=dumper.dump;jsYaml$3.safeDump=dumper.safeDump;jsYaml$3.YAMLException=requireException$2();jsYaml$3.MINIMAL_SCHEMA=requireFailsafe$2();jsYaml$3.SAFE_SCHEMA=requireDefault_safe();jsYaml$3.DEFAULT_SCHEMA=requireDefault_full();jsYaml$3.scan=deprecated("scan");jsYaml$3.parse=deprecated("parse");jsYaml$3.compose=deprecated("compose");jsYaml$3.addConstructor=deprecated("addConstructor");return jsYaml$3}var jsYaml$2;var hasRequiredJsYaml$2;function requireJsYaml$2(){if(hasRequiredJsYaml$2)return jsYaml$2;hasRequiredJsYaml$2=1;var yaml=requireJsYaml$3();jsYaml$2=yaml;return jsYaml$2}var syml;var hasRequiredSyml$1;function requireSyml$1(){if(hasRequiredSyml$1)return syml;hasRequiredSyml$1=1;function peg$subclass(child,parent){function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor}function peg$SyntaxError(message,expected,found,location){this.message=message;this.expected=expected;this.found=found;this.location=location;this.name="SyntaxError";if(typeof Error.captureStackTrace==="function"){Error.captureStackTrace(this,peg$SyntaxError)}}peg$subclass(peg$SyntaxError,Error);peg$SyntaxError.buildMessage=function(expected,found){var DESCRIBE_EXPECTATION_FNS={literal:function(expectation){return'"'+literalEscape(expectation.text)+'"'},class:function(expectation){var escapedParts="",i;for(i=0;i<expectation.parts.length;i++){escapedParts+=expectation.parts[i]instanceof Array?classEscape(expectation.parts[i][0])+"-"+classEscape(expectation.parts[i][1]):classEscape(expectation.parts[i])}return"["+(expectation.inverted?"^":"")+escapedParts+"]"},any:function(expectation){return"any character"},end:function(expectation){return"end of input"},other:function(expectation){return expectation.description}};function hex(ch){return ch.charCodeAt(0).toString(16).toUpperCase()}function literalEscape(s){return s.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(ch){return"\\x0"+hex(ch)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(ch){return"\\x"+hex(ch)}))}function classEscape(s){return s.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(ch){return"\\x0"+hex(ch)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(ch){return"\\x"+hex(ch)}))}function describeExpectation(expectation){return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation)}function describeExpected(expected){var descriptions=new Array(expected.length),i,j;for(i=0;i<expected.length;i++){descriptions[i]=describeExpectation(expected[i])}descriptions.sort();if(descriptions.length>0){for(i=1,j=1;i<descriptions.length;i++){if(descriptions[i-1]!==descriptions[i]){descriptions[j]=descriptions[i];j++}}descriptions.length=j}switch(descriptions.length){case 1:return descriptions[0];case 2:return descriptions[0]+" or "+descriptions[1];default:return descriptions.slice(0,-1).join(", ")+", or "+descriptions[descriptions.length-1]}}function describeFound(found){return found?'"'+literalEscape(found)+'"':"end of input"}return"Expected "+describeExpected(expected)+" but "+describeFound(found)+" found."};function peg$parse(input,options){options=options!==void 0?options:{};var peg$FAILED={},peg$startRuleFunctions={Start:peg$parseStart},peg$startRuleFunction=peg$parseStart,peg$c0=function(statements){return[].concat(...statements)},peg$c1="-",peg$c2=peg$literalExpectation("-",false),peg$c3=function(value){return value},peg$c4=function(statements){return Object.assign({},...statements)},peg$c5="#",peg$c6=peg$literalExpectation("#",false),peg$c7=peg$anyExpectation(),peg$c8=function(){return{}},peg$c9=":",peg$c10=peg$literalExpectation(":",false),peg$c11=function(property,value){return{[property]:value}},peg$c12=",",peg$c13=peg$literalExpectation(",",false),peg$c14=function(property,other){return other},peg$c15=function(property,others,value){return Object.assign({},...[property].concat(others).map((property=>({[property]:value}))))},peg$c16=function(statements){return statements},peg$c17=function(expression){return expression},peg$c18=peg$otherExpectation("correct indentation"),peg$c19=" ",peg$c20=peg$literalExpectation(" ",false),peg$c21=function(spaces){return spaces.length===indentLevel*INDENT_STEP},peg$c22=function(spaces){return spaces.length===(indentLevel+1)*INDENT_STEP},peg$c23=function(){indentLevel++;return true},peg$c24=function(){indentLevel--;return true},peg$c25=function(){return text()},peg$c26=peg$otherExpectation("pseudostring"),peg$c27=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,peg$c28=peg$classExpectation(["\r","\n","\t"," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],true,false),peg$c29=/^[^\r\n\t ,\][{}:#"']/,peg$c30=peg$classExpectation(["\r","\n","\t"," ",",","]","[","{","}",":","#",'"',"'"],true,false),peg$c31=function(){return text().replace(/^ *| *$/g,"")},peg$c32="--",peg$c33=peg$literalExpectation("--",false),peg$c34=/^[a-zA-Z\/0-9]/,peg$c35=peg$classExpectation([["a","z"],["A","Z"],"/",["0","9"]],false,false),peg$c36=/^[^\r\n\t :,]/,peg$c37=peg$classExpectation(["\r","\n","\t"," ",":",","],true,false),peg$c38="null",peg$c39=peg$literalExpectation("null",false),peg$c40=function(){return null},peg$c41="true",peg$c42=peg$literalExpectation("true",false),peg$c43=function(){return true},peg$c44="false",peg$c45=peg$literalExpectation("false",false),peg$c46=function(){return false},peg$c47=peg$otherExpectation("string"),peg$c48='"',peg$c49=peg$literalExpectation('"',false),peg$c50=function(){return""},peg$c51=function(chars){return chars},peg$c52=function(chars){return chars.join(``)},peg$c53=/^[^"\\\0-\x1F\x7F]/,peg$c54=peg$classExpectation(['"',"\\",["\0","\x1f"],"\x7f"],true,false),peg$c55='\\"',peg$c56=peg$literalExpectation('\\"',false),peg$c57=function(){return`"`},peg$c58="\\\\",peg$c59=peg$literalExpectation("\\\\",false),peg$c60=function(){return`\\`},peg$c61="\\/",peg$c62=peg$literalExpectation("\\/",false),peg$c63=function(){return`/`},peg$c64="\\b",peg$c65=peg$literalExpectation("\\b",false),peg$c66=function(){return`\b`},peg$c67="\\f",peg$c68=peg$literalExpectation("\\f",false),peg$c69=function(){return`\f`},peg$c70="\\n",peg$c71=peg$literalExpectation("\\n",false),peg$c72=function(){return`\n`},peg$c73="\\r",peg$c74=peg$literalExpectation("\\r",false),peg$c75=function(){return`\r`},peg$c76="\\t",peg$c77=peg$literalExpectation("\\t",false),peg$c78=function(){return`\t`},peg$c79="\\u",peg$c80=peg$literalExpectation("\\u",false),peg$c81=function(h1,h2,h3,h4){return String.fromCharCode(parseInt(`0x${h1}${h2}${h3}${h4}`))},peg$c82=/^[0-9a-fA-F]/,peg$c83=peg$classExpectation([["0","9"],["a","f"],["A","F"]],false,false),peg$c84=peg$otherExpectation("blank space"),peg$c85=/^[ \t]/,peg$c86=peg$classExpectation([" ","\t"],false,false),peg$c90="\r\n",peg$c91=peg$literalExpectation("\r\n",false),peg$c92="\n",peg$c93=peg$literalExpectation("\n",false),peg$c94="\r",peg$c95=peg$literalExpectation("\r",false),peg$currPos=0,peg$savedPos=0,peg$posDetailsCache=[{line:1,column:1}],peg$maxFailPos=0,peg$maxFailExpected=[],peg$silentFails=0,peg$result;if("startRule"in options){if(!(options.startRule in peg$startRuleFunctions)){throw new Error("Can't start parsing from rule \""+options.startRule+'".')}peg$startRuleFunction=peg$startRuleFunctions[options.startRule]}function text(){return input.substring(peg$savedPos,peg$currPos)}function peg$literalExpectation(text,ignoreCase){return{type:"literal",text:text,ignoreCase:ignoreCase}}function peg$classExpectation(parts,inverted,ignoreCase){return{type:"class",parts:parts,inverted:inverted,ignoreCase:ignoreCase}}function peg$anyExpectation(){return{type:"any"}}function peg$endExpectation(){return{type:"end"}}function peg$otherExpectation(description){return{type:"other",description:description}}function peg$computePosDetails(pos){var details=peg$posDetailsCache[pos],p;if(details){return details}else{p=pos-1;while(!peg$posDetailsCache[p]){p--}details=peg$posDetailsCache[p];details={line:details.line,column:details.column};while(p<pos){if(input.charCodeAt(p)===10){details.line++;details.column=1}else{details.column++}p++}peg$posDetailsCache[pos]=details;return details}}function peg$computeLocation(startPos,endPos){var startPosDetails=peg$computePosDetails(startPos),endPosDetails=peg$computePosDetails(endPos);return{start:{offset:startPos,line:startPosDetails.line,column:startPosDetails.column},end:{offset:endPos,line:endPosDetails.line,column:endPosDetails.column}}}function peg$fail(expected){if(peg$currPos<peg$maxFailPos){return}if(peg$currPos>peg$maxFailPos){peg$maxFailPos=peg$currPos;peg$maxFailExpected=[]}peg$maxFailExpected.push(expected)}function peg$buildStructuredError(expected,found,location){return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected,found),expected,found,location)}function peg$parseStart(){var s0;s0=peg$parsePropertyStatements();return s0}function peg$parseItemStatements(){var s0,s1,s2;s0=peg$currPos;s1=[];s2=peg$parseItemStatement();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseItemStatement()}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c0(s1)}s0=s1;return s0}function peg$parseItemStatement(){var s0,s1,s2,s3,s4;s0=peg$currPos;s1=peg$parseSamedent();if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===45){s2=peg$c1;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c2)}}if(s2!==peg$FAILED){s3=peg$parseB();if(s3!==peg$FAILED){s4=peg$parseExpression();if(s4!==peg$FAILED){peg$savedPos=s0;s1=peg$c3(s4);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parsePropertyStatements(){var s0,s1,s2;s0=peg$currPos;s1=[];s2=peg$parsePropertyStatement();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parsePropertyStatement()}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c4(s1)}s0=s1;return s0}function peg$parsePropertyStatement(){var s0,s1,s2,s3,s4,s5,s6,s7,s8;s0=peg$currPos;s1=peg$parseB();if(s1===peg$FAILED){s1=null}if(s1!==peg$FAILED){s2=peg$currPos;if(input.charCodeAt(peg$currPos)===35){s3=peg$c5;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c6)}}if(s3!==peg$FAILED){s4=[];s5=peg$currPos;s6=peg$currPos;peg$silentFails++;s7=peg$parseEOL();peg$silentFails--;if(s7===peg$FAILED){s6=void 0}else{peg$currPos=s6;s6=peg$FAILED}if(s6!==peg$FAILED){if(input.length>peg$currPos){s7=input.charAt(peg$currPos);peg$currPos++}else{s7=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c7)}}if(s7!==peg$FAILED){s6=[s6,s7];s5=s6}else{peg$currPos=s5;s5=peg$FAILED}}else{peg$currPos=s5;s5=peg$FAILED}if(s5!==peg$FAILED){while(s5!==peg$FAILED){s4.push(s5);s5=peg$currPos;s6=peg$currPos;peg$silentFails++;s7=peg$parseEOL();peg$silentFails--;if(s7===peg$FAILED){s6=void 0}else{peg$currPos=s6;s6=peg$FAILED}if(s6!==peg$FAILED){if(input.length>peg$currPos){s7=input.charAt(peg$currPos);peg$currPos++}else{s7=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c7)}}if(s7!==peg$FAILED){s6=[s6,s7];s5=s6}else{peg$currPos=s5;s5=peg$FAILED}}else{peg$currPos=s5;s5=peg$FAILED}}}else{s4=peg$FAILED}if(s4!==peg$FAILED){s3=[s3,s4];s2=s3}else{peg$currPos=s2;s2=peg$FAILED}}else{peg$currPos=s2;s2=peg$FAILED}if(s2===peg$FAILED){s2=null}if(s2!==peg$FAILED){s3=[];s4=peg$parseEOL_ANY();if(s4!==peg$FAILED){while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseEOL_ANY()}}else{s3=peg$FAILED}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c8();s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseSamedent();if(s1!==peg$FAILED){s2=peg$parseName();if(s2!==peg$FAILED){s3=peg$parseB();if(s3===peg$FAILED){s3=null}if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===58){s4=peg$c9;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c10)}}if(s4!==peg$FAILED){s5=peg$parseB();if(s5===peg$FAILED){s5=null}if(s5!==peg$FAILED){s6=peg$parseExpression();if(s6!==peg$FAILED){peg$savedPos=s0;s1=peg$c11(s2,s6);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseSamedent();if(s1!==peg$FAILED){s2=peg$parseLegacyName();if(s2!==peg$FAILED){s3=peg$parseB();if(s3===peg$FAILED){s3=null}if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===58){s4=peg$c9;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c10)}}if(s4!==peg$FAILED){s5=peg$parseB();if(s5===peg$FAILED){s5=null}if(s5!==peg$FAILED){s6=peg$parseExpression();if(s6!==peg$FAILED){peg$savedPos=s0;s1=peg$c11(s2,s6);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseSamedent();if(s1!==peg$FAILED){s2=peg$parseLegacyName();if(s2!==peg$FAILED){s3=peg$parseB();if(s3!==peg$FAILED){s4=peg$parseLegacyLiteral();if(s4!==peg$FAILED){s5=[];s6=peg$parseEOL_ANY();if(s6!==peg$FAILED){while(s6!==peg$FAILED){s5.push(s6);s6=peg$parseEOL_ANY()}}else{s5=peg$FAILED}if(s5!==peg$FAILED){peg$savedPos=s0;s1=peg$c11(s2,s4);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseSamedent();if(s1!==peg$FAILED){s2=peg$parseLegacyName();if(s2!==peg$FAILED){s3=[];s4=peg$currPos;s5=peg$parseB();if(s5===peg$FAILED){s5=null}if(s5!==peg$FAILED){if(input.charCodeAt(peg$currPos)===44){s6=peg$c12;peg$currPos++}else{s6=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c13)}}if(s6!==peg$FAILED){s7=peg$parseB();if(s7===peg$FAILED){s7=null}if(s7!==peg$FAILED){s8=peg$parseLegacyName();if(s8!==peg$FAILED){peg$savedPos=s4;s5=peg$c14(s2,s8);s4=s5}else{peg$currPos=s4;s4=peg$FAILED}}else{peg$currPos=s4;s4=peg$FAILED}}else{peg$currPos=s4;s4=peg$FAILED}}else{peg$currPos=s4;s4=peg$FAILED}if(s4!==peg$FAILED){while(s4!==peg$FAILED){s3.push(s4);s4=peg$currPos;s5=peg$parseB();if(s5===peg$FAILED){s5=null}if(s5!==peg$FAILED){if(input.charCodeAt(peg$currPos)===44){s6=peg$c12;peg$currPos++}else{s6=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c13)}}if(s6!==peg$FAILED){s7=peg$parseB();if(s7===peg$FAILED){s7=null}if(s7!==peg$FAILED){s8=peg$parseLegacyName();if(s8!==peg$FAILED){peg$savedPos=s4;s5=peg$c14(s2,s8);s4=s5}else{peg$currPos=s4;s4=peg$FAILED}}else{peg$currPos=s4;s4=peg$FAILED}}else{peg$currPos=s4;s4=peg$FAILED}}else{peg$currPos=s4;s4=peg$FAILED}}}else{s3=peg$FAILED}if(s3!==peg$FAILED){s4=peg$parseB();if(s4===peg$FAILED){s4=null}if(s4!==peg$FAILED){if(input.charCodeAt(peg$currPos)===58){s5=peg$c9;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c10)}}if(s5!==peg$FAILED){s6=peg$parseB();if(s6===peg$FAILED){s6=null}if(s6!==peg$FAILED){s7=peg$parseExpression();if(s7!==peg$FAILED){peg$savedPos=s0;s1=peg$c15(s2,s3,s7);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}}}}return s0}function peg$parseExpression(){var s0,s1,s2,s3,s4,s5,s6;s0=peg$currPos;s1=peg$currPos;peg$silentFails++;s2=peg$currPos;s3=peg$parseEOL();if(s3!==peg$FAILED){s4=peg$parseExtradent();if(s4!==peg$FAILED){if(input.charCodeAt(peg$currPos)===45){s5=peg$c1;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c2)}}if(s5!==peg$FAILED){s6=peg$parseB();if(s6!==peg$FAILED){s3=[s3,s4,s5,s6];s2=s3}else{peg$currPos=s2;s2=peg$FAILED}}else{peg$currPos=s2;s2=peg$FAILED}}else{peg$currPos=s2;s2=peg$FAILED}}else{peg$currPos=s2;s2=peg$FAILED}peg$silentFails--;if(s2!==peg$FAILED){peg$currPos=s1;s1=void 0}else{s1=peg$FAILED}if(s1!==peg$FAILED){s2=peg$parseEOL_ANY();if(s2!==peg$FAILED){s3=peg$parseIndent();if(s3!==peg$FAILED){s4=peg$parseItemStatements();if(s4!==peg$FAILED){s5=peg$parseDedent();if(s5!==peg$FAILED){peg$savedPos=s0;s1=peg$c16(s4);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseEOL();if(s1!==peg$FAILED){s2=peg$parseIndent();if(s2!==peg$FAILED){s3=peg$parsePropertyStatements();if(s3!==peg$FAILED){s4=peg$parseDedent();if(s4!==peg$FAILED){peg$savedPos=s0;s1=peg$c16(s3);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parseLiteral();if(s1!==peg$FAILED){s2=[];s3=peg$parseEOL_ANY();if(s3!==peg$FAILED){while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseEOL_ANY()}}else{s2=peg$FAILED}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c17(s1);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}}return s0}function peg$parseSamedent(){var s0,s1,s2;peg$silentFails++;s0=peg$currPos;s1=[];if(input.charCodeAt(peg$currPos)===32){s2=peg$c19;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c20)}}while(s2!==peg$FAILED){s1.push(s2);if(input.charCodeAt(peg$currPos)===32){s2=peg$c19;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c20)}}}if(s1!==peg$FAILED){peg$savedPos=peg$currPos;s2=peg$c21(s1);if(s2){s2=void 0}else{s2=peg$FAILED}if(s2!==peg$FAILED){s1=[s1,s2];s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}peg$silentFails--;if(s0===peg$FAILED){s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c18)}}return s0}function peg$parseExtradent(){var s0,s1,s2;s0=peg$currPos;s1=[];if(input.charCodeAt(peg$currPos)===32){s2=peg$c19;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c20)}}while(s2!==peg$FAILED){s1.push(s2);if(input.charCodeAt(peg$currPos)===32){s2=peg$c19;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c20)}}}if(s1!==peg$FAILED){peg$savedPos=peg$currPos;s2=peg$c22(s1);if(s2){s2=void 0}else{s2=peg$FAILED}if(s2!==peg$FAILED){s1=[s1,s2];s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseIndent(){var s0;peg$savedPos=peg$currPos;s0=peg$c23();if(s0){s0=void 0}else{s0=peg$FAILED}return s0}function peg$parseDedent(){var s0;peg$savedPos=peg$currPos;s0=peg$c24();if(s0){s0=void 0}else{s0=peg$FAILED}return s0}function peg$parseName(){var s0;s0=peg$parsestring();if(s0===peg$FAILED){s0=peg$parsepseudostring()}return s0}function peg$parseLegacyName(){var s0,s1,s2;s0=peg$parsestring();if(s0===peg$FAILED){s0=peg$currPos;s1=[];s2=peg$parsepseudostringLegacy();if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);s2=peg$parsepseudostringLegacy()}}else{s1=peg$FAILED}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c25()}s0=s1}return s0}function peg$parseLiteral(){var s0;s0=peg$parsenull();if(s0===peg$FAILED){s0=peg$parseboolean();if(s0===peg$FAILED){s0=peg$parsestring();if(s0===peg$FAILED){s0=peg$parsepseudostring()}}}return s0}function peg$parseLegacyLiteral(){var s0;s0=peg$parsenull();if(s0===peg$FAILED){s0=peg$parsestring();if(s0===peg$FAILED){s0=peg$parsepseudostringLegacy()}}return s0}function peg$parsepseudostring(){var s0,s1,s2,s3,s4,s5;peg$silentFails++;s0=peg$currPos;if(peg$c27.test(input.charAt(peg$currPos))){s1=input.charAt(peg$currPos);peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c28)}}if(s1!==peg$FAILED){s2=[];s3=peg$currPos;s4=peg$parseB();if(s4===peg$FAILED){s4=null}if(s4!==peg$FAILED){if(peg$c29.test(input.charAt(peg$currPos))){s5=input.charAt(peg$currPos);peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c30)}}if(s5!==peg$FAILED){s4=[s4,s5];s3=s4}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}while(s3!==peg$FAILED){s2.push(s3);s3=peg$currPos;s4=peg$parseB();if(s4===peg$FAILED){s4=null}if(s4!==peg$FAILED){if(peg$c29.test(input.charAt(peg$currPos))){s5=input.charAt(peg$currPos);peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c30)}}if(s5!==peg$FAILED){s4=[s4,s5];s3=s4}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c31();s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}peg$silentFails--;if(s0===peg$FAILED){s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c26)}}return s0}function peg$parsepseudostringLegacy(){var s0,s1,s2,s3,s4;s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c32){s1=peg$c32;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c33)}}if(s1===peg$FAILED){s1=null}if(s1!==peg$FAILED){if(peg$c34.test(input.charAt(peg$currPos))){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c35)}}if(s2!==peg$FAILED){s3=[];if(peg$c36.test(input.charAt(peg$currPos))){s4=input.charAt(peg$currPos);peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c37)}}while(s4!==peg$FAILED){s3.push(s4);if(peg$c36.test(input.charAt(peg$currPos))){s4=input.charAt(peg$currPos);peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c37)}}}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c31();s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parsenull(){var s0,s1;s0=peg$currPos;if(input.substr(peg$currPos,4)===peg$c38){s1=peg$c38;peg$currPos+=4}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c39)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c40()}s0=s1;return s0}function peg$parseboolean(){var s0,s1;s0=peg$currPos;if(input.substr(peg$currPos,4)===peg$c41){s1=peg$c41;peg$currPos+=4}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c42)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c43()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,5)===peg$c44){s1=peg$c44;peg$currPos+=5}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c45)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c46()}s0=s1}return s0}function peg$parsestring(){var s0,s1,s2,s3;peg$silentFails++;s0=peg$currPos;if(input.charCodeAt(peg$currPos)===34){s1=peg$c48;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c49)}}if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===34){s2=peg$c48;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c49)}}if(s2!==peg$FAILED){peg$savedPos=s0;s1=peg$c50();s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===34){s1=peg$c48;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c49)}}if(s1!==peg$FAILED){s2=peg$parsechars();if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===34){s3=peg$c48;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c49)}}if(s3!==peg$FAILED){peg$savedPos=s0;s1=peg$c51(s2);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}peg$silentFails--;if(s0===peg$FAILED){s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c47)}}return s0}function peg$parsechars(){var s0,s1,s2;s0=peg$currPos;s1=[];s2=peg$parsechar();if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);s2=peg$parsechar()}}else{s1=peg$FAILED}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c52(s1)}s0=s1;return s0}function peg$parsechar(){var s0,s1,s2,s3,s4,s5;if(peg$c53.test(input.charAt(peg$currPos))){s0=input.charAt(peg$currPos);peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c54)}}if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c55){s1=peg$c55;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c56)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c57()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c58){s1=peg$c58;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c59)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c60()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c61){s1=peg$c61;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c62)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c63()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c64){s1=peg$c64;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c65)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c66()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c67){s1=peg$c67;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c68)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c69()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c70){s1=peg$c70;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c71)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c72()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c73){s1=peg$c73;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c74)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c75()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c76){s1=peg$c76;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c77)}}if(s1!==peg$FAILED){peg$savedPos=s0;s1=peg$c78()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c79){s1=peg$c79;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c80)}}if(s1!==peg$FAILED){s2=peg$parsehexDigit();if(s2!==peg$FAILED){s3=peg$parsehexDigit();if(s3!==peg$FAILED){s4=peg$parsehexDigit();if(s4!==peg$FAILED){s5=peg$parsehexDigit();if(s5!==peg$FAILED){peg$savedPos=s0;s1=peg$c81(s2,s3,s4,s5);s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}}}}}}}}}}return s0}function peg$parsehexDigit(){var s0;if(peg$c82.test(input.charAt(peg$currPos))){s0=input.charAt(peg$currPos);peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c83)}}return s0}function peg$parseB(){var s0,s1;peg$silentFails++;s0=[];if(peg$c85.test(input.charAt(peg$currPos))){s1=input.charAt(peg$currPos);peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c86)}}if(s1!==peg$FAILED){while(s1!==peg$FAILED){s0.push(s1);if(peg$c85.test(input.charAt(peg$currPos))){s1=input.charAt(peg$currPos);peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c86)}}}}else{s0=peg$FAILED}peg$silentFails--;if(s0===peg$FAILED){s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c84)}}return s0}function peg$parseEOL_ANY(){var s0,s1,s2,s3,s4,s5;s0=peg$currPos;s1=peg$parseEOL();if(s1!==peg$FAILED){s2=[];s3=peg$currPos;s4=peg$parseB();if(s4===peg$FAILED){s4=null}if(s4!==peg$FAILED){s5=peg$parseEOL();if(s5!==peg$FAILED){s4=[s4,s5];s3=s4}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}while(s3!==peg$FAILED){s2.push(s3);s3=peg$currPos;s4=peg$parseB();if(s4===peg$FAILED){s4=null}if(s4!==peg$FAILED){s5=peg$parseEOL();if(s5!==peg$FAILED){s4=[s4,s5];s3=s4}else{peg$currPos=s3;s3=peg$FAILED}}else{peg$currPos=s3;s3=peg$FAILED}}if(s2!==peg$FAILED){s1=[s1,s2];s0=s1}else{peg$currPos=s0;s0=peg$FAILED}}else{peg$currPos=s0;s0=peg$FAILED}return s0}function peg$parseEOL(){var s0;if(input.substr(peg$currPos,2)===peg$c90){s0=peg$c90;peg$currPos+=2}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c91)}}if(s0===peg$FAILED){if(input.charCodeAt(peg$currPos)===10){s0=peg$c92;peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c93)}}if(s0===peg$FAILED){if(input.charCodeAt(peg$currPos)===13){s0=peg$c94;peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c95)}}}}return s0}const INDENT_STEP=2;let indentLevel=0;peg$result=peg$startRuleFunction();if(peg$result!==peg$FAILED&&peg$currPos===input.length){return peg$result}else{if(peg$result!==peg$FAILED&&peg$currPos<input.length){peg$fail(peg$endExpectation())}throw peg$buildStructuredError(peg$maxFailExpected,peg$maxFailPos<input.length?input.charAt(peg$maxFailPos):null,peg$maxFailPos<input.length?peg$computeLocation(peg$maxFailPos,peg$maxFailPos+1):peg$computeLocation(peg$maxFailPos,peg$maxFailPos))}}syml={SyntaxError:peg$SyntaxError,parse:peg$parse};return syml}var hasRequiredSyml;function requireSyml(){if(hasRequiredSyml)return syml$1;hasRequiredSyml=1;Object.defineProperty(syml$1,"__esModule",{value:true});syml$1.parseSyml=syml$1.stringifySyml=syml$1.PreserveOrdering=void 0;const js_yaml_1=requireJsYaml$2();const syml_1=requireSyml$1();const simpleStringPattern=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/;const specialObjectKeys=[`__metadata`,`version`,`resolution`,`dependencies`,`peerDependencies`,`dependenciesMeta`,`peerDependenciesMeta`,`binaries`];class PreserveOrdering{constructor(data){this.data=data}}syml$1.PreserveOrdering=PreserveOrdering;function stringifyString(value){if(value.match(simpleStringPattern)){return value}else{return JSON.stringify(value)}}function isRemovableField(value){if(typeof value===`undefined`)return true;if(typeof value===`object`&&value!==null)return Object.keys(value).every((key=>isRemovableField(value[key])));return false}function stringifyValue(value,indentLevel,newLineIfObject){if(value===null)return`null\n`;if(typeof value===`number`||typeof value===`boolean`)return`${value.toString()}\n`;if(typeof value===`string`)return`${stringifyString(value)}\n`;if(Array.isArray(value)){if(value.length===0)return`[]\n`;const indent=` `.repeat(indentLevel);const serialized=value.map((sub=>`${indent}- ${stringifyValue(sub,indentLevel+1,false)}`)).join(``);return`\n${serialized}`}if(typeof value===`object`&&value){let data;let sort;if(value instanceof PreserveOrdering){data=value.data;sort=false}else{data=value;sort=true}const indent=` `.repeat(indentLevel);const keys=Object.keys(data);if(sort){keys.sort(((a,b)=>{const aIndex=specialObjectKeys.indexOf(a);const bIndex=specialObjectKeys.indexOf(b);if(aIndex===-1&&bIndex===-1)return a<b?-1:a>b?1:0;if(aIndex!==-1&&bIndex===-1)return-1;if(aIndex===-1&&bIndex!==-1)return 1;return aIndex-bIndex}))}const fields=keys.filter((key=>!isRemovableField(data[key]))).map(((key,index)=>{const value=data[key];const stringifiedKey=stringifyString(key);const stringifiedValue=stringifyValue(value,indentLevel+1,true);const recordIndentation=index>0||newLineIfObject?indent:``;const keyPart=stringifiedKey.length>1024?`? ${stringifiedKey}\n${recordIndentation}:`:`${stringifiedKey}:`;const valuePart=stringifiedValue.startsWith(`\n`)?stringifiedValue:` ${stringifiedValue}`;return`${recordIndentation}${keyPart}${valuePart}`})).join(indentLevel===0?`\n`:``)||`\n`;if(!newLineIfObject){return`${fields}`}else{return`\n${fields}`}}throw new Error(`Unsupported value type (${value})`)}function stringifySyml(value){try{const stringified=stringifyValue(value,0,false);return stringified!==`\n`?stringified:``}catch(error){if(error.location)error.message=error.message.replace(/(\.)?$/,` (line ${error.location.start.line}, column ${error.location.start.column})$1`);throw error}}syml$1.stringifySyml=stringifySyml;stringifySyml.PreserveOrdering=PreserveOrdering;function parseViaPeg(source){if(!source.endsWith(`\n`))source+=`\n`;return(0,syml_1.parse)(source)}const LEGACY_REGEXP=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function parseViaJsYaml(source){if(LEGACY_REGEXP.test(source))return parseViaPeg(source);const value=(0,js_yaml_1.safeLoad)(source,{schema:js_yaml_1.FAILSAFE_SCHEMA,json:true});if(value===undefined||value===null)return{};if(typeof value!==`object`)throw new Error(`Expected an indexed object, got a ${typeof value} instead. Does your file follow Yaml's rules?`);if(Array.isArray(value))throw new Error(`Expected an indexed object, got an array instead. Does your file follow Yaml's rules?`);return value}function parseSyml(source){return parseViaJsYaml(source)}syml$1.parseSyml=parseSyml;return syml$1}var hasRequiredLib$d;function requireLib$d(){if(hasRequiredLib$d)return lib$c;hasRequiredLib$d=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.stringifySyml=exports.parseSyml=exports.stringifyResolution=exports.parseResolution=exports.stringifyValueArgument=exports.stringifyShellLine=exports.stringifyRedirectArgument=exports.stringifyEnvSegment=exports.stringifyCommandLineThen=exports.stringifyCommandLine=exports.stringifyCommandChainThen=exports.stringifyCommandChain=exports.stringifyCommand=exports.stringifyArithmeticExpression=exports.stringifyArgumentSegment=exports.stringifyArgument=exports.stringifyShell=exports.parseShell=void 0;var shell_1=requireShell();Object.defineProperty(exports,"parseShell",{enumerable:true,get:function(){return shell_1.parseShell}});Object.defineProperty(exports,"stringifyShell",{enumerable:true,get:function(){return shell_1.stringifyShell}});Object.defineProperty(exports,"stringifyArgument",{enumerable:true,get:function(){return shell_1.stringifyArgument}});Object.defineProperty(exports,"stringifyArgumentSegment",{enumerable:true,get:function(){return shell_1.stringifyArgumentSegment}});Object.defineProperty(exports,"stringifyArithmeticExpression",{enumerable:true,get:function(){return shell_1.stringifyArithmeticExpression}});Object.defineProperty(exports,"stringifyCommand",{enumerable:true,get:function(){return shell_1.stringifyCommand}});Object.defineProperty(exports,"stringifyCommandChain",{enumerable:true,get:function(){return shell_1.stringifyCommandChain}});Object.defineProperty(exports,"stringifyCommandChainThen",{enumerable:true,get:function(){return shell_1.stringifyCommandChainThen}});Object.defineProperty(exports,"stringifyCommandLine",{enumerable:true,get:function(){return shell_1.stringifyCommandLine}});Object.defineProperty(exports,"stringifyCommandLineThen",{enumerable:true,get:function(){return shell_1.stringifyCommandLineThen}});Object.defineProperty(exports,"stringifyEnvSegment",{enumerable:true,get:function(){return shell_1.stringifyEnvSegment}});Object.defineProperty(exports,"stringifyRedirectArgument",{enumerable:true,get:function(){return shell_1.stringifyRedirectArgument}});Object.defineProperty(exports,"stringifyShellLine",{enumerable:true,get:function(){return shell_1.stringifyShellLine}});Object.defineProperty(exports,"stringifyValueArgument",{enumerable:true,get:function(){return shell_1.stringifyValueArgument}});var resolution_1=requireResolution();Object.defineProperty(exports,"parseResolution",{enumerable:true,get:function(){return resolution_1.parseResolution}});Object.defineProperty(exports,"stringifyResolution",{enumerable:true,get:function(){return resolution_1.stringifyResolution}});var syml_1=requireSyml();Object.defineProperty(exports,"parseSyml",{enumerable:true,get:function(){return syml_1.parseSyml}});Object.defineProperty(exports,"stringifySyml",{enumerable:true,get:function(){return syml_1.stringifySyml}})})(lib$c);return lib$c}var ansiStyles={exports:{}};var colorName;var hasRequiredColorName;function requireColorName(){if(hasRequiredColorName)return colorName;hasRequiredColorName=1;colorName={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],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};return colorName}var conversions;var hasRequiredConversions;function requireConversions(){if(hasRequiredConversions)return conversions;hasRequiredConversions=1;const cssKeywords=requireColorName();const reverseKeywords={};for(const key of Object.keys(cssKeywords)){reverseKeywords[cssKeywords[key]]=key}const convert={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};conversions=convert;for(const model of Object.keys(convert)){if(!("channels"in convert[model])){throw new Error("missing channels property: "+model)}if(!("labels"in convert[model])){throw new Error("missing channel labels property: "+model)}if(convert[model].labels.length!==convert[model].channels){throw new Error("channel and label counts mismatch: "+model)}const{channels:channels,labels:labels}=convert[model];delete convert[model].channels;delete convert[model].labels;Object.defineProperty(convert[model],"channels",{value:channels});Object.defineProperty(convert[model],"labels",{value:labels})}convert.rgb.hsl=function(rgb){const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const min=Math.min(r,g,b);const max=Math.max(r,g,b);const delta=max-min;let h;let s;if(max===min){h=0}else if(r===max){h=(g-b)/delta}else if(g===max){h=2+(b-r)/delta}else if(b===max){h=4+(r-g)/delta}h=Math.min(h*60,360);if(h<0){h+=360}const l=(min+max)/2;if(max===min){s=0}else if(l<=.5){s=delta/(max+min)}else{s=delta/(2-max-min)}return[h,s*100,l*100]};convert.rgb.hsv=function(rgb){let rdif;let gdif;let bdif;let h;let s;const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const v=Math.max(r,g,b);const diff=v-Math.min(r,g,b);const diffc=function(c){return(v-c)/6/diff+1/2};if(diff===0){h=0;s=0}else{s=diff/v;rdif=diffc(r);gdif=diffc(g);bdif=diffc(b);if(r===v){h=bdif-gdif}else if(g===v){h=1/3+rdif-bdif}else if(b===v){h=2/3+gdif-rdif}if(h<0){h+=1}else if(h>1){h-=1}}return[h*360,s*100,v*100]};convert.rgb.hwb=function(rgb){const r=rgb[0];const g=rgb[1];let b=rgb[2];const h=convert.rgb.hsl(rgb)[0];const w=1/255*Math.min(r,Math.min(g,b));b=1-1/255*Math.max(r,Math.max(g,b));return[h,w*100,b*100]};convert.rgb.cmyk=function(rgb){const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const k=Math.min(1-r,1-g,1-b);const c=(1-r-k)/(1-k)||0;const m=(1-g-k)/(1-k)||0;const y=(1-b-k)/(1-k)||0;return[c*100,m*100,y*100,k*100]};function comparativeDistance(x,y){return(x[0]-y[0])**2+(x[1]-y[1])**2+(x[2]-y[2])**2}convert.rgb.keyword=function(rgb){const reversed=reverseKeywords[rgb];if(reversed){return reversed}let currentClosestDistance=Infinity;let currentClosestKeyword;for(const keyword of Object.keys(cssKeywords)){const value=cssKeywords[keyword];const distance=comparativeDistance(rgb,value);if(distance<currentClosestDistance){currentClosestDistance=distance;currentClosestKeyword=keyword}}return currentClosestKeyword};convert.keyword.rgb=function(keyword){return cssKeywords[keyword]};convert.rgb.xyz=function(rgb){let r=rgb[0]/255;let g=rgb[1]/255;let b=rgb[2]/255;r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;g=g>.04045?((g+.055)/1.055)**2.4:g/12.92;b=b>.04045?((b+.055)/1.055)**2.4:b/12.92;const x=r*.4124+g*.3576+b*.1805;const y=r*.2126+g*.7152+b*.0722;const z=r*.0193+g*.1192+b*.9505;return[x*100,y*100,z*100]};convert.rgb.lab=function(rgb){const xyz=convert.rgb.xyz(rgb);let x=xyz[0];let y=xyz[1];let z=xyz[2];x/=95.047;y/=100;z/=108.883;x=x>.008856?x**(1/3):7.787*x+16/116;y=y>.008856?y**(1/3):7.787*y+16/116;z=z>.008856?z**(1/3):7.787*z+16/116;const l=116*y-16;const a=500*(x-y);const b=200*(y-z);return[l,a,b]};convert.hsl.rgb=function(hsl){const h=hsl[0]/360;const s=hsl[1]/100;const l=hsl[2]/100;let t2;let t3;let val;if(s===0){val=l*255;return[val,val,val]}if(l<.5){t2=l*(1+s)}else{t2=l+s-l*s}const t1=2*l-t2;const rgb=[0,0,0];for(let i=0;i<3;i++){t3=h+1/3*-(i-1);if(t3<0){t3++}if(t3>1){t3--}if(6*t3<1){val=t1+(t2-t1)*6*t3}else if(2*t3<1){val=t2}else if(3*t3<2){val=t1+(t2-t1)*(2/3-t3)*6}else{val=t1}rgb[i]=val*255}return rgb};convert.hsl.hsv=function(hsl){const h=hsl[0];let s=hsl[1]/100;let l=hsl[2]/100;let smin=s;const lmin=Math.max(l,.01);l*=2;s*=l<=1?l:2-l;smin*=lmin<=1?lmin:2-lmin;const v=(l+s)/2;const sv=l===0?2*smin/(lmin+smin):2*s/(l+s);return[h,sv*100,v*100]};convert.hsv.rgb=function(hsv){const h=hsv[0]/60;const s=hsv[1]/100;let v=hsv[2]/100;const hi=Math.floor(h)%6;const f=h-Math.floor(h);const p=255*v*(1-s);const q=255*v*(1-s*f);const t=255*v*(1-s*(1-f));v*=255;switch(hi){case 0:return[v,t,p];case 1:return[q,v,p];case 2:return[p,v,t];case 3:return[p,q,v];case 4:return[t,p,v];case 5:return[v,p,q]}};convert.hsv.hsl=function(hsv){const h=hsv[0];const s=hsv[1]/100;const v=hsv[2]/100;const vmin=Math.max(v,.01);let sl;let l;l=(2-s)*v;const lmin=(2-s)*vmin;sl=s*vmin;sl/=lmin<=1?lmin:2-lmin;sl=sl||0;l/=2;return[h,sl*100,l*100]};convert.hwb.rgb=function(hwb){const h=hwb[0]/360;let wh=hwb[1]/100;let bl=hwb[2]/100;const ratio=wh+bl;let f;if(ratio>1){wh/=ratio;bl/=ratio}const i=Math.floor(6*h);const v=1-bl;f=6*h-i;if((i&1)!==0){f=1-f}const n=wh+f*(v-wh);let r;let g;let b;switch(i){default:case 6:case 0:r=v;g=n;b=wh;break;case 1:r=n;g=v;b=wh;break;case 2:r=wh;g=v;b=n;break;case 3:r=wh;g=n;b=v;break;case 4:r=n;g=wh;b=v;break;case 5:r=v;g=wh;b=n;break}return[r*255,g*255,b*255]};convert.cmyk.rgb=function(cmyk){const c=cmyk[0]/100;const m=cmyk[1]/100;const y=cmyk[2]/100;const k=cmyk[3]/100;const r=1-Math.min(1,c*(1-k)+k);const g=1-Math.min(1,m*(1-k)+k);const b=1-Math.min(1,y*(1-k)+k);return[r*255,g*255,b*255]};convert.xyz.rgb=function(xyz){const x=xyz[0]/100;const y=xyz[1]/100;const z=xyz[2]/100;let r;let g;let b;r=x*3.2406+y*-1.5372+z*-.4986;g=x*-.9689+y*1.8758+z*.0415;b=x*.0557+y*-.204+z*1.057;r=r>.0031308?1.055*r**(1/2.4)-.055:r*12.92;g=g>.0031308?1.055*g**(1/2.4)-.055:g*12.92;b=b>.0031308?1.055*b**(1/2.4)-.055:b*12.92;r=Math.min(Math.max(0,r),1);g=Math.min(Math.max(0,g),1);b=Math.min(Math.max(0,b),1);return[r*255,g*255,b*255]};convert.xyz.lab=function(xyz){let x=xyz[0];let y=xyz[1];let z=xyz[2];x/=95.047;y/=100;z/=108.883;x=x>.008856?x**(1/3):7.787*x+16/116;y=y>.008856?y**(1/3):7.787*y+16/116;z=z>.008856?z**(1/3):7.787*z+16/116;const l=116*y-16;const a=500*(x-y);const b=200*(y-z);return[l,a,b]};convert.lab.xyz=function(lab){const l=lab[0];const a=lab[1];const b=lab[2];let x;let y;let z;y=(l+16)/116;x=a/500+y;z=y-b/200;const y2=y**3;const x2=x**3;const z2=z**3;y=y2>.008856?y2:(y-16/116)/7.787;x=x2>.008856?x2:(x-16/116)/7.787;z=z2>.008856?z2:(z-16/116)/7.787;x*=95.047;y*=100;z*=108.883;return[x,y,z]};convert.lab.lch=function(lab){const l=lab[0];const a=lab[1];const b=lab[2];let h;const hr=Math.atan2(b,a);h=hr*360/2/Math.PI;if(h<0){h+=360}const c=Math.sqrt(a*a+b*b);return[l,c,h]};convert.lch.lab=function(lch){const l=lch[0];const c=lch[1];const h=lch[2];const hr=h/360*2*Math.PI;const a=c*Math.cos(hr);const b=c*Math.sin(hr);return[l,a,b]};convert.rgb.ansi16=function(args,saturation=null){const[r,g,b]=args;let value=saturation===null?convert.rgb.hsv(args)[2]:saturation;value=Math.round(value/50);if(value===0){return 30}let ansi=30+(Math.round(b/255)<<2|Math.round(g/255)<<1|Math.round(r/255));if(value===2){ansi+=60}return ansi};convert.hsv.ansi16=function(args){return convert.rgb.ansi16(convert.hsv.rgb(args),args[2])};convert.rgb.ansi256=function(args){const r=args[0];const g=args[1];const b=args[2];if(r===g&&g===b){if(r<8){return 16}if(r>248){return 231}return Math.round((r-8)/247*24)+232}const ansi=16+36*Math.round(r/255*5)+6*Math.round(g/255*5)+Math.round(b/255*5);return ansi};convert.ansi16.rgb=function(args){let color=args%10;if(color===0||color===7){if(args>50){color+=3.5}color=color/10.5*255;return[color,color,color]}const mult=(~~(args>50)+1)*.5;const r=(color&1)*mult*255;const g=(color>>1&1)*mult*255;const b=(color>>2&1)*mult*255;return[r,g,b]};convert.ansi256.rgb=function(args){if(args>=232){const c=(args-232)*10+8;return[c,c,c]}args-=16;let rem;const r=Math.floor(args/36)/5*255;const g=Math.floor((rem=args%36)/6)/5*255;const b=rem%6/5*255;return[r,g,b]};convert.rgb.hex=function(args){const integer=((Math.round(args[0])&255)<<16)+((Math.round(args[1])&255)<<8)+(Math.round(args[2])&255);const string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert.hex.rgb=function(args){const match=args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!match){return[0,0,0]}let colorString=match[0];if(match[0].length===3){colorString=colorString.split("").map((char=>char+char)).join("")}const integer=parseInt(colorString,16);const r=integer>>16&255;const g=integer>>8&255;const b=integer&255;return[r,g,b]};convert.rgb.hcg=function(rgb){const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const max=Math.max(Math.max(r,g),b);const min=Math.min(Math.min(r,g),b);const chroma=max-min;let grayscale;let hue;if(chroma<1){grayscale=min/(1-chroma)}else{grayscale=0}if(chroma<=0){hue=0}else if(max===r){hue=(g-b)/chroma%6}else if(max===g){hue=2+(b-r)/chroma}else{hue=4+(r-g)/chroma}hue/=6;hue%=1;return[hue*360,chroma*100,grayscale*100]};convert.hsl.hcg=function(hsl){const s=hsl[1]/100;const l=hsl[2]/100;const c=l<.5?2*s*l:2*s*(1-l);let f=0;if(c<1){f=(l-.5*c)/(1-c)}return[hsl[0],c*100,f*100]};convert.hsv.hcg=function(hsv){const s=hsv[1]/100;const v=hsv[2]/100;const c=s*v;let f=0;if(c<1){f=(v-c)/(1-c)}return[hsv[0],c*100,f*100]};convert.hcg.rgb=function(hcg){const h=hcg[0]/360;const c=hcg[1]/100;const g=hcg[2]/100;if(c===0){return[g*255,g*255,g*255]}const pure=[0,0,0];const hi=h%1*6;const v=hi%1;const w=1-v;let mg=0;switch(Math.floor(hi)){case 0:pure[0]=1;pure[1]=v;pure[2]=0;break;case 1:pure[0]=w;pure[1]=1;pure[2]=0;break;case 2:pure[0]=0;pure[1]=1;pure[2]=v;break;case 3:pure[0]=0;pure[1]=w;pure[2]=1;break;case 4:pure[0]=v;pure[1]=0;pure[2]=1;break;default:pure[0]=1;pure[1]=0;pure[2]=w}mg=(1-c)*g;return[(c*pure[0]+mg)*255,(c*pure[1]+mg)*255,(c*pure[2]+mg)*255]};convert.hcg.hsv=function(hcg){const c=hcg[1]/100;const g=hcg[2]/100;const v=c+g*(1-c);let f=0;if(v>0){f=c/v}return[hcg[0],f*100,v*100]};convert.hcg.hsl=function(hcg){const c=hcg[1]/100;const g=hcg[2]/100;const l=g*(1-c)+.5*c;let s=0;if(l>0&&l<.5){s=c/(2*l)}else if(l>=.5&&l<1){s=c/(2*(1-l))}return[hcg[0],s*100,l*100]};convert.hcg.hwb=function(hcg){const c=hcg[1]/100;const g=hcg[2]/100;const v=c+g*(1-c);return[hcg[0],(v-c)*100,(1-v)*100]};convert.hwb.hcg=function(hwb){const w=hwb[1]/100;const b=hwb[2]/100;const v=1-b;const c=v-w;let g=0;if(c<1){g=(v-c)/(1-c)}return[hwb[0],c*100,g*100]};convert.apple.rgb=function(apple){return[apple[0]/65535*255,apple[1]/65535*255,apple[2]/65535*255]};convert.rgb.apple=function(rgb){return[rgb[0]/255*65535,rgb[1]/255*65535,rgb[2]/255*65535]};convert.gray.rgb=function(args){return[args[0]/100*255,args[0]/100*255,args[0]/100*255]};convert.gray.hsl=function(args){return[0,0,args[0]]};convert.gray.hsv=convert.gray.hsl;convert.gray.hwb=function(gray){return[0,100,gray[0]]};convert.gray.cmyk=function(gray){return[0,0,0,gray[0]]};convert.gray.lab=function(gray){return[gray[0],0,0]};convert.gray.hex=function(gray){const val=Math.round(gray[0]/100*255)&255;const integer=(val<<16)+(val<<8)+val;const string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert.rgb.gray=function(rgb){const val=(rgb[0]+rgb[1]+rgb[2])/3;return[val/255*100]};return conversions}var route;var hasRequiredRoute;function requireRoute(){if(hasRequiredRoute)return route;hasRequiredRoute=1;const conversions=requireConversions();function buildGraph(){const graph={};const models=Object.keys(conversions);for(let len=models.length,i=0;i<len;i++){graph[models[i]]={distance:-1,parent:null}}return graph}function deriveBFS(fromModel){const graph=buildGraph();const queue=[fromModel];graph[fromModel].distance=0;while(queue.length){const current=queue.pop();const adjacents=Object.keys(conversions[current]);for(let len=adjacents.length,i=0;i<len;i++){const adjacent=adjacents[i];const node=graph[adjacent];if(node.distance===-1){node.distance=graph[current].distance+1;node.parent=current;queue.unshift(adjacent)}}}return graph}function link(from,to){return function(args){return to(from(args))}}function wrapConversion(toModel,graph){const path=[graph[toModel].parent,toModel];let fn=conversions[graph[toModel].parent][toModel];let cur=graph[toModel].parent;while(graph[cur].parent){path.unshift(graph[cur].parent);fn=link(conversions[graph[cur].parent][cur],fn);cur=graph[cur].parent}fn.conversion=path;return fn}route=function(fromModel){const graph=deriveBFS(fromModel);const conversion={};const models=Object.keys(graph);for(let len=models.length,i=0;i<len;i++){const toModel=models[i];const node=graph[toModel];if(node.parent===null){continue}conversion[toModel]=wrapConversion(toModel,graph)}return conversion};return route}var colorConvert;var hasRequiredColorConvert;function requireColorConvert(){if(hasRequiredColorConvert)return colorConvert;hasRequiredColorConvert=1;const conversions=requireConversions();const route=requireRoute();const convert={};const models=Object.keys(conversions);function wrapRaw(fn){const wrappedFn=function(...args){const arg0=args[0];if(arg0===undefined||arg0===null){return arg0}if(arg0.length>1){args=arg0}return fn(args)};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}function wrapRounded(fn){const wrappedFn=function(...args){const arg0=args[0];if(arg0===undefined||arg0===null){return arg0}if(arg0.length>1){args=arg0}const result=fn(args);if(typeof result==="object"){for(let len=result.length,i=0;i<len;i++){result[i]=Math.round(result[i])}}return result};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}models.forEach((fromModel=>{convert[fromModel]={};Object.defineProperty(convert[fromModel],"channels",{value:conversions[fromModel].channels});Object.defineProperty(convert[fromModel],"labels",{value:conversions[fromModel].labels});const routes=route(fromModel);const routeModels=Object.keys(routes);routeModels.forEach((toModel=>{const fn=routes[toModel];convert[fromModel][toModel]=wrapRounded(fn);convert[fromModel][toModel].raw=wrapRaw(fn)}))}));colorConvert=convert;return colorConvert}ansiStyles.exports;var hasRequiredAnsiStyles;function requireAnsiStyles(){if(hasRequiredAnsiStyles)return ansiStyles.exports;hasRequiredAnsiStyles=1;(function(module){const wrapAnsi16=(fn,offset)=>(...args)=>{const code=fn(...args);return`\x1b[${code+offset}m`};const wrapAnsi256=(fn,offset)=>(...args)=>{const code=fn(...args);return`\x1b[${38+offset};5;${code}m`};const wrapAnsi16m=(fn,offset)=>(...args)=>{const rgb=fn(...args);return`\x1b[${38+offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`};const ansi2ansi=n=>n;const rgb2rgb=(r,g,b)=>[r,g,b];const setLazyProperty=(object,property,get)=>{Object.defineProperty(object,property,{get:()=>{const value=get();Object.defineProperty(object,property,{value:value,enumerable:true,configurable:true});return value},enumerable:true,configurable:true})};let colorConvert;const makeDynamicStyles=(wrap,targetSpace,identity,isBackground)=>{if(colorConvert===undefined){colorConvert=requireColorConvert()}const offset=isBackground?10:0;const styles={};for(const[sourceSpace,suite]of Object.entries(colorConvert)){const name=sourceSpace==="ansi16"?"ansi":sourceSpace;if(sourceSpace===targetSpace){styles[name]=wrap(identity,offset)}else if(typeof suite==="object"){styles[name]=wrap(suite[targetSpace],offset)}}return styles};function assembleStyles(){const codes=new Map;const styles={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};styles.color.gray=styles.color.blackBright;styles.bgColor.bgGray=styles.bgColor.bgBlackBright;styles.color.grey=styles.color.blackBright;styles.bgColor.bgGrey=styles.bgColor.bgBlackBright;for(const[groupName,group]of Object.entries(styles)){for(const[styleName,style]of Object.entries(group)){styles[styleName]={open:`\x1b[${style[0]}m`,close:`\x1b[${style[1]}m`};group[styleName]=styles[styleName];codes.set(style[0],style[1])}Object.defineProperty(styles,groupName,{value:group,enumerable:false})}Object.defineProperty(styles,"codes",{value:codes,enumerable:false});styles.color.close="\x1b[39m";styles.bgColor.close="\x1b[49m";setLazyProperty(styles.color,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,false)));setLazyProperty(styles.color,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,false)));setLazyProperty(styles.color,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,false)));setLazyProperty(styles.bgColor,"ansi",(()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,true)));setLazyProperty(styles.bgColor,"ansi256",(()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,true)));setLazyProperty(styles.bgColor,"ansi16m",(()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,true)));return styles}Object.defineProperty(module,"exports",{enumerable:true,get:assembleStyles})})(ansiStyles);return ansiStyles.exports}var hasFlag;var hasRequiredHasFlag;function requireHasFlag(){if(hasRequiredHasFlag)return hasFlag;hasRequiredHasFlag=1;hasFlag=(flag,argv=process.argv)=>{const prefix=flag.startsWith("-")?"":flag.length===1?"-":"--";const position=argv.indexOf(prefix+flag);const terminatorPosition=argv.indexOf("--");return position!==-1&&(terminatorPosition===-1||position<terminatorPosition)};return hasFlag}var supportsColor_1;var hasRequiredSupportsColor;function requireSupportsColor(){if(hasRequiredSupportsColor)return supportsColor_1;hasRequiredSupportsColor=1;const os=require$$0$5;const tty=require$$1$6;const hasFlag=requireHasFlag();const{env:env}=process;let forceColor;if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")){forceColor=0}else if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){forceColor=1}if("FORCE_COLOR"in env){if(env.FORCE_COLOR==="true"){forceColor=1}else if(env.FORCE_COLOR==="false"){forceColor=0}else{forceColor=env.FORCE_COLOR.length===0?1:Math.min(parseInt(env.FORCE_COLOR,10),3)}}function translateLevel(level){if(level===0){return false}return{level:level,hasBasic:true,has256:level>=2,has16m:level>=3}}function supportsColor(haveStream,streamIsTTY){if(forceColor===0){return 0}if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor")){return 3}if(hasFlag("color=256")){return 2}if(haveStream&&!streamIsTTY&&forceColor===undefined){return 0}const min=forceColor||0;if(env.TERM==="dumb"){return min}if(process.platform==="win32"){const osRelease=os.release().split(".");if(Number(osRelease[0])>=10&&Number(osRelease[2])>=10586){return Number(osRelease[2])>=14931?3:2}return 1}if("CI"in env){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((sign=>sign in env))||env.CI_NAME==="codeship"){return 1}return min}if("TEAMCITY_VERSION"in env){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION)?1:0}if(env.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in env){const version=parseInt((env.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env.TERM_PROGRAM){case"iTerm.app":return version>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(env.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)){return 1}if("COLORTERM"in env){return 1}return min}function getSupportLevel(stream){const level=supportsColor(stream,stream&&stream.isTTY);return translateLevel(level)}supportsColor_1={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,tty.isatty(1))),stderr:translateLevel(supportsColor(true,tty.isatty(2)))};return supportsColor_1}var util$1;var hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util$1;hasRequiredUtil=1;const stringReplaceAll=(string,substring,replacer)=>{let index=string.indexOf(substring);if(index===-1){return string}const substringLength=substring.length;let endIndex=0;let returnValue="";do{returnValue+=string.substr(endIndex,index-endIndex)+substring+replacer;endIndex=index+substringLength;index=string.indexOf(substring,endIndex)}while(index!==-1);returnValue+=string.substr(endIndex);return returnValue};const stringEncaseCRLFWithFirstIndex=(string,prefix,postfix,index)=>{let endIndex=0;let returnValue="";do{const gotCR=string[index-1]==="\r";returnValue+=string.substr(endIndex,(gotCR?index-1:index)-endIndex)+prefix+(gotCR?"\r\n":"\n")+postfix;endIndex=index+1;index=string.indexOf("\n",endIndex)}while(index!==-1);returnValue+=string.substr(endIndex);return returnValue};util$1={stringReplaceAll:stringReplaceAll,stringEncaseCRLFWithFirstIndex:stringEncaseCRLFWithFirstIndex};return util$1}var templates;var hasRequiredTemplates;function requireTemplates(){if(hasRequiredTemplates)return templates;hasRequiredTemplates=1;const TEMPLATE_REGEX=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const STYLE_REGEX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const STRING_REGEX=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const ESCAPE_REGEX=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi;const ESCAPES=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1b"],["a","\x07"]]);function unescape(c){const u=c[0]==="u";const bracket=c[1]==="{";if(u&&!bracket&&c.length===5||c[0]==="x"&&c.length===3){return String.fromCharCode(parseInt(c.slice(1),16))}if(u&&bracket){return String.fromCodePoint(parseInt(c.slice(2,-1),16))}return ESCAPES.get(c)||c}function parseArguments(name,arguments_){const results=[];const chunks=arguments_.trim().split(/\s*,\s*/g);let matches;for(const chunk of chunks){const number=Number(chunk);if(!Number.isNaN(number)){results.push(number)}else if(matches=chunk.match(STRING_REGEX)){results.push(matches[2].replace(ESCAPE_REGEX,((m,escape,character)=>escape?unescape(escape):character)))}else{throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`)}}return results}function parseStyle(style){STYLE_REGEX.lastIndex=0;const results=[];let matches;while((matches=STYLE_REGEX.exec(style))!==null){const name=matches[1];if(matches[2]){const args=parseArguments(name,matches[2]);results.push([name].concat(args))}else{results.push([name])}}return results}function buildStyle(chalk,styles){const enabled={};for(const layer of styles){for(const style of layer.styles){enabled[style[0]]=layer.inverse?null:style.slice(1)}}let current=chalk;for(const[styleName,styles]of Object.entries(enabled)){if(!Array.isArray(styles)){continue}if(!(styleName in current)){throw new Error(`Unknown Chalk style: ${styleName}`)}current=styles.length>0?current[styleName](...styles):current[styleName]}return current}templates=(chalk,temporary)=>{const styles=[];const chunks=[];let chunk=[];temporary.replace(TEMPLATE_REGEX,((m,escapeCharacter,inverse,style,close,character)=>{if(escapeCharacter){chunk.push(unescape(escapeCharacter))}else if(style){const string=chunk.join("");chunk=[];chunks.push(styles.length===0?string:buildStyle(chalk,styles)(string));styles.push({inverse:inverse,styles:parseStyle(style)})}else if(close){if(styles.length===0){throw new Error("Found extraneous } in Chalk template literal")}chunks.push(buildStyle(chalk,styles)(chunk.join("")));chunk=[];styles.pop()}else{chunk.push(character)}}));chunks.push(chunk.join(""));if(styles.length>0){const errMsg=`Chalk template literal is missing ${styles.length} closing bracket${styles.length===1?"":"s"} (\`}\`)`;throw new Error(errMsg)}return chunks.join("")};return templates}var source$1;var hasRequiredSource;function requireSource(){if(hasRequiredSource)return source$1;hasRequiredSource=1;const ansiStyles=requireAnsiStyles();const{stdout:stdoutColor,stderr:stderrColor}=requireSupportsColor();const{stringReplaceAll:stringReplaceAll,stringEncaseCRLFWithFirstIndex:stringEncaseCRLFWithFirstIndex}=requireUtil();const levelMapping=["ansi","ansi","ansi256","ansi16m"];const styles=Object.create(null);const applyOptions=(object,options={})=>{if(options.level>3||options.level<0){throw new Error("The `level` option should be an integer from 0 to 3")}const colorLevel=stdoutColor?stdoutColor.level:0;object.level=options.level===undefined?colorLevel:options.level};class ChalkClass{constructor(options){return chalkFactory(options)}}const chalkFactory=options=>{const chalk={};applyOptions(chalk,options);chalk.template=(...arguments_)=>chalkTag(chalk.template,...arguments_);Object.setPrototypeOf(chalk,Chalk.prototype);Object.setPrototypeOf(chalk.template,chalk);chalk.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")};chalk.template.Instance=ChalkClass;return chalk.template};function Chalk(options){return chalkFactory(options)}for(const[styleName,style]of Object.entries(ansiStyles)){styles[styleName]={get(){const builder=createBuilder(this,createStyler(style.open,style.close,this._styler),this._isEmpty);Object.defineProperty(this,styleName,{value:builder});return builder}}}styles.visible={get(){const builder=createBuilder(this,this._styler,true);Object.defineProperty(this,"visible",{value:builder});return builder}};const usedModels=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const model of usedModels){styles[model]={get(){const{level:level}=this;return function(...arguments_){const styler=createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_),ansiStyles.color.close,this._styler);return createBuilder(this,styler,this._isEmpty)}}}}for(const model of usedModels){const bgModel="bg"+model[0].toUpperCase()+model.slice(1);styles[bgModel]={get(){const{level:level}=this;return function(...arguments_){const styler=createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_),ansiStyles.bgColor.close,this._styler);return createBuilder(this,styler,this._isEmpty)}}}}const proto=Object.defineProperties((()=>{}),{...styles,level:{enumerable:true,get(){return this._generator.level},set(level){this._generator.level=level}}});const createStyler=(open,close,parent)=>{let openAll;let closeAll;if(parent===undefined){openAll=open;closeAll=close}else{openAll=parent.openAll+open;closeAll=close+parent.closeAll}return{open:open,close:close,openAll:openAll,closeAll:closeAll,parent:parent}};const createBuilder=(self,_styler,_isEmpty)=>{const builder=(...arguments_)=>applyStyle(builder,arguments_.length===1?""+arguments_[0]:arguments_.join(" "));builder.__proto__=proto;builder._generator=self;builder._styler=_styler;builder._isEmpty=_isEmpty;return builder};const applyStyle=(self,string)=>{if(self.level<=0||!string){return self._isEmpty?"":string}let styler=self._styler;if(styler===undefined){return string}const{openAll:openAll,closeAll:closeAll}=styler;if(string.indexOf("\x1b")!==-1){while(styler!==undefined){string=stringReplaceAll(string,styler.close,styler.open);styler=styler.parent}}const lfIndex=string.indexOf("\n");if(lfIndex!==-1){string=stringEncaseCRLFWithFirstIndex(string,closeAll,openAll,lfIndex)}return openAll+string+closeAll};let template;const chalkTag=(chalk,...strings)=>{const[firstString]=strings;if(!Array.isArray(firstString)){return strings.join(" ")}const arguments_=strings.slice(1);const parts=[firstString.raw[0]];for(let i=1;i<firstString.length;i++){parts.push(String(arguments_[i-1]).replace(/[{}\\]/g,"\\$&"),String(firstString.raw[i]))}if(template===undefined){template=requireTemplates()}return template(chalk,parts.join(""))};Object.defineProperties(Chalk.prototype,styles);const chalk=Chalk();chalk.supportsColor=stdoutColor;chalk.stderr=Chalk({level:stderrColor?stderrColor.level:0});chalk.stderr.supportsColor=stderrColor;chalk.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};source$1=chalk;return source$1}var errors={};var hasRequiredErrors;function requireErrors(){if(hasRequiredErrors)return errors;hasRequiredErrors=1;Object.defineProperty(errors,"__esModule",{value:true});errors.ShellError=void 0;class ShellError extends Error{constructor(message){super(message);this.name=`ShellError`}}errors.ShellError=ShellError;return errors}var globUtils={};var tasks={};var utils$3={};var array={};var hasRequiredArray;function requireArray(){if(hasRequiredArray)return array;hasRequiredArray=1;Object.defineProperty(array,"__esModule",{value:true});array.splitWhen=array.flatten=void 0;function flatten(items){return items.reduce(((collection,item)=>[].concat(collection,item)),[])}array.flatten=flatten;function splitWhen(items,predicate){const result=[[]];let groupIndex=0;for(const item of items){if(predicate(item)){groupIndex++;result[groupIndex]=[]}else{result[groupIndex].push(item)}}return result}array.splitWhen=splitWhen;return array}var errno={};var hasRequiredErrno;function requireErrno(){if(hasRequiredErrno)return errno;hasRequiredErrno=1;Object.defineProperty(errno,"__esModule",{value:true});errno.isEnoentCodeError=void 0;function isEnoentCodeError(error){return error.code==="ENOENT"}errno.isEnoentCodeError=isEnoentCodeError;return errno}var fs$4={};var hasRequiredFs$3;function requireFs$3(){if(hasRequiredFs$3)return fs$4;hasRequiredFs$3=1;Object.defineProperty(fs$4,"__esModule",{value:true});fs$4.createDirentFromStats=void 0;class DirentFromStats{constructor(name,stats){this.name=name;this.isBlockDevice=stats.isBlockDevice.bind(stats);this.isCharacterDevice=stats.isCharacterDevice.bind(stats);this.isDirectory=stats.isDirectory.bind(stats);this.isFIFO=stats.isFIFO.bind(stats);this.isFile=stats.isFile.bind(stats);this.isSocket=stats.isSocket.bind(stats);this.isSymbolicLink=stats.isSymbolicLink.bind(stats)}}function createDirentFromStats(name,stats){return new DirentFromStats(name,stats)}fs$4.createDirentFromStats=createDirentFromStats;return fs$4}var path$1={};var hasRequiredPath$1;function requirePath$1(){if(hasRequiredPath$1)return path$1;hasRequiredPath$1=1;Object.defineProperty(path$1,"__esModule",{value:true});path$1.removeLeadingDotSegment=path$1.escape=path$1.makeAbsolute=path$1.unixify=void 0;const path=require$$0$6;const LEADING_DOT_SEGMENT_CHARACTERS_COUNT=2;const UNESCAPED_GLOB_SYMBOLS_RE=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function unixify(filepath){return filepath.replace(/\\/g,"/")}path$1.unixify=unixify;function makeAbsolute(cwd,filepath){return path.resolve(cwd,filepath)}path$1.makeAbsolute=makeAbsolute;function escape(pattern){return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE,"\\$2")}path$1.escape=escape;function removeLeadingDotSegment(entry){if(entry.charAt(0)==="."){const secondCharactery=entry.charAt(1);if(secondCharactery==="/"||secondCharactery==="\\"){return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT)}}return entry}path$1.removeLeadingDotSegment=removeLeadingDotSegment;return path$1}var pattern={}; |
| /*! |
| * is-extglob <https://github.com/jonschlinkert/is-extglob> |
| * |
| * Copyright (c) 2014-2016, Jon Schlinkert. |
| * Licensed under the MIT License. |
| */var isExtglob;var hasRequiredIsExtglob;function requireIsExtglob(){if(hasRequiredIsExtglob)return isExtglob;hasRequiredIsExtglob=1;isExtglob=function isExtglob(str){if(typeof str!=="string"||str===""){return false}var match;while(match=/(\\).|([@?!+*]\(.*\))/g.exec(str)){if(match[2])return true;str=str.slice(match.index+match[0].length)}return false};return isExtglob} |
| /*! |
| * is-glob <https://github.com/jonschlinkert/is-glob> |
| * |
| * Copyright (c) 2014-2017, Jon Schlinkert. |
| * Released under the MIT License. |
| */var isGlob;var hasRequiredIsGlob;function requireIsGlob(){if(hasRequiredIsGlob)return isGlob;hasRequiredIsGlob=1;var isExtglob=requireIsExtglob();var chars={"{":"}","(":")","[":"]"};var strictCheck=function(str){if(str[0]==="!"){return true}var index=0;var pipeIndex=-2;var closeSquareIndex=-2;var closeCurlyIndex=-2;var closeParenIndex=-2;var backSlashIndex=-2;while(index<str.length){if(str[index]==="*"){return true}if(str[index+1]==="?"&&/[\].+)]/.test(str[index])){return true}if(closeSquareIndex!==-1&&str[index]==="["&&str[index+1]!=="]"){if(closeSquareIndex<index){closeSquareIndex=str.indexOf("]",index)}if(closeSquareIndex>index){if(backSlashIndex===-1||backSlashIndex>closeSquareIndex){return true}backSlashIndex=str.indexOf("\\",index);if(backSlashIndex===-1||backSlashIndex>closeSquareIndex){return true}}}if(closeCurlyIndex!==-1&&str[index]==="{"&&str[index+1]!=="}"){closeCurlyIndex=str.indexOf("}",index);if(closeCurlyIndex>index){backSlashIndex=str.indexOf("\\",index);if(backSlashIndex===-1||backSlashIndex>closeCurlyIndex){return true}}}if(closeParenIndex!==-1&&str[index]==="("&&str[index+1]==="?"&&/[:!=]/.test(str[index+2])&&str[index+3]!==")"){closeParenIndex=str.indexOf(")",index);if(closeParenIndex>index){backSlashIndex=str.indexOf("\\",index);if(backSlashIndex===-1||backSlashIndex>closeParenIndex){return true}}}if(pipeIndex!==-1&&str[index]==="("&&str[index+1]!=="|"){if(pipeIndex<index){pipeIndex=str.indexOf("|",index)}if(pipeIndex!==-1&&str[pipeIndex+1]!==")"){closeParenIndex=str.indexOf(")",pipeIndex);if(closeParenIndex>pipeIndex){backSlashIndex=str.indexOf("\\",pipeIndex);if(backSlashIndex===-1||backSlashIndex>closeParenIndex){return true}}}}if(str[index]==="\\"){var open=str[index+1];index+=2;var close=chars[open];if(close){var n=str.indexOf(close,index);if(n!==-1){index=n+1}}if(str[index]==="!"){return true}}else{index++}}return false};var relaxedCheck=function(str){if(str[0]==="!"){return true}var index=0;while(index<str.length){if(/[*?{}()[\]]/.test(str[index])){return true}if(str[index]==="\\"){var open=str[index+1];index+=2;var close=chars[open];if(close){var n=str.indexOf(close,index);if(n!==-1){index=n+1}}if(str[index]==="!"){return true}}else{index++}}return false};isGlob=function isGlob(str,options){if(typeof str!=="string"||str===""){return false}if(isExtglob(str)){return true}var check=strictCheck;if(options&&options.strict===false){check=relaxedCheck}return check(str)};return isGlob}var globParent;var hasRequiredGlobParent;function requireGlobParent(){if(hasRequiredGlobParent)return globParent;hasRequiredGlobParent=1;var isGlob=requireIsGlob();var pathPosixDirname=require$$0$6.posix.dirname;var isWin32=require$$0$5.platform()==="win32";var slash="/";var backslash=/\\/g;var enclosure=/[\{\[].*[\}\]]$/;var globby=/(^|[^\\])([\{\[]|\([^\)]+$)/;var escaped=/\\([\!\*\?\|\[\]\(\)\{\}])/g;globParent=function globParent(str,opts){var options=Object.assign({flipBackslashes:true},opts);if(options.flipBackslashes&&isWin32&&str.indexOf(slash)<0){str=str.replace(backslash,slash)}if(enclosure.test(str)){str+=slash}str+="a";do{str=pathPosixDirname(str)}while(isGlob(str)||globby.test(str));return str.replace(escaped,"$1")};return globParent}var utils$2={};var hasRequiredUtils$3;function requireUtils$3(){if(hasRequiredUtils$3)return utils$2;hasRequiredUtils$3=1;(function(exports){exports.isInteger=num=>{if(typeof num==="number"){return Number.isInteger(num)}if(typeof num==="string"&&num.trim()!==""){return Number.isInteger(Number(num))}return false};exports.find=(node,type)=>node.nodes.find((node=>node.type===type));exports.exceedsLimit=(min,max,step=1,limit)=>{if(limit===false)return false;if(!exports.isInteger(min)||!exports.isInteger(max))return false;return(Number(max)-Number(min))/Number(step)>=limit};exports.escapeNode=(block,n=0,type)=>{let node=block.nodes[n];if(!node)return;if(type&&node.type===type||node.type==="open"||node.type==="close"){if(node.escaped!==true){node.value="\\"+node.value;node.escaped=true}}};exports.encloseBrace=node=>{if(node.type!=="brace")return false;if(node.commas>>0+node.ranges>>0===0){node.invalid=true;return true}return false};exports.isInvalidBrace=block=>{if(block.type!=="brace")return false;if(block.invalid===true||block.dollar)return true;if(block.commas>>0+block.ranges>>0===0){block.invalid=true;return true}if(block.open!==true||block.close!==true){block.invalid=true;return true}return false};exports.isOpenOrClose=node=>{if(node.type==="open"||node.type==="close"){return true}return node.open===true||node.close===true};exports.reduce=nodes=>nodes.reduce(((acc,node)=>{if(node.type==="text")acc.push(node.value);if(node.type==="range")node.type="text";return acc}),[]);exports.flatten=(...args)=>{const result=[];const flat=arr=>{for(let i=0;i<arr.length;i++){let ele=arr[i];Array.isArray(ele)?flat(ele):ele!==void 0&&result.push(ele)}return result};flat(args);return result}})(utils$2);return utils$2}var stringify$1;var hasRequiredStringify;function requireStringify(){if(hasRequiredStringify)return stringify$1;hasRequiredStringify=1;const utils=requireUtils$3();stringify$1=(ast,options={})=>{let stringify=(node,parent={})=>{let invalidBlock=options.escapeInvalid&&utils.isInvalidBrace(parent);let invalidNode=node.invalid===true&&options.escapeInvalid===true;let output="";if(node.value){if((invalidBlock||invalidNode)&&utils.isOpenOrClose(node)){return"\\"+node.value}return node.value}if(node.value){return node.value}if(node.nodes){for(let child of node.nodes){output+=stringify(child)}}return output};return stringify(ast)};return stringify$1} |
| /*! |
| * is-number <https://github.com/jonschlinkert/is-number> |
| * |
| * Copyright (c) 2014-present, Jon Schlinkert. |
| * Released under the MIT License. |
| */var isNumber;var hasRequiredIsNumber;function requireIsNumber(){if(hasRequiredIsNumber)return isNumber;hasRequiredIsNumber=1;isNumber=function(num){if(typeof num==="number"){return num-num===0}if(typeof num==="string"&&num.trim()!==""){return Number.isFinite?Number.isFinite(+num):isFinite(+num)}return false};return isNumber} |
| /*! |
| * to-regex-range <https://github.com/micromatch/to-regex-range> |
| * |
| * Copyright (c) 2015-present, Jon Schlinkert. |
| * Released under the MIT License. |
| */var toRegexRange_1;var hasRequiredToRegexRange;function requireToRegexRange(){if(hasRequiredToRegexRange)return toRegexRange_1;hasRequiredToRegexRange=1;const isNumber=requireIsNumber();const toRegexRange=(min,max,options)=>{if(isNumber(min)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(max===void 0||min===max){return String(min)}if(isNumber(max)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let opts={relaxZeros:true,...options};if(typeof opts.strictZeros==="boolean"){opts.relaxZeros=opts.strictZeros===false}let relax=String(opts.relaxZeros);let shorthand=String(opts.shorthand);let capture=String(opts.capture);let wrap=String(opts.wrap);let cacheKey=min+":"+max+"="+relax+shorthand+capture+wrap;if(toRegexRange.cache.hasOwnProperty(cacheKey)){return toRegexRange.cache[cacheKey].result}let a=Math.min(min,max);let b=Math.max(min,max);if(Math.abs(a-b)===1){let result=min+"|"+max;if(opts.capture){return`(${result})`}if(opts.wrap===false){return result}return`(?:${result})`}let isPadded=hasPadding(min)||hasPadding(max);let state={min:min,max:max,a:a,b:b};let positives=[];let negatives=[];if(isPadded){state.isPadded=isPadded;state.maxLen=String(state.max).length}if(a<0){let newMin=b<0?Math.abs(b):1;negatives=splitToPatterns(newMin,Math.abs(a),state,opts);a=state.a=0}if(b>=0){positives=splitToPatterns(a,b,state,opts)}state.negatives=negatives;state.positives=positives;state.result=collatePatterns(negatives,positives);if(opts.capture===true){state.result=`(${state.result})`}else if(opts.wrap!==false&&positives.length+negatives.length>1){state.result=`(?:${state.result})`}toRegexRange.cache[cacheKey]=state;return state.result};function collatePatterns(neg,pos,options){let onlyNegative=filterPatterns(neg,pos,"-",false)||[];let onlyPositive=filterPatterns(pos,neg,"",false)||[];let intersected=filterPatterns(neg,pos,"-?",true)||[];let subpatterns=onlyNegative.concat(intersected).concat(onlyPositive);return subpatterns.join("|")}function splitToRanges(min,max){let nines=1;let zeros=1;let stop=countNines(min,nines);let stops=new Set([max]);while(min<=stop&&stop<=max){stops.add(stop);nines+=1;stop=countNines(min,nines)}stop=countZeros(max+1,zeros)-1;while(min<stop&&stop<=max){stops.add(stop);zeros+=1;stop=countZeros(max+1,zeros)-1}stops=[...stops];stops.sort(compare);return stops}function rangeToPattern(start,stop,options){if(start===stop){return{pattern:start,count:[],digits:0}}let zipped=zip(start,stop);let digits=zipped.length;let pattern="";let count=0;for(let i=0;i<digits;i++){let[startDigit,stopDigit]=zipped[i];if(startDigit===stopDigit){pattern+=startDigit}else if(startDigit!=="0"||stopDigit!=="9"){pattern+=toCharacterClass(startDigit,stopDigit)}else{count++}}if(count){pattern+=options.shorthand===true?"\\d":"[0-9]"}return{pattern:pattern,count:[count],digits:digits}}function splitToPatterns(min,max,tok,options){let ranges=splitToRanges(min,max);let tokens=[];let start=min;let prev;for(let i=0;i<ranges.length;i++){let max=ranges[i];let obj=rangeToPattern(String(start),String(max),options);let zeros="";if(!tok.isPadded&&prev&&prev.pattern===obj.pattern){if(prev.count.length>1){prev.count.pop()}prev.count.push(obj.count[0]);prev.string=prev.pattern+toQuantifier(prev.count);start=max+1;continue}if(tok.isPadded){zeros=padZeros(max,tok,options)}obj.string=zeros+obj.pattern+toQuantifier(obj.count);tokens.push(obj);start=max+1;prev=obj}return tokens}function filterPatterns(arr,comparison,prefix,intersection,options){let result=[];for(let ele of arr){let{string:string}=ele;if(!intersection&&!contains(comparison,"string",string)){result.push(prefix+string)}if(intersection&&contains(comparison,"string",string)){result.push(prefix+string)}}return result}function zip(a,b){let arr=[];for(let i=0;i<a.length;i++)arr.push([a[i],b[i]]);return arr}function compare(a,b){return a>b?1:b>a?-1:0}function contains(arr,key,val){return arr.some((ele=>ele[key]===val))}function countNines(min,len){return Number(String(min).slice(0,-len)+"9".repeat(len))}function countZeros(integer,zeros){return integer-integer%Math.pow(10,zeros)}function toQuantifier(digits){let[start=0,stop=""]=digits;if(stop||start>1){return`{${start+(stop?","+stop:"")}}`}return""}function toCharacterClass(a,b,options){return`[${a}${b-a===1?"":"-"}${b}]`}function hasPadding(str){return/^-?(0+)\d/.test(str)}function padZeros(value,tok,options){if(!tok.isPadded){return value}let diff=Math.abs(tok.maxLen-String(value).length);let relax=options.relaxZeros!==false;switch(diff){case 0:return"";case 1:return relax?"0?":"0";case 2:return relax?"0{0,2}":"00";default:{return relax?`0{0,${diff}}`:`0{${diff}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};toRegexRange_1=toRegexRange;return toRegexRange_1} |
| /*! |
| * fill-range <https://github.com/jonschlinkert/fill-range> |
| * |
| * Copyright (c) 2014-present, Jon Schlinkert. |
| * Licensed under the MIT License. |
| */var fillRange;var hasRequiredFillRange;function requireFillRange(){if(hasRequiredFillRange)return fillRange;hasRequiredFillRange=1;const util=require$$0$1;const toRegexRange=requireToRegexRange();const isObject=val=>val!==null&&typeof val==="object"&&!Array.isArray(val);const transform=toNumber=>value=>toNumber===true?Number(value):String(value);const isValidValue=value=>typeof value==="number"||typeof value==="string"&&value!=="";const isNumber=num=>Number.isInteger(+num);const zeros=input=>{let value=`${input}`;let index=-1;if(value[0]==="-")value=value.slice(1);if(value==="0")return false;while(value[++index]==="0");return index>0};const stringify=(start,end,options)=>{if(typeof start==="string"||typeof end==="string"){return true}return options.stringify===true};const pad=(input,maxLength,toNumber)=>{if(maxLength>0){let dash=input[0]==="-"?"-":"";if(dash)input=input.slice(1);input=dash+input.padStart(dash?maxLength-1:maxLength,"0")}if(toNumber===false){return String(input)}return input};const toMaxLen=(input,maxLength)=>{let negative=input[0]==="-"?"-":"";if(negative){input=input.slice(1);maxLength--}while(input.length<maxLength)input="0"+input;return negative?"-"+input:input};const toSequence=(parts,options)=>{parts.negatives.sort(((a,b)=>a<b?-1:a>b?1:0));parts.positives.sort(((a,b)=>a<b?-1:a>b?1:0));let prefix=options.capture?"":"?:";let positives="";let negatives="";let result;if(parts.positives.length){positives=parts.positives.join("|")}if(parts.negatives.length){negatives=`-(${prefix}${parts.negatives.join("|")})`}if(positives&&negatives){result=`${positives}|${negatives}`}else{result=positives||negatives}if(options.wrap){return`(${prefix}${result})`}return result};const toRange=(a,b,isNumbers,options)=>{if(isNumbers){return toRegexRange(a,b,{wrap:false,...options})}let start=String.fromCharCode(a);if(a===b)return start;let stop=String.fromCharCode(b);return`[${start}-${stop}]`};const toRegex=(start,end,options)=>{if(Array.isArray(start)){let wrap=options.wrap===true;let prefix=options.capture?"":"?:";return wrap?`(${prefix}${start.join("|")})`:start.join("|")}return toRegexRange(start,end,options)};const rangeError=(...args)=>new RangeError("Invalid range arguments: "+util.inspect(...args));const invalidRange=(start,end,options)=>{if(options.strictRanges===true)throw rangeError([start,end]);return[]};const invalidStep=(step,options)=>{if(options.strictRanges===true){throw new TypeError(`Expected step "${step}" to be a number`)}return[]};const fillNumbers=(start,end,step=1,options={})=>{let a=Number(start);let b=Number(end);if(!Number.isInteger(a)||!Number.isInteger(b)){if(options.strictRanges===true)throw rangeError([start,end]);return[]}if(a===0)a=0;if(b===0)b=0;let descending=a>b;let startString=String(start);let endString=String(end);let stepString=String(step);step=Math.max(Math.abs(step),1);let padded=zeros(startString)||zeros(endString)||zeros(stepString);let maxLen=padded?Math.max(startString.length,endString.length,stepString.length):0;let toNumber=padded===false&&stringify(start,end,options)===false;let format=options.transform||transform(toNumber);if(options.toRegex&&step===1){return toRange(toMaxLen(start,maxLen),toMaxLen(end,maxLen),true,options)}let parts={negatives:[],positives:[]};let push=num=>parts[num<0?"negatives":"positives"].push(Math.abs(num));let range=[];let index=0;while(descending?a>=b:a<=b){if(options.toRegex===true&&step>1){push(a)}else{range.push(pad(format(a,index),maxLen,toNumber))}a=descending?a-step:a+step;index++}if(options.toRegex===true){return step>1?toSequence(parts,options):toRegex(range,null,{wrap:false,...options})}return range};const fillLetters=(start,end,step=1,options={})=>{if(!isNumber(start)&&start.length>1||!isNumber(end)&&end.length>1){return invalidRange(start,end,options)}let format=options.transform||(val=>String.fromCharCode(val));let a=`${start}`.charCodeAt(0);let b=`${end}`.charCodeAt(0);let descending=a>b;let min=Math.min(a,b);let max=Math.max(a,b);if(options.toRegex&&step===1){return toRange(min,max,false,options)}let range=[];let index=0;while(descending?a>=b:a<=b){range.push(format(a,index));a=descending?a-step:a+step;index++}if(options.toRegex===true){return toRegex(range,null,{wrap:false,options:options})}return range};const fill=(start,end,step,options={})=>{if(end==null&&isValidValue(start)){return[start]}if(!isValidValue(start)||!isValidValue(end)){return invalidRange(start,end,options)}if(typeof step==="function"){return fill(start,end,1,{transform:step})}if(isObject(step)){return fill(start,end,0,step)}let opts={...options};if(opts.capture===true)opts.wrap=true;step=step||opts.step||1;if(!isNumber(step)){if(step!=null&&!isObject(step))return invalidStep(step,opts);return fill(start,end,1,step)}if(isNumber(start)&&isNumber(end)){return fillNumbers(start,end,step,opts)}return fillLetters(start,end,Math.max(Math.abs(step),1),opts)};fillRange=fill;return fillRange}var compile_1;var hasRequiredCompile;function requireCompile(){if(hasRequiredCompile)return compile_1;hasRequiredCompile=1;const fill=requireFillRange();const utils=requireUtils$3();const compile=(ast,options={})=>{let walk=(node,parent={})=>{let invalidBlock=utils.isInvalidBrace(parent);let invalidNode=node.invalid===true&&options.escapeInvalid===true;let invalid=invalidBlock===true||invalidNode===true;let prefix=options.escapeInvalid===true?"\\":"";let output="";if(node.isOpen===true){return prefix+node.value}if(node.isClose===true){return prefix+node.value}if(node.type==="open"){return invalid?prefix+node.value:"("}if(node.type==="close"){return invalid?prefix+node.value:")"}if(node.type==="comma"){return node.prev.type==="comma"?"":invalid?node.value:"|"}if(node.value){return node.value}if(node.nodes&&node.ranges>0){let args=utils.reduce(node.nodes);let range=fill(...args,{...options,wrap:false,toRegex:true});if(range.length!==0){return args.length>1&&range.length>1?`(${range})`:range}}if(node.nodes){for(let child of node.nodes){output+=walk(child,node)}}return output};return walk(ast)};compile_1=compile;return compile_1}var expand_1;var hasRequiredExpand;function requireExpand(){if(hasRequiredExpand)return expand_1;hasRequiredExpand=1;const fill=requireFillRange();const stringify=requireStringify();const utils=requireUtils$3();const append=(queue="",stash="",enclose=false)=>{let result=[];queue=[].concat(queue);stash=[].concat(stash);if(!stash.length)return queue;if(!queue.length){return enclose?utils.flatten(stash).map((ele=>`{${ele}}`)):stash}for(let item of queue){if(Array.isArray(item)){for(let value of item){result.push(append(value,stash,enclose))}}else{for(let ele of stash){if(enclose===true&&typeof ele==="string")ele=`{${ele}}`;result.push(Array.isArray(ele)?append(item,ele,enclose):item+ele)}}}return utils.flatten(result)};const expand=(ast,options={})=>{let rangeLimit=options.rangeLimit===void 0?1e3:options.rangeLimit;let walk=(node,parent={})=>{node.queue=[];let p=parent;let q=parent.queue;while(p.type!=="brace"&&p.type!=="root"&&p.parent){p=p.parent;q=p.queue}if(node.invalid||node.dollar){q.push(append(q.pop(),stringify(node,options)));return}if(node.type==="brace"&&node.invalid!==true&&node.nodes.length===2){q.push(append(q.pop(),["{}"]));return}if(node.nodes&&node.ranges>0){let args=utils.reduce(node.nodes);if(utils.exceedsLimit(...args,options.step,rangeLimit)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let range=fill(...args,options);if(range.length===0){range=stringify(node,options)}q.push(append(q.pop(),range));node.nodes=[];return}let enclose=utils.encloseBrace(node);let queue=node.queue;let block=node;while(block.type!=="brace"&&block.type!=="root"&&block.parent){block=block.parent;queue=block.queue}for(let i=0;i<node.nodes.length;i++){let child=node.nodes[i];if(child.type==="comma"&&node.type==="brace"){if(i===1)queue.push("");queue.push("");continue}if(child.type==="close"){q.push(append(q.pop(),queue,enclose));continue}if(child.value&&child.type!=="open"){queue.push(append(queue.pop(),child.value));continue}if(child.nodes){walk(child,node)}}return queue};return utils.flatten(walk(ast))};expand_1=expand;return expand_1}var constants$2;var hasRequiredConstants$2;function requireConstants$2(){if(hasRequiredConstants$2)return constants$2;hasRequiredConstants$2=1;constants$2={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",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:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"};return constants$2}var parse_1$2;var hasRequiredParse$2;function requireParse$2(){if(hasRequiredParse$2)return parse_1$2;hasRequiredParse$2=1;const stringify=requireStringify();const{MAX_LENGTH:MAX_LENGTH,CHAR_BACKSLASH:CHAR_BACKSLASH,CHAR_BACKTICK:CHAR_BACKTICK,CHAR_COMMA:CHAR_COMMA,CHAR_DOT:CHAR_DOT,CHAR_LEFT_PARENTHESES:CHAR_LEFT_PARENTHESES,CHAR_RIGHT_PARENTHESES:CHAR_RIGHT_PARENTHESES,CHAR_LEFT_CURLY_BRACE:CHAR_LEFT_CURLY_BRACE,CHAR_RIGHT_CURLY_BRACE:CHAR_RIGHT_CURLY_BRACE,CHAR_LEFT_SQUARE_BRACKET:CHAR_LEFT_SQUARE_BRACKET,CHAR_RIGHT_SQUARE_BRACKET:CHAR_RIGHT_SQUARE_BRACKET,CHAR_DOUBLE_QUOTE:CHAR_DOUBLE_QUOTE,CHAR_SINGLE_QUOTE:CHAR_SINGLE_QUOTE,CHAR_NO_BREAK_SPACE:CHAR_NO_BREAK_SPACE,CHAR_ZERO_WIDTH_NOBREAK_SPACE:CHAR_ZERO_WIDTH_NOBREAK_SPACE}=requireConstants$2();const parse=(input,options={})=>{if(typeof input!=="string"){throw new TypeError("Expected a string")}let opts=options||{};let max=typeof opts.maxLength==="number"?Math.min(MAX_LENGTH,opts.maxLength):MAX_LENGTH;if(input.length>max){throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`)}let ast={type:"root",input:input,nodes:[]};let stack=[ast];let block=ast;let prev=ast;let brackets=0;let length=input.length;let index=0;let depth=0;let value;const advance=()=>input[index++];const push=node=>{if(node.type==="text"&&prev.type==="dot"){prev.type="text"}if(prev&&prev.type==="text"&&node.type==="text"){prev.value+=node.value;return}block.nodes.push(node);node.parent=block;node.prev=prev;prev=node;return node};push({type:"bos"});while(index<length){block=stack[stack.length-1];value=advance();if(value===CHAR_ZERO_WIDTH_NOBREAK_SPACE||value===CHAR_NO_BREAK_SPACE){continue}if(value===CHAR_BACKSLASH){push({type:"text",value:(options.keepEscaping?value:"")+advance()});continue}if(value===CHAR_RIGHT_SQUARE_BRACKET){push({type:"text",value:"\\"+value});continue}if(value===CHAR_LEFT_SQUARE_BRACKET){brackets++;let next;while(index<length&&(next=advance())){value+=next;if(next===CHAR_LEFT_SQUARE_BRACKET){brackets++;continue}if(next===CHAR_BACKSLASH){value+=advance();continue}if(next===CHAR_RIGHT_SQUARE_BRACKET){brackets--;if(brackets===0){break}}}push({type:"text",value:value});continue}if(value===CHAR_LEFT_PARENTHESES){block=push({type:"paren",nodes:[]});stack.push(block);push({type:"text",value:value});continue}if(value===CHAR_RIGHT_PARENTHESES){if(block.type!=="paren"){push({type:"text",value:value});continue}block=stack.pop();push({type:"text",value:value});block=stack[stack.length-1];continue}if(value===CHAR_DOUBLE_QUOTE||value===CHAR_SINGLE_QUOTE||value===CHAR_BACKTICK){let open=value;let next;if(options.keepQuotes!==true){value=""}while(index<length&&(next=advance())){if(next===CHAR_BACKSLASH){value+=next+advance();continue}if(next===open){if(options.keepQuotes===true)value+=next;break}value+=next}push({type:"text",value:value});continue}if(value===CHAR_LEFT_CURLY_BRACE){depth++;let dollar=prev.value&&prev.value.slice(-1)==="$"||block.dollar===true;let brace={type:"brace",open:true,close:false,dollar:dollar,depth:depth,commas:0,ranges:0,nodes:[]};block=push(brace);stack.push(block);push({type:"open",value:value});continue}if(value===CHAR_RIGHT_CURLY_BRACE){if(block.type!=="brace"){push({type:"text",value:value});continue}let type="close";block=stack.pop();block.close=true;push({type:type,value:value});depth--;block=stack[stack.length-1];continue}if(value===CHAR_COMMA&&depth>0){if(block.ranges>0){block.ranges=0;let open=block.nodes.shift();block.nodes=[open,{type:"text",value:stringify(block)}]}push({type:"comma",value:value});block.commas++;continue}if(value===CHAR_DOT&&depth>0&&block.commas===0){let siblings=block.nodes;if(depth===0||siblings.length===0){push({type:"text",value:value});continue}if(prev.type==="dot"){block.range=[];prev.value+=value;prev.type="range";if(block.nodes.length!==3&&block.nodes.length!==5){block.invalid=true;block.ranges=0;prev.type="text";continue}block.ranges++;block.args=[];continue}if(prev.type==="range"){siblings.pop();let before=siblings[siblings.length-1];before.value+=prev.value+value;prev=before;block.ranges--;continue}push({type:"dot",value:value});continue}push({type:"text",value:value})}do{block=stack.pop();if(block.type!=="root"){block.nodes.forEach((node=>{if(!node.nodes){if(node.type==="open")node.isOpen=true;if(node.type==="close")node.isClose=true;if(!node.nodes)node.type="text";node.invalid=true}}));let parent=stack[stack.length-1];let index=parent.nodes.indexOf(block);parent.nodes.splice(index,1,...block.nodes)}}while(stack.length>0);push({type:"eos"});return ast};parse_1$2=parse;return parse_1$2}var braces_1;var hasRequiredBraces;function requireBraces(){if(hasRequiredBraces)return braces_1;hasRequiredBraces=1;const stringify=requireStringify();const compile=requireCompile();const expand=requireExpand();const parse=requireParse$2();const braces=(input,options={})=>{let output=[];if(Array.isArray(input)){for(let pattern of input){let result=braces.create(pattern,options);if(Array.isArray(result)){output.push(...result)}else{output.push(result)}}}else{output=[].concat(braces.create(input,options))}if(options&&options.expand===true&&options.nodupes===true){output=[...new Set(output)]}return output};braces.parse=(input,options={})=>parse(input,options);braces.stringify=(input,options={})=>{if(typeof input==="string"){return stringify(braces.parse(input,options),options)}return stringify(input,options)};braces.compile=(input,options={})=>{if(typeof input==="string"){input=braces.parse(input,options)}return compile(input,options)};braces.expand=(input,options={})=>{if(typeof input==="string"){input=braces.parse(input,options)}let result=expand(input,options);if(options.noempty===true){result=result.filter(Boolean)}if(options.nodupes===true){result=[...new Set(result)]}return result};braces.create=(input,options={})=>{if(input===""||input.length<3){return[input]}return options.expand!==true?braces.compile(input,options):braces.expand(input,options)};braces_1=braces;return braces_1}var utils$1={};var constants$1;var hasRequiredConstants$1;function requireConstants$1(){if(hasRequiredConstants$1)return constants$1;hasRequiredConstants$1=1;const path=require$$0$6;const WIN_SLASH="\\\\/";const WIN_NO_SLASH=`[^${WIN_SLASH}]`;const DOT_LITERAL="\\.";const PLUS_LITERAL="\\+";const QMARK_LITERAL="\\?";const SLASH_LITERAL="\\/";const ONE_CHAR="(?=.)";const QMARK="[^/]";const END_ANCHOR=`(?:${SLASH_LITERAL}|$)`;const START_ANCHOR=`(?:^|${SLASH_LITERAL})`;const DOTS_SLASH=`${DOT_LITERAL}{1,2}${END_ANCHOR}`;const NO_DOT=`(?!${DOT_LITERAL})`;const NO_DOTS=`(?!${START_ANCHOR}${DOTS_SLASH})`;const NO_DOT_SLASH=`(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;const NO_DOTS_SLASH=`(?!${DOTS_SLASH})`;const QMARK_NO_DOT=`[^.${SLASH_LITERAL}]`;const STAR=`${QMARK}*?`;const POSIX_CHARS={DOT_LITERAL:DOT_LITERAL,PLUS_LITERAL:PLUS_LITERAL,QMARK_LITERAL:QMARK_LITERAL,SLASH_LITERAL:SLASH_LITERAL,ONE_CHAR:ONE_CHAR,QMARK:QMARK,END_ANCHOR:END_ANCHOR,DOTS_SLASH:DOTS_SLASH,NO_DOT:NO_DOT,NO_DOTS:NO_DOTS,NO_DOT_SLASH:NO_DOT_SLASH,NO_DOTS_SLASH:NO_DOTS_SLASH,QMARK_NO_DOT:QMARK_NO_DOT,STAR:STAR,START_ANCHOR:START_ANCHOR};const WINDOWS_CHARS={...POSIX_CHARS,SLASH_LITERAL:`[${WIN_SLASH}]`,QMARK:WIN_NO_SLASH,STAR:`${WIN_NO_SLASH}*?`,DOTS_SLASH:`${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,NO_DOT:`(?!${DOT_LITERAL})`,NO_DOTS:`(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,NO_DOT_SLASH:`(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,NO_DOTS_SLASH:`(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,QMARK_NO_DOT:`[^.${WIN_SLASH}]`,START_ANCHOR:`(?:^|[${WIN_SLASH}])`,END_ANCHOR:`(?:[${WIN_SLASH}]|$)`};const POSIX_REGEX_SOURCE={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};constants$1={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:POSIX_REGEX_SOURCE,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:path.sep,extglobChars(chars){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${chars.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(win32){return win32===true?WINDOWS_CHARS:POSIX_CHARS}};return constants$1}var hasRequiredUtils$2;function requireUtils$2(){if(hasRequiredUtils$2)return utils$1;hasRequiredUtils$2=1;(function(exports){const path=require$$0$6;const win32=process.platform==="win32";const{REGEX_BACKSLASH:REGEX_BACKSLASH,REGEX_REMOVE_BACKSLASH:REGEX_REMOVE_BACKSLASH,REGEX_SPECIAL_CHARS:REGEX_SPECIAL_CHARS,REGEX_SPECIAL_CHARS_GLOBAL:REGEX_SPECIAL_CHARS_GLOBAL}=requireConstants$1();exports.isObject=val=>val!==null&&typeof val==="object"&&!Array.isArray(val);exports.hasRegexChars=str=>REGEX_SPECIAL_CHARS.test(str);exports.isRegexChar=str=>str.length===1&&exports.hasRegexChars(str);exports.escapeRegex=str=>str.replace(REGEX_SPECIAL_CHARS_GLOBAL,"\\$1");exports.toPosixSlashes=str=>str.replace(REGEX_BACKSLASH,"/");exports.removeBackslashes=str=>str.replace(REGEX_REMOVE_BACKSLASH,(match=>match==="\\"?"":match));exports.supportsLookbehinds=()=>{const segs=process.version.slice(1).split(".").map(Number);if(segs.length===3&&segs[0]>=9||segs[0]===8&&segs[1]>=10){return true}return false};exports.isWindows=options=>{if(options&&typeof options.windows==="boolean"){return options.windows}return win32===true||path.sep==="\\"};exports.escapeLast=(input,char,lastIdx)=>{const idx=input.lastIndexOf(char,lastIdx);if(idx===-1)return input;if(input[idx-1]==="\\")return exports.escapeLast(input,char,idx-1);return`${input.slice(0,idx)}\\${input.slice(idx)}`};exports.removePrefix=(input,state={})=>{let output=input;if(output.startsWith("./")){output=output.slice(2);state.prefix="./"}return output};exports.wrapOutput=(input,state={},options={})=>{const prepend=options.contains?"":"^";const append=options.contains?"":"$";let output=`${prepend}(?:${input})${append}`;if(state.negated===true){output=`(?:^(?!${output}).*$)`}return output}})(utils$1);return utils$1}var scan_1;var hasRequiredScan;function requireScan(){if(hasRequiredScan)return scan_1;hasRequiredScan=1;const utils=requireUtils$2();const{CHAR_ASTERISK:CHAR_ASTERISK,CHAR_AT:CHAR_AT,CHAR_BACKWARD_SLASH:CHAR_BACKWARD_SLASH,CHAR_COMMA:CHAR_COMMA,CHAR_DOT:CHAR_DOT,CHAR_EXCLAMATION_MARK:CHAR_EXCLAMATION_MARK,CHAR_FORWARD_SLASH:CHAR_FORWARD_SLASH,CHAR_LEFT_CURLY_BRACE:CHAR_LEFT_CURLY_BRACE,CHAR_LEFT_PARENTHESES:CHAR_LEFT_PARENTHESES,CHAR_LEFT_SQUARE_BRACKET:CHAR_LEFT_SQUARE_BRACKET,CHAR_PLUS:CHAR_PLUS,CHAR_QUESTION_MARK:CHAR_QUESTION_MARK,CHAR_RIGHT_CURLY_BRACE:CHAR_RIGHT_CURLY_BRACE,CHAR_RIGHT_PARENTHESES:CHAR_RIGHT_PARENTHESES,CHAR_RIGHT_SQUARE_BRACKET:CHAR_RIGHT_SQUARE_BRACKET}=requireConstants$1();const isPathSeparator=code=>code===CHAR_FORWARD_SLASH||code===CHAR_BACKWARD_SLASH;const depth=token=>{if(token.isPrefix!==true){token.depth=token.isGlobstar?Infinity:1}};const scan=(input,options)=>{const opts=options||{};const length=input.length-1;const scanToEnd=opts.parts===true||opts.scanToEnd===true;const slashes=[];const tokens=[];const parts=[];let str=input;let index=-1;let start=0;let lastIndex=0;let isBrace=false;let isBracket=false;let isGlob=false;let isExtglob=false;let isGlobstar=false;let braceEscaped=false;let backslashes=false;let negated=false;let negatedExtglob=false;let finished=false;let braces=0;let prev;let code;let token={value:"",depth:0,isGlob:false};const eos=()=>index>=length;const peek=()=>str.charCodeAt(index+1);const advance=()=>{prev=code;return str.charCodeAt(++index)};while(index<length){code=advance();let next;if(code===CHAR_BACKWARD_SLASH){backslashes=token.backslashes=true;code=advance();if(code===CHAR_LEFT_CURLY_BRACE){braceEscaped=true}continue}if(braceEscaped===true||code===CHAR_LEFT_CURLY_BRACE){braces++;while(eos()!==true&&(code=advance())){if(code===CHAR_BACKWARD_SLASH){backslashes=token.backslashes=true;advance();continue}if(code===CHAR_LEFT_CURLY_BRACE){braces++;continue}if(braceEscaped!==true&&code===CHAR_DOT&&(code=advance())===CHAR_DOT){isBrace=token.isBrace=true;isGlob=token.isGlob=true;finished=true;if(scanToEnd===true){continue}break}if(braceEscaped!==true&&code===CHAR_COMMA){isBrace=token.isBrace=true;isGlob=token.isGlob=true;finished=true;if(scanToEnd===true){continue}break}if(code===CHAR_RIGHT_CURLY_BRACE){braces--;if(braces===0){braceEscaped=false;isBrace=token.isBrace=true;finished=true;break}}}if(scanToEnd===true){continue}break}if(code===CHAR_FORWARD_SLASH){slashes.push(index);tokens.push(token);token={value:"",depth:0,isGlob:false};if(finished===true)continue;if(prev===CHAR_DOT&&index===start+1){start+=2;continue}lastIndex=index+1;continue}if(opts.noext!==true){const isExtglobChar=code===CHAR_PLUS||code===CHAR_AT||code===CHAR_ASTERISK||code===CHAR_QUESTION_MARK||code===CHAR_EXCLAMATION_MARK;if(isExtglobChar===true&&peek()===CHAR_LEFT_PARENTHESES){isGlob=token.isGlob=true;isExtglob=token.isExtglob=true;finished=true;if(code===CHAR_EXCLAMATION_MARK&&index===start){negatedExtglob=true}if(scanToEnd===true){while(eos()!==true&&(code=advance())){if(code===CHAR_BACKWARD_SLASH){backslashes=token.backslashes=true;code=advance();continue}if(code===CHAR_RIGHT_PARENTHESES){isGlob=token.isGlob=true;finished=true;break}}continue}break}}if(code===CHAR_ASTERISK){if(prev===CHAR_ASTERISK)isGlobstar=token.isGlobstar=true;isGlob=token.isGlob=true;finished=true;if(scanToEnd===true){continue}break}if(code===CHAR_QUESTION_MARK){isGlob=token.isGlob=true;finished=true;if(scanToEnd===true){continue}break}if(code===CHAR_LEFT_SQUARE_BRACKET){while(eos()!==true&&(next=advance())){if(next===CHAR_BACKWARD_SLASH){backslashes=token.backslashes=true;advance();continue}if(next===CHAR_RIGHT_SQUARE_BRACKET){isBracket=token.isBracket=true;isGlob=token.isGlob=true;finished=true;break}}if(scanToEnd===true){continue}break}if(opts.nonegate!==true&&code===CHAR_EXCLAMATION_MARK&&index===start){negated=token.negated=true;start++;continue}if(opts.noparen!==true&&code===CHAR_LEFT_PARENTHESES){isGlob=token.isGlob=true;if(scanToEnd===true){while(eos()!==true&&(code=advance())){if(code===CHAR_LEFT_PARENTHESES){backslashes=token.backslashes=true;code=advance();continue}if(code===CHAR_RIGHT_PARENTHESES){finished=true;break}}continue}break}if(isGlob===true){finished=true;if(scanToEnd===true){continue}break}}if(opts.noext===true){isExtglob=false;isGlob=false}let base=str;let prefix="";let glob="";if(start>0){prefix=str.slice(0,start);str=str.slice(start);lastIndex-=start}if(base&&isGlob===true&&lastIndex>0){base=str.slice(0,lastIndex);glob=str.slice(lastIndex)}else if(isGlob===true){base="";glob=str}else{base=str}if(base&&base!==""&&base!=="/"&&base!==str){if(isPathSeparator(base.charCodeAt(base.length-1))){base=base.slice(0,-1)}}if(opts.unescape===true){if(glob)glob=utils.removeBackslashes(glob);if(base&&backslashes===true){base=utils.removeBackslashes(base)}}const state={prefix:prefix,input:input,start:start,base:base,glob:glob,isBrace:isBrace,isBracket:isBracket,isGlob:isGlob,isExtglob:isExtglob,isGlobstar:isGlobstar,negated:negated,negatedExtglob:negatedExtglob};if(opts.tokens===true){state.maxDepth=0;if(!isPathSeparator(code)){tokens.push(token)}state.tokens=tokens}if(opts.parts===true||opts.tokens===true){let prevIndex;for(let idx=0;idx<slashes.length;idx++){const n=prevIndex?prevIndex+1:start;const i=slashes[idx];const value=input.slice(n,i);if(opts.tokens){if(idx===0&&start!==0){tokens[idx].isPrefix=true;tokens[idx].value=prefix}else{tokens[idx].value=value}depth(tokens[idx]);state.maxDepth+=tokens[idx].depth}if(idx!==0||value!==""){parts.push(value)}prevIndex=i}if(prevIndex&&prevIndex+1<input.length){const value=input.slice(prevIndex+1);parts.push(value);if(opts.tokens){tokens[tokens.length-1].value=value;depth(tokens[tokens.length-1]);state.maxDepth+=tokens[tokens.length-1].depth}}state.slashes=slashes;state.parts=parts}return state};scan_1=scan;return scan_1}var parse_1$1;var hasRequiredParse$1;function requireParse$1(){if(hasRequiredParse$1)return parse_1$1;hasRequiredParse$1=1;const constants=requireConstants$1();const utils=requireUtils$2();const{MAX_LENGTH:MAX_LENGTH,POSIX_REGEX_SOURCE:POSIX_REGEX_SOURCE,REGEX_NON_SPECIAL_CHARS:REGEX_NON_SPECIAL_CHARS,REGEX_SPECIAL_CHARS_BACKREF:REGEX_SPECIAL_CHARS_BACKREF,REPLACEMENTS:REPLACEMENTS}=constants;const expandRange=(args,options)=>{if(typeof options.expandRange==="function"){return options.expandRange(...args,options)}args.sort();const value=`[${args.join("-")}]`;try{new RegExp(value)}catch(ex){return args.map((v=>utils.escapeRegex(v))).join("..")}return value};const syntaxError=(type,char)=>`Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;const parse=(input,options)=>{if(typeof input!=="string"){throw new TypeError("Expected a string")}input=REPLACEMENTS[input]||input;const opts={...options};const max=typeof opts.maxLength==="number"?Math.min(MAX_LENGTH,opts.maxLength):MAX_LENGTH;let len=input.length;if(len>max){throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`)}const bos={type:"bos",value:"",output:opts.prepend||""};const tokens=[bos];const capture=opts.capture?"":"?:";const win32=utils.isWindows(options);const PLATFORM_CHARS=constants.globChars(win32);const EXTGLOB_CHARS=constants.extglobChars(PLATFORM_CHARS);const{DOT_LITERAL:DOT_LITERAL,PLUS_LITERAL:PLUS_LITERAL,SLASH_LITERAL:SLASH_LITERAL,ONE_CHAR:ONE_CHAR,DOTS_SLASH:DOTS_SLASH,NO_DOT:NO_DOT,NO_DOT_SLASH:NO_DOT_SLASH,NO_DOTS_SLASH:NO_DOTS_SLASH,QMARK:QMARK,QMARK_NO_DOT:QMARK_NO_DOT,STAR:STAR,START_ANCHOR:START_ANCHOR}=PLATFORM_CHARS;const globstar=opts=>`(${capture}(?:(?!${START_ANCHOR}${opts.dot?DOTS_SLASH:DOT_LITERAL}).)*?)`;const nodot=opts.dot?"":NO_DOT;const qmarkNoDot=opts.dot?QMARK:QMARK_NO_DOT;let star=opts.bash===true?globstar(opts):STAR;if(opts.capture){star=`(${star})`}if(typeof opts.noext==="boolean"){opts.noextglob=opts.noext}const state={input:input,index:-1,start:0,dot:opts.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:tokens};input=utils.removePrefix(input,state);len=input.length;const extglobs=[];const braces=[];const stack=[];let prev=bos;let value;const eos=()=>state.index===len-1;const peek=state.peek=(n=1)=>input[state.index+n];const advance=state.advance=()=>input[++state.index]||"";const remaining=()=>input.slice(state.index+1);const consume=(value="",num=0)=>{state.consumed+=value;state.index+=num};const append=token=>{state.output+=token.output!=null?token.output:token.value;consume(token.value)};const negate=()=>{let count=1;while(peek()==="!"&&(peek(2)!=="("||peek(3)==="?")){advance();state.start++;count++}if(count%2===0){return false}state.negated=true;state.start++;return true};const increment=type=>{state[type]++;stack.push(type)};const decrement=type=>{state[type]--;stack.pop()};const push=tok=>{if(prev.type==="globstar"){const isBrace=state.braces>0&&(tok.type==="comma"||tok.type==="brace");const isExtglob=tok.extglob===true||extglobs.length&&(tok.type==="pipe"||tok.type==="paren");if(tok.type!=="slash"&&tok.type!=="paren"&&!isBrace&&!isExtglob){state.output=state.output.slice(0,-prev.output.length);prev.type="star";prev.value="*";prev.output=star;state.output+=prev.output}}if(extglobs.length&&tok.type!=="paren"){extglobs[extglobs.length-1].inner+=tok.value}if(tok.value||tok.output)append(tok);if(prev&&prev.type==="text"&&tok.type==="text"){prev.value+=tok.value;prev.output=(prev.output||"")+tok.value;return}tok.prev=prev;tokens.push(tok);prev=tok};const extglobOpen=(type,value)=>{const token={...EXTGLOB_CHARS[value],conditions:1,inner:""};token.prev=prev;token.parens=state.parens;token.output=state.output;const output=(opts.capture?"(":"")+token.open;increment("parens");push({type:type,value:value,output:state.output?"":ONE_CHAR});push({type:"paren",extglob:true,value:advance(),output:output});extglobs.push(token)};const extglobClose=token=>{let output=token.close+(opts.capture?")":"");let rest;if(token.type==="negate"){let extglobStar=star;if(token.inner&&token.inner.length>1&&token.inner.includes("/")){extglobStar=globstar(opts)}if(extglobStar!==star||eos()||/^\)+$/.test(remaining())){output=token.close=`)$))${extglobStar}`}if(token.inner.includes("*")&&(rest=remaining())&&/^\.[^\\/.]+$/.test(rest)){const expression=parse(rest,{...options,fastpaths:false}).output;output=token.close=`)${expression})${extglobStar})`}if(token.prev.type==="bos"){state.negatedExtglob=true}}push({type:"paren",extglob:true,value:value,output:output});decrement("parens")};if(opts.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(input)){let backslashes=false;let output=input.replace(REGEX_SPECIAL_CHARS_BACKREF,((m,esc,chars,first,rest,index)=>{if(first==="\\"){backslashes=true;return m}if(first==="?"){if(esc){return esc+first+(rest?QMARK.repeat(rest.length):"")}if(index===0){return qmarkNoDot+(rest?QMARK.repeat(rest.length):"")}return QMARK.repeat(chars.length)}if(first==="."){return DOT_LITERAL.repeat(chars.length)}if(first==="*"){if(esc){return esc+first+(rest?star:"")}return star}return esc?m:`\\${m}`}));if(backslashes===true){if(opts.unescape===true){output=output.replace(/\\/g,"")}else{output=output.replace(/\\+/g,(m=>m.length%2===0?"\\\\":m?"\\":""))}}if(output===input&&opts.contains===true){state.output=input;return state}state.output=utils.wrapOutput(output,state,options);return state}while(!eos()){value=advance();if(value==="\0"){continue}if(value==="\\"){const next=peek();if(next==="/"&&opts.bash!==true){continue}if(next==="."||next===";"){continue}if(!next){value+="\\";push({type:"text",value:value});continue}const match=/^\\+/.exec(remaining());let slashes=0;if(match&&match[0].length>2){slashes=match[0].length;state.index+=slashes;if(slashes%2!==0){value+="\\"}}if(opts.unescape===true){value=advance()}else{value+=advance()}if(state.brackets===0){push({type:"text",value:value});continue}}if(state.brackets>0&&(value!=="]"||prev.value==="["||prev.value==="[^")){if(opts.posix!==false&&value===":"){const inner=prev.value.slice(1);if(inner.includes("[")){prev.posix=true;if(inner.includes(":")){const idx=prev.value.lastIndexOf("[");const pre=prev.value.slice(0,idx);const rest=prev.value.slice(idx+2);const posix=POSIX_REGEX_SOURCE[rest];if(posix){prev.value=pre+posix;state.backtrack=true;advance();if(!bos.output&&tokens.indexOf(prev)===1){bos.output=ONE_CHAR}continue}}}}if(value==="["&&peek()!==":"||value==="-"&&peek()==="]"){value=`\\${value}`}if(value==="]"&&(prev.value==="["||prev.value==="[^")){value=`\\${value}`}if(opts.posix===true&&value==="!"&&prev.value==="["){value="^"}prev.value+=value;append({value:value});continue}if(state.quotes===1&&value!=='"'){value=utils.escapeRegex(value);prev.value+=value;append({value:value});continue}if(value==='"'){state.quotes=state.quotes===1?0:1;if(opts.keepQuotes===true){push({type:"text",value:value})}continue}if(value==="("){increment("parens");push({type:"paren",value:value});continue}if(value===")"){if(state.parens===0&&opts.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const extglob=extglobs[extglobs.length-1];if(extglob&&state.parens===extglob.parens+1){extglobClose(extglobs.pop());continue}push({type:"paren",value:value,output:state.parens?")":"\\)"});decrement("parens");continue}if(value==="["){if(opts.nobracket===true||!remaining().includes("]")){if(opts.nobracket!==true&&opts.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}value=`\\${value}`}else{increment("brackets")}push({type:"bracket",value:value});continue}if(value==="]"){if(opts.nobracket===true||prev&&prev.type==="bracket"&&prev.value.length===1){push({type:"text",value:value,output:`\\${value}`});continue}if(state.brackets===0){if(opts.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:value,output:`\\${value}`});continue}decrement("brackets");const prevValue=prev.value.slice(1);if(prev.posix!==true&&prevValue[0]==="^"&&!prevValue.includes("/")){value=`/${value}`}prev.value+=value;append({value:value});if(opts.literalBrackets===false||utils.hasRegexChars(prevValue)){continue}const escaped=utils.escapeRegex(prev.value);state.output=state.output.slice(0,-prev.value.length);if(opts.literalBrackets===true){state.output+=escaped;prev.value=escaped;continue}prev.value=`(${capture}${escaped}|${prev.value})`;state.output+=prev.value;continue}if(value==="{"&&opts.nobrace!==true){increment("braces");const open={type:"brace",value:value,output:"(",outputIndex:state.output.length,tokensIndex:state.tokens.length};braces.push(open);push(open);continue}if(value==="}"){const brace=braces[braces.length-1];if(opts.nobrace===true||!brace){push({type:"text",value:value,output:value});continue}let output=")";if(brace.dots===true){const arr=tokens.slice();const range=[];for(let i=arr.length-1;i>=0;i--){tokens.pop();if(arr[i].type==="brace"){break}if(arr[i].type!=="dots"){range.unshift(arr[i].value)}}output=expandRange(range,opts);state.backtrack=true}if(brace.comma!==true&&brace.dots!==true){const out=state.output.slice(0,brace.outputIndex);const toks=state.tokens.slice(brace.tokensIndex);brace.value=brace.output="\\{";value=output="\\}";state.output=out;for(const t of toks){state.output+=t.output||t.value}}push({type:"brace",value:value,output:output});decrement("braces");braces.pop();continue}if(value==="|"){if(extglobs.length>0){extglobs[extglobs.length-1].conditions++}push({type:"text",value:value});continue}if(value===","){let output=value;const brace=braces[braces.length-1];if(brace&&stack[stack.length-1]==="braces"){brace.comma=true;output="|"}push({type:"comma",value:value,output:output});continue}if(value==="/"){if(prev.type==="dot"&&state.index===state.start+1){state.start=state.index+1;state.consumed="";state.output="";tokens.pop();prev=bos;continue}push({type:"slash",value:value,output:SLASH_LITERAL});continue}if(value==="."){if(state.braces>0&&prev.type==="dot"){if(prev.value===".")prev.output=DOT_LITERAL;const brace=braces[braces.length-1];prev.type="dots";prev.output+=value;prev.value+=value;brace.dots=true;continue}if(state.braces+state.parens===0&&prev.type!=="bos"&&prev.type!=="slash"){push({type:"text",value:value,output:DOT_LITERAL});continue}push({type:"dot",value:value,output:DOT_LITERAL});continue}if(value==="?"){const isGroup=prev&&prev.value==="(";if(!isGroup&&opts.noextglob!==true&&peek()==="("&&peek(2)!=="?"){extglobOpen("qmark",value);continue}if(prev&&prev.type==="paren"){const next=peek();let output=value;if(next==="<"&&!utils.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(prev.value==="("&&!/[!=<:]/.test(next)||next==="<"&&!/<([!=]|\w+>)/.test(remaining())){output=`\\${value}`}push({type:"text",value:value,output:output});continue}if(opts.dot!==true&&(prev.type==="slash"||prev.type==="bos")){push({type:"qmark",value:value,output:QMARK_NO_DOT});continue}push({type:"qmark",value:value,output:QMARK});continue}if(value==="!"){if(opts.noextglob!==true&&peek()==="("){if(peek(2)!=="?"||!/[!=<:]/.test(peek(3))){extglobOpen("negate",value);continue}}if(opts.nonegate!==true&&state.index===0){negate();continue}}if(value==="+"){if(opts.noextglob!==true&&peek()==="("&&peek(2)!=="?"){extglobOpen("plus",value);continue}if(prev&&prev.value==="("||opts.regex===false){push({type:"plus",value:value,output:PLUS_LITERAL});continue}if(prev&&(prev.type==="bracket"||prev.type==="paren"||prev.type==="brace")||state.parens>0){push({type:"plus",value:value});continue}push({type:"plus",value:PLUS_LITERAL});continue}if(value==="@"){if(opts.noextglob!==true&&peek()==="("&&peek(2)!=="?"){push({type:"at",extglob:true,value:value,output:""});continue}push({type:"text",value:value});continue}if(value!=="*"){if(value==="$"||value==="^"){value=`\\${value}`}const match=REGEX_NON_SPECIAL_CHARS.exec(remaining());if(match){value+=match[0];state.index+=match[0].length}push({type:"text",value:value});continue}if(prev&&(prev.type==="globstar"||prev.star===true)){prev.type="star";prev.star=true;prev.value+=value;prev.output=star;state.backtrack=true;state.globstar=true;consume(value);continue}let rest=remaining();if(opts.noextglob!==true&&/^\([^?]/.test(rest)){extglobOpen("star",value);continue}if(prev.type==="star"){if(opts.noglobstar===true){consume(value);continue}const prior=prev.prev;const before=prior.prev;const isStart=prior.type==="slash"||prior.type==="bos";const afterStar=before&&(before.type==="star"||before.type==="globstar");if(opts.bash===true&&(!isStart||rest[0]&&rest[0]!=="/")){push({type:"star",value:value,output:""});continue}const isBrace=state.braces>0&&(prior.type==="comma"||prior.type==="brace");const isExtglob=extglobs.length&&(prior.type==="pipe"||prior.type==="paren");if(!isStart&&prior.type!=="paren"&&!isBrace&&!isExtglob){push({type:"star",value:value,output:""});continue}while(rest.slice(0,3)==="/**"){const after=input[state.index+4];if(after&&after!=="/"){break}rest=rest.slice(3);consume("/**",3)}if(prior.type==="bos"&&eos()){prev.type="globstar";prev.value+=value;prev.output=globstar(opts);state.output=prev.output;state.globstar=true;consume(value);continue}if(prior.type==="slash"&&prior.prev.type!=="bos"&&!afterStar&&eos()){state.output=state.output.slice(0,-(prior.output+prev.output).length);prior.output=`(?:${prior.output}`;prev.type="globstar";prev.output=globstar(opts)+(opts.strictSlashes?")":"|$)");prev.value+=value;state.globstar=true;state.output+=prior.output+prev.output;consume(value);continue}if(prior.type==="slash"&&prior.prev.type!=="bos"&&rest[0]==="/"){const end=rest[1]!==void 0?"|$":"";state.output=state.output.slice(0,-(prior.output+prev.output).length);prior.output=`(?:${prior.output}`;prev.type="globstar";prev.output=`${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;prev.value+=value;state.output+=prior.output+prev.output;state.globstar=true;consume(value+advance());push({type:"slash",value:"/",output:""});continue}if(prior.type==="bos"&&rest[0]==="/"){prev.type="globstar";prev.value+=value;prev.output=`(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;state.output=prev.output;state.globstar=true;consume(value+advance());push({type:"slash",value:"/",output:""});continue}state.output=state.output.slice(0,-prev.output.length);prev.type="globstar";prev.output=globstar(opts);prev.value+=value;state.output+=prev.output;state.globstar=true;consume(value);continue}const token={type:"star",value:value,output:star};if(opts.bash===true){token.output=".*?";if(prev.type==="bos"||prev.type==="slash"){token.output=nodot+token.output}push(token);continue}if(prev&&(prev.type==="bracket"||prev.type==="paren")&&opts.regex===true){token.output=value;push(token);continue}if(state.index===state.start||prev.type==="slash"||prev.type==="dot"){if(prev.type==="dot"){state.output+=NO_DOT_SLASH;prev.output+=NO_DOT_SLASH}else if(opts.dot===true){state.output+=NO_DOTS_SLASH;prev.output+=NO_DOTS_SLASH}else{state.output+=nodot;prev.output+=nodot}if(peek()!=="*"){state.output+=ONE_CHAR;prev.output+=ONE_CHAR}}push(token)}while(state.brackets>0){if(opts.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));state.output=utils.escapeLast(state.output,"[");decrement("brackets")}while(state.parens>0){if(opts.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));state.output=utils.escapeLast(state.output,"(");decrement("parens")}while(state.braces>0){if(opts.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));state.output=utils.escapeLast(state.output,"{");decrement("braces")}if(opts.strictSlashes!==true&&(prev.type==="star"||prev.type==="bracket")){push({type:"maybe_slash",value:"",output:`${SLASH_LITERAL}?`})}if(state.backtrack===true){state.output="";for(const token of state.tokens){state.output+=token.output!=null?token.output:token.value;if(token.suffix){state.output+=token.suffix}}}return state};parse.fastpaths=(input,options)=>{const opts={...options};const max=typeof opts.maxLength==="number"?Math.min(MAX_LENGTH,opts.maxLength):MAX_LENGTH;const len=input.length;if(len>max){throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`)}input=REPLACEMENTS[input]||input;const win32=utils.isWindows(options);const{DOT_LITERAL:DOT_LITERAL,SLASH_LITERAL:SLASH_LITERAL,ONE_CHAR:ONE_CHAR,DOTS_SLASH:DOTS_SLASH,NO_DOT:NO_DOT,NO_DOTS:NO_DOTS,NO_DOTS_SLASH:NO_DOTS_SLASH,STAR:STAR,START_ANCHOR:START_ANCHOR}=constants.globChars(win32);const nodot=opts.dot?NO_DOTS:NO_DOT;const slashDot=opts.dot?NO_DOTS_SLASH:NO_DOT;const capture=opts.capture?"":"?:";const state={negated:false,prefix:""};let star=opts.bash===true?".*?":STAR;if(opts.capture){star=`(${star})`}const globstar=opts=>{if(opts.noglobstar===true)return star;return`(${capture}(?:(?!${START_ANCHOR}${opts.dot?DOTS_SLASH:DOT_LITERAL}).)*?)`};const create=str=>{switch(str){case"*":return`${nodot}${ONE_CHAR}${star}`;case".*":return`${DOT_LITERAL}${ONE_CHAR}${star}`;case"*.*":return`${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;case"*/*":return`${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;case"**":return nodot+globstar(opts);case"**/*":return`(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;case"**/*.*":return`(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;case"**/.*":return`(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;default:{const match=/^(.*?)\.(\w+)$/.exec(str);if(!match)return;const source=create(match[1]);if(!source)return;return source+DOT_LITERAL+match[2]}}};const output=utils.removePrefix(input,state);let source=create(output);if(source&&opts.strictSlashes!==true){source+=`${SLASH_LITERAL}?`}return source};parse_1$1=parse;return parse_1$1}var picomatch_1;var hasRequiredPicomatch$1;function requirePicomatch$1(){if(hasRequiredPicomatch$1)return picomatch_1;hasRequiredPicomatch$1=1;const path=require$$0$6;const scan=requireScan();const parse=requireParse$1();const utils=requireUtils$2();const constants=requireConstants$1();const isObject=val=>val&&typeof val==="object"&&!Array.isArray(val);const picomatch=(glob,options,returnState=false)=>{if(Array.isArray(glob)){const fns=glob.map((input=>picomatch(input,options,returnState)));const arrayMatcher=str=>{for(const isMatch of fns){const state=isMatch(str);if(state)return state}return false};return arrayMatcher}const isState=isObject(glob)&&glob.tokens&&glob.input;if(glob===""||typeof glob!=="string"&&!isState){throw new TypeError("Expected pattern to be a non-empty string")}const opts=options||{};const posix=utils.isWindows(options);const regex=isState?picomatch.compileRe(glob,options):picomatch.makeRe(glob,options,false,true);const state=regex.state;delete regex.state;let isIgnored=()=>false;if(opts.ignore){const ignoreOpts={...options,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(opts.ignore,ignoreOpts,returnState)}const matcher=(input,returnObject=false)=>{const{isMatch:isMatch,match:match,output:output}=picomatch.test(input,regex,options,{glob:glob,posix:posix});const result={glob:glob,state:state,regex:regex,posix:posix,input:input,output:output,match:match,isMatch:isMatch};if(typeof opts.onResult==="function"){opts.onResult(result)}if(isMatch===false){result.isMatch=false;return returnObject?result:false}if(isIgnored(input)){if(typeof opts.onIgnore==="function"){opts.onIgnore(result)}result.isMatch=false;return returnObject?result:false}if(typeof opts.onMatch==="function"){opts.onMatch(result)}return returnObject?result:true};if(returnState){matcher.state=state}return matcher};picomatch.test=(input,regex,options,{glob:glob,posix:posix}={})=>{if(typeof input!=="string"){throw new TypeError("Expected input to be a string")}if(input===""){return{isMatch:false,output:""}}const opts=options||{};const format=opts.format||(posix?utils.toPosixSlashes:null);let match=input===glob;let output=match&&format?format(input):input;if(match===false){output=format?format(input):input;match=output===glob}if(match===false||opts.capture===true){if(opts.matchBase===true||opts.basename===true){match=picomatch.matchBase(input,regex,options,posix)}else{match=regex.exec(output)}}return{isMatch:Boolean(match),match:match,output:output}};picomatch.matchBase=(input,glob,options,posix=utils.isWindows(options))=>{const regex=glob instanceof RegExp?glob:picomatch.makeRe(glob,options);return regex.test(path.basename(input))};picomatch.isMatch=(str,patterns,options)=>picomatch(patterns,options)(str);picomatch.parse=(pattern,options)=>{if(Array.isArray(pattern))return pattern.map((p=>picomatch.parse(p,options)));return parse(pattern,{...options,fastpaths:false})};picomatch.scan=(input,options)=>scan(input,options);picomatch.compileRe=(state,options,returnOutput=false,returnState=false)=>{if(returnOutput===true){return state.output}const opts=options||{};const prepend=opts.contains?"":"^";const append=opts.contains?"":"$";let source=`${prepend}(?:${state.output})${append}`;if(state&&state.negated===true){source=`^(?!${source}).*$`}const regex=picomatch.toRegex(source,options);if(returnState===true){regex.state=state}return regex};picomatch.makeRe=(input,options={},returnOutput=false,returnState=false)=>{if(!input||typeof input!=="string"){throw new TypeError("Expected a non-empty string")}let parsed={negated:false,fastpaths:true};if(options.fastpaths!==false&&(input[0]==="."||input[0]==="*")){parsed.output=parse.fastpaths(input,options)}if(!parsed.output){parsed=parse(input,options)}return picomatch.compileRe(parsed,options,returnOutput,returnState)};picomatch.toRegex=(source,options)=>{try{const opts=options||{};return new RegExp(source,opts.flags||(opts.nocase?"i":""))}catch(err){if(options&&options.debug===true)throw err;return/$^/}};picomatch.constants=constants;picomatch_1=picomatch;return picomatch_1}var picomatch;var hasRequiredPicomatch;function requirePicomatch(){if(hasRequiredPicomatch)return picomatch;hasRequiredPicomatch=1;picomatch=requirePicomatch$1();return picomatch}var micromatch_1;var hasRequiredMicromatch;function requireMicromatch(){if(hasRequiredMicromatch)return micromatch_1;hasRequiredMicromatch=1;const util=require$$0$1;const braces=requireBraces();const picomatch=requirePicomatch();const utils=requireUtils$2();const isEmptyString=val=>val===""||val==="./";const micromatch=(list,patterns,options)=>{patterns=[].concat(patterns);list=[].concat(list);let omit=new Set;let keep=new Set;let items=new Set;let negatives=0;let onResult=state=>{items.add(state.output);if(options&&options.onResult){options.onResult(state)}};for(let i=0;i<patterns.length;i++){let isMatch=picomatch(String(patterns[i]),{...options,onResult:onResult},true);let negated=isMatch.state.negated||isMatch.state.negatedExtglob;if(negated)negatives++;for(let item of list){let matched=isMatch(item,true);let match=negated?!matched.isMatch:matched.isMatch;if(!match)continue;if(negated){omit.add(matched.output)}else{omit.delete(matched.output);keep.add(matched.output)}}}let result=negatives===patterns.length?[...items]:[...keep];let matches=result.filter((item=>!omit.has(item)));if(options&&matches.length===0){if(options.failglob===true){throw new Error(`No matches found for "${patterns.join(", ")}"`)}if(options.nonull===true||options.nullglob===true){return options.unescape?patterns.map((p=>p.replace(/\\/g,""))):patterns}}return matches};micromatch.match=micromatch;micromatch.matcher=(pattern,options)=>picomatch(pattern,options);micromatch.isMatch=(str,patterns,options)=>picomatch(patterns,options)(str);micromatch.any=micromatch.isMatch;micromatch.not=(list,patterns,options={})=>{patterns=[].concat(patterns).map(String);let result=new Set;let items=[];let onResult=state=>{if(options.onResult)options.onResult(state);items.push(state.output)};let matches=new Set(micromatch(list,patterns,{...options,onResult:onResult}));for(let item of items){if(!matches.has(item)){result.add(item)}}return[...result]};micromatch.contains=(str,pattern,options)=>{if(typeof str!=="string"){throw new TypeError(`Expected a string: "${util.inspect(str)}"`)}if(Array.isArray(pattern)){return pattern.some((p=>micromatch.contains(str,p,options)))}if(typeof pattern==="string"){if(isEmptyString(str)||isEmptyString(pattern)){return false}if(str.includes(pattern)||str.startsWith("./")&&str.slice(2).includes(pattern)){return true}}return micromatch.isMatch(str,pattern,{...options,contains:true})};micromatch.matchKeys=(obj,patterns,options)=>{if(!utils.isObject(obj)){throw new TypeError("Expected the first argument to be an object")}let keys=micromatch(Object.keys(obj),patterns,options);let res={};for(let key of keys)res[key]=obj[key];return res};micromatch.some=(list,patterns,options)=>{let items=[].concat(list);for(let pattern of[].concat(patterns)){let isMatch=picomatch(String(pattern),options);if(items.some((item=>isMatch(item)))){return true}}return false};micromatch.every=(list,patterns,options)=>{let items=[].concat(list);for(let pattern of[].concat(patterns)){let isMatch=picomatch(String(pattern),options);if(!items.every((item=>isMatch(item)))){return false}}return true};micromatch.all=(str,patterns,options)=>{if(typeof str!=="string"){throw new TypeError(`Expected a string: "${util.inspect(str)}"`)}return[].concat(patterns).every((p=>picomatch(p,options)(str)))};micromatch.capture=(glob,input,options)=>{let posix=utils.isWindows(options);let regex=picomatch.makeRe(String(glob),{...options,capture:true});let match=regex.exec(posix?utils.toPosixSlashes(input):input);if(match){return match.slice(1).map((v=>v===void 0?"":v))}};micromatch.makeRe=(...args)=>picomatch.makeRe(...args);micromatch.scan=(...args)=>picomatch.scan(...args);micromatch.parse=(patterns,options)=>{let res=[];for(let pattern of[].concat(patterns||[])){for(let str of braces(String(pattern),options)){res.push(picomatch.parse(str,options))}}return res};micromatch.braces=(pattern,options)=>{if(typeof pattern!=="string")throw new TypeError("Expected a string");if(options&&options.nobrace===true||!/\{.*\}/.test(pattern)){return[pattern]}return braces(pattern,options)};micromatch.braceExpand=(pattern,options)=>{if(typeof pattern!=="string")throw new TypeError("Expected a string");return micromatch.braces(pattern,{...options,expand:true})};micromatch_1=micromatch;return micromatch_1}var hasRequiredPattern;function requirePattern(){if(hasRequiredPattern)return pattern;hasRequiredPattern=1;Object.defineProperty(pattern,"__esModule",{value:true});pattern.matchAny=pattern.convertPatternsToRe=pattern.makeRe=pattern.getPatternParts=pattern.expandBraceExpansion=pattern.expandPatternsWithBraceExpansion=pattern.isAffectDepthOfReadingPattern=pattern.endsWithSlashGlobStar=pattern.hasGlobStar=pattern.getBaseDirectory=pattern.isPatternRelatedToParentDirectory=pattern.getPatternsOutsideCurrentDirectory=pattern.getPatternsInsideCurrentDirectory=pattern.getPositivePatterns=pattern.getNegativePatterns=pattern.isPositivePattern=pattern.isNegativePattern=pattern.convertToNegativePattern=pattern.convertToPositivePattern=pattern.isDynamicPattern=pattern.isStaticPattern=void 0;const path=require$$0$6;const globParent=requireGlobParent();const micromatch=requireMicromatch();const GLOBSTAR="**";const ESCAPE_SYMBOL="\\";const COMMON_GLOB_SYMBOLS_RE=/[*?]|^!/;const REGEX_CHARACTER_CLASS_SYMBOLS_RE=/\[[^[]*]/;const REGEX_GROUP_SYMBOLS_RE=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;const GLOB_EXTENSION_SYMBOLS_RE=/[!*+?@]\([^(]*\)/;const BRACE_EXPANSION_SEPARATORS_RE=/,|\.\./;function isStaticPattern(pattern,options={}){return!isDynamicPattern(pattern,options)}pattern.isStaticPattern=isStaticPattern;function isDynamicPattern(pattern,options={}){if(pattern===""){return false}if(options.caseSensitiveMatch===false||pattern.includes(ESCAPE_SYMBOL)){return true}if(COMMON_GLOB_SYMBOLS_RE.test(pattern)||REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern)||REGEX_GROUP_SYMBOLS_RE.test(pattern)){return true}if(options.extglob!==false&&GLOB_EXTENSION_SYMBOLS_RE.test(pattern)){return true}if(options.braceExpansion!==false&&hasBraceExpansion(pattern)){return true}return false}pattern.isDynamicPattern=isDynamicPattern;function hasBraceExpansion(pattern){const openingBraceIndex=pattern.indexOf("{");if(openingBraceIndex===-1){return false}const closingBraceIndex=pattern.indexOf("}",openingBraceIndex+1);if(closingBraceIndex===-1){return false}const braceContent=pattern.slice(openingBraceIndex,closingBraceIndex);return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent)}function convertToPositivePattern(pattern){return isNegativePattern(pattern)?pattern.slice(1):pattern}pattern.convertToPositivePattern=convertToPositivePattern;function convertToNegativePattern(pattern){return"!"+pattern}pattern.convertToNegativePattern=convertToNegativePattern;function isNegativePattern(pattern){return pattern.startsWith("!")&&pattern[1]!=="("}pattern.isNegativePattern=isNegativePattern;function isPositivePattern(pattern){return!isNegativePattern(pattern)}pattern.isPositivePattern=isPositivePattern;function getNegativePatterns(patterns){return patterns.filter(isNegativePattern)}pattern.getNegativePatterns=getNegativePatterns;function getPositivePatterns(patterns){return patterns.filter(isPositivePattern)}pattern.getPositivePatterns=getPositivePatterns;function getPatternsInsideCurrentDirectory(patterns){return patterns.filter((pattern=>!isPatternRelatedToParentDirectory(pattern)))}pattern.getPatternsInsideCurrentDirectory=getPatternsInsideCurrentDirectory;function getPatternsOutsideCurrentDirectory(patterns){return patterns.filter(isPatternRelatedToParentDirectory)}pattern.getPatternsOutsideCurrentDirectory=getPatternsOutsideCurrentDirectory;function isPatternRelatedToParentDirectory(pattern){return pattern.startsWith("..")||pattern.startsWith("./..")}pattern.isPatternRelatedToParentDirectory=isPatternRelatedToParentDirectory;function getBaseDirectory(pattern){return globParent(pattern,{flipBackslashes:false})}pattern.getBaseDirectory=getBaseDirectory;function hasGlobStar(pattern){return pattern.includes(GLOBSTAR)}pattern.hasGlobStar=hasGlobStar;function endsWithSlashGlobStar(pattern){return pattern.endsWith("/"+GLOBSTAR)}pattern.endsWithSlashGlobStar=endsWithSlashGlobStar;function isAffectDepthOfReadingPattern(pattern){const basename=path.basename(pattern);return endsWithSlashGlobStar(pattern)||isStaticPattern(basename)}pattern.isAffectDepthOfReadingPattern=isAffectDepthOfReadingPattern;function expandPatternsWithBraceExpansion(patterns){return patterns.reduce(((collection,pattern)=>collection.concat(expandBraceExpansion(pattern))),[])}pattern.expandPatternsWithBraceExpansion=expandPatternsWithBraceExpansion;function expandBraceExpansion(pattern){return micromatch.braces(pattern,{expand:true,nodupes:true})}pattern.expandBraceExpansion=expandBraceExpansion;function getPatternParts(pattern,options){let{parts:parts}=micromatch.scan(pattern,Object.assign(Object.assign({},options),{parts:true}));if(parts.length===0){parts=[pattern]}if(parts[0].startsWith("/")){parts[0]=parts[0].slice(1);parts.unshift("")}return parts}pattern.getPatternParts=getPatternParts;function makeRe(pattern,options){return micromatch.makeRe(pattern,options)}pattern.makeRe=makeRe;function convertPatternsToRe(patterns,options){return patterns.map((pattern=>makeRe(pattern,options)))}pattern.convertPatternsToRe=convertPatternsToRe;function matchAny(entry,patternsRe){return patternsRe.some((patternRe=>patternRe.test(entry)))}pattern.matchAny=matchAny;return pattern}var stream$3={};var merge2_1;var hasRequiredMerge2;function requireMerge2(){if(hasRequiredMerge2)return merge2_1;hasRequiredMerge2=1;const Stream=require$$0$4;const PassThrough=Stream.PassThrough;const slice=Array.prototype.slice;merge2_1=merge2;function merge2(){const streamsQueue=[];const args=slice.call(arguments);let merging=false;let options=args[args.length-1];if(options&&!Array.isArray(options)&&options.pipe==null){args.pop()}else{options={}}const doEnd=options.end!==false;const doPipeError=options.pipeError===true;if(options.objectMode==null){options.objectMode=true}if(options.highWaterMark==null){options.highWaterMark=64*1024}const mergedStream=PassThrough(options);function addStream(){for(let i=0,len=arguments.length;i<len;i++){streamsQueue.push(pauseStreams(arguments[i],options))}mergeStream();return this}function mergeStream(){if(merging){return}merging=true;let streams=streamsQueue.shift();if(!streams){process.nextTick(endStream);return}if(!Array.isArray(streams)){streams=[streams]}let pipesCount=streams.length+1;function next(){if(--pipesCount>0){return}merging=false;mergeStream()}function pipe(stream){function onend(){stream.removeListener("merge2UnpipeEnd",onend);stream.removeListener("end",onend);if(doPipeError){stream.removeListener("error",onerror)}next()}function onerror(err){mergedStream.emit("error",err)}if(stream._readableState.endEmitted){return next()}stream.on("merge2UnpipeEnd",onend);stream.on("end",onend);if(doPipeError){stream.on("error",onerror)}stream.pipe(mergedStream,{end:false});stream.resume()}for(let i=0;i<streams.length;i++){pipe(streams[i])}next()}function endStream(){merging=false;mergedStream.emit("queueDrain");if(doEnd){mergedStream.end()}}mergedStream.setMaxListeners(0);mergedStream.add=addStream;mergedStream.on("unpipe",(function(stream){stream.emit("merge2UnpipeEnd")}));if(args.length){addStream.apply(null,args)}return mergedStream}function pauseStreams(streams,options){if(!Array.isArray(streams)){if(!streams._readableState&&streams.pipe){streams=streams.pipe(PassThrough(options))}if(!streams._readableState||!streams.pause||!streams.pipe){throw new Error("Only readable stream can be merged.")}streams.pause()}else{for(let i=0,len=streams.length;i<len;i++){streams[i]=pauseStreams(streams[i],options)}}return streams}return merge2_1}var hasRequiredStream$3;function requireStream$3(){if(hasRequiredStream$3)return stream$3;hasRequiredStream$3=1;Object.defineProperty(stream$3,"__esModule",{value:true});stream$3.merge=void 0;const merge2=requireMerge2();function merge(streams){const mergedStream=merge2(streams);streams.forEach((stream=>{stream.once("error",(error=>mergedStream.emit("error",error)))}));mergedStream.once("close",(()=>propagateCloseEventToSources(streams)));mergedStream.once("end",(()=>propagateCloseEventToSources(streams)));return mergedStream}stream$3.merge=merge;function propagateCloseEventToSources(streams){streams.forEach((stream=>stream.emit("close")))}return stream$3}var string={};var hasRequiredString;function requireString(){if(hasRequiredString)return string;hasRequiredString=1;Object.defineProperty(string,"__esModule",{value:true});string.isEmpty=string.isString=void 0;function isString(input){return typeof input==="string"}string.isString=isString;function isEmpty(input){return input===""}string.isEmpty=isEmpty;return string}var hasRequiredUtils$1;function requireUtils$1(){if(hasRequiredUtils$1)return utils$3;hasRequiredUtils$1=1;Object.defineProperty(utils$3,"__esModule",{value:true});utils$3.string=utils$3.stream=utils$3.pattern=utils$3.path=utils$3.fs=utils$3.errno=utils$3.array=void 0;const array=requireArray();utils$3.array=array;const errno=requireErrno();utils$3.errno=errno;const fs=requireFs$3();utils$3.fs=fs;const path=requirePath$1();utils$3.path=path;const pattern=requirePattern();utils$3.pattern=pattern;const stream=requireStream$3();utils$3.stream=stream;const string=requireString();utils$3.string=string;return utils$3}var hasRequiredTasks;function requireTasks(){if(hasRequiredTasks)return tasks;hasRequiredTasks=1;Object.defineProperty(tasks,"__esModule",{value:true});tasks.convertPatternGroupToTask=tasks.convertPatternGroupsToTasks=tasks.groupPatternsByBaseDirectory=tasks.getNegativePatternsAsPositive=tasks.getPositivePatterns=tasks.convertPatternsToTasks=tasks.generate=void 0;const utils=requireUtils$1();function generate(patterns,settings){const positivePatterns=getPositivePatterns(patterns);const negativePatterns=getNegativePatternsAsPositive(patterns,settings.ignore);const staticPatterns=positivePatterns.filter((pattern=>utils.pattern.isStaticPattern(pattern,settings)));const dynamicPatterns=positivePatterns.filter((pattern=>utils.pattern.isDynamicPattern(pattern,settings)));const staticTasks=convertPatternsToTasks(staticPatterns,negativePatterns,false);const dynamicTasks=convertPatternsToTasks(dynamicPatterns,negativePatterns,true);return staticTasks.concat(dynamicTasks)}tasks.generate=generate;function convertPatternsToTasks(positive,negative,dynamic){const tasks=[];const patternsOutsideCurrentDirectory=utils.pattern.getPatternsOutsideCurrentDirectory(positive);const patternsInsideCurrentDirectory=utils.pattern.getPatternsInsideCurrentDirectory(positive);const outsideCurrentDirectoryGroup=groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);const insideCurrentDirectoryGroup=groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup,negative,dynamic));if("."in insideCurrentDirectoryGroup){tasks.push(convertPatternGroupToTask(".",patternsInsideCurrentDirectory,negative,dynamic))}else{tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup,negative,dynamic))}return tasks}tasks.convertPatternsToTasks=convertPatternsToTasks;function getPositivePatterns(patterns){return utils.pattern.getPositivePatterns(patterns)}tasks.getPositivePatterns=getPositivePatterns;function getNegativePatternsAsPositive(patterns,ignore){const negative=utils.pattern.getNegativePatterns(patterns).concat(ignore);const positive=negative.map(utils.pattern.convertToPositivePattern);return positive}tasks.getNegativePatternsAsPositive=getNegativePatternsAsPositive;function groupPatternsByBaseDirectory(patterns){const group={};return patterns.reduce(((collection,pattern)=>{const base=utils.pattern.getBaseDirectory(pattern);if(base in collection){collection[base].push(pattern)}else{collection[base]=[pattern]}return collection}),group)}tasks.groupPatternsByBaseDirectory=groupPatternsByBaseDirectory;function convertPatternGroupsToTasks(positive,negative,dynamic){return Object.keys(positive).map((base=>convertPatternGroupToTask(base,positive[base],negative,dynamic)))}tasks.convertPatternGroupsToTasks=convertPatternGroupsToTasks;function convertPatternGroupToTask(base,positive,negative,dynamic){return{dynamic:dynamic,positive:positive,negative:negative,base:base,patterns:[].concat(positive,negative.map(utils.pattern.convertToNegativePattern))}}tasks.convertPatternGroupToTask=convertPatternGroupToTask;return tasks}var patterns={};var hasRequiredPatterns;function requirePatterns(){if(hasRequiredPatterns)return patterns;hasRequiredPatterns=1;Object.defineProperty(patterns,"__esModule",{value:true});patterns.removeDuplicateSlashes=patterns.transform=void 0;const DOUBLE_SLASH_RE=/(?!^)\/{2,}/g;function transform(patterns){return patterns.map((pattern=>removeDuplicateSlashes(pattern)))}patterns.transform=transform;function removeDuplicateSlashes(pattern){return pattern.replace(DOUBLE_SLASH_RE,"/")}patterns.removeDuplicateSlashes=removeDuplicateSlashes;return patterns}var async$5={};var async$4={};var out$3={};var async$3={};var async$2={};var out$2={};var async$1={};var out$1={};var async={};var hasRequiredAsync$5;function requireAsync$5(){if(hasRequiredAsync$5)return async;hasRequiredAsync$5=1;Object.defineProperty(async,"__esModule",{value:true});async.read=void 0;function read(path,settings,callback){settings.fs.lstat(path,((lstatError,lstat)=>{if(lstatError!==null){callFailureCallback(callback,lstatError);return}if(!lstat.isSymbolicLink()||!settings.followSymbolicLink){callSuccessCallback(callback,lstat);return}settings.fs.stat(path,((statError,stat)=>{if(statError!==null){if(settings.throwErrorOnBrokenSymbolicLink){callFailureCallback(callback,statError);return}callSuccessCallback(callback,lstat);return}if(settings.markSymbolicLink){stat.isSymbolicLink=()=>true}callSuccessCallback(callback,stat)}))}))}async.read=read;function callFailureCallback(callback,error){callback(error)}function callSuccessCallback(callback,result){callback(null,result)}return async}var sync$6={};var hasRequiredSync$6;function requireSync$6(){if(hasRequiredSync$6)return sync$6;hasRequiredSync$6=1;Object.defineProperty(sync$6,"__esModule",{value:true});sync$6.read=void 0;function read(path,settings){const lstat=settings.fs.lstatSync(path);if(!lstat.isSymbolicLink()||!settings.followSymbolicLink){return lstat}try{const stat=settings.fs.statSync(path);if(settings.markSymbolicLink){stat.isSymbolicLink=()=>true}return stat}catch(error){if(!settings.throwErrorOnBrokenSymbolicLink){return lstat}throw error}}sync$6.read=read;return sync$6}var settings$3={};var fs$3={};var hasRequiredFs$2;function requireFs$2(){if(hasRequiredFs$2)return fs$3;hasRequiredFs$2=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.createFileSystemAdapter=exports.FILE_SYSTEM_ADAPTER=void 0;const fs=require$$0$2;exports.FILE_SYSTEM_ADAPTER={lstat:fs.lstat,stat:fs.stat,lstatSync:fs.lstatSync,statSync:fs.statSync};function createFileSystemAdapter(fsMethods){if(fsMethods===undefined){return exports.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},exports.FILE_SYSTEM_ADAPTER),fsMethods)}exports.createFileSystemAdapter=createFileSystemAdapter})(fs$3);return fs$3}var hasRequiredSettings$3;function requireSettings$3(){if(hasRequiredSettings$3)return settings$3;hasRequiredSettings$3=1;Object.defineProperty(settings$3,"__esModule",{value:true});const fs=requireFs$2();class Settings{constructor(_options={}){this._options=_options;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=fs.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(option,value){return option!==null&&option!==void 0?option:value}}settings$3.default=Settings;return settings$3}var hasRequiredOut$3;function requireOut$3(){if(hasRequiredOut$3)return out$1;hasRequiredOut$3=1;Object.defineProperty(out$1,"__esModule",{value:true});out$1.statSync=out$1.stat=out$1.Settings=void 0;const async=requireAsync$5();const sync=requireSync$6();const settings_1=requireSettings$3();out$1.Settings=settings_1.default;function stat(path,optionsOrSettingsOrCallback,callback){if(typeof optionsOrSettingsOrCallback==="function"){async.read(path,getSettings(),optionsOrSettingsOrCallback);return}async.read(path,getSettings(optionsOrSettingsOrCallback),callback)}out$1.stat=stat;function statSync(path,optionsOrSettings){const settings=getSettings(optionsOrSettings);return sync.read(path,settings)}out$1.statSync=statSync;function getSettings(settingsOrOptions={}){if(settingsOrOptions instanceof settings_1.default){return settingsOrOptions}return new settings_1.default(settingsOrOptions)}return out$1} |
| /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var queueMicrotask_1;var hasRequiredQueueMicrotask;function requireQueueMicrotask(){if(hasRequiredQueueMicrotask)return queueMicrotask_1;hasRequiredQueueMicrotask=1;let promise;queueMicrotask_1=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:commonjsGlobal):cb=>(promise||(promise=Promise.resolve())).then(cb).catch((err=>setTimeout((()=>{throw err}),0)));return queueMicrotask_1} |
| /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var runParallel_1;var hasRequiredRunParallel;function requireRunParallel(){if(hasRequiredRunParallel)return runParallel_1;hasRequiredRunParallel=1;runParallel_1=runParallel;const queueMicrotask=requireQueueMicrotask();function runParallel(tasks,cb){let results,pending,keys;let isSync=true;if(Array.isArray(tasks)){results=[];pending=tasks.length}else{keys=Object.keys(tasks);results={};pending=keys.length}function done(err){function end(){if(cb)cb(err,results);cb=null}if(isSync)queueMicrotask(end);else end()}function each(i,err,result){results[i]=result;if(--pending===0||err){done(err)}}if(!pending){done(null)}else if(keys){keys.forEach((function(key){tasks[key]((function(err,result){each(key,err,result)}))}))}else{tasks.forEach((function(task,i){task((function(err,result){each(i,err,result)}))}))}isSync=false}return runParallel_1}var constants={};var hasRequiredConstants;function requireConstants(){if(hasRequiredConstants)return constants;hasRequiredConstants=1;Object.defineProperty(constants,"__esModule",{value:true});constants.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const NODE_PROCESS_VERSION_PARTS=process.versions.node.split(".");if(NODE_PROCESS_VERSION_PARTS[0]===undefined||NODE_PROCESS_VERSION_PARTS[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const MAJOR_VERSION=Number.parseInt(NODE_PROCESS_VERSION_PARTS[0],10);const MINOR_VERSION=Number.parseInt(NODE_PROCESS_VERSION_PARTS[1],10);const SUPPORTED_MAJOR_VERSION=10;const SUPPORTED_MINOR_VERSION=10;const IS_MATCHED_BY_MAJOR=MAJOR_VERSION>SUPPORTED_MAJOR_VERSION;const IS_MATCHED_BY_MAJOR_AND_MINOR=MAJOR_VERSION===SUPPORTED_MAJOR_VERSION&&MINOR_VERSION>=SUPPORTED_MINOR_VERSION;constants.IS_SUPPORT_READDIR_WITH_FILE_TYPES=IS_MATCHED_BY_MAJOR||IS_MATCHED_BY_MAJOR_AND_MINOR;return constants}var utils={};var fs$2={};var hasRequiredFs$1;function requireFs$1(){if(hasRequiredFs$1)return fs$2;hasRequiredFs$1=1;Object.defineProperty(fs$2,"__esModule",{value:true});fs$2.createDirentFromStats=void 0;class DirentFromStats{constructor(name,stats){this.name=name;this.isBlockDevice=stats.isBlockDevice.bind(stats);this.isCharacterDevice=stats.isCharacterDevice.bind(stats);this.isDirectory=stats.isDirectory.bind(stats);this.isFIFO=stats.isFIFO.bind(stats);this.isFile=stats.isFile.bind(stats);this.isSocket=stats.isSocket.bind(stats);this.isSymbolicLink=stats.isSymbolicLink.bind(stats)}}function createDirentFromStats(name,stats){return new DirentFromStats(name,stats)}fs$2.createDirentFromStats=createDirentFromStats;return fs$2}var hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)return utils;hasRequiredUtils=1;Object.defineProperty(utils,"__esModule",{value:true});utils.fs=void 0;const fs=requireFs$1();utils.fs=fs;return utils}var common$4={};var hasRequiredCommon$4;function requireCommon$4(){if(hasRequiredCommon$4)return common$4;hasRequiredCommon$4=1;Object.defineProperty(common$4,"__esModule",{value:true});common$4.joinPathSegments=void 0;function joinPathSegments(a,b,separator){if(a.endsWith(separator)){return a+b}return a+separator+b}common$4.joinPathSegments=joinPathSegments;return common$4}var hasRequiredAsync$4;function requireAsync$4(){if(hasRequiredAsync$4)return async$1;hasRequiredAsync$4=1;Object.defineProperty(async$1,"__esModule",{value:true});async$1.readdir=async$1.readdirWithFileTypes=async$1.read=void 0;const fsStat=requireOut$3();const rpl=requireRunParallel();const constants_1=requireConstants();const utils=requireUtils();const common=requireCommon$4();function read(directory,settings,callback){if(!settings.stats&&constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(directory,settings,callback);return}readdir(directory,settings,callback)}async$1.read=read;function readdirWithFileTypes(directory,settings,callback){settings.fs.readdir(directory,{withFileTypes:true},((readdirError,dirents)=>{if(readdirError!==null){callFailureCallback(callback,readdirError);return}const entries=dirents.map((dirent=>({dirent:dirent,name:dirent.name,path:common.joinPathSegments(directory,dirent.name,settings.pathSegmentSeparator)})));if(!settings.followSymbolicLinks){callSuccessCallback(callback,entries);return}const tasks=entries.map((entry=>makeRplTaskEntry(entry,settings)));rpl(tasks,((rplError,rplEntries)=>{if(rplError!==null){callFailureCallback(callback,rplError);return}callSuccessCallback(callback,rplEntries)}))}))}async$1.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(entry,settings){return done=>{if(!entry.dirent.isSymbolicLink()){done(null,entry);return}settings.fs.stat(entry.path,((statError,stats)=>{if(statError!==null){if(settings.throwErrorOnBrokenSymbolicLink){done(statError);return}done(null,entry);return}entry.dirent=utils.fs.createDirentFromStats(entry.name,stats);done(null,entry)}))}}function readdir(directory,settings,callback){settings.fs.readdir(directory,((readdirError,names)=>{if(readdirError!==null){callFailureCallback(callback,readdirError);return}const tasks=names.map((name=>{const path=common.joinPathSegments(directory,name,settings.pathSegmentSeparator);return done=>{fsStat.stat(path,settings.fsStatSettings,((error,stats)=>{if(error!==null){done(error);return}const entry={name:name,path:path,dirent:utils.fs.createDirentFromStats(name,stats)};if(settings.stats){entry.stats=stats}done(null,entry)}))}}));rpl(tasks,((rplError,entries)=>{if(rplError!==null){callFailureCallback(callback,rplError);return}callSuccessCallback(callback,entries)}))}))}async$1.readdir=readdir;function callFailureCallback(callback,error){callback(error)}function callSuccessCallback(callback,result){callback(null,result)}return async$1}var sync$5={};var hasRequiredSync$5;function requireSync$5(){if(hasRequiredSync$5)return sync$5;hasRequiredSync$5=1;Object.defineProperty(sync$5,"__esModule",{value:true});sync$5.readdir=sync$5.readdirWithFileTypes=sync$5.read=void 0;const fsStat=requireOut$3();const constants_1=requireConstants();const utils=requireUtils();const common=requireCommon$4();function read(directory,settings){if(!settings.stats&&constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(directory,settings)}return readdir(directory,settings)}sync$5.read=read;function readdirWithFileTypes(directory,settings){const dirents=settings.fs.readdirSync(directory,{withFileTypes:true});return dirents.map((dirent=>{const entry={dirent:dirent,name:dirent.name,path:common.joinPathSegments(directory,dirent.name,settings.pathSegmentSeparator)};if(entry.dirent.isSymbolicLink()&&settings.followSymbolicLinks){try{const stats=settings.fs.statSync(entry.path);entry.dirent=utils.fs.createDirentFromStats(entry.name,stats)}catch(error){if(settings.throwErrorOnBrokenSymbolicLink){throw error}}}return entry}))}sync$5.readdirWithFileTypes=readdirWithFileTypes;function readdir(directory,settings){const names=settings.fs.readdirSync(directory);return names.map((name=>{const entryPath=common.joinPathSegments(directory,name,settings.pathSegmentSeparator);const stats=fsStat.statSync(entryPath,settings.fsStatSettings);const entry={name:name,path:entryPath,dirent:utils.fs.createDirentFromStats(name,stats)};if(settings.stats){entry.stats=stats}return entry}))}sync$5.readdir=readdir;return sync$5}var settings$2={};var fs$1={};var hasRequiredFs;function requireFs(){if(hasRequiredFs)return fs$1;hasRequiredFs=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.createFileSystemAdapter=exports.FILE_SYSTEM_ADAPTER=void 0;const fs=require$$0$2;exports.FILE_SYSTEM_ADAPTER={lstat:fs.lstat,stat:fs.stat,lstatSync:fs.lstatSync,statSync:fs.statSync,readdir:fs.readdir,readdirSync:fs.readdirSync};function createFileSystemAdapter(fsMethods){if(fsMethods===undefined){return exports.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},exports.FILE_SYSTEM_ADAPTER),fsMethods)}exports.createFileSystemAdapter=createFileSystemAdapter})(fs$1);return fs$1}var hasRequiredSettings$2;function requireSettings$2(){if(hasRequiredSettings$2)return settings$2;hasRequiredSettings$2=1;Object.defineProperty(settings$2,"__esModule",{value:true});const path=require$$0$6;const fsStat=requireOut$3();const fs=requireFs();class Settings{constructor(_options={}){this._options=_options;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=fs.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,path.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new fsStat.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(option,value){return option!==null&&option!==void 0?option:value}}settings$2.default=Settings;return settings$2}var hasRequiredOut$2;function requireOut$2(){if(hasRequiredOut$2)return out$2;hasRequiredOut$2=1;Object.defineProperty(out$2,"__esModule",{value:true});out$2.Settings=out$2.scandirSync=out$2.scandir=void 0;const async=requireAsync$4();const sync=requireSync$5();const settings_1=requireSettings$2();out$2.Settings=settings_1.default;function scandir(path,optionsOrSettingsOrCallback,callback){if(typeof optionsOrSettingsOrCallback==="function"){async.read(path,getSettings(),optionsOrSettingsOrCallback);return}async.read(path,getSettings(optionsOrSettingsOrCallback),callback)}out$2.scandir=scandir;function scandirSync(path,optionsOrSettings){const settings=getSettings(optionsOrSettings);return sync.read(path,settings)}out$2.scandirSync=scandirSync;function getSettings(settingsOrOptions={}){if(settingsOrOptions instanceof settings_1.default){return settingsOrOptions}return new settings_1.default(settingsOrOptions)}return out$2}var queue={exports:{}};var reusify_1;var hasRequiredReusify;function requireReusify(){if(hasRequiredReusify)return reusify_1;hasRequiredReusify=1;function reusify(Constructor){var head=new Constructor;var tail=head;function get(){var current=head;if(current.next){head=current.next}else{head=new Constructor;tail=head}current.next=null;return current}function release(obj){tail.next=obj;tail=obj}return{get:get,release:release}}reusify_1=reusify;return reusify_1}var hasRequiredQueue;function requireQueue(){if(hasRequiredQueue)return queue.exports;hasRequiredQueue=1;var reusify=requireReusify();function fastqueue(context,worker,concurrency){if(typeof context==="function"){concurrency=worker;worker=context;context=null}if(concurrency<1){throw new Error("fastqueue concurrency must be greater than 1")}var cache=reusify(Task);var queueHead=null;var queueTail=null;var _running=0;var errorHandler=null;var self={push:push,drain:noop,saturated:noop,pause:pause,paused:false,concurrency:concurrency,running:running,resume:resume,idle:idle,length:length,getQueue:getQueue,unshift:unshift,empty:noop,kill:kill,killAndDrain:killAndDrain,error:error};return self;function running(){return _running}function pause(){self.paused=true}function length(){var current=queueHead;var counter=0;while(current){current=current.next;counter++}return counter}function getQueue(){var current=queueHead;var tasks=[];while(current){tasks.push(current.value);current=current.next}return tasks}function resume(){if(!self.paused)return;self.paused=false;for(var i=0;i<self.concurrency;i++){_running++;release()}}function idle(){return _running===0&&self.length()===0}function push(value,done){var current=cache.get();current.context=context;current.release=release;current.value=value;current.callback=done||noop;current.errorHandler=errorHandler;if(_running===self.concurrency||self.paused){if(queueTail){queueTail.next=current;queueTail=current}else{queueHead=current;queueTail=current;self.saturated()}}else{_running++;worker.call(context,current.value,current.worked)}}function unshift(value,done){var current=cache.get();current.context=context;current.release=release;current.value=value;current.callback=done||noop;if(_running===self.concurrency||self.paused){if(queueHead){current.next=queueHead;queueHead=current}else{queueHead=current;queueTail=current;self.saturated()}}else{_running++;worker.call(context,current.value,current.worked)}}function release(holder){if(holder){cache.release(holder)}var next=queueHead;if(next){if(!self.paused){if(queueTail===queueHead){queueTail=null}queueHead=next.next;next.next=null;worker.call(context,next.value,next.worked);if(queueTail===null){self.empty()}}else{_running--}}else if(--_running===0){self.drain()}}function kill(){queueHead=null;queueTail=null;self.drain=noop}function killAndDrain(){queueHead=null;queueTail=null;self.drain();self.drain=noop}function error(handler){errorHandler=handler}}function noop(){}function Task(){this.value=null;this.callback=noop;this.next=null;this.release=noop;this.context=null;this.errorHandler=null;var self=this;this.worked=function worked(err,result){var callback=self.callback;var errorHandler=self.errorHandler;var val=self.value;self.value=null;self.callback=noop;if(self.errorHandler){errorHandler(err,val)}callback.call(self.context,err,result);self.release(self)}}function queueAsPromised(context,worker,concurrency){if(typeof context==="function"){concurrency=worker;worker=context;context=null}function asyncWrapper(arg,cb){worker.call(this,arg).then((function(res){cb(null,res)}),cb)}var queue=fastqueue(context,asyncWrapper,concurrency);var pushCb=queue.push;var unshiftCb=queue.unshift;queue.push=push;queue.unshift=unshift;queue.drained=drained;return queue;function push(value){var p=new Promise((function(resolve,reject){pushCb(value,(function(err,result){if(err){reject(err);return}resolve(result)}))}));p.catch(noop);return p}function unshift(value){var p=new Promise((function(resolve,reject){unshiftCb(value,(function(err,result){if(err){reject(err);return}resolve(result)}))}));p.catch(noop);return p}function drained(){if(queue.idle()){return new Promise((function(resolve){resolve()}))}var previousDrain=queue.drain;var p=new Promise((function(resolve){queue.drain=function(){previousDrain();resolve()}}));return p}}queue.exports=fastqueue;queue.exports.promise=queueAsPromised;return queue.exports}var common$3={};var hasRequiredCommon$3;function requireCommon$3(){if(hasRequiredCommon$3)return common$3;hasRequiredCommon$3=1;Object.defineProperty(common$3,"__esModule",{value:true});common$3.joinPathSegments=common$3.replacePathSegmentSeparator=common$3.isAppliedFilter=common$3.isFatalError=void 0;function isFatalError(settings,error){if(settings.errorFilter===null){return true}return!settings.errorFilter(error)}common$3.isFatalError=isFatalError;function isAppliedFilter(filter,value){return filter===null||filter(value)}common$3.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(filepath,separator){return filepath.split(/[/\\]/).join(separator)}common$3.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(a,b,separator){if(a===""){return b}if(a.endsWith(separator)){return a+b}return a+separator+b}common$3.joinPathSegments=joinPathSegments;return common$3}var reader$1={};var hasRequiredReader$1;function requireReader$1(){if(hasRequiredReader$1)return reader$1;hasRequiredReader$1=1;Object.defineProperty(reader$1,"__esModule",{value:true});const common=requireCommon$3();class Reader{constructor(_root,_settings){this._root=_root;this._settings=_settings;this._root=common.replacePathSegmentSeparator(_root,_settings.pathSegmentSeparator)}}reader$1.default=Reader;return reader$1}var hasRequiredAsync$3;function requireAsync$3(){if(hasRequiredAsync$3)return async$2;hasRequiredAsync$3=1;Object.defineProperty(async$2,"__esModule",{value:true});const events_1=require$$2$1;const fsScandir=requireOut$2();const fastq=requireQueue();const common=requireCommon$3();const reader_1=requireReader$1();class AsyncReader extends reader_1.default{constructor(_root,_settings){super(_root,_settings);this._settings=_settings;this._scandir=fsScandir.scandir;this._emitter=new events_1.EventEmitter;this._queue=fastq(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(callback){this._emitter.on("entry",callback)}onError(callback){this._emitter.once("error",callback)}onEnd(callback){this._emitter.once("end",callback)}_pushToQueue(directory,base){const queueItem={directory:directory,base:base};this._queue.push(queueItem,(error=>{if(error!==null){this._handleError(error)}}))}_worker(item,done){this._scandir(item.directory,this._settings.fsScandirSettings,((error,entries)=>{if(error!==null){done(error,undefined);return}for(const entry of entries){this._handleEntry(entry,item.base)}done(null,undefined)}))}_handleError(error){if(this._isDestroyed||!common.isFatalError(this._settings,error)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",error)}_handleEntry(entry,base){if(this._isDestroyed||this._isFatalError){return}const fullpath=entry.path;if(base!==undefined){entry.path=common.joinPathSegments(base,entry.name,this._settings.pathSegmentSeparator)}if(common.isAppliedFilter(this._settings.entryFilter,entry)){this._emitEntry(entry)}if(entry.dirent.isDirectory()&&common.isAppliedFilter(this._settings.deepFilter,entry)){this._pushToQueue(fullpath,base===undefined?undefined:entry.path)}}_emitEntry(entry){this._emitter.emit("entry",entry)}}async$2.default=AsyncReader;return async$2}var hasRequiredAsync$2;function requireAsync$2(){if(hasRequiredAsync$2)return async$3;hasRequiredAsync$2=1;Object.defineProperty(async$3,"__esModule",{value:true});const async_1=requireAsync$3();class AsyncProvider{constructor(_root,_settings){this._root=_root;this._settings=_settings;this._reader=new async_1.default(this._root,this._settings);this._storage=[]}read(callback){this._reader.onError((error=>{callFailureCallback(callback,error)}));this._reader.onEntry((entry=>{this._storage.push(entry)}));this._reader.onEnd((()=>{callSuccessCallback(callback,this._storage)}));this._reader.read()}}async$3.default=AsyncProvider;function callFailureCallback(callback,error){callback(error)}function callSuccessCallback(callback,entries){callback(null,entries)}return async$3}var stream$2={};var hasRequiredStream$2;function requireStream$2(){if(hasRequiredStream$2)return stream$2;hasRequiredStream$2=1;Object.defineProperty(stream$2,"__esModule",{value:true});const stream_1=require$$0$4;const async_1=requireAsync$3();class StreamProvider{constructor(_root,_settings){this._root=_root;this._settings=_settings;this._reader=new async_1.default(this._root,this._settings);this._stream=new stream_1.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((error=>{this._stream.emit("error",error)}));this._reader.onEntry((entry=>{this._stream.push(entry)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}stream$2.default=StreamProvider;return stream$2}var sync$4={};var sync$3={};var hasRequiredSync$4;function requireSync$4(){if(hasRequiredSync$4)return sync$3;hasRequiredSync$4=1;Object.defineProperty(sync$3,"__esModule",{value:true});const fsScandir=requireOut$2();const common=requireCommon$3();const reader_1=requireReader$1();class SyncReader extends reader_1.default{constructor(){super(...arguments);this._scandir=fsScandir.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(directory,base){this._queue.add({directory:directory,base:base})}_handleQueue(){for(const item of this._queue.values()){this._handleDirectory(item.directory,item.base)}}_handleDirectory(directory,base){try{const entries=this._scandir(directory,this._settings.fsScandirSettings);for(const entry of entries){this._handleEntry(entry,base)}}catch(error){this._handleError(error)}}_handleError(error){if(!common.isFatalError(this._settings,error)){return}throw error}_handleEntry(entry,base){const fullpath=entry.path;if(base!==undefined){entry.path=common.joinPathSegments(base,entry.name,this._settings.pathSegmentSeparator)}if(common.isAppliedFilter(this._settings.entryFilter,entry)){this._pushToStorage(entry)}if(entry.dirent.isDirectory()&&common.isAppliedFilter(this._settings.deepFilter,entry)){this._pushToQueue(fullpath,base===undefined?undefined:entry.path)}}_pushToStorage(entry){this._storage.push(entry)}}sync$3.default=SyncReader;return sync$3}var hasRequiredSync$3;function requireSync$3(){if(hasRequiredSync$3)return sync$4;hasRequiredSync$3=1;Object.defineProperty(sync$4,"__esModule",{value:true});const sync_1=requireSync$4();class SyncProvider{constructor(_root,_settings){this._root=_root;this._settings=_settings;this._reader=new sync_1.default(this._root,this._settings)}read(){return this._reader.read()}}sync$4.default=SyncProvider;return sync$4}var settings$1={};var hasRequiredSettings$1;function requireSettings$1(){if(hasRequiredSettings$1)return settings$1;hasRequiredSettings$1=1;Object.defineProperty(settings$1,"__esModule",{value:true});const path=require$$0$6;const fsScandir=requireOut$2();class Settings{constructor(_options={}){this._options=_options;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,path.sep);this.fsScandirSettings=new fsScandir.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(option,value){return option!==null&&option!==void 0?option:value}}settings$1.default=Settings;return settings$1}var hasRequiredOut$1;function requireOut$1(){if(hasRequiredOut$1)return out$3;hasRequiredOut$1=1;Object.defineProperty(out$3,"__esModule",{value:true});out$3.Settings=out$3.walkStream=out$3.walkSync=out$3.walk=void 0;const async_1=requireAsync$2();const stream_1=requireStream$2();const sync_1=requireSync$3();const settings_1=requireSettings$1();out$3.Settings=settings_1.default;function walk(directory,optionsOrSettingsOrCallback,callback){if(typeof optionsOrSettingsOrCallback==="function"){new async_1.default(directory,getSettings()).read(optionsOrSettingsOrCallback);return}new async_1.default(directory,getSettings(optionsOrSettingsOrCallback)).read(callback)}out$3.walk=walk;function walkSync(directory,optionsOrSettings){const settings=getSettings(optionsOrSettings);const provider=new sync_1.default(directory,settings);return provider.read()}out$3.walkSync=walkSync;function walkStream(directory,optionsOrSettings){const settings=getSettings(optionsOrSettings);const provider=new stream_1.default(directory,settings);return provider.read()}out$3.walkStream=walkStream;function getSettings(settingsOrOptions={}){if(settingsOrOptions instanceof settings_1.default){return settingsOrOptions}return new settings_1.default(settingsOrOptions)}return out$3}var reader={};var hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1;Object.defineProperty(reader,"__esModule",{value:true});const path=require$$0$6;const fsStat=requireOut$3();const utils=requireUtils$1();class Reader{constructor(_settings){this._settings=_settings;this._fsStatSettings=new fsStat.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(filepath){return path.resolve(this._settings.cwd,filepath)}_makeEntry(stats,pattern){const entry={name:pattern,path:pattern,dirent:utils.fs.createDirentFromStats(pattern,stats)};if(this._settings.stats){entry.stats=stats}return entry}_isFatalError(error){return!utils.errno.isEnoentCodeError(error)&&!this._settings.suppressErrors}}reader.default=Reader;return reader}var stream$1={};var hasRequiredStream$1;function requireStream$1(){if(hasRequiredStream$1)return stream$1;hasRequiredStream$1=1;Object.defineProperty(stream$1,"__esModule",{value:true});const stream_1=require$$0$4;const fsStat=requireOut$3();const fsWalk=requireOut$1();const reader_1=requireReader();class ReaderStream extends reader_1.default{constructor(){super(...arguments);this._walkStream=fsWalk.walkStream;this._stat=fsStat.stat}dynamic(root,options){return this._walkStream(root,options)}static(patterns,options){const filepaths=patterns.map(this._getFullEntryPath,this);const stream=new stream_1.PassThrough({objectMode:true});stream._write=(index,_enc,done)=>this._getEntry(filepaths[index],patterns[index],options).then((entry=>{if(entry!==null&&options.entryFilter(entry)){stream.push(entry)}if(index===filepaths.length-1){stream.end()}done()})).catch(done);for(let i=0;i<filepaths.length;i++){stream.write(i)}return stream}_getEntry(filepath,pattern,options){return this._getStat(filepath).then((stats=>this._makeEntry(stats,pattern))).catch((error=>{if(options.errorFilter(error)){return null}throw error}))}_getStat(filepath){return new Promise(((resolve,reject)=>{this._stat(filepath,this._fsStatSettings,((error,stats)=>error===null?resolve(stats):reject(error)))}))}}stream$1.default=ReaderStream;return stream$1}var hasRequiredAsync$1;function requireAsync$1(){if(hasRequiredAsync$1)return async$4;hasRequiredAsync$1=1;Object.defineProperty(async$4,"__esModule",{value:true});const fsWalk=requireOut$1();const reader_1=requireReader();const stream_1=requireStream$1();class ReaderAsync extends reader_1.default{constructor(){super(...arguments);this._walkAsync=fsWalk.walk;this._readerStream=new stream_1.default(this._settings)}dynamic(root,options){return new Promise(((resolve,reject)=>{this._walkAsync(root,options,((error,entries)=>{if(error===null){resolve(entries)}else{reject(error)}}))}))}async static(patterns,options){const entries=[];const stream=this._readerStream.static(patterns,options);return new Promise(((resolve,reject)=>{stream.once("error",reject);stream.on("data",(entry=>entries.push(entry)));stream.once("end",(()=>resolve(entries)))}))}}async$4.default=ReaderAsync;return async$4}var provider={};var deep={};var partial={};var matcher={};var hasRequiredMatcher;function requireMatcher(){if(hasRequiredMatcher)return matcher;hasRequiredMatcher=1;Object.defineProperty(matcher,"__esModule",{value:true});const utils=requireUtils$1();class Matcher{constructor(_patterns,_settings,_micromatchOptions){this._patterns=_patterns;this._settings=_settings;this._micromatchOptions=_micromatchOptions;this._storage=[];this._fillStorage()}_fillStorage(){const patterns=utils.pattern.expandPatternsWithBraceExpansion(this._patterns);for(const pattern of patterns){const segments=this._getPatternSegments(pattern);const sections=this._splitSegmentsIntoSections(segments);this._storage.push({complete:sections.length<=1,pattern:pattern,segments:segments,sections:sections})}}_getPatternSegments(pattern){const parts=utils.pattern.getPatternParts(pattern,this._micromatchOptions);return parts.map((part=>{const dynamic=utils.pattern.isDynamicPattern(part,this._settings);if(!dynamic){return{dynamic:false,pattern:part}}return{dynamic:true,pattern:part,patternRe:utils.pattern.makeRe(part,this._micromatchOptions)}}))}_splitSegmentsIntoSections(segments){return utils.array.splitWhen(segments,(segment=>segment.dynamic&&utils.pattern.hasGlobStar(segment.pattern)))}}matcher.default=Matcher;return matcher}var hasRequiredPartial;function requirePartial(){if(hasRequiredPartial)return partial;hasRequiredPartial=1;Object.defineProperty(partial,"__esModule",{value:true});const matcher_1=requireMatcher();class PartialMatcher extends matcher_1.default{match(filepath){const parts=filepath.split("/");const levels=parts.length;const patterns=this._storage.filter((info=>!info.complete||info.segments.length>levels));for(const pattern of patterns){const section=pattern.sections[0];if(!pattern.complete&&levels>section.length){return true}const match=parts.every(((part,index)=>{const segment=pattern.segments[index];if(segment.dynamic&&segment.patternRe.test(part)){return true}if(!segment.dynamic&&segment.pattern===part){return true}return false}));if(match){return true}}return false}}partial.default=PartialMatcher;return partial}var hasRequiredDeep;function requireDeep(){if(hasRequiredDeep)return deep;hasRequiredDeep=1;Object.defineProperty(deep,"__esModule",{value:true});const utils=requireUtils$1();const partial_1=requirePartial();class DeepFilter{constructor(_settings,_micromatchOptions){this._settings=_settings;this._micromatchOptions=_micromatchOptions}getFilter(basePath,positive,negative){const matcher=this._getMatcher(positive);const negativeRe=this._getNegativePatternsRe(negative);return entry=>this._filter(basePath,entry,matcher,negativeRe)}_getMatcher(patterns){return new partial_1.default(patterns,this._settings,this._micromatchOptions)}_getNegativePatternsRe(patterns){const affectDepthOfReadingPatterns=patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns,this._micromatchOptions)}_filter(basePath,entry,matcher,negativeRe){if(this._isSkippedByDeep(basePath,entry.path)){return false}if(this._isSkippedSymbolicLink(entry)){return false}const filepath=utils.path.removeLeadingDotSegment(entry.path);if(this._isSkippedByPositivePatterns(filepath,matcher)){return false}return this._isSkippedByNegativePatterns(filepath,negativeRe)}_isSkippedByDeep(basePath,entryPath){if(this._settings.deep===Infinity){return false}return this._getEntryLevel(basePath,entryPath)>=this._settings.deep}_getEntryLevel(basePath,entryPath){const entryPathDepth=entryPath.split("/").length;if(basePath===""){return entryPathDepth}const basePathDepth=basePath.split("/").length;return entryPathDepth-basePathDepth}_isSkippedSymbolicLink(entry){return!this._settings.followSymbolicLinks&&entry.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(entryPath,matcher){return!this._settings.baseNameMatch&&!matcher.match(entryPath)}_isSkippedByNegativePatterns(entryPath,patternsRe){return!utils.pattern.matchAny(entryPath,patternsRe)}}deep.default=DeepFilter;return deep}var entry$1={};var hasRequiredEntry$1;function requireEntry$1(){if(hasRequiredEntry$1)return entry$1;hasRequiredEntry$1=1;Object.defineProperty(entry$1,"__esModule",{value:true});const utils=requireUtils$1();class EntryFilter{constructor(_settings,_micromatchOptions){this._settings=_settings;this._micromatchOptions=_micromatchOptions;this.index=new Map}getFilter(positive,negative){const positiveRe=utils.pattern.convertPatternsToRe(positive,this._micromatchOptions);const negativeRe=utils.pattern.convertPatternsToRe(negative,this._micromatchOptions);return entry=>this._filter(entry,positiveRe,negativeRe)}_filter(entry,positiveRe,negativeRe){if(this._settings.unique&&this._isDuplicateEntry(entry)){return false}if(this._onlyFileFilter(entry)||this._onlyDirectoryFilter(entry)){return false}if(this._isSkippedByAbsoluteNegativePatterns(entry.path,negativeRe)){return false}const filepath=this._settings.baseNameMatch?entry.name:entry.path;const isDirectory=entry.dirent.isDirectory();const isMatched=this._isMatchToPatterns(filepath,positiveRe,isDirectory)&&!this._isMatchToPatterns(entry.path,negativeRe,isDirectory);if(this._settings.unique&&isMatched){this._createIndexRecord(entry)}return isMatched}_isDuplicateEntry(entry){return this.index.has(entry.path)}_createIndexRecord(entry){this.index.set(entry.path,undefined)}_onlyFileFilter(entry){return this._settings.onlyFiles&&!entry.dirent.isFile()}_onlyDirectoryFilter(entry){return this._settings.onlyDirectories&&!entry.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(entryPath,patternsRe){if(!this._settings.absolute){return false}const fullpath=utils.path.makeAbsolute(this._settings.cwd,entryPath);return utils.pattern.matchAny(fullpath,patternsRe)}_isMatchToPatterns(entryPath,patternsRe,isDirectory){const filepath=utils.path.removeLeadingDotSegment(entryPath);const isMatched=utils.pattern.matchAny(filepath,patternsRe);if(!isMatched&&isDirectory){return utils.pattern.matchAny(filepath+"/",patternsRe)}return isMatched}}entry$1.default=EntryFilter;return entry$1}var error={};var hasRequiredError;function requireError(){if(hasRequiredError)return error;hasRequiredError=1;Object.defineProperty(error,"__esModule",{value:true});const utils=requireUtils$1();class ErrorFilter{constructor(_settings){this._settings=_settings}getFilter(){return error=>this._isNonFatalError(error)}_isNonFatalError(error){return utils.errno.isEnoentCodeError(error)||this._settings.suppressErrors}}error.default=ErrorFilter;return error}var entry={};var hasRequiredEntry;function requireEntry(){if(hasRequiredEntry)return entry;hasRequiredEntry=1;Object.defineProperty(entry,"__esModule",{value:true});const utils=requireUtils$1();class EntryTransformer{constructor(_settings){this._settings=_settings}getTransformer(){return entry=>this._transform(entry)}_transform(entry){let filepath=entry.path;if(this._settings.absolute){filepath=utils.path.makeAbsolute(this._settings.cwd,filepath);filepath=utils.path.unixify(filepath)}if(this._settings.markDirectories&&entry.dirent.isDirectory()){filepath+="/"}if(!this._settings.objectMode){return filepath}return Object.assign(Object.assign({},entry),{path:filepath})}}entry.default=EntryTransformer;return entry}var hasRequiredProvider;function requireProvider(){if(hasRequiredProvider)return provider;hasRequiredProvider=1;Object.defineProperty(provider,"__esModule",{value:true});const path=require$$0$6;const deep_1=requireDeep();const entry_1=requireEntry$1();const error_1=requireError();const entry_2=requireEntry();class Provider{constructor(_settings){this._settings=_settings;this.errorFilter=new error_1.default(this._settings);this.entryFilter=new entry_1.default(this._settings,this._getMicromatchOptions());this.deepFilter=new deep_1.default(this._settings,this._getMicromatchOptions());this.entryTransformer=new entry_2.default(this._settings)}_getRootDirectory(task){return path.resolve(this._settings.cwd,task.base)}_getReaderOptions(task){const basePath=task.base==="."?"":task.base;return{basePath:basePath,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(basePath,task.positive,task.negative),entryFilter:this.entryFilter.getFilter(task.positive,task.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:true,strictSlashes:false}}}provider.default=Provider;return provider}var hasRequiredAsync;function requireAsync(){if(hasRequiredAsync)return async$5;hasRequiredAsync=1;Object.defineProperty(async$5,"__esModule",{value:true});const async_1=requireAsync$1();const provider_1=requireProvider();class ProviderAsync extends provider_1.default{constructor(){super(...arguments);this._reader=new async_1.default(this._settings)}async read(task){const root=this._getRootDirectory(task);const options=this._getReaderOptions(task);const entries=await this.api(root,task,options);return entries.map((entry=>options.transform(entry)))}api(root,task,options){if(task.dynamic){return this._reader.dynamic(root,options)}return this._reader.static(task.patterns,options)}}async$5.default=ProviderAsync;return async$5}var stream={};var hasRequiredStream;function requireStream(){if(hasRequiredStream)return stream;hasRequiredStream=1;Object.defineProperty(stream,"__esModule",{value:true});const stream_1=require$$0$4;const stream_2=requireStream$1();const provider_1=requireProvider();class ProviderStream extends provider_1.default{constructor(){super(...arguments);this._reader=new stream_2.default(this._settings)}read(task){const root=this._getRootDirectory(task);const options=this._getReaderOptions(task);const source=this.api(root,task,options);const destination=new stream_1.Readable({objectMode:true,read:()=>{}});source.once("error",(error=>destination.emit("error",error))).on("data",(entry=>destination.emit("data",options.transform(entry)))).once("end",(()=>destination.emit("end")));destination.once("close",(()=>source.destroy()));return destination}api(root,task,options){if(task.dynamic){return this._reader.dynamic(root,options)}return this._reader.static(task.patterns,options)}}stream.default=ProviderStream;return stream}var sync$2={};var sync$1={};var hasRequiredSync$2;function requireSync$2(){if(hasRequiredSync$2)return sync$1;hasRequiredSync$2=1;Object.defineProperty(sync$1,"__esModule",{value:true});const fsStat=requireOut$3();const fsWalk=requireOut$1();const reader_1=requireReader();class ReaderSync extends reader_1.default{constructor(){super(...arguments);this._walkSync=fsWalk.walkSync;this._statSync=fsStat.statSync}dynamic(root,options){return this._walkSync(root,options)}static(patterns,options){const entries=[];for(const pattern of patterns){const filepath=this._getFullEntryPath(pattern);const entry=this._getEntry(filepath,pattern,options);if(entry===null||!options.entryFilter(entry)){continue}entries.push(entry)}return entries}_getEntry(filepath,pattern,options){try{const stats=this._getStat(filepath);return this._makeEntry(stats,pattern)}catch(error){if(options.errorFilter(error)){return null}throw error}}_getStat(filepath){return this._statSync(filepath,this._fsStatSettings)}}sync$1.default=ReaderSync;return sync$1}var hasRequiredSync$1;function requireSync$1(){if(hasRequiredSync$1)return sync$2;hasRequiredSync$1=1;Object.defineProperty(sync$2,"__esModule",{value:true});const sync_1=requireSync$2();const provider_1=requireProvider();class ProviderSync extends provider_1.default{constructor(){super(...arguments);this._reader=new sync_1.default(this._settings)}read(task){const root=this._getRootDirectory(task);const options=this._getReaderOptions(task);const entries=this.api(root,task,options);return entries.map(options.transform)}api(root,task,options){if(task.dynamic){return this._reader.dynamic(root,options)}return this._reader.static(task.patterns,options)}}sync$2.default=ProviderSync;return sync$2}var settings={};var hasRequiredSettings;function requireSettings(){if(hasRequiredSettings)return settings;hasRequiredSettings=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const fs=require$$0$2;const os=require$$0$5;const CPU_COUNT=Math.max(os.cpus().length,1);exports.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:fs.lstat,lstatSync:fs.lstatSync,stat:fs.stat,statSync:fs.statSync,readdir:fs.readdir,readdirSync:fs.readdirSync};class Settings{constructor(_options={}){this._options=_options;this.absolute=this._getValue(this._options.absolute,false);this.baseNameMatch=this._getValue(this._options.baseNameMatch,false);this.braceExpansion=this._getValue(this._options.braceExpansion,true);this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,true);this.concurrency=this._getValue(this._options.concurrency,CPU_COUNT);this.cwd=this._getValue(this._options.cwd,process.cwd());this.deep=this._getValue(this._options.deep,Infinity);this.dot=this._getValue(this._options.dot,false);this.extglob=this._getValue(this._options.extglob,true);this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,true);this.fs=this._getFileSystemMethods(this._options.fs);this.globstar=this._getValue(this._options.globstar,true);this.ignore=this._getValue(this._options.ignore,[]);this.markDirectories=this._getValue(this._options.markDirectories,false);this.objectMode=this._getValue(this._options.objectMode,false);this.onlyDirectories=this._getValue(this._options.onlyDirectories,false);this.onlyFiles=this._getValue(this._options.onlyFiles,true);this.stats=this._getValue(this._options.stats,false);this.suppressErrors=this._getValue(this._options.suppressErrors,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,false);this.unique=this._getValue(this._options.unique,true);if(this.onlyDirectories){this.onlyFiles=false}if(this.stats){this.objectMode=true}}_getValue(option,value){return option===undefined?value:option}_getFileSystemMethods(methods={}){return Object.assign(Object.assign({},exports.DEFAULT_FILE_SYSTEM_ADAPTER),methods)}}exports.default=Settings})(settings);return settings}var out;var hasRequiredOut;function requireOut(){if(hasRequiredOut)return out;hasRequiredOut=1;const taskManager=requireTasks();const patternManager=requirePatterns();const async_1=requireAsync();const stream_1=requireStream();const sync_1=requireSync$1();const settings_1=requireSettings();const utils=requireUtils$1();async function FastGlob(source,options){assertPatternsInput(source);const works=getWorks(source,async_1.default,options);const result=await Promise.all(works);return utils.array.flatten(result)}(function(FastGlob){function sync(source,options){assertPatternsInput(source);const works=getWorks(source,sync_1.default,options);return utils.array.flatten(works)}FastGlob.sync=sync;function stream(source,options){assertPatternsInput(source);const works=getWorks(source,stream_1.default,options);return utils.stream.merge(works)}FastGlob.stream=stream;function generateTasks(source,options){assertPatternsInput(source);const patterns=patternManager.transform([].concat(source));const settings=new settings_1.default(options);return taskManager.generate(patterns,settings)}FastGlob.generateTasks=generateTasks;function isDynamicPattern(source,options){assertPatternsInput(source);const settings=new settings_1.default(options);return utils.pattern.isDynamicPattern(source,settings)}FastGlob.isDynamicPattern=isDynamicPattern;function escapePath(source){assertPatternsInput(source);return utils.path.escape(source)}FastGlob.escapePath=escapePath})(FastGlob||(FastGlob={}));function getWorks(source,_Provider,options){const patterns=patternManager.transform([].concat(source));const settings=new settings_1.default(options);const tasks=taskManager.generate(patterns,settings);const provider=new _Provider(settings);return tasks.map(provider.read,provider)}function assertPatternsInput(input){const source=[].concat(input);const isValidSource=source.every((item=>utils.string.isString(item)&&!utils.string.isEmpty(item)));if(!isValidSource){throw new TypeError("Patterns must be a string (non empty) or an array of strings")}}out=FastGlob;return out}var hasRequiredGlobUtils;function requireGlobUtils(){if(hasRequiredGlobUtils)return globUtils;hasRequiredGlobUtils=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.isBraceExpansion=exports.match=exports.isGlobPattern=exports.fastGlobOptions=exports.micromatchOptions=void 0;const tslib_1=require$$0;const fslib_1=requireLib$e();const fast_glob_1=(0,tslib_1.__importDefault)(requireOut());const fs_1=(0,tslib_1.__importDefault)(require$$0$2);const micromatch_1=(0,tslib_1.__importDefault)(requireMicromatch());exports.micromatchOptions={strictBrackets:true};exports.fastGlobOptions={onlyDirectories:false,onlyFiles:false};function isGlobPattern(pattern){if(!micromatch_1.default.scan(pattern,exports.micromatchOptions).isGlob)return false;try{micromatch_1.default.parse(pattern,exports.micromatchOptions)}catch{return false}return true}exports.isGlobPattern=isGlobPattern;function match(pattern,{cwd:cwd,baseFs:baseFs}){return(0,fast_glob_1.default)(pattern,{...exports.fastGlobOptions,cwd:fslib_1.npath.fromPortablePath(cwd),fs:(0,fslib_1.extendFs)(fs_1.default,new fslib_1.PosixFS(baseFs))})}exports.match=match;function isBraceExpansion(pattern){return micromatch_1.default.scan(pattern,exports.micromatchOptions).isBrace}exports.isBraceExpansion=isBraceExpansion})(globUtils);return globUtils}var pipe={};var crossSpawn={exports:{}};var windows;var hasRequiredWindows;function requireWindows(){if(hasRequiredWindows)return windows;hasRequiredWindows=1;windows=isexe;isexe.sync=sync;var fs=require$$0$2;function checkPathExt(path,options){var pathext=options.pathExt!==undefined?options.pathExt:process.env.PATHEXT;if(!pathext){return true}pathext=pathext.split(";");if(pathext.indexOf("")!==-1){return true}for(var i=0;i<pathext.length;i++){var p=pathext[i].toLowerCase();if(p&&path.substr(-p.length).toLowerCase()===p){return true}}return false}function checkStat(stat,path,options){if(!stat.isSymbolicLink()&&!stat.isFile()){return false}return checkPathExt(path,options)}function isexe(path,options,cb){fs.stat(path,(function(er,stat){cb(er,er?false:checkStat(stat,path,options))}))}function sync(path,options){return checkStat(fs.statSync(path),path,options)}return windows}var mode;var hasRequiredMode;function requireMode(){if(hasRequiredMode)return mode;hasRequiredMode=1;mode=isexe;isexe.sync=sync;var fs=require$$0$2;function isexe(path,options,cb){fs.stat(path,(function(er,stat){cb(er,er?false:checkStat(stat,options))}))}function sync(path,options){return checkStat(fs.statSync(path),options)}function checkStat(stat,options){return stat.isFile()&&checkMode(stat,options)}function checkMode(stat,options){var mod=stat.mode;var uid=stat.uid;var gid=stat.gid;var myUid=options.uid!==undefined?options.uid:process.getuid&&process.getuid();var myGid=options.gid!==undefined?options.gid:process.getgid&&process.getgid();var u=parseInt("100",8);var g=parseInt("010",8);var o=parseInt("001",8);var ug=u|g;var ret=mod&o||mod&g&&gid===myGid||mod&u&&uid===myUid||mod&ug&&myUid===0;return ret}return mode}var isexe_1;var hasRequiredIsexe;function requireIsexe(){if(hasRequiredIsexe)return isexe_1;hasRequiredIsexe=1;var core;if(process.platform==="win32"||commonjsGlobal.TESTING_WINDOWS){core=requireWindows()}else{core=requireMode()}isexe_1=isexe;isexe.sync=sync;function isexe(path,options,cb){if(typeof options==="function"){cb=options;options={}}if(!cb){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(resolve,reject){isexe(path,options||{},(function(er,is){if(er){reject(er)}else{resolve(is)}}))}))}core(path,options||{},(function(er,is){if(er){if(er.code==="EACCES"||options&&options.ignoreErrors){er=null;is=false}}cb(er,is)}))}function sync(path,options){try{return core.sync(path,options||{})}catch(er){if(options&&options.ignoreErrors||er.code==="EACCES"){return false}else{throw er}}}return isexe_1}var which_1;var hasRequiredWhich;function requireWhich(){if(hasRequiredWhich)return which_1;hasRequiredWhich=1;const isWindows=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const path=require$$0$6;const COLON=isWindows?";":":";const isexe=requireIsexe();const getNotFoundError=cmd=>Object.assign(new Error(`not found: ${cmd}`),{code:"ENOENT"});const getPathInfo=(cmd,opt)=>{const colon=opt.colon||COLON;const pathEnv=cmd.match(/\//)||isWindows&&cmd.match(/\\/)?[""]:[...isWindows?[process.cwd()]:[],...(opt.path||process.env.PATH||"").split(colon)];const pathExtExe=isWindows?opt.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const pathExt=isWindows?pathExtExe.split(colon):[""];if(isWindows){if(cmd.indexOf(".")!==-1&&pathExt[0]!=="")pathExt.unshift("")}return{pathEnv:pathEnv,pathExt:pathExt,pathExtExe:pathExtExe}};const which=(cmd,opt,cb)=>{if(typeof opt==="function"){cb=opt;opt={}}if(!opt)opt={};const{pathEnv:pathEnv,pathExt:pathExt,pathExtExe:pathExtExe}=getPathInfo(cmd,opt);const found=[];const step=i=>new Promise(((resolve,reject)=>{if(i===pathEnv.length)return opt.all&&found.length?resolve(found):reject(getNotFoundError(cmd));const ppRaw=pathEnv[i];const pathPart=/^".*"$/.test(ppRaw)?ppRaw.slice(1,-1):ppRaw;const pCmd=path.join(pathPart,cmd);const p=!pathPart&&/^\.[\\\/]/.test(cmd)?cmd.slice(0,2)+pCmd:pCmd;resolve(subStep(p,i,0))}));const subStep=(p,i,ii)=>new Promise(((resolve,reject)=>{if(ii===pathExt.length)return resolve(step(i+1));const ext=pathExt[ii];isexe(p+ext,{pathExt:pathExtExe},((er,is)=>{if(!er&&is){if(opt.all)found.push(p+ext);else return resolve(p+ext)}return resolve(subStep(p,i,ii+1))}))}));return cb?step(0).then((res=>cb(null,res)),cb):step(0)};const whichSync=(cmd,opt)=>{opt=opt||{};const{pathEnv:pathEnv,pathExt:pathExt,pathExtExe:pathExtExe}=getPathInfo(cmd,opt);const found=[];for(let i=0;i<pathEnv.length;i++){const ppRaw=pathEnv[i];const pathPart=/^".*"$/.test(ppRaw)?ppRaw.slice(1,-1):ppRaw;const pCmd=path.join(pathPart,cmd);const p=!pathPart&&/^\.[\\\/]/.test(cmd)?cmd.slice(0,2)+pCmd:pCmd;for(let j=0;j<pathExt.length;j++){const cur=p+pathExt[j];try{const is=isexe.sync(cur,{pathExt:pathExtExe});if(is){if(opt.all)found.push(cur);else return cur}}catch(ex){}}}if(opt.all&&found.length)return found;if(opt.nothrow)return null;throw getNotFoundError(cmd)};which_1=which;which.sync=whichSync;return which_1}var pathKey={exports:{}};var hasRequiredPathKey;function requirePathKey(){if(hasRequiredPathKey)return pathKey.exports;hasRequiredPathKey=1;const pathKey$1=(options={})=>{const environment=options.env||process.env;const platform=options.platform||process.platform;if(platform!=="win32"){return"PATH"}return Object.keys(environment).reverse().find((key=>key.toUpperCase()==="PATH"))||"Path"};pathKey.exports=pathKey$1;pathKey.exports.default=pathKey$1;return pathKey.exports}var resolveCommand_1;var hasRequiredResolveCommand;function requireResolveCommand(){if(hasRequiredResolveCommand)return resolveCommand_1;hasRequiredResolveCommand=1;const path=require$$0$6;const which=requireWhich();const getPathKey=requirePathKey();function resolveCommandAttempt(parsed,withoutPathExt){const env=parsed.options.env||process.env;const cwd=process.cwd();const hasCustomCwd=parsed.options.cwd!=null;const shouldSwitchCwd=hasCustomCwd&&process.chdir!==undefined&&!process.chdir.disabled;if(shouldSwitchCwd){try{process.chdir(parsed.options.cwd)}catch(err){}}let resolved;try{resolved=which.sync(parsed.command,{path:env[getPathKey({env:env})],pathExt:withoutPathExt?path.delimiter:undefined})}catch(e){}finally{if(shouldSwitchCwd){process.chdir(cwd)}}if(resolved){resolved=path.resolve(hasCustomCwd?parsed.options.cwd:"",resolved)}return resolved}function resolveCommand(parsed){return resolveCommandAttempt(parsed)||resolveCommandAttempt(parsed,true)}resolveCommand_1=resolveCommand;return resolveCommand_1}var _escape={};var hasRequired_escape;function require_escape(){if(hasRequired_escape)return _escape;hasRequired_escape=1;const metaCharsRegExp=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(arg){arg=arg.replace(metaCharsRegExp,"^$1");return arg}function escapeArgument(arg,doubleEscapeMetaChars){arg=`${arg}`;arg=arg.replace(/(\\*)"/g,'$1$1\\"');arg=arg.replace(/(\\*)$/,"$1$1");arg=`"${arg}"`;arg=arg.replace(metaCharsRegExp,"^$1");if(doubleEscapeMetaChars){arg=arg.replace(metaCharsRegExp,"^$1")}return arg}_escape.command=escapeCommand;_escape.argument=escapeArgument;return _escape}var shebangRegex;var hasRequiredShebangRegex;function requireShebangRegex(){if(hasRequiredShebangRegex)return shebangRegex;hasRequiredShebangRegex=1;shebangRegex=/^#!(.*)/;return shebangRegex}var shebangCommand;var hasRequiredShebangCommand;function requireShebangCommand(){if(hasRequiredShebangCommand)return shebangCommand;hasRequiredShebangCommand=1;const shebangRegex=requireShebangRegex();shebangCommand=(string="")=>{const match=string.match(shebangRegex);if(!match){return null}const[path,argument]=match[0].replace(/#! ?/,"").split(" ");const binary=path.split("/").pop();if(binary==="env"){return argument}return argument?`${binary} ${argument}`:binary};return shebangCommand}var readShebang_1;var hasRequiredReadShebang;function requireReadShebang(){if(hasRequiredReadShebang)return readShebang_1;hasRequiredReadShebang=1;const fs=require$$0$2;const shebangCommand=requireShebangCommand();function readShebang(command){const size=150;const buffer=Buffer.alloc(size);let fd;try{fd=fs.openSync(command,"r");fs.readSync(fd,buffer,0,size,0);fs.closeSync(fd)}catch(e){}return shebangCommand(buffer.toString())}readShebang_1=readShebang;return readShebang_1}var parse_1;var hasRequiredParse;function requireParse(){if(hasRequiredParse)return parse_1;hasRequiredParse=1;const path=require$$0$6;const resolveCommand=requireResolveCommand();const escape=require_escape();const readShebang=requireReadShebang();const isWin=process.platform==="win32";const isExecutableRegExp=/\.(?:com|exe)$/i;const isCmdShimRegExp=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(parsed){parsed.file=resolveCommand(parsed);const shebang=parsed.file&&readShebang(parsed.file);if(shebang){parsed.args.unshift(parsed.file);parsed.command=shebang;return resolveCommand(parsed)}return parsed.file}function parseNonShell(parsed){if(!isWin){return parsed}const commandFile=detectShebang(parsed);const needsShell=!isExecutableRegExp.test(commandFile);if(parsed.options.forceShell||needsShell){const needsDoubleEscapeMetaChars=isCmdShimRegExp.test(commandFile);parsed.command=path.normalize(parsed.command);parsed.command=escape.command(parsed.command);parsed.args=parsed.args.map((arg=>escape.argument(arg,needsDoubleEscapeMetaChars)));const shellCommand=[parsed.command].concat(parsed.args).join(" ");parsed.args=["/d","/s","/c",`"${shellCommand}"`];parsed.command=process.env.comspec||"cmd.exe";parsed.options.windowsVerbatimArguments=true}return parsed}function parse(command,args,options){if(args&&!Array.isArray(args)){options=args;args=null}args=args?args.slice(0):[];options=Object.assign({},options);const parsed={command:command,args:args,options:options,file:undefined,original:{command:command,args:args}};return options.shell?parsed:parseNonShell(parsed)}parse_1=parse;return parse_1}var enoent;var hasRequiredEnoent;function requireEnoent(){if(hasRequiredEnoent)return enoent;hasRequiredEnoent=1;const isWin=process.platform==="win32";function notFoundError(original,syscall){return Object.assign(new Error(`${syscall} ${original.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${syscall} ${original.command}`,path:original.command,spawnargs:original.args})}function hookChildProcess(cp,parsed){if(!isWin){return}const originalEmit=cp.emit;cp.emit=function(name,arg1){if(name==="exit"){const err=verifyENOENT(arg1,parsed);if(err){return originalEmit.call(cp,"error",err)}}return originalEmit.apply(cp,arguments)}}function verifyENOENT(status,parsed){if(isWin&&status===1&&!parsed.file){return notFoundError(parsed.original,"spawn")}return null}function verifyENOENTSync(status,parsed){if(isWin&&status===1&&!parsed.file){return notFoundError(parsed.original,"spawnSync")}return null}enoent={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError};return enoent}var hasRequiredCrossSpawn;function requireCrossSpawn(){if(hasRequiredCrossSpawn)return crossSpawn.exports;hasRequiredCrossSpawn=1;const cp=require$$0$8;const parse=requireParse();const enoent=requireEnoent();function spawn(command,args,options){const parsed=parse(command,args,options);const spawned=cp.spawn(parsed.command,parsed.args,parsed.options);enoent.hookChildProcess(spawned,parsed);return spawned}function spawnSync(command,args,options){const parsed=parse(command,args,options);const result=cp.spawnSync(parsed.command,parsed.args,parsed.options);result.error=result.error||enoent.verifyENOENTSync(result.status,parsed);return result}crossSpawn.exports=spawn;crossSpawn.exports.spawn=spawn;crossSpawn.exports.sync=spawnSync;crossSpawn.exports._parse=parse;crossSpawn.exports._enoent=enoent;return crossSpawn.exports}var hasRequiredPipe;function requirePipe(){if(hasRequiredPipe)return pipe;hasRequiredPipe=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.createOutputStreamsWithPrefix=exports.start=exports.Handle=exports.ProtectedStream=exports.makeBuiltin=exports.makeProcess=exports.Pipe=void 0;const tslib_1=require$$0;const cross_spawn_1=(0,tslib_1.__importDefault)(requireCrossSpawn());const stream_1=require$$0$4;const string_decoder_1=require$$1$5;var Pipe;(function(Pipe){Pipe[Pipe["STDIN"]=0]="STDIN";Pipe[Pipe["STDOUT"]=1]="STDOUT";Pipe[Pipe["STDERR"]=2]="STDERR"})(Pipe=exports.Pipe||(exports.Pipe={}));const activeChildren=new Set;function sigintHandler(){}function sigtermHandler(){for(const child of activeChildren){child.kill()}}function makeProcess(name,args,opts,spawnOpts){return stdio=>{const stdin=stdio[0]instanceof stream_1.Transform?`pipe`:stdio[0];const stdout=stdio[1]instanceof stream_1.Transform?`pipe`:stdio[1];const stderr=stdio[2]instanceof stream_1.Transform?`pipe`:stdio[2];const child=(0,cross_spawn_1.default)(name,args,{...spawnOpts,stdio:[stdin,stdout,stderr]});activeChildren.add(child);if(activeChildren.size===1){process.on(`SIGINT`,sigintHandler);process.on(`SIGTERM`,sigtermHandler)}if(stdio[0]instanceof stream_1.Transform)stdio[0].pipe(child.stdin);if(stdio[1]instanceof stream_1.Transform)child.stdout.pipe(stdio[1],{end:false});if(stdio[2]instanceof stream_1.Transform)child.stderr.pipe(stdio[2],{end:false});return{stdin:child.stdin,promise:new Promise((resolve=>{child.on(`error`,(error=>{activeChildren.delete(child);if(activeChildren.size===0){process.off(`SIGINT`,sigintHandler);process.off(`SIGTERM`,sigtermHandler)}switch(error.code){case`ENOENT`:{stdio[2].write(`command not found: ${name}\n`);resolve(127)}break;case`EACCES`:{stdio[2].write(`permission denied: ${name}\n`);resolve(128)}break;default:{stdio[2].write(`uncaught error: ${error.message}\n`);resolve(1)}break}}));child.on(`exit`,(code=>{activeChildren.delete(child);if(activeChildren.size===0){process.off(`SIGINT`,sigintHandler);process.off(`SIGTERM`,sigtermHandler)}if(code!==null){resolve(code)}else{resolve(129)}}))}))}}}exports.makeProcess=makeProcess;function makeBuiltin(builtin){return stdio=>{const stdin=stdio[0]===`pipe`?new stream_1.PassThrough:stdio[0];return{stdin:stdin,promise:Promise.resolve().then((()=>builtin({stdin:stdin,stdout:stdio[1],stderr:stdio[2]})))}}}exports.makeBuiltin=makeBuiltin;class ProtectedStream{constructor(stream){this.stream=stream}close(){}get(){return this.stream}}exports.ProtectedStream=ProtectedStream;class PipeStream{constructor(){this.stream=null}close(){if(this.stream===null){throw new Error(`Assertion failed: No stream attached`)}else{this.stream.end()}}attach(stream){this.stream=stream}get(){if(this.stream===null){throw new Error(`Assertion failed: No stream attached`)}else{return this.stream}}}class Handle{constructor(ancestor,implementation){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=ancestor;this.implementation=implementation}static start(implementation,{stdin:stdin,stdout:stdout,stderr:stderr}){const chain=new Handle(null,implementation);chain.stdin=stdin;chain.stdout=stdout;chain.stderr=stderr;return chain}pipeTo(implementation,source=Pipe.STDOUT){const next=new Handle(this,implementation);const pipe=new PipeStream;next.pipe=pipe;next.stdout=this.stdout;next.stderr=this.stderr;if((source&Pipe.STDOUT)===Pipe.STDOUT)this.stdout=pipe;else if(this.ancestor!==null)this.stderr=this.ancestor.stdout;if((source&Pipe.STDERR)===Pipe.STDERR)this.stderr=pipe;else if(this.ancestor!==null)this.stderr=this.ancestor.stderr;return next}async exec(){const stdio=[`ignore`,`ignore`,`ignore`];if(this.pipe){stdio[0]=`pipe`}else{if(this.stdin===null){throw new Error(`Assertion failed: No input stream registered`)}else{stdio[0]=this.stdin.get()}}let stdoutLock;if(this.stdout===null){throw new Error(`Assertion failed: No output stream registered`)}else{stdoutLock=this.stdout;stdio[1]=stdoutLock.get()}let stderrLock;if(this.stderr===null){throw new Error(`Assertion failed: No error stream registered`)}else{stderrLock=this.stderr;stdio[2]=stderrLock.get()}const child=this.implementation(stdio);if(this.pipe)this.pipe.attach(child.stdin);return await child.promise.then((code=>{stdoutLock.close();stderrLock.close();return code}))}async run(){const promises=[];for(let handle=this;handle;handle=handle.ancestor)promises.push(handle.exec());const exitCodes=await Promise.all(promises);return exitCodes[0]}}exports.Handle=Handle;function start(p,opts){return Handle.start(p,opts)}exports.start=start;function createStreamReporter(reportFn,prefix=null){const stream=new stream_1.PassThrough;const decoder=new string_decoder_1.StringDecoder;let buffer=``;stream.on(`data`,(chunk=>{let chunkStr=decoder.write(chunk);let lineIndex;do{lineIndex=chunkStr.indexOf(`\n`);if(lineIndex!==-1){const line=buffer+chunkStr.substr(0,lineIndex);chunkStr=chunkStr.substr(lineIndex+1);buffer=``;if(prefix!==null){reportFn(`${prefix} ${line}`)}else{reportFn(line)}}}while(lineIndex!==-1);buffer+=chunkStr}));stream.on(`end`,(()=>{const last=decoder.end();if(last!==``){if(prefix!==null){reportFn(`${prefix} ${last}`)}else{reportFn(last)}}}));return stream}function createOutputStreamsWithPrefix(state,{prefix:prefix}){return{stdout:createStreamReporter((text=>state.stdout.write(`${text}\n`)),state.stdout.isTTY?prefix:null),stderr:createStreamReporter((text=>state.stderr.write(`${text}\n`)),state.stderr.isTTY?prefix:null)}}exports.createOutputStreamsWithPrefix=createOutputStreamsWithPrefix})(pipe);return pipe}var hasRequiredLib$c;function requireLib$c(){if(hasRequiredLib$c)return lib$e;hasRequiredLib$c=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.execute=exports.ShellError=exports.globUtils=void 0;const tslib_1=require$$0;const fslib_1=requireLib$e();const parsers_1=requireLib$d();const chalk_1=(0,tslib_1.__importDefault)(requireSource());const os_1=require$$0$5;const stream_1=require$$0$4;const util_1=require$$0$1;const errors_1=requireErrors();Object.defineProperty(exports,"ShellError",{enumerable:true,get:function(){return errors_1.ShellError}});const globUtils=(0,tslib_1.__importStar)(requireGlobUtils());exports.globUtils=globUtils;const pipe_1=requirePipe();const pipe_2=requirePipe();const setTimeoutPromise=(0,util_1.promisify)(setTimeout);var StreamType;(function(StreamType){StreamType[StreamType["Readable"]=1]="Readable";StreamType[StreamType["Writable"]=2]="Writable"})(StreamType||(StreamType={}));function getFileDescriptorStream(fd,type,state){const stream=new stream_1.PassThrough({autoDestroy:true});switch(fd){case pipe_2.Pipe.STDIN:{if((type&StreamType.Readable)===StreamType.Readable)state.stdin.pipe(stream,{end:false});if((type&StreamType.Writable)===StreamType.Writable&&state.stdin instanceof stream_1.Writable){stream.pipe(state.stdin,{end:false})}}break;case pipe_2.Pipe.STDOUT:{if((type&StreamType.Readable)===StreamType.Readable)state.stdout.pipe(stream,{end:false});if((type&StreamType.Writable)===StreamType.Writable){stream.pipe(state.stdout,{end:false})}}break;case pipe_2.Pipe.STDERR:{if((type&StreamType.Readable)===StreamType.Readable)state.stderr.pipe(stream,{end:false});if((type&StreamType.Writable)===StreamType.Writable){stream.pipe(state.stderr,{end:false})}}break;default:{throw new errors_1.ShellError(`Bad file descriptor: "${fd}"`)}}return stream}function cloneState(state,mergeWith={}){const newState={...state,...mergeWith};newState.environment={...state.environment,...mergeWith.environment};newState.variables={...state.variables,...mergeWith.variables};return newState}const BUILTINS=new Map([[`cd`,async([target=(0,os_1.homedir)(),...rest],opts,state)=>{const resolvedTarget=fslib_1.ppath.resolve(state.cwd,fslib_1.npath.toPortablePath(target));const stat=await opts.baseFs.statPromise(resolvedTarget).catch((error=>{throw error.code===`ENOENT`?new errors_1.ShellError(`cd: no such file or directory: ${target}`):error}));if(!stat.isDirectory())throw new errors_1.ShellError(`cd: not a directory: ${target}`);state.cwd=resolvedTarget;return 0}],[`pwd`,async(args,opts,state)=>{state.stdout.write(`${fslib_1.npath.fromPortablePath(state.cwd)}\n`);return 0}],[`:`,async(args,opts,state)=>0],[`true`,async(args,opts,state)=>0],[`false`,async(args,opts,state)=>1],[`exit`,async([code,...rest],opts,state)=>state.exitCode=parseInt(code!==null&&code!==void 0?code:state.variables[`?`],10)],[`echo`,async(args,opts,state)=>{state.stdout.write(`${args.join(` `)}\n`);return 0}],[`sleep`,async([time],opts,state)=>{if(typeof time===`undefined`)throw new errors_1.ShellError(`sleep: missing operand`);const seconds=Number(time);if(Number.isNaN(seconds))throw new errors_1.ShellError(`sleep: invalid time interval '${time}'`);return await setTimeoutPromise(1e3*seconds,0)}],[`__ysh_run_procedure`,async(args,opts,state)=>{const procedure=state.procedures[args[0]];const exitCode=await(0,pipe_2.start)(procedure,{stdin:new pipe_2.ProtectedStream(state.stdin),stdout:new pipe_2.ProtectedStream(state.stdout),stderr:new pipe_2.ProtectedStream(state.stderr)}).run();return exitCode}],[`__ysh_set_redirects`,async(args,opts,state)=>{let stdin=state.stdin;let stdout=state.stdout;let stderr=state.stderr;const inputs=[];const outputs=[];const errors=[];let t=0;while(args[t]!==`--`){const key=args[t++];const{type:type,fd:fd}=JSON.parse(key);const pushInput=readableFactory=>{switch(fd){case null:case 0:{inputs.push(readableFactory)}break;default:throw new Error(`Unsupported file descriptor: "${fd}"`)}};const pushOutput=writable=>{switch(fd){case null:case 1:{outputs.push(writable)}break;case 2:{errors.push(writable)}break;default:throw new Error(`Unsupported file descriptor: "${fd}"`)}};const count=Number(args[t++]);const last=t+count;for(let u=t;u<last;++t,++u){switch(type){case`<`:{pushInput((()=>opts.baseFs.createReadStream(fslib_1.ppath.resolve(state.cwd,fslib_1.npath.toPortablePath(args[u])))))}break;case`<<<`:{pushInput((()=>{const input=new stream_1.PassThrough;process.nextTick((()=>{input.write(`${args[u]}\n`);input.end()}));return input}))}break;case`<&`:{pushInput((()=>getFileDescriptorStream(Number(args[u]),StreamType.Readable,state)))}break;case`>`:case`>>`:{const outputPath=fslib_1.ppath.resolve(state.cwd,fslib_1.npath.toPortablePath(args[u]));if(outputPath===`/dev/null`){pushOutput(new stream_1.Writable({autoDestroy:true,emitClose:true,write(chunk,encoding,callback){setImmediate(callback)}}))}else{pushOutput(opts.baseFs.createWriteStream(outputPath,type===`>>`?{flags:`a`}:undefined))}}break;case`>&`:{pushOutput(getFileDescriptorStream(Number(args[u]),StreamType.Writable,state))}break;default:{throw new Error(`Assertion failed: Unsupported redirection type: "${type}"`)}}}}if(inputs.length>0){const pipe=new stream_1.PassThrough;stdin=pipe;const bindInput=n=>{if(n===inputs.length){pipe.end()}else{const input=inputs[n]();input.pipe(pipe,{end:false});input.on(`end`,(()=>{bindInput(n+1)}))}};bindInput(0)}if(outputs.length>0){const pipe=new stream_1.PassThrough;stdout=pipe;for(const output of outputs){pipe.pipe(output)}}if(errors.length>0){const pipe=new stream_1.PassThrough;stderr=pipe;for(const error of errors){pipe.pipe(error)}}const exitCode=await(0,pipe_2.start)(makeCommandAction(args.slice(t+1),opts,state),{stdin:new pipe_2.ProtectedStream(stdin),stdout:new pipe_2.ProtectedStream(stdout),stderr:new pipe_2.ProtectedStream(stderr)}).run();await Promise.all(outputs.map((output=>new Promise(((resolve,reject)=>{output.on(`error`,(error=>{reject(error)}));output.on(`close`,(()=>{resolve()}));output.end()})))));await Promise.all(errors.map((err=>new Promise(((resolve,reject)=>{err.on(`error`,(error=>{reject(error)}));err.on(`close`,(()=>{resolve()}));err.end()})))));return exitCode}]]);async function executeBufferedSubshell(ast,opts,state){const chunks=[];const stdout=new stream_1.PassThrough;stdout.on(`data`,(chunk=>chunks.push(chunk)));await executeShellLine(ast,opts,cloneState(state,{stdout:stdout}));return Buffer.concat(chunks).toString().replace(/[\r\n]+$/,``)}async function applyEnvVariables(environmentSegments,opts,state){const envPromises=environmentSegments.map((async envSegment=>{const interpolatedArgs=await interpolateArguments(envSegment.args,opts,state);return{name:envSegment.name,value:interpolatedArgs.join(` `)}}));const interpolatedEnvs=await Promise.all(envPromises);return interpolatedEnvs.reduce(((envs,env)=>{envs[env.name]=env.value;return envs}),{})}function split(raw){return raw.match(/[^ \r\n\t]+/g)||[]}async function evaluateVariable(segment,opts,state,push,pushAndClose=push){switch(segment.name){case`$`:{push(String(process.pid))}break;case`#`:{push(String(opts.args.length))}break;case`@`:{if(segment.quoted){for(const raw of opts.args){pushAndClose(raw)}}else{for(const raw of opts.args){const parts=split(raw);for(let t=0;t<parts.length-1;++t)pushAndClose(parts[t]);push(parts[parts.length-1])}}}break;case`*`:{const raw=opts.args.join(` `);if(segment.quoted){push(raw)}else{for(const part of split(raw)){pushAndClose(part)}}}break;case`PPID`:{push(String(process.ppid))}break;case`RANDOM`:{push(String(Math.floor(Math.random()*32768)))}break;default:{const argIndex=parseInt(segment.name,10);let raw;if(Number.isFinite(argIndex)){if(argIndex>=0&&argIndex<opts.args.length){raw=opts.args[argIndex]}else if(segment.defaultValue){raw=(await interpolateArguments(segment.defaultValue,opts,state)).join(` `)}else if(segment.alternativeValue){raw=(await interpolateArguments(segment.alternativeValue,opts,state)).join(` `)}else{throw new errors_1.ShellError(`Unbound argument #${argIndex}`)}}else{if(Object.prototype.hasOwnProperty.call(state.variables,segment.name)){raw=state.variables[segment.name]}else if(Object.prototype.hasOwnProperty.call(state.environment,segment.name)){raw=state.environment[segment.name]}else if(segment.defaultValue){raw=(await interpolateArguments(segment.defaultValue,opts,state)).join(` `)}else{throw new errors_1.ShellError(`Unbound variable "${segment.name}"`)}}if(typeof raw!==`undefined`&&segment.alternativeValue)raw=(await interpolateArguments(segment.alternativeValue,opts,state)).join(` `);if(segment.quoted){push(raw)}else{const parts=split(raw);for(let t=0;t<parts.length-1;++t)pushAndClose(parts[t]);const part=parts[parts.length-1];if(typeof part!==`undefined`){push(part)}}}break}}const operators={addition:(left,right)=>left+right,subtraction:(left,right)=>left-right,multiplication:(left,right)=>left*right,division:(left,right)=>Math.trunc(left/right)};async function evaluateArithmetic(arithmetic,opts,state){if(arithmetic.type===`number`){if(!Number.isInteger(arithmetic.value)){throw new Error(`Invalid number: "${arithmetic.value}", only integers are allowed`)}else{return arithmetic.value}}else if(arithmetic.type===`variable`){const parts=[];await evaluateVariable({...arithmetic,quoted:true},opts,state,(result=>parts.push(result)));const number=Number(parts.join(` `));if(Number.isNaN(number)){return evaluateArithmetic({type:`variable`,name:parts.join(` `)},opts,state)}else{return evaluateArithmetic({type:`number`,value:number},opts,state)}}else{return operators[arithmetic.type](await evaluateArithmetic(arithmetic.left,opts,state),await evaluateArithmetic(arithmetic.right,opts,state))}}async function interpolateArguments(commandArgs,opts,state){const redirections=new Map;const interpolated=[];let interpolatedSegments=[];const push=segment=>{interpolatedSegments.push(segment)};const close=()=>{if(interpolatedSegments.length>0)interpolated.push(interpolatedSegments.join(``));interpolatedSegments=[]};const pushAndClose=segment=>{push(segment);close()};const redirect=(type,fd,target)=>{const key=JSON.stringify({type:type,fd:fd});let targets=redirections.get(key);if(typeof targets===`undefined`)redirections.set(key,targets=[]);targets.push(target)};for(const commandArg of commandArgs){let isGlob=false;switch(commandArg.type){case`redirection`:{const interpolatedArgs=await interpolateArguments(commandArg.args,opts,state);for(const interpolatedArg of interpolatedArgs){redirect(commandArg.subtype,commandArg.fd,interpolatedArg)}}break;case`argument`:{for(const segment of commandArg.segments){switch(segment.type){case`text`:{push(segment.text)}break;case`glob`:{push(segment.pattern);isGlob=true}break;case`shell`:{const raw=await executeBufferedSubshell(segment.shell,opts,state);if(segment.quoted){push(raw)}else{const parts=split(raw);for(let t=0;t<parts.length-1;++t)pushAndClose(parts[t]);push(parts[parts.length-1])}}break;case`variable`:{await evaluateVariable(segment,opts,state,push,pushAndClose)}break;case`arithmetic`:{push(String(await evaluateArithmetic(segment.arithmetic,opts,state)))}break}}}break}close();if(isGlob){const pattern=interpolated.pop();if(typeof pattern===`undefined`)throw new Error(`Assertion failed: Expected a glob pattern to have been set`);const matches=await opts.glob.match(pattern,{cwd:state.cwd,baseFs:opts.baseFs});if(matches.length===0){const braceExpansionNotice=globUtils.isBraceExpansion(pattern)?`. Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22`:``;throw new errors_1.ShellError(`No matches found: "${pattern}"${braceExpansionNotice}`)}for(const match of matches.sort()){pushAndClose(match)}}}if(redirections.size>0){const redirectionArgs=[];for(const[key,targets]of redirections.entries())redirectionArgs.splice(redirectionArgs.length,0,key,String(targets.length),...targets);interpolated.splice(0,0,`__ysh_set_redirects`,...redirectionArgs,`--`)}return interpolated}function makeCommandAction(args,opts,state){if(!opts.builtins.has(args[0]))args=[`command`,...args];const nativeCwd=fslib_1.npath.fromPortablePath(state.cwd);let env=state.environment;if(typeof env.PWD!==`undefined`)env={...env,PWD:nativeCwd};const[name,...rest]=args;if(name===`command`){return(0,pipe_1.makeProcess)(rest[0],rest.slice(1),opts,{cwd:nativeCwd,env:env})}const builtin=opts.builtins.get(name);if(typeof builtin===`undefined`)throw new Error(`Assertion failed: A builtin should exist for "${name}"`);return(0,pipe_1.makeBuiltin)((async({stdin:stdin,stdout:stdout,stderr:stderr})=>{const{stdin:initialStdin,stdout:initialStdout,stderr:initialStderr}=state;state.stdin=stdin;state.stdout=stdout;state.stderr=stderr;try{return await builtin(rest,opts,state)}finally{state.stdin=initialStdin;state.stdout=initialStdout;state.stderr=initialStderr}}))}function makeSubshellAction(ast,opts,state){return stdio=>{const stdin=new stream_1.PassThrough;const promise=executeShellLine(ast,opts,cloneState(state,{stdin:stdin}));return{stdin:stdin,promise:promise}}}function makeGroupAction(ast,opts,state){return stdio=>{const stdin=new stream_1.PassThrough;const promise=executeShellLine(ast,opts,state);return{stdin:stdin,promise:promise}}}function makeActionFromProcedure(procedure,args,opts,activeState){if(args.length===0){return procedure}else{let key;do{key=String(Math.random())}while(Object.prototype.hasOwnProperty.call(activeState.procedures,key));activeState.procedures={...activeState.procedures};activeState.procedures[key]=procedure;return makeCommandAction([...args,`__ysh_run_procedure`,key],opts,activeState)}}async function executeCommandChainImpl(node,opts,state){let current=node;let pipeType=null;let execution=null;while(current){const activeState=current.then?{...state}:state;let action;switch(current.type){case`command`:{const args=await interpolateArguments(current.args,opts,state);const environment=await applyEnvVariables(current.envs,opts,state);action=current.envs.length?makeCommandAction(args,opts,cloneState(activeState,{environment:environment})):makeCommandAction(args,opts,activeState)}break;case`subshell`:{const args=await interpolateArguments(current.args,opts,state);const procedure=makeSubshellAction(current.subshell,opts,activeState);action=makeActionFromProcedure(procedure,args,opts,activeState)}break;case`group`:{const args=await interpolateArguments(current.args,opts,state);const procedure=makeGroupAction(current.group,opts,activeState);action=makeActionFromProcedure(procedure,args,opts,activeState)}break;case`envs`:{const environment=await applyEnvVariables(current.envs,opts,state);activeState.environment={...activeState.environment,...environment};action=makeCommandAction([`true`],opts,activeState)}break}if(typeof action===`undefined`)throw new Error(`Assertion failed: An action should have been generated`);if(pipeType===null){execution=(0,pipe_2.start)(action,{stdin:new pipe_2.ProtectedStream(activeState.stdin),stdout:new pipe_2.ProtectedStream(activeState.stdout),stderr:new pipe_2.ProtectedStream(activeState.stderr)})}else{if(execution===null)throw new Error(`Assertion failed: The execution pipeline should have been setup`);switch(pipeType){case`|`:{execution=execution.pipeTo(action,pipe_2.Pipe.STDOUT)}break;case`|&`:{execution=execution.pipeTo(action,pipe_2.Pipe.STDOUT|pipe_2.Pipe.STDERR)}break}}if(current.then){pipeType=current.then.type;current=current.then.chain}else{current=null}}if(execution===null)throw new Error(`Assertion failed: The execution pipeline should have been setup`);return await execution.run()}async function executeCommandChain(node,opts,state,{background:background=false}={}){function getColorizer(index){const colors=[`#2E86AB`,`#A23B72`,`#F18F01`,`#C73E1D`,`#CCE2A3`];const colorName=colors[index%colors.length];return chalk_1.default.hex(colorName)}if(background){const index=state.nextBackgroundJobIndex++;const colorizer=getColorizer(index);const rawPrefix=`[${index}]`;const prefix=colorizer(rawPrefix);const{stdout:stdout,stderr:stderr}=(0,pipe_1.createOutputStreamsWithPrefix)(state,{prefix:prefix});state.backgroundJobs.push(executeCommandChainImpl(node,opts,cloneState(state,{stdout:stdout,stderr:stderr})).catch((error=>stderr.write(`${error.message}\n`))).finally((()=>{if(state.stdout.isTTY){state.stdout.write(`Job ${prefix}, '${colorizer((0,parsers_1.stringifyCommandChain)(node))}' has ended\n`)}})));return 0}return await executeCommandChainImpl(node,opts,state)}async function executeCommandLine(node,opts,state,{background:background=false}={}){let code;const setCode=newCode=>{code=newCode;state.variables[`?`]=String(newCode)};const executeChain=async line=>{try{return await executeCommandChain(line.chain,opts,state,{background:background&&typeof line.then===`undefined`})}catch(error){if(!(error instanceof errors_1.ShellError))throw error;state.stderr.write(`${error.message}\n`);return 1}};setCode(await executeChain(node));while(node.then){if(state.exitCode!==null)return state.exitCode;switch(node.then.type){case`&&`:{if(code===0){setCode(await executeChain(node.then.line))}}break;case`||`:{if(code!==0){setCode(await executeChain(node.then.line))}}break;default:{throw new Error(`Assertion failed: Unsupported command type: "${node.then.type}"`)}}node=node.then.line}return code}async function executeShellLine(node,opts,state){const originalBackgroundJobs=state.backgroundJobs;state.backgroundJobs=[];let rightMostExitCode=0;for(const{command:command,type:type}of node){rightMostExitCode=await executeCommandLine(command,opts,state,{background:type===`&`});if(state.exitCode!==null)return state.exitCode;state.variables[`?`]=String(rightMostExitCode)}await Promise.all(state.backgroundJobs);state.backgroundJobs=originalBackgroundJobs;return rightMostExitCode}function locateArgsVariableInSegment(segment){switch(segment.type){case`variable`:{return segment.name===`@`||segment.name===`#`||segment.name===`*`||Number.isFinite(parseInt(segment.name,10))||`defaultValue`in segment&&!!segment.defaultValue&&segment.defaultValue.some((arg=>locateArgsVariableInArgument(arg)))||`alternativeValue`in segment&&!!segment.alternativeValue&&segment.alternativeValue.some((arg=>locateArgsVariableInArgument(arg)))}case`arithmetic`:{return locateArgsVariableInArithmetic(segment.arithmetic)}case`shell`:{return locateArgsVariable(segment.shell)}default:{return false}}}function locateArgsVariableInArgument(arg){switch(arg.type){case`redirection`:{return arg.args.some((arg=>locateArgsVariableInArgument(arg)))}case`argument`:{return arg.segments.some((segment=>locateArgsVariableInSegment(segment)))}default:throw new Error(`Assertion failed: Unsupported argument type: "${arg.type}"`)}}function locateArgsVariableInArithmetic(arg){switch(arg.type){case`variable`:{return locateArgsVariableInSegment(arg)}case`number`:{return false}default:return locateArgsVariableInArithmetic(arg.left)||locateArgsVariableInArithmetic(arg.right)}}function locateArgsVariable(node){return node.some((({command:command})=>{while(command){let chain=command.chain;while(chain){let hasArgs;switch(chain.type){case`subshell`:{hasArgs=locateArgsVariable(chain.subshell)}break;case`command`:{hasArgs=chain.envs.some((env=>env.args.some((arg=>locateArgsVariableInArgument(arg)))))||chain.args.some((arg=>locateArgsVariableInArgument(arg)))}break}if(hasArgs)return true;if(!chain.then)break;chain=chain.then.chain}if(!command.then)break;command=command.then.line}return false}))}async function execute(command,args=[],{baseFs:baseFs=new fslib_1.NodeFS,builtins:builtins={},cwd:cwd=fslib_1.npath.toPortablePath(process.cwd()),env:env=process.env,stdin:stdin=process.stdin,stdout:stdout=process.stdout,stderr:stderr=process.stderr,variables:variables={},glob:glob=globUtils}={}){const normalizedEnv={};for(const[key,value]of Object.entries(env))if(typeof value!==`undefined`)normalizedEnv[key]=value;const normalizedBuiltins=new Map(BUILTINS);for(const[key,builtin]of Object.entries(builtins))normalizedBuiltins.set(key,builtin);if(stdin===null){stdin=new stream_1.PassThrough;stdin.end()}const ast=(0,parsers_1.parseShell)(command,glob);if(!locateArgsVariable(ast)&&ast.length>0&&args.length>0){let{command:command}=ast[ast.length-1];while(command.then)command=command.then.line;let chain=command.chain;while(chain.then)chain=chain.then.chain;if(chain.type===`command`){chain.args=chain.args.concat(args.map((arg=>({type:`argument`,segments:[{type:`text`,text:arg}]}))))}}return await executeShellLine(ast,{args:args,baseFs:baseFs,builtins:normalizedBuiltins,initialStdin:stdin,initialStdout:stdout,initialStderr:stderr,glob:glob},{cwd:cwd,environment:normalizedEnv,exitCode:null,procedures:{},stdin:stdin,stdout:stdout,stderr:stderr,variables:Object.assign({},variables,{[`?`]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}exports.execute=execute})(lib$e);return lib$e}var slide={};var asyncMap_1;var hasRequiredAsyncMap;function requireAsyncMap(){if(hasRequiredAsyncMap)return asyncMap_1;hasRequiredAsyncMap=1;asyncMap_1=asyncMap;function asyncMap(){var steps=Array.prototype.slice.call(arguments),list=steps.shift()||[],cb_=steps.pop();if(typeof cb_!=="function")throw new Error("No callback provided to asyncMap");if(!list)return cb_(null,[]);if(!Array.isArray(list))list=[list];var n=steps.length,data=[],errState=null,l=list.length,a=l*n;if(!a)return cb_(null,[]);function cb(er){if(er&&!errState)errState=er;var argLen=arguments.length;for(var i=1;i<argLen;i++)if(arguments[i]!==undefined){data[i-1]=(data[i-1]||[]).concat(arguments[i])}if(list.length>l){var newList=list.slice(l);a+=(list.length-l)*n;l=list.length;process.nextTick((function(){newList.forEach((function(ar){steps.forEach((function(fn){fn(ar,cb)}))}))}))}if(--a===0)cb_.apply(null,[errState].concat(data))}list.forEach((function(ar){steps.forEach((function(fn){fn(ar,cb)}))}))}return asyncMap_1}var bindActor_1;var hasRequiredBindActor;function requireBindActor(){if(hasRequiredBindActor)return bindActor_1;hasRequiredBindActor=1;bindActor_1=bindActor;function bindActor(){var args=Array.prototype.slice.call(arguments),obj=null,fn;if(typeof args[0]==="object"){obj=args.shift();fn=args.shift();if(typeof fn==="string")fn=obj[fn]}else fn=args.shift();return function(cb){fn.apply(obj,args.concat(cb))}}return bindActor_1}var chain_1;var hasRequiredChain;function requireChain(){if(hasRequiredChain)return chain_1;hasRequiredChain=1;chain_1=chain;var bindActor=requireBindActor();chain.first={};chain.last={};function chain(things,cb){var res=[];(function LOOP(i,len){if(i>=len)return cb(null,res);if(Array.isArray(things[i]))things[i]=bindActor.apply(null,things[i].map((function(i){return i===chain.first?res[0]:i===chain.last?res[res.length-1]:i})));if(!things[i])return LOOP(i+1,len);things[i]((function(er,data){if(er)return cb(er,res);if(data!==undefined)res=res.concat(data);LOOP(i+1,len)}))})(0,things.length)}return chain_1}var hasRequiredSlide;function requireSlide(){if(hasRequiredSlide)return slide;hasRequiredSlide=1;slide.asyncMap=requireAsyncMap();slide.bindActor=requireBindActor();slide.chain=requireChain();return slide}var uidNumber_1;var hasRequiredUidNumber;function requireUidNumber(){if(hasRequiredUidNumber)return uidNumber_1;hasRequiredUidNumber=1;uidNumber_1=uidNumber;var child_process=require$$0$8,uidSupport=process.getuid&&process.setuid,uidCache={},gidCache={};function uidNumber(uid,gid,cb){if(!uidSupport)return cb();if(typeof cb!=="function")cb=gid,gid=null;if(typeof cb!=="function")cb=uid,uid=null;if(gid==null)gid=process.getgid();if(uid==null)uid=process.getuid();if(!isNaN(gid))gid=gidCache[gid]=+gid;if(!isNaN(uid))uid=uidCache[uid]=+uid;if(uidCache.hasOwnProperty(uid))uid=uidCache[uid];if(gidCache.hasOwnProperty(gid))gid=gidCache[gid];if(typeof gid==="number"&&typeof uid==="number"){return process.nextTick(cb.bind(null,null,uid,gid))}var getter=require.resolve("./get-uid-gid.js");child_process.execFile(process.execPath,[getter,uid,gid],(function(code,out,stderr){if(code){var er=new Error("could not get uid/gid\n"+stderr);er.code=code;return cb(er)}try{out=JSON.parse(out+"")}catch(ex){return cb(ex)}if(out.error){var er=new Error(out.error);er.errno=out.errno;return cb(er)}if(isNaN(out.uid)||isNaN(out.gid))return cb(new Error("Could not get uid/gid: "+JSON.stringify(out)));cb(null,uidCache[uid]=+out.uid,gidCache[gid]=+out.gid)}))}return uidNumber_1}var umask={};var hasRequiredUmask;function requireUmask(){if(hasRequiredUmask)return umask;hasRequiredUmask=1;var util=require$$0$1;function toString(val){val=val.toString(8);while(val.length<4){val="0"+val}return val}var defaultUmask=18;var defaultUmaskString=toString(defaultUmask);function validate(data,k,val){if(typeof val==="number"&&!isNaN(val)){data[k]=val;return true}if(typeof val==="string"){if(val.charAt(0)!=="0"){return false}data[k]=parseInt(val,8);return true}return false}function convert_fromString(val,cb){if(typeof val==="string"){if(val.charAt(0)==="0"&&/^[0-7]+$/.test(val)){val=parseInt(val,8)}else if(val.charAt(0)!=="0"&&/^[0-9]+$/.test(val)){val=parseInt(val,10)}else{return cb(new Error(util.format("Expected octal string, got %j, defaulting to %j",val,defaultUmaskString)),defaultUmask)}}else if(typeof val!=="number"){return cb(new Error(util.format("Expected number or octal string, got %j, defaulting to %j",val,defaultUmaskString)),defaultUmask)}val=Math.floor(val);if(val<0||val>511){return cb(new Error(util.format("Must be in range 0..511 (0000..0777), got %j",val)),defaultUmask)}cb(null,val)}function fromString(val,cb){convert_fromString(val,cb||function(err,result){val=result});return val}umask.toString=toString;umask.fromString=fromString;umask.validate=validate;return umask}var byline={exports:{}};var hasRequiredByline;function requireByline(){if(hasRequiredByline)return byline.exports;hasRequiredByline=1;(function(module){var stream=require$$0$4,util=require$$0$1,timers=require$$2$2;module.exports=function(readStream,options){return module.exports.createStream(readStream,options)};module.exports.createStream=function(readStream,options){if(readStream){return createLineStream(readStream,options)}else{return new LineStream(options)}};module.exports.createLineStream=function(readStream){console.log("WARNING: byline#createLineStream is deprecated and will be removed soon");return createLineStream(readStream)};function createLineStream(readStream,options){if(!readStream){throw new Error("expected readStream")}if(!readStream.readable){throw new Error("readStream must be readable")}var ls=new LineStream(options);readStream.pipe(ls);return ls}module.exports.LineStream=LineStream;function LineStream(options){stream.Transform.call(this,options);options=options||{};this._readableState.objectMode=true;this._lineBuffer=[];this._keepEmptyLines=options.keepEmptyLines||false;this._lastChunkEndedWithCR=false;var self=this;this.on("pipe",(function(src){if(!self.encoding){if(src instanceof stream.Readable){self.encoding=src._readableState.encoding}}}))}util.inherits(LineStream,stream.Transform);LineStream.prototype._transform=function(chunk,encoding,done){encoding=encoding||"utf8";if(Buffer.isBuffer(chunk)){if(encoding=="buffer"){chunk=chunk.toString();encoding="utf8"}else{chunk=chunk.toString(encoding)}}this._chunkEncoding=encoding;var lines=chunk.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g);if(this._lastChunkEndedWithCR&&chunk[0]=="\n"){lines.shift()}if(this._lineBuffer.length>0){this._lineBuffer[this._lineBuffer.length-1]+=lines[0];lines.shift()}this._lastChunkEndedWithCR=chunk[chunk.length-1]=="\r";this._lineBuffer=this._lineBuffer.concat(lines);this._pushBuffer(encoding,1,done)};LineStream.prototype._pushBuffer=function(encoding,keep,done){while(this._lineBuffer.length>keep){var line=this._lineBuffer.shift();if(this._keepEmptyLines||line.length>0){if(!this.push(this._reencode(line,encoding))){var self=this;timers.setImmediate((function(){self._pushBuffer(encoding,keep,done)}));return}}}done()};LineStream.prototype._flush=function(done){this._pushBuffer(this._chunkEncoding,0,done)};LineStream.prototype._reencode=function(line,chunkEncoding){if(this.encoding&&this.encoding!=chunkEncoding){return Buffer.from(line,chunkEncoding).toString(this.encoding)}else if(this.encoding){return line}else{return Buffer.from(line,chunkEncoding)}}})(byline);return byline.exports}var resolveFrom={exports:{}};var hasRequiredResolveFrom;function requireResolveFrom(){if(hasRequiredResolveFrom)return resolveFrom.exports;hasRequiredResolveFrom=1;const path=require$$0$6;const Module=require$$1$7;const fs=require$$0$2;const resolveFrom$1=(fromDirectory,moduleId,silent)=>{if(typeof fromDirectory!=="string"){throw new TypeError(`Expected \`fromDir\` to be of type \`string\`, got \`${typeof fromDirectory}\``)}if(typeof moduleId!=="string"){throw new TypeError(`Expected \`moduleId\` to be of type \`string\`, got \`${typeof moduleId}\``)}try{fromDirectory=fs.realpathSync(fromDirectory)}catch(error){if(error.code==="ENOENT"){fromDirectory=path.resolve(fromDirectory)}else if(silent){return}else{throw error}}const fromFile=path.join(fromDirectory,"noop.js");const resolveFileName=()=>Module._resolveFilename(moduleId,{id:fromFile,filename:fromFile,paths:Module._nodeModulePaths(fromDirectory)});if(silent){try{return resolveFileName()}catch(error){return}}return resolveFileName()};resolveFrom.exports=(fromDirectory,moduleId)=>resolveFrom$1(fromDirectory,moduleId);resolveFrom.exports.silent=(fromDirectory,moduleId)=>resolveFrom$1(fromDirectory,moduleId,true);return resolveFrom.exports}var extendPath;var hasRequiredExtendPath;function requireExtendPath(){if(hasRequiredExtendPath)return extendPath;hasRequiredExtendPath=1;const path=require$$0$6;const which=requireWhich();extendPath=(wd,originalPath,nodeGyp,opts)=>{const pathArr=[...opts.extraBinPaths||[]];const p=wd.split(/[\\/]node_modules[\\/]/);let acc=path.resolve(p.shift());pathArr.unshift(nodeGyp);p.forEach((pp=>{pathArr.unshift(path.join(acc,"node_modules",".bin"));acc=path.join(acc,"node_modules",pp)}));pathArr.unshift(path.join(acc,"node_modules",".bin"));if(shouldPrependCurrentNodeDirToPATH(opts)){pathArr.push(path.dirname(process.execPath))}if(originalPath)pathArr.push(originalPath);return pathArr.join(process.platform==="win32"?";":":")};function shouldPrependCurrentNodeDirToPATH(opts){const cfgsetting=opts.scriptsPrependNodePath;if(cfgsetting===false||cfgsetting==null)return false;if(cfgsetting===true)return true;let isDifferentNodeInPath;const isWindows=process.platform==="win32";let foundExecPath;try{foundExecPath=which.sync(path.basename(process.execPath),{pathExt:isWindows?";":":"});isDifferentNodeInPath=fs.realpathSync(process.execPath).toUpperCase()!==fs.realpathSync(foundExecPath).toUpperCase()}catch(e){isDifferentNodeInPath=true}if(cfgsetting==="warn-only"){if(isDifferentNodeInPath&&!shouldPrependCurrentNodeDirToPATH.hasWarned){if(foundExecPath){opts.log.warn("lifecycle",`The node binary used for scripts is ${foundExecPath} but pnpm is using ${process.execPath} itself. Use the \`--scripts-prepend-node-path\` option to include the path for the node binary pnpm was executed with.`)}else{opts.log.warn("lifecycle",`pnpm is using ${process.execPath} but there is no node binary in the current PATH. Use the \`--scripts-prepend-node-path\` option to include the path for the node binary pnpm was executed with.`)}shouldPrependCurrentNodeDirToPATH.hasWarned=true}return false}return isDifferentNodeInPath}return extendPath}var hasRequiredNpmLifecycle;function requireNpmLifecycle(){if(hasRequiredNpmLifecycle)return npmLifecycle.exports;hasRequiredNpmLifecycle=1;(function(module,exports){exports=module.exports=lifecycle;exports.makeEnv=makeEnv;const spawn=requireSpawn();const{execute:execute}=requireLib$c();const path=require$$0$6;const Stream=require$$0$4.Stream;const fs=require$$0$2;const chain=requireSlide().chain;const uidNumber=requireUidNumber();const umask=requireUmask();const byline=requireByline();const{PnpmError:PnpmError}=requireLib$m();const resolveFrom=requireResolveFrom();const{PassThrough:PassThrough}=require$$0$4;const extendPath=requireExtendPath();let DEFAULT_NODE_GYP_PATH;try{DEFAULT_NODE_GYP_PATH=resolveFrom(__dirname,"node-gyp/bin/node-gyp")}catch(err){}const hookStatCache=new Map;let PATH="PATH";if(process.platform==="win32"){PATH="Path";Object.keys(process.env).forEach((e=>{if(e.match(/^PATH$/i)){PATH=e}}))}function logid(pkg,stage){return`${pkg._id}~${stage}:`}function hookStat(dir,stage,cb){const hook=path.join(dir,".hooks",stage);const cachedStatError=hookStatCache.get(hook);if(cachedStatError===undefined){return fs.stat(hook,(statError=>{hookStatCache.set(hook,statError);cb(statError)}))}return setImmediate((()=>cb(cachedStatError)))}function lifecycle(pkg,stage,wd,opts){return new Promise(((resolve,reject)=>{while(pkg&&pkg._data)pkg=pkg._data;if(!pkg)return reject(new Error("Invalid package data"));opts.log.info("lifecycle",logid(pkg,stage),pkg._id);if(!pkg.scripts)pkg.scripts={};if(stage==="prepublish"&&opts.ignorePrepublish){opts.log.info("lifecycle",logid(pkg,stage),"ignored because ignore-prepublish is set to true",pkg._id);delete pkg.scripts.prepublish}hookStat(opts.dir,stage,(statError=>{if(!pkg.scripts[stage]&&statError)return resolve();validWd(wd||path.resolve(opts.dir,pkg.name),((er,wd)=>{if(er)return reject(er);const env=makeEnv(pkg,opts);env.npm_lifecycle_event=stage;env.npm_node_execpath=env.NODE=env.NODE||process.execPath;if(process.pkg!=null){env.npm_execpath=process.execPath}else{env.npm_execpath=require.main?require.main.filename:process.cwd()}env.INIT_CWD=process.cwd();env.npm_config_node_gyp=env.npm_config_node_gyp||DEFAULT_NODE_GYP_PATH;if(opts.extraEnv){for(const[key,value]of Object.entries(opts.extraEnv)){env[key]=value}}if(!opts.unsafePerm)env.TMPDIR=wd;lifecycle_(pkg,stage,wd,opts,env,(er=>{if(er)return reject(er);return resolve()}))}))}))}))}function lifecycle_(pkg,stage,wd,opts,env,cb){env[PATH]=extendPath(wd,env[PATH],path.join(__dirname,"node-gyp-bin"),opts);let packageLifecycle=pkg.scripts&&pkg.scripts.hasOwnProperty(stage);if(opts.ignoreScripts){opts.log.info("lifecycle",logid(pkg,stage),"ignored because ignore-scripts is set to true",pkg._id);packageLifecycle=false}else if(packageLifecycle){env.npm_lifecycle_script=pkg.scripts[stage]}else{opts.log.silly("lifecycle",logid(pkg,stage),`no script for ${stage}, continuing`)}function done(er){if(er){if(opts.force){opts.log.info("lifecycle",logid(pkg,stage),"forced, continuing",er);er=null}else if(opts.failOk){opts.log.warn("lifecycle",logid(pkg,stage),"continuing anyway",er.message);er=null}}cb(er)}chain([packageLifecycle&&[runPackageLifecycle,pkg,stage,env,wd,opts],[runHookLifecycle,pkg,stage,env,wd,opts]],done)}function validWd(d,cb){fs.stat(d,((er,st)=>{if(er||!st.isDirectory()){const p=path.dirname(d);if(p===d){return cb(new Error("Could not find suitable wd"))}return validWd(p,cb)}return cb(null,d)}))}function runPackageLifecycle(pkg,stage,env,wd,opts,cb){const cmd=env.npm_lifecycle_script;const note=`\n> ${pkg._id} ${stage} ${wd}\n> ${cmd}\n`;runCmd(note,cmd,pkg,env,stage,wd,opts,cb)}let running=false;const queue=[];function dequeue(){running=false;if(queue.length){const r=queue.shift();runCmd.apply(null,r)}}function runCmd(note,cmd,pkg,env,stage,wd,opts,cb){if(opts.runConcurrently!==true){if(running){queue.push([note,cmd,pkg,env,stage,wd,opts,cb]);return}running=true}opts.log.pause();let unsafe=opts.unsafePerm;const user=unsafe?null:opts.user;const group=unsafe?null:opts.group;if(opts.log.level!=="silent"){opts.log.clearProgress();console.log(note);opts.log.showProgress()}opts.log.verbose("lifecycle",logid(pkg,stage),"unsafe-perm in lifecycle",unsafe);if(process.platform==="win32"){unsafe=true}if(unsafe){runCmd_(cmd,pkg,env,wd,opts,stage,unsafe,0,0,cb)}else{uidNumber(user,group,((er,uid,gid)=>{runCmd_(cmd,pkg,env,wd,opts,stage,unsafe,uid,gid,cb)}))}}function runCmd_(cmd,pkg,env,wd,opts,stage,unsafe,uid,gid,cb_){function cb(er){cb_.apply(null,arguments);opts.log.resume();process.nextTick(dequeue)}const conf={cwd:wd,env:env,stdio:opts.stdio||[0,1,2]};if(!unsafe){conf.uid=uid^0;conf.gid=gid^0}let sh="sh";let shFlag="-c";const customShell=opts.scriptShell;if(customShell){sh=customShell}else if(process.platform==="win32"){sh=process.env.comspec||"cmd";shFlag="/d /s /c";conf.windowsVerbatimArguments=true}opts.log.verbose("lifecycle",logid(pkg,stage),"PATH:",env[PATH]);opts.log.verbose("lifecycle",logid(pkg,stage),"CWD:",wd);opts.log.silly("lifecycle",logid(pkg,stage),"Args:",[shFlag,cmd]);if(opts.shellEmulator){const execOpts={cwd:wd,env:env};if(opts.stdio==="pipe"){const stdout=new PassThrough;const stderr=new PassThrough;byline(stdout).on("data",(data=>{opts.log.verbose("lifecycle",logid(pkg,stage),"stdout",data.toString())}));byline(stderr).on("data",(data=>{opts.log.verbose("lifecycle",logid(pkg,stage),"stderr",data.toString())}));execOpts.stdout=stdout;execOpts.stderr=stderr}execute(cmd,[],execOpts).then((code=>{opts.log.silly("lifecycle",logid(pkg,stage),"Returned: code:",code);if(code){var er=new Error(`Exit status ${code}`);er.errno=code}procError(er)})).catch((err=>procError(err)));return}const proc=spawn(sh,[shFlag,cmd],conf,opts.log);proc.on("error",procError);proc.on("close",((code,signal)=>{opts.log.silly("lifecycle",logid(pkg,stage),"Returned: code:",code," signal:",signal);let err;if(signal){err=new PnpmError("CHILD_PROCESS_FAILED",`Command failed with signal "${signal}"`);process.kill(process.pid,signal)}else if(code){err=new PnpmError("CHILD_PROCESS_FAILED",`Exit status ${code}`);err.errno=code}procError(err)}));byline(proc.stdout).on("data",(data=>{opts.log.verbose("lifecycle",logid(pkg,stage),"stdout",data.toString())}));byline(proc.stderr).on("data",(data=>{opts.log.verbose("lifecycle",logid(pkg,stage),"stderr",data.toString())}));process.once("SIGTERM",procKill);process.once("SIGINT",procInterupt);process.on("exit",procKill);function procError(er){if(er){opts.log.info("lifecycle",logid(pkg,stage),`Failed to exec ${stage} script`);er.message=`${pkg._id} ${stage}: \`${cmd}\`\n${er.message}`;if(er.code!=="EPERM"){er.code="ELIFECYCLE"}fs.stat(opts.dir,((statError,d)=>{if(statError&&statError.code==="ENOENT"&&opts.dir.split(path.sep).slice(-1)[0]==="node_modules"){opts.log.warn("","Local package.json exists, but node_modules missing, did you mean to install?")}}));er.pkgid=pkg._id;er.stage=stage;er.script=cmd;er.pkgname=pkg.name}process.removeListener("SIGTERM",procKill);process.removeListener("SIGTERM",procInterupt);process.removeListener("SIGINT",procKill);return cb(er)}let called=false;function procKill(){if(called)return;called=true;proc.kill()}function procInterupt(){proc.kill("SIGINT");proc.on("exit",(()=>{process.exit()}));process.once("SIGINT",procKill)}}function runHookLifecycle(pkg,stage,env,wd,opts,cb){hookStat(opts.dir,stage,(er=>{if(er)return cb();const cmd=path.join(opts.dir,".hooks",stage);const note=`\n> ${pkg._id} ${stage} ${wd}\n> ${cmd}`;runCmd(note,cmd,pkg,env,stage,wd,opts,cb)}))}function makeEnv(data,opts,prefix,env){prefix=prefix||"npm_package_";if(!env){env={};for(var i in process.env){if(!i.match(/^npm_/)&&(!i.match(/^PATH$/i)||i===PATH)){env[i]=process.env[i]}}if(opts.production)env.NODE_ENV="production"}else if(!data.hasOwnProperty("_lifecycleEnv")){Object.defineProperty(data,"_lifecycleEnv",{value:env,enumerable:false})}if(opts.nodeOptions)env.NODE_OPTIONS=opts.nodeOptions;for(i in data){if(i.charAt(0)!=="_"){const envKey=(prefix+i).replace(/[^a-zA-Z0-9_]/g,"_");if(i==="readme"){continue}if(data[i]&&typeof data[i]==="object"){try{JSON.stringify(data[i]);makeEnv(data[i],opts,`${envKey}_`,env)}catch(ex){const d=data[i];makeEnv({name:d.name,version:d.version,path:d.path},opts,`${envKey}_`,env)}}else{env[envKey]=String(data[i]);env[envKey]=env[envKey].includes("\n")?JSON.stringify(env[envKey]):env[envKey]}}}if(prefix!=="npm_package_")return env;prefix="npm_config_";const pkgConfig={};const pkgVerConfig={};const namePref=`${data.name}:`;const verPref=`${data.name}@${data.version}:`;Object.keys(opts.config).forEach((i=>{if(i.charAt(0)==="_"&&i.indexOf(`_${namePref}`)!==0||i.match(/:_/)){return}let value=opts.config[i];if(value instanceof Stream||Array.isArray(value))return;if(i.match(/umask/))value=umask.toString(value);if(!value)value="";else if(typeof value==="number")value=`${value}`;else if(typeof value!=="string")value=JSON.stringify(value);value=value.includes("\n")?JSON.stringify(value):value;i=i.replace(/^_+/,"");let k;if(i.indexOf(namePref)===0){k=i.substr(namePref.length).replace(/[^a-zA-Z0-9_]/g,"_");pkgConfig[k]=value}else if(i.indexOf(verPref)===0){k=i.substr(verPref.length).replace(/[^a-zA-Z0-9_]/g,"_");pkgVerConfig[k]=value}const envKey=(prefix+i).replace(/[^a-zA-Z0-9_]/g,"_");env[envKey]=value}));prefix="npm_package_config_";[pkgConfig,pkgVerConfig].forEach((conf=>{for(const i in conf){const envKey=prefix+i;env[envKey]=conf[i]}}));return env}})(npmLifecycle,npmLifecycle.exports);return npmLifecycle.exports}var hasRequiredRunLifecycleHook;function requireRunLifecycleHook(){if(hasRequiredRunLifecycleHook)return runLifecycleHook;hasRequiredRunLifecycleHook=1;var __importDefault=runLifecycleHook&&runLifecycleHook.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(runLifecycleHook,"__esModule",{value:true});runLifecycleHook.runLifecycleHook=void 0;const core_loggers_1=requireLib$f();const logger_1=requireLib$g();const npm_lifecycle_1=__importDefault(requireNpmLifecycle());const error_1=requireLib$m();const fs_1=require$$0$2;function noop(){}async function runLifecycleHook$1(stage,manifest,opts){const optional=opts.optional===true;const m={_id:getId(manifest),...manifest};m.scripts={...m.scripts};if(stage==="start"&&!m.scripts.start){if(!(0,fs_1.existsSync)("server.js")){throw new error_1.PnpmError("NO_SCRIPT_OR_SERVER","Missing script start or file server.js")}m.scripts.start="node server.js"}if(opts.args?.length&&m.scripts?.[stage]){const escapedArgs=opts.args.map((arg=>JSON.stringify(arg)));m.scripts[stage]=`${m.scripts[stage]} ${escapedArgs.join(" ")}`}if(m.scripts[stage]==="npx only-allow pnpm")return;if(opts.stdio!=="inherit"){core_loggers_1.lifecycleLogger.debug({depPath:opts.depPath,optional:optional,script:m.scripts[stage],stage:stage,wd:opts.pkgRoot})}const logLevel=opts.stdio!=="inherit"||opts.silent?"silent":undefined;await(0,npm_lifecycle_1.default)(m,stage,opts.pkgRoot,{config:opts.rawConfig,dir:opts.rootModulesDir,extraBinPaths:opts.extraBinPaths??[],extraEnv:{...opts.extraEnv,INIT_CWD:opts.initCwd??process.cwd(),PNPM_SCRIPT_SRC_DIR:opts.pkgRoot},log:{clearProgress:noop,info:noop,level:logLevel,pause:noop,resume:noop,showProgress:noop,silly:npmLog,verbose:npmLog,warn:(...msg)=>{(0,logger_1.globalWarn)(msg.join(" "))}},runConcurrently:true,scriptsPrependNodePath:opts.scriptsPrependNodePath,scriptShell:opts.scriptShell,shellEmulator:opts.shellEmulator,stdio:opts.stdio??"pipe",unsafePerm:opts.unsafePerm});function npmLog(prefix,logid,stdtype,line){switch(stdtype){case"stdout":case"stderr":core_loggers_1.lifecycleLogger.debug({depPath:opts.depPath,line:line.toString(),stage:stage,stdio:stdtype,wd:opts.pkgRoot});return;case"Returned: code:":{if(opts.stdio==="inherit"){return}const code=arguments[3]??1;core_loggers_1.lifecycleLogger.debug({depPath:opts.depPath,exitCode:code,optional:optional,stage:stage,wd:opts.pkgRoot})}}}}runLifecycleHook.runLifecycleHook=runLifecycleHook$1;function getId(manifest){return`${manifest.name??""}@${manifest.version??""}`}return runLifecycleHook}var runLifecycleHooksConcurrently={};var lib$b={};var lib$a={};var lib$9={};var extractComments={};var stripCommentsStrings={exports:{}};var hasRequiredStripCommentsStrings;function requireStripCommentsStrings(){if(hasRequiredStripCommentsStrings)return stripCommentsStrings.exports;hasRequiredStripCommentsStrings=1;const COMMENT_TYPE={COMMENT_BLOCK:"commentBlock",COMMENT_LINE:"commentLine"};const REGEX_TYPE="regex";const firstFound=(str,stringStarters=null)=>{stringStarters=stringStarters||[{name:"quote",char:"'"},{name:"literal",char:"`"},{name:"doubleQuote",char:'"'},{name:COMMENT_TYPE.COMMENT_BLOCK,char:"/*"},{name:COMMENT_TYPE.COMMENT_LINE,char:"//"},{name:REGEX_TYPE,char:"/"}];let lastIndex=-1;let winner=-1;let item={};for(let i=0;i<stringStarters.length;++i){item=stringStarters[i];const index=str.indexOf(item.char);if(index>-1&&lastIndex<0){lastIndex=index;winner=i}if(index>-1&&index<lastIndex){lastIndex=index;winner=i}item.index=index}if(winner===-1){return{index:-1}}return{char:stringStarters[winner].char,name:stringStarters[winner].name,index:lastIndex}};const getNextClosingElement=(str,chars,{specialCharStart:specialCharStart=null,specialCharEnd:specialCharEnd=null}={})=>{if(!Array.isArray(chars)){chars=[chars]}const n=str.length;for(let i=0;i<n;++i){const currentChar=str[i];if(currentChar==="\\"){++i;continue}if(specialCharStart&¤tChar===specialCharStart){const newStr=str.substring(i);const stp=getNextClosingElement(newStr,specialCharEnd);i+=stp.index}if(chars.includes(currentChar)){return{index:i}}}return{index:-1}};const movePointerIndex=(str,index)=>{str=str.substring(index);return str};const parseString=str=>{const originalString=str;const originalStringLength=originalString.length;const detectedString=[];const detectedComments=[];const detectedRegex=[];do{let item=firstFound(str);if(item.index===-1){break}const enter={item:item};if(item.name===COMMENT_TYPE.COMMENT_BLOCK){enter.type=item.name;str=movePointerIndex(str,item.index);enter.index=originalStringLength-str.length;const nextIndex=str.indexOf("*/");if(nextIndex===-1){throw new Error("Comment Block opened at position ... not enclosed")}str=movePointerIndex(str,nextIndex+2);enter.indexEnd=originalStringLength-str.length;enter.content=originalString.substring(enter.index,enter.indexEnd);detectedComments.push(enter);continue}else if(item.name===COMMENT_TYPE.COMMENT_LINE){enter.type=item.name;str=movePointerIndex(str,item.index);enter.index=originalStringLength-str.length;let newLinePos=str.indexOf("\n");if(newLinePos===-1){enter.indexEnd=originalStringLength;enter.content=originalString.substring(enter.index,enter.indexEnd-1);detectedComments.push(enter);break}str=movePointerIndex(str,newLinePos+1);enter.indexEnd=originalStringLength-str.length-1;enter.content=originalString.substring(enter.index,enter.indexEnd);detectedComments.push(enter);continue}else if(item.name===REGEX_TYPE){enter.type=item.name;str=movePointerIndex(str,item.index+1);enter.index=originalStringLength-str.length-1;const nextItem=getNextClosingElement(str,["/","\n"],{specialCharStart:"[",specialCharEnd:"]"});if(nextItem.index===-1){throw new Error(`SCT: (1005) Regex opened at position ${enter.index} not enclosed`)}str=movePointerIndex(str,nextItem.index+1);enter.indexEnd=originalStringLength-str.length;enter.content=originalString.substring(enter.index,enter.indexEnd);detectedRegex.push(enter);continue}str=str.substring(item.index+1);enter.index=originalStringLength-str.length;const nextItem=getNextClosingElement(str,item.char);if(nextItem.index===-1){throw new Error(`SCT: (1001) String opened at position ${enter.index} with a ${item.name} not enclosed`)}str=movePointerIndex(str,nextItem.index+1);enter.indexEnd=originalStringLength-str.length-1;enter.content=originalString.substring(enter.index,enter.indexEnd);detectedString.push(enter)}while(true);return{text:str,strings:detectedString,comments:detectedComments,regexes:detectedRegex}};function replaceOccurences(strings,str,replacer,{includeDelimiter:includeDelimiter=true}){const isCallable=typeof replacer==="function";const n=strings.length;for(let i=n-1;i>=0;--i){const info=strings[i];const replacement=isCallable?replacer(info,str):replacer;if(includeDelimiter){str=str.substring(0,info.index-1)+replacement+str.substring(info.indexEnd+1)}else{str=str.substring(0,info.index)+replacement+str.substring(info.indexEnd)}}return str}const stripComments=(str,replacer="")=>{const comments=parseString(str).comments;str=replaceOccurences(comments,str,replacer,{includeDelimiter:false});return str};const stripStrings=(str,replacer="",{includeDelimiter:includeDelimiter=true}={})=>{const strings=parseString(str).strings;str=replaceOccurences(strings,str,replacer,{includeDelimiter:includeDelimiter});return str};const clearStrings=(str,replacer="",{includeDelimiter:includeDelimiter=false}={})=>{const strings=parseString(str).strings;str=replaceOccurences(strings,str,replacer,{includeDelimiter:includeDelimiter});return str};const stripRegexes=(str,replacer="",{includeDelimiter:includeDelimiter=true}={})=>{const strings=parseString(str).regexes;str=replaceOccurences(strings,str,replacer,{includeDelimiter:includeDelimiter});return str};const clearRegexes=(str,replacer="//",{includeDelimiter:includeDelimiter=false}={})=>{const strings=parseString(str).regexes;str=replaceOccurences(strings,str,replacer,{includeDelimiter:includeDelimiter});return str};stripCommentsStrings.exports={parseString:parseString,stripComments:stripComments,stripStrings:stripStrings,clearStrings:clearStrings,clearRegexes:clearRegexes};stripCommentsStrings.exports.parseString=parseString;stripCommentsStrings.exports.stripComments=stripComments;stripCommentsStrings.exports.stripStrings=stripStrings;stripCommentsStrings.exports.stripRegexes=stripRegexes;stripCommentsStrings.exports.clearStrings=clearStrings;stripCommentsStrings.exports.clearRegexes=clearRegexes;return stripCommentsStrings.exports}var hasRequiredExtractComments;function requireExtractComments(){if(hasRequiredExtractComments)return extractComments;hasRequiredExtractComments=1;Object.defineProperty(extractComments,"__esModule",{value:true});extractComments.extractComments=void 0;const strip_comments_strings_1=requireStripCommentsStrings();function extractComments$1(text){const hasFinalNewline=text.endsWith("\n");if(!hasFinalNewline){text+="\n"}const{comments:rawComments}=(0,strip_comments_strings_1.parseString)(text);const comments=[];let stripped=(0,strip_comments_strings_1.stripComments)(text);if(!hasFinalNewline){stripped=stripped.slice(0,-1)}let offset=0;for(const comment of rawComments){const preamble=stripped.slice(0,comment.index-offset);const lineStart=Math.max(preamble.lastIndexOf("\n"),0);const priorLines=preamble.split("\n");let lineNumber=priorLines.length;let after="";let hasAfter=false;if(lineNumber===1){if(preamble.trim().length===0){lineNumber=0}}else{after=priorLines[lineNumber-2];hasAfter=true;if(priorLines[0].trim().length===0){lineNumber-=1}}let lineEnd=stripped.indexOf("\n",lineStart===0?0:lineStart+1);if(lineEnd<0){lineEnd=stripped.length}const whitespaceMatch=stripped.slice(lineStart,comment.index-offset).match(/^\s*/);const newComment={type:comment.type,content:comment.content,lineNumber:lineNumber,on:stripped.slice(lineStart,lineEnd),whitespace:whitespaceMatch?whitespaceMatch[0]:""};if(hasAfter){newComment.after=after}const nextLineEnd=stripped.indexOf("\n",lineEnd+1);if(nextLineEnd>=0){newComment.before=stripped.slice(lineEnd,nextLineEnd)}comments.push(newComment);offset+=comment.indexEnd-comment.index}return{text:stripped,comments:comments.length?comments:undefined,hasFinalNewline:hasFinalNewline}}extractComments.extractComments=extractComments$1;return extractComments}var insertComments={};var hasRequiredInsertComments;function requireInsertComments(){if(hasRequiredInsertComments)return insertComments;hasRequiredInsertComments=1;Object.defineProperty(insertComments,"__esModule",{value:true});insertComments.insertComments=void 0;function insertComments$1(json,comments){const jsonLines=json.split("\n");const index={};const canonicalizer=/[\s'"]/g;for(let i=0;i<jsonLines.length;++i){const key=jsonLines[i].replace(canonicalizer,"");if(key in index){index[key]=-1}else{index[key]=i}}const jsonPrefix={};for(const comment of comments){let key=comment.on.replace(canonicalizer,"");if(key&&index[key]!==undefined&&index[key]>=0){jsonLines[index[key]]+=" "+comment.content;continue}if(comment.before===undefined){jsonLines[jsonLines.length-1]+=comment.whitespace+comment.content;continue}let location=comment.lineNumber===0?0:-1;if(location<0){key=comment.before.replace(canonicalizer,"");if(key&&index[key]!==undefined){location=index[key]}}if(location>=0){if(jsonPrefix[location]){jsonPrefix[location]+=" "+comment.content}else{const inlineWhitespace=comment.whitespace.startsWith("\n")?comment.whitespace.slice(1):comment.whitespace;jsonPrefix[location]=inlineWhitespace+comment.content}continue}if(comment.after){key=comment.after.replace(canonicalizer,"");if(key&&index[key]!==undefined&&index[key]>=0){jsonLines[index[key]]+=comment.whitespace+comment.content;continue}}location=comment.lineNumber-1;let separator=" ";if(location>=jsonLines.length){location=jsonLines.length-1;separator="\n"}jsonLines[location]+=separator+comment.content+" /* [comment possibly relocated by pnpm] */"}for(let i=0;i<jsonLines.length;++i){if(jsonPrefix[i]){jsonLines[i]=jsonPrefix[i]+"\n"+jsonLines[i]}}return jsonLines.join("\n")}insertComments.insertComments=insertComments$1;return insertComments}var CommentSpecifier={};var hasRequiredCommentSpecifier;function requireCommentSpecifier(){if(hasRequiredCommentSpecifier)return CommentSpecifier;hasRequiredCommentSpecifier=1;Object.defineProperty(CommentSpecifier,"__esModule",{value:true});return CommentSpecifier}var hasRequiredLib$b;function requireLib$b(){if(hasRequiredLib$b)return lib$9;hasRequiredLib$b=1;(function(exports){var __createBinding=lib$9&&lib$9.__createBinding||(Object.create?function(o,m,k,k2){if(k2===undefined)k2=k;var desc=Object.getOwnPropertyDescriptor(m,k);if(!desc||("get"in desc?!m.__esModule:desc.writable||desc.configurable)){desc={enumerable:true,get:function(){return m[k]}}}Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){if(k2===undefined)k2=k;o[k2]=m[k]});var __exportStar=lib$9&&lib$9.__exportStar||function(m,exports){for(var p in m)if(p!=="default"&&!Object.prototype.hasOwnProperty.call(exports,p))__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:true});__exportStar(requireExtractComments(),exports);__exportStar(requireInsertComments(),exports);__exportStar(requireCommentSpecifier(),exports)})(lib$9);return lib$9}var lib$8={};var Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;var ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;var ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;var unicode={Space_Separator:Space_Separator,ID_Start:ID_Start,ID_Continue:ID_Continue};var util={isSpaceSeparator(c){return typeof c==="string"&&unicode.Space_Separator.test(c)},isIdStartChar(c){return typeof c==="string"&&(c>="a"&&c<="z"||c>="A"&&c<="Z"||c==="$"||c==="_"||unicode.ID_Start.test(c))},isIdContinueChar(c){return typeof c==="string"&&(c>="a"&&c<="z"||c>="A"&&c<="Z"||c>="0"&&c<="9"||c==="$"||c==="_"||c==="\u200c"||c==="\u200d"||unicode.ID_Continue.test(c))},isDigit(c){return typeof c==="string"&&/[0-9]/.test(c)},isHexDigit(c){return typeof c==="string"&&/[0-9A-Fa-f]/.test(c)}};let source;let parseState;let stack;let pos;let line;let column;let token;let key;let root;var parse=function parse(text,reviver){source=String(text);parseState="start";stack=[];pos=0;line=1;column=0;token=undefined;key=undefined;root=undefined;do{token=lex();parseStates[parseState]()}while(token.type!=="eof");if(typeof reviver==="function"){return internalize({"":root},"",reviver)}return root};function internalize(holder,name,reviver){const value=holder[name];if(value!=null&&typeof value==="object"){if(Array.isArray(value)){for(let i=0;i<value.length;i++){const key=String(i);const replacement=internalize(value,key,reviver);if(replacement===undefined){delete value[key]}else{Object.defineProperty(value,key,{value:replacement,writable:true,enumerable:true,configurable:true})}}}else{for(const key in value){const replacement=internalize(value,key,reviver);if(replacement===undefined){delete value[key]}else{Object.defineProperty(value,key,{value:replacement,writable:true,enumerable:true,configurable:true})}}}}return reviver.call(holder,name,value)}let lexState;let buffer;let doubleQuote;let sign;let c;function lex(){lexState="default";buffer="";doubleQuote=false;sign=1;for(;;){c=peek();const token=lexStates[lexState]();if(token){return token}}}function peek(){if(source[pos]){return String.fromCodePoint(source.codePointAt(pos))}}function read(){const c=peek();if(c==="\n"){line++;column=0}else if(c){column+=c.length}else{column++}if(c){pos+=c.length}return c}const lexStates={default(){switch(c){case"\t":case"\v":case"\f":case" ":case"\xa0":case"\ufeff":case"\n":case"\r":case"\u2028":case"\u2029":read();return;case"/":read();lexState="comment";return;case undefined:read();return newToken("eof")}if(util.isSpaceSeparator(c)){read();return}return lexStates[parseState]()},comment(){switch(c){case"*":read();lexState="multiLineComment";return;case"/":read();lexState="singleLineComment";return}throw invalidChar(read())},multiLineComment(){switch(c){case"*":read();lexState="multiLineCommentAsterisk";return;case undefined:throw invalidChar(read())}read()},multiLineCommentAsterisk(){switch(c){case"*":read();return;case"/":read();lexState="default";return;case undefined:throw invalidChar(read())}read();lexState="multiLineComment"},singleLineComment(){switch(c){case"\n":case"\r":case"\u2028":case"\u2029":read();lexState="default";return;case undefined:read();return newToken("eof")}read()},value(){switch(c){case"{":case"[":return newToken("punctuator",read());case"n":read();literal("ull");return newToken("null",null);case"t":read();literal("rue");return newToken("boolean",true);case"f":read();literal("alse");return newToken("boolean",false);case"-":case"+":if(read()==="-"){sign=-1}lexState="sign";return;case".":buffer=read();lexState="decimalPointLeading";return;case"0":buffer=read();lexState="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":buffer=read();lexState="decimalInteger";return;case"I":read();literal("nfinity");return newToken("numeric",Infinity);case"N":read();literal("aN");return newToken("numeric",NaN);case'"':case"'":doubleQuote=read()==='"';buffer="";lexState="string";return}throw invalidChar(read())},identifierNameStartEscape(){if(c!=="u"){throw invalidChar(read())}read();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!util.isIdStartChar(u)){throw invalidIdentifier()}break}buffer+=u;lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"\u200c":case"\u200d":buffer+=read();return;case"\\":read();lexState="identifierNameEscape";return}if(util.isIdContinueChar(c)){buffer+=read();return}return newToken("identifier",buffer)},identifierNameEscape(){if(c!=="u"){throw invalidChar(read())}read();const u=unicodeEscape();switch(u){case"$":case"_":case"\u200c":case"\u200d":break;default:if(!util.isIdContinueChar(u)){throw invalidIdentifier()}break}buffer+=u;lexState="identifierName"},sign(){switch(c){case".":buffer=read();lexState="decimalPointLeading";return;case"0":buffer=read();lexState="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":buffer=read();lexState="decimalInteger";return;case"I":read();literal("nfinity");return newToken("numeric",sign*Infinity);case"N":read();literal("aN");return newToken("numeric",NaN)}throw invalidChar(read())},zero(){switch(c){case".":buffer+=read();lexState="decimalPoint";return;case"e":case"E":buffer+=read();lexState="decimalExponent";return;case"x":case"X":buffer+=read();lexState="hexadecimal";return}return newToken("numeric",sign*0)},decimalInteger(){switch(c){case".":buffer+=read();lexState="decimalPoint";return;case"e":case"E":buffer+=read();lexState="decimalExponent";return}if(util.isDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},decimalPointLeading(){if(util.isDigit(c)){buffer+=read();lexState="decimalFraction";return}throw invalidChar(read())},decimalPoint(){switch(c){case"e":case"E":buffer+=read();lexState="decimalExponent";return}if(util.isDigit(c)){buffer+=read();lexState="decimalFraction";return}return newToken("numeric",sign*Number(buffer))},decimalFraction(){switch(c){case"e":case"E":buffer+=read();lexState="decimalExponent";return}if(util.isDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},decimalExponent(){switch(c){case"+":case"-":buffer+=read();lexState="decimalExponentSign";return}if(util.isDigit(c)){buffer+=read();lexState="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentSign(){if(util.isDigit(c)){buffer+=read();lexState="decimalExponentInteger";return}throw invalidChar(read())},decimalExponentInteger(){if(util.isDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},hexadecimal(){if(util.isHexDigit(c)){buffer+=read();lexState="hexadecimalInteger";return}throw invalidChar(read())},hexadecimalInteger(){if(util.isHexDigit(c)){buffer+=read();return}return newToken("numeric",sign*Number(buffer))},string(){switch(c){case"\\":read();buffer+=escape();return;case'"':if(doubleQuote){read();return newToken("string",buffer)}buffer+=read();return;case"'":if(!doubleQuote){read();return newToken("string",buffer)}buffer+=read();return;case"\n":case"\r":throw invalidChar(read());case"\u2028":case"\u2029":separatorChar(c);break;case undefined:throw invalidChar(read())}buffer+=read()},start(){switch(c){case"{":case"[":return newToken("punctuator",read())}lexState="value"},beforePropertyName(){switch(c){case"$":case"_":buffer=read();lexState="identifierName";return;case"\\":read();lexState="identifierNameStartEscape";return;case"}":return newToken("punctuator",read());case'"':case"'":doubleQuote=read()==='"';lexState="string";return}if(util.isIdStartChar(c)){buffer+=read();lexState="identifierName";return}throw invalidChar(read())},afterPropertyName(){if(c===":"){return newToken("punctuator",read())}throw invalidChar(read())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c){case",":case"}":return newToken("punctuator",read())}throw invalidChar(read())},beforeArrayValue(){if(c==="]"){return newToken("punctuator",read())}lexState="value"},afterArrayValue(){switch(c){case",":case"]":return newToken("punctuator",read())}throw invalidChar(read())},end(){throw invalidChar(read())}};function newToken(type,value){return{type:type,value:value,line:line,column:column}}function literal(s){for(const c of s){const p=peek();if(p!==c){throw invalidChar(read())}read()}}function escape(){const c=peek();switch(c){case"b":read();return"\b";case"f":read();return"\f";case"n":read();return"\n";case"r":read();return"\r";case"t":read();return"\t";case"v":read();return"\v";case"0":read();if(util.isDigit(peek())){throw invalidChar(read())}return"\0";case"x":read();return hexEscape();case"u":read();return unicodeEscape();case"\n":case"\u2028":case"\u2029":read();return"";case"\r":read();if(peek()==="\n"){read()}return"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw invalidChar(read());case undefined:throw invalidChar(read())}return read()}function hexEscape(){let buffer="";let c=peek();if(!util.isHexDigit(c)){throw invalidChar(read())}buffer+=read();c=peek();if(!util.isHexDigit(c)){throw invalidChar(read())}buffer+=read();return String.fromCodePoint(parseInt(buffer,16))}function unicodeEscape(){let buffer="";let count=4;while(count-- >0){const c=peek();if(!util.isHexDigit(c)){throw invalidChar(read())}buffer+=read()}return String.fromCodePoint(parseInt(buffer,16))}const parseStates={start(){if(token.type==="eof"){throw invalidEOF()}push()},beforePropertyName(){switch(token.type){case"identifier":case"string":key=token.value;parseState="afterPropertyName";return;case"punctuator":pop();return;case"eof":throw invalidEOF()}},afterPropertyName(){if(token.type==="eof"){throw invalidEOF()}parseState="beforePropertyValue"},beforePropertyValue(){if(token.type==="eof"){throw invalidEOF()}push()},beforeArrayValue(){if(token.type==="eof"){throw invalidEOF()}if(token.type==="punctuator"&&token.value==="]"){pop();return}push()},afterPropertyValue(){if(token.type==="eof"){throw invalidEOF()}switch(token.value){case",":parseState="beforePropertyName";return;case"}":pop()}},afterArrayValue(){if(token.type==="eof"){throw invalidEOF()}switch(token.value){case",":parseState="beforeArrayValue";return;case"]":pop()}},end(){}};function push(){let value;switch(token.type){case"punctuator":switch(token.value){case"{":value={};break;case"[":value=[];break}break;case"null":case"boolean":case"numeric":case"string":value=token.value;break}if(root===undefined){root=value}else{const parent=stack[stack.length-1];if(Array.isArray(parent)){parent.push(value)}else{Object.defineProperty(parent,key,{value:value,writable:true,enumerable:true,configurable:true})}}if(value!==null&&typeof value==="object"){stack.push(value);if(Array.isArray(value)){parseState="beforeArrayValue"}else{parseState="beforePropertyName"}}else{const current=stack[stack.length-1];if(current==null){parseState="end"}else if(Array.isArray(current)){parseState="afterArrayValue"}else{parseState="afterPropertyValue"}}}function pop(){stack.pop();const current=stack[stack.length-1];if(current==null){parseState="end"}else if(Array.isArray(current)){parseState="afterArrayValue"}else{parseState="afterPropertyValue"}}function invalidChar(c){if(c===undefined){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){column-=5;return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)}function separatorChar(c){console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(c){const replacements={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(replacements[c]){return replacements[c]}if(c<" "){const hexString=c.charCodeAt(0).toString(16);return"\\x"+("00"+hexString).substring(hexString.length)}return c}function syntaxError(message){const err=new SyntaxError(message);err.lineNumber=line;err.columnNumber=column;return err}var stringify=function stringify(value,replacer,space){const stack=[];let indent="";let propertyList;let replacerFunc;let gap="";let quote;if(replacer!=null&&typeof replacer==="object"&&!Array.isArray(replacer)){space=replacer.space;quote=replacer.quote;replacer=replacer.replacer}if(typeof replacer==="function"){replacerFunc=replacer}else if(Array.isArray(replacer)){propertyList=[];for(const v of replacer){let item;if(typeof v==="string"){item=v}else if(typeof v==="number"||v instanceof String||v instanceof Number){item=String(v)}if(item!==undefined&&propertyList.indexOf(item)<0){propertyList.push(item)}}}if(space instanceof Number){space=Number(space)}else if(space instanceof String){space=String(space)}if(typeof space==="number"){if(space>0){space=Math.min(10,Math.floor(space));gap=" ".substr(0,space)}}else if(typeof space==="string"){gap=space.substr(0,10)}return serializeProperty("",{"":value});function serializeProperty(key,holder){let value=holder[key];if(value!=null){if(typeof value.toJSON5==="function"){value=value.toJSON5(key)}else if(typeof value.toJSON==="function"){value=value.toJSON(key)}}if(replacerFunc){value=replacerFunc.call(holder,key,value)}if(value instanceof Number){value=Number(value)}else if(value instanceof String){value=String(value)}else if(value instanceof Boolean){value=value.valueOf()}switch(value){case null:return"null";case true:return"true";case false:return"false"}if(typeof value==="string"){return quoteString(value)}if(typeof value==="number"){return String(value)}if(typeof value==="object"){return Array.isArray(value)?serializeArray(value):serializeObject(value)}return undefined}function quoteString(value){const quotes={"'":.1,'"':.2};const replacements={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let product="";for(let i=0;i<value.length;i++){const c=value[i];switch(c){case"'":case'"':quotes[c]++;product+=c;continue;case"\0":if(util.isDigit(value[i+1])){product+="\\x00";continue}}if(replacements[c]){product+=replacements[c];continue}if(c<" "){let hexString=c.charCodeAt(0).toString(16);product+="\\x"+("00"+hexString).substring(hexString.length);continue}product+=c}const quoteChar=quote||Object.keys(quotes).reduce(((a,b)=>quotes[a]<quotes[b]?a:b));product=product.replace(new RegExp(quoteChar,"g"),replacements[quoteChar]);return quoteChar+product+quoteChar}function serializeObject(value){if(stack.indexOf(value)>=0){throw TypeError("Converting circular structure to JSON5")}stack.push(value);let stepback=indent;indent=indent+gap;let keys=propertyList||Object.keys(value);let partial=[];for(const key of keys){const propertyString=serializeProperty(key,value);if(propertyString!==undefined){let member=serializeKey(key)+":";if(gap!==""){member+=" "}member+=propertyString;partial.push(member)}}let final;if(partial.length===0){final="{}"}else{let properties;if(gap===""){properties=partial.join(",");final="{"+properties+"}"}else{let separator=",\n"+indent;properties=partial.join(separator);final="{\n"+indent+properties+",\n"+stepback+"}"}}stack.pop();indent=stepback;return final}function serializeKey(key){if(key.length===0){return quoteString(key)}const firstChar=String.fromCodePoint(key.codePointAt(0));if(!util.isIdStartChar(firstChar)){return quoteString(key)}for(let i=firstChar.length;i<key.length;i++){if(!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))){return quoteString(key)}}return key}function serializeArray(value){if(stack.indexOf(value)>=0){throw TypeError("Converting circular structure to JSON5")}stack.push(value);let stepback=indent;indent=indent+gap;let partial=[];for(let i=0;i<value.length;i++){const propertyString=serializeProperty(String(i),value);partial.push(propertyString!==undefined?propertyString:"null")}let final;if(partial.length===0){final="[]"}else{if(gap===""){let properties=partial.join(",");final="["+properties+"]"}else{let separator=",\n"+indent;let properties=partial.join(separator);final="[\n"+indent+properties+",\n"+stepback+"]"}}stack.pop();indent=stepback;return final}};const JSON5={parse:parse,stringify:stringify};var lib$7=JSON5;var dist=Object.freeze({__proto__:null,default:lib$7});var require$$1=getAugmentedNamespace(dist);var lib$6={exports:{}};var imurmurhash={exports:{}}; |
| /** |
| * @preserve |
| * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013) |
| * |
| * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a> |
| * @see http://github.com/homebrewing/brauhaus-diff |
| * @author <a href="mailto:gary.court@gmail.com">Gary Court</a> |
| * @see http://github.com/garycourt/murmurhash-js |
| * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a> |
| * @see http://sites.google.com/site/murmurhash/ |
| */var hasRequiredImurmurhash;function requireImurmurhash(){if(hasRequiredImurmurhash)return imurmurhash.exports;hasRequiredImurmurhash=1;(function(module){(function(){var cache;function MurmurHash3(key,seed){var m=this instanceof MurmurHash3?this:cache;m.reset(seed);if(typeof key==="string"&&key.length>0){m.hash(key)}if(m!==this){return m}}MurmurHash3.prototype.hash=function(key){var h1,k1,i,top,len;len=key.length;this.len+=len;k1=this.k1;i=0;switch(this.rem){case 0:k1^=len>i?key.charCodeAt(i++)&65535:0;case 1:k1^=len>i?(key.charCodeAt(i++)&65535)<<8:0;case 2:k1^=len>i?(key.charCodeAt(i++)&65535)<<16:0;case 3:k1^=len>i?(key.charCodeAt(i)&255)<<24:0;k1^=len>i?(key.charCodeAt(i++)&65280)>>8:0}this.rem=len+this.rem&3;len-=this.rem;if(len>0){h1=this.h1;while(1){k1=k1*11601+(k1&65535)*3432906752&4294967295;k1=k1<<15|k1>>>17;k1=k1*13715+(k1&65535)*461832192&4294967295;h1^=k1;h1=h1<<13|h1>>>19;h1=h1*5+3864292196&4294967295;if(i>=len){break}k1=key.charCodeAt(i++)&65535^(key.charCodeAt(i++)&65535)<<8^(key.charCodeAt(i++)&65535)<<16;top=key.charCodeAt(i++);k1^=(top&255)<<24^(top&65280)>>8}k1=0;switch(this.rem){case 3:k1^=(key.charCodeAt(i+2)&65535)<<16;case 2:k1^=(key.charCodeAt(i+1)&65535)<<8;case 1:k1^=key.charCodeAt(i)&65535}this.h1=h1}this.k1=k1;return this};MurmurHash3.prototype.result=function(){var k1,h1;k1=this.k1;h1=this.h1;if(k1>0){k1=k1*11601+(k1&65535)*3432906752&4294967295;k1=k1<<15|k1>>>17;k1=k1*13715+(k1&65535)*461832192&4294967295;h1^=k1}h1^=this.len;h1^=h1>>>16;h1=h1*51819+(h1&65535)*2246770688&4294967295;h1^=h1>>>13;h1=h1*44597+(h1&65535)*3266445312&4294967295;h1^=h1>>>16;return h1>>>0};MurmurHash3.prototype.reset=function(seed){this.h1=typeof seed==="number"?seed:0;this.rem=this.k1=this.len=0;return this};cache=new MurmurHash3;{module.exports=MurmurHash3}})()})(imurmurhash);return imurmurhash.exports}var cjs={};var signals$1={};var hasRequiredSignals$1;function requireSignals$1(){if(hasRequiredSignals$1)return signals$1;hasRequiredSignals$1=1;(function(exports){Object.defineProperty(exports,"__esModule",{value:true});exports.signals=void 0;exports.signals=[];exports.signals.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32"){exports.signals.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){exports.signals.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")}})(signals$1);return signals$1}var hasRequiredCjs;function requireCjs(){if(hasRequiredCjs)return cjs;hasRequiredCjs=1;(function(exports){var _a;Object.defineProperty(exports,"__esModule",{value:true});exports.unload=exports.load=exports.onExit=exports.signals=void 0;const signals_js_1=requireSignals$1();Object.defineProperty(exports,"signals",{enumerable:true,get:function(){return signals_js_1.signals}});const processOk=process=>!!process&&typeof process==="object"&&typeof process.removeListener==="function"&&typeof process.emit==="function"&&typeof process.reallyExit==="function"&&typeof process.listeners==="function"&&typeof process.kill==="function"&&typeof process.pid==="number"&&typeof process.on==="function";const kExitEmitter=Symbol.for("signal-exit emitter");const global=globalThis;const ObjectDefineProperty=Object.defineProperty.bind(Object);class Emitter{emitted={afterExit:false,exit:false};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(global[kExitEmitter]){return global[kExitEmitter]}ObjectDefineProperty(global,kExitEmitter,{value:this,writable:false,enumerable:false,configurable:false})}on(ev,fn){this.listeners[ev].push(fn)}removeListener(ev,fn){const list=this.listeners[ev];const i=list.indexOf(fn);if(i===-1){return}if(i===0&&list.length===1){list.length=0}else{list.splice(i,1)}}emit(ev,code,signal){if(this.emitted[ev]){return}this.emitted[ev]=true;for(const fn of this.listeners[ev]){fn(code,signal)}}}class SignalExitBase{}const signalExitWrap=handler=>({onExit(cb,opts){return handler.onExit(cb,opts)},load(){return handler.load()},unload(){return handler.unload()}});class SignalExitFallback extends SignalExitBase{onExit(){return()=>{}}load(){}unload(){}}class SignalExit extends SignalExitBase{#hupSig=process.platform==="win32"?"SIGINT":"SIGHUP";#emitter=new Emitter;#process;#originalProcessEmit;#originalProcessReallyExit;#sigListeners={};#loaded=false;constructor(process){super();this.#process=process;this.#sigListeners={};for(const sig of signals_js_1.signals){this.#sigListeners[sig]=()=>{const listeners=this.#process.listeners(sig);let{count:count}=this.#emitter;if(typeof process.__signal_exit_emitter__==="object")count++;if(listeners.length===count){this.unload();this.#emitter.emit("exit",null,sig);this.#emitter.emit("afterExit",null,sig);process.kill(process.pid,sig==="SIGHUP"?this.#hupSig:sig)}}}this.#originalProcessReallyExit=process.reallyExit;this.#originalProcessEmit=process.emit}onExit(cb,opts){if(!processOk(this.#process)){return()=>{}}if(this.#loaded===false){this.load()}const ev=opts?.alwaysLast?"afterExit":"exit";this.#emitter.on(ev,cb);return()=>{this.#emitter.removeListener(ev,cb);if(this.#emitter.listeners["exit"].length===0&&this.#emitter.listeners["afterExit"].length===0){this.unload()}}}load(){if(this.#loaded){return}this.#loaded=true;this.#emitter.count+=1;for(const sig of signals_js_1.signals){try{const fn=this.#sigListeners[sig];if(fn)this.#process.on(sig,fn)}catch(_){}}this.#process.emit=(ev,...a)=>this.#processEmit(ev,...a);this.#process.reallyExit=code=>this.#processReallyExit(code)}unload(){if(!this.#loaded){return}this.#loaded=false;signals_js_1.signals.forEach((sig=>{const listener=this.#sigListeners[sig];if(!listener){throw new Error("Listener not defined for signal: "+sig)}try{this.#process.removeListener(sig,listener)}catch(_){}}));this.#process.emit=this.#originalProcessEmit;this.#process.reallyExit=this.#originalProcessReallyExit;this.#emitter.count-=1}#processReallyExit(code){if(!processOk(this.#process)){return 0}this.#process.exitCode=code||0;this.#emitter.emit("exit",this.#process.exitCode,null);this.#emitter.emit("afterExit",this.#process.exitCode,null);return this.#originalProcessReallyExit.call(this.#process,this.#process.exitCode)}#processEmit(ev,...args){const og=this.#originalProcessEmit;if(ev==="exit"&&processOk(this.#process)){if(typeof args[0]==="number"){this.#process.exitCode=args[0]}const ret=og.call(this.#process,ev,...args);this.#emitter.emit("exit",this.#process.exitCode,null);this.#emitter.emit("afterExit",this.#process.exitCode,null);return ret}else{return og.call(this.#process,ev,...args)}}}const process=globalThis.process;_a=signalExitWrap(processOk(process)?new SignalExit(process):new SignalExitFallback),exports.onExit=_a.onExit,exports.load=_a.load,exports.unload=_a.unload})(cjs);return cjs}var hasRequiredLib$a;function requireLib$a(){if(hasRequiredLib$a)return lib$6.exports;hasRequiredLib$a=1;lib$6.exports=writeFile;lib$6.exports.sync=writeFileSync;lib$6.exports._getTmpname=getTmpname;lib$6.exports._cleanupOnExit=cleanupOnExit;const fs=require$$0$2;const MurmurHash3=requireImurmurhash();const{onExit:onExit}=requireCjs();const path=require$$0$6;const{promisify:promisify}=require$$0$1;const activeFiles={};const threadId=function getId(){try{const workerThreads=require("worker_threads");return workerThreads.threadId}catch(e){return 0}}();let invocations=0;function getTmpname(filename){return filename+"."+MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result()}function cleanupOnExit(tmpfile){return()=>{try{fs.unlinkSync(typeof tmpfile==="function"?tmpfile():tmpfile)}catch{}}}function serializeActiveFile(absoluteName){return new Promise((resolve=>{if(!activeFiles[absoluteName]){activeFiles[absoluteName]=[]}activeFiles[absoluteName].push(resolve);if(activeFiles[absoluteName].length===1){resolve()}}))}function isChownErrOk(err){if(err.code==="ENOSYS"){return true}const nonroot=!process.getuid||process.getuid()!==0;if(nonroot){if(err.code==="EINVAL"||err.code==="EPERM"){return true}}return false}async function writeFileAsync(filename,data,options={}){if(typeof options==="string"){options={encoding:options}}let fd;let tmpfile;const removeOnExitHandler=onExit(cleanupOnExit((()=>tmpfile)));const absoluteName=path.resolve(filename);try{await serializeActiveFile(absoluteName);const truename=await promisify(fs.realpath)(filename).catch((()=>filename));tmpfile=getTmpname(truename);if(!options.mode||!options.chown){const stats=await promisify(fs.stat)(truename).catch((()=>{}));if(stats){if(options.mode==null){options.mode=stats.mode}if(options.chown==null&&process.getuid){options.chown={uid:stats.uid,gid:stats.gid}}}}fd=await promisify(fs.open)(tmpfile,"w",options.mode);if(options.tmpfileCreated){await options.tmpfileCreated(tmpfile)}if(ArrayBuffer.isView(data)){await promisify(fs.write)(fd,data,0,data.length,0)}else if(data!=null){await promisify(fs.write)(fd,String(data),0,String(options.encoding||"utf8"))}if(options.fsync!==false){await promisify(fs.fsync)(fd)}await promisify(fs.close)(fd);fd=null;if(options.chown){await promisify(fs.chown)(tmpfile,options.chown.uid,options.chown.gid).catch((err=>{if(!isChownErrOk(err)){throw err}}))}if(options.mode){await promisify(fs.chmod)(tmpfile,options.mode).catch((err=>{if(!isChownErrOk(err)){throw err}}))}await promisify(fs.rename)(tmpfile,truename)}finally{if(fd){await promisify(fs.close)(fd).catch((()=>{}))}removeOnExitHandler();await promisify(fs.unlink)(tmpfile).catch((()=>{}));activeFiles[absoluteName].shift();if(activeFiles[absoluteName].length>0){activeFiles[absoluteName][0]()}else{delete activeFiles[absoluteName]}}}async function writeFile(filename,data,options,callback){if(options instanceof Function){callback=options;options={}}const promise=writeFileAsync(filename,data,options);if(callback){try{const result=await promise;return callback(result)}catch(err){return callback(err)}}return promise}function writeFileSync(filename,data,options){if(typeof options==="string"){options={encoding:options}}else if(!options){options={}}try{filename=fs.realpathSync(filename)}catch(ex){}const tmpfile=getTmpname(filename);if(!options.mode||!options.chown){try{const stats=fs.statSync(filename);options=Object.assign({},options);if(!options.mode){options.mode=stats.mode}if(!options.chown&&process.getuid){options.chown={uid:stats.uid,gid:stats.gid}}}catch(ex){}}let fd;const cleanup=cleanupOnExit(tmpfile);const removeOnExitHandler=onExit(cleanup);let threw=true;try{fd=fs.openSync(tmpfile,"w",options.mode||438);if(options.tmpfileCreated){options.tmpfileCreated(tmpfile)}if(ArrayBuffer.isView(data)){fs.writeSync(fd,data,0,data.length,0)}else if(data!=null){fs.writeSync(fd,String(data),0,String(options.encoding||"utf8"))}if(options.fsync!==false){fs.fsyncSync(fd)}fs.closeSync(fd);fd=null;if(options.chown){try{fs.chownSync(tmpfile,options.chown.uid,options.chown.gid)}catch(err){if(!isChownErrOk(err)){throw err}}}if(options.mode){try{fs.chmodSync(tmpfile,options.mode)}catch(err){if(!isChownErrOk(err)){throw err}}}fs.renameSync(tmpfile,filename);threw=false}finally{if(fd){try{fs.closeSync(fd)}catch(ex){}}removeOnExitHandler();if(threw){cleanup()}}}return lib$6.exports}var writeYamlFile={exports:{}};var writeFileAtomic={exports:{}};var signalExit={exports:{}};var signals={exports:{}};var hasRequiredSignals;function requireSignals(){if(hasRequiredSignals)return signals.exports;hasRequiredSignals=1;(function(module){module.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){module.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){module.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}})(signals);return signals.exports}var hasRequiredSignalExit;function requireSignalExit(){if(hasRequiredSignalExit)return signalExit.exports;hasRequiredSignalExit=1;var process=commonjsGlobal.process;const processOk=function(process){return process&&typeof process==="object"&&typeof process.removeListener==="function"&&typeof process.emit==="function"&&typeof process.reallyExit==="function"&&typeof process.listeners==="function"&&typeof process.kill==="function"&&typeof process.pid==="number"&&typeof process.on==="function"};if(!processOk(process)){signalExit.exports=function(){return function(){}}}else{var assert=require$$5;var signals=requireSignals();var isWin=/^win/i.test(process.platform);var EE=require$$2$1;if(typeof EE!=="function"){EE=EE.EventEmitter}var emitter;if(process.__signal_exit_emitter__){emitter=process.__signal_exit_emitter__}else{emitter=process.__signal_exit_emitter__=new EE;emitter.count=0;emitter.emitted={}}if(!emitter.infinite){emitter.setMaxListeners(Infinity);emitter.infinite=true}signalExit.exports=function(cb,opts){if(!processOk(commonjsGlobal.process)){return function(){}}assert.equal(typeof cb,"function","a callback must be provided for exit handler");if(loaded===false){load()}var ev="exit";if(opts&&opts.alwaysLast){ev="afterexit"}var remove=function(){emitter.removeListener(ev,cb);if(emitter.listeners("exit").length===0&&emitter.listeners("afterexit").length===0){unload()}};emitter.on(ev,cb);return remove};var unload=function unload(){if(!loaded||!processOk(commonjsGlobal.process)){return}loaded=false;signals.forEach((function(sig){try{process.removeListener(sig,sigListeners[sig])}catch(er){}}));process.emit=originalProcessEmit;process.reallyExit=originalProcessReallyExit;emitter.count-=1};signalExit.exports.unload=unload;var emit=function emit(event,code,signal){if(emitter.emitted[event]){return}emitter.emitted[event]=true;emitter.emit(event,code,signal)};var sigListeners={};signals.forEach((function(sig){sigListeners[sig]=function listener(){if(!processOk(commonjsGlobal.process)){return}var listeners=process.listeners(sig);if(listeners.length===emitter.count){unload();emit("exit",null,sig);emit("afterexit",null,sig);if(isWin&&sig==="SIGHUP"){sig="SIGINT"}process.kill(process.pid,sig)}}}));signalExit.exports.signals=function(){return signals};var loaded=false;var load=function load(){if(loaded||!processOk(commonjsGlobal.process)){return}loaded=true;emitter.count+=1;signals=signals.filter((function(sig){try{process.on(sig,sigListeners[sig]);return true}catch(er){return false}}));process.emit=processEmit;process.reallyExit=processReallyExit};signalExit.exports.load=load;var originalProcessReallyExit=process.reallyExit;var processReallyExit=function processReallyExit(code){if(!processOk(commonjsGlobal.process)){return}process.exitCode=code||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);originalProcessReallyExit.call(process,process.exitCode)};var originalProcessEmit=process.emit;var processEmit=function processEmit(ev,arg){if(ev==="exit"&&processOk(commonjsGlobal.process)){if(arg!==undefined){process.exitCode=arg}var ret=originalProcessEmit.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return ret}else{return originalProcessEmit.apply(this,arguments)}}}return signalExit.exports}var isTypedarray;var hasRequiredIsTypedarray;function requireIsTypedarray(){if(hasRequiredIsTypedarray)return isTypedarray;hasRequiredIsTypedarray=1;isTypedarray=isTypedArray;isTypedArray.strict=isStrictTypedArray;isTypedArray.loose=isLooseTypedArray;var toString=Object.prototype.toString;var names={"[object Int8Array]":true,"[object Int16Array]":true,"[object Int32Array]":true,"[object Uint8Array]":true,"[object Uint8ClampedArray]":true,"[object Uint16Array]":true,"[object Uint32Array]":true,"[object Float32Array]":true,"[object Float64Array]":true};function isTypedArray(arr){return isStrictTypedArray(arr)||isLooseTypedArray(arr)}function isStrictTypedArray(arr){return arr instanceof Int8Array||arr instanceof Int16Array||arr instanceof Int32Array||arr instanceof Uint8Array||arr instanceof Uint8ClampedArray||arr instanceof Uint16Array||arr instanceof Uint32Array||arr instanceof Float32Array||arr instanceof Float64Array}function isLooseTypedArray(arr){return names[toString.call(arr)]}return isTypedarray}var typedarrayToBuffer;var hasRequiredTypedarrayToBuffer;function requireTypedarrayToBuffer(){if(hasRequiredTypedarrayToBuffer)return typedarrayToBuffer;hasRequiredTypedarrayToBuffer=1;var isTypedArray=requireIsTypedarray().strict;typedarrayToBuffer=function typedarrayToBuffer(arr){if(isTypedArray(arr)){var buf=Buffer.from(arr.buffer);if(arr.byteLength!==arr.buffer.byteLength){buf=buf.slice(arr.byteOffset,arr.byteOffset+arr.byteLength)}return buf}else{return Buffer.from(arr)}};return typedarrayToBuffer}var hasRequiredWriteFileAtomic;function requireWriteFileAtomic(){if(hasRequiredWriteFileAtomic)return writeFileAtomic.exports;hasRequiredWriteFileAtomic=1;writeFileAtomic.exports=writeFile;writeFileAtomic.exports.sync=writeFileSync;writeFileAtomic.exports._getTmpname=getTmpname;writeFileAtomic.exports._cleanupOnExit=cleanupOnExit;const fs=require$$0$2;const MurmurHash3=requireImurmurhash();const onExit=requireSignalExit();const path=require$$0$6;const isTypedArray=requireIsTypedarray();const typedArrayToBuffer=requireTypedarrayToBuffer();const{promisify:promisify}=require$$0$1;const activeFiles={};const threadId=function getId(){try{const workerThreads=require("worker_threads");return workerThreads.threadId}catch(e){return 0}}();let invocations=0;function getTmpname(filename){return filename+"."+MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result()}function cleanupOnExit(tmpfile){return()=>{try{fs.unlinkSync(typeof tmpfile==="function"?tmpfile():tmpfile)}catch(_){}}}function serializeActiveFile(absoluteName){return new Promise((resolve=>{if(!activeFiles[absoluteName])activeFiles[absoluteName]=[];activeFiles[absoluteName].push(resolve);if(activeFiles[absoluteName].length===1)resolve()}))}function isChownErrOk(err){if(err.code==="ENOSYS"){return true}const nonroot=!process.getuid||process.getuid()!==0;if(nonroot){if(err.code==="EINVAL"||err.code==="EPERM"){return true}}return false}async function writeFileAsync(filename,data,options={}){if(typeof options==="string"){options={encoding:options}}let fd;let tmpfile;const removeOnExitHandler=onExit(cleanupOnExit((()=>tmpfile)));const absoluteName=path.resolve(filename);try{await serializeActiveFile(absoluteName);const truename=await promisify(fs.realpath)(filename).catch((()=>filename));tmpfile=getTmpname(truename);if(!options.mode||!options.chown){const stats=await promisify(fs.stat)(truename).catch((()=>{}));if(stats){if(options.mode==null){options.mode=stats.mode}if(options.chown==null&&process.getuid){options.chown={uid:stats.uid,gid:stats.gid}}}}fd=await promisify(fs.open)(tmpfile,"w",options.mode);if(options.tmpfileCreated){await options.tmpfileCreated(tmpfile)}if(isTypedArray(data)){data=typedArrayToBuffer(data)}if(Buffer.isBuffer(data)){await promisify(fs.write)(fd,data,0,data.length,0)}else if(data!=null){await promisify(fs.write)(fd,String(data),0,String(options.encoding||"utf8"))}if(options.fsync!==false){await promisify(fs.fsync)(fd)}await promisify(fs.close)(fd);fd=null;if(options.chown){await promisify(fs.chown)(tmpfile,options.chown.uid,options.chown.gid).catch((err=>{if(!isChownErrOk(err)){throw err}}))}if(options.mode){await promisify(fs.chmod)(tmpfile,options.mode).catch((err=>{if(!isChownErrOk(err)){throw err}}))}await promisify(fs.rename)(tmpfile,truename)}finally{if(fd){await promisify(fs.close)(fd).catch((()=>{}))}removeOnExitHandler();await promisify(fs.unlink)(tmpfile).catch((()=>{}));activeFiles[absoluteName].shift();if(activeFiles[absoluteName].length>0){activeFiles[absoluteName][0]()}else delete activeFiles[absoluteName]}}function writeFile(filename,data,options,callback){if(options instanceof Function){callback=options;options={}}const promise=writeFileAsync(filename,data,options);if(callback){promise.then(callback,callback)}return promise}function writeFileSync(filename,data,options){if(typeof options==="string")options={encoding:options};else if(!options)options={};try{filename=fs.realpathSync(filename)}catch(ex){}const tmpfile=getTmpname(filename);if(!options.mode||!options.chown){try{const stats=fs.statSync(filename);options=Object.assign({},options);if(!options.mode){options.mode=stats.mode}if(!options.chown&&process.getuid){options.chown={uid:stats.uid,gid:stats.gid}}}catch(ex){}}let fd;const cleanup=cleanupOnExit(tmpfile);const removeOnExitHandler=onExit(cleanup);let threw=true;try{fd=fs.openSync(tmpfile,"w",options.mode||438);if(options.tmpfileCreated){options.tmpfileCreated(tmpfile)}if(isTypedArray(data)){data=typedArrayToBuffer(data)}if(Buffer.isBuffer(data)){fs.writeSync(fd,data,0,data.length,0)}else if(data!=null){fs.writeSync(fd,String(data),0,String(options.encoding||"utf8"))}if(options.fsync!==false){fs.fsyncSync(fd)}fs.closeSync(fd);fd=null;if(options.chown){try{fs.chownSync(tmpfile,options.chown.uid,options.chown.gid)}catch(err){if(!isChownErrOk(err)){throw err}}}if(options.mode){try{fs.chmodSync(tmpfile,options.mode)}catch(err){if(!isChownErrOk(err)){throw err}}}fs.renameSync(tmpfile,filename);threw=false}finally{if(fd){try{fs.closeSync(fd)}catch(ex){}}removeOnExitHandler();if(threw){cleanup()}}}return writeFileAtomic.exports}var jsYaml$1={};var loader$1={};var common$2={};var hasRequiredCommon$2;function requireCommon$2(){if(hasRequiredCommon$2)return common$2;hasRequiredCommon$2=1;function isNothing(subject){return typeof subject==="undefined"||subject===null}function isObject(subject){return typeof subject==="object"&&subject!==null}function toArray(sequence){if(Array.isArray(sequence))return sequence;else if(isNothing(sequence))return[];return[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=Object.keys(source);for(index=0,length=sourceKeys.length;index<length;index+=1){key=sourceKeys[index];target[key]=source[key]}}return target}function repeat(string,count){var result="",cycle;for(cycle=0;cycle<count;cycle+=1){result+=string}return result}function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number}common$2.isNothing=isNothing;common$2.isObject=isObject;common$2.toArray=toArray;common$2.repeat=repeat;common$2.isNegativeZero=isNegativeZero;common$2.extend=extend;return common$2}var exception$1;var hasRequiredException$1;function requireException$1(){if(hasRequiredException$1)return exception$1;hasRequiredException$1=1;function formatError(exception,compact){var where="",message=exception.reason||"(unknown reason)";if(!exception.mark)return message;if(exception.mark.name){where+='in "'+exception.mark.name+'" '}where+="("+(exception.mark.line+1)+":"+(exception.mark.column+1)+")";if(!compact&&exception.mark.snippet){where+="\n\n"+exception.mark.snippet}return message+" "+where}function YAMLException(reason,mark){Error.call(this);this.name="YAMLException";this.reason=reason;this.mark=mark;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(compact){return this.name+": "+formatError(this,compact)};exception$1=YAMLException;return exception$1}var snippet$1;var hasRequiredSnippet$1;function requireSnippet$1(){if(hasRequiredSnippet$1)return snippet$1;hasRequiredSnippet$1=1;var common=requireCommon$2();function getLine(buffer,lineStart,lineEnd,position,maxLineLength){var head="";var tail="";var maxHalfLength=Math.floor(maxLineLength/2)-1;if(position-lineStart>maxHalfLength){head=" ... ";lineStart=position-maxHalfLength+head.length}if(lineEnd-position>maxHalfLength){tail=" ...";lineEnd=position+maxHalfLength-tail.length}return{str:head+buffer.slice(lineStart,lineEnd).replace(/\t/g,"\u2192")+tail,pos:position-lineStart+head.length}}function padStart(string,max){return common.repeat(" ",max-string.length)+string}function makeSnippet(mark,options){options=Object.create(options||null);if(!mark.buffer)return null;if(!options.maxLength)options.maxLength=79;if(typeof options.indent!=="number")options.indent=1;if(typeof options.linesBefore!=="number")options.linesBefore=3;if(typeof options.linesAfter!=="number")options.linesAfter=2;var re=/\r?\n|\r|\0/g;var lineStarts=[0];var lineEnds=[];var match;var foundLineNo=-1;while(match=re.exec(mark.buffer)){lineEnds.push(match.index);lineStarts.push(match.index+match[0].length);if(mark.position<=match.index&&foundLineNo<0){foundLineNo=lineStarts.length-2}}if(foundLineNo<0)foundLineNo=lineStarts.length-1;var result="",i,line;var lineNoLength=Math.min(mark.line+options.linesAfter,lineEnds.length).toString().length;var maxLineLength=options.maxLength-(options.indent+lineNoLength+3);for(i=1;i<=options.linesBefore;i++){if(foundLineNo-i<0)break;line=getLine(mark.buffer,lineStarts[foundLineNo-i],lineEnds[foundLineNo-i],mark.position-(lineStarts[foundLineNo]-lineStarts[foundLineNo-i]),maxLineLength);result=common.repeat(" ",options.indent)+padStart((mark.line-i+1).toString(),lineNoLength)+" | "+line.str+"\n"+result}line=getLine(mark.buffer,lineStarts[foundLineNo],lineEnds[foundLineNo],mark.position,maxLineLength);result+=common.repeat(" ",options.indent)+padStart((mark.line+1).toString(),lineNoLength)+" | "+line.str+"\n";result+=common.repeat("-",options.indent+lineNoLength+3+line.pos)+"^"+"\n";for(i=1;i<=options.linesAfter;i++){if(foundLineNo+i>=lineEnds.length)break;line=getLine(mark.buffer,lineStarts[foundLineNo+i],lineEnds[foundLineNo+i],mark.position-(lineStarts[foundLineNo]-lineStarts[foundLineNo+i]),maxLineLength);result+=common.repeat(" ",options.indent)+padStart((mark.line+i+1).toString(),lineNoLength)+" | "+line.str+"\n"}return result.replace(/\n$/,"")}snippet$1=makeSnippet;return snippet$1}var type$1;var hasRequiredType$1;function requireType$1(){if(hasRequiredType$1)return type$1;hasRequiredType$1=1;var YAMLException=requireException$1();var TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(map){var result={};if(map!==null){Object.keys(map).forEach((function(style){map[style].forEach((function(alias){result[String(alias)]=style}))}))}return result}function Type(tag,options){options=options||{};Object.keys(options).forEach((function(name){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)===-1){throw new YAMLException('Unknown option "'+name+'" is met in definition of "'+tag+'" YAML type.')}}));this.options=options;this.tag=tag;this.kind=options["kind"]||null;this.resolve=options["resolve"]||function(){return true};this.construct=options["construct"]||function(data){return data};this.instanceOf=options["instanceOf"]||null;this.predicate=options["predicate"]||null;this.represent=options["represent"]||null;this.representName=options["representName"]||null;this.defaultStyle=options["defaultStyle"]||null;this.multi=options["multi"]||false;this.styleAliases=compileStyleAliases(options["styleAliases"]||null);if(YAML_NODE_KINDS.indexOf(this.kind)===-1){throw new YAMLException('Unknown kind "'+this.kind+'" is specified for "'+tag+'" YAML type.')}}type$1=Type;return type$1}var schema$1;var hasRequiredSchema$1;function requireSchema$1(){if(hasRequiredSchema$1)return schema$1;hasRequiredSchema$1=1;var YAMLException=requireException$1();var Type=requireType$1();function compileList(schema,name){var result=[];schema[name].forEach((function(currentType){var newIndex=result.length;result.forEach((function(previousType,previousIndex){if(previousType.tag===currentType.tag&&previousType.kind===currentType.kind&&previousType.multi===currentType.multi){newIndex=previousIndex}}));result[newIndex]=currentType}));return result}function compileMap(){var result={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},index,length;function collectType(type){if(type.multi){result.multi[type.kind].push(type);result.multi["fallback"].push(type)}else{result[type.kind][type.tag]=result["fallback"][type.tag]=type}}for(index=0,length=arguments.length;index<length;index+=1){arguments[index].forEach(collectType)}return result}function Schema(definition){return this.extend(definition)}Schema.prototype.extend=function extend(definition){var implicit=[];var explicit=[];if(definition instanceof Type){explicit.push(definition)}else if(Array.isArray(definition)){explicit=explicit.concat(definition)}else if(definition&&(Array.isArray(definition.implicit)||Array.isArray(definition.explicit))){if(definition.implicit)implicit=implicit.concat(definition.implicit);if(definition.explicit)explicit=explicit.concat(definition.explicit)}else{throw new YAMLException("Schema.extend argument should be a Type, [ Type ], "+"or a schema definition ({ implicit: [...], explicit: [...] })")}implicit.forEach((function(type){if(!(type instanceof Type)){throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.")}if(type.loadKind&&type.loadKind!=="scalar"){throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}if(type.multi){throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}}));explicit.forEach((function(type){if(!(type instanceof Type)){throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.")}}));var result=Object.create(Schema.prototype);result.implicit=(this.implicit||[]).concat(implicit);result.explicit=(this.explicit||[]).concat(explicit);result.compiledImplicit=compileList(result,"implicit");result.compiledExplicit=compileList(result,"explicit");result.compiledTypeMap=compileMap(result.compiledImplicit,result.compiledExplicit);return result};schema$1=Schema;return schema$1}var str$1;var hasRequiredStr$1;function requireStr$1(){if(hasRequiredStr$1)return str$1;hasRequiredStr$1=1;var Type=requireType$1();str$1=new Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(data){return data!==null?data:""}});return str$1}var seq$1;var hasRequiredSeq$1;function requireSeq$1(){if(hasRequiredSeq$1)return seq$1;hasRequiredSeq$1=1;var Type=requireType$1();seq$1=new Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(data){return data!==null?data:[]}});return seq$1}var map$1;var hasRequiredMap$1;function requireMap$1(){if(hasRequiredMap$1)return map$1;hasRequiredMap$1=1;var Type=requireType$1();map$1=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return data!==null?data:{}}});return map$1}var failsafe$1;var hasRequiredFailsafe$1;function requireFailsafe$1(){if(hasRequiredFailsafe$1)return failsafe$1;hasRequiredFailsafe$1=1;var Schema=requireSchema$1();failsafe$1=new Schema({explicit:[requireStr$1(),requireSeq$1(),requireMap$1()]});return failsafe$1}var _null$1;var hasRequired_null$1;function require_null$1(){if(hasRequired_null$1)return _null$1;hasRequired_null$1=1;var Type=requireType$1();function resolveYamlNull(data){if(data===null)return true;var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return object===null}_null$1=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});return _null$1}var bool$1;var hasRequiredBool$1;function requireBool$1(){if(hasRequiredBool$1)return bool$1;hasRequiredBool$1=1;var Type=requireType$1();function resolveYamlBoolean(data){if(data===null)return false;var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}bool$1=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"});return bool$1}var int$1;var hasRequiredInt$1;function requireInt$1(){if(hasRequiredInt$1)return int$1;hasRequiredInt$1=1;var common=requireCommon$2();var Type=requireType$1();function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(data===null)return false;var max=data.length,index=0,hasDigits=false,ch;if(!max)return false;ch=data[index];if(ch==="-"||ch==="+"){ch=data[++index]}if(ch==="0"){if(index+1===max)return true;ch=data[++index];if(ch==="b"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(ch!=="0"&&ch!=="1")return false;hasDigits=true}return hasDigits&&ch!=="_"}if(ch==="x"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isHexCode(data.charCodeAt(index)))return false;hasDigits=true}return hasDigits&&ch!=="_"}if(ch==="o"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isOctCode(data.charCodeAt(index)))return false;hasDigits=true}return hasDigits&&ch!=="_"}}if(ch==="_")return false;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isDecCode(data.charCodeAt(index))){return false}hasDigits=true}if(!hasDigits||ch==="_")return false;return true}function constructYamlInteger(data){var value=data,sign=1,ch;if(value.indexOf("_")!==-1){value=value.replace(/_/g,"")}ch=value[0];if(ch==="-"||ch==="+"){if(ch==="-")sign=-1;value=value.slice(1);ch=value[0]}if(value==="0")return 0;if(ch==="0"){if(value[1]==="b")return sign*parseInt(value.slice(2),2);if(value[1]==="x")return sign*parseInt(value.slice(2),16);if(value[1]==="o")return sign*parseInt(value.slice(2),8)}return sign*parseInt(value,10)}function isInteger(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1===0&&!common.isNegativeZero(object))}int$1=new Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(obj){return obj>=0?"0b"+obj.toString(2):"-0b"+obj.toString(2).slice(1)},octal:function(obj){return obj>=0?"0o"+obj.toString(8):"-0o"+obj.toString(8).slice(1)},decimal:function(obj){return obj.toString(10)},hexadecimal:function(obj){return obj>=0?"0x"+obj.toString(16).toUpperCase():"-0x"+obj.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}});return int$1}var float$1;var hasRequiredFloat$1;function requireFloat$1(){if(hasRequiredFloat$1)return float$1;hasRequiredFloat$1=1;var common=requireCommon$2();var Type=requireType$1();var YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){if(data===null)return false;if(!YAML_FLOAT_PATTERN.test(data)||data[data.length-1]==="_"){return false}return true}function constructYamlFloat(data){var value,sign;value=data.replace(/_/g,"").toLowerCase();sign=value[0]==="-"?-1:1;if("+-".indexOf(value[0])>=0){value=value.slice(1)}if(value===".inf"){return sign===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(value===".nan"){return NaN}return sign*parseFloat(value,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,style){var res;if(isNaN(object)){switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===object){switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===object){switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(common.isNegativeZero(object)){return"-0.0"}res=object.toString(10);return SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common.isNegativeZero(object))}float$1=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"});return float$1}var json$1;var hasRequiredJson$1;function requireJson$1(){if(hasRequiredJson$1)return json$1;hasRequiredJson$1=1;json$1=requireFailsafe$1().extend({implicit:[require_null$1(),requireBool$1(),requireInt$1(),requireFloat$1()]});return json$1}var core$1;var hasRequiredCore$1;function requireCore$1(){if(hasRequiredCore$1)return core$1;hasRequiredCore$1=1;core$1=requireJson$1();return core$1}var timestamp$1;var hasRequiredTimestamp$1;function requireTimestamp$1(){if(hasRequiredTimestamp$1)return timestamp$1;hasRequiredTimestamp$1=1;var Type=requireType$1();var YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(data){if(data===null)return false;if(YAML_DATE_REGEXP.exec(data)!==null)return true;if(YAML_TIMESTAMP_REGEXP.exec(data)!==null)return true;return false}function constructYamlTimestamp(data){var match,year,month,day,hour,minute,second,fraction=0,delta=null,tz_hour,tz_minute,date;match=YAML_DATE_REGEXP.exec(data);if(match===null)match=YAML_TIMESTAMP_REGEXP.exec(data);if(match===null)throw new Error("Date resolve error");year=+match[1];month=+match[2]-1;day=+match[3];if(!match[4]){return new Date(Date.UTC(year,month,day))}hour=+match[4];minute=+match[5];second=+match[6];if(match[7]){fraction=match[7].slice(0,3);while(fraction.length<3){fraction+="0"}fraction=+fraction}if(match[9]){tz_hour=+match[10];tz_minute=+(match[11]||0);delta=(tz_hour*60+tz_minute)*6e4;if(match[9]==="-")delta=-delta}date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction));if(delta)date.setTime(date.getTime()-delta);return date}function representYamlTimestamp(object){return object.toISOString()}timestamp$1=new Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});return timestamp$1}var merge$1;var hasRequiredMerge$1;function requireMerge$1(){if(hasRequiredMerge$1)return merge$1;hasRequiredMerge$1=1;var Type=requireType$1();function resolveYamlMerge(data){return data==="<<"||data===null}merge$1=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge});return merge$1}var binary$1;var hasRequiredBinary$1;function requireBinary$1(){if(hasRequiredBinary$1)return binary$1;hasRequiredBinary$1=1;var Type=requireType$1();var BASE64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(data){if(data===null)return false;var code,idx,bitlen=0,max=data.length,map=BASE64_MAP;for(idx=0;idx<max;idx++){code=map.indexOf(data.charAt(idx));if(code>64)continue;if(code<0)return false;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx<max;idx++){if(idx%4===0&&idx){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}bits=bits<<6|map.indexOf(input.charAt(idx))}tailbits=max%4*6;if(tailbits===0){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}else if(tailbits===18){result.push(bits>>10&255);result.push(bits>>2&255)}else if(tailbits===12){result.push(bits>>4&255)}return new Uint8Array(result)}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map=BASE64_MAP;for(idx=0;idx<max;idx++){if(idx%3===0&&idx){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}bits=(bits<<8)+object[idx]}tail=max%3;if(tail===0){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}else if(tail===2){result+=map[bits>>10&63];result+=map[bits>>4&63];result+=map[bits<<2&63];result+=map[64]}else if(tail===1){result+=map[bits>>2&63];result+=map[bits<<4&63];result+=map[64];result+=map[64]}return result}function isBinary(obj){return Object.prototype.toString.call(obj)==="[object Uint8Array]"}binary$1=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary});return binary$1}var omap$1;var hasRequiredOmap$1;function requireOmap$1(){if(hasRequiredOmap$1)return omap$1;hasRequiredOmap$1=1;var Type=requireType$1();var _hasOwnProperty=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(data){if(data===null)return true;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index<length;index+=1){pair=object[index];pairHasKey=false;if(_toString.call(pair)!=="[object Object]")return false;for(pairKey in pair){if(_hasOwnProperty.call(pair,pairKey)){if(!pairHasKey)pairHasKey=true;else return false}}if(!pairHasKey)return false;if(objectKeys.indexOf(pairKey)===-1)objectKeys.push(pairKey);else return false}return true}function constructYamlOmap(data){return data!==null?data:[]}omap$1=new Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap});return omap$1}var pairs$1;var hasRequiredPairs$1;function requirePairs$1(){if(hasRequiredPairs$1)return pairs$1;hasRequiredPairs$1=1;var Type=requireType$1();var _toString=Object.prototype.toString;function resolveYamlPairs(data){if(data===null)return true;var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];if(_toString.call(pair)!=="[object Object]")return false;keys=Object.keys(pair);if(keys.length!==1)return false;result[index]=[keys[0],pair[keys[0]]]}return true}function constructYamlPairs(data){if(data===null)return[];var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];keys=Object.keys(pair);result[index]=[keys[0],pair[keys[0]]]}return result}pairs$1=new Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs});return pairs$1}var set$1;var hasRequiredSet$1;function requireSet$1(){if(hasRequiredSet$1)return set$1;hasRequiredSet$1=1;var Type=requireType$1();var _hasOwnProperty=Object.prototype.hasOwnProperty;function resolveYamlSet(data){if(data===null)return true;var key,object=data;for(key in object){if(_hasOwnProperty.call(object,key)){if(object[key]!==null)return false}}return true}function constructYamlSet(data){return data!==null?data:{}}set$1=new Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet});return set$1}var _default$1;var hasRequired_default$1;function require_default$1(){if(hasRequired_default$1)return _default$1;hasRequired_default$1=1;_default$1=requireCore$1().extend({implicit:[requireTimestamp$1(),requireMerge$1()],explicit:[requireBinary$1(),requireOmap$1(),requirePairs$1(),requireSet$1()]});return _default$1}var hasRequiredLoader$1;function requireLoader$1(){if(hasRequiredLoader$1)return loader$1;hasRequiredLoader$1=1;var common=requireCommon$2();var YAMLException=requireException$1();var makeSnippet=requireSnippet$1();var DEFAULT_SCHEMA=require_default$1();var _hasOwnProperty=Object.prototype.hasOwnProperty;var CONTEXT_FLOW_IN=1;var CONTEXT_FLOW_OUT=2;var CONTEXT_BLOCK_IN=3;var CONTEXT_BLOCK_OUT=4;var CHOMPING_CLIP=1;var CHOMPING_STRIP=2;var CHOMPING_KEEP=3;var PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/;var PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/;var PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i;var PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(obj){return Object.prototype.toString.call(obj)}function is_EOL(c){return c===10||c===13}function is_WHITE_SPACE(c){return c===9||c===32}function is_WS_OR_EOL(c){return c===9||c===32||c===10||c===13}function is_FLOW_INDICATOR(c){return c===44||c===91||c===93||c===123||c===125}function fromHexCode(c){var lc;if(48<=c&&c<=57){return c-48}lc=c|32;if(97<=lc&&lc<=102){return lc-97+10}return-1}function escapedHexLen(c){if(c===120){return 2}if(c===117){return 4}if(c===85){return 8}return 0}function fromDecimalCode(c){if(48<=c&&c<=57){return c-48}return-1}function simpleEscapeSequence(c){return c===48?"\0":c===97?"\x07":c===98?"\b":c===116?"\t":c===9?"\t":c===110?"\n":c===118?"\v":c===102?"\f":c===114?"\r":c===101?"\x1b":c===32?" ":c===34?'"':c===47?"/":c===92?"\\":c===78?"\x85":c===95?"\xa0":c===76?"\u2028":c===80?"\u2029":""}function charFromCodepoint(c){if(c<=65535){return String.fromCharCode(c)}return String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256);var simpleEscapeMap=new Array(256);for(var i=0;i<256;i++){simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0;simpleEscapeMap[i]=simpleEscapeSequence(i)}function State(input,options){this.input=input;this.filename=options["filename"]||null;this.schema=options["schema"]||DEFAULT_SCHEMA;this.onWarning=options["onWarning"]||null;this.legacy=options["legacy"]||false;this.json=options["json"]||false;this.listener=options["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(state,message){var mark={name:state.filename,buffer:state.input.slice(0,-1),position:state.position,line:state.line,column:state.position-state.lineStart};mark.snippet=makeSnippet(mark);return new YAMLException(message,mark)}function throwError(state,message){throw generateError(state,message)}function throwWarning(state,message){if(state.onWarning){state.onWarning.call(null,generateError(state,message))}}var directiveHandlers={YAML:function handleYamlDirective(state,name,args){var match,major,minor;if(state.version!==null){throwError(state,"duplication of %YAML directive")}if(args.length!==1){throwError(state,"YAML directive accepts exactly one argument")}match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(match===null){throwError(state,"ill-formed argument of the YAML directive")}major=parseInt(match[1],10);minor=parseInt(match[2],10);if(major!==1){throwError(state,"unacceptable YAML version of the document")}state.version=args[0];state.checkLineBreaks=minor<2;if(minor!==1&&minor!==2){throwWarning(state,"unsupported YAML version of the document")}},TAG:function handleTagDirective(state,name,args){var handle,prefix;if(args.length!==2){throwError(state,"TAG directive accepts exactly two arguments")}handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle)){throwError(state,"ill-formed tag handle (first argument) of the TAG directive")}if(_hasOwnProperty.call(state.tagMap,handle)){throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle')}if(!PATTERN_TAG_URI.test(prefix)){throwError(state,"ill-formed tag prefix (second argument) of the TAG directive")}try{prefix=decodeURIComponent(prefix)}catch(err){throwError(state,"tag prefix is malformed: "+prefix)}state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start<end){_result=state.input.slice(start,end);if(checkJson){for(_position=0,_length=_result.length;_position<_length;_position+=1){_character=_result.charCodeAt(_position);if(!(_character===9||32<=_character&&_character<=1114111)){throwError(state,"expected valid JSON character")}}}else if(PATTERN_NON_PRINTABLE.test(_result)){throwError(state,"the stream contains non-printable characters")}state.result+=_result}}function mergeMappings(state,destination,source,overridableKeys){var sourceKeys,key,index,quantity;if(!common.isObject(source)){throwError(state,"cannot merge mappings; the provided source object is unacceptable")}sourceKeys=Object.keys(source);for(index=0,quantity=sourceKeys.length;index<quantity;index+=1){key=sourceKeys[index];if(!_hasOwnProperty.call(destination,key)){destination[key]=source[key];overridableKeys[key]=true}}}function storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,startLine,startLineStart,startPos){var index,quantity;if(Array.isArray(keyNode)){keyNode=Array.prototype.slice.call(keyNode);for(index=0,quantity=keyNode.length;index<quantity;index+=1){if(Array.isArray(keyNode[index])){throwError(state,"nested arrays are not supported inside keys")}if(typeof keyNode==="object"&&_class(keyNode[index])==="[object Object]"){keyNode[index]="[object Object]"}}}if(typeof keyNode==="object"&&_class(keyNode)==="[object Object]"){keyNode="[object Object]"}keyNode=String(keyNode);if(_result===null){_result={}}if(keyTag==="tag:yaml.org,2002:merge"){if(Array.isArray(valueNode)){for(index=0,quantity=valueNode.length;index<quantity;index+=1){mergeMappings(state,_result,valueNode[index],overridableKeys)}}else{mergeMappings(state,_result,valueNode,overridableKeys)}}else{if(!state.json&&!_hasOwnProperty.call(overridableKeys,keyNode)&&_hasOwnProperty.call(_result,keyNode)){state.line=startLine||state.line;state.lineStart=startLineStart||state.lineStart;state.position=startPos||state.position;throwError(state,"duplicated mapping key")}if(keyNode==="__proto__"){Object.defineProperty(_result,keyNode,{configurable:true,enumerable:true,writable:true,value:valueNode})}else{_result[keyNode]=valueNode}delete overridableKeys[keyNode]}return _result}function readLineBreak(state){var ch;ch=state.input.charCodeAt(state.position);if(ch===10){state.position++}else if(ch===13){state.position++;if(state.input.charCodeAt(state.position)===10){state.position++}}else{throwError(state,"a line break is expected")}state.line+=1;state.lineStart=state.position;state.firstTabInLine=-1}function skipSeparationSpace(state,allowComments,checkIndent){var lineBreaks=0,ch=state.input.charCodeAt(state.position);while(ch!==0){while(is_WHITE_SPACE(ch)){if(ch===9&&state.firstTabInLine===-1){state.firstTabInLine=state.position}ch=state.input.charCodeAt(++state.position)}if(allowComments&&ch===35){do{ch=state.input.charCodeAt(++state.position)}while(ch!==10&&ch!==13&&ch!==0)}if(is_EOL(ch)){readLineBreak(state);ch=state.input.charCodeAt(state.position);lineBreaks++;state.lineIndent=0;while(ch===32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}}else{break}}if(checkIndent!==-1&&lineBreaks!==0&&state.lineIndent<checkIndent){throwWarning(state,"deficient indentation")}return lineBreaks}function testDocumentSeparator(state){var _position=state.position,ch;ch=state.input.charCodeAt(_position);if((ch===45||ch===46)&&ch===state.input.charCodeAt(_position+1)&&ch===state.input.charCodeAt(_position+2)){_position+=3;ch=state.input.charCodeAt(_position);if(ch===0||is_WS_OR_EOL(ch)){return true}}return false}function writeFoldedLines(state,count){if(count===1){state.result+=" "}else if(count>1){state.result+=common.repeat("\n",count-1)}}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;ch=state.input.charCodeAt(state.position);if(is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===64||ch===96){return false}if(ch===63||ch===45){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){return false}}state.kind="scalar";state.result="";captureStart=captureEnd=state.position;hasPendingContent=false;while(ch!==0){if(ch===58){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){break}}else if(ch===35){preceding=state.input.charCodeAt(state.position-1);if(is_WS_OR_EOL(preceding)){break}}else if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch)){break}else if(is_EOL(ch)){_line=state.line;_lineStart=state.lineStart;_lineIndent=state.lineIndent;skipSeparationSpace(state,false,-1);if(state.lineIndent>=nodeIndent){hasPendingContent=true;ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd;state.line=_line;state.lineStart=_lineStart;state.lineIndent=_lineIndent;break}}if(hasPendingContent){captureSegment(state,captureStart,captureEnd,false);writeFoldedLines(state,state.line-_line);captureStart=captureEnd=state.position;hasPendingContent=false}if(!is_WHITE_SPACE(ch)){captureEnd=state.position+1}ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,captureEnd,false);if(state.result){return true}state.kind=_kind;state.result=_result;return false}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;ch=state.input.charCodeAt(state.position);if(ch!==39){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===39){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(ch===39){captureStart=state.position;state.position++;captureEnd=state.position}else{return true}}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a single quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch!==34){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===34){captureSegment(state,captureStart,state.position,true);state.position++;return true}else if(ch===92){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(is_EOL(ch)){skipSeparationSpace(state,false,nodeIndent)}else if(ch<256&&simpleEscapeCheck[ch]){state.result+=simpleEscapeMap[ch];state.position++}else if((tmp=escapedHexLen(ch))>0){hexLength=tmp;hexResult=0;for(;hexLength>0;hexLength--){ch=state.input.charCodeAt(++state.position);if((tmp=fromHexCode(ch))>=0){hexResult=(hexResult<<4)+tmp}else{throwError(state,"expected hexadecimal character")}}state.result+=charFromCodepoint(hexResult);state.position++}else{throwError(state,"unknown escape sequence")}captureStart=captureEnd=state.position}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a double quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=true,_line,_lineStart,_pos,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys=Object.create(null),keyNode,keyTag,valueNode,ch;ch=state.input.charCodeAt(state.position);if(ch===91){terminator=93;isMapping=false;_result=[]}else if(ch===123){terminator=125;isMapping=true;_result={}}else{return false}if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(++state.position);while(ch!==0){skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===terminator){state.position++;state.tag=_tag;state.anchor=_anchor;state.kind=isMapping?"mapping":"sequence";state.result=_result;return true}else if(!readNext){throwError(state,"missed comma between flow collection entries")}else if(ch===44){throwError(state,"expected the node content, but found ','")}keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(ch===63){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)){isPair=isExplicitPair=true;state.position++;skipSeparationSpace(state,true,nodeIndent)}}_line=state.line;_lineStart=state.lineStart;_pos=state.position;composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=state.tag;keyNode=state.result;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if((isExplicitPair||state.line===_line)&&ch===58){isPair=true;ch=state.input.charCodeAt(++state.position);skipSeparationSpace(state,true,nodeIndent);composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=state.result}if(isMapping){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_line,_lineStart,_pos)}else if(isPair){_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode,_line,_lineStart,_pos))}else{_result.push(keyNode)}skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===44){readNext=true;ch=state.input.charCodeAt(++state.position)}else{readNext=false}}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=false,detectedIndent=false,textIndent=nodeIndent,emptyLines=0,atMoreIndented=false,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch===124){folding=false}else if(ch===62){folding=true}else{return false}state.kind="scalar";state.result="";while(ch!==0){ch=state.input.charCodeAt(++state.position);if(ch===43||ch===45){if(CHOMPING_CLIP===chomping){chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP}else{throwError(state,"repeat of a chomping mode identifier")}}else if((tmp=fromDecimalCode(ch))>=0){if(tmp===0){throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!detectedIndent){textIndent=nodeIndent+tmp-1;detectedIndent=true}else{throwError(state,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(ch)){do{ch=state.input.charCodeAt(++state.position)}while(is_WHITE_SPACE(ch));if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(!is_EOL(ch)&&ch!==0)}}while(ch!==0){readLineBreak(state);state.lineIndent=0;ch=state.input.charCodeAt(state.position);while((!detectedIndent||state.lineIndent<textIndent)&&ch===32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}if(!detectedIndent&&state.lineIndent>textIndent){textIndent=state.lineIndent}if(is_EOL(ch)){emptyLines++;continue}if(state.lineIndent<textIndent){if(chomping===CHOMPING_KEEP){state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}else if(chomping===CHOMPING_CLIP){if(didReadContent){state.result+="\n"}}break}if(folding){if(is_WHITE_SPACE(ch)){atMoreIndented=true;state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}else if(atMoreIndented){atMoreIndented=false;state.result+=common.repeat("\n",emptyLines+1)}else if(emptyLines===0){if(didReadContent){state.result+=" "}}else{state.result+=common.repeat("\n",emptyLines)}}else{state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}didReadContent=true;detectedIndent=true;emptyLines=0;captureStart=state.position;while(!is_EOL(ch)&&ch!==0){ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,state.position,false)}return true}function readBlockSequence(state,nodeIndent){var _line,_tag=state.tag,_anchor=state.anchor,_result=[],following,detected=false,ch;if(state.firstTabInLine!==-1)return false;if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(state.position);while(ch!==0){if(state.firstTabInLine!==-1){state.position=state.firstTabInLine;throwError(state,"tab characters must not be used in indentation")}if(ch!==45){break}following=state.input.charCodeAt(state.position+1);if(!is_WS_OR_EOL(following)){break}detected=true;state.position++;if(skipSeparationSpace(state,true,-1)){if(state.lineIndent<=nodeIndent){_result.push(null);ch=state.input.charCodeAt(state.position);continue}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_BLOCK_IN,false,true);_result.push(state.result);skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if((state.line===_line||state.lineIndent>nodeIndent)&&ch!==0){throwError(state,"bad indentation of a sequence entry")}else if(state.lineIndent<nodeIndent){break}}if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="sequence";state.result=_result;return true}return false}function readBlockMapping(state,nodeIndent,flowIndent){var following,allowCompact,_line,_keyLine,_keyLineStart,_keyPos,_tag=state.tag,_anchor=state.anchor,_result={},overridableKeys=Object.create(null),keyTag=null,keyNode=null,valueNode=null,atExplicitKey=false,detected=false,ch;if(state.firstTabInLine!==-1)return false;if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(state.position);while(ch!==0){if(!atExplicitKey&&state.firstTabInLine!==-1){state.position=state.firstTabInLine;throwError(state,"tab characters must not be used in indentation")}following=state.input.charCodeAt(state.position+1);_line=state.line;if((ch===63||ch===58)&&is_WS_OR_EOL(following)){if(ch===63){if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=true;allowCompact=true}else if(atExplicitKey){atExplicitKey=false;allowCompact=true}else{throwError(state,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}state.position+=1;ch=following}else{_keyLine=state.line;_keyLineStart=state.lineStart;_keyPos=state.position;if(!composeNode(state,flowIndent,CONTEXT_FLOW_OUT,false,true)){break}if(state.line===_line){ch=state.input.charCodeAt(state.position);while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(ch===58){ch=state.input.charCodeAt(++state.position);if(!is_WS_OR_EOL(ch)){throwError(state,"a whitespace character is expected after the key-value separator within a block mapping")}if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=false;allowCompact=false;keyTag=state.tag;keyNode=state.result}else if(detected){throwError(state,"can not read an implicit mapping pair; a colon is missed")}else{state.tag=_tag;state.anchor=_anchor;return true}}else if(detected){throwError(state,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{state.tag=_tag;state.anchor=_anchor;return true}}if(state.line===_line||state.lineIndent>nodeIndent){if(atExplicitKey){_keyLine=state.line;_keyLineStart=state.lineStart;_keyPos=state.position}if(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact)){if(atExplicitKey){keyNode=state.result}else{valueNode=state.result}}if(!atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_keyLine,_keyLineStart,_keyPos);keyTag=keyNode=valueNode=null}skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position)}if((state.line===_line||state.lineIndent>nodeIndent)&&ch!==0){throwError(state,"bad indentation of a mapping entry")}else if(state.lineIndent<nodeIndent){break}}if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos)}if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="mapping";state.result=_result}return detected}function readTagProperty(state){var _position,isVerbatim=false,isNamed=false,tagHandle,tagName,ch;ch=state.input.charCodeAt(state.position);if(ch!==33)return false;if(state.tag!==null){throwError(state,"duplication of a tag property")}ch=state.input.charCodeAt(++state.position);if(ch===60){isVerbatim=true;ch=state.input.charCodeAt(++state.position)}else if(ch===33){isNamed=true;tagHandle="!!";ch=state.input.charCodeAt(++state.position)}else{tagHandle="!"}_position=state.position;if(isVerbatim){do{ch=state.input.charCodeAt(++state.position)}while(ch!==0&&ch!==62);if(state.position<state.length){tagName=state.input.slice(_position,state.position);ch=state.input.charCodeAt(++state.position)}else{throwError(state,"unexpected end of the stream within a verbatim tag")}}else{while(ch!==0&&!is_WS_OR_EOL(ch)){if(ch===33){if(!isNamed){tagHandle=state.input.slice(_position-1,state.position+1);if(!PATTERN_TAG_HANDLE.test(tagHandle)){throwError(state,"named tag handle cannot contain such characters")}isNamed=true;_position=state.position+1}else{throwError(state,"tag suffix cannot contain exclamation marks")}}ch=state.input.charCodeAt(++state.position)}tagName=state.input.slice(_position,state.position);if(PATTERN_FLOW_INDICATORS.test(tagName)){throwError(state,"tag suffix cannot contain flow indicator characters")}}if(tagName&&!PATTERN_TAG_URI.test(tagName)){throwError(state,"tag name cannot contain such characters: "+tagName)}try{tagName=decodeURIComponent(tagName)}catch(err){throwError(state,"tag name is malformed: "+tagName)}if(isVerbatim){state.tag=tagName}else if(_hasOwnProperty.call(state.tagMap,tagHandle)){state.tag=state.tagMap[tagHandle]+tagName}else if(tagHandle==="!"){state.tag="!"+tagName}else if(tagHandle==="!!"){state.tag="tag:yaml.org,2002:"+tagName}else{throwError(state,'undeclared tag handle "'+tagHandle+'"')}return true}function readAnchorProperty(state){var _position,ch;ch=state.input.charCodeAt(state.position);if(ch!==38)return false;if(state.anchor!==null){throwError(state,"duplication of an anchor property")}ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch)){ch=state.input.charCodeAt(++state.position)}if(state.position===_position){throwError(state,"name of an anchor node must contain at least one character")}state.anchor=state.input.slice(_position,state.position);return true}function readAlias(state){var _position,alias,ch;ch=state.input.charCodeAt(state.position);if(ch!==42)return false;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch)){ch=state.input.charCodeAt(++state.position)}if(state.position===_position){throwError(state,"name of an alias node must contain at least one character")}alias=state.input.slice(_position,state.position);if(!_hasOwnProperty.call(state.anchorMap,alias)){throwError(state,'unidentified alias "'+alias+'"')}state.result=state.anchorMap[alias];skipSeparationSpace(state,true,-1);return true}function composeNode(state,parentIndent,nodeContext,allowToSeek,allowCompact){var allowBlockStyles,allowBlockScalars,allowBlockCollections,indentStatus=1,atNewLine=false,hasContent=false,typeIndex,typeQuantity,typeList,type,flowIndent,blockIndent;if(state.listener!==null){state.listener("open",state)}state.tag=null;state.anchor=null;state.kind=null;state.result=null;allowBlockStyles=allowBlockScalars=allowBlockCollections=CONTEXT_BLOCK_OUT===nodeContext||CONTEXT_BLOCK_IN===nodeContext;if(allowToSeek){if(skipSeparationSpace(state,true,-1)){atNewLine=true;if(state.lineIndent>parentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent<parentIndent){indentStatus=-1}}}if(indentStatus===1){while(readTagProperty(state)||readAnchorProperty(state)){if(skipSeparationSpace(state,true,-1)){atNewLine=true;allowBlockCollections=allowBlockStyles;if(state.lineIndent>parentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent<parentIndent){indentStatus=-1}}else{allowBlockCollections=false}}}if(allowBlockCollections){allowBlockCollections=atNewLine||allowCompact}if(indentStatus===1||CONTEXT_BLOCK_OUT===nodeContext){if(CONTEXT_FLOW_IN===nodeContext||CONTEXT_FLOW_OUT===nodeContext){flowIndent=parentIndent}else{flowIndent=parentIndent+1}blockIndent=state.position-state.lineStart;if(indentStatus===1){if(allowBlockCollections&&(readBlockSequence(state,blockIndent)||readBlockMapping(state,blockIndent,flowIndent))||readFlowCollection(state,flowIndent)){hasContent=true}else{if(allowBlockScalars&&readBlockScalar(state,flowIndent)||readSingleQuotedScalar(state,flowIndent)||readDoubleQuotedScalar(state,flowIndent)){hasContent=true}else if(readAlias(state)){hasContent=true;if(state.tag!==null||state.anchor!==null){throwError(state,"alias node should not have any properties")}}else if(readPlainScalar(state,flowIndent,CONTEXT_FLOW_IN===nodeContext)){hasContent=true;if(state.tag===null){state.tag="?"}}if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}}else if(indentStatus===0){hasContent=allowBlockCollections&&readBlockSequence(state,blockIndent)}}if(state.tag===null){if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}else if(state.tag==="?"){if(state.result!==null&&state.kind!=="scalar"){throwError(state,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+state.kind+'"')}for(typeIndex=0,typeQuantity=state.implicitTypes.length;typeIndex<typeQuantity;typeIndex+=1){type=state.implicitTypes[typeIndex];if(type.resolve(state.result)){state.result=type.construct(state.result);state.tag=type.tag;if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}break}}}else if(state.tag!=="!"){if(_hasOwnProperty.call(state.typeMap[state.kind||"fallback"],state.tag)){type=state.typeMap[state.kind||"fallback"][state.tag]}else{type=null;typeList=state.typeMap.multi[state.kind||"fallback"];for(typeIndex=0,typeQuantity=typeList.length;typeIndex<typeQuantity;typeIndex+=1){if(state.tag.slice(0,typeList[typeIndex].tag.length)===typeList[typeIndex].tag){type=typeList[typeIndex];break}}}if(!type){throwError(state,"unknown tag !<"+state.tag+">")}if(state.result!==null&&type.kind!==state.kind){throwError(state,"unacceptable node kind for !<"+state.tag+'> tag; it should be "'+type.kind+'", not "'+state.kind+'"')}if(!type.resolve(state.result,state.tag)){throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")}else{state.result=type.construct(state.result,state.tag);if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}}if(state.listener!==null){state.listener("close",state)}return state.tag!==null||state.anchor!==null||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=state.legacy;state.tagMap=Object.create(null);state.anchorMap=Object.create(null);while((ch=state.input.charCodeAt(state.position))!==0){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>0||ch!==37){break}hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1){throwError(state,"directive name must not be less than one character in length")}while(ch!==0){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveArgs.push(state.input.slice(_position,state.position))}if(ch!==0)readLineBreak(state);if(_hasOwnProperty.call(directiveHandlers,directiveName)){directiveHandlers[directiveName](state,directiveName,directiveArgs)}else{throwWarning(state,'unknown document directive "'+directiveName+'"')}}skipSeparationSpace(state,true,-1);if(state.lineIndent===0&&state.input.charCodeAt(state.position)===45&&state.input.charCodeAt(state.position+1)===45&&state.input.charCodeAt(state.position+2)===45){state.position+=3;skipSeparationSpace(state,true,-1)}else if(hasDirectives){throwError(state,"directives end mark is expected")}composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))){throwWarning(state,"non-ASCII line breaks are interpreted as content")}state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(state.input.charCodeAt(state.position)===46){state.position+=3;skipSeparationSpace(state,true,-1)}return}if(state.position<state.length-1){throwError(state,"end of the stream or a document separator is expected")}else{return}}function loadDocuments(input,options){input=String(input);options=options||{};if(input.length!==0){if(input.charCodeAt(input.length-1)!==10&&input.charCodeAt(input.length-1)!==13){input+="\n"}if(input.charCodeAt(0)===65279){input=input.slice(1)}}var state=new State(input,options);var nullpos=input.indexOf("\0");if(nullpos!==-1){state.position=nullpos;throwError(state,"null byte is not allowed in input")}state.input+="\0";while(state.input.charCodeAt(state.position)===32){state.lineIndent+=1;state.position+=1}while(state.position<state.length-1){readDocument(state)}return state.documents}function loadAll(input,iterator,options){if(iterator!==null&&typeof iterator==="object"&&typeof options==="undefined"){options=iterator;iterator=null}var documents=loadDocuments(input,options);if(typeof iterator!=="function"){return documents}for(var index=0,length=documents.length;index<length;index+=1){iterator(documents[index])}}function load(input,options){var documents=loadDocuments(input,options);if(documents.length===0){return undefined}else if(documents.length===1){return documents[0]}throw new YAMLException("expected a single document in the stream, but found more")}loader$1.loadAll=loadAll;loader$1.load=load;return loader$1}var dumper$1={};var hasRequiredDumper$1;function requireDumper$1(){if(hasRequiredDumper$1)return dumper$1;hasRequiredDumper$1=1;var common=requireCommon$2();var YAMLException=requireException$1();var DEFAULT_SCHEMA=require_default$1();var _toString=Object.prototype.toString;var _hasOwnProperty=Object.prototype.hasOwnProperty;var CHAR_BOM=65279;var CHAR_TAB=9;var CHAR_LINE_FEED=10;var CHAR_CARRIAGE_RETURN=13;var CHAR_SPACE=32;var CHAR_EXCLAMATION=33;var CHAR_DOUBLE_QUOTE=34;var CHAR_SHARP=35;var CHAR_PERCENT=37;var CHAR_AMPERSAND=38;var CHAR_SINGLE_QUOTE=39;var CHAR_ASTERISK=42;var CHAR_COMMA=44;var CHAR_MINUS=45;var CHAR_COLON=58;var CHAR_EQUALS=61;var CHAR_GREATER_THAN=62;var CHAR_QUESTION=63;var CHAR_COMMERCIAL_AT=64;var CHAR_LEFT_SQUARE_BRACKET=91;var CHAR_RIGHT_SQUARE_BRACKET=93;var CHAR_GRAVE_ACCENT=96;var CHAR_LEFT_CURLY_BRACKET=123;var CHAR_VERTICAL_LINE=124;var CHAR_RIGHT_CURLY_BRACKET=125;var ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0";ESCAPE_SEQUENCES[7]="\\a";ESCAPE_SEQUENCES[8]="\\b";ESCAPE_SEQUENCES[9]="\\t";ESCAPE_SEQUENCES[10]="\\n";ESCAPE_SEQUENCES[11]="\\v";ESCAPE_SEQUENCES[12]="\\f";ESCAPE_SEQUENCES[13]="\\r";ESCAPE_SEQUENCES[27]="\\e";ESCAPE_SEQUENCES[34]='\\"';ESCAPE_SEQUENCES[92]="\\\\";ESCAPE_SEQUENCES[133]="\\N";ESCAPE_SEQUENCES[160]="\\_";ESCAPE_SEQUENCES[8232]="\\L";ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var DEPRECATED_BASE60_SYNTAX=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(schema,map){var result,keys,index,length,tag,style,type;if(map===null)return{};result={};keys=Object.keys(map);for(index=0,length=keys.length;index<length;index+=1){tag=keys[index];style=String(map[tag]);if(tag.slice(0,2)==="!!"){tag="tag:yaml.org,2002:"+tag.slice(2)}type=schema.compiledTypeMap["fallback"][tag];if(type&&_hasOwnProperty.call(type.styleAliases,style)){style=type.styleAliases[style]}result[tag]=style}return result}function encodeHex(character){var string,handle,length;string=character.toString(16).toUpperCase();if(character<=255){handle="x";length=2}else if(character<=65535){handle="u";length=4}else if(character<=4294967295){handle="U";length=8}else{throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+handle+common.repeat("0",length-string.length)+string}var QUOTING_TYPE_SINGLE=1,QUOTING_TYPE_DOUBLE=2;function State(options){this.schema=options["schema"]||DEFAULT_SCHEMA;this.indent=Math.max(1,options["indent"]||2);this.noArrayIndent=options["noArrayIndent"]||false;this.skipInvalid=options["skipInvalid"]||false;this.flowLevel=common.isNothing(options["flowLevel"])?-1:options["flowLevel"];this.styleMap=compileStyleMap(this.schema,options["styles"]||null);this.sortKeys=options["sortKeys"]||false;this.lineWidth=options["lineWidth"]||80;this.noRefs=options["noRefs"]||false;this.noCompatMode=options["noCompatMode"]||false;this.condenseFlow=options["condenseFlow"]||false;this.quotingType=options["quotingType"]==='"'?QUOTING_TYPE_DOUBLE:QUOTING_TYPE_SINGLE;this.forceQuotes=options["forceQuotes"]||false;this.replacer=typeof options["replacer"]==="function"?options["replacer"]:null;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(string,spaces){var ind=common.repeat(" ",spaces),position=0,next=-1,result="",line,length=string.length;while(position<length){next=string.indexOf("\n",position);if(next===-1){line=string.slice(position);position=length}else{line=string.slice(position,next+1);position=next+1}if(line.length&&line!=="\n")result+=ind;result+=line}return result}function generateNextLine(state,level){return"\n"+common.repeat(" ",state.indent*level)}function testImplicitResolving(state,str){var index,length,type;for(index=0,length=state.implicitTypes.length;index<length;index+=1){type=state.implicitTypes[index];if(type.resolve(str)){return true}}return false}function isWhitespace(c){return c===CHAR_SPACE||c===CHAR_TAB}function isPrintable(c){return 32<=c&&c<=126||161<=c&&c<=55295&&c!==8232&&c!==8233||57344<=c&&c<=65533&&c!==CHAR_BOM||65536<=c&&c<=1114111}function isNsCharOrWhitespace(c){return isPrintable(c)&&c!==CHAR_BOM&&c!==CHAR_CARRIAGE_RETURN&&c!==CHAR_LINE_FEED}function isPlainSafe(c,prev,inblock){var cIsNsCharOrWhitespace=isNsCharOrWhitespace(c);var cIsNsChar=cIsNsCharOrWhitespace&&!isWhitespace(c);return(inblock?cIsNsCharOrWhitespace:cIsNsCharOrWhitespace&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET)&&c!==CHAR_SHARP&&!(prev===CHAR_COLON&&!cIsNsChar)||isNsCharOrWhitespace(prev)&&!isWhitespace(prev)&&c===CHAR_SHARP||prev===CHAR_COLON&&cIsNsChar}function isPlainSafeFirst(c){return isPrintable(c)&&c!==CHAR_BOM&&!isWhitespace(c)&&c!==CHAR_MINUS&&c!==CHAR_QUESTION&&c!==CHAR_COLON&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_SHARP&&c!==CHAR_AMPERSAND&&c!==CHAR_ASTERISK&&c!==CHAR_EXCLAMATION&&c!==CHAR_VERTICAL_LINE&&c!==CHAR_EQUALS&&c!==CHAR_GREATER_THAN&&c!==CHAR_SINGLE_QUOTE&&c!==CHAR_DOUBLE_QUOTE&&c!==CHAR_PERCENT&&c!==CHAR_COMMERCIAL_AT&&c!==CHAR_GRAVE_ACCENT}function isPlainSafeLast(c){return!isWhitespace(c)&&c!==CHAR_COLON}function codePointAt(string,pos){var first=string.charCodeAt(pos),second;if(first>=55296&&first<=56319&&pos+1<string.length){second=string.charCodeAt(pos+1);if(second>=56320&&second<=57343){return(first-55296)*1024+second-56320+65536}}return first}function needIndentIndicator(string){var leadingSpaceRe=/^\n* /;return leadingSpaceRe.test(string)}var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(string,singleLineOnly,indentPerLevel,lineWidth,testAmbiguousType,quotingType,forceQuotes,inblock){var i;var char=0;var prevChar=null;var hasLineBreak=false;var hasFoldableLine=false;var shouldTrackWidth=lineWidth!==-1;var previousLineBreak=-1;var plain=isPlainSafeFirst(codePointAt(string,0))&&isPlainSafeLast(codePointAt(string,string.length-1));if(singleLineOnly||forceQuotes){for(i=0;i<string.length;char>=65536?i+=2:i++){char=codePointAt(string,i);if(!isPrintable(char)){return STYLE_DOUBLE}plain=plain&&isPlainSafe(char,prevChar,inblock);prevChar=char}}else{for(i=0;i<string.length;char>=65536?i+=2:i++){char=codePointAt(string,i);if(char===CHAR_LINE_FEED){hasLineBreak=true;if(shouldTrackWidth){hasFoldableLine=hasFoldableLine||i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ";previousLineBreak=i}}else if(!isPrintable(char)){return STYLE_DOUBLE}plain=plain&&isPlainSafe(char,prevChar,inblock);prevChar=char}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&(i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ")}if(!hasLineBreak&&!hasFoldableLine){if(plain&&!forceQuotes&&!testAmbiguousType(string)){return STYLE_PLAIN}return quotingType===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE}if(indentPerLevel>9&&needIndentIndicator(string)){return STYLE_DOUBLE}if(!forceQuotes){return hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}return quotingType===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE}function writeScalar(state,string,level,iskey,inblock){state.dump=function(){if(string.length===0){return state.quotingType===QUOTING_TYPE_DOUBLE?'""':"''"}if(!state.noCompatMode){if(DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1||DEPRECATED_BASE60_SYNTAX.test(string)){return state.quotingType===QUOTING_TYPE_DOUBLE?'"'+string+'"':"'"+string+"'"}}var indent=state.indent*Math.max(1,level);var lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent);var singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;function testAmbiguity(string){return testImplicitResolving(state,string)}switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity,state.quotingType,state.forceQuotes&&!iskey,inblock)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return">"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string)+'"';default:throw new YAMLException("impossible error: invalid scalar style")}}()}function blockHeader(string,indentPerLevel){var indentIndicator=needIndentIndicator(string)?String(indentPerLevel):"";var clip=string[string.length-1]==="\n";var keep=clip&&(string[string.length-2]==="\n"||string==="\n");var chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+"\n"}function dropEndingNewline(string){return string[string.length-1]==="\n"?string.slice(0,-1):string}function foldString(string,width){var lineRe=/(\n+)([^\n]*)/g;var result=function(){var nextLF=string.indexOf("\n");nextLF=nextLF!==-1?nextLF:string.length;lineRe.lastIndex=nextLF;return foldLine(string.slice(0,nextLF),width)}();var prevMoreIndented=string[0]==="\n"||string[0]===" ";var moreIndented;var match;while(match=lineRe.exec(string)){var prefix=match[1],line=match[2];moreIndented=line[0]===" ";result+=prefix+(!prevMoreIndented&&!moreIndented&&line!==""?"\n":"")+foldLine(line,width);prevMoreIndented=moreIndented}return result}function foldLine(line,width){if(line===""||line[0]===" ")return line;var breakRe=/ [^ ]/g;var match;var start=0,end,curr=0,next=0;var result="";while(match=breakRe.exec(line)){next=match.index;if(next-start>width){end=curr>start?curr:next;result+="\n"+line.slice(start,end);start=end+1}curr=next}result+="\n";if(line.length-start>width&&curr>start){result+=line.slice(start,curr)+"\n"+line.slice(curr+1)}else{result+=line.slice(start)}return result.slice(1)}function escapeString(string){var result="";var char=0;var escapeSeq;for(var i=0;i<string.length;char>=65536?i+=2:i++){char=codePointAt(string,i);escapeSeq=ESCAPE_SEQUENCES[char];if(!escapeSeq&&isPrintable(char)){result+=string[i];if(char>=65536)result+=string[i+1]}else{result+=escapeSeq||encodeHex(char)}}return result}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length,value;for(index=0,length=object.length;index<length;index+=1){value=object[index];if(state.replacer){value=state.replacer.call(object,String(index),value)}if(writeNode(state,level,value,false,false)||typeof value==="undefined"&&writeNode(state,level,null,false,false)){if(_result!=="")_result+=","+(!state.condenseFlow?" ":"");_result+=state.dump}}state.tag=_tag;state.dump="["+_result+"]"}function writeBlockSequence(state,level,object,compact){var _result="",_tag=state.tag,index,length,value;for(index=0,length=object.length;index<length;index+=1){value=object[index];if(state.replacer){value=state.replacer.call(object,String(index),value)}if(writeNode(state,level+1,value,true,true,false,true)||typeof value==="undefined"&&writeNode(state,level+1,null,true,true,false,true)){if(!compact||_result!==""){_result+=generateNextLine(state,level)}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){_result+="-"}else{_result+="- "}_result+=state.dump}}state.tag=_tag;state.dump=_result||"[]"}function writeFlowMapping(state,level,object){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,pairBuffer;for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer="";if(_result!=="")pairBuffer+=", ";if(state.condenseFlow)pairBuffer+='"';objectKey=objectKeyList[index];objectValue=object[objectKey];if(state.replacer){objectValue=state.replacer.call(object,objectKey,objectValue)}if(!writeNode(state,level,objectKey,false,false)){continue}if(state.dump.length>1024)pairBuffer+="? ";pairBuffer+=state.dump+(state.condenseFlow?'"':"")+":"+(state.condenseFlow?"":" ");if(!writeNode(state,level,objectValue,false,false)){continue}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state.sortKeys===true){objectKeyList.sort()}else if(typeof state.sortKeys==="function"){objectKeyList.sort(state.sortKeys)}else if(state.sortKeys){throw new YAMLException("sortKeys must be a boolean or a function")}for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer="";if(!compact||_result!==""){pairBuffer+=generateNextLine(state,level)}objectKey=objectKeyList[index];objectValue=object[objectKey];if(state.replacer){objectValue=state.replacer.call(object,objectKey,objectValue)}if(!writeNode(state,level+1,objectKey,true,true,true)){continue}explicitPair=state.tag!==null&&state.tag!=="?"||state.dump&&state.dump.length>1024;if(explicitPair){if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+="?"}else{pairBuffer+="? "}}pairBuffer+=state.dump;if(explicitPair){pairBuffer+=generateNextLine(state,level)}if(!writeNode(state,level+1,objectValue,true,explicitPair)){continue}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+=":"}else{pairBuffer+=": "}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;typeList=explicit?state.explicitTypes:state.implicitTypes;for(index=0,length=typeList.length;index<length;index+=1){type=typeList[index];if((type.instanceOf||type.predicate)&&(!type.instanceOf||typeof object==="object"&&object instanceof type.instanceOf)&&(!type.predicate||type.predicate(object))){if(explicit){if(type.multi&&type.representName){state.tag=type.representName(object)}else{state.tag=type.tag}}else{state.tag="?"}if(type.represent){style=state.styleMap[type.tag]||type.defaultStyle;if(_toString.call(type.represent)==="[object Function]"){_result=type.represent(object,style)}else if(_hasOwnProperty.call(type.represent,style)){_result=type.represent[style](object,style)}else{throw new YAMLException("!<"+type.tag+'> tag resolver accepts not "'+style+'" style')}state.dump=_result}return true}}return false}function writeNode(state,level,object,block,compact,iskey,isblockseq){state.tag=null;state.dump=object;if(!detectType(state,object,false)){detectType(state,object,true)}var type=_toString.call(state.dump);var inblock=block;var tagStr;if(block){block=state.flowLevel<0||state.flowLevel>level}var objectOrArray=type==="[object Object]"||type==="[object Array]",duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1}if(state.tag!==null&&state.tag!=="?"||duplicate||state.indent!==2&&level>0){compact=false}if(duplicate&&state.usedDuplicates[duplicateIndex]){state.dump="*ref_"+duplicateIndex}else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]){state.usedDuplicates[duplicateIndex]=true}if(type==="[object Object]"){if(block&&Object.keys(state.dump).length!==0){writeBlockMapping(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowMapping(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object Array]"){if(block&&state.dump.length!==0){if(state.noArrayIndent&&!isblockseq&&level>0){writeBlockSequence(state,level-1,state.dump,compact)}else{writeBlockSequence(state,level,state.dump,compact)}if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowSequence(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object String]"){if(state.tag!=="?"){writeScalar(state,state.dump,level,iskey,inblock)}}else if(type==="[object Undefined]"){return false}else{if(state.skipInvalid)return false;throw new YAMLException("unacceptable kind of an object to dump "+type)}if(state.tag!==null&&state.tag!=="?"){tagStr=encodeURI(state.tag[0]==="!"?state.tag.slice(1):state.tag).replace(/!/g,"%21");if(state.tag[0]==="!"){tagStr="!"+tagStr}else if(tagStr.slice(0,18)==="tag:yaml.org,2002:"){tagStr="!!"+tagStr.slice(18)}else{tagStr="!<"+tagStr+">"}state.dump=tagStr+" "+state.dump}}return true}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index<length;index+=1){state.duplicates.push(objects[duplicatesIndexes[index]])}state.usedDuplicates=new Array(length)}function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(object!==null&&typeof object==="object"){index=objects.indexOf(object);if(index!==-1){if(duplicatesIndexes.indexOf(index)===-1){duplicatesIndexes.push(index)}}else{objects.push(object);if(Array.isArray(object)){for(index=0,length=object.length;index<length;index+=1){inspectNode(object[index],objects,duplicatesIndexes)}}else{objectKeyList=Object.keys(object);for(index=0,length=objectKeyList.length;index<length;index+=1){inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes)}}}}}function dump(input,options){options=options||{};var state=new State(options);if(!state.noRefs)getDuplicateReferences(input,state);var value=input;if(state.replacer){value=state.replacer.call({"":value},"",value)}if(writeNode(state,0,value,true,true))return state.dump+"\n";return""}dumper$1.dump=dump;return dumper$1}var hasRequiredJsYaml$1;function requireJsYaml$1(){if(hasRequiredJsYaml$1)return jsYaml$1;hasRequiredJsYaml$1=1;var loader=requireLoader$1();var dumper=requireDumper$1();function renamed(from,to){return function(){throw new Error("Function yaml."+from+" is removed in js-yaml 4. "+"Use yaml."+to+" instead, which is now safe by default.")}}jsYaml$1.Type=requireType$1();jsYaml$1.Schema=requireSchema$1();jsYaml$1.FAILSAFE_SCHEMA=requireFailsafe$1();jsYaml$1.JSON_SCHEMA=requireJson$1();jsYaml$1.CORE_SCHEMA=requireCore$1();jsYaml$1.DEFAULT_SCHEMA=require_default$1();jsYaml$1.load=loader.load;jsYaml$1.loadAll=loader.loadAll;jsYaml$1.dump=dumper.dump;jsYaml$1.YAMLException=requireException$1();jsYaml$1.types={binary:requireBinary$1(),float:requireFloat$1(),map:requireMap$1(),null:require_null$1(),pairs:requirePairs$1(),set:requireSet$1(),timestamp:requireTimestamp$1(),bool:requireBool$1(),int:requireInt$1(),merge:requireMerge$1(),omap:requireOmap$1(),seq:requireSeq$1(),str:requireStr$1()};jsYaml$1.safeLoad=renamed("safeLoad","load");jsYaml$1.safeLoadAll=renamed("safeLoadAll","loadAll");jsYaml$1.safeDump=renamed("safeDump","dump");return jsYaml$1}var hasRequiredWriteYamlFile;function requireWriteYamlFile(){if(hasRequiredWriteYamlFile)return writeYamlFile.exports;hasRequiredWriteYamlFile=1;const path=require$$0$6;const fs=require$$0$2;const writeFileAtomic=requireWriteFileAtomic();const YAML=requireJsYaml$1();const main=(fn,fp,data,opts)=>{if(!fp){throw new TypeError("Expected a filepath")}if(data===undefined){throw new TypeError("Expected data to stringify")}opts=opts||{};const yaml=YAML.dump(data,opts);return fn(fp,yaml,{mode:opts.mode})};writeYamlFile.exports=async(fp,data,opts)=>{await fs.promises.mkdir(path.dirname(fp),{recursive:true});return main(writeFileAtomic,fp,data,opts)};writeYamlFile.exports.sync=(fp,data,opts)=>{fs.mkdirSync(path.dirname(fp),{recursive:true});main(writeFileAtomic.sync,fp,data,opts)};return writeYamlFile.exports}var hasRequiredLib$9;function requireLib$9(){if(hasRequiredLib$9)return lib$8;hasRequiredLib$9=1;var __importDefault=lib$8&&lib$8.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(lib$8,"__esModule",{value:true});lib$8.writeProjectManifest=void 0;const fs_1=require$$0$2;const path_1=__importDefault(require$$0$6);const text_comments_parser_1=requireLib$b();const json5_1=__importDefault(require$$1);const write_file_atomic_1=__importDefault(requireLib$a());const write_yaml_file_1=__importDefault(requireWriteYamlFile());const YAML_FORMAT={noCompatMode:true,noRefs:true};async function writeProjectManifest(filePath,manifest,opts){const fileType=filePath.slice(filePath.lastIndexOf(".")+1).toLowerCase();if(fileType==="yaml"){return(0,write_yaml_file_1.default)(filePath,manifest,YAML_FORMAT)}await fs_1.promises.mkdir(path_1.default.dirname(filePath),{recursive:true});const trailingNewline=opts?.insertFinalNewline===false?"":"\n";const indent=opts?.indent??"\t";const json=fileType==="json5"?stringifyJson5(manifest,indent,opts?.comments):JSON.stringify(manifest,undefined,indent);return(0,write_file_atomic_1.default)(filePath,`${json}${trailingNewline}`)}lib$8.writeProjectManifest=writeProjectManifest;function stringifyJson5(obj,indent,comments){const json5=json5_1.default.stringify(obj,undefined,indent);if(comments){return(0,text_comments_parser_1.insertComments)(json5,comments)}return json5}return lib$8}var readYamlFile={exports:{}};var jsYaml={};var loader={};var common$1={};var hasRequiredCommon$1;function requireCommon$1(){if(hasRequiredCommon$1)return common$1;hasRequiredCommon$1=1;function isNothing(subject){return typeof subject==="undefined"||subject===null}function isObject(subject){return typeof subject==="object"&&subject!==null}function toArray(sequence){if(Array.isArray(sequence))return sequence;else if(isNothing(sequence))return[];return[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source){sourceKeys=Object.keys(source);for(index=0,length=sourceKeys.length;index<length;index+=1){key=sourceKeys[index];target[key]=source[key]}}return target}function repeat(string,count){var result="",cycle;for(cycle=0;cycle<count;cycle+=1){result+=string}return result}function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number}common$1.isNothing=isNothing;common$1.isObject=isObject;common$1.toArray=toArray;common$1.repeat=repeat;common$1.isNegativeZero=isNegativeZero;common$1.extend=extend;return common$1}var exception;var hasRequiredException;function requireException(){if(hasRequiredException)return exception;hasRequiredException=1;function formatError(exception,compact){var where="",message=exception.reason||"(unknown reason)";if(!exception.mark)return message;if(exception.mark.name){where+='in "'+exception.mark.name+'" '}where+="("+(exception.mark.line+1)+":"+(exception.mark.column+1)+")";if(!compact&&exception.mark.snippet){where+="\n\n"+exception.mark.snippet}return message+" "+where}function YAMLException(reason,mark){Error.call(this);this.name="YAMLException";this.reason=reason;this.mark=mark;this.message=formatError(this,false);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(compact){return this.name+": "+formatError(this,compact)};exception=YAMLException;return exception}var snippet;var hasRequiredSnippet;function requireSnippet(){if(hasRequiredSnippet)return snippet;hasRequiredSnippet=1;var common=requireCommon$1();function getLine(buffer,lineStart,lineEnd,position,maxLineLength){var head="";var tail="";var maxHalfLength=Math.floor(maxLineLength/2)-1;if(position-lineStart>maxHalfLength){head=" ... ";lineStart=position-maxHalfLength+head.length}if(lineEnd-position>maxHalfLength){tail=" ...";lineEnd=position+maxHalfLength-tail.length}return{str:head+buffer.slice(lineStart,lineEnd).replace(/\t/g,"\u2192")+tail,pos:position-lineStart+head.length}}function padStart(string,max){return common.repeat(" ",max-string.length)+string}function makeSnippet(mark,options){options=Object.create(options||null);if(!mark.buffer)return null;if(!options.maxLength)options.maxLength=79;if(typeof options.indent!=="number")options.indent=1;if(typeof options.linesBefore!=="number")options.linesBefore=3;if(typeof options.linesAfter!=="number")options.linesAfter=2;var re=/\r?\n|\r|\0/g;var lineStarts=[0];var lineEnds=[];var match;var foundLineNo=-1;while(match=re.exec(mark.buffer)){lineEnds.push(match.index);lineStarts.push(match.index+match[0].length);if(mark.position<=match.index&&foundLineNo<0){foundLineNo=lineStarts.length-2}}if(foundLineNo<0)foundLineNo=lineStarts.length-1;var result="",i,line;var lineNoLength=Math.min(mark.line+options.linesAfter,lineEnds.length).toString().length;var maxLineLength=options.maxLength-(options.indent+lineNoLength+3);for(i=1;i<=options.linesBefore;i++){if(foundLineNo-i<0)break;line=getLine(mark.buffer,lineStarts[foundLineNo-i],lineEnds[foundLineNo-i],mark.position-(lineStarts[foundLineNo]-lineStarts[foundLineNo-i]),maxLineLength);result=common.repeat(" ",options.indent)+padStart((mark.line-i+1).toString(),lineNoLength)+" | "+line.str+"\n"+result}line=getLine(mark.buffer,lineStarts[foundLineNo],lineEnds[foundLineNo],mark.position,maxLineLength);result+=common.repeat(" ",options.indent)+padStart((mark.line+1).toString(),lineNoLength)+" | "+line.str+"\n";result+=common.repeat("-",options.indent+lineNoLength+3+line.pos)+"^"+"\n";for(i=1;i<=options.linesAfter;i++){if(foundLineNo+i>=lineEnds.length)break;line=getLine(mark.buffer,lineStarts[foundLineNo+i],lineEnds[foundLineNo+i],mark.position-(lineStarts[foundLineNo]-lineStarts[foundLineNo+i]),maxLineLength);result+=common.repeat(" ",options.indent)+padStart((mark.line+i+1).toString(),lineNoLength)+" | "+line.str+"\n"}return result.replace(/\n$/,"")}snippet=makeSnippet;return snippet}var type;var hasRequiredType;function requireType(){if(hasRequiredType)return type;hasRequiredType=1;var YAMLException=requireException();var TYPE_CONSTRUCTOR_OPTIONS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var YAML_NODE_KINDS=["scalar","sequence","mapping"];function compileStyleAliases(map){var result={};if(map!==null){Object.keys(map).forEach((function(style){map[style].forEach((function(alias){result[String(alias)]=style}))}))}return result}function Type(tag,options){options=options||{};Object.keys(options).forEach((function(name){if(TYPE_CONSTRUCTOR_OPTIONS.indexOf(name)===-1){throw new YAMLException('Unknown option "'+name+'" is met in definition of "'+tag+'" YAML type.')}}));this.options=options;this.tag=tag;this.kind=options["kind"]||null;this.resolve=options["resolve"]||function(){return true};this.construct=options["construct"]||function(data){return data};this.instanceOf=options["instanceOf"]||null;this.predicate=options["predicate"]||null;this.represent=options["represent"]||null;this.representName=options["representName"]||null;this.defaultStyle=options["defaultStyle"]||null;this.multi=options["multi"]||false;this.styleAliases=compileStyleAliases(options["styleAliases"]||null);if(YAML_NODE_KINDS.indexOf(this.kind)===-1){throw new YAMLException('Unknown kind "'+this.kind+'" is specified for "'+tag+'" YAML type.')}}type=Type;return type}var schema;var hasRequiredSchema;function requireSchema(){if(hasRequiredSchema)return schema;hasRequiredSchema=1;var YAMLException=requireException();var Type=requireType();function compileList(schema,name){var result=[];schema[name].forEach((function(currentType){var newIndex=result.length;result.forEach((function(previousType,previousIndex){if(previousType.tag===currentType.tag&&previousType.kind===currentType.kind&&previousType.multi===currentType.multi){newIndex=previousIndex}}));result[newIndex]=currentType}));return result}function compileMap(){var result={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},index,length;function collectType(type){if(type.multi){result.multi[type.kind].push(type);result.multi["fallback"].push(type)}else{result[type.kind][type.tag]=result["fallback"][type.tag]=type}}for(index=0,length=arguments.length;index<length;index+=1){arguments[index].forEach(collectType)}return result}function Schema(definition){return this.extend(definition)}Schema.prototype.extend=function extend(definition){var implicit=[];var explicit=[];if(definition instanceof Type){explicit.push(definition)}else if(Array.isArray(definition)){explicit=explicit.concat(definition)}else if(definition&&(Array.isArray(definition.implicit)||Array.isArray(definition.explicit))){if(definition.implicit)implicit=implicit.concat(definition.implicit);if(definition.explicit)explicit=explicit.concat(definition.explicit)}else{throw new YAMLException("Schema.extend argument should be a Type, [ Type ], "+"or a schema definition ({ implicit: [...], explicit: [...] })")}implicit.forEach((function(type){if(!(type instanceof Type)){throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.")}if(type.loadKind&&type.loadKind!=="scalar"){throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}if(type.multi){throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}}));explicit.forEach((function(type){if(!(type instanceof Type)){throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.")}}));var result=Object.create(Schema.prototype);result.implicit=(this.implicit||[]).concat(implicit);result.explicit=(this.explicit||[]).concat(explicit);result.compiledImplicit=compileList(result,"implicit");result.compiledExplicit=compileList(result,"explicit");result.compiledTypeMap=compileMap(result.compiledImplicit,result.compiledExplicit);return result};schema=Schema;return schema}var str;var hasRequiredStr;function requireStr(){if(hasRequiredStr)return str;hasRequiredStr=1;var Type=requireType();str=new Type("tag:yaml.org,2002:str",{kind:"scalar",construct:function(data){return data!==null?data:""}});return str}var seq;var hasRequiredSeq;function requireSeq(){if(hasRequiredSeq)return seq;hasRequiredSeq=1;var Type=requireType();seq=new Type("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(data){return data!==null?data:[]}});return seq}var map;var hasRequiredMap;function requireMap(){if(hasRequiredMap)return map;hasRequiredMap=1;var Type=requireType();map=new Type("tag:yaml.org,2002:map",{kind:"mapping",construct:function(data){return data!==null?data:{}}});return map}var failsafe;var hasRequiredFailsafe;function requireFailsafe(){if(hasRequiredFailsafe)return failsafe;hasRequiredFailsafe=1;var Schema=requireSchema();failsafe=new Schema({explicit:[requireStr(),requireSeq(),requireMap()]});return failsafe}var _null;var hasRequired_null;function require_null(){if(hasRequired_null)return _null;hasRequired_null=1;var Type=requireType();function resolveYamlNull(data){if(data===null)return true;var max=data.length;return max===1&&data==="~"||max===4&&(data==="null"||data==="Null"||data==="NULL")}function constructYamlNull(){return null}function isNull(object){return object===null}_null=new Type("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});return _null}var bool;var hasRequiredBool;function requireBool(){if(hasRequiredBool)return bool;hasRequiredBool=1;var Type=requireType();function resolveYamlBoolean(data){if(data===null)return false;var max=data.length;return max===4&&(data==="true"||data==="True"||data==="TRUE")||max===5&&(data==="false"||data==="False"||data==="FALSE")}function constructYamlBoolean(data){return data==="true"||data==="True"||data==="TRUE"}function isBoolean(object){return Object.prototype.toString.call(object)==="[object Boolean]"}bool=new Type("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(object){return object?"true":"false"},uppercase:function(object){return object?"TRUE":"FALSE"},camelcase:function(object){return object?"True":"False"}},defaultStyle:"lowercase"});return bool}var int;var hasRequiredInt;function requireInt(){if(hasRequiredInt)return int;hasRequiredInt=1;var common=requireCommon$1();var Type=requireType();function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}function resolveYamlInteger(data){if(data===null)return false;var max=data.length,index=0,hasDigits=false,ch;if(!max)return false;ch=data[index];if(ch==="-"||ch==="+"){ch=data[++index]}if(ch==="0"){if(index+1===max)return true;ch=data[++index];if(ch==="b"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(ch!=="0"&&ch!=="1")return false;hasDigits=true}return hasDigits&&ch!=="_"}if(ch==="x"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isHexCode(data.charCodeAt(index)))return false;hasDigits=true}return hasDigits&&ch!=="_"}if(ch==="o"){index++;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isOctCode(data.charCodeAt(index)))return false;hasDigits=true}return hasDigits&&ch!=="_"}}if(ch==="_")return false;for(;index<max;index++){ch=data[index];if(ch==="_")continue;if(!isDecCode(data.charCodeAt(index))){return false}hasDigits=true}if(!hasDigits||ch==="_")return false;return true}function constructYamlInteger(data){var value=data,sign=1,ch;if(value.indexOf("_")!==-1){value=value.replace(/_/g,"")}ch=value[0];if(ch==="-"||ch==="+"){if(ch==="-")sign=-1;value=value.slice(1);ch=value[0]}if(value==="0")return 0;if(ch==="0"){if(value[1]==="b")return sign*parseInt(value.slice(2),2);if(value[1]==="x")return sign*parseInt(value.slice(2),16);if(value[1]==="o")return sign*parseInt(value.slice(2),8)}return sign*parseInt(value,10)}function isInteger(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1===0&&!common.isNegativeZero(object))}int=new Type("tag:yaml.org,2002:int",{kind:"scalar",resolve:resolveYamlInteger,construct:constructYamlInteger,predicate:isInteger,represent:{binary:function(obj){return obj>=0?"0b"+obj.toString(2):"-0b"+obj.toString(2).slice(1)},octal:function(obj){return obj>=0?"0o"+obj.toString(8):"-0o"+obj.toString(8).slice(1)},decimal:function(obj){return obj.toString(10)},hexadecimal:function(obj){return obj>=0?"0x"+obj.toString(16).toUpperCase():"-0x"+obj.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}});return int}var float;var hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1;var common=requireCommon$1();var Type=requireType();var YAML_FLOAT_PATTERN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(data){if(data===null)return false;if(!YAML_FLOAT_PATTERN.test(data)||data[data.length-1]==="_"){return false}return true}function constructYamlFloat(data){var value,sign;value=data.replace(/_/g,"").toLowerCase();sign=value[0]==="-"?-1:1;if("+-".indexOf(value[0])>=0){value=value.slice(1)}if(value===".inf"){return sign===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(value===".nan"){return NaN}return sign*parseFloat(value,10)}var SCIENTIFIC_WITHOUT_DOT=/^[-+]?[0-9]+e/;function representYamlFloat(object,style){var res;if(isNaN(object)){switch(style){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===object){switch(style){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===object){switch(style){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(common.isNegativeZero(object)){return"-0.0"}res=object.toString(10);return SCIENTIFIC_WITHOUT_DOT.test(res)?res.replace("e",".e"):res}function isFloat(object){return Object.prototype.toString.call(object)==="[object Number]"&&(object%1!==0||common.isNegativeZero(object))}float=new Type("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"});return float}var json;var hasRequiredJson;function requireJson(){if(hasRequiredJson)return json;hasRequiredJson=1;json=requireFailsafe().extend({implicit:[require_null(),requireBool(),requireInt(),requireFloat()]});return json}var core;var hasRequiredCore;function requireCore(){if(hasRequiredCore)return core;hasRequiredCore=1;core=requireJson();return core}var timestamp;var hasRequiredTimestamp;function requireTimestamp(){if(hasRequiredTimestamp)return timestamp;hasRequiredTimestamp=1;var Type=requireType();var YAML_DATE_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var YAML_TIMESTAMP_REGEXP=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(data){if(data===null)return false;if(YAML_DATE_REGEXP.exec(data)!==null)return true;if(YAML_TIMESTAMP_REGEXP.exec(data)!==null)return true;return false}function constructYamlTimestamp(data){var match,year,month,day,hour,minute,second,fraction=0,delta=null,tz_hour,tz_minute,date;match=YAML_DATE_REGEXP.exec(data);if(match===null)match=YAML_TIMESTAMP_REGEXP.exec(data);if(match===null)throw new Error("Date resolve error");year=+match[1];month=+match[2]-1;day=+match[3];if(!match[4]){return new Date(Date.UTC(year,month,day))}hour=+match[4];minute=+match[5];second=+match[6];if(match[7]){fraction=match[7].slice(0,3);while(fraction.length<3){fraction+="0"}fraction=+fraction}if(match[9]){tz_hour=+match[10];tz_minute=+(match[11]||0);delta=(tz_hour*60+tz_minute)*6e4;if(match[9]==="-")delta=-delta}date=new Date(Date.UTC(year,month,day,hour,minute,second,fraction));if(delta)date.setTime(date.getTime()-delta);return date}function representYamlTimestamp(object){return object.toISOString()}timestamp=new Type("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});return timestamp}var merge;var hasRequiredMerge;function requireMerge(){if(hasRequiredMerge)return merge;hasRequiredMerge=1;var Type=requireType();function resolveYamlMerge(data){return data==="<<"||data===null}merge=new Type("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge});return merge}var binary;var hasRequiredBinary;function requireBinary(){if(hasRequiredBinary)return binary;hasRequiredBinary=1;var Type=requireType();var BASE64_MAP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(data){if(data===null)return false;var code,idx,bitlen=0,max=data.length,map=BASE64_MAP;for(idx=0;idx<max;idx++){code=map.indexOf(data.charAt(idx));if(code>64)continue;if(code<0)return false;bitlen+=6}return bitlen%8===0}function constructYamlBinary(data){var idx,tailbits,input=data.replace(/[\r\n=]/g,""),max=input.length,map=BASE64_MAP,bits=0,result=[];for(idx=0;idx<max;idx++){if(idx%4===0&&idx){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}bits=bits<<6|map.indexOf(input.charAt(idx))}tailbits=max%4*6;if(tailbits===0){result.push(bits>>16&255);result.push(bits>>8&255);result.push(bits&255)}else if(tailbits===18){result.push(bits>>10&255);result.push(bits>>2&255)}else if(tailbits===12){result.push(bits>>4&255)}return new Uint8Array(result)}function representYamlBinary(object){var result="",bits=0,idx,tail,max=object.length,map=BASE64_MAP;for(idx=0;idx<max;idx++){if(idx%3===0&&idx){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}bits=(bits<<8)+object[idx]}tail=max%3;if(tail===0){result+=map[bits>>18&63];result+=map[bits>>12&63];result+=map[bits>>6&63];result+=map[bits&63]}else if(tail===2){result+=map[bits>>10&63];result+=map[bits>>4&63];result+=map[bits<<2&63];result+=map[64]}else if(tail===1){result+=map[bits>>2&63];result+=map[bits<<4&63];result+=map[64];result+=map[64]}return result}function isBinary(obj){return Object.prototype.toString.call(obj)==="[object Uint8Array]"}binary=new Type("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary});return binary}var omap;var hasRequiredOmap;function requireOmap(){if(hasRequiredOmap)return omap;hasRequiredOmap=1;var Type=requireType();var _hasOwnProperty=Object.prototype.hasOwnProperty;var _toString=Object.prototype.toString;function resolveYamlOmap(data){if(data===null)return true;var objectKeys=[],index,length,pair,pairKey,pairHasKey,object=data;for(index=0,length=object.length;index<length;index+=1){pair=object[index];pairHasKey=false;if(_toString.call(pair)!=="[object Object]")return false;for(pairKey in pair){if(_hasOwnProperty.call(pair,pairKey)){if(!pairHasKey)pairHasKey=true;else return false}}if(!pairHasKey)return false;if(objectKeys.indexOf(pairKey)===-1)objectKeys.push(pairKey);else return false}return true}function constructYamlOmap(data){return data!==null?data:[]}omap=new Type("tag:yaml.org,2002:omap",{kind:"sequence",resolve:resolveYamlOmap,construct:constructYamlOmap});return omap}var pairs;var hasRequiredPairs;function requirePairs(){if(hasRequiredPairs)return pairs;hasRequiredPairs=1;var Type=requireType();var _toString=Object.prototype.toString;function resolveYamlPairs(data){if(data===null)return true;var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];if(_toString.call(pair)!=="[object Object]")return false;keys=Object.keys(pair);if(keys.length!==1)return false;result[index]=[keys[0],pair[keys[0]]]}return true}function constructYamlPairs(data){if(data===null)return[];var index,length,pair,keys,result,object=data;result=new Array(object.length);for(index=0,length=object.length;index<length;index+=1){pair=object[index];keys=Object.keys(pair);result[index]=[keys[0],pair[keys[0]]]}return result}pairs=new Type("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:resolveYamlPairs,construct:constructYamlPairs});return pairs}var set;var hasRequiredSet;function requireSet(){if(hasRequiredSet)return set;hasRequiredSet=1;var Type=requireType();var _hasOwnProperty=Object.prototype.hasOwnProperty;function resolveYamlSet(data){if(data===null)return true;var key,object=data;for(key in object){if(_hasOwnProperty.call(object,key)){if(object[key]!==null)return false}}return true}function constructYamlSet(data){return data!==null?data:{}}set=new Type("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet});return set}var _default;var hasRequired_default;function require_default(){if(hasRequired_default)return _default;hasRequired_default=1;_default=requireCore().extend({implicit:[requireTimestamp(),requireMerge()],explicit:[requireBinary(),requireOmap(),requirePairs(),requireSet()]});return _default}var hasRequiredLoader;function requireLoader(){if(hasRequiredLoader)return loader;hasRequiredLoader=1;var common=requireCommon$1();var YAMLException=requireException();var makeSnippet=requireSnippet();var DEFAULT_SCHEMA=require_default();var _hasOwnProperty=Object.prototype.hasOwnProperty;var CONTEXT_FLOW_IN=1;var CONTEXT_FLOW_OUT=2;var CONTEXT_BLOCK_IN=3;var CONTEXT_BLOCK_OUT=4;var CHOMPING_CLIP=1;var CHOMPING_STRIP=2;var CHOMPING_KEEP=3;var PATTERN_NON_PRINTABLE=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var PATTERN_NON_ASCII_LINE_BREAKS=/[\x85\u2028\u2029]/;var PATTERN_FLOW_INDICATORS=/[,\[\]\{\}]/;var PATTERN_TAG_HANDLE=/^(?:!|!!|![a-z\-]+!)$/i;var PATTERN_TAG_URI=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(obj){return Object.prototype.toString.call(obj)}function is_EOL(c){return c===10||c===13}function is_WHITE_SPACE(c){return c===9||c===32}function is_WS_OR_EOL(c){return c===9||c===32||c===10||c===13}function is_FLOW_INDICATOR(c){return c===44||c===91||c===93||c===123||c===125}function fromHexCode(c){var lc;if(48<=c&&c<=57){return c-48}lc=c|32;if(97<=lc&&lc<=102){return lc-97+10}return-1}function escapedHexLen(c){if(c===120){return 2}if(c===117){return 4}if(c===85){return 8}return 0}function fromDecimalCode(c){if(48<=c&&c<=57){return c-48}return-1}function simpleEscapeSequence(c){return c===48?"\0":c===97?"\x07":c===98?"\b":c===116?"\t":c===9?"\t":c===110?"\n":c===118?"\v":c===102?"\f":c===114?"\r":c===101?"\x1b":c===32?" ":c===34?'"':c===47?"/":c===92?"\\":c===78?"\x85":c===95?"\xa0":c===76?"\u2028":c===80?"\u2029":""}function charFromCodepoint(c){if(c<=65535){return String.fromCharCode(c)}return String.fromCharCode((c-65536>>10)+55296,(c-65536&1023)+56320)}var simpleEscapeCheck=new Array(256);var simpleEscapeMap=new Array(256);for(var i=0;i<256;i++){simpleEscapeCheck[i]=simpleEscapeSequence(i)?1:0;simpleEscapeMap[i]=simpleEscapeSequence(i)}function State(input,options){this.input=input;this.filename=options["filename"]||null;this.schema=options["schema"]||DEFAULT_SCHEMA;this.onWarning=options["onWarning"]||null;this.legacy=options["legacy"]||false;this.json=options["json"]||false;this.listener=options["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=input.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(state,message){var mark={name:state.filename,buffer:state.input.slice(0,-1),position:state.position,line:state.line,column:state.position-state.lineStart};mark.snippet=makeSnippet(mark);return new YAMLException(message,mark)}function throwError(state,message){throw generateError(state,message)}function throwWarning(state,message){if(state.onWarning){state.onWarning.call(null,generateError(state,message))}}var directiveHandlers={YAML:function handleYamlDirective(state,name,args){var match,major,minor;if(state.version!==null){throwError(state,"duplication of %YAML directive")}if(args.length!==1){throwError(state,"YAML directive accepts exactly one argument")}match=/^([0-9]+)\.([0-9]+)$/.exec(args[0]);if(match===null){throwError(state,"ill-formed argument of the YAML directive")}major=parseInt(match[1],10);minor=parseInt(match[2],10);if(major!==1){throwError(state,"unacceptable YAML version of the document")}state.version=args[0];state.checkLineBreaks=minor<2;if(minor!==1&&minor!==2){throwWarning(state,"unsupported YAML version of the document")}},TAG:function handleTagDirective(state,name,args){var handle,prefix;if(args.length!==2){throwError(state,"TAG directive accepts exactly two arguments")}handle=args[0];prefix=args[1];if(!PATTERN_TAG_HANDLE.test(handle)){throwError(state,"ill-formed tag handle (first argument) of the TAG directive")}if(_hasOwnProperty.call(state.tagMap,handle)){throwError(state,'there is a previously declared suffix for "'+handle+'" tag handle')}if(!PATTERN_TAG_URI.test(prefix)){throwError(state,"ill-formed tag prefix (second argument) of the TAG directive")}try{prefix=decodeURIComponent(prefix)}catch(err){throwError(state,"tag prefix is malformed: "+prefix)}state.tagMap[handle]=prefix}};function captureSegment(state,start,end,checkJson){var _position,_length,_character,_result;if(start<end){_result=state.input.slice(start,end);if(checkJson){for(_position=0,_length=_result.length;_position<_length;_position+=1){_character=_result.charCodeAt(_position);if(!(_character===9||32<=_character&&_character<=1114111)){throwError(state,"expected valid JSON character")}}}else if(PATTERN_NON_PRINTABLE.test(_result)){throwError(state,"the stream contains non-printable characters")}state.result+=_result}}function mergeMappings(state,destination,source,overridableKeys){var sourceKeys,key,index,quantity;if(!common.isObject(source)){throwError(state,"cannot merge mappings; the provided source object is unacceptable")}sourceKeys=Object.keys(source);for(index=0,quantity=sourceKeys.length;index<quantity;index+=1){key=sourceKeys[index];if(!_hasOwnProperty.call(destination,key)){destination[key]=source[key];overridableKeys[key]=true}}}function storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,startLine,startLineStart,startPos){var index,quantity;if(Array.isArray(keyNode)){keyNode=Array.prototype.slice.call(keyNode);for(index=0,quantity=keyNode.length;index<quantity;index+=1){if(Array.isArray(keyNode[index])){throwError(state,"nested arrays are not supported inside keys")}if(typeof keyNode==="object"&&_class(keyNode[index])==="[object Object]"){keyNode[index]="[object Object]"}}}if(typeof keyNode==="object"&&_class(keyNode)==="[object Object]"){keyNode="[object Object]"}keyNode=String(keyNode);if(_result===null){_result={}}if(keyTag==="tag:yaml.org,2002:merge"){if(Array.isArray(valueNode)){for(index=0,quantity=valueNode.length;index<quantity;index+=1){mergeMappings(state,_result,valueNode[index],overridableKeys)}}else{mergeMappings(state,_result,valueNode,overridableKeys)}}else{if(!state.json&&!_hasOwnProperty.call(overridableKeys,keyNode)&&_hasOwnProperty.call(_result,keyNode)){state.line=startLine||state.line;state.lineStart=startLineStart||state.lineStart;state.position=startPos||state.position;throwError(state,"duplicated mapping key")}if(keyNode==="__proto__"){Object.defineProperty(_result,keyNode,{configurable:true,enumerable:true,writable:true,value:valueNode})}else{_result[keyNode]=valueNode}delete overridableKeys[keyNode]}return _result}function readLineBreak(state){var ch;ch=state.input.charCodeAt(state.position);if(ch===10){state.position++}else if(ch===13){state.position++;if(state.input.charCodeAt(state.position)===10){state.position++}}else{throwError(state,"a line break is expected")}state.line+=1;state.lineStart=state.position;state.firstTabInLine=-1}function skipSeparationSpace(state,allowComments,checkIndent){var lineBreaks=0,ch=state.input.charCodeAt(state.position);while(ch!==0){while(is_WHITE_SPACE(ch)){if(ch===9&&state.firstTabInLine===-1){state.firstTabInLine=state.position}ch=state.input.charCodeAt(++state.position)}if(allowComments&&ch===35){do{ch=state.input.charCodeAt(++state.position)}while(ch!==10&&ch!==13&&ch!==0)}if(is_EOL(ch)){readLineBreak(state);ch=state.input.charCodeAt(state.position);lineBreaks++;state.lineIndent=0;while(ch===32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}}else{break}}if(checkIndent!==-1&&lineBreaks!==0&&state.lineIndent<checkIndent){throwWarning(state,"deficient indentation")}return lineBreaks}function testDocumentSeparator(state){var _position=state.position,ch;ch=state.input.charCodeAt(_position);if((ch===45||ch===46)&&ch===state.input.charCodeAt(_position+1)&&ch===state.input.charCodeAt(_position+2)){_position+=3;ch=state.input.charCodeAt(_position);if(ch===0||is_WS_OR_EOL(ch)){return true}}return false}function writeFoldedLines(state,count){if(count===1){state.result+=" "}else if(count>1){state.result+=common.repeat("\n",count-1)}}function readPlainScalar(state,nodeIndent,withinFlowCollection){var preceding,following,captureStart,captureEnd,hasPendingContent,_line,_lineStart,_lineIndent,_kind=state.kind,_result=state.result,ch;ch=state.input.charCodeAt(state.position);if(is_WS_OR_EOL(ch)||is_FLOW_INDICATOR(ch)||ch===35||ch===38||ch===42||ch===33||ch===124||ch===62||ch===39||ch===34||ch===37||ch===64||ch===96){return false}if(ch===63||ch===45){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){return false}}state.kind="scalar";state.result="";captureStart=captureEnd=state.position;hasPendingContent=false;while(ch!==0){if(ch===58){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)||withinFlowCollection&&is_FLOW_INDICATOR(following)){break}}else if(ch===35){preceding=state.input.charCodeAt(state.position-1);if(is_WS_OR_EOL(preceding)){break}}else if(state.position===state.lineStart&&testDocumentSeparator(state)||withinFlowCollection&&is_FLOW_INDICATOR(ch)){break}else if(is_EOL(ch)){_line=state.line;_lineStart=state.lineStart;_lineIndent=state.lineIndent;skipSeparationSpace(state,false,-1);if(state.lineIndent>=nodeIndent){hasPendingContent=true;ch=state.input.charCodeAt(state.position);continue}else{state.position=captureEnd;state.line=_line;state.lineStart=_lineStart;state.lineIndent=_lineIndent;break}}if(hasPendingContent){captureSegment(state,captureStart,captureEnd,false);writeFoldedLines(state,state.line-_line);captureStart=captureEnd=state.position;hasPendingContent=false}if(!is_WHITE_SPACE(ch)){captureEnd=state.position+1}ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,captureEnd,false);if(state.result){return true}state.kind=_kind;state.result=_result;return false}function readSingleQuotedScalar(state,nodeIndent){var ch,captureStart,captureEnd;ch=state.input.charCodeAt(state.position);if(ch!==39){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===39){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(ch===39){captureStart=state.position;state.position++;captureEnd=state.position}else{return true}}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a single quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(state,nodeIndent){var captureStart,captureEnd,hexLength,hexResult,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch!==34){return false}state.kind="scalar";state.result="";state.position++;captureStart=captureEnd=state.position;while((ch=state.input.charCodeAt(state.position))!==0){if(ch===34){captureSegment(state,captureStart,state.position,true);state.position++;return true}else if(ch===92){captureSegment(state,captureStart,state.position,true);ch=state.input.charCodeAt(++state.position);if(is_EOL(ch)){skipSeparationSpace(state,false,nodeIndent)}else if(ch<256&&simpleEscapeCheck[ch]){state.result+=simpleEscapeMap[ch];state.position++}else if((tmp=escapedHexLen(ch))>0){hexLength=tmp;hexResult=0;for(;hexLength>0;hexLength--){ch=state.input.charCodeAt(++state.position);if((tmp=fromHexCode(ch))>=0){hexResult=(hexResult<<4)+tmp}else{throwError(state,"expected hexadecimal character")}}state.result+=charFromCodepoint(hexResult);state.position++}else{throwError(state,"unknown escape sequence")}captureStart=captureEnd=state.position}else if(is_EOL(ch)){captureSegment(state,captureStart,captureEnd,true);writeFoldedLines(state,skipSeparationSpace(state,false,nodeIndent));captureStart=captureEnd=state.position}else if(state.position===state.lineStart&&testDocumentSeparator(state)){throwError(state,"unexpected end of the document within a double quoted scalar")}else{state.position++;captureEnd=state.position}}throwError(state,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(state,nodeIndent){var readNext=true,_line,_lineStart,_pos,_tag=state.tag,_result,_anchor=state.anchor,following,terminator,isPair,isExplicitPair,isMapping,overridableKeys=Object.create(null),keyNode,keyTag,valueNode,ch;ch=state.input.charCodeAt(state.position);if(ch===91){terminator=93;isMapping=false;_result=[]}else if(ch===123){terminator=125;isMapping=true;_result={}}else{return false}if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(++state.position);while(ch!==0){skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===terminator){state.position++;state.tag=_tag;state.anchor=_anchor;state.kind=isMapping?"mapping":"sequence";state.result=_result;return true}else if(!readNext){throwError(state,"missed comma between flow collection entries")}else if(ch===44){throwError(state,"expected the node content, but found ','")}keyTag=keyNode=valueNode=null;isPair=isExplicitPair=false;if(ch===63){following=state.input.charCodeAt(state.position+1);if(is_WS_OR_EOL(following)){isPair=isExplicitPair=true;state.position++;skipSeparationSpace(state,true,nodeIndent)}}_line=state.line;_lineStart=state.lineStart;_pos=state.position;composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);keyTag=state.tag;keyNode=state.result;skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if((isExplicitPair||state.line===_line)&&ch===58){isPair=true;ch=state.input.charCodeAt(++state.position);skipSeparationSpace(state,true,nodeIndent);composeNode(state,nodeIndent,CONTEXT_FLOW_IN,false,true);valueNode=state.result}if(isMapping){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_line,_lineStart,_pos)}else if(isPair){_result.push(storeMappingPair(state,null,overridableKeys,keyTag,keyNode,valueNode,_line,_lineStart,_pos))}else{_result.push(keyNode)}skipSeparationSpace(state,true,nodeIndent);ch=state.input.charCodeAt(state.position);if(ch===44){readNext=true;ch=state.input.charCodeAt(++state.position)}else{readNext=false}}throwError(state,"unexpected end of the stream within a flow collection")}function readBlockScalar(state,nodeIndent){var captureStart,folding,chomping=CHOMPING_CLIP,didReadContent=false,detectedIndent=false,textIndent=nodeIndent,emptyLines=0,atMoreIndented=false,tmp,ch;ch=state.input.charCodeAt(state.position);if(ch===124){folding=false}else if(ch===62){folding=true}else{return false}state.kind="scalar";state.result="";while(ch!==0){ch=state.input.charCodeAt(++state.position);if(ch===43||ch===45){if(CHOMPING_CLIP===chomping){chomping=ch===43?CHOMPING_KEEP:CHOMPING_STRIP}else{throwError(state,"repeat of a chomping mode identifier")}}else if((tmp=fromDecimalCode(ch))>=0){if(tmp===0){throwError(state,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!detectedIndent){textIndent=nodeIndent+tmp-1;detectedIndent=true}else{throwError(state,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(ch)){do{ch=state.input.charCodeAt(++state.position)}while(is_WHITE_SPACE(ch));if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(!is_EOL(ch)&&ch!==0)}}while(ch!==0){readLineBreak(state);state.lineIndent=0;ch=state.input.charCodeAt(state.position);while((!detectedIndent||state.lineIndent<textIndent)&&ch===32){state.lineIndent++;ch=state.input.charCodeAt(++state.position)}if(!detectedIndent&&state.lineIndent>textIndent){textIndent=state.lineIndent}if(is_EOL(ch)){emptyLines++;continue}if(state.lineIndent<textIndent){if(chomping===CHOMPING_KEEP){state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}else if(chomping===CHOMPING_CLIP){if(didReadContent){state.result+="\n"}}break}if(folding){if(is_WHITE_SPACE(ch)){atMoreIndented=true;state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}else if(atMoreIndented){atMoreIndented=false;state.result+=common.repeat("\n",emptyLines+1)}else if(emptyLines===0){if(didReadContent){state.result+=" "}}else{state.result+=common.repeat("\n",emptyLines)}}else{state.result+=common.repeat("\n",didReadContent?1+emptyLines:emptyLines)}didReadContent=true;detectedIndent=true;emptyLines=0;captureStart=state.position;while(!is_EOL(ch)&&ch!==0){ch=state.input.charCodeAt(++state.position)}captureSegment(state,captureStart,state.position,false)}return true}function readBlockSequence(state,nodeIndent){var _line,_tag=state.tag,_anchor=state.anchor,_result=[],following,detected=false,ch;if(state.firstTabInLine!==-1)return false;if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(state.position);while(ch!==0){if(state.firstTabInLine!==-1){state.position=state.firstTabInLine;throwError(state,"tab characters must not be used in indentation")}if(ch!==45){break}following=state.input.charCodeAt(state.position+1);if(!is_WS_OR_EOL(following)){break}detected=true;state.position++;if(skipSeparationSpace(state,true,-1)){if(state.lineIndent<=nodeIndent){_result.push(null);ch=state.input.charCodeAt(state.position);continue}}_line=state.line;composeNode(state,nodeIndent,CONTEXT_BLOCK_IN,false,true);_result.push(state.result);skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if((state.line===_line||state.lineIndent>nodeIndent)&&ch!==0){throwError(state,"bad indentation of a sequence entry")}else if(state.lineIndent<nodeIndent){break}}if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="sequence";state.result=_result;return true}return false}function readBlockMapping(state,nodeIndent,flowIndent){var following,allowCompact,_line,_keyLine,_keyLineStart,_keyPos,_tag=state.tag,_anchor=state.anchor,_result={},overridableKeys=Object.create(null),keyTag=null,keyNode=null,valueNode=null,atExplicitKey=false,detected=false,ch;if(state.firstTabInLine!==-1)return false;if(state.anchor!==null){state.anchorMap[state.anchor]=_result}ch=state.input.charCodeAt(state.position);while(ch!==0){if(!atExplicitKey&&state.firstTabInLine!==-1){state.position=state.firstTabInLine;throwError(state,"tab characters must not be used in indentation")}following=state.input.charCodeAt(state.position+1);_line=state.line;if((ch===63||ch===58)&&is_WS_OR_EOL(following)){if(ch===63){if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=true;allowCompact=true}else if(atExplicitKey){atExplicitKey=false;allowCompact=true}else{throwError(state,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line")}state.position+=1;ch=following}else{_keyLine=state.line;_keyLineStart=state.lineStart;_keyPos=state.position;if(!composeNode(state,flowIndent,CONTEXT_FLOW_OUT,false,true)){break}if(state.line===_line){ch=state.input.charCodeAt(state.position);while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(ch===58){ch=state.input.charCodeAt(++state.position);if(!is_WS_OR_EOL(ch)){throwError(state,"a whitespace character is expected after the key-value separator within a block mapping")}if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos);keyTag=keyNode=valueNode=null}detected=true;atExplicitKey=false;allowCompact=false;keyTag=state.tag;keyNode=state.result}else if(detected){throwError(state,"can not read an implicit mapping pair; a colon is missed")}else{state.tag=_tag;state.anchor=_anchor;return true}}else if(detected){throwError(state,"can not read a block mapping entry; a multiline key may not be an implicit key")}else{state.tag=_tag;state.anchor=_anchor;return true}}if(state.line===_line||state.lineIndent>nodeIndent){if(atExplicitKey){_keyLine=state.line;_keyLineStart=state.lineStart;_keyPos=state.position}if(composeNode(state,nodeIndent,CONTEXT_BLOCK_OUT,true,allowCompact)){if(atExplicitKey){keyNode=state.result}else{valueNode=state.result}}if(!atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,valueNode,_keyLine,_keyLineStart,_keyPos);keyTag=keyNode=valueNode=null}skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position)}if((state.line===_line||state.lineIndent>nodeIndent)&&ch!==0){throwError(state,"bad indentation of a mapping entry")}else if(state.lineIndent<nodeIndent){break}}if(atExplicitKey){storeMappingPair(state,_result,overridableKeys,keyTag,keyNode,null,_keyLine,_keyLineStart,_keyPos)}if(detected){state.tag=_tag;state.anchor=_anchor;state.kind="mapping";state.result=_result}return detected}function readTagProperty(state){var _position,isVerbatim=false,isNamed=false,tagHandle,tagName,ch;ch=state.input.charCodeAt(state.position);if(ch!==33)return false;if(state.tag!==null){throwError(state,"duplication of a tag property")}ch=state.input.charCodeAt(++state.position);if(ch===60){isVerbatim=true;ch=state.input.charCodeAt(++state.position)}else if(ch===33){isNamed=true;tagHandle="!!";ch=state.input.charCodeAt(++state.position)}else{tagHandle="!"}_position=state.position;if(isVerbatim){do{ch=state.input.charCodeAt(++state.position)}while(ch!==0&&ch!==62);if(state.position<state.length){tagName=state.input.slice(_position,state.position);ch=state.input.charCodeAt(++state.position)}else{throwError(state,"unexpected end of the stream within a verbatim tag")}}else{while(ch!==0&&!is_WS_OR_EOL(ch)){if(ch===33){if(!isNamed){tagHandle=state.input.slice(_position-1,state.position+1);if(!PATTERN_TAG_HANDLE.test(tagHandle)){throwError(state,"named tag handle cannot contain such characters")}isNamed=true;_position=state.position+1}else{throwError(state,"tag suffix cannot contain exclamation marks")}}ch=state.input.charCodeAt(++state.position)}tagName=state.input.slice(_position,state.position);if(PATTERN_FLOW_INDICATORS.test(tagName)){throwError(state,"tag suffix cannot contain flow indicator characters")}}if(tagName&&!PATTERN_TAG_URI.test(tagName)){throwError(state,"tag name cannot contain such characters: "+tagName)}try{tagName=decodeURIComponent(tagName)}catch(err){throwError(state,"tag name is malformed: "+tagName)}if(isVerbatim){state.tag=tagName}else if(_hasOwnProperty.call(state.tagMap,tagHandle)){state.tag=state.tagMap[tagHandle]+tagName}else if(tagHandle==="!"){state.tag="!"+tagName}else if(tagHandle==="!!"){state.tag="tag:yaml.org,2002:"+tagName}else{throwError(state,'undeclared tag handle "'+tagHandle+'"')}return true}function readAnchorProperty(state){var _position,ch;ch=state.input.charCodeAt(state.position);if(ch!==38)return false;if(state.anchor!==null){throwError(state,"duplication of an anchor property")}ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch)){ch=state.input.charCodeAt(++state.position)}if(state.position===_position){throwError(state,"name of an anchor node must contain at least one character")}state.anchor=state.input.slice(_position,state.position);return true}function readAlias(state){var _position,alias,ch;ch=state.input.charCodeAt(state.position);if(ch!==42)return false;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)&&!is_FLOW_INDICATOR(ch)){ch=state.input.charCodeAt(++state.position)}if(state.position===_position){throwError(state,"name of an alias node must contain at least one character")}alias=state.input.slice(_position,state.position);if(!_hasOwnProperty.call(state.anchorMap,alias)){throwError(state,'unidentified alias "'+alias+'"')}state.result=state.anchorMap[alias];skipSeparationSpace(state,true,-1);return true}function composeNode(state,parentIndent,nodeContext,allowToSeek,allowCompact){var allowBlockStyles,allowBlockScalars,allowBlockCollections,indentStatus=1,atNewLine=false,hasContent=false,typeIndex,typeQuantity,typeList,type,flowIndent,blockIndent;if(state.listener!==null){state.listener("open",state)}state.tag=null;state.anchor=null;state.kind=null;state.result=null;allowBlockStyles=allowBlockScalars=allowBlockCollections=CONTEXT_BLOCK_OUT===nodeContext||CONTEXT_BLOCK_IN===nodeContext;if(allowToSeek){if(skipSeparationSpace(state,true,-1)){atNewLine=true;if(state.lineIndent>parentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent<parentIndent){indentStatus=-1}}}if(indentStatus===1){while(readTagProperty(state)||readAnchorProperty(state)){if(skipSeparationSpace(state,true,-1)){atNewLine=true;allowBlockCollections=allowBlockStyles;if(state.lineIndent>parentIndent){indentStatus=1}else if(state.lineIndent===parentIndent){indentStatus=0}else if(state.lineIndent<parentIndent){indentStatus=-1}}else{allowBlockCollections=false}}}if(allowBlockCollections){allowBlockCollections=atNewLine||allowCompact}if(indentStatus===1||CONTEXT_BLOCK_OUT===nodeContext){if(CONTEXT_FLOW_IN===nodeContext||CONTEXT_FLOW_OUT===nodeContext){flowIndent=parentIndent}else{flowIndent=parentIndent+1}blockIndent=state.position-state.lineStart;if(indentStatus===1){if(allowBlockCollections&&(readBlockSequence(state,blockIndent)||readBlockMapping(state,blockIndent,flowIndent))||readFlowCollection(state,flowIndent)){hasContent=true}else{if(allowBlockScalars&&readBlockScalar(state,flowIndent)||readSingleQuotedScalar(state,flowIndent)||readDoubleQuotedScalar(state,flowIndent)){hasContent=true}else if(readAlias(state)){hasContent=true;if(state.tag!==null||state.anchor!==null){throwError(state,"alias node should not have any properties")}}else if(readPlainScalar(state,flowIndent,CONTEXT_FLOW_IN===nodeContext)){hasContent=true;if(state.tag===null){state.tag="?"}}if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}}else if(indentStatus===0){hasContent=allowBlockCollections&&readBlockSequence(state,blockIndent)}}if(state.tag===null){if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}else if(state.tag==="?"){if(state.result!==null&&state.kind!=="scalar"){throwError(state,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+state.kind+'"')}for(typeIndex=0,typeQuantity=state.implicitTypes.length;typeIndex<typeQuantity;typeIndex+=1){type=state.implicitTypes[typeIndex];if(type.resolve(state.result)){state.result=type.construct(state.result);state.tag=type.tag;if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}break}}}else if(state.tag!=="!"){if(_hasOwnProperty.call(state.typeMap[state.kind||"fallback"],state.tag)){type=state.typeMap[state.kind||"fallback"][state.tag]}else{type=null;typeList=state.typeMap.multi[state.kind||"fallback"];for(typeIndex=0,typeQuantity=typeList.length;typeIndex<typeQuantity;typeIndex+=1){if(state.tag.slice(0,typeList[typeIndex].tag.length)===typeList[typeIndex].tag){type=typeList[typeIndex];break}}}if(!type){throwError(state,"unknown tag !<"+state.tag+">")}if(state.result!==null&&type.kind!==state.kind){throwError(state,"unacceptable node kind for !<"+state.tag+'> tag; it should be "'+type.kind+'", not "'+state.kind+'"')}if(!type.resolve(state.result,state.tag)){throwError(state,"cannot resolve a node with !<"+state.tag+"> explicit tag")}else{state.result=type.construct(state.result,state.tag);if(state.anchor!==null){state.anchorMap[state.anchor]=state.result}}}if(state.listener!==null){state.listener("close",state)}return state.tag!==null||state.anchor!==null||hasContent}function readDocument(state){var documentStart=state.position,_position,directiveName,directiveArgs,hasDirectives=false,ch;state.version=null;state.checkLineBreaks=state.legacy;state.tagMap=Object.create(null);state.anchorMap=Object.create(null);while((ch=state.input.charCodeAt(state.position))!==0){skipSeparationSpace(state,true,-1);ch=state.input.charCodeAt(state.position);if(state.lineIndent>0||ch!==37){break}hasDirectives=true;ch=state.input.charCodeAt(++state.position);_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveName=state.input.slice(_position,state.position);directiveArgs=[];if(directiveName.length<1){throwError(state,"directive name must not be less than one character in length")}while(ch!==0){while(is_WHITE_SPACE(ch)){ch=state.input.charCodeAt(++state.position)}if(ch===35){do{ch=state.input.charCodeAt(++state.position)}while(ch!==0&&!is_EOL(ch));break}if(is_EOL(ch))break;_position=state.position;while(ch!==0&&!is_WS_OR_EOL(ch)){ch=state.input.charCodeAt(++state.position)}directiveArgs.push(state.input.slice(_position,state.position))}if(ch!==0)readLineBreak(state);if(_hasOwnProperty.call(directiveHandlers,directiveName)){directiveHandlers[directiveName](state,directiveName,directiveArgs)}else{throwWarning(state,'unknown document directive "'+directiveName+'"')}}skipSeparationSpace(state,true,-1);if(state.lineIndent===0&&state.input.charCodeAt(state.position)===45&&state.input.charCodeAt(state.position+1)===45&&state.input.charCodeAt(state.position+2)===45){state.position+=3;skipSeparationSpace(state,true,-1)}else if(hasDirectives){throwError(state,"directives end mark is expected")}composeNode(state,state.lineIndent-1,CONTEXT_BLOCK_OUT,false,true);skipSeparationSpace(state,true,-1);if(state.checkLineBreaks&&PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart,state.position))){throwWarning(state,"non-ASCII line breaks are interpreted as content")}state.documents.push(state.result);if(state.position===state.lineStart&&testDocumentSeparator(state)){if(state.input.charCodeAt(state.position)===46){state.position+=3;skipSeparationSpace(state,true,-1)}return}if(state.position<state.length-1){throwError(state,"end of the stream or a document separator is expected")}else{return}}function loadDocuments(input,options){input=String(input);options=options||{};if(input.length!==0){if(input.charCodeAt(input.length-1)!==10&&input.charCodeAt(input.length-1)!==13){input+="\n"}if(input.charCodeAt(0)===65279){input=input.slice(1)}}var state=new State(input,options);var nullpos=input.indexOf("\0");if(nullpos!==-1){state.position=nullpos;throwError(state,"null byte is not allowed in input")}state.input+="\0";while(state.input.charCodeAt(state.position)===32){state.lineIndent+=1;state.position+=1}while(state.position<state.length-1){readDocument(state)}return state.documents}function loadAll(input,iterator,options){if(iterator!==null&&typeof iterator==="object"&&typeof options==="undefined"){options=iterator;iterator=null}var documents=loadDocuments(input,options);if(typeof iterator!=="function"){return documents}for(var index=0,length=documents.length;index<length;index+=1){iterator(documents[index])}}function load(input,options){var documents=loadDocuments(input,options);if(documents.length===0){return undefined}else if(documents.length===1){return documents[0]}throw new YAMLException("expected a single document in the stream, but found more")}loader.loadAll=loadAll;loader.load=load;return loader}var dumper={};var hasRequiredDumper;function requireDumper(){if(hasRequiredDumper)return dumper;hasRequiredDumper=1;var common=requireCommon$1();var YAMLException=requireException();var DEFAULT_SCHEMA=require_default();var _toString=Object.prototype.toString;var _hasOwnProperty=Object.prototype.hasOwnProperty;var CHAR_BOM=65279;var CHAR_TAB=9;var CHAR_LINE_FEED=10;var CHAR_CARRIAGE_RETURN=13;var CHAR_SPACE=32;var CHAR_EXCLAMATION=33;var CHAR_DOUBLE_QUOTE=34;var CHAR_SHARP=35;var CHAR_PERCENT=37;var CHAR_AMPERSAND=38;var CHAR_SINGLE_QUOTE=39;var CHAR_ASTERISK=42;var CHAR_COMMA=44;var CHAR_MINUS=45;var CHAR_COLON=58;var CHAR_EQUALS=61;var CHAR_GREATER_THAN=62;var CHAR_QUESTION=63;var CHAR_COMMERCIAL_AT=64;var CHAR_LEFT_SQUARE_BRACKET=91;var CHAR_RIGHT_SQUARE_BRACKET=93;var CHAR_GRAVE_ACCENT=96;var CHAR_LEFT_CURLY_BRACKET=123;var CHAR_VERTICAL_LINE=124;var CHAR_RIGHT_CURLY_BRACKET=125;var ESCAPE_SEQUENCES={};ESCAPE_SEQUENCES[0]="\\0";ESCAPE_SEQUENCES[7]="\\a";ESCAPE_SEQUENCES[8]="\\b";ESCAPE_SEQUENCES[9]="\\t";ESCAPE_SEQUENCES[10]="\\n";ESCAPE_SEQUENCES[11]="\\v";ESCAPE_SEQUENCES[12]="\\f";ESCAPE_SEQUENCES[13]="\\r";ESCAPE_SEQUENCES[27]="\\e";ESCAPE_SEQUENCES[34]='\\"';ESCAPE_SEQUENCES[92]="\\\\";ESCAPE_SEQUENCES[133]="\\N";ESCAPE_SEQUENCES[160]="\\_";ESCAPE_SEQUENCES[8232]="\\L";ESCAPE_SEQUENCES[8233]="\\P";var DEPRECATED_BOOLEANS_SYNTAX=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];var DEPRECATED_BASE60_SYNTAX=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function compileStyleMap(schema,map){var result,keys,index,length,tag,style,type;if(map===null)return{};result={};keys=Object.keys(map);for(index=0,length=keys.length;index<length;index+=1){tag=keys[index];style=String(map[tag]);if(tag.slice(0,2)==="!!"){tag="tag:yaml.org,2002:"+tag.slice(2)}type=schema.compiledTypeMap["fallback"][tag];if(type&&_hasOwnProperty.call(type.styleAliases,style)){style=type.styleAliases[style]}result[tag]=style}return result}function encodeHex(character){var string,handle,length;string=character.toString(16).toUpperCase();if(character<=255){handle="x";length=2}else if(character<=65535){handle="u";length=4}else if(character<=4294967295){handle="U";length=8}else{throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF")}return"\\"+handle+common.repeat("0",length-string.length)+string}var QUOTING_TYPE_SINGLE=1,QUOTING_TYPE_DOUBLE=2;function State(options){this.schema=options["schema"]||DEFAULT_SCHEMA;this.indent=Math.max(1,options["indent"]||2);this.noArrayIndent=options["noArrayIndent"]||false;this.skipInvalid=options["skipInvalid"]||false;this.flowLevel=common.isNothing(options["flowLevel"])?-1:options["flowLevel"];this.styleMap=compileStyleMap(this.schema,options["styles"]||null);this.sortKeys=options["sortKeys"]||false;this.lineWidth=options["lineWidth"]||80;this.noRefs=options["noRefs"]||false;this.noCompatMode=options["noCompatMode"]||false;this.condenseFlow=options["condenseFlow"]||false;this.quotingType=options["quotingType"]==='"'?QUOTING_TYPE_DOUBLE:QUOTING_TYPE_SINGLE;this.forceQuotes=options["forceQuotes"]||false;this.replacer=typeof options["replacer"]==="function"?options["replacer"]:null;this.implicitTypes=this.schema.compiledImplicit;this.explicitTypes=this.schema.compiledExplicit;this.tag=null;this.result="";this.duplicates=[];this.usedDuplicates=null}function indentString(string,spaces){var ind=common.repeat(" ",spaces),position=0,next=-1,result="",line,length=string.length;while(position<length){next=string.indexOf("\n",position);if(next===-1){line=string.slice(position);position=length}else{line=string.slice(position,next+1);position=next+1}if(line.length&&line!=="\n")result+=ind;result+=line}return result}function generateNextLine(state,level){return"\n"+common.repeat(" ",state.indent*level)}function testImplicitResolving(state,str){var index,length,type;for(index=0,length=state.implicitTypes.length;index<length;index+=1){type=state.implicitTypes[index];if(type.resolve(str)){return true}}return false}function isWhitespace(c){return c===CHAR_SPACE||c===CHAR_TAB}function isPrintable(c){return 32<=c&&c<=126||161<=c&&c<=55295&&c!==8232&&c!==8233||57344<=c&&c<=65533&&c!==CHAR_BOM||65536<=c&&c<=1114111}function isNsCharOrWhitespace(c){return isPrintable(c)&&c!==CHAR_BOM&&c!==CHAR_CARRIAGE_RETURN&&c!==CHAR_LINE_FEED}function isPlainSafe(c,prev,inblock){var cIsNsCharOrWhitespace=isNsCharOrWhitespace(c);var cIsNsChar=cIsNsCharOrWhitespace&&!isWhitespace(c);return(inblock?cIsNsCharOrWhitespace:cIsNsCharOrWhitespace&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET)&&c!==CHAR_SHARP&&!(prev===CHAR_COLON&&!cIsNsChar)||isNsCharOrWhitespace(prev)&&!isWhitespace(prev)&&c===CHAR_SHARP||prev===CHAR_COLON&&cIsNsChar}function isPlainSafeFirst(c){return isPrintable(c)&&c!==CHAR_BOM&&!isWhitespace(c)&&c!==CHAR_MINUS&&c!==CHAR_QUESTION&&c!==CHAR_COLON&&c!==CHAR_COMMA&&c!==CHAR_LEFT_SQUARE_BRACKET&&c!==CHAR_RIGHT_SQUARE_BRACKET&&c!==CHAR_LEFT_CURLY_BRACKET&&c!==CHAR_RIGHT_CURLY_BRACKET&&c!==CHAR_SHARP&&c!==CHAR_AMPERSAND&&c!==CHAR_ASTERISK&&c!==CHAR_EXCLAMATION&&c!==CHAR_VERTICAL_LINE&&c!==CHAR_EQUALS&&c!==CHAR_GREATER_THAN&&c!==CHAR_SINGLE_QUOTE&&c!==CHAR_DOUBLE_QUOTE&&c!==CHAR_PERCENT&&c!==CHAR_COMMERCIAL_AT&&c!==CHAR_GRAVE_ACCENT}function isPlainSafeLast(c){return!isWhitespace(c)&&c!==CHAR_COLON}function codePointAt(string,pos){var first=string.charCodeAt(pos),second;if(first>=55296&&first<=56319&&pos+1<string.length){second=string.charCodeAt(pos+1);if(second>=56320&&second<=57343){return(first-55296)*1024+second-56320+65536}}return first}function needIndentIndicator(string){var leadingSpaceRe=/^\n* /;return leadingSpaceRe.test(string)}var STYLE_PLAIN=1,STYLE_SINGLE=2,STYLE_LITERAL=3,STYLE_FOLDED=4,STYLE_DOUBLE=5;function chooseScalarStyle(string,singleLineOnly,indentPerLevel,lineWidth,testAmbiguousType,quotingType,forceQuotes,inblock){var i;var char=0;var prevChar=null;var hasLineBreak=false;var hasFoldableLine=false;var shouldTrackWidth=lineWidth!==-1;var previousLineBreak=-1;var plain=isPlainSafeFirst(codePointAt(string,0))&&isPlainSafeLast(codePointAt(string,string.length-1));if(singleLineOnly||forceQuotes){for(i=0;i<string.length;char>=65536?i+=2:i++){char=codePointAt(string,i);if(!isPrintable(char)){return STYLE_DOUBLE}plain=plain&&isPlainSafe(char,prevChar,inblock);prevChar=char}}else{for(i=0;i<string.length;char>=65536?i+=2:i++){char=codePointAt(string,i);if(char===CHAR_LINE_FEED){hasLineBreak=true;if(shouldTrackWidth){hasFoldableLine=hasFoldableLine||i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ";previousLineBreak=i}}else if(!isPrintable(char)){return STYLE_DOUBLE}plain=plain&&isPlainSafe(char,prevChar,inblock);prevChar=char}hasFoldableLine=hasFoldableLine||shouldTrackWidth&&(i-previousLineBreak-1>lineWidth&&string[previousLineBreak+1]!==" ")}if(!hasLineBreak&&!hasFoldableLine){if(plain&&!forceQuotes&&!testAmbiguousType(string)){return STYLE_PLAIN}return quotingType===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE}if(indentPerLevel>9&&needIndentIndicator(string)){return STYLE_DOUBLE}if(!forceQuotes){return hasFoldableLine?STYLE_FOLDED:STYLE_LITERAL}return quotingType===QUOTING_TYPE_DOUBLE?STYLE_DOUBLE:STYLE_SINGLE}function writeScalar(state,string,level,iskey,inblock){state.dump=function(){if(string.length===0){return state.quotingType===QUOTING_TYPE_DOUBLE?'""':"''"}if(!state.noCompatMode){if(DEPRECATED_BOOLEANS_SYNTAX.indexOf(string)!==-1||DEPRECATED_BASE60_SYNTAX.test(string)){return state.quotingType===QUOTING_TYPE_DOUBLE?'"'+string+'"':"'"+string+"'"}}var indent=state.indent*Math.max(1,level);var lineWidth=state.lineWidth===-1?-1:Math.max(Math.min(state.lineWidth,40),state.lineWidth-indent);var singleLineOnly=iskey||state.flowLevel>-1&&level>=state.flowLevel;function testAmbiguity(string){return testImplicitResolving(state,string)}switch(chooseScalarStyle(string,singleLineOnly,state.indent,lineWidth,testAmbiguity,state.quotingType,state.forceQuotes&&!iskey,inblock)){case STYLE_PLAIN:return string;case STYLE_SINGLE:return"'"+string.replace(/'/g,"''")+"'";case STYLE_LITERAL:return"|"+blockHeader(string,state.indent)+dropEndingNewline(indentString(string,indent));case STYLE_FOLDED:return">"+blockHeader(string,state.indent)+dropEndingNewline(indentString(foldString(string,lineWidth),indent));case STYLE_DOUBLE:return'"'+escapeString(string)+'"';default:throw new YAMLException("impossible error: invalid scalar style")}}()}function blockHeader(string,indentPerLevel){var indentIndicator=needIndentIndicator(string)?String(indentPerLevel):"";var clip=string[string.length-1]==="\n";var keep=clip&&(string[string.length-2]==="\n"||string==="\n");var chomp=keep?"+":clip?"":"-";return indentIndicator+chomp+"\n"}function dropEndingNewline(string){return string[string.length-1]==="\n"?string.slice(0,-1):string}function foldString(string,width){var lineRe=/(\n+)([^\n]*)/g;var result=function(){var nextLF=string.indexOf("\n");nextLF=nextLF!==-1?nextLF:string.length;lineRe.lastIndex=nextLF;return foldLine(string.slice(0,nextLF),width)}();var prevMoreIndented=string[0]==="\n"||string[0]===" ";var moreIndented;var match;while(match=lineRe.exec(string)){var prefix=match[1],line=match[2];moreIndented=line[0]===" ";result+=prefix+(!prevMoreIndented&&!moreIndented&&line!==""?"\n":"")+foldLine(line,width);prevMoreIndented=moreIndented}return result}function foldLine(line,width){if(line===""||line[0]===" ")return line;var breakRe=/ [^ ]/g;var match;var start=0,end,curr=0,next=0;var result="";while(match=breakRe.exec(line)){next=match.index;if(next-start>width){end=curr>start?curr:next;result+="\n"+line.slice(start,end);start=end+1}curr=next}result+="\n";if(line.length-start>width&&curr>start){result+=line.slice(start,curr)+"\n"+line.slice(curr+1)}else{result+=line.slice(start)}return result.slice(1)}function escapeString(string){var result="";var char=0;var escapeSeq;for(var i=0;i<string.length;char>=65536?i+=2:i++){char=codePointAt(string,i);escapeSeq=ESCAPE_SEQUENCES[char];if(!escapeSeq&&isPrintable(char)){result+=string[i];if(char>=65536)result+=string[i+1]}else{result+=escapeSeq||encodeHex(char)}}return result}function writeFlowSequence(state,level,object){var _result="",_tag=state.tag,index,length,value;for(index=0,length=object.length;index<length;index+=1){value=object[index];if(state.replacer){value=state.replacer.call(object,String(index),value)}if(writeNode(state,level,value,false,false)||typeof value==="undefined"&&writeNode(state,level,null,false,false)){if(_result!=="")_result+=","+(!state.condenseFlow?" ":"");_result+=state.dump}}state.tag=_tag;state.dump="["+_result+"]"}function writeBlockSequence(state,level,object,compact){var _result="",_tag=state.tag,index,length,value;for(index=0,length=object.length;index<length;index+=1){value=object[index];if(state.replacer){value=state.replacer.call(object,String(index),value)}if(writeNode(state,level+1,value,true,true,false,true)||typeof value==="undefined"&&writeNode(state,level+1,null,true,true,false,true)){if(!compact||_result!==""){_result+=generateNextLine(state,level)}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){_result+="-"}else{_result+="- "}_result+=state.dump}}state.tag=_tag;state.dump=_result||"[]"}function writeFlowMapping(state,level,object){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,pairBuffer;for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer="";if(_result!=="")pairBuffer+=", ";if(state.condenseFlow)pairBuffer+='"';objectKey=objectKeyList[index];objectValue=object[objectKey];if(state.replacer){objectValue=state.replacer.call(object,objectKey,objectValue)}if(!writeNode(state,level,objectKey,false,false)){continue}if(state.dump.length>1024)pairBuffer+="? ";pairBuffer+=state.dump+(state.condenseFlow?'"':"")+":"+(state.condenseFlow?"":" ");if(!writeNode(state,level,objectValue,false,false)){continue}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump="{"+_result+"}"}function writeBlockMapping(state,level,object,compact){var _result="",_tag=state.tag,objectKeyList=Object.keys(object),index,length,objectKey,objectValue,explicitPair,pairBuffer;if(state.sortKeys===true){objectKeyList.sort()}else if(typeof state.sortKeys==="function"){objectKeyList.sort(state.sortKeys)}else if(state.sortKeys){throw new YAMLException("sortKeys must be a boolean or a function")}for(index=0,length=objectKeyList.length;index<length;index+=1){pairBuffer="";if(!compact||_result!==""){pairBuffer+=generateNextLine(state,level)}objectKey=objectKeyList[index];objectValue=object[objectKey];if(state.replacer){objectValue=state.replacer.call(object,objectKey,objectValue)}if(!writeNode(state,level+1,objectKey,true,true,true)){continue}explicitPair=state.tag!==null&&state.tag!=="?"||state.dump&&state.dump.length>1024;if(explicitPair){if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+="?"}else{pairBuffer+="? "}}pairBuffer+=state.dump;if(explicitPair){pairBuffer+=generateNextLine(state,level)}if(!writeNode(state,level+1,objectValue,true,explicitPair)){continue}if(state.dump&&CHAR_LINE_FEED===state.dump.charCodeAt(0)){pairBuffer+=":"}else{pairBuffer+=": "}pairBuffer+=state.dump;_result+=pairBuffer}state.tag=_tag;state.dump=_result||"{}"}function detectType(state,object,explicit){var _result,typeList,index,length,type,style;typeList=explicit?state.explicitTypes:state.implicitTypes;for(index=0,length=typeList.length;index<length;index+=1){type=typeList[index];if((type.instanceOf||type.predicate)&&(!type.instanceOf||typeof object==="object"&&object instanceof type.instanceOf)&&(!type.predicate||type.predicate(object))){if(explicit){if(type.multi&&type.representName){state.tag=type.representName(object)}else{state.tag=type.tag}}else{state.tag="?"}if(type.represent){style=state.styleMap[type.tag]||type.defaultStyle;if(_toString.call(type.represent)==="[object Function]"){_result=type.represent(object,style)}else if(_hasOwnProperty.call(type.represent,style)){_result=type.represent[style](object,style)}else{throw new YAMLException("!<"+type.tag+'> tag resolver accepts not "'+style+'" style')}state.dump=_result}return true}}return false}function writeNode(state,level,object,block,compact,iskey,isblockseq){state.tag=null;state.dump=object;if(!detectType(state,object,false)){detectType(state,object,true)}var type=_toString.call(state.dump);var inblock=block;var tagStr;if(block){block=state.flowLevel<0||state.flowLevel>level}var objectOrArray=type==="[object Object]"||type==="[object Array]",duplicateIndex,duplicate;if(objectOrArray){duplicateIndex=state.duplicates.indexOf(object);duplicate=duplicateIndex!==-1}if(state.tag!==null&&state.tag!=="?"||duplicate||state.indent!==2&&level>0){compact=false}if(duplicate&&state.usedDuplicates[duplicateIndex]){state.dump="*ref_"+duplicateIndex}else{if(objectOrArray&&duplicate&&!state.usedDuplicates[duplicateIndex]){state.usedDuplicates[duplicateIndex]=true}if(type==="[object Object]"){if(block&&Object.keys(state.dump).length!==0){writeBlockMapping(state,level,state.dump,compact);if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowMapping(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object Array]"){if(block&&state.dump.length!==0){if(state.noArrayIndent&&!isblockseq&&level>0){writeBlockSequence(state,level-1,state.dump,compact)}else{writeBlockSequence(state,level,state.dump,compact)}if(duplicate){state.dump="&ref_"+duplicateIndex+state.dump}}else{writeFlowSequence(state,level,state.dump);if(duplicate){state.dump="&ref_"+duplicateIndex+" "+state.dump}}}else if(type==="[object String]"){if(state.tag!=="?"){writeScalar(state,state.dump,level,iskey,inblock)}}else if(type==="[object Undefined]"){return false}else{if(state.skipInvalid)return false;throw new YAMLException("unacceptable kind of an object to dump "+type)}if(state.tag!==null&&state.tag!=="?"){tagStr=encodeURI(state.tag[0]==="!"?state.tag.slice(1):state.tag).replace(/!/g,"%21");if(state.tag[0]==="!"){tagStr="!"+tagStr}else if(tagStr.slice(0,18)==="tag:yaml.org,2002:"){tagStr="!!"+tagStr.slice(18)}else{tagStr="!<"+tagStr+">"}state.dump=tagStr+" "+state.dump}}return true}function getDuplicateReferences(object,state){var objects=[],duplicatesIndexes=[],index,length;inspectNode(object,objects,duplicatesIndexes);for(index=0,length=duplicatesIndexes.length;index<length;index+=1){state.duplicates.push(objects[duplicatesIndexes[index]])}state.usedDuplicates=new Array(length)}function inspectNode(object,objects,duplicatesIndexes){var objectKeyList,index,length;if(object!==null&&typeof object==="object"){index=objects.indexOf(object);if(index!==-1){if(duplicatesIndexes.indexOf(index)===-1){duplicatesIndexes.push(index)}}else{objects.push(object);if(Array.isArray(object)){for(index=0,length=object.length;index<length;index+=1){inspectNode(object[index],objects,duplicatesIndexes)}}else{objectKeyList=Object.keys(object);for(index=0,length=objectKeyList.length;index<length;index+=1){inspectNode(object[objectKeyList[index]],objects,duplicatesIndexes)}}}}}function dump(input,options){options=options||{};var state=new State(options);if(!state.noRefs)getDuplicateReferences(input,state);var value=input;if(state.replacer){value=state.replacer.call({"":value},"",value)}if(writeNode(state,0,value,true,true))return state.dump+"\n";return""}dumper.dump=dump;return dumper}var hasRequiredJsYaml;function requireJsYaml(){if(hasRequiredJsYaml)return jsYaml;hasRequiredJsYaml=1;var loader=requireLoader();var dumper=requireDumper();function renamed(from,to){return function(){throw new Error("Function yaml."+from+" is removed in js-yaml 4. "+"Use yaml."+to+" instead, which is now safe by default.")}}jsYaml.Type=requireType();jsYaml.Schema=requireSchema();jsYaml.FAILSAFE_SCHEMA=requireFailsafe();jsYaml.JSON_SCHEMA=requireJson();jsYaml.CORE_SCHEMA=requireCore();jsYaml.DEFAULT_SCHEMA=require_default();jsYaml.load=loader.load;jsYaml.loadAll=loader.loadAll;jsYaml.dump=dumper.dump;jsYaml.YAMLException=requireException();jsYaml.types={binary:requireBinary(),float:requireFloat(),map:requireMap(),null:require_null(),pairs:requirePairs(),set:requireSet(),timestamp:requireTimestamp(),bool:requireBool(),int:requireInt(),merge:requireMerge(),omap:requireOmap(),seq:requireSeq(),str:requireStr()};jsYaml.safeLoad=renamed("safeLoad","load");jsYaml.safeLoadAll=renamed("safeLoadAll","loadAll");jsYaml.safeDump=renamed("safeDump","dump");return jsYaml}var hasRequiredReadYamlFile;function requireReadYamlFile(){if(hasRequiredReadYamlFile)return readYamlFile.exports;hasRequiredReadYamlFile=1;const fs=require$$0$2;const stripBom=requireStripBom();const yaml=requireJsYaml();const parse=data=>yaml.load(stripBom(data));const readYamlFile$1=fp=>fs.promises.readFile(fp,"utf8").then((data=>parse(data)));readYamlFile.exports=readYamlFile$1;readYamlFile.exports.default=readYamlFile$1;readYamlFile.exports.sync=fp=>parse(fs.readFileSync(fp,"utf8"));return readYamlFile.exports}var detectIndent_1;var hasRequiredDetectIndent;function requireDetectIndent(){if(hasRequiredDetectIndent)return detectIndent_1;hasRequiredDetectIndent=1;const INDENT_REGEX=/^(?:( )+|\t+)/;const INDENT_TYPE_SPACE="space";const INDENT_TYPE_TAB="tab";function makeIndentsMap(string,ignoreSingleSpaces){const indents=new Map;let previousSize=0;let previousIndentType;let key;for(const line of string.split(/\n/g)){if(!line){continue}let indent;let indentType;let use;let weight;let entry;const matches=line.match(INDENT_REGEX);if(matches===null){previousSize=0;previousIndentType=""}else{indent=matches[0].length;indentType=matches[1]?INDENT_TYPE_SPACE:INDENT_TYPE_TAB;if(ignoreSingleSpaces&&indentType===INDENT_TYPE_SPACE&&indent===1){continue}if(indentType!==previousIndentType){previousSize=0}previousIndentType=indentType;use=1;weight=0;const indentDifference=indent-previousSize;previousSize=indent;if(indentDifference===0){use=0;weight=1}else{const absoluteIndentDifference=indentDifference>0?indentDifference:-indentDifference;key=encodeIndentsKey(indentType,absoluteIndentDifference)}entry=indents.get(key);entry=entry===undefined?[1,0]:[entry[0]+use,entry[1]+weight];indents.set(key,entry)}}return indents}function encodeIndentsKey(indentType,indentAmount){const typeCharacter=indentType===INDENT_TYPE_SPACE?"s":"t";return typeCharacter+String(indentAmount)}function decodeIndentsKey(indentsKey){const keyHasTypeSpace=indentsKey[0]==="s";const type=keyHasTypeSpace?INDENT_TYPE_SPACE:INDENT_TYPE_TAB;const amount=Number(indentsKey.slice(1));return{type:type,amount:amount}}function getMostUsedKey(indents){let result;let maxUsed=0;let maxWeight=0;for(const[key,[usedCount,weight]]of indents){if(usedCount>maxUsed||usedCount===maxUsed&&weight>maxWeight){maxUsed=usedCount;maxWeight=weight;result=key}}return result}function makeIndentString(type,amount){const indentCharacter=type===INDENT_TYPE_SPACE?" ":"\t";return indentCharacter.repeat(amount)}function detectIndent(string){if(typeof string!=="string"){throw new TypeError("Expected a string")}let indents=makeIndentsMap(string,true);if(indents.size===0){indents=makeIndentsMap(string,false)}const keyOfMostUsedIndent=getMostUsedKey(indents);let type;let amount=0;let indent="";if(keyOfMostUsedIndent!==undefined){({type:type,amount:amount}=decodeIndentsKey(keyOfMostUsedIndent));indent=makeIndentString(type,amount)}return{amount:amount,type:type,indent:indent}}detectIndent_1=detectIndent;return detectIndent_1}var fastDeepEqual;var hasRequiredFastDeepEqual;function requireFastDeepEqual(){if(hasRequiredFastDeepEqual)return fastDeepEqual;hasRequiredFastDeepEqual=1;fastDeepEqual=function equal(a,b){if(a===b)return true;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return false;var length,i,keys;if(Array.isArray(a)){length=a.length;if(length!=b.length)return false;for(i=length;i--!==0;)if(!equal(a[i],b[i]))return false;return true}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();keys=Object.keys(a);length=keys.length;if(length!==Object.keys(b).length)return false;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys[i]))return false;for(i=length;i--!==0;){var key=keys[i];if(!equal(a[key],b[key]))return false}return true}return a!==a&&b!==b};return fastDeepEqual}var isWindows={exports:{}}; |
| /*! |
| * is-windows <https://github.com/jonschlinkert/is-windows> |
| * |
| * Copyright © 2015-2018, Jon Schlinkert. |
| * Released under the MIT License. |
| */var hasRequiredIsWindows;function requireIsWindows(){if(hasRequiredIsWindows)return isWindows.exports;hasRequiredIsWindows=1;(function(module,exports){(function(factory){if(exports&&"object"==="object"&&"object"!=="undefined"){module.exports=factory()}else if(typeof window!=="undefined"){window.isWindows=factory()}else if(typeof commonjsGlobal!=="undefined"){commonjsGlobal.isWindows=factory()}else if(typeof self!=="undefined"){self.isWindows=factory()}else{this.isWindows=factory()}})((function(){return function isWindows(){return process&&(process.platform==="win32"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}}))})(isWindows,isWindows.exports);return isWindows.exports}var isPlainObj;var hasRequiredIsPlainObj;function requireIsPlainObj(){if(hasRequiredIsPlainObj)return isPlainObj;hasRequiredIsPlainObj=1;isPlainObj=value=>{if(Object.prototype.toString.call(value)!=="[object Object]"){return false}const prototype=Object.getPrototypeOf(value);return prototype===null||prototype===Object.prototype};return isPlainObj}var sortKeys;var hasRequiredSortKeys;function requireSortKeys(){if(hasRequiredSortKeys)return sortKeys;hasRequiredSortKeys=1;const isPlainObject=requireIsPlainObj();sortKeys=(object,options={})=>{if(!isPlainObject(object)&&!Array.isArray(object)){throw new TypeError("Expected a plain object or array")}const{deep:deep}=options;const seenInput=[];const seenOutput=[];const deepSortArray=array=>{const seenIndex=seenInput.indexOf(array);if(seenIndex!==-1){return seenOutput[seenIndex]}const result=[];seenInput.push(array);seenOutput.push(result);result.push(...array.map((item=>{if(Array.isArray(item)){return deepSortArray(item)}if(isPlainObject(item)){return sortKeys(item)}return item})));return result};const sortKeys=object=>{const seenIndex=seenInput.indexOf(object);if(seenIndex!==-1){return seenOutput[seenIndex]}const result={};const keys=Object.keys(object).sort(options.compare);seenInput.push(object);seenOutput.push(result);for(const key of keys){const value=object[key];let newValue;if(deep&&Array.isArray(value)){newValue=deepSortArray(value)}else{newValue=deep&&isPlainObject(value)?sortKeys(value):value}Object.defineProperty(result,key,{...Object.getOwnPropertyDescriptor(object,key),value:newValue})}return result};if(Array.isArray(object)){return deep?deepSortArray(object):object.slice()}return sortKeys(object)};return sortKeys}var readFile={};var lib$5={};var hasRequiredLib$8;function requireLib$8(){if(hasRequiredLib$8)return lib$5;hasRequiredLib$8=1;var __importDefault=lib$5&&lib$5.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(lib$5,"__esModule",{value:true});const util_1=require$$0$1;const graceful_fs_1=__importDefault(requireGracefulFs());lib$5.default={copyFile:(0,util_1.promisify)(graceful_fs_1.default.copyFile),createReadStream:graceful_fs_1.default.createReadStream,link:(0,util_1.promisify)(graceful_fs_1.default.link),readFile:(0,util_1.promisify)(graceful_fs_1.default.readFile),stat:(0,util_1.promisify)(graceful_fs_1.default.stat),writeFile:(0,util_1.promisify)(graceful_fs_1.default.writeFile)};return lib$5}var hasRequiredReadFile;function requireReadFile(){if(hasRequiredReadFile)return readFile;hasRequiredReadFile=1;var __importDefault=readFile&&readFile.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(readFile,"__esModule",{value:true});readFile.readJsonFile=readFile.readJson5File=void 0;const graceful_fs_1=__importDefault(requireLib$8());const json5_1=__importDefault(require$$1);const parse_json_1=__importDefault(requireParseJson());const strip_bom_1=__importDefault(requireStripBom());async function readJson5File(filePath){const text=await readFileWithoutBom(filePath);try{return{data:json5_1.default.parse(text),text:text}}catch(err){err.message=`${err.message} in ${filePath}`;err["code"]="ERR_PNPM_JSON5_PARSE";throw err}}readFile.readJson5File=readJson5File;async function readJsonFile(filePath){const text=await readFileWithoutBom(filePath);try{return{data:(0,parse_json_1.default)(text,filePath),text:text}}catch(err){err["code"]="ERR_PNPM_JSON_PARSE";throw err}}readFile.readJsonFile=readJsonFile;async function readFileWithoutBom(path){return(0,strip_bom_1.default)(await graceful_fs_1.default.readFile(path,"utf8"))}return readFile}var hasRequiredLib$7;function requireLib$7(){if(hasRequiredLib$7)return lib$a;hasRequiredLib$7=1;var __importDefault=lib$a&&lib$a.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(lib$a,"__esModule",{value:true});lib$a.readExactProjectManifest=lib$a.tryReadProjectManifest=lib$a.readProjectManifestOnly=lib$a.readProjectManifest=lib$a.safeReadProjectManifestOnly=void 0;const fs_1=require$$0$2;const path_1=__importDefault(require$$0$6);const error_1=requireLib$m();const text_comments_parser_1=requireLib$b();const write_project_manifest_1=requireLib$9();const read_yaml_file_1=__importDefault(requireReadYamlFile());const detect_indent_1=__importDefault(requireDetectIndent());const fast_deep_equal_1=__importDefault(requireFastDeepEqual());const is_windows_1=__importDefault(requireIsWindows());const sort_keys_1=__importDefault(requireSortKeys());const readFile_1=requireReadFile();async function safeReadProjectManifestOnly(projectDir){try{return await readProjectManifestOnly(projectDir)}catch(err){if(err.code==="ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND"){return null}throw err}}lib$a.safeReadProjectManifestOnly=safeReadProjectManifestOnly;async function readProjectManifest(projectDir){const result=await tryReadProjectManifest(projectDir);if(result.manifest!==null){return result}throw new error_1.PnpmError("NO_IMPORTER_MANIFEST_FOUND",`No package.json (or package.yaml, or package.json5) was found in "${projectDir}".`)}lib$a.readProjectManifest=readProjectManifest;async function readProjectManifestOnly(projectDir){const{manifest:manifest}=await readProjectManifest(projectDir);return manifest}lib$a.readProjectManifestOnly=readProjectManifestOnly;async function tryReadProjectManifest(projectDir){try{const manifestPath=path_1.default.join(projectDir,"package.json");const{data:data,text:text}=await(0,readFile_1.readJsonFile)(manifestPath);return{fileName:"package.json",manifest:data,writeProjectManifest:createManifestWriter({...detectFileFormatting(text),initialManifest:data,manifestPath:manifestPath})}}catch(err){if(err.code!=="ENOENT")throw err}try{const manifestPath=path_1.default.join(projectDir,"package.json5");const{data:data,text:text}=await(0,readFile_1.readJson5File)(manifestPath);return{fileName:"package.json5",manifest:data,writeProjectManifest:createManifestWriter({...detectFileFormattingAndComments(text),initialManifest:data,manifestPath:manifestPath})}}catch(err){if(err.code!=="ENOENT")throw err}try{const manifestPath=path_1.default.join(projectDir,"package.yaml");const manifest=await readPackageYaml(manifestPath);return{fileName:"package.yaml",manifest:manifest,writeProjectManifest:createManifestWriter({initialManifest:manifest,manifestPath:manifestPath})}}catch(err){if(err.code!=="ENOENT")throw err}if((0,is_windows_1.default)()){let s;try{s=await fs_1.promises.stat(projectDir)}catch(err){}if(s!=null&&!s.isDirectory()){const err=new Error(`"${projectDir}" is not a directory`);err["code"]="ENOTDIR";throw err}}const filePath=path_1.default.join(projectDir,"package.json");return{fileName:"package.json",manifest:null,writeProjectManifest:async manifest=>(0,write_project_manifest_1.writeProjectManifest)(filePath,manifest)}}lib$a.tryReadProjectManifest=tryReadProjectManifest;function detectFileFormattingAndComments(text){const{comments:comments,text:newText,hasFinalNewline:hasFinalNewline}=(0,text_comments_parser_1.extractComments)(text);return{comments:comments,indent:(0,detect_indent_1.default)(newText).indent,insertFinalNewline:hasFinalNewline}}function detectFileFormatting(text){return{indent:(0,detect_indent_1.default)(text).indent,insertFinalNewline:text.endsWith("\n")}}async function readExactProjectManifest(manifestPath){const base=path_1.default.basename(manifestPath).toLowerCase();switch(base){case"package.json":{const{data:data,text:text}=await(0,readFile_1.readJsonFile)(manifestPath);return{manifest:data,writeProjectManifest:createManifestWriter({...detectFileFormatting(text),initialManifest:data,manifestPath:manifestPath})}}case"package.json5":{const{data:data,text:text}=await(0,readFile_1.readJson5File)(manifestPath);return{manifest:data,writeProjectManifest:createManifestWriter({...detectFileFormattingAndComments(text),initialManifest:data,manifestPath:manifestPath})}}case"package.yaml":{const manifest=await readPackageYaml(manifestPath);return{manifest:manifest,writeProjectManifest:createManifestWriter({initialManifest:manifest,manifestPath:manifestPath})}}}throw new Error(`Not supported manifest name "${base}"`)}lib$a.readExactProjectManifest=readExactProjectManifest;async function readPackageYaml(filePath){try{return await(0,read_yaml_file_1.default)(filePath)}catch(err){if(err.name!=="YAMLException")throw err;err.message=`${err.message}\nin ${filePath}`;err.code="ERR_PNPM_YAML_PARSE";throw err}}function createManifestWriter(opts){let initialManifest=normalize(opts.initialManifest);return async(updatedManifest,force)=>{updatedManifest=normalize(updatedManifest);if(force===true||!(0,fast_deep_equal_1.default)(initialManifest,updatedManifest)){await(0,write_project_manifest_1.writeProjectManifest)(opts.manifestPath,updatedManifest,{comments:opts.comments,indent:opts.indent,insertFinalNewline:opts.insertFinalNewline});initialManifest=normalize(updatedManifest);return Promise.resolve(undefined)}return Promise.resolve(undefined)}}const dependencyKeys=new Set(["dependencies","devDependencies","optionalDependencies","peerDependencies"]);function normalize(manifest){manifest=JSON.parse(JSON.stringify(manifest));const result={};for(const[key,value]of Object.entries(manifest)){if(!dependencyKeys.has(key)){result[key]=value}else if(Object.keys(value).length!==0){result[key]=(0,sort_keys_1.default)(value)}}return result}return lib$a}var lib$4;var hasRequiredLib$6;function requireLib$6(){if(hasRequiredLib$6)return lib$4;hasRequiredLib$6=1;const{join:join,basename:basename}=require$$0$6;const normalize=pkg=>!pkg.bin?removeBin(pkg):typeof pkg.bin==="string"?normalizeString(pkg):Array.isArray(pkg.bin)?normalizeArray(pkg):typeof pkg.bin==="object"?normalizeObject(pkg):removeBin(pkg);const normalizeString=pkg=>{if(!pkg.name){return removeBin(pkg)}pkg.bin={[pkg.name]:pkg.bin};return normalizeObject(pkg)};const normalizeArray=pkg=>{pkg.bin=pkg.bin.reduce(((acc,k)=>{acc[basename(k)]=k;return acc}),{});return normalizeObject(pkg)};const removeBin=pkg=>{delete pkg.bin;return pkg};const normalizeObject=pkg=>{const orig=pkg.bin;const clean={};let hasBins=false;Object.keys(orig).forEach((binKey=>{const base=join("/",basename(binKey.replace(/\\|:/g,"/"))).slice(1);if(typeof orig[binKey]!=="string"||!base){return}const binTarget=join("/",orig[binKey]).replace(/\\/g,"/").slice(1);if(!binTarget){return}clean[base]=binTarget;hasBins=true}));if(hasBins){pkg.bin=clean}else{delete pkg.bin}return pkg};lib$4=normalize;return lib$4}var lib$3;var hasRequiredLib$5;function requireLib$5(){if(hasRequiredLib$5)return lib$3;hasRequiredLib$5=1;const fs=require$$0$2;const path=require$$0$6;const EE=require$$2$1.EventEmitter;const normalizePackageBin=requireLib$6();class BundleWalker extends EE{constructor(opt){opt=opt||{};super(opt);this.path=path.resolve(opt.path||process.cwd());this.parent=opt.parent||null;if(this.parent){this.result=this.parent.result;if(!this.parent.parent){const base=path.basename(this.path);const scope=path.basename(path.dirname(this.path));this.result.add(/^@/.test(scope)?scope+"/"+base:base)}this.root=this.parent.root;this.packageJsonCache=this.parent.packageJsonCache}else{this.result=new Set;this.root=this.path;this.packageJsonCache=opt.packageJsonCache||new Map}this.seen=new Set;this.didDone=false;this.children=0;this.node_modules=[];this.package=null;this.bundle=null}addListener(ev,fn){return this.on(ev,fn)}on(ev,fn){const ret=super.on(ev,fn);if(ev==="done"&&this.didDone){this.emit("done",this.result)}return ret}done(){if(!this.didDone){this.didDone=true;if(!this.parent){const res=Array.from(this.result);this.result=res;this.emit("done",res)}else{this.emit("done")}}}start(){const pj=path.resolve(this.path,"package.json");if(this.packageJsonCache.has(pj)){this.onPackage(this.packageJsonCache.get(pj))}else{this.readPackageJson(pj)}return this}readPackageJson(pj){fs.readFile(pj,((er,data)=>er?this.done():this.onPackageJson(pj,data)))}onPackageJson(pj,data){try{this.package=normalizePackageBin(JSON.parse(data+""))}catch(er){return this.done()}this.packageJsonCache.set(pj,this.package);this.onPackage(this.package)}allDepsBundled(pkg){return Object.keys(pkg.dependencies||{}).concat(Object.keys(pkg.optionalDependencies||{}))}onPackage(pkg){const bdRaw=this.parent?this.allDepsBundled(pkg):pkg.bundleDependencies||pkg.bundledDependencies||[];const bd=Array.from(new Set(Array.isArray(bdRaw)?bdRaw:bdRaw===true?this.allDepsBundled(pkg):Object.keys(bdRaw)));if(!bd.length){return this.done()}this.bundle=bd;this.readModules()}readModules(){readdirNodeModules(this.path+"/node_modules",((er,nm)=>er?this.onReaddir([]):this.onReaddir(nm)))}onReaddir(nm){this.node_modules=nm;this.bundle.forEach((dep=>this.childDep(dep)));if(this.children===0){this.done()}}childDep(dep){if(this.node_modules.indexOf(dep)!==-1){if(!this.seen.has(dep)){this.seen.add(dep);this.child(dep)}}else if(this.parent){this.parent.childDep(dep)}}child(dep){const p=this.path+"/node_modules/"+dep;this.children+=1;const child=new BundleWalker({path:p,parent:this});child.on("done",(_=>{if(--this.children===0){this.done()}}));child.start()}}class BundleWalkerSync extends BundleWalker{start(){super.start();this.done();return this}readPackageJson(pj){try{this.onPackageJson(pj,fs.readFileSync(pj))}catch{}return this}readModules(){try{this.onReaddir(readdirNodeModulesSync(this.path+"/node_modules"))}catch{this.onReaddir([])}}child(dep){new BundleWalkerSync({path:this.path+"/node_modules/"+dep,parent:this}).start()}}const readdirNodeModules=(nm,cb)=>{fs.readdir(nm,((er,set)=>{if(er){cb(er)}else{const scopes=set.filter((f=>/^@/.test(f)));if(!scopes.length){cb(null,set)}else{const unscoped=set.filter((f=>!/^@/.test(f)));let count=scopes.length;scopes.forEach((scope=>{fs.readdir(nm+"/"+scope,((readdirEr,pkgs)=>{if(readdirEr||!pkgs.length){unscoped.push(scope)}else{unscoped.push.apply(unscoped,pkgs.map((p=>scope+"/"+p)))}if(--count===0){cb(null,unscoped)}}))}))}}}))};const readdirNodeModulesSync=nm=>{const set=fs.readdirSync(nm);const unscoped=set.filter((f=>!/^@/.test(f)));const scopes=set.filter((f=>/^@/.test(f))).map((scope=>{try{const pkgs=fs.readdirSync(nm+"/"+scope);return pkgs.length?pkgs.map((p=>scope+"/"+p)):[scope]}catch(er){return[scope]}})).reduce(((a,b)=>a.concat(b)),[]);return unscoped.concat(scopes)};const walk=(options,callback)=>{const p=new Promise(((resolve,reject)=>{new BundleWalker(options).on("done",resolve).on("error",reject).start()}));return callback?p.then((res=>callback(null,res)),callback):p};const walkSync=options=>new BundleWalkerSync(options).start().result;lib$3=walk;walk.sync=walkSync;walk.BundleWalker=BundleWalker;walk.BundleWalkerSync=BundleWalkerSync;return lib$3}var path;var hasRequiredPath;function requirePath(){if(hasRequiredPath)return path;hasRequiredPath=1;const isWindows=typeof process==="object"&&process&&process.platform==="win32";path=isWindows?{sep:"\\"}:{sep:"/"};return path}var balancedMatch;var hasRequiredBalancedMatch;function requireBalancedMatch(){if(hasRequiredBalancedMatch)return balancedMatch;hasRequiredBalancedMatch=1;balancedMatch=balanced;function balanced(a,b,str){if(a instanceof RegExp)a=maybeMatch(a,str);if(b instanceof RegExp)b=maybeMatch(b,str);var r=range(a,b,str);return r&&{start:r[0],end:r[1],pre:str.slice(0,r[0]),body:str.slice(r[0]+a.length,r[1]),post:str.slice(r[1]+b.length)}}function maybeMatch(reg,str){var m=str.match(reg);return m?m[0]:null}balanced.range=range;function range(a,b,str){var begs,beg,left,right,result;var ai=str.indexOf(a);var bi=str.indexOf(b,ai+1);var i=ai;if(ai>=0&&bi>0){if(a===b){return[ai,bi]}begs=[];left=str.length;while(i>=0&&!result){if(i==ai){begs.push(i);ai=str.indexOf(a,i+1)}else if(begs.length==1){result=[begs.pop(),bi]}else{beg=begs.pop();if(beg<left){left=beg;right=bi}bi=str.indexOf(b,i+1)}i=ai<bi&&ai>=0?ai:bi}if(begs.length){result=[left,right]}}return result}return balancedMatch}var braceExpansion;var hasRequiredBraceExpansion;function requireBraceExpansion(){if(hasRequiredBraceExpansion)return braceExpansion;hasRequiredBraceExpansion=1;var balanced=requireBalancedMatch();braceExpansion=expandTop;var escSlash="\0SLASH"+Math.random()+"\0";var escOpen="\0OPEN"+Math.random()+"\0";var escClose="\0CLOSE"+Math.random()+"\0";var escComma="\0COMMA"+Math.random()+"\0";var escPeriod="\0PERIOD"+Math.random()+"\0";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[];var m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre;var body=m.body;var post=m.post;var p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);if(post.length){p[p.length-1]+=postParts.shift();p.push.apply(p,postParts)}parts.push.apply(parts,p);return parts}function expandTop(str){if(!str)return[];if(str.substr(0,2)==="{}"){str="\\{\\}"+str.substr(2)}return expand(escapeBraces(str),true).map(unescapeBraces)}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,isTop){var expansions=[];var m=balanced("{","}",str);if(!m)return[str];var pre=m.pre;var post=m.post.length?expand(m.post,false):[""];if(/\$$/.test(m.pre)){for(var k=0;k<post.length;k++){var expansion=pre+"{"+m.body+"}"+post[k];expansions.push(expansion)}}else{var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);var isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);var isSequence=isNumericSequence||isAlphaSequence;var isOptions=m.body.indexOf(",")>=0;if(!isSequence&&!isOptions){if(m.post.match(/,.*\}/)){str=m.pre+"{"+m.body+escClose+m.post;return expand(str)}return[str]}var n;if(isSequence){n=m.body.split(/\.\./)}else{n=parseCommaParts(m.body);if(n.length===1){n=expand(n[0],false).map(embrace);if(n.length===1){return post.map((function(p){return m.pre+n[0]+p}))}}}var N;if(isSequence){var x=numeric(n[0]);var y=numeric(n[1]);var width=Math.max(n[0].length,n[1].length);var incr=n.length==3?Math.abs(numeric(n[2])):1;var test=lte;var reverse=y<x;if(reverse){incr*=-1;test=gte}var pad=n.some(isPadded);N=[];for(var i=x;test(i,y);i+=incr){var c;if(isAlphaSequence){c=String.fromCharCode(i);if(c==="\\")c=""}else{c=String(i);if(pad){var need=width-c.length;if(need>0){var z=new Array(need+1).join("0");if(i<0)c="-"+z+c.slice(1);else c=z+c}}}N.push(c)}}else{N=[];for(var j=0;j<n.length;j++){N.push.apply(N,expand(n[j],false))}}for(var j=0;j<N.length;j++){for(var k=0;k<post.length;k++){var expansion=pre+N[j]+post[k];if(!isTop||isSequence||expansion)expansions.push(expansion)}}}return expansions}return braceExpansion}var minimatch_1;var hasRequiredMinimatch;function requireMinimatch(){if(hasRequiredMinimatch)return minimatch_1;hasRequiredMinimatch=1;const minimatch=minimatch_1=(p,pattern,options={})=>{assertValidPattern(pattern);if(!options.nocomment&&pattern.charAt(0)==="#"){return false}return new Minimatch(pattern,options).match(p)};minimatch_1=minimatch;const path=requirePath();minimatch.sep=path.sep;const GLOBSTAR=Symbol("globstar **");minimatch.GLOBSTAR=GLOBSTAR;const expand=requireBraceExpansion();const plTypes={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};const qmark="[^/]";const star=qmark+"*?";const twoStarDot="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";const twoStarNoDot="(?:(?!(?:\\/|^)\\.).)*?";const charSet=s=>s.split("").reduce(((set,c)=>{set[c]=true;return set}),{});const reSpecials=charSet("().*{}+?[]^$\\!");const addPatternStartSet=charSet("[.(");const slashSplit=/\/+/;minimatch.filter=(pattern,options={})=>(p,i,list)=>minimatch(p,pattern,options);const ext=(a,b={})=>{const t={};Object.keys(a).forEach((k=>t[k]=a[k]));Object.keys(b).forEach((k=>t[k]=b[k]));return t};minimatch.defaults=def=>{if(!def||typeof def!=="object"||!Object.keys(def).length){return minimatch}const orig=minimatch;const m=(p,pattern,options)=>orig(p,pattern,ext(def,options));m.Minimatch=class Minimatch extends orig.Minimatch{constructor(pattern,options){super(pattern,ext(def,options))}};m.Minimatch.defaults=options=>orig.defaults(ext(def,options)).Minimatch;m.filter=(pattern,options)=>orig.filter(pattern,ext(def,options));m.defaults=options=>orig.defaults(ext(def,options));m.makeRe=(pattern,options)=>orig.makeRe(pattern,ext(def,options));m.braceExpand=(pattern,options)=>orig.braceExpand(pattern,ext(def,options));m.match=(list,pattern,options)=>orig.match(list,pattern,ext(def,options));return m};minimatch.braceExpand=(pattern,options)=>braceExpand(pattern,options);const braceExpand=(pattern,options={})=>{assertValidPattern(pattern);if(options.nobrace||!/\{(?:(?!\{).)*\}/.test(pattern)){return[pattern]}return expand(pattern)};const MAX_PATTERN_LENGTH=1024*64;const assertValidPattern=pattern=>{if(typeof pattern!=="string"){throw new TypeError("invalid pattern")}if(pattern.length>MAX_PATTERN_LENGTH){throw new TypeError("pattern is too long")}};const SUBPARSE=Symbol("subparse");minimatch.makeRe=(pattern,options)=>new Minimatch(pattern,options||{}).makeRe();minimatch.match=(list,pattern,options={})=>{const mm=new Minimatch(pattern,options);list=list.filter((f=>mm.match(f)));if(mm.options.nonull&&!list.length){list.push(pattern)}return list};const globUnescape=s=>s.replace(/\\(.)/g,"$1");const charUnescape=s=>s.replace(/\\([^-\]])/g,"$1");const regExpEscape=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");const braExpEscape=s=>s.replace(/[[\]\\]/g,"\\$&");class Minimatch{constructor(pattern,options){assertValidPattern(pattern);if(!options)options={};this.options=options;this.set=[];this.pattern=pattern;this.windowsPathsNoEscape=!!options.windowsPathsNoEscape||options.allowWindowsEscape===false;if(this.windowsPathsNoEscape){this.pattern=this.pattern.replace(/\\/g,"/")}this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!options.partial;this.make()}debug(){}make(){const pattern=this.pattern;const options=this.options;if(!options.nocomment&&pattern.charAt(0)==="#"){this.comment=true;return}if(!pattern){this.empty=true;return}this.parseNegate();let set=this.globSet=this.braceExpand();if(options.debug)this.debug=(...args)=>console.error(...args);this.debug(this.pattern,set);set=this.globParts=set.map((s=>s.split(slashSplit)));this.debug(this.pattern,set);set=set.map(((s,si,set)=>s.map(this.parse,this)));this.debug(this.pattern,set);set=set.filter((s=>s.indexOf(false)===-1));this.debug(this.pattern,set);this.set=set}parseNegate(){if(this.options.nonegate)return;const pattern=this.pattern;let negate=false;let negateOffset=0;for(let i=0;i<pattern.length&&pattern.charAt(i)==="!";i++){negate=!negate;negateOffset++}if(negateOffset)this.pattern=pattern.slice(negateOffset);this.negate=negate}matchOne(file,pattern,partial){var options=this.options;this.debug("matchOne",{this:this,file:file,pattern:pattern});this.debug("matchOne",file.length,pattern.length);for(var fi=0,pi=0,fl=file.length,pl=pattern.length;fi<fl&&pi<pl;fi++,pi++){this.debug("matchOne loop");var p=pattern[pi];var f=file[fi];this.debug(pattern,p,f);if(p===false)return false;if(p===GLOBSTAR){this.debug("GLOBSTAR",[pattern,p,f]);var fr=fi;var pr=pi+1;if(pr===pl){this.debug("** at the end");for(;fi<fl;fi++){if(file[fi]==="."||file[fi]===".."||!options.dot&&file[fi].charAt(0)===".")return false}return true}while(fr<fl){var swallowee=file[fr];this.debug("\nglobstar while",file,fr,pattern,pr,swallowee);if(this.matchOne(file.slice(fr),pattern.slice(pr),partial)){this.debug("globstar found match!",fr,fl,swallowee);return true}else{if(swallowee==="."||swallowee===".."||!options.dot&&swallowee.charAt(0)==="."){this.debug("dot detected!",file,fr,pattern,pr);break}this.debug("globstar swallow a segment, and continue");fr++}}if(partial){this.debug("\n>>> no match, partial?",file,fr,pattern,pr);if(fr===fl)return true}return false}var hit;if(typeof p==="string"){hit=f===p;this.debug("string match",p,f,hit)}else{hit=f.match(p);this.debug("pattern match",p,f,hit)}if(!hit)return false}if(fi===fl&&pi===pl){return true}else if(fi===fl){return partial}else if(pi===pl){return fi===fl-1&&file[fi]===""}throw new Error("wtf?")}braceExpand(){return braceExpand(this.pattern,this.options)}parse(pattern,isSub){assertValidPattern(pattern);const options=this.options;if(pattern==="**"){if(!options.noglobstar)return GLOBSTAR;else pattern="*"}if(pattern==="")return"";let re="";let hasMagic=false;let escaping=false;const patternListStack=[];const negativeLists=[];let stateChar;let inClass=false;let reClassStart=-1;let classStart=-1;let cs;let pl;let sp;let dotTravAllowed=pattern.charAt(0)===".";let dotFileAllowed=options.dot||dotTravAllowed;const patternStart=()=>dotTravAllowed?"":dotFileAllowed?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";const subPatternStart=p=>p.charAt(0)==="."?"":options.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";const clearStateChar=()=>{if(stateChar){switch(stateChar){case"*":re+=star;hasMagic=true;break;case"?":re+=qmark;hasMagic=true;break;default:re+="\\"+stateChar;break}this.debug("clearStateChar %j %j",stateChar,re);stateChar=false}};for(let i=0,c;i<pattern.length&&(c=pattern.charAt(i));i++){this.debug("%s\t%s %s %j",pattern,i,re,c);if(escaping){if(c==="/"){return false}if(reSpecials[c]){re+="\\"}re+=c;escaping=false;continue}switch(c){case"/":{return false}case"\\":if(inClass&&pattern.charAt(i+1)==="-"){re+=c;continue}clearStateChar();escaping=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",pattern,i,re,c);if(inClass){this.debug(" in class");if(c==="!"&&i===classStart+1)c="^";re+=c;continue}this.debug("call clearStateChar %j",stateChar);clearStateChar();stateChar=c;if(options.noext)clearStateChar();continue;case"(":{if(inClass){re+="(";continue}if(!stateChar){re+="\\(";continue}const plEntry={type:stateChar,start:i-1,reStart:re.length,open:plTypes[stateChar].open,close:plTypes[stateChar].close};this.debug(this.pattern,"\t",plEntry);patternListStack.push(plEntry);re+=plEntry.open;if(plEntry.start===0&&plEntry.type!=="!"){dotTravAllowed=true;re+=subPatternStart(pattern.slice(i+1))}this.debug("plType %j %j",stateChar,re);stateChar=false;continue}case")":{const plEntry=patternListStack[patternListStack.length-1];if(inClass||!plEntry){re+="\\)";continue}patternListStack.pop();clearStateChar();hasMagic=true;pl=plEntry;re+=pl.close;if(pl.type==="!"){negativeLists.push(Object.assign(pl,{reEnd:re.length}))}continue}case"|":{const plEntry=patternListStack[patternListStack.length-1];if(inClass||!plEntry){re+="\\|";continue}clearStateChar();re+="|";if(plEntry.start===0&&plEntry.type!=="!"){dotTravAllowed=true;re+=subPatternStart(pattern.slice(i+1))}continue}case"[":clearStateChar();if(inClass){re+="\\"+c;continue}inClass=true;classStart=i;reClassStart=re.length;re+=c;continue;case"]":if(i===classStart+1||!inClass){re+="\\"+c;continue}cs=pattern.substring(classStart+1,i);try{RegExp("["+braExpEscape(charUnescape(cs))+"]");re+=c}catch(er){re=re.substring(0,reClassStart)+"(?:$.)"}hasMagic=true;inClass=false;continue;default:clearStateChar();if(reSpecials[c]&&!(c==="^"&&inClass)){re+="\\"}re+=c;break}}if(inClass){cs=pattern.slice(classStart+1);sp=this.parse(cs,SUBPARSE);re=re.substring(0,reClassStart)+"\\["+sp[0];hasMagic=hasMagic||sp[1]}for(pl=patternListStack.pop();pl;pl=patternListStack.pop()){let tail;tail=re.slice(pl.reStart+pl.open.length);this.debug("setting tail",re,pl);tail=tail.replace(/((?:\\{2}){0,64})(\\?)\|/g,((_,$1,$2)=>{if(!$2){$2="\\"}return $1+$1+$2+"|"}));this.debug("tail=%j\n %s",tail,tail,pl,re);const t=pl.type==="*"?star:pl.type==="?"?qmark:"\\"+pl.type;hasMagic=true;re=re.slice(0,pl.reStart)+t+"\\("+tail}clearStateChar();if(escaping){re+="\\\\"}const addPatternStart=addPatternStartSet[re.charAt(0)];for(let n=negativeLists.length-1;n>-1;n--){const nl=negativeLists[n];const nlBefore=re.slice(0,nl.reStart);const nlFirst=re.slice(nl.reStart,nl.reEnd-8);let nlAfter=re.slice(nl.reEnd);const nlLast=re.slice(nl.reEnd-8,nl.reEnd)+nlAfter;const closeParensBefore=nlBefore.split(")").length;const openParensBefore=nlBefore.split("(").length-closeParensBefore;let cleanAfter=nlAfter;for(let i=0;i<openParensBefore;i++){cleanAfter=cleanAfter.replace(/\)[+*?]?/,"")}nlAfter=cleanAfter;const dollar=nlAfter===""&&isSub!==SUBPARSE?"(?:$|\\/)":"";re=nlBefore+nlFirst+nlAfter+dollar+nlLast}if(re!==""&&hasMagic){re="(?=.)"+re}if(addPatternStart){re=patternStart()+re}if(isSub===SUBPARSE){return[re,hasMagic]}if(options.nocase&&!hasMagic){hasMagic=pattern.toUpperCase()!==pattern.toLowerCase()}if(!hasMagic){return globUnescape(pattern)}const flags=options.nocase?"i":"";try{return Object.assign(new RegExp("^"+re+"$",flags),{_glob:pattern,_src:re})}catch(er){return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===false)return this.regexp;const set=this.set;if(!set.length){this.regexp=false;return this.regexp}const options=this.options;const twoStar=options.noglobstar?star:options.dot?twoStarDot:twoStarNoDot;const flags=options.nocase?"i":"";let re=set.map((pattern=>{pattern=pattern.map((p=>typeof p==="string"?regExpEscape(p):p===GLOBSTAR?GLOBSTAR:p._src)).reduce(((set,p)=>{if(!(set[set.length-1]===GLOBSTAR&&p===GLOBSTAR)){set.push(p)}return set}),[]);pattern.forEach(((p,i)=>{if(p!==GLOBSTAR||pattern[i-1]===GLOBSTAR){return}if(i===0){if(pattern.length>1){pattern[i+1]="(?:\\/|"+twoStar+"\\/)?"+pattern[i+1]}else{pattern[i]=twoStar}}else if(i===pattern.length-1){pattern[i-1]+="(?:\\/|"+twoStar+")?"}else{pattern[i-1]+="(?:\\/|\\/"+twoStar+"\\/)"+pattern[i+1];pattern[i+1]=GLOBSTAR}}));return pattern.filter((p=>p!==GLOBSTAR)).join("/")})).join("|");re="^(?:"+re+")$";if(this.negate)re="^(?!"+re+").*$";try{this.regexp=new RegExp(re,flags)}catch(ex){this.regexp=false}return this.regexp}match(f,partial=this.partial){this.debug("match",f,this.pattern);if(this.comment)return false;if(this.empty)return f==="";if(f==="/"&&partial)return true;const options=this.options;if(path.sep!=="/"){f=f.split(path.sep).join("/")}f=f.split(slashSplit);this.debug(this.pattern,"split",f);const set=this.set;this.debug(this.pattern,"set",set);let filename;for(let i=f.length-1;i>=0;i--){filename=f[i];if(filename)break}for(let i=0;i<set.length;i++){const pattern=set[i];let file=f;if(options.matchBase&&pattern.length===1){file=[filename]}const hit=this.matchOne(file,pattern,partial);if(hit){if(options.flipNegate)return true;return!this.negate}}if(options.flipNegate)return false;return this.negate}static defaults(def){return minimatch.defaults(def).Minimatch}}minimatch.Minimatch=Minimatch;return minimatch_1}var lib$2;var hasRequiredLib$4;function requireLib$4(){if(hasRequiredLib$4)return lib$2;hasRequiredLib$4=1;const fs=require$$0$2;const path=require$$0$6;const EE=require$$2$1.EventEmitter;const Minimatch=requireMinimatch().Minimatch;class Walker extends EE{constructor(opts){opts=opts||{};super(opts);this.isSymbolicLink=opts.isSymbolicLink;this.path=opts.path||process.cwd();this.basename=path.basename(this.path);this.ignoreFiles=opts.ignoreFiles||[".ignore"];this.ignoreRules={};this.parent=opts.parent||null;this.includeEmpty=!!opts.includeEmpty;this.root=this.parent?this.parent.root:this.path;this.follow=!!opts.follow;this.result=this.parent?this.parent.result:new Set;this.entries=null;this.sawError=false}sort(a,b){return a.localeCompare(b,"en")}emit(ev,data){let ret=false;if(!(this.sawError&&ev==="error")){if(ev==="error"){this.sawError=true}else if(ev==="done"&&!this.parent){data=Array.from(data).map((e=>/^@/.test(e)?`./${e}`:e)).sort(this.sort);this.result=data}if(ev==="error"&&this.parent){ret=this.parent.emit("error",data)}else{ret=super.emit(ev,data)}}return ret}start(){fs.readdir(this.path,((er,entries)=>er?this.emit("error",er):this.onReaddir(entries)));return this}isIgnoreFile(e){return e!=="."&&e!==".."&&this.ignoreFiles.indexOf(e)!==-1}onReaddir(entries){this.entries=entries;if(entries.length===0){if(this.includeEmpty){this.result.add(this.path.slice(this.root.length+1))}this.emit("done",this.result)}else{const hasIg=this.entries.some((e=>this.isIgnoreFile(e)));if(hasIg){this.addIgnoreFiles()}else{this.filterEntries()}}}addIgnoreFiles(){const newIg=this.entries.filter((e=>this.isIgnoreFile(e)));let igCount=newIg.length;const then=_=>{if(--igCount===0){this.filterEntries()}};newIg.forEach((e=>this.addIgnoreFile(e,then)))}addIgnoreFile(file,then){const ig=path.resolve(this.path,file);fs.readFile(ig,"utf8",((er,data)=>er?this.emit("error",er):this.onReadIgnoreFile(file,data,then)))}onReadIgnoreFile(file,data,then){const mmopt={matchBase:true,dot:true,flipNegate:true,nocase:true};const rules=data.split(/\r?\n/).filter((line=>!/^#|^$/.test(line.trim()))).map((rule=>new Minimatch(rule.trim(),mmopt)));this.ignoreRules[file]=rules;then()}filterEntries(){const filtered=this.entries.map((entry=>{const passFile=this.filterEntry(entry);const passDir=this.filterEntry(entry,true);return passFile||passDir?[entry,passFile,passDir]:false})).filter((e=>e));let entryCount=filtered.length;if(entryCount===0){this.emit("done",this.result)}else{const then=_=>{if(--entryCount===0){this.emit("done",this.result)}};filtered.forEach((filt=>{const entry=filt[0];const file=filt[1];const dir=filt[2];this.stat({entry:entry,file:file,dir:dir},then)}))}}onstat({st:st,entry:entry,file:file,dir:dir,isSymbolicLink:isSymbolicLink},then){const abs=this.path+"/"+entry;if(!st.isDirectory()){if(file){this.result.add(abs.slice(this.root.length+1))}then()}else{if(dir){this.walker(entry,{isSymbolicLink:isSymbolicLink},then)}else{then()}}}stat({entry:entry,file:file,dir:dir},then){const abs=this.path+"/"+entry;fs.lstat(abs,((lstatErr,lstatResult)=>{if(lstatErr){this.emit("error",lstatErr)}else{const isSymbolicLink=lstatResult.isSymbolicLink();if(this.follow&&isSymbolicLink){fs.stat(abs,((statErr,statResult)=>{if(statErr){this.emit("error",statErr)}else{this.onstat({st:statResult,entry:entry,file:file,dir:dir,isSymbolicLink:isSymbolicLink},then)}}))}else{this.onstat({st:lstatResult,entry:entry,file:file,dir:dir,isSymbolicLink:isSymbolicLink},then)}}}))}walkerOpt(entry,opts){return{path:this.path+"/"+entry,parent:this,ignoreFiles:this.ignoreFiles,follow:this.follow,includeEmpty:this.includeEmpty,...opts}}walker(entry,opts,then){new Walker(this.walkerOpt(entry,opts)).on("done",then).start()}filterEntry(entry,partial){let included=true;if(this.parent&&this.parent.filterEntry){var pt=this.basename+"/"+entry;included=this.parent.filterEntry(pt,partial)}this.ignoreFiles.forEach((f=>{if(this.ignoreRules[f]){this.ignoreRules[f].forEach((rule=>{if(rule.negate!==included){const match=rule.match("/"+entry)||rule.match(entry)||!!partial&&(rule.match("/"+entry+"/")||rule.match(entry+"/"))||!!partial&&rule.negate&&(rule.match("/"+entry,true)||rule.match(entry,true));if(match){included=rule.negate}}}))}}));return included}}class WalkerSync extends Walker{start(){this.onReaddir(fs.readdirSync(this.path));return this}addIgnoreFile(file,then){const ig=path.resolve(this.path,file);this.onReadIgnoreFile(file,fs.readFileSync(ig,"utf8"),then)}stat({entry:entry,file:file,dir:dir},then){const abs=this.path+"/"+entry;let st=fs.lstatSync(abs);const isSymbolicLink=st.isSymbolicLink();if(this.follow&&isSymbolicLink){st=fs.statSync(abs)}this.onstat({st:st,entry:entry,file:file,dir:dir,isSymbolicLink:isSymbolicLink},then)}walker(entry,opts,then){new WalkerSync(this.walkerOpt(entry,opts)).start();then()}}const walk=(opts,callback)=>{const p=new Promise(((resolve,reject)=>{new Walker(opts).on("done",resolve).on("error",reject).start()}));return callback?p.then((res=>callback(null,res)),callback):p};const walkSync=opts=>new WalkerSync(opts).start().result;lib$2=walk;walk.sync=walkSync;walk.Walker=Walker;walk.WalkerSync=WalkerSync;return lib$2}var old={};var hasRequiredOld;function requireOld(){if(hasRequiredOld)return old;hasRequiredOld=1;var pathModule=require$$0$6;var isWindows=process.platform==="win32";var fs=require$$0$2;var DEBUG=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var callback;if(DEBUG){var backtrace=new Error;callback=debugCallback}else callback=missingCallback;return callback;function debugCallback(err){if(err){backtrace.message=err.message;err=backtrace;missingCallback(err)}}function missingCallback(err){if(err){if(process.throwDeprecation)throw err;else if(!process.noDeprecation){var msg="fs: missing callback "+(err.stack||err.message);if(process.traceDeprecation)console.trace(msg);else console.error(msg)}}}}function maybeCallback(cb){return typeof cb==="function"?cb:rethrow()}pathModule.normalize;if(isWindows){var nextPartRe=/(.*?)(?:[\/\\]+|$)/g}else{var nextPartRe=/(.*?)(?:[\/]+|$)/g}if(isWindows){var splitRootRe=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{var splitRootRe=/^[\/]*/}old.realpathSync=function realpathSync(p,cache){p=pathModule.resolve(p);if(cache&&Object.prototype.hasOwnProperty.call(cache,p)){return cache[p]}var original=p,seenLinks={},knownHard={};var pos;var current;var base;var previous;start();function start(){var m=splitRootRe.exec(p);pos=m[0].length;current=m[0];base=m[0];previous="";if(isWindows&&!knownHard[base]){fs.lstatSync(base);knownHard[base]=true}}while(pos<p.length){nextPartRe.lastIndex=pos;var result=nextPartRe.exec(p);previous=current;current+=result[0];base=previous+result[1];pos=nextPartRe.lastIndex;if(knownHard[base]||cache&&cache[base]===base){continue}var resolvedLink;if(cache&&Object.prototype.hasOwnProperty.call(cache,base)){resolvedLink=cache[base]}else{var stat=fs.lstatSync(base);if(!stat.isSymbolicLink()){knownHard[base]=true;if(cache)cache[base]=base;continue}var linkTarget=null;if(!isWindows){var id=stat.dev.toString(32)+":"+stat.ino.toString(32);if(seenLinks.hasOwnProperty(id)){linkTarget=seenLinks[id]}}if(linkTarget===null){fs.statSync(base);linkTarget=fs.readlinkSync(base)}resolvedLink=pathModule.resolve(previous,linkTarget);if(cache)cache[base]=resolvedLink;if(!isWindows)seenLinks[id]=linkTarget}p=pathModule.resolve(resolvedLink,p.slice(pos));start()}if(cache)cache[original]=p;return p};old.realpath=function realpath(p,cache,cb){if(typeof cb!=="function"){cb=maybeCallback(cache);cache=null}p=pathModule.resolve(p);if(cache&&Object.prototype.hasOwnProperty.call(cache,p)){return process.nextTick(cb.bind(null,null,cache[p]))}var original=p,seenLinks={},knownHard={};var pos;var current;var base;var previous;start();function start(){var m=splitRootRe.exec(p);pos=m[0].length;current=m[0];base=m[0];previous="";if(isWindows&&!knownHard[base]){fs.lstat(base,(function(err){if(err)return cb(err);knownHard[base]=true;LOOP()}))}else{process.nextTick(LOOP)}}function LOOP(){if(pos>=p.length){if(cache)cache[original]=p;return cb(null,p)}nextPartRe.lastIndex=pos;var result=nextPartRe.exec(p);previous=current;current+=result[0];base=previous+result[1];pos=nextPartRe.lastIndex;if(knownHard[base]||cache&&cache[base]===base){return process.nextTick(LOOP)}if(cache&&Object.prototype.hasOwnProperty.call(cache,base)){return gotResolvedLink(cache[base])}return fs.lstat(base,gotStat)}function gotStat(err,stat){if(err)return cb(err);if(!stat.isSymbolicLink()){knownHard[base]=true;if(cache)cache[base]=base;return process.nextTick(LOOP)}if(!isWindows){var id=stat.dev.toString(32)+":"+stat.ino.toString(32);if(seenLinks.hasOwnProperty(id)){return gotTarget(null,seenLinks[id],base)}}fs.stat(base,(function(err){if(err)return cb(err);fs.readlink(base,(function(err,target){if(!isWindows)seenLinks[id]=target;gotTarget(err,target)}))}))}function gotTarget(err,target,base){if(err)return cb(err);var resolvedLink=pathModule.resolve(previous,target);if(cache)cache[base]=resolvedLink;gotResolvedLink(resolvedLink)}function gotResolvedLink(resolvedLink){p=pathModule.resolve(resolvedLink,p.slice(pos));start()}};return old}var fs_realpath;var hasRequiredFs_realpath;function requireFs_realpath(){if(hasRequiredFs_realpath)return fs_realpath;hasRequiredFs_realpath=1;fs_realpath=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var fs=require$$0$2;var origRealpath=fs.realpath;var origRealpathSync=fs.realpathSync;var version=process.version;var ok=/^v[0-5]\./.test(version);var old=requireOld();function newError(er){return er&&er.syscall==="realpath"&&(er.code==="ELOOP"||er.code==="ENOMEM"||er.code==="ENAMETOOLONG")}function realpath(p,cache,cb){if(ok){return origRealpath(p,cache,cb)}if(typeof cache==="function"){cb=cache;cache=null}origRealpath(p,cache,(function(er,result){if(newError(er)){old.realpath(p,cache,cb)}else{cb(er,result)}}))}function realpathSync(p,cache){if(ok){return origRealpathSync(p,cache)}try{return origRealpathSync(p,cache)}catch(er){if(newError(er)){return old.realpathSync(p,cache)}else{throw er}}}function monkeypatch(){fs.realpath=realpath;fs.realpathSync=realpathSync}function unmonkeypatch(){fs.realpath=origRealpath;fs.realpathSync=origRealpathSync}return fs_realpath}var inherits={exports:{}};var inherits_browser={exports:{}};var hasRequiredInherits_browser;function requireInherits_browser(){if(hasRequiredInherits_browser)return inherits_browser.exports;hasRequiredInherits_browser=1;if(typeof Object.create==="function"){inherits_browser.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}}else{inherits_browser.exports=function inherits(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}}return inherits_browser.exports}var hasRequiredInherits;function requireInherits(){if(hasRequiredInherits)return inherits.exports;hasRequiredInherits=1;try{var util=require("util");if(typeof util.inherits!=="function")throw"";inherits.exports=util.inherits}catch(e){inherits.exports=requireInherits_browser()}return inherits.exports}var common={};var hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;common.setopts=setopts;common.ownProp=ownProp;common.makeAbs=makeAbs;common.finish=finish;common.mark=mark;common.isIgnored=isIgnored;common.childrenIgnored=childrenIgnored;function ownProp(obj,field){return Object.prototype.hasOwnProperty.call(obj,field)}var fs=require$$0$2;var path=require$$0$6;var minimatch=requireMinimatch();var isAbsolute=require$$0$6.isAbsolute;var Minimatch=minimatch.Minimatch;function alphasort(a,b){return a.localeCompare(b,"en")}function setupIgnores(self,options){self.ignore=options.ignore||[];if(!Array.isArray(self.ignore))self.ignore=[self.ignore];if(self.ignore.length){self.ignore=self.ignore.map(ignoreMap)}}function ignoreMap(pattern){var gmatcher=null;if(pattern.slice(-3)==="/**"){var gpattern=pattern.replace(/(\/\*\*)+$/,"");gmatcher=new Minimatch(gpattern,{dot:true})}return{matcher:new Minimatch(pattern,{dot:true}),gmatcher:gmatcher}}function setopts(self,pattern,options){if(!options)options={};if(options.matchBase&&-1===pattern.indexOf("/")){if(options.noglobstar){throw new Error("base matching requires globstar")}pattern="**/"+pattern}self.windowsPathsNoEscape=!!options.windowsPathsNoEscape||options.allowWindowsEscape===false;if(self.windowsPathsNoEscape){pattern=pattern.replace(/\\/g,"/")}self.silent=!!options.silent;self.pattern=pattern;self.strict=options.strict!==false;self.realpath=!!options.realpath;self.realpathCache=options.realpathCache||Object.create(null);self.follow=!!options.follow;self.dot=!!options.dot;self.mark=!!options.mark;self.nodir=!!options.nodir;if(self.nodir)self.mark=true;self.sync=!!options.sync;self.nounique=!!options.nounique;self.nonull=!!options.nonull;self.nosort=!!options.nosort;self.nocase=!!options.nocase;self.stat=!!options.stat;self.noprocess=!!options.noprocess;self.absolute=!!options.absolute;self.fs=options.fs||fs;self.maxLength=options.maxLength||Infinity;self.cache=options.cache||Object.create(null);self.statCache=options.statCache||Object.create(null);self.symlinks=options.symlinks||Object.create(null);setupIgnores(self,options);self.changedCwd=false;var cwd=process.cwd();if(!ownProp(options,"cwd"))self.cwd=path.resolve(cwd);else{self.cwd=path.resolve(options.cwd);self.changedCwd=self.cwd!==cwd}self.root=options.root||path.resolve(self.cwd,"/");self.root=path.resolve(self.root);self.cwdAbs=isAbsolute(self.cwd)?self.cwd:makeAbs(self,self.cwd);self.nomount=!!options.nomount;if(process.platform==="win32"){self.root=self.root.replace(/\\/g,"/");self.cwd=self.cwd.replace(/\\/g,"/");self.cwdAbs=self.cwdAbs.replace(/\\/g,"/")}options.nonegate=true;options.nocomment=true;self.minimatch=new Minimatch(pattern,options);self.options=self.minimatch.options}function finish(self){var nou=self.nounique;var all=nou?[]:Object.create(null);for(var i=0,l=self.matches.length;i<l;i++){var matches=self.matches[i];if(!matches||Object.keys(matches).length===0){if(self.nonull){var literal=self.minimatch.globSet[i];if(nou)all.push(literal);else all[literal]=true}}else{var m=Object.keys(matches);if(nou)all.push.apply(all,m);else m.forEach((function(m){all[m]=true}))}}if(!nou)all=Object.keys(all);if(!self.nosort)all=all.sort(alphasort);if(self.mark){for(var i=0;i<all.length;i++){all[i]=self._mark(all[i])}if(self.nodir){all=all.filter((function(e){var notDir=!/\/$/.test(e);var c=self.cache[e]||self.cache[makeAbs(self,e)];if(notDir&&c)notDir=c!=="DIR"&&!Array.isArray(c);return notDir}))}}if(self.ignore.length)all=all.filter((function(m){return!isIgnored(self,m)}));self.found=all}function mark(self,p){var abs=makeAbs(self,p);var c=self.cache[abs];var m=p;if(c){var isDir=c==="DIR"||Array.isArray(c);var slash=p.slice(-1)==="/";if(isDir&&!slash)m+="/";else if(!isDir&&slash)m=m.slice(0,-1);if(m!==p){var mabs=makeAbs(self,m);self.statCache[mabs]=self.statCache[abs];self.cache[mabs]=self.cache[abs]}}return m}function makeAbs(self,f){var abs=f;if(f.charAt(0)==="/"){abs=path.join(self.root,f)}else if(isAbsolute(f)||f===""){abs=f}else if(self.changedCwd){abs=path.resolve(self.cwd,f)}else{abs=path.resolve(f)}if(process.platform==="win32")abs=abs.replace(/\\/g,"/");return abs}function isIgnored(self,path){if(!self.ignore.length)return false;return self.ignore.some((function(item){return item.matcher.match(path)||!!(item.gmatcher&&item.gmatcher.match(path))}))}function childrenIgnored(self,path){if(!self.ignore.length)return false;return self.ignore.some((function(item){return!!(item.gmatcher&&item.gmatcher.match(path))}))}return common}var sync;var hasRequiredSync;function requireSync(){if(hasRequiredSync)return sync;hasRequiredSync=1;sync=globSync;globSync.GlobSync=GlobSync;var rp=requireFs_realpath();var minimatch=requireMinimatch();minimatch.Minimatch;requireGlob().Glob;var path=require$$0$6;var assert=require$$5;var isAbsolute=require$$0$6.isAbsolute;var common=requireCommon();var setopts=common.setopts;var ownProp=common.ownProp;var childrenIgnored=common.childrenIgnored;var isIgnored=common.isIgnored;function globSync(pattern,options){if(typeof options==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(pattern,options).found}function GlobSync(pattern,options){if(!pattern)throw new Error("must provide pattern");if(typeof options==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(pattern,options);setopts(this,pattern,options);if(this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var i=0;i<n;i++){this._process(this.minimatch.set[i],i,false)}this._finish()}GlobSync.prototype._finish=function(){assert.ok(this instanceof GlobSync);if(this.realpath){var self=this;this.matches.forEach((function(matchset,index){var set=self.matches[index]=Object.create(null);for(var p in matchset){try{p=self._makeAbs(p);var real=rp.realpathSync(p,self.realpathCache);set[real]=true}catch(er){if(er.syscall==="stat")set[self._makeAbs(p)]=true;else throw er}}}))}common.finish(this)};GlobSync.prototype._process=function(pattern,index,inGlobStar){assert.ok(this instanceof GlobSync);var n=0;while(typeof pattern[n]==="string"){n++}var prefix;switch(n){case pattern.length:this._processSimple(pattern.join("/"),index);return;case 0:prefix=null;break;default:prefix=pattern.slice(0,n).join("/");break}var remain=pattern.slice(n);var read;if(prefix===null)read=".";else if(isAbsolute(prefix)||isAbsolute(pattern.map((function(p){return typeof p==="string"?p:"[*]"})).join("/"))){if(!prefix||!isAbsolute(prefix))prefix="/"+prefix;read=prefix}else read=prefix;var abs=this._makeAbs(read);if(childrenIgnored(this,read))return;var isGlobStar=remain[0]===minimatch.GLOBSTAR;if(isGlobStar)this._processGlobStar(prefix,read,abs,remain,index,inGlobStar);else this._processReaddir(prefix,read,abs,remain,index,inGlobStar)};GlobSync.prototype._processReaddir=function(prefix,read,abs,remain,index,inGlobStar){var entries=this._readdir(abs,inGlobStar);if(!entries)return;var pn=remain[0];var negate=!!this.minimatch.negate;var rawGlob=pn._glob;var dotOk=this.dot||rawGlob.charAt(0)===".";var matchedEntries=[];for(var i=0;i<entries.length;i++){var e=entries[i];if(e.charAt(0)!=="."||dotOk){var m;if(negate&&!prefix){m=!e.match(pn)}else{m=e.match(pn)}if(m)matchedEntries.push(e)}}var len=matchedEntries.length;if(len===0)return;if(remain.length===1&&!this.mark&&!this.stat){if(!this.matches[index])this.matches[index]=Object.create(null);for(var i=0;i<len;i++){var e=matchedEntries[i];if(prefix){if(prefix.slice(-1)!=="/")e=prefix+"/"+e;else e=prefix+e}if(e.charAt(0)==="/"&&!this.nomount){e=path.join(this.root,e)}this._emitMatch(index,e)}return}remain.shift();for(var i=0;i<len;i++){var e=matchedEntries[i];var newPattern;if(prefix)newPattern=[prefix,e];else newPattern=[e];this._process(newPattern.concat(remain),index,inGlobStar)}};GlobSync.prototype._emitMatch=function(index,e){if(isIgnored(this,e))return;var abs=this._makeAbs(e);if(this.mark)e=this._mark(e);if(this.absolute){e=abs}if(this.matches[index][e])return;if(this.nodir){var c=this.cache[abs];if(c==="DIR"||Array.isArray(c))return}this.matches[index][e]=true;if(this.stat)this._stat(e)};GlobSync.prototype._readdirInGlobStar=function(abs){if(this.follow)return this._readdir(abs,false);var entries;var lstat;try{lstat=this.fs.lstatSync(abs)}catch(er){if(er.code==="ENOENT"){return null}}var isSym=lstat&&lstat.isSymbolicLink();this.symlinks[abs]=isSym;if(!isSym&&lstat&&!lstat.isDirectory())this.cache[abs]="FILE";else entries=this._readdir(abs,false);return entries};GlobSync.prototype._readdir=function(abs,inGlobStar){if(inGlobStar&&!ownProp(this.symlinks,abs))return this._readdirInGlobStar(abs);if(ownProp(this.cache,abs)){var c=this.cache[abs];if(!c||c==="FILE")return null;if(Array.isArray(c))return c}try{return this._readdirEntries(abs,this.fs.readdirSync(abs))}catch(er){this._readdirError(abs,er);return null}};GlobSync.prototype._readdirEntries=function(abs,entries){if(!this.mark&&!this.stat){for(var i=0;i<entries.length;i++){var e=entries[i];if(abs==="/")e=abs+e;else e=abs+"/"+e;this.cache[e]=true}}this.cache[abs]=entries;return entries};GlobSync.prototype._readdirError=function(f,er){switch(er.code){case"ENOTSUP":case"ENOTDIR":var abs=this._makeAbs(f);this.cache[abs]="FILE";if(abs===this.cwdAbs){var error=new Error(er.code+" invalid cwd "+this.cwd);error.path=this.cwd;error.code=er.code;throw error}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(f)]=false;break;default:this.cache[this._makeAbs(f)]=false;if(this.strict)throw er;if(!this.silent)console.error("glob error",er);break}};GlobSync.prototype._processGlobStar=function(prefix,read,abs,remain,index,inGlobStar){var entries=this._readdir(abs,inGlobStar);if(!entries)return;var remainWithoutGlobStar=remain.slice(1);var gspref=prefix?[prefix]:[];var noGlobStar=gspref.concat(remainWithoutGlobStar);this._process(noGlobStar,index,false);var len=entries.length;var isSym=this.symlinks[abs];if(isSym&&inGlobStar)return;for(var i=0;i<len;i++){var e=entries[i];if(e.charAt(0)==="."&&!this.dot)continue;var instead=gspref.concat(entries[i],remainWithoutGlobStar);this._process(instead,index,true);var below=gspref.concat(entries[i],remain);this._process(below,index,true)}};GlobSync.prototype._processSimple=function(prefix,index){var exists=this._stat(prefix);if(!this.matches[index])this.matches[index]=Object.create(null);if(!exists)return;if(prefix&&isAbsolute(prefix)&&!this.nomount){var trail=/[\/\\]$/.test(prefix);if(prefix.charAt(0)==="/"){prefix=path.join(this.root,prefix)}else{prefix=path.resolve(this.root,prefix);if(trail)prefix+="/"}}if(process.platform==="win32")prefix=prefix.replace(/\\/g,"/");this._emitMatch(index,prefix)};GlobSync.prototype._stat=function(f){var abs=this._makeAbs(f);var needDir=f.slice(-1)==="/";if(f.length>this.maxLength)return false;if(!this.stat&&ownProp(this.cache,abs)){var c=this.cache[abs];if(Array.isArray(c))c="DIR";if(!needDir||c==="DIR")return c;if(needDir&&c==="FILE")return false}var stat=this.statCache[abs];if(!stat){var lstat;try{lstat=this.fs.lstatSync(abs)}catch(er){if(er&&(er.code==="ENOENT"||er.code==="ENOTDIR")){this.statCache[abs]=false;return false}}if(lstat&&lstat.isSymbolicLink()){try{stat=this.fs.statSync(abs)}catch(er){stat=lstat}}else{stat=lstat}}this.statCache[abs]=stat;var c=true;if(stat)c=stat.isDirectory()?"DIR":"FILE";this.cache[abs]=this.cache[abs]||c;if(needDir&&c==="FILE")return false;return c};GlobSync.prototype._mark=function(p){return common.mark(this,p)};GlobSync.prototype._makeAbs=function(f){return common.makeAbs(this,f)};return sync}var wrappy_1;var hasRequiredWrappy;function requireWrappy(){if(hasRequiredWrappy)return wrappy_1;hasRequiredWrappy=1;wrappy_1=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=="function")throw new TypeError("need wrapper function");Object.keys(fn).forEach((function(k){wrapper[k]=fn[k]}));return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i]}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==="function"&&ret!==cb){Object.keys(cb).forEach((function(k){ret[k]=cb[k]}))}return ret}}return wrappy_1}var once={exports:{}};var hasRequiredOnce;function requireOnce(){if(hasRequiredOnce)return once.exports;hasRequiredOnce=1;var wrappy=requireWrappy();once.exports=wrappy(once$1);once.exports.strict=wrappy(onceStrict);once$1.proto=once$1((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once$1(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once$1(fn){var f=function(){if(f.called)return f.value;f.called=true;return f.value=fn.apply(this,arguments)};f.called=false;return f}function onceStrict(fn){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=fn.apply(this,arguments)};var name=fn.name||"Function wrapped with `once`";f.onceError=name+" shouldn't be called more than once";f.called=false;return f}return once.exports}var inflight_1;var hasRequiredInflight;function requireInflight(){if(hasRequiredInflight)return inflight_1;hasRequiredInflight=1;var wrappy=requireWrappy();var reqs=Object.create(null);var once=requireOnce();inflight_1=wrappy(inflight);function inflight(key,cb){if(reqs[key]){reqs[key].push(cb);return null}else{reqs[key]=[cb];return makeres(key)}}function makeres(key){return once((function RES(){var cbs=reqs[key];var len=cbs.length;var args=slice(arguments);try{for(var i=0;i<len;i++){cbs[i].apply(null,args)}}finally{if(cbs.length>len){cbs.splice(0,len);process.nextTick((function(){RES.apply(null,args)}))}else{delete reqs[key]}}}))}function slice(args){var length=args.length;var array=[];for(var i=0;i<length;i++)array[i]=args[i];return array}return inflight_1}var glob_1;var hasRequiredGlob;function requireGlob(){if(hasRequiredGlob)return glob_1;hasRequiredGlob=1;glob_1=glob;var rp=requireFs_realpath();var minimatch=requireMinimatch();minimatch.Minimatch;var inherits=requireInherits();var EE=require$$2$1.EventEmitter;var path=require$$0$6;var assert=require$$5;var isAbsolute=require$$0$6.isAbsolute;var globSync=requireSync();var common=requireCommon();var setopts=common.setopts;var ownProp=common.ownProp;var inflight=requireInflight();var childrenIgnored=common.childrenIgnored;var isIgnored=common.isIgnored;var once=requireOnce();function glob(pattern,options,cb){if(typeof options==="function")cb=options,options={};if(!options)options={};if(options.sync){if(cb)throw new TypeError("callback provided to sync glob");return globSync(pattern,options)}return new Glob(pattern,options,cb)}glob.sync=globSync;var GlobSync=glob.GlobSync=globSync.GlobSync;glob.glob=glob;function extend(origin,add){if(add===null||typeof add!=="object"){return origin}var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin}glob.hasMagic=function(pattern,options_){var options=extend({},options_);options.noprocess=true;var g=new Glob(pattern,options);var set=g.minimatch.set;if(!pattern)return false;if(set.length>1)return true;for(var j=0;j<set[0].length;j++){if(typeof set[0][j]!=="string")return true}return false};glob.Glob=Glob;inherits(Glob,EE);function Glob(pattern,options,cb){if(typeof options==="function"){cb=options;options=null}if(options&&options.sync){if(cb)throw new TypeError("callback provided to sync glob");return new GlobSync(pattern,options)}if(!(this instanceof Glob))return new Glob(pattern,options,cb);setopts(this,pattern,options);this._didRealPath=false;var n=this.minimatch.set.length;this.matches=new Array(n);if(typeof cb==="function"){cb=once(cb);this.on("error",cb);this.on("end",(function(matches){cb(null,matches)}))}var self=this;this._processing=0;this._emitQueue=[];this._processQueue=[];this.paused=false;if(this.noprocess)return this;if(n===0)return done();var sync=true;for(var i=0;i<n;i++){this._process(this.minimatch.set[i],i,false,done)}sync=false;function done(){--self._processing;if(self._processing<=0){if(sync){process.nextTick((function(){self._finish()}))}else{self._finish()}}}}Glob.prototype._finish=function(){assert(this instanceof Glob);if(this.aborted)return;if(this.realpath&&!this._didRealpath)return this._realpath();common.finish(this);this.emit("end",this.found)};Glob.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=true;var n=this.matches.length;if(n===0)return this._finish();var self=this;for(var i=0;i<this.matches.length;i++)this._realpathSet(i,next);function next(){if(--n===0)self._finish()}};Glob.prototype._realpathSet=function(index,cb){var matchset=this.matches[index];if(!matchset)return cb();var found=Object.keys(matchset);var self=this;var n=found.length;if(n===0)return cb();var set=this.matches[index]=Object.create(null);found.forEach((function(p,i){p=self._makeAbs(p);rp.realpath(p,self.realpathCache,(function(er,real){if(!er)set[real]=true;else if(er.syscall==="stat")set[p]=true;else self.emit("error",er);if(--n===0){self.matches[index]=set;cb()}}))}))};Glob.prototype._mark=function(p){return common.mark(this,p)};Glob.prototype._makeAbs=function(f){return common.makeAbs(this,f)};Glob.prototype.abort=function(){this.aborted=true;this.emit("abort")};Glob.prototype.pause=function(){if(!this.paused){this.paused=true;this.emit("pause")}};Glob.prototype.resume=function(){if(this.paused){this.emit("resume");this.paused=false;if(this._emitQueue.length){var eq=this._emitQueue.slice(0);this._emitQueue.length=0;for(var i=0;i<eq.length;i++){var e=eq[i];this._emitMatch(e[0],e[1])}}if(this._processQueue.length){var pq=this._processQueue.slice(0);this._processQueue.length=0;for(var i=0;i<pq.length;i++){var p=pq[i];this._processing--;this._process(p[0],p[1],p[2],p[3])}}}};Glob.prototype._process=function(pattern,index,inGlobStar,cb){assert(this instanceof Glob);assert(typeof cb==="function");if(this.aborted)return;this._processing++;if(this.paused){this._processQueue.push([pattern,index,inGlobStar,cb]);return}var n=0;while(typeof pattern[n]==="string"){n++}var prefix;switch(n){case pattern.length:this._processSimple(pattern.join("/"),index,cb);return;case 0:prefix=null;break;default:prefix=pattern.slice(0,n).join("/");break}var remain=pattern.slice(n);var read;if(prefix===null)read=".";else if(isAbsolute(prefix)||isAbsolute(pattern.map((function(p){return typeof p==="string"?p:"[*]"})).join("/"))){if(!prefix||!isAbsolute(prefix))prefix="/"+prefix;read=prefix}else read=prefix;var abs=this._makeAbs(read);if(childrenIgnored(this,read))return cb();var isGlobStar=remain[0]===minimatch.GLOBSTAR;if(isGlobStar)this._processGlobStar(prefix,read,abs,remain,index,inGlobStar,cb);else this._processReaddir(prefix,read,abs,remain,index,inGlobStar,cb)};Glob.prototype._processReaddir=function(prefix,read,abs,remain,index,inGlobStar,cb){var self=this;this._readdir(abs,inGlobStar,(function(er,entries){return self._processReaddir2(prefix,read,abs,remain,index,inGlobStar,entries,cb)}))};Glob.prototype._processReaddir2=function(prefix,read,abs,remain,index,inGlobStar,entries,cb){if(!entries)return cb();var pn=remain[0];var negate=!!this.minimatch.negate;var rawGlob=pn._glob;var dotOk=this.dot||rawGlob.charAt(0)===".";var matchedEntries=[];for(var i=0;i<entries.length;i++){var e=entries[i];if(e.charAt(0)!=="."||dotOk){var m;if(negate&&!prefix){m=!e.match(pn)}else{m=e.match(pn)}if(m)matchedEntries.push(e)}}var len=matchedEntries.length;if(len===0)return cb();if(remain.length===1&&!this.mark&&!this.stat){if(!this.matches[index])this.matches[index]=Object.create(null);for(var i=0;i<len;i++){var e=matchedEntries[i];if(prefix){if(prefix!=="/")e=prefix+"/"+e;else e=prefix+e}if(e.charAt(0)==="/"&&!this.nomount){e=path.join(this.root,e)}this._emitMatch(index,e)}return cb()}remain.shift();for(var i=0;i<len;i++){var e=matchedEntries[i];if(prefix){if(prefix!=="/")e=prefix+"/"+e;else e=prefix+e}this._process([e].concat(remain),index,inGlobStar,cb)}cb()};Glob.prototype._emitMatch=function(index,e){if(this.aborted)return;if(isIgnored(this,e))return;if(this.paused){this._emitQueue.push([index,e]);return}var abs=isAbsolute(e)?e:this._makeAbs(e);if(this.mark)e=this._mark(e);if(this.absolute)e=abs;if(this.matches[index][e])return;if(this.nodir){var c=this.cache[abs];if(c==="DIR"||Array.isArray(c))return}this.matches[index][e]=true;var st=this.statCache[abs];if(st)this.emit("stat",e,st);this.emit("match",e)};Glob.prototype._readdirInGlobStar=function(abs,cb){if(this.aborted)return;if(this.follow)return this._readdir(abs,false,cb);var lstatkey="lstat\0"+abs;var self=this;var lstatcb=inflight(lstatkey,lstatcb_);if(lstatcb)self.fs.lstat(abs,lstatcb);function lstatcb_(er,lstat){if(er&&er.code==="ENOENT")return cb();var isSym=lstat&&lstat.isSymbolicLink();self.symlinks[abs]=isSym;if(!isSym&&lstat&&!lstat.isDirectory()){self.cache[abs]="FILE";cb()}else self._readdir(abs,false,cb)}};Glob.prototype._readdir=function(abs,inGlobStar,cb){if(this.aborted)return;cb=inflight("readdir\0"+abs+"\0"+inGlobStar,cb);if(!cb)return;if(inGlobStar&&!ownProp(this.symlinks,abs))return this._readdirInGlobStar(abs,cb);if(ownProp(this.cache,abs)){var c=this.cache[abs];if(!c||c==="FILE")return cb();if(Array.isArray(c))return cb(null,c)}var self=this;self.fs.readdir(abs,readdirCb(this,abs,cb))};function readdirCb(self,abs,cb){return function(er,entries){if(er)self._readdirError(abs,er,cb);else self._readdirEntries(abs,entries,cb)}}Glob.prototype._readdirEntries=function(abs,entries,cb){if(this.aborted)return;if(!this.mark&&!this.stat){for(var i=0;i<entries.length;i++){var e=entries[i];if(abs==="/")e=abs+e;else e=abs+"/"+e;this.cache[e]=true}}this.cache[abs]=entries;return cb(null,entries)};Glob.prototype._readdirError=function(f,er,cb){if(this.aborted)return;switch(er.code){case"ENOTSUP":case"ENOTDIR":var abs=this._makeAbs(f);this.cache[abs]="FILE";if(abs===this.cwdAbs){var error=new Error(er.code+" invalid cwd "+this.cwd);error.path=this.cwd;error.code=er.code;this.emit("error",error);this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(f)]=false;break;default:this.cache[this._makeAbs(f)]=false;if(this.strict){this.emit("error",er);this.abort()}if(!this.silent)console.error("glob error",er);break}return cb()};Glob.prototype._processGlobStar=function(prefix,read,abs,remain,index,inGlobStar,cb){var self=this;this._readdir(abs,inGlobStar,(function(er,entries){self._processGlobStar2(prefix,read,abs,remain,index,inGlobStar,entries,cb)}))};Glob.prototype._processGlobStar2=function(prefix,read,abs,remain,index,inGlobStar,entries,cb){if(!entries)return cb();var remainWithoutGlobStar=remain.slice(1);var gspref=prefix?[prefix]:[];var noGlobStar=gspref.concat(remainWithoutGlobStar);this._process(noGlobStar,index,false,cb);var isSym=this.symlinks[abs];var len=entries.length;if(isSym&&inGlobStar)return cb();for(var i=0;i<len;i++){var e=entries[i];if(e.charAt(0)==="."&&!this.dot)continue;var instead=gspref.concat(entries[i],remainWithoutGlobStar);this._process(instead,index,true,cb);var below=gspref.concat(entries[i],remain);this._process(below,index,true,cb)}cb()};Glob.prototype._processSimple=function(prefix,index,cb){var self=this;this._stat(prefix,(function(er,exists){self._processSimple2(prefix,index,er,exists,cb)}))};Glob.prototype._processSimple2=function(prefix,index,er,exists,cb){if(!this.matches[index])this.matches[index]=Object.create(null);if(!exists)return cb();if(prefix&&isAbsolute(prefix)&&!this.nomount){var trail=/[\/\\]$/.test(prefix);if(prefix.charAt(0)==="/"){prefix=path.join(this.root,prefix)}else{prefix=path.resolve(this.root,prefix);if(trail)prefix+="/"}}if(process.platform==="win32")prefix=prefix.replace(/\\/g,"/");this._emitMatch(index,prefix);cb()};Glob.prototype._stat=function(f,cb){var abs=this._makeAbs(f);var needDir=f.slice(-1)==="/";if(f.length>this.maxLength)return cb();if(!this.stat&&ownProp(this.cache,abs)){var c=this.cache[abs];if(Array.isArray(c))c="DIR";if(!needDir||c==="DIR")return cb(null,c);if(needDir&&c==="FILE")return cb()}var stat=this.statCache[abs];if(stat!==undefined){if(stat===false)return cb(null,stat);else{var type=stat.isDirectory()?"DIR":"FILE";if(needDir&&type==="FILE")return cb();else return cb(null,type,stat)}}var self=this;var statcb=inflight("stat\0"+abs,lstatcb_);if(statcb)self.fs.lstat(abs,statcb);function lstatcb_(er,lstat){if(lstat&&lstat.isSymbolicLink()){return self.fs.stat(abs,(function(er,stat){if(er)self._stat2(f,abs,null,lstat,cb);else self._stat2(f,abs,er,stat,cb)}))}else{self._stat2(f,abs,er,lstat,cb)}}};Glob.prototype._stat2=function(f,abs,er,stat,cb){if(er&&(er.code==="ENOENT"||er.code==="ENOTDIR")){this.statCache[abs]=false;return cb()}var needDir=f.slice(-1)==="/";this.statCache[abs]=stat;if(abs.slice(-1)==="/"&&stat&&!stat.isDirectory())return cb(null,false,stat);var c=true;if(stat)c=stat.isDirectory()?"DIR":"FILE";this.cache[abs]=this.cache[abs]||c;if(needDir&&c==="FILE")return cb();return cb(null,c,stat)};return glob_1}var lib$1;var hasRequiredLib$3;function requireLib$3(){if(hasRequiredLib$3)return lib$1;hasRequiredLib$3=1;const bundleWalk=requireLib$5();const BundleWalker=bundleWalk.BundleWalker;const ignoreWalk=requireLib$4();const IgnoreWalker=ignoreWalk.Walker;const rootBuiltinRules=Symbol("root-builtin-rules");const packageNecessaryRules=Symbol("package-necessary-rules");const path=require$$0$6;const normalizePackageBin=requireLib$6();const packageMustHaveFileNames="readme|copying|license|licence";const packageMustHaves=`@(${packageMustHaveFileNames}){,.*[^~$]}`;const packageMustHavesRE=new RegExp(`^(${packageMustHaveFileNames})(\\..*[^~$])?$`,"i");const fs=require$$0$2;const glob=requireGlob();const globify=pattern=>pattern.split("\\").join("/");const readOutOfTreeIgnoreFiles=(root,rel,result="")=>{for(const file of[".npmignore",".gitignore"]){try{const ignoreContent=fs.readFileSync(path.join(root,file),{encoding:"utf8"});result+=ignoreContent+"\n";break}catch(err){if(err.code!=="ENOENT"){throw err}}}if(!rel){return result}const firstRel=rel.split(path.sep)[0];const newRoot=path.join(root,firstRel);const newRel=path.relative(newRoot,path.join(root,rel));return readOutOfTreeIgnoreFiles(newRoot,newRel,result)};const pathHasPkg=input=>{if(!input.startsWith("node_modules/")){return false}const segments=input.slice("node_modules/".length).split("/",2);return segments[0].startsWith("@")?segments.length===2:true};const pkgFromPath=input=>{const segments=input.slice("node_modules/".length).split("/",2);return segments[0].startsWith("@")?segments.join("/"):segments[0]};const defaultRules=[".npmignore",".gitignore","**/.git","**/.svn","**/.hg","**/CVS","**/.git/**","**/.svn/**","**/.hg/**","**/CVS/**","/.lock-wscript","/.wafpickle-*","/build/config.gypi","npm-debug.log","**/.npmrc",".*.swp",".DS_Store","**/.DS_Store/**","._*","**/._*/**","*.orig","/package-lock.json","/yarn.lock","/pnpm-lock.yaml","/archived-packages/**"];const nameIsBadForWindows=file=>/\*/.test(file);class Walker extends IgnoreWalker{constructor(opt){opt=opt||{};opt.ignoreFiles=[rootBuiltinRules,"package.json",".npmignore",".gitignore",packageNecessaryRules];opt.includeEmpty=false;opt.path=opt.path||process.cwd();const followRe=/^(?:\/node_modules\/(?:@[^/]+\/[^/]+|[^/]+)\/)*\/node_modules(?:\/@[^/]+)?$/;const rootPath=opt.parent?opt.parent.root:opt.path;const followTestPath=opt.path.replace(/\\/g,"/").slice(rootPath.length);opt.follow=followRe.test(followTestPath);super(opt);if(this.isProject){this.bundled=opt.bundled||[];this.bundledScopes=Array.from(new Set(this.bundled.filter((f=>/^@/.test(f))).map((f=>f.split("/")[0]))));this.packageJsonCache=this.parent?this.parent.packageJsonCache:opt.packageJsonCache||new Map;let rules=defaultRules.join("\n")+"\n";if(opt.prefix&&opt.workspaces){const gPath=globify(opt.path);const gPrefix=globify(opt.prefix);const gWorkspaces=opt.workspaces.map((ws=>globify(ws)));if(gPath!==gPrefix&&gWorkspaces.includes(gPath)){const relpath=path.relative(opt.prefix,path.dirname(opt.path));rules+=readOutOfTreeIgnoreFiles(opt.prefix,relpath)}else if(gPath===gPrefix){rules+=opt.workspaces.map((ws=>globify(path.relative(opt.path,ws)))).join("\n")}}super.onReadIgnoreFile(rootBuiltinRules,rules,(_=>_))}else{this.bundled=[];this.bundledScopes=[];this.packageJsonCache=this.parent.packageJsonCache}}get isProject(){return!this.parent||this.parent.follow&&this.isSymbolicLink}onReaddir(entries){if(this.isProject){entries=entries.filter((e=>e!==".git"&&!(e==="node_modules"&&this.bundled.length===0)))}if(!this.isProject||!entries.includes("package.json")){return super.onReaddir(entries)}const ig=path.resolve(this.path,"package.json");if(this.packageJsonCache.has(ig)){const pkg=this.packageJsonCache.get(ig);if(!pkg||typeof pkg!=="object"){return this.readPackageJson(entries)}return this.getPackageFiles(entries,JSON.stringify(pkg))}this.readPackageJson(entries)}onReadPackageJson(entries,er,pkg){if(er){this.emit("error",er)}else{this.getPackageFiles(entries,pkg)}}mustHaveFilesFromPackage(pkg){const files=[];if(pkg.browser){files.push("/"+pkg.browser)}if(pkg.main){files.push("/"+pkg.main)}if(pkg.bin){for(const key in pkg.bin){files.push("/"+pkg.bin[key])}}files.push("/package.json","/npm-shrinkwrap.json","!/package-lock.json",packageMustHaves);return files}getPackageFiles(entries,pkg){try{pkg=normalizePackageBin(JSON.parse(pkg.toString()))}catch(er){return super.onReaddir(entries)}const ig=path.resolve(this.path,"package.json");this.packageJsonCache.set(ig,pkg);if(!Array.isArray(pkg.files)){return super.onReaddir(entries)}pkg.files.push(...this.mustHaveFilesFromPackage(pkg));if((pkg.bundleDependencies||pkg.bundledDependencies)&&entries.includes("node_modules")){pkg.files.push("node_modules")}const patterns=Array.from(new Set(pkg.files)).reduce(((set,pattern)=>{const excl=pattern.match(/^!+/);if(excl){pattern=pattern.slice(excl[0].length)}pattern=pattern.replace(/^\.?\/+/,"");const negate=excl&&excl[0].length%2===1;set.push({pattern:pattern,negate:negate});return set}),[]);let n=patterns.length;const set=new Set;const negates=new Set;const results=[];const then=(pattern,negate,er,fileList,i)=>{if(er){return this.emit("error",er)}results[i]={negate:negate,fileList:fileList};if(--n===0){processResults(results)}};const processResults=processed=>{for(const{negate:negate,fileList:fileList}of processed){if(negate){fileList.forEach((f=>{f=f.replace(/\/+$/,"");set.delete(f);negates.add(f)}))}else{fileList.forEach((f=>{f=f.replace(/\/+$/,"");set.add(f);negates.delete(f)}))}}const list=Array.from(set);pkg.files=list.concat(Array.from(negates).map((f=>"!"+f)));const rdResult=Array.from(new Set(list.map((f=>f.replace(/^\/+/,"")))));super.onReaddir(rdResult)};patterns.forEach((({pattern:pattern,negate:negate},i)=>this.globFiles(pattern,((er,res)=>then(pattern,negate,er,res,i)))))}filterEntry(entry,partial){const p=this.path.slice(this.root.length+1);const{isProject:isProject}=this;const pkg=isProject&&pathHasPkg(entry)?pkgFromPath(entry):null;const rootNM=isProject&&entry==="node_modules";const rootPJ=isProject&&entry==="package.json";return/^node_modules($|\/)/i.test(p)&&!this.isProject?this.parent.filterEntry(this.basename+"/"+entry,partial):pkg?this.bundled.indexOf(pkg)!==-1||this.bundledScopes.indexOf(pkg)!==-1:rootNM?!!this.bundled.length:rootPJ?true:packageMustHavesRE.test(entry)?true:isProject&&(entry==="npm-shrinkwrap.json"||entry==="package.json")?true:isProject&&entry==="package-lock.json"?false:super.filterEntry(entry,partial)}filterEntries(){if(this.ignoreRules[".npmignore"]){this.ignoreRules[".gitignore"]=null}this.filterEntries=super.filterEntries;super.filterEntries()}addIgnoreFile(file,then){const ig=path.resolve(this.path,file);if(file==="package.json"&&!this.isProject){then()}else if(this.packageJsonCache.has(ig)){this.onPackageJson(ig,this.packageJsonCache.get(ig),then)}else{super.addIgnoreFile(file,then)}}onPackageJson(ig,pkg,then){this.packageJsonCache.set(ig,pkg);if(Array.isArray(pkg.files)){super.onReadIgnoreFile("package.json",pkg.files.map((f=>"!"+f)).join("\n")+"\n",then)}else{const rules=this.mustHaveFilesFromPackage(pkg).map((f=>`!${f}`));const data=rules.join("\n")+"\n";super.onReadIgnoreFile(packageNecessaryRules,data,then)}}stat({entry:entry,file:file,dir:dir},then){if(nameIsBadForWindows(entry)){then()}else{super.stat({entry:entry,file:file,dir:dir},then)}}onstat({st:st,entry:entry,file:file,dir:dir,isSymbolicLink:isSymbolicLink},then){if(st.isSymbolicLink()){then()}else{super.onstat({st:st,entry:entry,file:file,dir:dir,isSymbolicLink:isSymbolicLink},then)}}onReadIgnoreFile(file,data,then){if(file==="package.json"){try{const ig=path.resolve(this.path,file);this.onPackageJson(ig,JSON.parse(data),then)}catch(er){then()}}else{super.onReadIgnoreFile(file,data,then)}}sort(a,b){const exta=path.extname(a).toLowerCase();const extb=path.extname(b).toLowerCase();const basea=path.basename(a).toLowerCase();const baseb=path.basename(b).toLowerCase();return exta.localeCompare(extb,"en")||basea.localeCompare(baseb,"en")||a.localeCompare(b,"en")}globFiles(pattern,cb){glob(globify(pattern),{dot:true,cwd:this.path,nocase:true},cb)}readPackageJson(entries){fs.readFile(this.path+"/package.json",((er,pkg)=>this.onReadPackageJson(entries,er,pkg)))}walker(entry,opt,then){new Walker(this.walkerOpt(entry,opt)).on("done",then).start()}}const walk=(options,callback)=>{options=options||{};const p=new Promise(((resolve,reject)=>{const bw=new BundleWalker(options);bw.on("done",(bundled=>{options.bundled=bundled;options.packageJsonCache=bw.packageJsonCache;new Walker(options).on("done",resolve).on("error",reject).start()}));bw.start()}));return callback?p.then((res=>callback(null,res)),callback):p};lib$1=walk;walk.Walker=Walker;return lib$1}var hasRequiredLib$2;function requireLib$2(){if(hasRequiredLib$2)return lib$b;hasRequiredLib$2=1;var __importDefault=lib$b&&lib$b.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(lib$b,"__esModule",{value:true});lib$b.fetchFromDir=lib$b.createDirectoryFetcher=void 0;const fs_1=require$$0$2;const path_1=__importDefault(require$$0$6);const logger_1=requireLib$g();const read_project_manifest_1=requireLib$7();const npm_packlist_1=__importDefault(requireLib$3());const directoryFetcherLogger=(0,logger_1.logger)("directory-fetcher");function createDirectoryFetcher(opts){const readFileStat=opts?.resolveSymlinks===true?realFileStat:fileStat;const fetchFromDir=opts?.includeOnlyPackageFiles?fetchPackageFilesFromDir:fetchAllFilesFromDir.bind(null,readFileStat);const directoryFetcher=(cafs,resolution,opts)=>{const dir=path_1.default.join(opts.lockfileDir,resolution.directory);return fetchFromDir(dir,opts)};return{directory:directoryFetcher}}lib$b.createDirectoryFetcher=createDirectoryFetcher;async function fetchFromDir(dir,opts){if(opts.includeOnlyPackageFiles){return fetchPackageFilesFromDir(dir,opts)}const readFileStat=opts?.resolveSymlinks===true?realFileStat:fileStat;return fetchAllFilesFromDir(readFileStat,dir,opts)}lib$b.fetchFromDir=fetchFromDir;async function fetchAllFilesFromDir(readFileStat,dir,opts){const filesIndex=await _fetchAllFilesFromDir(readFileStat,dir);if(opts.manifest){const manifest=await(0,read_project_manifest_1.safeReadProjectManifestOnly)(dir)??{};opts.manifest.resolve(manifest)}return{local:true,filesIndex:filesIndex,packageImportMethod:"hardlink"}}async function _fetchAllFilesFromDir(readFileStat,dir,relativeDir=""){const filesIndex={};const files=await fs_1.promises.readdir(dir);await Promise.all(files.filter((file=>file!=="node_modules")).map((async file=>{const{filePath:filePath,stat:stat}=await readFileStat(path_1.default.join(dir,file));if(!filePath)return;const relativeSubdir=`${relativeDir}${relativeDir?"/":""}${file}`;if(stat.isDirectory()){const subFilesIndex=await _fetchAllFilesFromDir(readFileStat,filePath,relativeSubdir);Object.assign(filesIndex,subFilesIndex)}else{filesIndex[relativeSubdir]=filePath}})));return filesIndex}async function realFileStat(filePath){let stat=await fs_1.promises.lstat(filePath);if(!stat.isSymbolicLink()){return{filePath:filePath,stat:stat}}try{filePath=await fs_1.promises.realpath(filePath);stat=await fs_1.promises.stat(filePath);return{filePath:filePath,stat:stat}}catch(err){if(err.code==="ENOENT"){directoryFetcherLogger.debug({brokenSymlink:filePath});return{filePath:null,stat:null}}throw err}}async function fileStat(filePath){try{return{filePath:filePath,stat:await fs_1.promises.stat(filePath)}}catch(err){if(err.code==="ENOENT"){directoryFetcherLogger.debug({brokenSymlink:filePath});return{filePath:null,stat:null}}throw err}}async function fetchPackageFilesFromDir(dir,opts){const files=await(0,npm_packlist_1.default)({path:dir});const filesIndex=Object.fromEntries(files.map((file=>[file,path_1.default.join(dir,file)])));if(opts.manifest){const manifest=await(0,read_project_manifest_1.safeReadProjectManifestOnly)(dir)??{};opts.manifest.resolve(manifest)}return{local:true,filesIndex:filesIndex,packageImportMethod:"hardlink"}}return lib$b}var lib={};var yoctoQueue;var hasRequiredYoctoQueue;function requireYoctoQueue(){if(hasRequiredYoctoQueue)return yoctoQueue;hasRequiredYoctoQueue=1;class Node{constructor(value){this.value=value;this.next=undefined}}class Queue{constructor(){this.clear()}enqueue(value){const node=new Node(value);if(this._head){this._tail.next=node;this._tail=node}else{this._head=node;this._tail=node}this._size++}dequeue(){const current=this._head;if(!current){return}this._head=this._head.next;this._size--;return current.value}clear(){this._head=undefined;this._tail=undefined;this._size=0}get size(){return this._size}*[Symbol.iterator](){let current=this._head;while(current){yield current.value;current=current.next}}}yoctoQueue=Queue;return yoctoQueue}var pLimit_1;var hasRequiredPLimit;function requirePLimit(){if(hasRequiredPLimit)return pLimit_1;hasRequiredPLimit=1;const Queue=requireYoctoQueue();const pLimit=concurrency=>{if(!((Number.isInteger(concurrency)||concurrency===Infinity)&&concurrency>0)){throw new TypeError("Expected `concurrency` to be a number from 1 and up")}const queue=new Queue;let activeCount=0;const next=()=>{activeCount--;if(queue.size>0){queue.dequeue()()}};const run=async(fn,resolve,...args)=>{activeCount++;const result=(async()=>fn(...args))();resolve(result);try{await result}catch{}next()};const enqueue=(fn,resolve,...args)=>{queue.enqueue(run.bind(null,fn,resolve,...args));(async()=>{await Promise.resolve();if(activeCount<concurrency&&queue.size>0){queue.dequeue()()}})()};const generator=(fn,...args)=>new Promise((resolve=>{enqueue(fn,resolve,...args)}));Object.defineProperties(generator,{activeCount:{get:()=>activeCount},pendingCount:{get:()=>queue.size},clearQueue:{value:()=>{queue.clear()}}});return generator};pLimit_1=pLimit;return pLimit_1}var hasRequiredLib$1;function requireLib$1(){if(hasRequiredLib$1)return lib;hasRequiredLib$1=1;Object.defineProperty(lib,"__esModule",{value:true});const pLimit=requirePLimit();lib.default=async(concurrency,groups)=>{const limitRun=pLimit(concurrency);for(const tasks of groups){await Promise.all(tasks.map((task=>limitRun(task))))}};return lib}var hasRequiredRunLifecycleHooksConcurrently;function requireRunLifecycleHooksConcurrently(){if(hasRequiredRunLifecycleHooksConcurrently)return runLifecycleHooksConcurrently;hasRequiredRunLifecycleHooksConcurrently=1;var __importDefault=runLifecycleHooksConcurrently&&runLifecycleHooksConcurrently.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(runLifecycleHooksConcurrently,"__esModule",{value:true});runLifecycleHooksConcurrently.runLifecycleHooksConcurrently=void 0;const fs_1=__importDefault(require$$0$2);const path_1=__importDefault(require$$0$6);const directory_fetcher_1=requireLib$2();const run_groups_1=__importDefault(requireLib$1());const runLifecycleHook_1=requireRunLifecycleHook();async function runLifecycleHooksConcurrently$1(stages,importers,childConcurrency,opts){const importersByBuildIndex=new Map;for(const importer of importers){if(!importersByBuildIndex.has(importer.buildIndex)){importersByBuildIndex.set(importer.buildIndex,[importer])}else{importersByBuildIndex.get(importer.buildIndex).push(importer)}}const sortedBuildIndexes=Array.from(importersByBuildIndex.keys()).sort();const groups=sortedBuildIndexes.map((buildIndex=>{const importers=importersByBuildIndex.get(buildIndex);return importers.map((({manifest:manifest,modulesDir:modulesDir,rootDir:rootDir,stages:importerStages,targetDirs:targetDirs})=>async()=>{const runLifecycleHookOpts={...opts,depPath:rootDir,pkgRoot:rootDir,rootModulesDir:modulesDir};let isBuilt=false;for(const stage of importerStages??stages){if(manifest.scripts==null||!manifest.scripts[stage])continue;await(0,runLifecycleHook_1.runLifecycleHook)(stage,manifest,runLifecycleHookOpts);isBuilt=true}if(targetDirs==null||targetDirs.length===0||!isBuilt)return;const filesResponse=await(0,directory_fetcher_1.fetchFromDir)(rootDir,{resolveSymlinks:opts.resolveSymlinksInInjectedDirs});await Promise.all(targetDirs.map((async targetDir=>{const targetModulesDir=path_1.default.join(targetDir,"node_modules");const nodeModulesIndex={};if(fs_1.default.existsSync(targetModulesDir)){await scanDir("node_modules",targetModulesDir,targetModulesDir,nodeModulesIndex)}return opts.storeController.importPackage(targetDir,{filesResponse:{fromStore:false,...filesResponse,filesIndex:{...filesResponse.filesIndex,...nodeModulesIndex}},force:false})})))}))}));await(0,run_groups_1.default)(childConcurrency,groups)}runLifecycleHooksConcurrently.runLifecycleHooksConcurrently=runLifecycleHooksConcurrently$1;async function scanDir(prefix,rootDir,currentDir,index){const files=await fs_1.default.promises.readdir(currentDir);await Promise.all(files.map((async file=>{const fullPath=path_1.default.join(currentDir,file);const stat=await fs_1.default.promises.stat(fullPath);if(stat.isDirectory()){return scanDir(prefix,rootDir,fullPath,index)}if(stat.isFile()){const relativePath=path_1.default.relative(rootDir,fullPath);index[path_1.default.join(prefix,relativePath)]=fullPath}})))}return runLifecycleHooksConcurrently}var hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib$h;hasRequiredLib=1;(function(exports){var __importDefault=lib$h&&lib$h.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:true});exports.runPostinstallHooks=exports.runLifecycleHooksConcurrently=exports.runLifecycleHook=exports.makeNodeRequireOption=void 0;const path_1=__importDefault(require$$0$6);const read_package_json_1=requireLib$h();const path_exists_1=__importDefault(requirePathExists());const runLifecycleHook_1=requireRunLifecycleHook();Object.defineProperty(exports,"runLifecycleHook",{enumerable:true,get:function(){return runLifecycleHook_1.runLifecycleHook}});const runLifecycleHooksConcurrently_1=requireRunLifecycleHooksConcurrently();Object.defineProperty(exports,"runLifecycleHooksConcurrently",{enumerable:true,get:function(){return runLifecycleHooksConcurrently_1.runLifecycleHooksConcurrently}});function makeNodeRequireOption(modulePath){let{NODE_OPTIONS:NODE_OPTIONS}=process.env;NODE_OPTIONS=`${NODE_OPTIONS??""} --require=${modulePath}`.trim();return{NODE_OPTIONS:NODE_OPTIONS}}exports.makeNodeRequireOption=makeNodeRequireOption;async function runPostinstallHooks(opts){const pkg=await(0,read_package_json_1.safeReadPackageJsonFromDir)(opts.pkgRoot);if(pkg==null)return false;if(pkg.scripts==null){pkg.scripts={}}if(!pkg.scripts.install){await checkBindingGyp(opts.pkgRoot,pkg.scripts)}if(pkg.scripts.preinstall){await(0,runLifecycleHook_1.runLifecycleHook)("preinstall",pkg,opts)}if(pkg.scripts.install){await(0,runLifecycleHook_1.runLifecycleHook)("install",pkg,opts)}if(pkg.scripts.postinstall){await(0,runLifecycleHook_1.runLifecycleHook)("postinstall",pkg,opts)}return pkg.scripts.preinstall!=null||pkg.scripts.install!=null||pkg.scripts.postinstall!=null}exports.runPostinstallHooks=runPostinstallHooks;async function checkBindingGyp(root,scripts){if(await(0,path_exists_1.default)(path_1.default.join(root,"binding.gyp"))){scripts.install="node-gyp rebuild"}}})(lib$h);return lib$h}var hasRequiredLifecycleHooks;function requireLifecycleHooks(){if(hasRequiredLifecycleHooks)return lifecycleHooks$1;hasRequiredLifecycleHooks=1;const fs=require$$0$2;const exists=requirePathExists();const os=require$$0$5;const path=require$$0$6;const{safeReadPackageJsonFromDir:safeReadPackageJsonFromDir}=requireLib$h();const{runLifecycleHook:runLifecycleHook}=requireLib();async function mkdirp(p){if(p&&!fs.existsSync(p)){await mkdirp(path.dirname(p));await fs.promises.mkdir(p)}}function normalizeBinPath(p){let result=p.replace(/\\/g,"/");if(result.startsWith("./")){result=result.substring(2)}return result}async function makeBins(nodeModulesPath,scope,segmentsUp){const packages=await fs.promises.readdir(path.join(nodeModulesPath,scope));for(const _package of packages){if(!scope&&_package.startsWith("@")){await makeBins(nodeModulesPath,_package,segmentsUp);continue}const packageName=path.join(scope,_package);const packageJsonPath=path.join(nodeModulesPath,packageName,"package.json");if(fs.existsSync(packageJsonPath)){let packageJsonStr=await fs.promises.readFile(packageJsonPath);let packageJson;try{packageJson=JSON.parse(packageJsonStr)}catch(e){throw new Error(`Error parsing ${packageName}/package.json: ${e}\n\n""""\n${packageJsonStr}\n""""`)}if(packageJson.bin){await mkdirp(path.join(nodeModulesPath,".bin"));let bin=packageJson.bin;if(typeof bin=="string"){bin={[_package]:bin}}for(const binName of Object.keys(bin)){if(binName.includes("/")||binName.includes("\\")){continue}const binPath=normalizeBinPath(bin[binName]);let binEntryPath=path.join(nodeModulesPath,".bin",binName);let binExec;if(isWindows()){binEntryPath+=".cmd";binExec=`node "${path.join(...segmentsUp,packageName,binPath)}" "%*"`}else{binExec=`#!/usr/bin/env bash\nexec node "${path.join(...segmentsUp,packageName,binPath)}" "$@"`}await fs.promises.writeFile(binEntryPath,binExec);await fs.promises.chmod(binEntryPath,"755")}}}}}async function useNodeGyp(root){return await exists(path.join(root,"binding.gyp"))}async function checkBindingGyp(root,scripts){if(await useNodeGyp(root)){scripts["install"]="node-gyp rebuild"}}async function runLifecycleHooks(opts,hooks){const pkg=await safeReadPackageJsonFromDir(opts.pkgRoot);if(pkg==null){return}if(pkg.scripts==null){pkg.scripts={}}const runInstallScripts=hooks.includes("preinstall")||hooks.includes("install")||hooks.includes("postinstall");if(runInstallScripts&&!pkg.scripts.install){await checkBindingGyp(opts.pkgRoot,pkg.scripts)}for(const hook of hooks){if(pkg.scripts[hook]){await runLifecycleHook(hook,pkg,opts)}}}async function cleanupNodeGypIndeterminism(root){if(await useNodeGyp(root)){try{await fs.promises.rm(path.join(root,"build","Makefile"))}catch(e){}}}function isWindows(){return os.platform()==="win32"}async function main(args){if(args.length<3){console.error("Usage: node lifecycle-hooks.js [packageName] [packageDir] [outputDir] [--arch=...]? [--platform=...]?");process.exit(1)}const packageName=args[0];const packageDir=args[1];const outputDir=args[2];let platform=null;let arch=null;let libc=null;for(let i=3;i<args.length;++i){let found=args[i].match(/--arch=(.*)/);if(found){arch=found[1]}found=args[i].match(/--platform=(.*)/);if(found){platform=found[1]}found=args[i].match(/--libc=(.*)/);if(found){libc=found[1]}}await copyPackageContents(packageDir,outputDir);const segmentsUp=Array(packageName.split("/").length).fill("..");const nodeModulesPath=path.resolve(path.join(outputDir,...segmentsUp));await makeBins(nodeModulesPath,"",segmentsUp);let inherited_env={};const npm_config_prefix="npm_config_";const config_regexp=new RegExp("^"+npm_config_prefix,"i");for(let e in process.env){if(e.match(config_regexp)){inherited_env[e.substring(npm_config_prefix.length)]=process.env[e]}}const opts={pkgRoot:path.resolve(outputDir),rawConfig:Object.assign({},{stdio:"inherit",platform:platform,target_platform:platform,arch:arch,target_arch:arch,libc:libc,target_libc:libc},inherited_env),silent:false,stdio:"inherit",rootModulesDir:nodeModulesPath,unsafePerm:true};const rulesJsJson=JSON.parse(await fs.promises.readFile(path.join(packageDir,"aspect_rules_js_metadata.json")));if(rulesJsJson.lifecycle_hooks){await runLifecycleHooks(opts,rulesJsJson.lifecycle_hooks.split(","))}if(rulesJsJson.scripts?.custom_postinstall){await runLifecycleHook("custom_postinstall",rulesJsJson,opts)}await cleanupNodeGypIndeterminism(opts.pkgRoot)}async function copyPackageContents(packageDir,destDir){const contents=await fs.promises.readdir(packageDir);await Promise.all(contents.map((file=>copyRecursive(path.join(packageDir,file),path.join(destDir,file)))))}async function copyRecursive(src,dest){const stats=await fs.promises.stat(src);if(stats.isDirectory()){await mkdirp(dest);const contents=await fs.promises.readdir(src);await Promise.all(contents.map((file=>copyRecursive(path.join(src,file),path.join(dest,file)))))}else{await fs.promises.copyFile(src,dest)}}(async()=>{try{await main(process.argv.slice(2))}catch(e){if(e.code==="ELIFECYCLE"&&!!e.pkgid&&!!e.stage&&!!e.script){console.log("===============================================================");console.log(`Failure while running lifecycle hook for package '${e.pkgid}':\n`);console.log(` Script: '${e.stage}'`);console.log(` Command: \`${e.script}\``);console.log(`\nStack trace:\n`);console.log(e.stack.replace(/^.*?\n/,""));console.log("===============================================================")}else{console.log(e)}process.exit(1)}})();return lifecycleHooks$1}var lifecycleHooksExports=requireLifecycleHooks();var lifecycleHooks=getDefaultExportFromCjs(lifecycleHooksExports);module.exports=lifecycleHooks; |