glob.js 35.2 KB
module.exports=(()=>{var t={417:t=>{"use strict";t.exports=balanced;function balanced(t,r,e){if(t instanceof RegExp)t=maybeMatch(t,e);if(r instanceof RegExp)r=maybeMatch(r,e);var i=range(t,r,e);return i&&{start:i[0],end:i[1],pre:e.slice(0,i[0]),body:e.slice(i[0]+t.length,i[1]),post:e.slice(i[1]+r.length)}}function maybeMatch(t,r){var e=r.match(t);return e?e[0]:null}balanced.range=range;function range(t,r,e){var i,n,a,s,o;var c=e.indexOf(t);var h=e.indexOf(r,c+1);var u=c;if(c>=0&&h>0){i=[];a=e.length;while(u>=0&&!o){if(u==c){i.push(u);c=e.indexOf(t,u+1)}else if(i.length==1){o=[i.pop(),h]}else{n=i.pop();if(n<a){a=n;s=h}h=e.indexOf(r,u+1)}u=c<h&&c>=0?c:h}if(i.length){o=[a,s]}}return o}},717:(t,r,e)=>{var i=e(891);var n=e(417);t.exports=expandTop;var a="\0SLASH"+Math.random()+"\0";var s="\0OPEN"+Math.random()+"\0";var o="\0CLOSE"+Math.random()+"\0";var c="\0COMMA"+Math.random()+"\0";var h="\0PERIOD"+Math.random()+"\0";function numeric(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function escapeBraces(t){return t.split("\\\\").join(a).split("\\{").join(s).split("\\}").join(o).split("\\,").join(c).split("\\.").join(h)}function unescapeBraces(t){return t.split(a).join("\\").split(s).join("{").split(o).join("}").split(c).join(",").split(h).join(".")}function parseCommaParts(t){if(!t)return[""];var r=[];var e=n("{","}",t);if(!e)return t.split(",");var i=e.pre;var a=e.body;var s=e.post;var o=i.split(",");o[o.length-1]+="{"+a+"}";var c=parseCommaParts(s);if(s.length){o[o.length-1]+=c.shift();o.push.apply(o,c)}r.push.apply(r,o);return r}function expandTop(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return expand(escapeBraces(t),true).map(unescapeBraces)}function identity(t){return t}function embrace(t){return"{"+t+"}"}function isPadded(t){return/^-?0\d/.test(t)}function lte(t,r){return t<=r}function gte(t,r){return t>=r}function expand(t,r){var e=[];var a=n("{","}",t);if(!a||/\$$/.test(a.pre))return[t];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body);var c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body);var h=s||c;var u=a.body.indexOf(",")>=0;if(!h&&!u){if(a.post.match(/,.*\}/)){t=a.pre+"{"+a.body+o+a.post;return expand(t)}return[t]}var l;if(h){l=a.body.split(/\.\./)}else{l=parseCommaParts(a.body);if(l.length===1){l=expand(l[0],false).map(embrace);if(l.length===1){var f=a.post.length?expand(a.post,false):[""];return f.map(function(t){return a.pre+l[0]+t})}}}var p=a.pre;var f=a.post.length?expand(a.post,false):[""];var v;if(h){var m=numeric(l[0]);var d=numeric(l[1]);var g=Math.max(l[0].length,l[1].length);var y=l.length==3?Math.abs(numeric(l[2])):1;var b=lte;var _=d<m;if(_){y*=-1;b=gte}var w=l.some(isPadded);v=[];for(var k=m;b(k,d);k+=y){var S;if(c){S=String.fromCharCode(k);if(S==="\\")S=""}else{S=String(k);if(w){var E=g-S.length;if(E>0){var O=new Array(E+1).join("0");if(k<0)S="-"+O+S.slice(1);else S=O+S}}}v.push(S)}}else{v=i(l,function(t){return expand(t,false)})}for(var A=0;A<v.length;A++){for(var G=0;G<f.length;G++){var j=p+v[A]+f[G];if(!r||h||j)e.push(j)}}return e}},891:t=>{t.exports=function(t,e){var i=[];for(var n=0;n<t.length;n++){var a=e(t[n],n);if(r(a))i.push.apply(i,a);else i.push(a)}return i};var r=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"}},863:(t,r,e)=>{t.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var i=e(747);var n=i.realpath;var a=i.realpathSync;var s=process.version;var o=/^v[0-5]\./.test(s);var c=e(734);function newError(t){return t&&t.syscall==="realpath"&&(t.code==="ELOOP"||t.code==="ENOMEM"||t.code==="ENAMETOOLONG")}function realpath(t,r,e){if(o){return n(t,r,e)}if(typeof r==="function"){e=r;r=null}n(t,r,function(i,n){if(newError(i)){c.realpath(t,r,e)}else{e(i,n)}})}function realpathSync(t,r){if(o){return a(t,r)}try{return a(t,r)}catch(e){if(newError(e)){return c.realpathSync(t,r)}else{throw e}}}function monkeypatch(){i.realpath=realpath;i.realpathSync=realpathSync}function unmonkeypatch(){i.realpath=n;i.realpathSync=a}},734:(t,r,e)=>{var i=e(622);var n=process.platform==="win32";var a=e(747);var s=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var t;if(s){var r=new Error;t=debugCallback}else t=missingCallback;return t;function debugCallback(t){if(t){r.message=t.message;t=r;missingCallback(t)}}function missingCallback(t){if(t){if(process.throwDeprecation)throw t;else if(!process.noDeprecation){var r="fs: missing callback "+(t.stack||t.message);if(process.traceDeprecation)console.trace(r);else console.error(r)}}}}function maybeCallback(t){return typeof t==="function"?t:rethrow()}var o=i.normalize;if(n){var c=/(.*?)(?:[\/\\]+|$)/g}else{var c=/(.*?)(?:[\/]+|$)/g}if(n){var h=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{var h=/^[\/]*/}r.realpathSync=function realpathSync(t,r){t=i.resolve(t);if(r&&Object.prototype.hasOwnProperty.call(r,t)){return r[t]}var e=t,s={},o={};var u;var l;var f;var p;start();function start(){var r=h.exec(t);u=r[0].length;l=r[0];f=r[0];p="";if(n&&!o[f]){a.lstatSync(f);o[f]=true}}while(u<t.length){c.lastIndex=u;var v=c.exec(t);p=l;l+=v[0];f=p+v[1];u=c.lastIndex;if(o[f]||r&&r[f]===f){continue}var m;if(r&&Object.prototype.hasOwnProperty.call(r,f)){m=r[f]}else{var d=a.lstatSync(f);if(!d.isSymbolicLink()){o[f]=true;if(r)r[f]=f;continue}var g=null;if(!n){var y=d.dev.toString(32)+":"+d.ino.toString(32);if(s.hasOwnProperty(y)){g=s[y]}}if(g===null){a.statSync(f);g=a.readlinkSync(f)}m=i.resolve(p,g);if(r)r[f]=m;if(!n)s[y]=g}t=i.resolve(m,t.slice(u));start()}if(r)r[e]=t;return t};r.realpath=function realpath(t,r,e){if(typeof e!=="function"){e=maybeCallback(r);r=null}t=i.resolve(t);if(r&&Object.prototype.hasOwnProperty.call(r,t)){return process.nextTick(e.bind(null,null,r[t]))}var s=t,o={},u={};var l;var f;var p;var v;start();function start(){var r=h.exec(t);l=r[0].length;f=r[0];p=r[0];v="";if(n&&!u[p]){a.lstat(p,function(t){if(t)return e(t);u[p]=true;LOOP()})}else{process.nextTick(LOOP)}}function LOOP(){if(l>=t.length){if(r)r[s]=t;return e(null,t)}c.lastIndex=l;var i=c.exec(t);v=f;f+=i[0];p=v+i[1];l=c.lastIndex;if(u[p]||r&&r[p]===p){return process.nextTick(LOOP)}if(r&&Object.prototype.hasOwnProperty.call(r,p)){return gotResolvedLink(r[p])}return a.lstat(p,gotStat)}function gotStat(t,i){if(t)return e(t);if(!i.isSymbolicLink()){u[p]=true;if(r)r[p]=p;return process.nextTick(LOOP)}if(!n){var s=i.dev.toString(32)+":"+i.ino.toString(32);if(o.hasOwnProperty(s)){return gotTarget(null,o[s],p)}}a.stat(p,function(t){if(t)return e(t);a.readlink(p,function(t,r){if(!n)o[s]=r;gotTarget(t,r)})})}function gotTarget(t,n,a){if(t)return e(t);var s=i.resolve(v,n);if(r)r[a]=s;gotResolvedLink(s)}function gotResolvedLink(r){t=i.resolve(r,t.slice(l));start()}}},625:(t,r,e)=>{r.alphasort=alphasort;r.alphasorti=alphasorti;r.setopts=setopts;r.ownProp=ownProp;r.makeAbs=makeAbs;r.finish=finish;r.mark=mark;r.isIgnored=isIgnored;r.childrenIgnored=childrenIgnored;function ownProp(t,r){return Object.prototype.hasOwnProperty.call(t,r)}var i=e(622);var n=e(973);var a=e(714);var s=n.Minimatch;function alphasorti(t,r){return t.toLowerCase().localeCompare(r.toLowerCase())}function alphasort(t,r){return t.localeCompare(r)}function setupIgnores(t,r){t.ignore=r.ignore||[];if(!Array.isArray(t.ignore))t.ignore=[t.ignore];if(t.ignore.length){t.ignore=t.ignore.map(ignoreMap)}}function ignoreMap(t){var r=null;if(t.slice(-3)==="/**"){var e=t.replace(/(\/\*\*)+$/,"");r=new s(e,{dot:true})}return{matcher:new s(t,{dot:true}),gmatcher:r}}function setopts(t,r,e){if(!e)e={};if(e.matchBase&&-1===r.indexOf("/")){if(e.noglobstar){throw new Error("base matching requires globstar")}r="**/"+r}t.silent=!!e.silent;t.pattern=r;t.strict=e.strict!==false;t.realpath=!!e.realpath;t.realpathCache=e.realpathCache||Object.create(null);t.follow=!!e.follow;t.dot=!!e.dot;t.mark=!!e.mark;t.nodir=!!e.nodir;if(t.nodir)t.mark=true;t.sync=!!e.sync;t.nounique=!!e.nounique;t.nonull=!!e.nonull;t.nosort=!!e.nosort;t.nocase=!!e.nocase;t.stat=!!e.stat;t.noprocess=!!e.noprocess;t.absolute=!!e.absolute;t.maxLength=e.maxLength||Infinity;t.cache=e.cache||Object.create(null);t.statCache=e.statCache||Object.create(null);t.symlinks=e.symlinks||Object.create(null);setupIgnores(t,e);t.changedCwd=false;var n=process.cwd();if(!ownProp(e,"cwd"))t.cwd=n;else{t.cwd=i.resolve(e.cwd);t.changedCwd=t.cwd!==n}t.root=e.root||i.resolve(t.cwd,"/");t.root=i.resolve(t.root);if(process.platform==="win32")t.root=t.root.replace(/\\/g,"/");t.cwdAbs=a(t.cwd)?t.cwd:makeAbs(t,t.cwd);if(process.platform==="win32")t.cwdAbs=t.cwdAbs.replace(/\\/g,"/");t.nomount=!!e.nomount;e.nonegate=true;e.nocomment=true;t.minimatch=new s(r,e);t.options=t.minimatch.options}function finish(t){var r=t.nounique;var e=r?[]:Object.create(null);for(var i=0,n=t.matches.length;i<n;i++){var a=t.matches[i];if(!a||Object.keys(a).length===0){if(t.nonull){var s=t.minimatch.globSet[i];if(r)e.push(s);else e[s]=true}}else{var o=Object.keys(a);if(r)e.push.apply(e,o);else o.forEach(function(t){e[t]=true})}}if(!r)e=Object.keys(e);if(!t.nosort)e=e.sort(t.nocase?alphasorti:alphasort);if(t.mark){for(var i=0;i<e.length;i++){e[i]=t._mark(e[i])}if(t.nodir){e=e.filter(function(r){var e=!/\/$/.test(r);var i=t.cache[r]||t.cache[makeAbs(t,r)];if(e&&i)e=i!=="DIR"&&!Array.isArray(i);return e})}}if(t.ignore.length)e=e.filter(function(r){return!isIgnored(t,r)});t.found=e}function mark(t,r){var e=makeAbs(t,r);var i=t.cache[e];var n=r;if(i){var a=i==="DIR"||Array.isArray(i);var s=r.slice(-1)==="/";if(a&&!s)n+="/";else if(!a&&s)n=n.slice(0,-1);if(n!==r){var o=makeAbs(t,n);t.statCache[o]=t.statCache[e];t.cache[o]=t.cache[e]}}return n}function makeAbs(t,r){var e=r;if(r.charAt(0)==="/"){e=i.join(t.root,r)}else if(a(r)||r===""){e=r}else if(t.changedCwd){e=i.resolve(t.cwd,r)}else{e=i.resolve(r)}if(process.platform==="win32")e=e.replace(/\\/g,"/");return e}function isIgnored(t,r){if(!t.ignore.length)return false;return t.ignore.some(function(t){return t.matcher.match(r)||!!(t.gmatcher&&t.gmatcher.match(r))})}function childrenIgnored(t,r){if(!t.ignore.length)return false;return t.ignore.some(function(t){return!!(t.gmatcher&&t.gmatcher.match(r))})}},957:(t,r,e)=>{t.exports=glob;var i=e(747);var n=e(863);var a=e(973);var s=a.Minimatch;var o=e(124);var c=e(614).EventEmitter;var h=e(622);var u=e(357);var l=e(714);var f=e(10);var p=e(625);var v=p.alphasort;var m=p.alphasorti;var d=p.setopts;var g=p.ownProp;var y=e(492);var b=e(669);var _=p.childrenIgnored;var w=p.isIgnored;var k=e(223);function glob(t,r,e){if(typeof r==="function")e=r,r={};if(!r)r={};if(r.sync){if(e)throw new TypeError("callback provided to sync glob");return f(t,r)}return new Glob(t,r,e)}glob.sync=f;var S=glob.GlobSync=f.GlobSync;glob.glob=glob;function extend(t,r){if(r===null||typeof r!=="object"){return t}var e=Object.keys(r);var i=e.length;while(i--){t[e[i]]=r[e[i]]}return t}glob.hasMagic=function(t,r){var e=extend({},r);e.noprocess=true;var i=new Glob(t,e);var n=i.minimatch.set;if(!t)return false;if(n.length>1)return true;for(var a=0;a<n[0].length;a++){if(typeof n[0][a]!=="string")return true}return false};glob.Glob=Glob;o(Glob,c);function Glob(t,r,e){if(typeof r==="function"){e=r;r=null}if(r&&r.sync){if(e)throw new TypeError("callback provided to sync glob");return new S(t,r)}if(!(this instanceof Glob))return new Glob(t,r,e);d(this,t,r);this._didRealPath=false;var i=this.minimatch.set.length;this.matches=new Array(i);if(typeof e==="function"){e=k(e);this.on("error",e);this.on("end",function(t){e(null,t)})}var n=this;this._processing=0;this._emitQueue=[];this._processQueue=[];this.paused=false;if(this.noprocess)return this;if(i===0)return done();var a=true;for(var s=0;s<i;s++){this._process(this.minimatch.set[s],s,false,done)}a=false;function done(){--n._processing;if(n._processing<=0){if(a){process.nextTick(function(){n._finish()})}else{n._finish()}}}}Glob.prototype._finish=function(){u(this instanceof Glob);if(this.aborted)return;if(this.realpath&&!this._didRealpath)return this._realpath();p.finish(this);this.emit("end",this.found)};Glob.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=true;var t=this.matches.length;if(t===0)return this._finish();var r=this;for(var e=0;e<this.matches.length;e++)this._realpathSet(e,next);function next(){if(--t===0)r._finish()}};Glob.prototype._realpathSet=function(t,r){var e=this.matches[t];if(!e)return r();var i=Object.keys(e);var a=this;var s=i.length;if(s===0)return r();var o=this.matches[t]=Object.create(null);i.forEach(function(e,i){e=a._makeAbs(e);n.realpath(e,a.realpathCache,function(i,n){if(!i)o[n]=true;else if(i.syscall==="stat")o[e]=true;else a.emit("error",i);if(--s===0){a.matches[t]=o;r()}})})};Glob.prototype._mark=function(t){return p.mark(this,t)};Glob.prototype._makeAbs=function(t){return p.makeAbs(this,t)};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 t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var r=0;r<t.length;r++){var e=t[r];this._emitMatch(e[0],e[1])}}if(this._processQueue.length){var i=this._processQueue.slice(0);this._processQueue.length=0;for(var r=0;r<i.length;r++){var n=i[r];this._processing--;this._process(n[0],n[1],n[2],n[3])}}}};Glob.prototype._process=function(t,r,e,i){u(this instanceof Glob);u(typeof i==="function");if(this.aborted)return;this._processing++;if(this.paused){this._processQueue.push([t,r,e,i]);return}var n=0;while(typeof t[n]==="string"){n++}var s;switch(n){case t.length:this._processSimple(t.join("/"),r,i);return;case 0:s=null;break;default:s=t.slice(0,n).join("/");break}var o=t.slice(n);var c;if(s===null)c=".";else if(l(s)||l(t.join("/"))){if(!s||!l(s))s="/"+s;c=s}else c=s;var h=this._makeAbs(c);if(_(this,c))return i();var f=o[0]===a.GLOBSTAR;if(f)this._processGlobStar(s,c,h,o,r,e,i);else this._processReaddir(s,c,h,o,r,e,i)};Glob.prototype._processReaddir=function(t,r,e,i,n,a,s){var o=this;this._readdir(e,a,function(c,h){return o._processReaddir2(t,r,e,i,n,a,h,s)})};Glob.prototype._processReaddir2=function(t,r,e,i,n,a,s,o){if(!s)return o();var c=i[0];var u=!!this.minimatch.negate;var l=c._glob;var f=this.dot||l.charAt(0)===".";var p=[];for(var v=0;v<s.length;v++){var m=s[v];if(m.charAt(0)!=="."||f){var d;if(u&&!t){d=!m.match(c)}else{d=m.match(c)}if(d)p.push(m)}}var g=p.length;if(g===0)return o();if(i.length===1&&!this.mark&&!this.stat){if(!this.matches[n])this.matches[n]=Object.create(null);for(var v=0;v<g;v++){var m=p[v];if(t){if(t!=="/")m=t+"/"+m;else m=t+m}if(m.charAt(0)==="/"&&!this.nomount){m=h.join(this.root,m)}this._emitMatch(n,m)}return o()}i.shift();for(var v=0;v<g;v++){var m=p[v];var y;if(t){if(t!=="/")m=t+"/"+m;else m=t+m}this._process([m].concat(i),n,a,o)}o()};Glob.prototype._emitMatch=function(t,r){if(this.aborted)return;if(w(this,r))return;if(this.paused){this._emitQueue.push([t,r]);return}var e=l(r)?r:this._makeAbs(r);if(this.mark)r=this._mark(r);if(this.absolute)r=e;if(this.matches[t][r])return;if(this.nodir){var i=this.cache[e];if(i==="DIR"||Array.isArray(i))return}this.matches[t][r]=true;var n=this.statCache[e];if(n)this.emit("stat",r,n);this.emit("match",r)};Glob.prototype._readdirInGlobStar=function(t,r){if(this.aborted)return;if(this.follow)return this._readdir(t,false,r);var e="lstat\0"+t;var n=this;var a=y(e,lstatcb_);if(a)i.lstat(t,a);function lstatcb_(e,i){if(e&&e.code==="ENOENT")return r();var a=i&&i.isSymbolicLink();n.symlinks[t]=a;if(!a&&i&&!i.isDirectory()){n.cache[t]="FILE";r()}else n._readdir(t,false,r)}};Glob.prototype._readdir=function(t,r,e){if(this.aborted)return;e=y("readdir\0"+t+"\0"+r,e);if(!e)return;if(r&&!g(this.symlinks,t))return this._readdirInGlobStar(t,e);if(g(this.cache,t)){var n=this.cache[t];if(!n||n==="FILE")return e();if(Array.isArray(n))return e(null,n)}var a=this;i.readdir(t,readdirCb(this,t,e))};function readdirCb(t,r,e){return function(i,n){if(i)t._readdirError(r,i,e);else t._readdirEntries(r,n,e)}}Glob.prototype._readdirEntries=function(t,r,e){if(this.aborted)return;if(!this.mark&&!this.stat){for(var i=0;i<r.length;i++){var n=r[i];if(t==="/")n=t+n;else n=t+"/"+n;this.cache[n]=true}}this.cache[t]=r;return e(null,r)};Glob.prototype._readdirError=function(t,r,e){if(this.aborted)return;switch(r.code){case"ENOTSUP":case"ENOTDIR":var i=this._makeAbs(t);this.cache[i]="FILE";if(i===this.cwdAbs){var n=new Error(r.code+" invalid cwd "+this.cwd);n.path=this.cwd;n.code=r.code;this.emit("error",n);this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=false;break;default:this.cache[this._makeAbs(t)]=false;if(this.strict){this.emit("error",r);this.abort()}if(!this.silent)console.error("glob error",r);break}return e()};Glob.prototype._processGlobStar=function(t,r,e,i,n,a,s){var o=this;this._readdir(e,a,function(c,h){o._processGlobStar2(t,r,e,i,n,a,h,s)})};Glob.prototype._processGlobStar2=function(t,r,e,i,n,a,s,o){if(!s)return o();var c=i.slice(1);var h=t?[t]:[];var u=h.concat(c);this._process(u,n,false,o);var l=this.symlinks[e];var f=s.length;if(l&&a)return o();for(var p=0;p<f;p++){var v=s[p];if(v.charAt(0)==="."&&!this.dot)continue;var m=h.concat(s[p],c);this._process(m,n,true,o);var d=h.concat(s[p],i);this._process(d,n,true,o)}o()};Glob.prototype._processSimple=function(t,r,e){var i=this;this._stat(t,function(n,a){i._processSimple2(t,r,n,a,e)})};Glob.prototype._processSimple2=function(t,r,e,i,n){if(!this.matches[r])this.matches[r]=Object.create(null);if(!i)return n();if(t&&l(t)&&!this.nomount){var a=/[\/\\]$/.test(t);if(t.charAt(0)==="/"){t=h.join(this.root,t)}else{t=h.resolve(this.root,t);if(a)t+="/"}}if(process.platform==="win32")t=t.replace(/\\/g,"/");this._emitMatch(r,t);n()};Glob.prototype._stat=function(t,r){var e=this._makeAbs(t);var n=t.slice(-1)==="/";if(t.length>this.maxLength)return r();if(!this.stat&&g(this.cache,e)){var a=this.cache[e];if(Array.isArray(a))a="DIR";if(!n||a==="DIR")return r(null,a);if(n&&a==="FILE")return r()}var s;var o=this.statCache[e];if(o!==undefined){if(o===false)return r(null,o);else{var c=o.isDirectory()?"DIR":"FILE";if(n&&c==="FILE")return r();else return r(null,c,o)}}var h=this;var u=y("stat\0"+e,lstatcb_);if(u)i.lstat(e,u);function lstatcb_(n,a){if(a&&a.isSymbolicLink()){return i.stat(e,function(i,n){if(i)h._stat2(t,e,null,a,r);else h._stat2(t,e,i,n,r)})}else{h._stat2(t,e,n,a,r)}}};Glob.prototype._stat2=function(t,r,e,i,n){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[r]=false;return n()}var a=t.slice(-1)==="/";this.statCache[r]=i;if(r.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,false,i);var s=true;if(i)s=i.isDirectory()?"DIR":"FILE";this.cache[r]=this.cache[r]||s;if(a&&s==="FILE")return n();return n(null,s,i)}},10:(t,r,e)=>{t.exports=globSync;globSync.GlobSync=GlobSync;var i=e(747);var n=e(863);var a=e(973);var s=a.Minimatch;var o=e(957).Glob;var c=e(669);var h=e(622);var u=e(357);var l=e(714);var f=e(625);var p=f.alphasort;var v=f.alphasorti;var m=f.setopts;var d=f.ownProp;var g=f.childrenIgnored;var y=f.isIgnored;function globSync(t,r){if(typeof r==="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(t,r).found}function GlobSync(t,r){if(!t)throw new Error("must provide pattern");if(typeof r==="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(t,r);m(this,t,r);if(this.noprocess)return this;var e=this.minimatch.set.length;this.matches=new Array(e);for(var i=0;i<e;i++){this._process(this.minimatch.set[i],i,false)}this._finish()}GlobSync.prototype._finish=function(){u(this instanceof GlobSync);if(this.realpath){var t=this;this.matches.forEach(function(r,e){var i=t.matches[e]=Object.create(null);for(var a in r){try{a=t._makeAbs(a);var s=n.realpathSync(a,t.realpathCache);i[s]=true}catch(r){if(r.syscall==="stat")i[t._makeAbs(a)]=true;else throw r}}})}f.finish(this)};GlobSync.prototype._process=function(t,r,e){u(this instanceof GlobSync);var i=0;while(typeof t[i]==="string"){i++}var n;switch(i){case t.length:this._processSimple(t.join("/"),r);return;case 0:n=null;break;default:n=t.slice(0,i).join("/");break}var s=t.slice(i);var o;if(n===null)o=".";else if(l(n)||l(t.join("/"))){if(!n||!l(n))n="/"+n;o=n}else o=n;var c=this._makeAbs(o);if(g(this,o))return;var h=s[0]===a.GLOBSTAR;if(h)this._processGlobStar(n,o,c,s,r,e);else this._processReaddir(n,o,c,s,r,e)};GlobSync.prototype._processReaddir=function(t,r,e,i,n,a){var s=this._readdir(e,a);if(!s)return;var o=i[0];var c=!!this.minimatch.negate;var u=o._glob;var l=this.dot||u.charAt(0)===".";var f=[];for(var p=0;p<s.length;p++){var v=s[p];if(v.charAt(0)!=="."||l){var m;if(c&&!t){m=!v.match(o)}else{m=v.match(o)}if(m)f.push(v)}}var d=f.length;if(d===0)return;if(i.length===1&&!this.mark&&!this.stat){if(!this.matches[n])this.matches[n]=Object.create(null);for(var p=0;p<d;p++){var v=f[p];if(t){if(t.slice(-1)!=="/")v=t+"/"+v;else v=t+v}if(v.charAt(0)==="/"&&!this.nomount){v=h.join(this.root,v)}this._emitMatch(n,v)}return}i.shift();for(var p=0;p<d;p++){var v=f[p];var g;if(t)g=[t,v];else g=[v];this._process(g.concat(i),n,a)}};GlobSync.prototype._emitMatch=function(t,r){if(y(this,r))return;var e=this._makeAbs(r);if(this.mark)r=this._mark(r);if(this.absolute){r=e}if(this.matches[t][r])return;if(this.nodir){var i=this.cache[e];if(i==="DIR"||Array.isArray(i))return}this.matches[t][r]=true;if(this.stat)this._stat(r)};GlobSync.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,false);var r;var e;var n;try{e=i.lstatSync(t)}catch(t){if(t.code==="ENOENT"){return null}}var a=e&&e.isSymbolicLink();this.symlinks[t]=a;if(!a&&e&&!e.isDirectory())this.cache[t]="FILE";else r=this._readdir(t,false);return r};GlobSync.prototype._readdir=function(t,r){var e;if(r&&!d(this.symlinks,t))return this._readdirInGlobStar(t);if(d(this.cache,t)){var n=this.cache[t];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(t,i.readdirSync(t))}catch(r){this._readdirError(t,r);return null}};GlobSync.prototype._readdirEntries=function(t,r){if(!this.mark&&!this.stat){for(var e=0;e<r.length;e++){var i=r[e];if(t==="/")i=t+i;else i=t+"/"+i;this.cache[i]=true}}this.cache[t]=r;return r};GlobSync.prototype._readdirError=function(t,r){switch(r.code){case"ENOTSUP":case"ENOTDIR":var e=this._makeAbs(t);this.cache[e]="FILE";if(e===this.cwdAbs){var i=new Error(r.code+" invalid cwd "+this.cwd);i.path=this.cwd;i.code=r.code;throw i}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=false;break;default:this.cache[this._makeAbs(t)]=false;if(this.strict)throw r;if(!this.silent)console.error("glob error",r);break}};GlobSync.prototype._processGlobStar=function(t,r,e,i,n,a){var s=this._readdir(e,a);if(!s)return;var o=i.slice(1);var c=t?[t]:[];var h=c.concat(o);this._process(h,n,false);var u=s.length;var l=this.symlinks[e];if(l&&a)return;for(var f=0;f<u;f++){var p=s[f];if(p.charAt(0)==="."&&!this.dot)continue;var v=c.concat(s[f],o);this._process(v,n,true);var m=c.concat(s[f],i);this._process(m,n,true)}};GlobSync.prototype._processSimple=function(t,r){var e=this._stat(t);if(!this.matches[r])this.matches[r]=Object.create(null);if(!e)return;if(t&&l(t)&&!this.nomount){var i=/[\/\\]$/.test(t);if(t.charAt(0)==="/"){t=h.join(this.root,t)}else{t=h.resolve(this.root,t);if(i)t+="/"}}if(process.platform==="win32")t=t.replace(/\\/g,"/");this._emitMatch(r,t)};GlobSync.prototype._stat=function(t){var r=this._makeAbs(t);var e=t.slice(-1)==="/";if(t.length>this.maxLength)return false;if(!this.stat&&d(this.cache,r)){var n=this.cache[r];if(Array.isArray(n))n="DIR";if(!e||n==="DIR")return n;if(e&&n==="FILE")return false}var a;var s=this.statCache[r];if(!s){var o;try{o=i.lstatSync(r)}catch(t){if(t&&(t.code==="ENOENT"||t.code==="ENOTDIR")){this.statCache[r]=false;return false}}if(o&&o.isSymbolicLink()){try{s=i.statSync(r)}catch(t){s=o}}else{s=o}}this.statCache[r]=s;var n=true;if(s)n=s.isDirectory()?"DIR":"FILE";this.cache[r]=this.cache[r]||n;if(e&&n==="FILE")return false;return n};GlobSync.prototype._mark=function(t){return f.mark(this,t)};GlobSync.prototype._makeAbs=function(t){return f.makeAbs(this,t)}},492:(t,r,e)=>{var i=e(940);var n=Object.create(null);var a=e(223);t.exports=i(inflight);function inflight(t,r){if(n[t]){n[t].push(r);return null}else{n[t]=[r];return makeres(t)}}function makeres(t){return a(function RES(){var r=n[t];var e=r.length;var i=slice(arguments);try{for(var a=0;a<e;a++){r[a].apply(null,i)}}finally{if(r.length>e){r.splice(0,e);process.nextTick(function(){RES.apply(null,i)})}else{delete n[t]}}})}function slice(t){var r=t.length;var e=[];for(var i=0;i<r;i++)e[i]=t[i];return e}},124:(t,r,e)=>{try{var i=e(669);if(typeof i.inherits!=="function")throw"";t.exports=i.inherits}catch(r){t.exports=e(544)}},544:t=>{if(typeof Object.create==="function"){t.exports=function inherits(t,r){if(r){t.super_=r;t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}})}}}else{t.exports=function inherits(t,r){if(r){t.super_=r;var e=function(){};e.prototype=r.prototype;t.prototype=new e;t.prototype.constructor=t}}}},973:(t,r,e)=>{t.exports=minimatch;minimatch.Minimatch=Minimatch;var i={sep:"/"};try{i=e(622)}catch(t){}var n=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={};var a=e(717);var s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var o="[^/]";var c=o+"*?";var h="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var u="(?:(?!(?:\\/|^)\\.).)*?";var l=charSet("().*{}+?[]^$\\!");function charSet(t){return t.split("").reduce(function(t,r){t[r]=true;return t},{})}var f=/\/+/;minimatch.filter=filter;function filter(t,r){r=r||{};return function(e,i,n){return minimatch(e,t,r)}}function ext(t,r){t=t||{};r=r||{};var e={};Object.keys(r).forEach(function(t){e[t]=r[t]});Object.keys(t).forEach(function(r){e[r]=t[r]});return e}minimatch.defaults=function(t){if(!t||!Object.keys(t).length)return minimatch;var r=minimatch;var e=function minimatch(e,i,n){return r.minimatch(e,i,ext(t,n))};e.Minimatch=function Minimatch(e,i){return new r.Minimatch(e,ext(t,i))};return e};Minimatch.defaults=function(t){if(!t||!Object.keys(t).length)return Minimatch;return minimatch.defaults(t).Minimatch};function minimatch(t,r,e){if(typeof r!=="string"){throw new TypeError("glob pattern string required")}if(!e)e={};if(!e.nocomment&&r.charAt(0)==="#"){return false}if(r.trim()==="")return t==="";return new Minimatch(r,e).match(t)}function Minimatch(t,r){if(!(this instanceof Minimatch)){return new Minimatch(t,r)}if(typeof t!=="string"){throw new TypeError("glob pattern string required")}if(!r)r={};t=t.trim();if(i.sep!=="/"){t=t.split(i.sep).join("/")}this.options=r;this.set=[];this.pattern=t;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.make()}Minimatch.prototype.debug=function(){};Minimatch.prototype.make=make;function make(){if(this._made)return;var t=this.pattern;var r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();var e=this.globSet=this.braceExpand();if(r.debug)this.debug=console.error;this.debug(this.pattern,e);e=this.globParts=e.map(function(t){return t.split(f)});this.debug(this.pattern,e);e=e.map(function(t,r,e){return t.map(this.parse,this)},this);this.debug(this.pattern,e);e=e.filter(function(t){return t.indexOf(false)===-1});this.debug(this.pattern,e);this.set=e}Minimatch.prototype.parseNegate=parseNegate;function parseNegate(){var t=this.pattern;var r=false;var e=this.options;var i=0;if(e.nonegate)return;for(var n=0,a=t.length;n<a&&t.charAt(n)==="!";n++){r=!r;i++}if(i)this.pattern=t.substr(i);this.negate=r}minimatch.braceExpand=function(t,r){return braceExpand(t,r)};Minimatch.prototype.braceExpand=braceExpand;function braceExpand(t,r){if(!r){if(this instanceof Minimatch){r=this.options}else{r={}}}t=typeof t==="undefined"?this.pattern:t;if(typeof t==="undefined"){throw new TypeError("undefined pattern")}if(r.nobrace||!t.match(/\{.*\}/)){return[t]}return a(t)}Minimatch.prototype.parse=parse;var p={};function parse(t,r){if(t.length>1024*64){throw new TypeError("pattern is too long")}var e=this.options;if(!e.noglobstar&&t==="**")return n;if(t==="")return"";var i="";var a=!!e.nocase;var h=false;var u=[];var f=[];var v;var m=false;var d=-1;var g=-1;var y=t.charAt(0)==="."?"":e.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var b=this;function clearStateChar(){if(v){switch(v){case"*":i+=c;a=true;break;case"?":i+=o;a=true;break;default:i+="\\"+v;break}b.debug("clearStateChar %j %j",v,i);v=false}}for(var _=0,w=t.length,k;_<w&&(k=t.charAt(_));_++){this.debug("%s\t%s %s %j",t,_,i,k);if(h&&l[k]){i+="\\"+k;h=false;continue}switch(k){case"/":return false;case"\\":clearStateChar();h=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",t,_,i,k);if(m){this.debug("  in class");if(k==="!"&&_===g+1)k="^";i+=k;continue}b.debug("call clearStateChar %j",v);clearStateChar();v=k;if(e.noext)clearStateChar();continue;case"(":if(m){i+="(";continue}if(!v){i+="\\(";continue}u.push({type:v,start:_-1,reStart:i.length,open:s[v].open,close:s[v].close});i+=v==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",v,i);v=false;continue;case")":if(m||!u.length){i+="\\)";continue}clearStateChar();a=true;var S=u.pop();i+=S.close;if(S.type==="!"){f.push(S)}S.reEnd=i.length;continue;case"|":if(m||!u.length||h){i+="\\|";h=false;continue}clearStateChar();i+="|";continue;case"[":clearStateChar();if(m){i+="\\"+k;continue}m=true;g=_;d=i.length;i+=k;continue;case"]":if(_===g+1||!m){i+="\\"+k;h=false;continue}if(m){var E=t.substring(g+1,_);try{RegExp("["+E+"]")}catch(t){var O=this.parse(E,p);i=i.substr(0,d)+"\\["+O[0]+"\\]";a=a||O[1];m=false;continue}}a=true;m=false;i+=k;continue;default:clearStateChar();if(h){h=false}else if(l[k]&&!(k==="^"&&m)){i+="\\"}i+=k}}if(m){E=t.substr(g+1);O=this.parse(E,p);i=i.substr(0,d)+"\\["+O[0];a=a||O[1]}for(S=u.pop();S;S=u.pop()){var A=i.slice(S.reStart+S.open.length);this.debug("setting tail",i,S);A=A.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(t,r,e){if(!e){e="\\"}return r+r+e+"|"});this.debug("tail=%j\n   %s",A,A,S,i);var G=S.type==="*"?c:S.type==="?"?o:"\\"+S.type;a=true;i=i.slice(0,S.reStart)+G+"\\("+A}clearStateChar();if(h){i+="\\\\"}var j=false;switch(i.charAt(0)){case".":case"[":case"(":j=true}for(var I=f.length-1;I>-1;I--){var M=f[I];var L=i.slice(0,M.reStart);var x=i.slice(M.reStart,M.reEnd-8);var C=i.slice(M.reEnd-8,M.reEnd);var R=i.slice(M.reEnd);C+=R;var T=L.split("(").length-1;var N=R;for(_=0;_<T;_++){N=N.replace(/\)[+*?]?/,"")}R=N;var P="";if(R===""&&r!==p){P="$"}var D=L+x+R+P+C;i=D}if(i!==""&&a){i="(?=.)"+i}if(j){i=y+i}if(r===p){return[i,a]}if(!a){return globUnescape(t)}var $=e.nocase?"i":"";try{var F=new RegExp("^"+i+"$",$)}catch(t){return new RegExp("$.")}F._glob=t;F._src=i;return F}minimatch.makeRe=function(t,r){return new Minimatch(t,r||{}).makeRe()};Minimatch.prototype.makeRe=makeRe;function makeRe(){if(this.regexp||this.regexp===false)return this.regexp;var t=this.set;if(!t.length){this.regexp=false;return this.regexp}var r=this.options;var e=r.noglobstar?c:r.dot?h:u;var i=r.nocase?"i":"";var a=t.map(function(t){return t.map(function(t){return t===n?e:typeof t==="string"?regExpEscape(t):t._src}).join("\\/")}).join("|");a="^(?:"+a+")$";if(this.negate)a="^(?!"+a+").*$";try{this.regexp=new RegExp(a,i)}catch(t){this.regexp=false}return this.regexp}minimatch.match=function(t,r,e){e=e||{};var i=new Minimatch(r,e);t=t.filter(function(t){return i.match(t)});if(i.options.nonull&&!t.length){t.push(r)}return t};Minimatch.prototype.match=match;function match(t,r){this.debug("match",t,this.pattern);if(this.comment)return false;if(this.empty)return t==="";if(t==="/"&&r)return true;var e=this.options;if(i.sep!=="/"){t=t.split(i.sep).join("/")}t=t.split(f);this.debug(this.pattern,"split",t);var n=this.set;this.debug(this.pattern,"set",n);var a;var s;for(s=t.length-1;s>=0;s--){a=t[s];if(a)break}for(s=0;s<n.length;s++){var o=n[s];var c=t;if(e.matchBase&&o.length===1){c=[a]}var h=this.matchOne(c,o,r);if(h){if(e.flipNegate)return true;return!this.negate}}if(e.flipNegate)return false;return this.negate}Minimatch.prototype.matchOne=function(t,r,e){var i=this.options;this.debug("matchOne",{this:this,file:t,pattern:r});this.debug("matchOne",t.length,r.length);for(var a=0,s=0,o=t.length,c=r.length;a<o&&s<c;a++,s++){this.debug("matchOne loop");var h=r[s];var u=t[a];this.debug(r,h,u);if(h===false)return false;if(h===n){this.debug("GLOBSTAR",[r,h,u]);var l=a;var f=s+1;if(f===c){this.debug("** at the end");for(;a<o;a++){if(t[a]==="."||t[a]===".."||!i.dot&&t[a].charAt(0)===".")return false}return true}while(l<o){var p=t[l];this.debug("\nglobstar while",t,l,r,f,p);if(this.matchOne(t.slice(l),r.slice(f),e)){this.debug("globstar found match!",l,o,p);return true}else{if(p==="."||p===".."||!i.dot&&p.charAt(0)==="."){this.debug("dot detected!",t,l,r,f);break}this.debug("globstar swallow a segment, and continue");l++}}if(e){this.debug("\n>>> no match, partial?",t,l,r,f);if(l===o)return true}return false}var v;if(typeof h==="string"){if(i.nocase){v=u.toLowerCase()===h.toLowerCase()}else{v=u===h}this.debug("string match",h,u,v)}else{v=u.match(h);this.debug("pattern match",h,u,v)}if(!v)return false}if(a===o&&s===c){return true}else if(a===o){return e}else if(s===c){var m=a===o-1&&t[a]==="";return m}throw new Error("wtf?")};function globUnescape(t){return t.replace(/\\(.)/g,"$1")}function regExpEscape(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},223:(t,r,e)=>{var i=e(940);t.exports=i(once);t.exports.strict=i(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(t){var r=function(){if(r.called)return r.value;r.called=true;return r.value=t.apply(this,arguments)};r.called=false;return r}function onceStrict(t){var r=function(){if(r.called)throw new Error(r.onceError);r.called=true;return r.value=t.apply(this,arguments)};var e=t.name||"Function wrapped with `once`";r.onceError=e+" shouldn't be called more than once";r.called=false;return r}},714:t=>{"use strict";function posix(t){return t.charAt(0)==="/"}function win32(t){var r=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;var e=r.exec(t);var i=e[1]||"";var n=Boolean(i&&i.charAt(1)!==":");return Boolean(e[2]||n)}t.exports=process.platform==="win32"?win32:posix;t.exports.posix=posix;t.exports.win32=win32},940:t=>{t.exports=wrappy;function wrappy(t,r){if(t&&r)return wrappy(t)(r);if(typeof t!=="function")throw new TypeError("need wrapper function");Object.keys(t).forEach(function(r){wrapper[r]=t[r]});return wrapper;function wrapper(){var r=new Array(arguments.length);for(var e=0;e<r.length;e++){r[e]=arguments[e]}var i=t.apply(this,r);var n=r[r.length-1];if(typeof i==="function"&&i!==n){Object.keys(n).forEach(function(t){i[t]=n[t]})}return i}}},357:t=>{"use strict";t.exports=require("assert")},614:t=>{"use strict";t.exports=require("events")},747:t=>{"use strict";t.exports=require("fs")},622:t=>{"use strict";t.exports=require("path")},669:t=>{"use strict";t.exports=require("util")}};var r={};function __nccwpck_require__(e){if(r[e]){return r[e].exports}var i=r[e]={exports:{}};var n=true;try{t[e](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete r[e]}return i.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(957)})();