@stencil/core 3.0.0-alpha.1 → 3.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/config-flags.d.ts +16 -16
- package/cli/index.cjs +5 -4
- package/cli/index.js +5 -4
- package/cli/package.json +1 -1
- package/compiler/lib.dom.d.ts +308 -70
- package/compiler/lib.dom.iterable.d.ts +6 -2
- package/compiler/lib.es2015.promise.d.ts +9 -4
- package/compiler/lib.es2015.proxy.d.ts +1 -1
- package/compiler/lib.es2015.reflect.d.ts +25 -2
- package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
- package/compiler/lib.es2019.d.ts +1 -0
- package/compiler/lib.es2019.intl.d.ts +25 -0
- package/compiler/lib.es2020.intl.d.ts +1 -1
- package/compiler/lib.es5.d.ts +26 -13
- package/compiler/lib.webworker.d.ts +266 -30
- package/compiler/lib.webworker.iterable.d.ts +10 -2
- package/compiler/package.json +1 -1
- package/compiler/stencil.d.ts +1 -23
- package/compiler/stencil.js +1372 -303
- package/compiler/stencil.min.js +2 -2
- package/compiler/sys/in-memory-fs.d.ts +3 -3
- package/compiler/transpile.d.ts +32 -0
- package/dependencies.json +2 -1
- package/dev-server/client/app-error.d.ts +1 -1
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/open-in-editor-api.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +2 -2
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +1 -1
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/polyfills/css-shim.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +2 -2
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +4 -4
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +37 -37
- package/internal/stencil-public-compiler.d.ts +27 -27
- package/internal/stencil-public-runtime.d.ts +3 -3
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.d.ts +2 -2
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +6 -6
- package/screenshot/package.json +1 -1
- package/sys/node/autoprefixer.js +1 -1
- package/sys/node/glob.js +1 -1
- package/sys/node/index.js +29 -42
- package/sys/node/package.json +1 -1
- package/sys/node/prompts.js +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +19 -13
- package/testing/jest/jest-preprocessor.d.ts +3 -3
- package/testing/package.json +1 -1
- package/testing/puppeteer/puppeteer-declarations.d.ts +4 -4
- package/testing/testing-utils.d.ts +1 -1
package/sys/node/glob.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){for(var r in e)t[r]=e[r]}(exports,function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=10)}([function(t,e){t.exports=require("path")},function(t,e){t.exports=require("fs")},function(t,e,r){const n=t.exports=(t,e,r={})=>(m(e),!(!r.nocomment&&"#"===e.charAt(0))&&new b(e,r).match(t));t.exports=n;const i=r(12);n.sep=i.sep;const s=Symbol("globstar **");n.GLOBSTAR=s;const o=r(13),a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},c="[^/]",h="[^/]*?",u=t=>t.split("").reduce(((t,e)=>(t[e]=!0,t)),{}),l=u("().*{}+?[]^$\\!"),f=u("[.("),p=/\/+/;n.filter=(t,e={})=>(r,i,s)=>n(r,t,e);const d=(t,e={})=>{const r={};return Object.keys(t).forEach((e=>r[e]=t[e])),Object.keys(e).forEach((t=>r[t]=e[t])),r};n.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return n;const e=n,r=(r,n,i)=>e(r,n,d(t,i));return(r.Minimatch=class extends e.Minimatch{constructor(e,r){super(e,d(t,r))}}).defaults=r=>e.defaults(d(t,r)).Minimatch,r.filter=(r,n)=>e.filter(r,d(t,n)),r.defaults=r=>e.defaults(d(t,r)),r.makeRe=(r,n)=>e.makeRe(r,d(t,n)),r.braceExpand=(r,n)=>e.braceExpand(r,d(t,n)),r.match=(r,n,i)=>e.match(r,n,d(t,i)),r},n.braceExpand=(t,e)=>g(t,e);const g=(t,e={})=>(m(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:o(t)),m=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},y=Symbol("subparse");n.makeRe=(t,e)=>new b(t,e||{}).makeRe(),n.match=(t,e,r={})=>{const n=new b(e,r);return t=t.filter((t=>n.match(t))),n.options.nonull&&!t.length&&t.push(e),t};class b{constructor(t,e){m(t),e||(e={}),this.options=e,this.set=[],this.pattern=t,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}debug(){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate();let r=this.globSet=this.braceExpand();e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,r),r=this.globParts=r.map((t=>t.split(p))),this.debug(this.pattern,r),r=r.map(((t,e,r)=>t.map(this.parse,this))),this.debug(this.pattern,r),r=r.filter((t=>-1===t.indexOf(!1))),this.debug(this.pattern,r),this.set=r}parseNegate(){if(this.options.nonegate)return;const t=this.pattern;let e=!1,r=0;for(let n=0;n<t.length&&"!"===t.charAt(n);n++)e=!e,r++;r&&(this.pattern=t.substr(r)),this.negate=e}matchOne(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,o=0,a=t.length,c=e.length;i<a&&o<c;i++,o++){this.debug("matchOne loop");var h,u=e[o],l=t[i];if(this.debug(e,u,l),!1===u)return!1;if(u===s){this.debug("GLOBSTAR",[e,u,l]);var f=i,p=o+1;if(p===c){for(this.debug("** at the end");i<a;i++)if("."===t[i]||".."===t[i]||!n.dot&&"."===t[i].charAt(0))return!1;return!0}for(;f<a;){var d=t[f];if(this.debug("\nglobstar while",t,f,e,p,d),this.matchOne(t.slice(f),e.slice(p),r))return this.debug("globstar found match!",f,a,d),!0;if("."===d||".."===d||!n.dot&&"."===d.charAt(0)){this.debug("dot detected!",t,f,e,p);break}this.debug("globstar swallow a segment, and continue"),f++}return!(!r||(this.debug("\n>>> no match, partial?",t,f,e,p),f!==a))}if("string"==typeof u?(h=l===u,this.debug("string match",u,l,h)):(h=l.match(u),this.debug("pattern match",u,l,h)),!h)return!1}if(i===a&&o===c)return!0;if(i===a)return r;if(o===c)return i===a-1&&""===t[i];throw new Error("wtf?")}braceExpand(){return g(this.pattern,this.options)}parse(t,e){m(t);const r=this.options;if("**"===t){if(!r.noglobstar)return s;t="*"}if(""===t)return"";let n="",i=!!r.nocase,o=!1;const u=[],p=[];let d,g,b,v,_=!1,w=-1,E=-1;const O="."===t.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",k=()=>{if(d){switch(d){case"*":n+=h,i=!0;break;case"?":n+=c,i=!0;break;default:n+="\\"+d}this.debug("clearStateChar %j %j",d,n),d=!1}};for(let e,s=0;s<t.length&&(e=t.charAt(s));s++)if(this.debug("%s\t%s %s %j",t,s,n,e),o){if("/"===e)return!1;l[e]&&(n+="\\"),n+=e,o=!1}else switch(e){case"/":return!1;case"\\":k(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",t,s,n,e),_){this.debug(" in class"),"!"===e&&s===E+1&&(e="^"),n+=e;continue}this.debug("call clearStateChar %j",d),k(),d=e,r.noext&&k();continue;case"(":if(_){n+="(";continue}if(!d){n+="\\(";continue}u.push({type:d,start:s-1,reStart:n.length,open:a[d].open,close:a[d].close}),n+="!"===d?"(?:(?!(?:":"(?:",this.debug("plType %j %j",d,n),d=!1;continue;case")":if(_||!u.length){n+="\\)";continue}k(),i=!0,b=u.pop(),n+=b.close,"!"===b.type&&p.push(b),b.reEnd=n.length;continue;case"|":if(_||!u.length){n+="\\|";continue}k(),n+="|";continue;case"[":if(k(),_){n+="\\"+e;continue}_=!0,E=s,w=n.length,n+=e;continue;case"]":if(s===E+1||!_){n+="\\"+e;continue}g=t.substring(E+1,s);try{RegExp("["+g+"]")}catch(t){v=this.parse(g,y),n=n.substr(0,w)+"\\["+v[0]+"\\]",i=i||v[1],_=!1;continue}i=!0,_=!1,n+=e;continue;default:k(),!l[e]||"^"===e&&_||(n+="\\"),n+=e}for(_&&(g=t.substr(E+1),v=this.parse(g,y),n=n.substr(0,w)+"\\["+v[0],i=i||v[1]),b=u.pop();b;b=u.pop()){let t;t=n.slice(b.reStart+b.open.length),this.debug("setting tail",n,b),t=t.replace(/((?:\\{2}){0,64})(\\?)\|/g,((t,e,r)=>(r||(r="\\"),e+e+r+"|"))),this.debug("tail=%j\n %s",t,t,b,n);const e="*"===b.type?h:"?"===b.type?c:"\\"+b.type;i=!0,n=n.slice(0,b.reStart)+e+"\\("+t}k(),o&&(n+="\\\\");const A=f[n.charAt(0)];for(let t=p.length-1;t>-1;t--){const r=p[t],i=n.slice(0,r.reStart),s=n.slice(r.reStart,r.reEnd-8);let o=n.slice(r.reEnd);const a=n.slice(r.reEnd-8,r.reEnd)+o,c=i.split("(").length-1;let h=o;for(let t=0;t<c;t++)h=h.replace(/\)[+*?]?/,"");o=h;n=i+s+o+(""===o&&e!==y?"$":"")+a}if(""!==n&&i&&(n="(?=.)"+n),A&&(n=O+n),e===y)return[n,i];if(!i)return t.replace(/\\(.)/g,"$1");const S=r.nocase?"i":"";try{return Object.assign(new RegExp("^"+n+"$",S),{_glob:t,_src:n})}catch(t){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,r=e.noglobstar?h:e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=e.nocase?"i":"";let i=t.map((t=>((t=t.map((t=>"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===s?s:t._src)).reduce(((t,e)=>(t[t.length-1]===s&&e===s||t.push(e),t)),[])).forEach(((e,n)=>{e===s&&t[n-1]!==s&&(0===n?t.length>1?t[n+1]="(?:\\/|"+r+"\\/)?"+t[n+1]:t[n]=r:n===t.length-1?t[n-1]+="(?:\\/|"+r+")?":(t[n-1]+="(?:\\/|\\/"+r+"\\/)"+t[n+1],t[n+1]=s))})),t.filter((t=>t!==s)).join("/")))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(t){this.regexp=!1}return this.regexp}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const r=this.options;"/"!==i.sep&&(t=t.split(i.sep).join("/")),t=t.split(p),this.debug(this.pattern,"split",t);const n=this.set;let s;this.debug(this.pattern,"set",n);for(let e=t.length-1;e>=0&&(s=t[e],!s);e--);for(let i=0;i<n.length;i++){const o=n[i];let a=t;r.matchBase&&1===o.length&&(a=[s]);if(this.matchOne(a,o,e))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(t){return n.defaults(t).Minimatch}}n.Minimatch=b},function(t,e){t.exports=require("util")},function(t,e,r){t.exports=b;var n=r(5),i=r(2),s=(i.Minimatch,r(15)),o=r(17).EventEmitter,a=r(0),c=r(6),h=r(0).isAbsolute,u=r(18),l=r(7),f=l.setopts,p=l.ownProp,d=r(19),g=(r(3),l.childrenIgnored),m=l.isIgnored,y=r(9);function b(t,e,r){if("function"==typeof e&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return u(t,e)}return new _(t,e,r)}b.sync=u;var v=b.GlobSync=u.GlobSync;function _(t,e,r){if("function"==typeof e&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new v(t,e)}if(!(this instanceof _))return new _(t,e,r);f(this,t,e),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),"function"==typeof r&&(r=y(r),this.on("error",r),this.on("end",(function(t){r(null,t)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return o();for(var s=0;s<n;s++)this._process(this.minimatch.set[s],s,!1,o);function o(){--i._processing,i._processing<=0&&i._finish()}}b.glob=b,b.hasMagic=function(t,e){var r=function(t,e){if(null===e||"object"!=typeof e)return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}({},e);r.noprocess=!0;var n=new _(t,r).minimatch.set;if(!t)return!1;if(n.length>1)return!0;for(var i=0;i<n[0].length;i++)if("string"!=typeof n[0][i])return!0;return!1},b.Glob=_,s(_,o),_.prototype._finish=function(){if(c(this instanceof _),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();l.finish(this),this.emit("end",this.found)}},_.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var t=this.matches.length;if(0===t)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,n)}function n(){0==--t&&e._finish()}},_.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var i=Object.keys(r),s=this,o=i.length;if(0===o)return e();var a=this.matches[t]=Object.create(null);i.forEach((function(r,i){r=s._makeAbs(r),n.realpath(r,s.realpathCache,(function(n,i){n?"stat"===n.syscall?a[r]=!0:s.emit("error",n):a[i]=!0,0==--o&&(s.matches[t]=a,e())}))}))},_.prototype._mark=function(t){return l.mark(this,t)},_.prototype._makeAbs=function(t){return l.makeAbs(this,t)},_.prototype.abort=function(){this.aborted=!0,this.emit("abort")},_.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},_.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(e=0;e<n.length;e++){var i=n[e];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},_.prototype._process=function(t,e,r,n){if(c(this instanceof _),c("function"==typeof n),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([t,e,r,n]);else{for(var s,o=0;"string"==typeof t[o];)o++;switch(o){case t.length:return void this._processSimple(t.join("/"),e,n);case 0:s=null;break;default:s=t.slice(0,o).join("/")}var a,u=t.slice(o);null===s?a=".":h(s)||h(t.map((function(t){return"string"==typeof t?t:"[*]"})).join("/"))?(s&&h(s)||(s="/"+s),a=s):a=s;var l=this._makeAbs(a);if(g(this,a))return n();u[0]===i.GLOBSTAR?this._processGlobStar(s,a,l,u,e,r,n):this._processReaddir(s,a,l,u,e,r,n)}},_.prototype._processReaddir=function(t,e,r,n,i,s,o){var a=this;this._readdir(r,s,(function(c,h){return a._processReaddir2(t,e,r,n,i,s,h,o)}))},_.prototype._processReaddir2=function(t,e,r,n,i,s,o,c){if(!o)return c();for(var h=n[0],u=!!this.minimatch.negate,l=h._glob,f=this.dot||"."===l.charAt(0),p=[],d=0;d<o.length;d++){if("."!==(m=o[d]).charAt(0)||f)(u&&!t?!m.match(h):m.match(h))&&p.push(m)}var g=p.length;if(0===g)return c();if(1===n.length&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(d=0;d<g;d++){var m=p[d];t&&(m="/"!==t?t+"/"+m:t+m),"/"!==m.charAt(0)||this.nomount||(m=a.join(this.root,m)),this._emitMatch(i,m)}return c()}n.shift();for(d=0;d<g;d++){m=p[d];t&&(m="/"!==t?t+"/"+m:t+m),this._process([m].concat(n),i,s,c)}c()},_.prototype._emitMatch=function(t,e){if(!this.aborted&&!m(this,e))if(this.paused)this._emitQueue.push([t,e]);else{var r=h(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0;var i=this.statCache[r];i&&this.emit("stat",e,i),this.emit("match",e)}}},_.prototype._readdirInGlobStar=function(t,e){if(!this.aborted){if(this.follow)return this._readdir(t,!1,e);var r=this,n=d("lstat\0"+t,(function(n,i){if(n&&"ENOENT"===n.code)return e();var s=i&&i.isSymbolicLink();r.symlinks[t]=s,s||!i||i.isDirectory()?r._readdir(t,!1,e):(r.cache[t]="FILE",e())}));n&&r.fs.lstat(t,n)}},_.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=d("readdir\0"+t+"\0"+e,r))){if(e&&!p(this.symlinks,t))return this._readdirInGlobStar(t,r);if(p(this.cache,t)){var n=this.cache[t];if(!n||"FILE"===n)return r();if(Array.isArray(n))return r(null,n)}this.fs.readdir(t,function(t,e,r){return function(n,i){n?t._readdirError(e,n,r):t._readdirEntries(e,i,r)}}(this,t,r))}},_.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];i="/"===t?t+i:t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,r(null,e)}},_.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(t);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=e.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e)}return r()}},_.prototype._processGlobStar=function(t,e,r,n,i,s,o){var a=this;this._readdir(r,s,(function(c,h){a._processGlobStar2(t,e,r,n,i,s,h,o)}))},_.prototype._processGlobStar2=function(t,e,r,n,i,s,o,a){if(!o)return a();var c=n.slice(1),h=t?[t]:[],u=h.concat(c);this._process(u,i,!1,a);var l=this.symlinks[r],f=o.length;if(l&&s)return a();for(var p=0;p<f;p++){if("."!==o[p].charAt(0)||this.dot){var d=h.concat(o[p],c);this._process(d,i,!0,a);var g=h.concat(o[p],n);this._process(g,i,!0,a)}}a()},_.prototype._processSimple=function(t,e,r){var n=this;this._stat(t,(function(i,s){n._processSimple2(t,e,i,s,r)}))},_.prototype._processSimple2=function(t,e,r,n,i){if(this.matches[e]||(this.matches[e]=Object.create(null)),!n)return i();if(t&&h(t)&&!this.nomount){var s=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=a.join(this.root,t):(t=a.resolve(this.root,t),s&&(t+="/"))}"win32"===process.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),i()},_.prototype._stat=function(t,e){var r=this._makeAbs(t),n="/"===t.slice(-1);if(t.length>this.maxLength)return e();if(!this.stat&&p(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!n||"DIR"===i)return e(null,i);if(n&&"FILE"===i)return e()}var s=this.statCache[r];if(void 0!==s){if(!1===s)return e(null,s);var o=s.isDirectory()?"DIR":"FILE";return n&&"FILE"===o?e():e(null,o,s)}var a=this,c=d("stat\0"+r,(function(n,i){if(i&&i.isSymbolicLink())return a.fs.stat(r,(function(n,s){n?a._stat2(t,r,null,i,e):a._stat2(t,r,n,s,e)}));a._stat2(t,r,n,i,e)}));c&&a.fs.lstat(r,c)},_.prototype._stat2=function(t,e,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[e]=!1,i();var s="/"===t.slice(-1);if(this.statCache[e]=n,"/"===e.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||o,s&&"FILE"===o?i():i(null,o,n)}},function(t,e,r){t.exports=u,u.realpath=u,u.sync=l,u.realpathSync=l,u.monkeypatch=function(){n.realpath=u,n.realpathSync=l},u.unmonkeypatch=function(){n.realpath=i,n.realpathSync=s};var n=r(1),i=n.realpath,s=n.realpathSync,o=process.version,a=/^v[0-5]\./.test(o),c=r(11);function h(t){return t&&"realpath"===t.syscall&&("ELOOP"===t.code||"ENOMEM"===t.code||"ENAMETOOLONG"===t.code)}function u(t,e,r){if(a)return i(t,e,r);"function"==typeof e&&(r=e,e=null),i(t,e,(function(n,i){h(n)?c.realpath(t,e,r):r(n,i)}))}function l(t,e){if(a)return s(t,e);try{return s(t,e)}catch(r){if(h(r))return c.realpathSync(t,e);throw r}}},function(t,e){t.exports=require("assert")},function(t,e,r){function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.setopts=function(t,e,r){r||(r={});if(r.matchBase&&-1===e.indexOf("/")){if(r.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.silent=!!r.silent,t.pattern=e,t.strict=!1!==r.strict,t.realpath=!!r.realpath,t.realpathCache=r.realpathCache||Object.create(null),t.follow=!!r.follow,t.dot=!!r.dot,t.mark=!!r.mark,t.nodir=!!r.nodir,t.nodir&&(t.mark=!0);t.sync=!!r.sync,t.nounique=!!r.nounique,t.nonull=!!r.nonull,t.nosort=!!r.nosort,t.nocase=!!r.nocase,t.stat=!!r.stat,t.noprocess=!!r.noprocess,t.absolute=!!r.absolute,t.fs=r.fs||i,t.maxLength=r.maxLength||1/0,t.cache=r.cache||Object.create(null),t.statCache=r.statCache||Object.create(null),t.symlinks=r.symlinks||Object.create(null),function(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]);t.ignore.length&&(t.ignore=t.ignore.map(u))}(t,r),t.changedCwd=!1;var o=process.cwd();n(r,"cwd")?(t.cwd=s.resolve(r.cwd),t.changedCwd=t.cwd!==o):t.cwd=s.resolve(o);t.root=r.root||s.resolve(t.cwd,"/"),t.root=s.resolve(t.root),t.cwdAbs=a(t.cwd)?t.cwd:l(t,t.cwd),t.nomount=!!r.nomount,"win32"===process.platform&&(t.root=t.root.replace(/\\/g,"/"),t.cwd=t.cwd.replace(/\\/g,"/"),t.cwdAbs=t.cwdAbs.replace(/\\/g,"/"));r.nonegate=!0,r.nocomment=!0,r.allowWindowsEscape=!0,t.minimatch=new c(e,r),t.options=t.minimatch.options},e.ownProp=n,e.makeAbs=l,e.finish=function(t){for(var e=t.nounique,r=e?[]:Object.create(null),n=0,i=t.matches.length;n<i;n++){var s=t.matches[n];if(s&&0!==Object.keys(s).length){var o=Object.keys(s);e?r.push.apply(r,o):o.forEach((function(t){r[t]=!0}))}else if(t.nonull){var a=t.minimatch.globSet[n];e?r.push(a):r[a]=!0}}e||(r=Object.keys(r));t.nosort||(r=r.sort(h));if(t.mark){for(n=0;n<r.length;n++)r[n]=t._mark(r[n]);t.nodir&&(r=r.filter((function(e){var r=!/\/$/.test(e),n=t.cache[e]||t.cache[l(t,e)];return r&&n&&(r="DIR"!==n&&!Array.isArray(n)),r})))}t.ignore.length&&(r=r.filter((function(e){return!f(t,e)})));t.found=r},e.mark=function(t,e){var r=l(t,e),n=t.cache[r],i=e;if(n){var s="DIR"===n||Array.isArray(n),o="/"===e.slice(-1);if(s&&!o?i+="/":!s&&o&&(i=i.slice(0,-1)),i!==e){var a=l(t,i);t.statCache[a]=t.statCache[r],t.cache[a]=t.cache[r]}}return i},e.isIgnored=f,e.childrenIgnored=function(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return!(!t.gmatcher||!t.gmatcher.match(e))}))};var i=r(1),s=r(0),o=r(2),a=r(0).isAbsolute,c=o.Minimatch;function h(t,e){return t.localeCompare(e,"en")}function u(t){var e=null;if("/**"===t.slice(-3)){var r=t.replace(/(\/\*\*)+$/,"");e=new c(r,{dot:!0})}return{matcher:new c(t,{dot:!0}),gmatcher:e}}function l(t,e){var r=e;return r="/"===e.charAt(0)?s.join(t.root,e):a(e)||""===e?e:t.changedCwd?s.resolve(t.cwd,e):s.resolve(e),"win32"===process.platform&&(r=r.replace(/\\/g,"/")),r}function f(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return t.matcher.match(e)||!(!t.gmatcher||!t.gmatcher.match(e))}))}},function(t,e){t.exports=function t(e,r){if(e&&r)return t(e)(r);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){n[t]=e[t]})),n;function n(){for(var t=new Array(arguments.length),r=0;r<t.length;r++)t[r]=arguments[r];var n=e.apply(this,t),i=t[t.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(t){n[t]=i[t]})),n}}},function(t,e,r){var n=r(8);function i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function s(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}t.exports=n(i),t.exports.strict=n(s),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})}))},function(t,e,r){t.exports=r(4)},function(t,e,r){var n=r(0),i="win32"===process.platform,s=r(1),o=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function a(t){return"function"==typeof t?t:function(){var t;if(o){var e=new Error;t=function(t){t&&(e.message=t.message,r(t=e))}}else t=r;return t;function r(t){if(t){if(process.throwDeprecation)throw t;if(!process.noDeprecation){var e="fs: missing callback "+(t.stack||t.message);process.traceDeprecation?console.trace(e):console.error(e)}}}}()}n.normalize;if(i)var c=/(.*?)(?:[\/\\]+|$)/g;else c=/(.*?)(?:[\/]+|$)/g;if(i)var h=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else h=/^[\/]*/;e.realpathSync=function(t,e){if(t=n.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return e[t];var r,o,a,u,l=t,f={},p={};function d(){var e=h.exec(t);r=e[0].length,o=e[0],a=e[0],u="",i&&!p[a]&&(s.lstatSync(a),p[a]=!0)}for(d();r<t.length;){c.lastIndex=r;var g=c.exec(t);if(u=o,o+=g[0],a=u+g[1],r=c.lastIndex,!(p[a]||e&&e[a]===a)){var m;if(e&&Object.prototype.hasOwnProperty.call(e,a))m=e[a];else{var y=s.lstatSync(a);if(!y.isSymbolicLink()){p[a]=!0,e&&(e[a]=a);continue}var b=null;if(!i){var v=y.dev.toString(32)+":"+y.ino.toString(32);f.hasOwnProperty(v)&&(b=f[v])}null===b&&(s.statSync(a),b=s.readlinkSync(a)),m=n.resolve(u,b),e&&(e[a]=m),i||(f[v]=b)}t=n.resolve(m,t.slice(r)),d()}}return e&&(e[l]=t),t},e.realpath=function(t,e,r){if("function"!=typeof r&&(r=a(e),e=null),t=n.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return process.nextTick(r.bind(null,null,e[t]));var o,u,l,f,p=t,d={},g={};function m(){var e=h.exec(t);o=e[0].length,u=e[0],l=e[0],f="",i&&!g[l]?s.lstat(l,(function(t){if(t)return r(t);g[l]=!0,y()})):process.nextTick(y)}function y(){if(o>=t.length)return e&&(e[p]=t),r(null,t);c.lastIndex=o;var n=c.exec(t);return f=u,u+=n[0],l=f+n[1],o=c.lastIndex,g[l]||e&&e[l]===l?process.nextTick(y):e&&Object.prototype.hasOwnProperty.call(e,l)?_(e[l]):s.lstat(l,b)}function b(t,n){if(t)return r(t);if(!n.isSymbolicLink())return g[l]=!0,e&&(e[l]=l),process.nextTick(y);if(!i){var o=n.dev.toString(32)+":"+n.ino.toString(32);if(d.hasOwnProperty(o))return v(null,d[o],l)}s.stat(l,(function(t){if(t)return r(t);s.readlink(l,(function(t,e){i||(d[o]=e),v(t,e)}))}))}function v(t,i,s){if(t)return r(t);var o=n.resolve(f,i);e&&(e[s]=o),_(o)}function _(e){t=n.resolve(e,t.slice(o)),m()}m()}},function(t,e){const r="object"==typeof process&&process&&"win32"===process.platform;t.exports=r?{sep:"\\"}:{sep:"/"}},function(t,e,r){var n=r(14);t.exports=function(t){if(!t)return[];"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2));return m(function(t){return t.split("\\\\").join(i).split("\\{").join(s).split("\\}").join(o).split("\\,").join(a).split("\\.").join(c)}(t),!0).map(u)};var i="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function h(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function u(t){return t.split(i).join("\\").split(s).join("{").split(o).join("}").split(a).join(",").split(c).join(".")}function l(t){if(!t)return[""];var e=[],r=n("{","}",t);if(!r)return t.split(",");var i=r.pre,s=r.body,o=r.post,a=i.split(",");a[a.length-1]+="{"+s+"}";var c=l(o);return o.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}function f(t){return"{"+t+"}"}function p(t){return/^-?0\d/.test(t)}function d(t,e){return t<=e}function g(t,e){return t>=e}function m(t,e){var r=[],i=n("{","}",t);if(!i)return[t];var s=i.pre,a=i.post.length?m(i.post,!1):[""];if(/\$$/.test(i.pre))for(var c=0;c<a.length;c++){var u=s+"{"+i.body+"}"+a[c];r.push(u)}else{var y,b,v=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),_=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),w=v||_,E=i.body.indexOf(",")>=0;if(!w&&!E)return i.post.match(/,.*\}/)?m(t=i.pre+"{"+i.body+o+i.post):[t];if(w)y=i.body.split(/\.\./);else if(1===(y=l(i.body)).length&&1===(y=m(y[0],!1).map(f)).length)return a.map((function(t){return i.pre+y[0]+t}));if(w){var O=h(y[0]),k=h(y[1]),A=Math.max(y[0].length,y[1].length),S=3==y.length?Math.abs(h(y[2])):1,j=d;k<O&&(S*=-1,j=g);var x=y.some(p);b=[];for(var I=O;j(I,k);I+=S){var N;if(_)"\\"===(N=String.fromCharCode(I))&&(N="");else if(N=String(I),x){var R=A-N.length;if(R>0){var L=new Array(R+1).join("0");N=I<0?"-"+L+N.slice(1):L+N}}b.push(N)}}else{b=[];for(var M=0;M<y.length;M++)b.push.apply(b,m(y[M],!1))}for(M=0;M<b.length;M++)for(c=0;c<a.length;c++){u=s+b[M]+a[c];(!e||w||u)&&r.push(u)}}return r}},function(t,e,r){"use strict";function n(t,e,r){t instanceof RegExp&&(t=i(t,r)),e instanceof RegExp&&(e=i(e,r));var n=s(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function i(t,e){var r=e.match(t);return r?r[0]:null}function s(t,e,r){var n,i,s,o,a,c=r.indexOf(t),h=r.indexOf(e,c+1),u=c;if(c>=0&&h>0){for(n=[],s=r.length;u>=0&&!a;)u==c?(n.push(u),c=r.indexOf(t,u+1)):1==n.length?a=[n.pop(),h]:((i=n.pop())<s&&(s=i,o=h),h=r.indexOf(e,u+1)),u=c<h&&c>=0?c:h;n.length&&(a=[s,o])}return a}t.exports=n,n.range=s},function(t,e,r){try{var n=r(3);if("function"!=typeof n.inherits)throw"";t.exports=n.inherits}catch(e){t.exports=r(16)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e){t.exports=require("events")},function(t,e,r){t.exports=p,p.GlobSync=d;var n=r(5),i=r(2),s=(i.Minimatch,r(4).Glob,r(3),r(0)),o=r(6),a=r(0).isAbsolute,c=r(7),h=c.setopts,u=c.ownProp,l=c.childrenIgnored,f=c.isIgnored;function p(t,e){if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new d(t,e).found}function d(t,e){if(!t)throw new Error("must provide pattern");if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof d))return new d(t,e);if(h(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}d.prototype._finish=function(){if(o.ok(this instanceof d),this.realpath){var t=this;this.matches.forEach((function(e,r){var i=t.matches[r]=Object.create(null);for(var s in e)try{s=t._makeAbs(s),i[n.realpathSync(s,t.realpathCache)]=!0}catch(e){if("stat"!==e.syscall)throw e;i[t._makeAbs(s)]=!0}}))}c.finish(this)},d.prototype._process=function(t,e,r){o.ok(this instanceof d);for(var n,s=0;"string"==typeof t[s];)s++;switch(s){case t.length:return void this._processSimple(t.join("/"),e);case 0:n=null;break;default:n=t.slice(0,s).join("/")}var c,h=t.slice(s);null===n?c=".":a(n)||a(t.map((function(t){return"string"==typeof t?t:"[*]"})).join("/"))?(n&&a(n)||(n="/"+n),c=n):c=n;var u=this._makeAbs(c);l(this,c)||(h[0]===i.GLOBSTAR?this._processGlobStar(n,c,u,h,e,r):this._processReaddir(n,c,u,h,e,r))},d.prototype._processReaddir=function(t,e,r,n,i,o){var a=this._readdir(r,o);if(a){for(var c=n[0],h=!!this.minimatch.negate,u=c._glob,l=this.dot||"."===u.charAt(0),f=[],p=0;p<a.length;p++){if("."!==(m=a[p]).charAt(0)||l)(h&&!t?!m.match(c):m.match(c))&&f.push(m)}var d=f.length;if(0!==d)if(1!==n.length||this.mark||this.stat){n.shift();for(p=0;p<d;p++){var g;m=f[p];g=t?[t,m]:[m],this._process(g.concat(n),i,o)}}else{this.matches[i]||(this.matches[i]=Object.create(null));for(var p=0;p<d;p++){var m=f[p];t&&(m="/"!==t.slice(-1)?t+"/"+m:t+m),"/"!==m.charAt(0)||this.nomount||(m=s.join(this.root,m)),this._emitMatch(i,m)}}}},d.prototype._emitMatch=function(t,e){if(!f(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}},d.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r;try{r=this.fs.lstatSync(t)}catch(t){if("ENOENT"===t.code)return null}var n=r&&r.isSymbolicLink();return this.symlinks[t]=n,n||!r||r.isDirectory()?e=this._readdir(t,!1):this.cache[t]="FILE",e},d.prototype._readdir=function(t,e){if(e&&!u(this.symlinks,t))return this._readdirInGlobStar(t);if(u(this.cache,t)){var r=this.cache[t];if(!r||"FILE"===r)return null;if(Array.isArray(r))return r}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(e){return this._readdirError(t,e),null}},d.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var n=e[r];n="/"===t?t+n:t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,e},d.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);throw n.path=this.cwd,n.code=e.code,n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e)}},d.prototype._processGlobStar=function(t,e,r,n,i,s){var o=this._readdir(r,s);if(o){var a=n.slice(1),c=t?[t]:[],h=c.concat(a);this._process(h,i,!1);var u=o.length;if(!this.symlinks[r]||!s)for(var l=0;l<u;l++){if("."!==o[l].charAt(0)||this.dot){var f=c.concat(o[l],a);this._process(f,i,!0);var p=c.concat(o[l],n);this._process(p,i,!0)}}}},d.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),r){if(t&&a(t)&&!this.nomount){var n=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=s.join(this.root,t):(t=s.resolve(this.root,t),n&&(t+="/"))}"win32"===process.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}},d.prototype._stat=function(t){var e=this._makeAbs(t),r="/"===t.slice(-1);if(t.length>this.maxLength)return!1;if(!this.stat&&u(this.cache,e)){var n=this.cache[e];if(Array.isArray(n)&&(n="DIR"),!r||"DIR"===n)return n;if(r&&"FILE"===n)return!1}var i=this.statCache[e];if(!i){var s;try{s=this.fs.lstatSync(e)}catch(t){if(t&&("ENOENT"===t.code||"ENOTDIR"===t.code))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{i=this.fs.statSync(e)}catch(t){i=s}else i=s}this.statCache[e]=i;n=!0;return i&&(n=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||n,(!r||"FILE"!==n)&&n},d.prototype._mark=function(t){return c.mark(this,t)},d.prototype._makeAbs=function(t){return c.makeAbs(this,t)}},function(t,e,r){var n=r(8),i=Object.create(null),s=r(9);function o(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n]=t[n];return r}t.exports=n((function(t,e){return i[t]?(i[t].push(e),null):(i[t]=[e],function(t){return s((function e(){var r=i[t],n=r.length,s=o(arguments);try{for(var a=0;a<n;a++)r[a].apply(null,s)}finally{r.length>n?(r.splice(0,n),process.nextTick((function(){e.apply(null,s)}))):delete i[t]}}))}(t))}))}]));
|
|
1
|
+
!function(t,e){for(var r in e)t[r]=e[r]}(exports,function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=10)}([function(t,e){t.exports=require("path")},function(t,e){t.exports=require("fs")},function(t,e,r){const n=t.exports=(t,e,r={})=>(m(e),!(!r.nocomment&&"#"===e.charAt(0))&&new b(e,r).match(t));t.exports=n;const i=r(12);n.sep=i.sep;const s=Symbol("globstar **");n.GLOBSTAR=s;const o=r(13),a={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},c="[^/]",h=c+"*?",l=t=>t.split("").reduce(((t,e)=>(t[e]=!0,t)),{}),u=l("().*{}+?[]^$\\!"),f=l("[.("),p=/\/+/;n.filter=(t,e={})=>(r,i,s)=>n(r,t,e);const d=(t,e={})=>{const r={};return Object.keys(t).forEach((e=>r[e]=t[e])),Object.keys(e).forEach((t=>r[t]=e[t])),r};n.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return n;const e=n,r=(r,n,i)=>e(r,n,d(t,i));return(r.Minimatch=class extends e.Minimatch{constructor(e,r){super(e,d(t,r))}}).defaults=r=>e.defaults(d(t,r)).Minimatch,r.filter=(r,n)=>e.filter(r,d(t,n)),r.defaults=r=>e.defaults(d(t,r)),r.makeRe=(r,n)=>e.makeRe(r,d(t,n)),r.braceExpand=(r,n)=>e.braceExpand(r,d(t,n)),r.match=(r,n,i)=>e.match(r,n,d(t,i)),r},n.braceExpand=(t,e)=>g(t,e);const g=(t,e={})=>(m(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:o(t)),m=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},y=Symbol("subparse");n.makeRe=(t,e)=>new b(t,e||{}).makeRe(),n.match=(t,e,r={})=>{const n=new b(e,r);return t=t.filter((t=>n.match(t))),n.options.nonull&&!t.length&&t.push(e),t};class b{constructor(t,e){m(t),e||(e={}),this.options=e,this.set=[],this.pattern=t,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}debug(){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate();let r=this.globSet=this.braceExpand();e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,r),r=this.globParts=r.map((t=>t.split(p))),this.debug(this.pattern,r),r=r.map(((t,e,r)=>t.map(this.parse,this))),this.debug(this.pattern,r),r=r.filter((t=>-1===t.indexOf(!1))),this.debug(this.pattern,r),this.set=r}parseNegate(){if(this.options.nonegate)return;const t=this.pattern;let e=!1,r=0;for(let n=0;n<t.length&&"!"===t.charAt(n);n++)e=!e,r++;r&&(this.pattern=t.slice(r)),this.negate=e}matchOne(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var i=0,o=0,a=t.length,c=e.length;i<a&&o<c;i++,o++){this.debug("matchOne loop");var h,l=e[o],u=t[i];if(this.debug(e,l,u),!1===l)return!1;if(l===s){this.debug("GLOBSTAR",[e,l,u]);var f=i,p=o+1;if(p===c){for(this.debug("** at the end");i<a;i++)if("."===t[i]||".."===t[i]||!n.dot&&"."===t[i].charAt(0))return!1;return!0}for(;f<a;){var d=t[f];if(this.debug("\nglobstar while",t,f,e,p,d),this.matchOne(t.slice(f),e.slice(p),r))return this.debug("globstar found match!",f,a,d),!0;if("."===d||".."===d||!n.dot&&"."===d.charAt(0)){this.debug("dot detected!",t,f,e,p);break}this.debug("globstar swallow a segment, and continue"),f++}return!(!r||(this.debug("\n>>> no match, partial?",t,f,e,p),f!==a))}if("string"==typeof l?(h=u===l,this.debug("string match",l,u,h)):(h=u.match(l),this.debug("pattern match",l,u,h)),!h)return!1}if(i===a&&o===c)return!0;if(i===a)return r;if(o===c)return i===a-1&&""===t[i];throw new Error("wtf?")}braceExpand(){return g(this.pattern,this.options)}parse(t,e){m(t);const r=this.options;if("**"===t){if(!r.noglobstar)return s;t="*"}if(""===t)return"";let n="",i=!!r.nocase,o=!1;const l=[],p=[];let d,g,b,v,_=!1,w=-1,E=-1;const O="."===t.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",k=()=>{if(d){switch(d){case"*":n+=h,i=!0;break;case"?":n+=c,i=!0;break;default:n+="\\"+d}this.debug("clearStateChar %j %j",d,n),d=!1}};for(let e,s=0;s<t.length&&(e=t.charAt(s));s++)if(this.debug("%s\t%s %s %j",t,s,n,e),o){if("/"===e)return!1;u[e]&&(n+="\\"),n+=e,o=!1}else switch(e){case"/":return!1;case"\\":k(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",t,s,n,e),_){this.debug(" in class"),"!"===e&&s===E+1&&(e="^"),n+=e;continue}this.debug("call clearStateChar %j",d),k(),d=e,r.noext&&k();continue;case"(":if(_){n+="(";continue}if(!d){n+="\\(";continue}l.push({type:d,start:s-1,reStart:n.length,open:a[d].open,close:a[d].close}),n+="!"===d?"(?:(?!(?:":"(?:",this.debug("plType %j %j",d,n),d=!1;continue;case")":if(_||!l.length){n+="\\)";continue}k(),i=!0,b=l.pop(),n+=b.close,"!"===b.type&&p.push(b),b.reEnd=n.length;continue;case"|":if(_||!l.length){n+="\\|";continue}k(),n+="|";continue;case"[":if(k(),_){n+="\\"+e;continue}_=!0,E=s,w=n.length,n+=e;continue;case"]":if(s===E+1||!_){n+="\\"+e;continue}g=t.substring(E+1,s);try{RegExp("["+g+"]")}catch(t){v=this.parse(g,y),n=n.substring(0,w)+"\\["+v[0]+"\\]",i=i||v[1],_=!1;continue}i=!0,_=!1,n+=e;continue;default:k(),!u[e]||"^"===e&&_||(n+="\\"),n+=e}for(_&&(g=t.slice(E+1),v=this.parse(g,y),n=n.substring(0,w)+"\\["+v[0],i=i||v[1]),b=l.pop();b;b=l.pop()){let t;t=n.slice(b.reStart+b.open.length),this.debug("setting tail",n,b),t=t.replace(/((?:\\{2}){0,64})(\\?)\|/g,((t,e,r)=>(r||(r="\\"),e+e+r+"|"))),this.debug("tail=%j\n %s",t,t,b,n);const e="*"===b.type?h:"?"===b.type?c:"\\"+b.type;i=!0,n=n.slice(0,b.reStart)+e+"\\("+t}k(),o&&(n+="\\\\");const A=f[n.charAt(0)];for(let t=p.length-1;t>-1;t--){const r=p[t],i=n.slice(0,r.reStart),s=n.slice(r.reStart,r.reEnd-8);let o=n.slice(r.reEnd);const a=n.slice(r.reEnd-8,r.reEnd)+o,c=i.split("(").length-1;let h=o;for(let t=0;t<c;t++)h=h.replace(/\)[+*?]?/,"");o=h;n=i+s+o+(""===o&&e!==y?"$":"")+a}if(""!==n&&i&&(n="(?=.)"+n),A&&(n=O+n),e===y)return[n,i];if(!i)return t.replace(/\\(.)/g,"$1");const S=r.nocase?"i":"";try{return Object.assign(new RegExp("^"+n+"$",S),{_glob:t,_src:n})}catch(t){return new RegExp("$.")}}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,r=e.noglobstar?h:e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=e.nocase?"i":"";let i=t.map((t=>(t=t.map((t=>"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===s?s:t._src)).reduce(((t,e)=>(t[t.length-1]===s&&e===s||t.push(e),t)),[]),t.forEach(((e,n)=>{e===s&&t[n-1]!==s&&(0===n?t.length>1?t[n+1]="(?:\\/|"+r+"\\/)?"+t[n+1]:t[n]=r:n===t.length-1?t[n-1]+="(?:\\/|"+r+")?":(t[n-1]+="(?:\\/|\\/"+r+"\\/)"+t[n+1],t[n+1]=s))})),t.filter((t=>t!==s)).join("/")))).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch(t){this.regexp=!1}return this.regexp}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const r=this.options;"/"!==i.sep&&(t=t.split(i.sep).join("/")),t=t.split(p),this.debug(this.pattern,"split",t);const n=this.set;let s;this.debug(this.pattern,"set",n);for(let e=t.length-1;e>=0&&(s=t[e],!s);e--);for(let i=0;i<n.length;i++){const o=n[i];let a=t;r.matchBase&&1===o.length&&(a=[s]);if(this.matchOne(a,o,e))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate}static defaults(t){return n.defaults(t).Minimatch}}n.Minimatch=b},function(t,e){t.exports=require("util")},function(t,e,r){t.exports=b;var n=r(5),i=r(2),s=(i.Minimatch,r(15)),o=r(17).EventEmitter,a=r(0),c=r(6),h=r(0).isAbsolute,l=r(18),u=r(7),f=u.setopts,p=u.ownProp,d=r(19),g=(r(3),u.childrenIgnored),m=u.isIgnored,y=r(9);function b(t,e,r){if("function"==typeof e&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return l(t,e)}return new _(t,e,r)}b.sync=l;var v=b.GlobSync=l.GlobSync;function _(t,e,r){if("function"==typeof e&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new v(t,e)}if(!(this instanceof _))return new _(t,e,r);f(this,t,e),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),"function"==typeof r&&(r=y(r),this.on("error",r),this.on("end",(function(t){r(null,t)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return o();for(var s=0;s<n;s++)this._process(this.minimatch.set[s],s,!1,o);function o(){--i._processing,i._processing<=0&&i._finish()}}b.glob=b,b.hasMagic=function(t,e){var r=function(t,e){if(null===e||"object"!=typeof e)return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}({},e);r.noprocess=!0;var n=new _(t,r).minimatch.set;if(!t)return!1;if(n.length>1)return!0;for(var i=0;i<n[0].length;i++)if("string"!=typeof n[0][i])return!0;return!1},b.Glob=_,s(_,o),_.prototype._finish=function(){if(c(this instanceof _),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();u.finish(this),this.emit("end",this.found)}},_.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var t=this.matches.length;if(0===t)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,n)}function n(){0==--t&&e._finish()}},_.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var i=Object.keys(r),s=this,o=i.length;if(0===o)return e();var a=this.matches[t]=Object.create(null);i.forEach((function(r,i){r=s._makeAbs(r),n.realpath(r,s.realpathCache,(function(n,i){n?"stat"===n.syscall?a[r]=!0:s.emit("error",n):a[i]=!0,0==--o&&(s.matches[t]=a,e())}))}))},_.prototype._mark=function(t){return u.mark(this,t)},_.prototype._makeAbs=function(t){return u.makeAbs(this,t)},_.prototype.abort=function(){this.aborted=!0,this.emit("abort")},_.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},_.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(e=0;e<n.length;e++){var i=n[e];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},_.prototype._process=function(t,e,r,n){if(c(this instanceof _),c("function"==typeof n),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([t,e,r,n]);else{for(var s,o=0;"string"==typeof t[o];)o++;switch(o){case t.length:return void this._processSimple(t.join("/"),e,n);case 0:s=null;break;default:s=t.slice(0,o).join("/")}var a,l=t.slice(o);null===s?a=".":h(s)||h(t.map((function(t){return"string"==typeof t?t:"[*]"})).join("/"))?(s&&h(s)||(s="/"+s),a=s):a=s;var u=this._makeAbs(a);if(g(this,a))return n();l[0]===i.GLOBSTAR?this._processGlobStar(s,a,u,l,e,r,n):this._processReaddir(s,a,u,l,e,r,n)}},_.prototype._processReaddir=function(t,e,r,n,i,s,o){var a=this;this._readdir(r,s,(function(c,h){return a._processReaddir2(t,e,r,n,i,s,h,o)}))},_.prototype._processReaddir2=function(t,e,r,n,i,s,o,c){if(!o)return c();for(var h=n[0],l=!!this.minimatch.negate,u=h._glob,f=this.dot||"."===u.charAt(0),p=[],d=0;d<o.length;d++){if("."!==(m=o[d]).charAt(0)||f)(l&&!t?!m.match(h):m.match(h))&&p.push(m)}var g=p.length;if(0===g)return c();if(1===n.length&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(d=0;d<g;d++){var m=p[d];t&&(m="/"!==t?t+"/"+m:t+m),"/"!==m.charAt(0)||this.nomount||(m=a.join(this.root,m)),this._emitMatch(i,m)}return c()}n.shift();for(d=0;d<g;d++){m=p[d];t&&(m="/"!==t?t+"/"+m:t+m),this._process([m].concat(n),i,s,c)}c()},_.prototype._emitMatch=function(t,e){if(!this.aborted&&!m(this,e))if(this.paused)this._emitQueue.push([t,e]);else{var r=h(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0;var i=this.statCache[r];i&&this.emit("stat",e,i),this.emit("match",e)}}},_.prototype._readdirInGlobStar=function(t,e){if(!this.aborted){if(this.follow)return this._readdir(t,!1,e);var r=this,n=d("lstat\0"+t,(function(n,i){if(n&&"ENOENT"===n.code)return e();var s=i&&i.isSymbolicLink();r.symlinks[t]=s,s||!i||i.isDirectory()?r._readdir(t,!1,e):(r.cache[t]="FILE",e())}));n&&r.fs.lstat(t,n)}},_.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=d("readdir\0"+t+"\0"+e,r))){if(e&&!p(this.symlinks,t))return this._readdirInGlobStar(t,r);if(p(this.cache,t)){var n=this.cache[t];if(!n||"FILE"===n)return r();if(Array.isArray(n))return r(null,n)}this.fs.readdir(t,function(t,e,r){return function(n,i){n?t._readdirError(e,n,r):t._readdirEntries(e,i,r)}}(this,t,r))}},_.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];i="/"===t?t+i:t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,r(null,e)}},_.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(t);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=e.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e)}return r()}},_.prototype._processGlobStar=function(t,e,r,n,i,s,o){var a=this;this._readdir(r,s,(function(c,h){a._processGlobStar2(t,e,r,n,i,s,h,o)}))},_.prototype._processGlobStar2=function(t,e,r,n,i,s,o,a){if(!o)return a();var c=n.slice(1),h=t?[t]:[],l=h.concat(c);this._process(l,i,!1,a);var u=this.symlinks[r],f=o.length;if(u&&s)return a();for(var p=0;p<f;p++){if("."!==o[p].charAt(0)||this.dot){var d=h.concat(o[p],c);this._process(d,i,!0,a);var g=h.concat(o[p],n);this._process(g,i,!0,a)}}a()},_.prototype._processSimple=function(t,e,r){var n=this;this._stat(t,(function(i,s){n._processSimple2(t,e,i,s,r)}))},_.prototype._processSimple2=function(t,e,r,n,i){if(this.matches[e]||(this.matches[e]=Object.create(null)),!n)return i();if(t&&h(t)&&!this.nomount){var s=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=a.join(this.root,t):(t=a.resolve(this.root,t),s&&(t+="/"))}"win32"===process.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t),i()},_.prototype._stat=function(t,e){var r=this._makeAbs(t),n="/"===t.slice(-1);if(t.length>this.maxLength)return e();if(!this.stat&&p(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!n||"DIR"===i)return e(null,i);if(n&&"FILE"===i)return e()}var s=this.statCache[r];if(void 0!==s){if(!1===s)return e(null,s);var o=s.isDirectory()?"DIR":"FILE";return n&&"FILE"===o?e():e(null,o,s)}var a=this,c=d("stat\0"+r,(function(n,i){if(i&&i.isSymbolicLink())return a.fs.stat(r,(function(n,s){n?a._stat2(t,r,null,i,e):a._stat2(t,r,n,s,e)}));a._stat2(t,r,n,i,e)}));c&&a.fs.lstat(r,c)},_.prototype._stat2=function(t,e,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[e]=!1,i();var s="/"===t.slice(-1);if(this.statCache[e]=n,"/"===e.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||o,s&&"FILE"===o?i():i(null,o,n)}},function(t,e,r){t.exports=l,l.realpath=l,l.sync=u,l.realpathSync=u,l.monkeypatch=function(){n.realpath=l,n.realpathSync=u},l.unmonkeypatch=function(){n.realpath=i,n.realpathSync=s};var n=r(1),i=n.realpath,s=n.realpathSync,o=process.version,a=/^v[0-5]\./.test(o),c=r(11);function h(t){return t&&"realpath"===t.syscall&&("ELOOP"===t.code||"ENOMEM"===t.code||"ENAMETOOLONG"===t.code)}function l(t,e,r){if(a)return i(t,e,r);"function"==typeof e&&(r=e,e=null),i(t,e,(function(n,i){h(n)?c.realpath(t,e,r):r(n,i)}))}function u(t,e){if(a)return s(t,e);try{return s(t,e)}catch(r){if(h(r))return c.realpathSync(t,e);throw r}}},function(t,e){t.exports=require("assert")},function(t,e,r){function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.setopts=function(t,e,r){r||(r={});if(r.matchBase&&-1===e.indexOf("/")){if(r.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}t.silent=!!r.silent,t.pattern=e,t.strict=!1!==r.strict,t.realpath=!!r.realpath,t.realpathCache=r.realpathCache||Object.create(null),t.follow=!!r.follow,t.dot=!!r.dot,t.mark=!!r.mark,t.nodir=!!r.nodir,t.nodir&&(t.mark=!0);t.sync=!!r.sync,t.nounique=!!r.nounique,t.nonull=!!r.nonull,t.nosort=!!r.nosort,t.nocase=!!r.nocase,t.stat=!!r.stat,t.noprocess=!!r.noprocess,t.absolute=!!r.absolute,t.fs=r.fs||i,t.maxLength=r.maxLength||1/0,t.cache=r.cache||Object.create(null),t.statCache=r.statCache||Object.create(null),t.symlinks=r.symlinks||Object.create(null),function(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]);t.ignore.length&&(t.ignore=t.ignore.map(l))}(t,r),t.changedCwd=!1;var o=process.cwd();n(r,"cwd")?(t.cwd=s.resolve(r.cwd),t.changedCwd=t.cwd!==o):t.cwd=s.resolve(o);t.root=r.root||s.resolve(t.cwd,"/"),t.root=s.resolve(t.root),t.cwdAbs=a(t.cwd)?t.cwd:u(t,t.cwd),t.nomount=!!r.nomount,"win32"===process.platform&&(t.root=t.root.replace(/\\/g,"/"),t.cwd=t.cwd.replace(/\\/g,"/"),t.cwdAbs=t.cwdAbs.replace(/\\/g,"/"));r.nonegate=!0,r.nocomment=!0,r.allowWindowsEscape=!0,t.minimatch=new c(e,r),t.options=t.minimatch.options},e.ownProp=n,e.makeAbs=u,e.finish=function(t){for(var e=t.nounique,r=e?[]:Object.create(null),n=0,i=t.matches.length;n<i;n++){var s=t.matches[n];if(s&&0!==Object.keys(s).length){var o=Object.keys(s);e?r.push.apply(r,o):o.forEach((function(t){r[t]=!0}))}else if(t.nonull){var a=t.minimatch.globSet[n];e?r.push(a):r[a]=!0}}e||(r=Object.keys(r));t.nosort||(r=r.sort(h));if(t.mark){for(n=0;n<r.length;n++)r[n]=t._mark(r[n]);t.nodir&&(r=r.filter((function(e){var r=!/\/$/.test(e),n=t.cache[e]||t.cache[u(t,e)];return r&&n&&(r="DIR"!==n&&!Array.isArray(n)),r})))}t.ignore.length&&(r=r.filter((function(e){return!f(t,e)})));t.found=r},e.mark=function(t,e){var r=u(t,e),n=t.cache[r],i=e;if(n){var s="DIR"===n||Array.isArray(n),o="/"===e.slice(-1);if(s&&!o?i+="/":!s&&o&&(i=i.slice(0,-1)),i!==e){var a=u(t,i);t.statCache[a]=t.statCache[r],t.cache[a]=t.cache[r]}}return i},e.isIgnored=f,e.childrenIgnored=function(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return!(!t.gmatcher||!t.gmatcher.match(e))}))};var i=r(1),s=r(0),o=r(2),a=r(0).isAbsolute,c=o.Minimatch;function h(t,e){return t.localeCompare(e,"en")}function l(t){var e=null;if("/**"===t.slice(-3)){var r=t.replace(/(\/\*\*)+$/,"");e=new c(r,{dot:!0})}return{matcher:new c(t,{dot:!0}),gmatcher:e}}function u(t,e){var r=e;return r="/"===e.charAt(0)?s.join(t.root,e):a(e)||""===e?e:t.changedCwd?s.resolve(t.cwd,e):s.resolve(e),"win32"===process.platform&&(r=r.replace(/\\/g,"/")),r}function f(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return t.matcher.match(e)||!(!t.gmatcher||!t.gmatcher.match(e))}))}},function(t,e){t.exports=function t(e,r){if(e&&r)return t(e)(r);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){n[t]=e[t]})),n;function n(){for(var t=new Array(arguments.length),r=0;r<t.length;r++)t[r]=arguments[r];var n=e.apply(this,t),i=t[t.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(t){n[t]=i[t]})),n}}},function(t,e,r){var n=r(8);function i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function s(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}t.exports=n(i),t.exports.strict=n(s),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})}))},function(t,e,r){t.exports=r(4)},function(t,e,r){var n=r(0),i="win32"===process.platform,s=r(1),o=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function a(t){return"function"==typeof t?t:function(){var t;if(o){var e=new Error;t=function(t){t&&(e.message=t.message,r(t=e))}}else t=r;return t;function r(t){if(t){if(process.throwDeprecation)throw t;if(!process.noDeprecation){var e="fs: missing callback "+(t.stack||t.message);process.traceDeprecation?console.trace(e):console.error(e)}}}}()}n.normalize;if(i)var c=/(.*?)(?:[\/\\]+|$)/g;else c=/(.*?)(?:[\/]+|$)/g;if(i)var h=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else h=/^[\/]*/;e.realpathSync=function(t,e){if(t=n.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return e[t];var r,o,a,l,u=t,f={},p={};function d(){var e=h.exec(t);r=e[0].length,o=e[0],a=e[0],l="",i&&!p[a]&&(s.lstatSync(a),p[a]=!0)}for(d();r<t.length;){c.lastIndex=r;var g=c.exec(t);if(l=o,o+=g[0],a=l+g[1],r=c.lastIndex,!(p[a]||e&&e[a]===a)){var m;if(e&&Object.prototype.hasOwnProperty.call(e,a))m=e[a];else{var y=s.lstatSync(a);if(!y.isSymbolicLink()){p[a]=!0,e&&(e[a]=a);continue}var b=null;if(!i){var v=y.dev.toString(32)+":"+y.ino.toString(32);f.hasOwnProperty(v)&&(b=f[v])}null===b&&(s.statSync(a),b=s.readlinkSync(a)),m=n.resolve(l,b),e&&(e[a]=m),i||(f[v]=b)}t=n.resolve(m,t.slice(r)),d()}}return e&&(e[u]=t),t},e.realpath=function(t,e,r){if("function"!=typeof r&&(r=a(e),e=null),t=n.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return process.nextTick(r.bind(null,null,e[t]));var o,l,u,f,p=t,d={},g={};function m(){var e=h.exec(t);o=e[0].length,l=e[0],u=e[0],f="",i&&!g[u]?s.lstat(u,(function(t){if(t)return r(t);g[u]=!0,y()})):process.nextTick(y)}function y(){if(o>=t.length)return e&&(e[p]=t),r(null,t);c.lastIndex=o;var n=c.exec(t);return f=l,l+=n[0],u=f+n[1],o=c.lastIndex,g[u]||e&&e[u]===u?process.nextTick(y):e&&Object.prototype.hasOwnProperty.call(e,u)?_(e[u]):s.lstat(u,b)}function b(t,n){if(t)return r(t);if(!n.isSymbolicLink())return g[u]=!0,e&&(e[u]=u),process.nextTick(y);if(!i){var o=n.dev.toString(32)+":"+n.ino.toString(32);if(d.hasOwnProperty(o))return v(null,d[o],u)}s.stat(u,(function(t){if(t)return r(t);s.readlink(u,(function(t,e){i||(d[o]=e),v(t,e)}))}))}function v(t,i,s){if(t)return r(t);var o=n.resolve(f,i);e&&(e[s]=o),_(o)}function _(e){t=n.resolve(e,t.slice(o)),m()}m()}},function(t,e){const r="object"==typeof process&&process&&"win32"===process.platform;t.exports=r?{sep:"\\"}:{sep:"/"}},function(t,e,r){var n=r(14);t.exports=function(t){if(!t)return[];"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2));return m(function(t){return t.split("\\\\").join(i).split("\\{").join(s).split("\\}").join(o).split("\\,").join(a).split("\\.").join(c)}(t),!0).map(l)};var i="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",a="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function h(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function l(t){return t.split(i).join("\\").split(s).join("{").split(o).join("}").split(a).join(",").split(c).join(".")}function u(t){if(!t)return[""];var e=[],r=n("{","}",t);if(!r)return t.split(",");var i=r.pre,s=r.body,o=r.post,a=i.split(",");a[a.length-1]+="{"+s+"}";var c=u(o);return o.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}function f(t){return"{"+t+"}"}function p(t){return/^-?0\d/.test(t)}function d(t,e){return t<=e}function g(t,e){return t>=e}function m(t,e){var r=[],i=n("{","}",t);if(!i)return[t];var s=i.pre,a=i.post.length?m(i.post,!1):[""];if(/\$$/.test(i.pre))for(var c=0;c<a.length;c++){var l=s+"{"+i.body+"}"+a[c];r.push(l)}else{var y,b,v=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),_=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),w=v||_,E=i.body.indexOf(",")>=0;if(!w&&!E)return i.post.match(/,.*\}/)?m(t=i.pre+"{"+i.body+o+i.post):[t];if(w)y=i.body.split(/\.\./);else if(1===(y=u(i.body)).length&&1===(y=m(y[0],!1).map(f)).length)return a.map((function(t){return i.pre+y[0]+t}));if(w){var O=h(y[0]),k=h(y[1]),A=Math.max(y[0].length,y[1].length),S=3==y.length?Math.abs(h(y[2])):1,j=d;k<O&&(S*=-1,j=g);var x=y.some(p);b=[];for(var I=O;j(I,k);I+=S){var N;if(_)"\\"===(N=String.fromCharCode(I))&&(N="");else if(N=String(I),x){var R=A-N.length;if(R>0){var L=new Array(R+1).join("0");N=I<0?"-"+L+N.slice(1):L+N}}b.push(N)}}else{b=[];for(var M=0;M<y.length;M++)b.push.apply(b,m(y[M],!1))}for(M=0;M<b.length;M++)for(c=0;c<a.length;c++){l=s+b[M]+a[c];(!e||w||l)&&r.push(l)}}return r}},function(t,e,r){"use strict";function n(t,e,r){t instanceof RegExp&&(t=i(t,r)),e instanceof RegExp&&(e=i(e,r));var n=s(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function i(t,e){var r=e.match(t);return r?r[0]:null}function s(t,e,r){var n,i,s,o,a,c=r.indexOf(t),h=r.indexOf(e,c+1),l=c;if(c>=0&&h>0){for(n=[],s=r.length;l>=0&&!a;)l==c?(n.push(l),c=r.indexOf(t,l+1)):1==n.length?a=[n.pop(),h]:((i=n.pop())<s&&(s=i,o=h),h=r.indexOf(e,l+1)),l=c<h&&c>=0?c:h;n.length&&(a=[s,o])}return a}t.exports=n,n.range=s},function(t,e,r){try{var n=r(3);if("function"!=typeof n.inherits)throw"";t.exports=n.inherits}catch(e){t.exports=r(16)}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e){t.exports=require("events")},function(t,e,r){t.exports=p,p.GlobSync=d;var n=r(5),i=r(2),s=(i.Minimatch,r(4).Glob,r(3),r(0)),o=r(6),a=r(0).isAbsolute,c=r(7),h=c.setopts,l=c.ownProp,u=c.childrenIgnored,f=c.isIgnored;function p(t,e){if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new d(t,e).found}function d(t,e){if(!t)throw new Error("must provide pattern");if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof d))return new d(t,e);if(h(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}d.prototype._finish=function(){if(o.ok(this instanceof d),this.realpath){var t=this;this.matches.forEach((function(e,r){var i=t.matches[r]=Object.create(null);for(var s in e)try{s=t._makeAbs(s),i[n.realpathSync(s,t.realpathCache)]=!0}catch(e){if("stat"!==e.syscall)throw e;i[t._makeAbs(s)]=!0}}))}c.finish(this)},d.prototype._process=function(t,e,r){o.ok(this instanceof d);for(var n,s=0;"string"==typeof t[s];)s++;switch(s){case t.length:return void this._processSimple(t.join("/"),e);case 0:n=null;break;default:n=t.slice(0,s).join("/")}var c,h=t.slice(s);null===n?c=".":a(n)||a(t.map((function(t){return"string"==typeof t?t:"[*]"})).join("/"))?(n&&a(n)||(n="/"+n),c=n):c=n;var l=this._makeAbs(c);u(this,c)||(h[0]===i.GLOBSTAR?this._processGlobStar(n,c,l,h,e,r):this._processReaddir(n,c,l,h,e,r))},d.prototype._processReaddir=function(t,e,r,n,i,o){var a=this._readdir(r,o);if(a){for(var c=n[0],h=!!this.minimatch.negate,l=c._glob,u=this.dot||"."===l.charAt(0),f=[],p=0;p<a.length;p++){if("."!==(m=a[p]).charAt(0)||u)(h&&!t?!m.match(c):m.match(c))&&f.push(m)}var d=f.length;if(0!==d)if(1!==n.length||this.mark||this.stat){n.shift();for(p=0;p<d;p++){var g;m=f[p];g=t?[t,m]:[m],this._process(g.concat(n),i,o)}}else{this.matches[i]||(this.matches[i]=Object.create(null));for(var p=0;p<d;p++){var m=f[p];t&&(m="/"!==t.slice(-1)?t+"/"+m:t+m),"/"!==m.charAt(0)||this.nomount||(m=s.join(this.root,m)),this._emitMatch(i,m)}}}},d.prototype._emitMatch=function(t,e){if(!f(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}},d.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r;try{r=this.fs.lstatSync(t)}catch(t){if("ENOENT"===t.code)return null}var n=r&&r.isSymbolicLink();return this.symlinks[t]=n,n||!r||r.isDirectory()?e=this._readdir(t,!1):this.cache[t]="FILE",e},d.prototype._readdir=function(t,e){if(e&&!l(this.symlinks,t))return this._readdirInGlobStar(t);if(l(this.cache,t)){var r=this.cache[t];if(!r||"FILE"===r)return null;if(Array.isArray(r))return r}try{return this._readdirEntries(t,this.fs.readdirSync(t))}catch(e){return this._readdirError(t,e),null}},d.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var n=e[r];n="/"===t?t+n:t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,e},d.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);throw n.path=this.cwd,n.code=e.code,n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e)}},d.prototype._processGlobStar=function(t,e,r,n,i,s){var o=this._readdir(r,s);if(o){var a=n.slice(1),c=t?[t]:[],h=c.concat(a);this._process(h,i,!1);var l=o.length;if(!this.symlinks[r]||!s)for(var u=0;u<l;u++){if("."!==o[u].charAt(0)||this.dot){var f=c.concat(o[u],a);this._process(f,i,!0);var p=c.concat(o[u],n);this._process(p,i,!0)}}}},d.prototype._processSimple=function(t,e){var r=this._stat(t);if(this.matches[e]||(this.matches[e]=Object.create(null)),r){if(t&&a(t)&&!this.nomount){var n=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=s.join(this.root,t):(t=s.resolve(this.root,t),n&&(t+="/"))}"win32"===process.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(e,t)}},d.prototype._stat=function(t){var e=this._makeAbs(t),r="/"===t.slice(-1);if(t.length>this.maxLength)return!1;if(!this.stat&&l(this.cache,e)){var n=this.cache[e];if(Array.isArray(n)&&(n="DIR"),!r||"DIR"===n)return n;if(r&&"FILE"===n)return!1}var i=this.statCache[e];if(!i){var s;try{s=this.fs.lstatSync(e)}catch(t){if(t&&("ENOENT"===t.code||"ENOTDIR"===t.code))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{i=this.fs.statSync(e)}catch(t){i=s}else i=s}this.statCache[e]=i;n=!0;return i&&(n=i.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||n,(!r||"FILE"!==n)&&n},d.prototype._mark=function(t){return c.mark(this,t)},d.prototype._makeAbs=function(t){return c.makeAbs(this,t)}},function(t,e,r){var n=r(8),i=Object.create(null),s=r(9);function o(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n]=t[n];return r}t.exports=n((function(t,e){return i[t]?(i[t].push(e),null):(i[t]=[e],function(t){return s((function e(){var r=i[t],n=r.length,s=o(arguments);try{for(var a=0;a<n;a++)r[a].apply(null,s)}finally{r.length>n?(r.splice(0,n),process.nextTick((function(){e.apply(null,s)}))):delete i[t]}}))}(t))}))}]));
|
package/sys/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Node System v3.0.0-alpha.
|
|
2
|
+
Stencil Node System v3.0.0-alpha.2 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
function _interopDefaultLegacy(e) {
|
|
5
5
|
return e && "object" == typeof e && "default" in e ? e : {
|
|
@@ -476,8 +476,7 @@ const LOG_LEVELS = [ "debug", "info", "warn", "error" ], createTerminalLogger =
|
|
|
476
476
|
";" === i || "{" === i ? t = !0 : ".#,:}@$[]/*".indexOf(i) > -1 && (t = !1), t && "abcdefghijklmnopqrstuvwxyz-_".indexOf(i.toLowerCase()) > -1 ? r.push(ansiColors.cyan(i)) : r.push(i);
|
|
477
477
|
}
|
|
478
478
|
return r.join("");
|
|
479
|
-
}
|
|
480
|
-
return {
|
|
479
|
+
}, p = {
|
|
481
480
|
createLineUpdater: e.createLineUpdater,
|
|
482
481
|
createTimeSpan: (r, n = !1, s) => {
|
|
483
482
|
const o = Date.now(), u = () => Date.now() - o, f = {
|
|
@@ -604,6 +603,7 @@ const LOG_LEVELS = [ "debug", "info", "warn", "error" ], createTerminalLogger =
|
|
|
604
603
|
red: ansiColors.red,
|
|
605
604
|
yellow: ansiColors.yellow
|
|
606
605
|
};
|
|
606
|
+
return p;
|
|
607
607
|
}, shouldLog = (e, t) => LOG_LEVELS.indexOf(t) >= LOG_LEVELS.indexOf(e), formatPrefixTimestamp = () => {
|
|
608
608
|
const e = new Date;
|
|
609
609
|
return `[${clampTwoDigits(e.getMinutes())}:${clampTwoDigits(e.getSeconds())}.${Math.floor(e.getMilliseconds() / 1e3 * 10)}]`;
|
|
@@ -1793,10 +1793,10 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
1793
1793
|
})) : Promise.resolve(n);
|
|
1794
1794
|
};
|
|
1795
1795
|
}, function(e, t, r) {
|
|
1796
|
-
var n = r(11), i = r(23), s = r(48), o = r(31), a = r(49), l = function(e, t, r) {
|
|
1797
|
-
var
|
|
1798
|
-
for (
|
|
1799
|
-
|
|
1796
|
+
var n = r(11), i = r(23), s = r(48), o = r(31), a = r(49), l = "prototype", c = function(e, t, r) {
|
|
1797
|
+
var u, f, h, p = e & c.F, d = e & c.G, m = e & c.S, g = e & c.P, y = e & c.B, v = e & c.W, E = d ? i : i[t] || (i[t] = {}), b = E[l], _ = d ? n : m ? n[t] : (n[t] || {})[l];
|
|
1798
|
+
for (u in d && (r = t), r) (f = !p && _ && void 0 !== _[u]) && a(E, u) || (h = f ? _[u] : r[u],
|
|
1799
|
+
E[u] = d && "function" != typeof _[u] ? r[u] : y && f ? s(h, n) : v && _[u] == h ? function(e) {
|
|
1800
1800
|
var t = function(t, r, n) {
|
|
1801
1801
|
if (this instanceof e) {
|
|
1802
1802
|
switch (arguments.length) {
|
|
@@ -1813,11 +1813,11 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
1813
1813
|
}
|
|
1814
1814
|
return e.apply(this, arguments);
|
|
1815
1815
|
};
|
|
1816
|
-
return t
|
|
1817
|
-
}(
|
|
1818
|
-
e &
|
|
1816
|
+
return t[l] = e[l], t;
|
|
1817
|
+
}(h) : g && "function" == typeof h ? s(Function.call, h) : h, g && ((E.virtual || (E.virtual = {}))[u] = h,
|
|
1818
|
+
e & c.R && b && !b[u] && o(b, u, h)));
|
|
1819
1819
|
};
|
|
1820
|
-
|
|
1820
|
+
c.F = 1, c.G = 2, c.S = 4, c.P = 8, c.B = 16, c.W = 32, c.U = 64, c.R = 128, e.exports = c;
|
|
1821
1821
|
}, function(e, t, r) {
|
|
1822
1822
|
try {
|
|
1823
1823
|
var n = r(2);
|
|
@@ -2651,12 +2651,12 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
2651
2651
|
}
|
|
2652
2652
|
if (void 0 !== (n = this.statCache[l])) return !1 === n ? t(null, n) : (i = n.isDirectory() ? "DIR" : "FILE",
|
|
2653
2653
|
c && "FILE" === i ? t() : t(null, i, n));
|
|
2654
|
-
o = this,
|
|
2654
|
+
o = this, a = y("stat\0" + l, (function u(r, n) {
|
|
2655
2655
|
if (n && n.isSymbolicLink()) return s.stat(l, (function(r, i) {
|
|
2656
2656
|
r ? o._stat2(e, l, null, n, t) : o._stat2(e, l, r, i, t);
|
|
2657
2657
|
}));
|
|
2658
2658
|
o._stat2(e, l, r, n, t);
|
|
2659
|
-
}))
|
|
2659
|
+
})), a && s.lstat(l, a);
|
|
2660
2660
|
}, i.prototype._stat2 = function(e, t, r, n, i) {
|
|
2661
2661
|
var s, o;
|
|
2662
2662
|
return !r || "ENOENT" !== r.code && "ENOTDIR" !== r.code ? (s = "/" === e.slice(-1),
|
|
@@ -2805,7 +2805,7 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
2805
2805
|
const s = t.trim(), o = s.match(p);
|
|
2806
2806
|
if (o) {
|
|
2807
2807
|
const e = +o[1];
|
|
2808
|
-
if (e > (u || i()).LOCKFILE_VERSION) throw new ((f || function
|
|
2808
|
+
if (e > (u || i()).LOCKFILE_VERSION) throw new ((f || function t() {
|
|
2809
2809
|
return f = r(4);
|
|
2810
2810
|
}()).MessageError)(`Can't install from a lockfile of version ${e} as you're on an old yarn version that only supports versions up to ${(u || i()).LOCKFILE_VERSION}. Run \`$ yarn self-update\` to upgrade to the latest version.`);
|
|
2811
2811
|
}
|
|
@@ -3079,7 +3079,7 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
3079
3079
|
} : d ? (s = (i = new d).port2, i.port1.onmessage = b, n = o(s.postMessage, s, 1)) : u.addEventListener && "function" == typeof postMessage && !u.importScripts ? (n = function(e) {
|
|
3080
3080
|
u.postMessage(e + "", "*");
|
|
3081
3081
|
}, u.addEventListener("message", b, !1)) : n = v in c("script") ? function(e) {
|
|
3082
|
-
l.appendChild(c("script"))
|
|
3082
|
+
l.appendChild(c("script"))[v] = function() {
|
|
3083
3083
|
l.removeChild(this), E.call(e);
|
|
3084
3084
|
};
|
|
3085
3085
|
} : function(e) {
|
|
@@ -3253,18 +3253,11 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
3253
3253
|
}), l = t.mode, c = t.fs || s, void 0 === l && (l = o & ~process.umask()), a || (a = null),
|
|
3254
3254
|
u = r || function() {}, e = i.resolve(e), c.mkdir(e, l, (function(r) {
|
|
3255
3255
|
if (!r) return u(null, a = a || e);
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
break;
|
|
3262
|
-
|
|
3263
|
-
default:
|
|
3264
|
-
c.stat(e, (function(e, t) {
|
|
3265
|
-
e || !t.isDirectory() ? u(r, a) : u(null, a);
|
|
3266
|
-
}));
|
|
3267
|
-
}
|
|
3256
|
+
"ENOENT" === r.code ? n(i.dirname(e), t, (function(r, i) {
|
|
3257
|
+
r ? u(r, i) : n(e, t, u, i);
|
|
3258
|
+
})) : c.stat(e, (function(e, t) {
|
|
3259
|
+
e || !t.isDirectory() ? u(r, a) : u(null, a);
|
|
3260
|
+
}));
|
|
3268
3261
|
}));
|
|
3269
3262
|
}
|
|
3270
3263
|
var i = r(0), s = r(3), o = parseInt("0777", 8);
|
|
@@ -3277,12 +3270,7 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
3277
3270
|
try {
|
|
3278
3271
|
l.mkdirSync(t, a), n = n || t;
|
|
3279
3272
|
} catch (s) {
|
|
3280
|
-
|
|
3281
|
-
case "ENOENT":
|
|
3282
|
-
n = e(i.dirname(t), r, n), e(t, r, n);
|
|
3283
|
-
break;
|
|
3284
|
-
|
|
3285
|
-
default:
|
|
3273
|
+
if ("ENOENT" === s.code) n = e(i.dirname(t), r, n), e(t, r, n); else {
|
|
3286
3274
|
try {
|
|
3287
3275
|
c = l.statSync(t);
|
|
3288
3276
|
} catch (e) {
|
|
@@ -3775,7 +3763,7 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
3775
3763
|
};
|
|
3776
3764
|
}, function(e, t, r) {
|
|
3777
3765
|
var n = r(48), i = r(187), s = r(186), o = r(27), a = r(110), l = r(203), c = {}, u = {};
|
|
3778
|
-
|
|
3766
|
+
t = e.exports = function(e, t, r, f, h) {
|
|
3779
3767
|
var p, d, m, g, y = h ? function() {
|
|
3780
3768
|
return e;
|
|
3781
3769
|
} : l(e), v = n(r, f, t ? 2 : 1), E = 0;
|
|
@@ -3783,7 +3771,7 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
3783
3771
|
if (s(y)) {
|
|
3784
3772
|
for (p = a(e.length); p > E; E++) if ((g = t ? v(o(d = e[E])[0], d[1]) : v(e[E])) === c || g === u) return g;
|
|
3785
3773
|
} else for (m = y.call(e); !(d = m.next()).done; ) if ((g = i(m, v, d.value, t)) === c || g === u) return g;
|
|
3786
|
-
}
|
|
3774
|
+
}, t.BREAK = c, t.RETURN = u;
|
|
3787
3775
|
}, function(e, t, r) {
|
|
3788
3776
|
e.exports = !r(33) && !r(85)((function() {
|
|
3789
3777
|
return 7 != Object.defineProperty(r(68)("div"), "a", {
|
|
@@ -3903,16 +3891,15 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
3903
3891
|
};
|
|
3904
3892
|
};
|
|
3905
3893
|
}, function(e, t, r) {
|
|
3906
|
-
var n = r(27), i = r(193), s = r(101), o = r(72)("IE_PROTO"), a = function() {}, l = function() {
|
|
3894
|
+
var n = r(27), i = r(193), s = r(101), o = r(72)("IE_PROTO"), a = function() {}, l = "prototype", c = function() {
|
|
3907
3895
|
var e, t = r(68)("iframe"), n = s.length;
|
|
3908
3896
|
for (t.style.display = "none", r(102).appendChild(t), t.src = "javascript:", (e = t.contentWindow.document).open(),
|
|
3909
|
-
e.write("<script>document.F=Object<\/script>"), e.close(),
|
|
3910
|
-
return
|
|
3897
|
+
e.write("<script>document.F=Object<\/script>"), e.close(), c = e.F; n--; ) delete c[l][s[n]];
|
|
3898
|
+
return c();
|
|
3911
3899
|
};
|
|
3912
3900
|
e.exports = Object.create || function e(t, r) {
|
|
3913
3901
|
var s;
|
|
3914
|
-
return null !== t ? (a
|
|
3915
|
-
void 0 === r ? s : i(s, r);
|
|
3902
|
+
return null !== t ? (a[l] = n(t), s = new a, a[l] = null, s[o] = t) : s = c(), void 0 === r ? s : i(s, r);
|
|
3916
3903
|
};
|
|
3917
3904
|
}, function(e, t, r) {
|
|
3918
3905
|
var n = r(50), i = r(27), s = r(132);
|
|
@@ -3993,7 +3980,7 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
3993
3980
|
return !e || r >= e.length ? (this._t = void 0, i(1)) : i(0, "keys" == t ? r : "values" == t ? e[r] : [ r, e[r] ]);
|
|
3994
3981
|
}), "values"), s.Arguments = s.Array, n("keys"), n("values"), n("entries");
|
|
3995
3982
|
}, function(e, t) {}, function(e, t, r) {
|
|
3996
|
-
var n, i, s, o, a = r(69), l = r(11), c = r(48), u = r(100), f = r(41), h = r(34), p = r(46), d = r(181), m = r(183), g = r(108), y = r(109).set, v = r(191)(), E = r(70), b = r(104), _ = r(202), w = r(105), S = "Promise", k = l.TypeError, O = l.process, A = O && O.versions, C = A && A.v8 || "", T = l
|
|
3983
|
+
var n, i, s, o, a = r(69), l = r(11), c = r(48), u = r(100), f = r(41), h = r(34), p = r(46), d = r(181), m = r(183), g = r(108), y = r(109).set, v = r(191)(), E = r(70), b = r(104), _ = r(202), w = r(105), S = "Promise", k = l.TypeError, O = l.process, A = O && O.versions, C = A && A.v8 || "", T = l[S], L = "process" == u(O), $ = function() {}, x = i = E.f, R = !!function() {
|
|
3997
3984
|
var e, t;
|
|
3998
3985
|
try {
|
|
3999
3986
|
return t = ((e = T.resolve(1)).constructor = {})[r(13)("species")] = function(e) {
|
|
@@ -4096,7 +4083,7 @@ lockfile = createCommonjsModule((function(e) {
|
|
|
4096
4083
|
return e === T || e === o ? new s(e) : i(e);
|
|
4097
4084
|
}), f(f.G + f.W + f.F * !R, {
|
|
4098
4085
|
Promise: T
|
|
4099
|
-
}), r(71)(T, S), r(198)(S), o = r(23)
|
|
4086
|
+
}), r(71)(T, S), r(198)(S), o = r(23)[S], f(f.S + f.F * !R, S, {
|
|
4100
4087
|
reject: function e(t) {
|
|
4101
4088
|
var r = x(this);
|
|
4102
4089
|
return (0, r.reject)(t), r.promise;
|
package/sys/node/package.json
CHANGED
package/sys/node/prompts.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){for(var s in e)t[s]=e[s]}(exports,function(t){var e={};function s(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,s),r.l=!0,r.exports}return s.m=t,s.c=e,s.d=function(t,e,i){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)s.d(i,r,function(e){return t[e]}.bind(null,r));return i},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=8)}([function(t,e,s){"use strict";const{FORCE_COLOR:i,NODE_DISABLE_COLORS:r,TERM:n}=process.env,h={enabled:!r&&"dumb"!==n&&"0"!==i,reset:l(0,0),bold:l(1,22),dim:l(2,22),italic:l(3,23),underline:l(4,24),inverse:l(7,27),hidden:l(8,28),strikethrough:l(9,29),black:l(30,39),red:l(31,39),green:l(32,39),yellow:l(33,39),blue:l(34,39),magenta:l(35,39),cyan:l(36,39),white:l(37,39),gray:l(90,39),grey:l(90,39),bgBlack:l(40,49),bgRed:l(41,49),bgGreen:l(42,49),bgYellow:l(43,49),bgBlue:l(44,49),bgMagenta:l(45,49),bgCyan:l(46,49),bgWhite:l(47,49)};function o(t,e){let s,i=0,r="",n="";for(;i<t.length;i++)s=t[i],r+=s.open,n+=s.close,e.includes(s.close)&&(e=e.replace(s.rgx,s.close+s.open));return r+e+n}function l(t,e){let s={open:`[${t}m`,close:`[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(e){return void 0!==this&&void 0!==this.has?(this.has.includes(t)||(this.has.push(t),this.keys.push(s)),void 0===e?this:h.enabled?o(this.keys,e+""):e+""):void 0===e?function(t,e){let s={has:t,keys:e};return s.reset=h.reset.bind(s),s.bold=h.bold.bind(s),s.dim=h.dim.bind(s),s.italic=h.italic.bind(s),s.underline=h.underline.bind(s),s.inverse=h.inverse.bind(s),s.hidden=h.hidden.bind(s),s.strikethrough=h.strikethrough.bind(s),s.black=h.black.bind(s),s.red=h.red.bind(s),s.green=h.green.bind(s),s.yellow=h.yellow.bind(s),s.blue=h.blue.bind(s),s.magenta=h.magenta.bind(s),s.cyan=h.cyan.bind(s),s.white=h.white.bind(s),s.gray=h.gray.bind(s),s.grey=h.grey.bind(s),s.bgBlack=h.bgBlack.bind(s),s.bgRed=h.bgRed.bind(s),s.bgGreen=h.bgGreen.bind(s),s.bgYellow=h.bgYellow.bind(s),s.bgBlue=h.bgBlue.bind(s),s.bgMagenta=h.bgMagenta.bind(s),s.bgCyan=h.bgCyan.bind(s),s.bgWhite=h.bgWhite.bind(s),s}([t],[s]):h.enabled?o([s],e+""):e+""}}t.exports=h},function(t,e,s){"use strict";const i={to:(t,e)=>e?`[${e+1};${t+1}H`:`[${t+1}G`,move(t,e){let s="";return t<0?s+=`[${-t}D`:t>0&&(s+=`[${t}C`),e<0?s+=`[${-e}A`:e>0&&(s+=`[${e}B`),s},up:(t=1)=>`[${t}A`,down:(t=1)=>`[${t}B`,forward:(t=1)=>`[${t}C`,backward:(t=1)=>`[${t}D`,nextLine:(t=1)=>"[E".repeat(t),prevLine:(t=1)=>"[F".repeat(t),left:"[G",hide:"[?25l",show:"[?25h",save:"7",restore:"8"},r={up:(t=1)=>"[S".repeat(t),down:(t=1)=>"[T".repeat(t)},n={screen:"[2J",up:(t=1)=>"[1J".repeat(t),down:(t=1)=>"[J".repeat(t),line:"[2K",lineEnd:"[K",lineStart:"[1K",lines(t){let e="";for(let s=0;s<t;s++)e+=this.line+(s<t-1?i.up():"");return t&&(e+=i.left),e}};t.exports={cursor:i,scroll:r,erase:n,beep:""}},function(t,e,s){"use strict";t.exports={action:s(14),clear:s(15),style:s(16),strip:s(5),figures:s(6),lines:s(17),wrap:s(18),entriesToDisplay:s(19)}},function(t,e,s){"use strict";class i{constructor({token:t,date:e,parts:s,locales:i}){this.token=t,this.date=e||new Date,this.parts=s||[this],this.locales=i||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,s)=>s>t&&e instanceof i))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,s)=>s>e&&t instanceof i))}toString(){return String(this.date)}}t.exports=i},function(t,e,s){"use strict";const i=s(13),{action:r}=s(2),n=s(20),{beep:h,cursor:o}=s(1),l=s(0);t.exports=class extends n{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);const e=i.createInterface({input:this.in,escapeCodeTimeout:50});i.emitKeypressEvents(this.in,e),this.in.isTTY&&this.in.setRawMode(!0);const s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,n=(t,e)=>{let i=r(e,s);!1===i?this._&&this._(t,e):"function"==typeof this[i]?this[i](e):this.bell()};this.close=()=>{this.out.write(o.show),this.in.removeListener("keypress",n),this.in.isTTY&&this.in.setRawMode(!1),e.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",n)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(h)}render(){this.onRender(l),this.firstRender&&(this.firstRender=!1)}}},function(t,e,s){"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),s=new RegExp(e,"g");return"string"==typeof t?t.replace(s,""):t}},function(t,e,s){"use strict";const i={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},r={arrowUp:i.arrowUp,arrowDown:i.arrowDown,arrowLeft:i.arrowLeft,arrowRight:i.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"},n="win32"===process.platform?r:i;t.exports=n},function(t,e,s){"use strict";const i=s(0),{cursor:r}=s(1),n=s(4),{clear:h,figures:o,style:l,wrap:a,entriesToDisplay:u}=s(2);t.exports=class extends n{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map(((t,e)=>("string"==typeof t&&(t={title:t,value:e}),{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(void 0===t.value?e:t.value),selected:t&&t.selected,disabled:t&&t.disabled}))),this.clear=h("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map((t=>!t.selected)),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const t=this.value.filter((t=>t.selected));this.minSelected&&t.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){0===this.cursor?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((e=>e.selected=t)),this.render()}_(t,e){if(" "===t)this.handleSpaceToggle();else{if("a"!==t)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${o.arrowUp}/${o.arrowDown}: Highlight option\n ${o.arrowLeft}/${o.arrowRight}/[space]: Toggle selection\n`+(void 0===this.maxChoices?" a: Toggle all\n":"")+" enter/return: Complete answer":""}renderOption(t,e,s,r){const n=(e.selected?i.green(o.radioOn):o.radioOff)+" "+r+" ";let h,l;return e.disabled?h=t===s?i.gray().underline(e.title):i.strikethrough().gray(e.title):(h=t===s?i.cyan().underline(e.title):e.title,t===s&&e.description&&(l=` - ${e.description}`,(n.length+h.length+l.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(l="\n"+a(e.description,{margin:n.length,width:this.out.columns})))),n+h+i.gray(l||"")}paginateOptions(t){if(0===t.length)return i.red("No matches for this query.");let e,{startIndex:s,endIndex:r}=u(this.cursor,t.length,this.optionsPerPage),n=[];for(let i=s;i<r;i++)e=i===s&&s>0?o.arrowUp:i===r-1&&r<t.length?o.arrowDown:" ",n.push(this.renderOption(this.cursor,t[i],i,e));return"\n"+n.join("\n")}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");const t=[i.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(i.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let t=[l.symbol(this.done,this.aborted),i.bold(this.msg),l.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=h(t,this.out.columns)}}},function(t,e,s){t.exports=s(9)},function(t,e,s){"use strict";const i=s(10),r=["suggest","format","onState","validate","onRender","type"],n=()=>{};async function h(t=[],{onSubmit:e=n,onCancel:s=n}={}){const l={},a=h._override||{};let u,d,c,p,g,f;t=[].concat(t);const m=async(t,e,s=!1)=>{if(s||!t.validate||!0===t.validate(e))return t.format?await t.format(e,l):e};for(d of t)if(({name:p,type:g}=d),"function"==typeof g&&(g=await g(u,{...l},d),d.type=g),g){for(let t in d){if(r.includes(t))continue;let e=d[t];d[t]="function"==typeof e?await e(u,{...l},f):e}if(f=d,"string"!=typeof d.message)throw new Error("prompt message is required");if(({name:p,type:g}=d),void 0===i[g])throw new Error(`prompt type (${g}) is not defined`);if(void 0===a[d.name]||(u=await m(d,a[d.name]),void 0===u)){try{u=h._injected?o(h._injected,d.initial):await i[g](d),l[p]=u=await m(d,u,!0),c=await e(d,u,l)}catch(t){c=!await s(d,l)}if(c)return l}else l[p]=u}return l}function o(t,e){const s=t.shift();if(s instanceof Error)throw s;return void 0===s?e:s}t.exports=Object.assign(h,{prompt:h,prompts:i,inject:function(t){h._injected=(h._injected||[]).concat(t)},override:function(t){h._override=Object.assign({},t)}})},function(t,e,s){"use strict";const i=e,r=s(11),n=t=>t;function h(t,e,s={}){return new Promise(((i,h)=>{const o=new r[t](e),l=s.onAbort||n,a=s.onSubmit||n,u=s.onExit||n;o.on("state",e.onState||n),o.on("submit",(t=>i(a(t)))),o.on("exit",(t=>i(u(t)))),o.on("abort",(t=>h(l(t))))}))}i.text=t=>h("TextPrompt",t),i.password=t=>(t.style="password",i.text(t)),i.invisible=t=>(t.style="invisible",i.text(t)),i.number=t=>h("NumberPrompt",t),i.date=t=>h("DatePrompt",t),i.confirm=t=>h("ConfirmPrompt",t),i.list=t=>{const e=t.separator||",";return h("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})},i.toggle=t=>h("TogglePrompt",t),i.select=t=>h("SelectPrompt",t),i.multiselect=t=>{t.choices=[].concat(t.choices||[]);const e=t=>t.filter((t=>t.selected)).map((t=>t.value));return h("MultiselectPrompt",t,{onAbort:e,onSubmit:e})},i.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const e=t=>t.filter((t=>t.selected)).map((t=>t.value));return h("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};const o=(t,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));i.autocomplete=t=>(t.suggest=t.suggest||o,t.choices=[].concat(t.choices||[]),h("AutocompletePrompt",t))},function(t,e,s){"use strict";t.exports={TextPrompt:s(12),SelectPrompt:s(21),TogglePrompt:s(22),DatePrompt:s(23),NumberPrompt:s(33),MultiselectPrompt:s(7),AutocompletePrompt:s(34),AutocompleteMultiselectPrompt:s(35),ConfirmPrompt:s(36)}},function(t,e,s){const i=s(0),r=s(4),{erase:n,cursor:h}=s(1),{style:o,clear:l,lines:a,figures:u}=s(2);t.exports=class extends r{constructor(t={}){super(t),this.transform=o.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=l("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=i.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error)return this.red=!0,this.fire(),void this.render();this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,e){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${t}${i}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),e=this.value.slice(this.cursor);this.value=`${t}${e}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor),e=this.value.slice(this.cursor+1);this.value=`${t}${e}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return 0===this.cursor||this.placeholder&&1===this.cursor}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(h.down(a(this.outputError,this.out.columns)-1)+l(this.outputError,this.out.columns)),this.out.write(l(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(this.done),this.red?i.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((t,e,s)=>t+`\n${s?" ":u.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(n.line+h.to(0)+this.outputText+h.save+this.outputError+h.restore+h.move(this.cursorOffset,0)))}}},function(t,e){t.exports=require("readline")},function(t,e,s){"use strict";t.exports=(t,e)=>{if(!t.meta||"escape"===t.name){if(t.ctrl){if("a"===t.name)return"first";if("c"===t.name)return"abort";if("d"===t.name)return"abort";if("e"===t.name)return"last";if("g"===t.name)return"reset"}if(e){if("j"===t.name)return"down";if("k"===t.name)return"up"}return"return"===t.name||"enter"===t.name?"submit":"backspace"===t.name?"delete":"delete"===t.name?"deleteForward":"abort"===t.name?"abort":"escape"===t.name?"exit":"tab"===t.name?"next":"pagedown"===t.name?"nextPage":"pageup"===t.name?"prevPage":"home"===t.name?"home":"end"===t.name?"end":"up"===t.name?"up":"down"===t.name?"down":"right"===t.name?"right":"left"===t.name&&"left"}}},function(t,e,s){"use strict";const i=s(5),{erase:r,cursor:n}=s(1);t.exports=function(t,e){if(!e)return r.line+n.to(0);let s=0;const h=t.split(/\r?\n/);for(let t of h)s+=1+Math.floor(Math.max([...i(t)].length-1,0)/e);return r.lines(s)}},function(t,e,s){"use strict";const i=s(0),r=s(6),n=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),h=Object.freeze({aborted:i.red(r.cross),done:i.green(r.tick),exited:i.yellow(r.cross),default:i.cyan("?")});t.exports={styles:n,render:t=>n[t]||n.default,symbols:h,symbol:(t,e,s)=>e?h.aborted:s?h.exited:t?h.done:h.default,delimiter:t=>i.gray(t?r.ellipsis:r.pointerSmall),item:(t,e)=>i.gray(t?e?r.pointerSmall:"+":r.line)}},function(t,e,s){"use strict";const i=s(5);t.exports=function(t,e){let s=String(i(t)||"").split(/\r?\n/);return e?s.map((t=>Math.ceil(t.length/e))).reduce(((t,e)=>t+e)):s.length}},function(t,e,s){"use strict";t.exports=(t,e={})=>{const s=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",i=e.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,e)=>(e.length+s.length>=i||t[t.length-1].length+e.length+1<i?t[t.length-1]+=` ${e}`:t.push(`${s}${e}`),t)),[s]).join("\n"))).join("\n")}},function(t,e,s){"use strict";t.exports=(t,e,s)=>{s=s||e;let i=Math.min(e-s,t-Math.floor(s/2));return i<0&&(i=0),{startIndex:i,endIndex:Math.min(i+s,e)}}},function(t,e){t.exports=require("events")},function(t,e,s){"use strict";const i=s(0),r=s(4),{style:n,clear:h,figures:o,wrap:l,entriesToDisplay:a}=s(2),{cursor:u}=s(1);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map(((t,e)=>("string"==typeof t&&(t={title:t,value:e}),{title:t&&(t.title||t.value||t),value:t&&(void 0===t.value?e:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}))),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=h("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){0===this.cursor?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(t,e){if(" "===t)return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(u.hide):this.out.write(h(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:e}=a(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(!1),this.done?this.selection.title:this.selection.disabled?i.yellow(this.warn):i.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let s=t;s<e;s++){let r,n,h="",a=this.choices[s];n=s===t&&t>0?o.arrowUp:s===e-1&&e<this.choices.length?o.arrowDown:" ",a.disabled?(r=this.cursor===s?i.gray().underline(a.title):i.strikethrough().gray(a.title),n=(this.cursor===s?i.bold().gray(o.pointer)+" ":" ")+n):(r=this.cursor===s?i.cyan().underline(a.title):a.title,n=(this.cursor===s?i.cyan(o.pointer)+" ":" ")+n,a.description&&this.cursor===s&&(h=` - ${a.description}`,(n.length+r.length+h.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(h="\n"+l(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${n} ${r}${i.gray(h)}\n`}}this.out.write(this.outputText)}}},function(t,e,s){const i=s(0),r=s(4),{style:n,clear:h}=s(2),{cursor:o,erase:l}=s(1);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(!1===this.value)return this.bell();this.value=!1,this.render()}activate(){if(!0===this.value)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(t,e){if(" "===t)this.value=!this.value;else if("1"===t)this.value=!0;else{if("0"!==t)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(o.hide):this.out.write(h(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(this.done),this.value?this.inactive:i.cyan().underline(this.inactive),i.gray("/"),this.value?i.cyan().underline(this.active):this.active].join(" "),this.out.write(l.line+o.to(0)+this.outputText))}}},function(t,e,s){"use strict";const i=s(0),r=s(4),{style:n,clear:h,figures:o}=s(2),{erase:l,cursor:a}=s(1),{DatePart:u,Meridiem:d,Day:c,Hours:p,Milliseconds:g,Minutes:f,Month:m,Seconds:b,Year:v}=s(24),w=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,y={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new c(t),3:t=>new m(t),4:t=>new v(t),5:t=>new d(t),6:t=>new p(t),7:t=>new f(t),8:t=>new b(t),9:t=>new g(t)},x={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(x,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.mask||"YYYY-MM-DD HH:mm:ss",this.clear=h("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(t){t&&this._date.setTime(t.getTime())}set mask(t){let e;for(this.parts=[];e=w.exec(t);){let t=e.shift(),s=e.findIndex((t=>null!=t));this.parts.push(s in y?y[s]({token:e[s]||t,date:this.date,parts:this.parts,locales:this.locales}):e[s]||t)}let s=this.parts.reduce(((t,e)=>("string"==typeof e&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e),t)),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof u))),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let t=this.parts[this.cursor].prev();if(null==t)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(null==t)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof u))),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(a.hide):this.out.write(h(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(!1),this.parts.reduce(((t,e,s)=>t.concat(s!==this.cursor||this.done?e:i.cyan().underline(e.toString()))),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce(((t,e,s)=>t+`\n${s?" ":o.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(l.line+a.to(0)+this.outputText))}}},function(t,e,s){"use strict";t.exports={DatePart:s(3),Meridiem:s(25),Day:s(26),Hours:s(27),Milliseconds:s(28),Minutes:s(29),Month:s(30),Seconds:s(31),Year:s(32)}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),e=this.date.getDay();return"DD"===this.token?String(t).padStart(2,"0"):"Do"===this.token?t+(s=t,1==(s%=10)?"st":2===s?"nd":3===s?"rd":"th"):"d"===this.token?e+1:"ddd"===this.token?this.locales.weekdaysShort[e]:"dddd"===this.token?this.locales.weekdays[e]:t;var s}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),e=this.token.length;return 2===e?String(t+1).padStart(2,"0"):3===e?this.locales.monthsShort[t]:4===e?this.locales.months[t]:String(t+1)}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?t.substr(-2):t}}},function(t,e,s){const i=s(0),r=s(4),{cursor:n,erase:h}=s(1),{style:o,figures:l,clear:a,lines:u}=s(2),d=/[0-9]/,c=t=>void 0!==t,p=(t,e)=>{let s=Math.pow(10,e);return Math.round(t*s)/s};t.exports=class extends r{constructor(t={}){super(t),this.transform=o.render(t.style),this.msg=t.message,this.initial=c(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=c(t.min)?t.min:-1/0,this.max=c(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){t||0===t?(this.placeholder=!1,this.rendered=this.transform.render(`${p(t,this.round)}`),this._value=p(t,this.round)):(this.placeholder=!0,this.rendered=i.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return"-"===t||"."===t&&this.float||d.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=""!==t?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();let t=this.value;this.value=""!==t?t:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){if(this.typed="",""===this.value&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",""===this.value&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let t=this.value.toString();if(0===t.length)return this.bell();this.value=this.parse(t=t.slice(0,-1))||"",""!==this.value&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(t,e){if(!this.valid(t))return this.bell();const s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=s,this.color="cyan","."===t)return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(n.down(u(this.outputError,this.out.columns)-1)+a(this.outputError,this.out.columns)),this.out.write(a(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(this.done),this.done&&(this.done||this.placeholder)?this.rendered:i[this.color]().underline(this.rendered)].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((t,e,s)=>t+`\n${s?" ":l.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(h.line+n.to(0)+this.outputText+n.save+this.outputError+n.restore))}}},function(t,e,s){"use strict";const i=s(0),r=s(4),{erase:n,cursor:h}=s(1),{style:o,clear:l,figures:a,wrap:u,entriesToDisplay:d}=s(2),c=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),p=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial="number"==typeof t.initial?t.initial:((t,e)=>{const s=t.findIndex((t=>t.value===e||t.title===e));return s>-1?s:void 0})(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=o.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=l("",this.out.columns),this.complete(this.render),this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return"number"==typeof this._fb?t=this.choices[this._fb]:"string"==typeof this._fb&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=c(this.suggestions,t):this.value=this.fallback.value,this.fire()}async complete(t){const e=this.completing=this.suggest(this.input,this.choices),s=await e;if(this.completing!==e)return;this.suggestions=s.map(((t,e,s)=>({title:p(s,e),value:c(s,e),description:t.description}))),this.completing=!1;const i=Math.max(s.length-1,0);this.moveSelect(Math.min(i,this.select)),t&&t()}reset(){this.input="",this.complete((()=>{this.moveSelect(void 0!==this.initial?this.initial:0),this.render()})),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(t,e){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${t}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let t=this.input.slice(0,this.cursor-1),e=this.input.slice(this.cursor);this.input=`${t}${e}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),e=this.input.slice(this.cursor+1);this.input=`${t}${e}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){0===this.select?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(t,e,s,r){let n,h=s?a.arrowUp:r?a.arrowDown:" ",o=e?i.cyan().underline(t.title):t.title;return h=(e?i.cyan(a.pointer)+" ":" ")+h,t.description&&(n=` - ${t.description}`,(h.length+o.length+n.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(n="\n"+u(t.description,{margin:3,width:this.out.columns}))),h+" "+o+i.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(h.hide):this.out.write(l(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:e}=d(this.select,this.choices.length,this.limit);if(this.outputText=[o.symbol(this.done,this.aborted,this.exited),i.bold(this.msg),o.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const s=this.suggestions.slice(t,e).map(((s,i)=>this.renderOption(s,this.select===i+t,0===i&&t>0,i+t===e-1&&e<this.choices.length))).join("\n");this.outputText+="\n"+(s||i.gray(this.fallback.title))}this.out.write(n.line+h.to(0)+this.outputText)}}},function(t,e,s){"use strict";const i=s(0),{cursor:r}=s(1),n=s(7),{clear:h,style:o,figures:l}=s(2);t.exports=class extends n{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=h("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){0===this.cursor?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>!this.inputValue||(!("string"!=typeof t.title||!t.title.toLowerCase().includes(this.inputValue.toLowerCase()))||!("string"!=typeof t.value||!t.value.toLowerCase().includes(this.inputValue.toLowerCase())))));const e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e,this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,e){" "===t?this.handleSpaceToggle():this.handleInputChange(t)}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`:""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:i.gray("Enter something to filter")}\n`}renderOption(t,e,s){let r;return r=e.disabled?t===s?i.gray().underline(e.title):i.strikethrough().gray(e.title):t===s?i.cyan().underline(e.title):e.title,(e.selected?i.green(l.radioOn):l.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");const t=[i.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(i.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let t=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=h(t,this.out.columns)}}},function(t,e,s){const i=s(0),r=s(4),{style:n,clear:h}=s(2),{erase:o,cursor:l}=s(1);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(t,e){return"y"===t.toLowerCase()?(this.value=!0,this.submit()):"n"===t.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(l.hide):this.out.write(h(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:i.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(o.line+l.to(0)+this.outputText))}}}]));
|
|
1
|
+
!function(t,e){for(var s in e)t[s]=e[s]}(exports,function(t){var e={};function s(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,s),r.l=!0,r.exports}return s.m=t,s.c=e,s.d=function(t,e,i){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)s.d(i,r,function(e){return t[e]}.bind(null,r));return i},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=8)}([function(t,e,s){"use strict";const{FORCE_COLOR:i,NODE_DISABLE_COLORS:r,TERM:n}=process.env,h={enabled:!r&&"dumb"!==n&&"0"!==i,reset:l(0,0),bold:l(1,22),dim:l(2,22),italic:l(3,23),underline:l(4,24),inverse:l(7,27),hidden:l(8,28),strikethrough:l(9,29),black:l(30,39),red:l(31,39),green:l(32,39),yellow:l(33,39),blue:l(34,39),magenta:l(35,39),cyan:l(36,39),white:l(37,39),gray:l(90,39),grey:l(90,39),bgBlack:l(40,49),bgRed:l(41,49),bgGreen:l(42,49),bgYellow:l(43,49),bgBlue:l(44,49),bgMagenta:l(45,49),bgCyan:l(46,49),bgWhite:l(47,49)};function o(t,e){let s,i=0,r="",n="";for(;i<t.length;i++)s=t[i],r+=s.open,n+=s.close,e.includes(s.close)&&(e=e.replace(s.rgx,s.close+s.open));return r+e+n}function l(t,e){let s={open:`[${t}m`,close:`[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(e){return void 0!==this&&void 0!==this.has?(this.has.includes(t)||(this.has.push(t),this.keys.push(s)),void 0===e?this:h.enabled?o(this.keys,e+""):e+""):void 0===e?function(t,e){let s={has:t,keys:e};return s.reset=h.reset.bind(s),s.bold=h.bold.bind(s),s.dim=h.dim.bind(s),s.italic=h.italic.bind(s),s.underline=h.underline.bind(s),s.inverse=h.inverse.bind(s),s.hidden=h.hidden.bind(s),s.strikethrough=h.strikethrough.bind(s),s.black=h.black.bind(s),s.red=h.red.bind(s),s.green=h.green.bind(s),s.yellow=h.yellow.bind(s),s.blue=h.blue.bind(s),s.magenta=h.magenta.bind(s),s.cyan=h.cyan.bind(s),s.white=h.white.bind(s),s.gray=h.gray.bind(s),s.grey=h.grey.bind(s),s.bgBlack=h.bgBlack.bind(s),s.bgRed=h.bgRed.bind(s),s.bgGreen=h.bgGreen.bind(s),s.bgYellow=h.bgYellow.bind(s),s.bgBlue=h.bgBlue.bind(s),s.bgMagenta=h.bgMagenta.bind(s),s.bgCyan=h.bgCyan.bind(s),s.bgWhite=h.bgWhite.bind(s),s}([t],[s]):h.enabled?o([s],e+""):e+""}}t.exports=h},function(t,e,s){"use strict";const i="[",r={to:(t,e)=>e?`${i}${e+1};${t+1}H`:`${i}${t+1}G`,move(t,e){let s="";return t<0?s+=`${i}${-t}D`:t>0&&(s+=`${i}${t}C`),e<0?s+=`${i}${-e}A`:e>0&&(s+=`${i}${e}B`),s},up:(t=1)=>`${i}${t}A`,down:(t=1)=>`${i}${t}B`,forward:(t=1)=>`${i}${t}C`,backward:(t=1)=>`${i}${t}D`,nextLine:(t=1)=>`${i}E`.repeat(t),prevLine:(t=1)=>`${i}F`.repeat(t),left:`${i}G`,hide:`${i}?25l`,show:`${i}?25h`,save:"7",restore:"8"},n={up:(t=1)=>`${i}S`.repeat(t),down:(t=1)=>`${i}T`.repeat(t)},h={screen:`${i}2J`,up:(t=1)=>`${i}1J`.repeat(t),down:(t=1)=>`${i}J`.repeat(t),line:`${i}2K`,lineEnd:`${i}K`,lineStart:`${i}1K`,lines(t){let e="";for(let s=0;s<t;s++)e+=this.line+(s<t-1?r.up():"");return t&&(e+=r.left),e}};t.exports={cursor:r,scroll:n,erase:h,beep:""}},function(t,e,s){"use strict";t.exports={action:s(14),clear:s(15),style:s(16),strip:s(5),figures:s(6),lines:s(17),wrap:s(18),entriesToDisplay:s(19)}},function(t,e,s){"use strict";class i{constructor({token:t,date:e,parts:s,locales:i}){this.token=t,this.date=e||new Date,this.parts=s||[this],this.locales=i||{}}up(){}down(){}next(){const t=this.parts.indexOf(this);return this.parts.find(((e,s)=>s>t&&e instanceof i))}setTo(t){}prev(){let t=[].concat(this.parts).reverse();const e=t.indexOf(this);return t.find(((t,s)=>s>e&&t instanceof i))}toString(){return String(this.date)}}t.exports=i},function(t,e,s){"use strict";const i=s(13),{action:r}=s(2),n=s(20),{beep:h,cursor:o}=s(1),l=s(0);t.exports=class extends n{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);const e=i.createInterface({input:this.in,escapeCodeTimeout:50});i.emitKeypressEvents(this.in,e),this.in.isTTY&&this.in.setRawMode(!0);const s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,n=(t,e)=>{let i=r(e,s);!1===i?this._&&this._(t,e):"function"==typeof this[i]?this[i](e):this.bell()};this.close=()=>{this.out.write(o.show),this.in.removeListener("keypress",n),this.in.isTTY&&this.in.setRawMode(!1),e.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",n)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(h)}render(){this.onRender(l),this.firstRender&&(this.firstRender=!1)}}},function(t,e,s){"use strict";t.exports=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),s=new RegExp(e,"g");return"string"==typeof t?t.replace(s,""):t}},function(t,e,s){"use strict";const i={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"},r={arrowUp:i.arrowUp,arrowDown:i.arrowDown,arrowLeft:i.arrowLeft,arrowRight:i.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"√",cross:"×",ellipsis:"...",pointerSmall:"»",line:"─",pointer:">"},n="win32"===process.platform?r:i;t.exports=n},function(t,e,s){"use strict";const i=s(0),{cursor:r}=s(1),n=s(4),{clear:h,figures:o,style:l,wrap:a,entriesToDisplay:u}=s(2);t.exports=class extends n{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map(((t,e)=>("string"==typeof t&&(t={title:t,value:e}),{title:t&&(t.title||t.value||t),description:t&&t.description,value:t&&(void 0===t.value?e:t.value),selected:t&&t.selected,disabled:t&&t.disabled}))),this.clear=h("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map((t=>!t.selected)),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter((t=>t.selected))}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){const t=this.value.filter((t=>t.selected));this.minSelected&&t.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){0===this.cursor?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const t=this.value[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();const t=!this.value[this.cursor].selected;this.value.filter((t=>!t.disabled)).forEach((e=>e.selected=t)),this.render()}_(t,e){if(" "===t)this.handleSpaceToggle();else{if("a"!==t)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${o.arrowUp}/${o.arrowDown}: Highlight option\n ${o.arrowLeft}/${o.arrowRight}/[space]: Toggle selection\n`+(void 0===this.maxChoices?" a: Toggle all\n":"")+" enter/return: Complete answer":""}renderOption(t,e,s,r){const n=(e.selected?i.green(o.radioOn):o.radioOff)+" "+r+" ";let h,l;return e.disabled?h=t===s?i.gray().underline(e.title):i.strikethrough().gray(e.title):(h=t===s?i.cyan().underline(e.title):e.title,t===s&&e.description&&(l=` - ${e.description}`,(n.length+h.length+l.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(l="\n"+a(e.description,{margin:n.length,width:this.out.columns})))),n+h+i.gray(l||"")}paginateOptions(t){if(0===t.length)return i.red("No matches for this query.");let e,{startIndex:s,endIndex:r}=u(this.cursor,t.length,this.optionsPerPage),n=[];for(let i=s;i<r;i++)e=i===s&&s>0?o.arrowUp:i===r-1&&r<t.length?o.arrowDown:" ",n.push(this.renderOption(this.cursor,t[i],i,e));return"\n"+n.join("\n")}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");const t=[i.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(i.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let t=[l.symbol(this.done,this.aborted),i.bold(this.msg),l.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=h(t,this.out.columns)}}},function(t,e,s){t.exports=s(9)},function(t,e,s){"use strict";const i=s(10),r=["suggest","format","onState","validate","onRender","type"],n=()=>{};async function h(t=[],{onSubmit:e=n,onCancel:s=n}={}){const l={},a=h._override||{};let u,d,c,p,g,f;t=[].concat(t);const m=async(t,e,s=!1)=>{if(s||!t.validate||!0===t.validate(e))return t.format?await t.format(e,l):e};for(d of t)if(({name:p,type:g}=d),"function"==typeof g&&(g=await g(u,{...l},d),d.type=g),g){for(let t in d){if(r.includes(t))continue;let e=d[t];d[t]="function"==typeof e?await e(u,{...l},f):e}if(f=d,"string"!=typeof d.message)throw new Error("prompt message is required");if(({name:p,type:g}=d),void 0===i[g])throw new Error(`prompt type (${g}) is not defined`);if(void 0===a[d.name]||(u=await m(d,a[d.name]),void 0===u)){try{u=h._injected?o(h._injected,d.initial):await i[g](d),l[p]=u=await m(d,u,!0),c=await e(d,u,l)}catch(t){c=!await s(d,l)}if(c)return l}else l[p]=u}return l}function o(t,e){const s=t.shift();if(s instanceof Error)throw s;return void 0===s?e:s}t.exports=Object.assign(h,{prompt:h,prompts:i,inject:function(t){h._injected=(h._injected||[]).concat(t)},override:function(t){h._override=Object.assign({},t)}})},function(t,e,s){"use strict";const i=e,r=s(11),n=t=>t;function h(t,e,s={}){return new Promise(((i,h)=>{const o=new r[t](e),l=s.onAbort||n,a=s.onSubmit||n,u=s.onExit||n;o.on("state",e.onState||n),o.on("submit",(t=>i(a(t)))),o.on("exit",(t=>i(u(t)))),o.on("abort",(t=>h(l(t))))}))}i.text=t=>h("TextPrompt",t),i.password=t=>(t.style="password",i.text(t)),i.invisible=t=>(t.style="invisible",i.text(t)),i.number=t=>h("NumberPrompt",t),i.date=t=>h("DatePrompt",t),i.confirm=t=>h("ConfirmPrompt",t),i.list=t=>{const e=t.separator||",";return h("TextPrompt",t,{onSubmit:t=>t.split(e).map((t=>t.trim()))})},i.toggle=t=>h("TogglePrompt",t),i.select=t=>h("SelectPrompt",t),i.multiselect=t=>{t.choices=[].concat(t.choices||[]);const e=t=>t.filter((t=>t.selected)).map((t=>t.value));return h("MultiselectPrompt",t,{onAbort:e,onSubmit:e})},i.autocompleteMultiselect=t=>{t.choices=[].concat(t.choices||[]);const e=t=>t.filter((t=>t.selected)).map((t=>t.value));return h("AutocompleteMultiselectPrompt",t,{onAbort:e,onSubmit:e})};const o=(t,e)=>Promise.resolve(e.filter((e=>e.title.slice(0,t.length).toLowerCase()===t.toLowerCase())));i.autocomplete=t=>(t.suggest=t.suggest||o,t.choices=[].concat(t.choices||[]),h("AutocompletePrompt",t))},function(t,e,s){"use strict";t.exports={TextPrompt:s(12),SelectPrompt:s(21),TogglePrompt:s(22),DatePrompt:s(23),NumberPrompt:s(33),MultiselectPrompt:s(7),AutocompletePrompt:s(34),AutocompleteMultiselectPrompt:s(35),ConfirmPrompt:s(36)}},function(t,e,s){const i=s(0),r=s(4),{erase:n,cursor:h}=s(1),{style:o,clear:l,lines:a,figures:u}=s(2);t.exports=class extends r{constructor(t={}){super(t),this.transform=o.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=l("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=i.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error)return this.red=!0,this.fire(),void this.render();this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,e){let s=this.value.slice(0,this.cursor),i=this.value.slice(this.cursor);this.value=`${s}${t}${i}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),e=this.value.slice(this.cursor);this.value=`${t}${e}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor),e=this.value.slice(this.cursor+1);this.value=`${t}${e}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return 0===this.cursor||this.placeholder&&1===this.cursor}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(h.down(a(this.outputError,this.out.columns)-1)+l(this.outputError,this.out.columns)),this.out.write(l(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(this.done),this.red?i.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((t,e,s)=>t+`\n${s?" ":u.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(n.line+h.to(0)+this.outputText+h.save+this.outputError+h.restore+h.move(this.cursorOffset,0)))}}},function(t,e){t.exports=require("readline")},function(t,e,s){"use strict";t.exports=(t,e)=>{if(!t.meta||"escape"===t.name){if(t.ctrl){if("a"===t.name)return"first";if("c"===t.name)return"abort";if("d"===t.name)return"abort";if("e"===t.name)return"last";if("g"===t.name)return"reset"}if(e){if("j"===t.name)return"down";if("k"===t.name)return"up"}return"return"===t.name||"enter"===t.name?"submit":"backspace"===t.name?"delete":"delete"===t.name?"deleteForward":"abort"===t.name?"abort":"escape"===t.name?"exit":"tab"===t.name?"next":"pagedown"===t.name?"nextPage":"pageup"===t.name?"prevPage":"home"===t.name?"home":"end"===t.name?"end":"up"===t.name?"up":"down"===t.name?"down":"right"===t.name?"right":"left"===t.name&&"left"}}},function(t,e,s){"use strict";const i=s(5),{erase:r,cursor:n}=s(1);t.exports=function(t,e){if(!e)return r.line+n.to(0);let s=0;const h=t.split(/\r?\n/);for(let t of h)s+=1+Math.floor(Math.max([...i(t)].length-1,0)/e);return r.lines(s)}},function(t,e,s){"use strict";const i=s(0),r=s(6),n=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"😃".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),h=Object.freeze({aborted:i.red(r.cross),done:i.green(r.tick),exited:i.yellow(r.cross),default:i.cyan("?")});t.exports={styles:n,render:t=>n[t]||n.default,symbols:h,symbol:(t,e,s)=>e?h.aborted:s?h.exited:t?h.done:h.default,delimiter:t=>i.gray(t?r.ellipsis:r.pointerSmall),item:(t,e)=>i.gray(t?e?r.pointerSmall:"+":r.line)}},function(t,e,s){"use strict";const i=s(5);t.exports=function(t,e){let s=String(i(t)||"").split(/\r?\n/);return e?s.map((t=>Math.ceil(t.length/e))).reduce(((t,e)=>t+e)):s.length}},function(t,e,s){"use strict";t.exports=(t,e={})=>{const s=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",i=e.width;return(t||"").split(/\r?\n/g).map((t=>t.split(/\s+/g).reduce(((t,e)=>(e.length+s.length>=i||t[t.length-1].length+e.length+1<i?t[t.length-1]+=` ${e}`:t.push(`${s}${e}`),t)),[s]).join("\n"))).join("\n")}},function(t,e,s){"use strict";t.exports=(t,e,s)=>{s=s||e;let i=Math.min(e-s,t-Math.floor(s/2));return i<0&&(i=0),{startIndex:i,endIndex:Math.min(i+s,e)}}},function(t,e){t.exports=require("events")},function(t,e,s){"use strict";const i=s(0),r=s(4),{style:n,clear:h,figures:o,wrap:l,entriesToDisplay:a}=s(2),{cursor:u}=s(1);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map(((t,e)=>("string"==typeof t&&(t={title:t,value:e}),{title:t&&(t.title||t.value||t),value:t&&(void 0===t.value?e:t.value),description:t&&t.description,selected:t&&t.selected,disabled:t&&t.disabled}))),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=h("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){0===this.cursor?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(t,e){if(" "===t)return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(u.hide):this.out.write(h(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:e}=a(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(!1),this.done?this.selection.title:this.selection.disabled?i.yellow(this.warn):i.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let s=t;s<e;s++){let r,n,h="",a=this.choices[s];n=s===t&&t>0?o.arrowUp:s===e-1&&e<this.choices.length?o.arrowDown:" ",a.disabled?(r=this.cursor===s?i.gray().underline(a.title):i.strikethrough().gray(a.title),n=(this.cursor===s?i.bold().gray(o.pointer)+" ":" ")+n):(r=this.cursor===s?i.cyan().underline(a.title):a.title,n=(this.cursor===s?i.cyan(o.pointer)+" ":" ")+n,a.description&&this.cursor===s&&(h=` - ${a.description}`,(n.length+r.length+h.length>=this.out.columns||a.description.split(/\r?\n/).length>1)&&(h="\n"+l(a.description,{margin:3,width:this.out.columns})))),this.outputText+=`${n} ${r}${i.gray(h)}\n`}}this.out.write(this.outputText)}}},function(t,e,s){const i=s(0),r=s(4),{style:n,clear:h}=s(2),{cursor:o,erase:l}=s(1);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(!1===this.value)return this.bell();this.value=!1,this.render()}activate(){if(!0===this.value)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(t,e){if(" "===t)this.value=!this.value;else if("1"===t)this.value=!0;else{if("0"!==t)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(o.hide):this.out.write(h(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(this.done),this.value?this.inactive:i.cyan().underline(this.inactive),i.gray("/"),this.value?i.cyan().underline(this.active):this.active].join(" "),this.out.write(l.line+o.to(0)+this.outputText))}}},function(t,e,s){"use strict";const i=s(0),r=s(4),{style:n,clear:h,figures:o}=s(2),{erase:l,cursor:a}=s(1),{DatePart:u,Meridiem:d,Day:c,Hours:p,Milliseconds:g,Minutes:f,Month:m,Seconds:b,Year:v}=s(24),w=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,y={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new c(t),3:t=>new m(t),4:t=>new v(t),5:t=>new d(t),6:t=>new p(t),7:t=>new f(t),8:t=>new b(t),9:t=>new g(t)},x={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(x,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.mask||"YYYY-MM-DD HH:mm:ss",this.clear=h("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(t){t&&this._date.setTime(t.getTime())}set mask(t){let e;for(this.parts=[];e=w.exec(t);){let t=e.shift(),s=e.findIndex((t=>null!=t));this.parts.push(s in y?y[s]({token:e[s]||t,date:this.date,parts:this.parts,locales:this.locales}):e[s]||t)}let s=this.parts.reduce(((t,e)=>("string"==typeof e&&"string"==typeof t[t.length-1]?t[t.length-1]+=e:t.push(e),t)),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex((t=>t instanceof u))),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let t=this.parts[this.cursor].prev();if(null==t)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(null==t)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex((t=>t instanceof u))),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(a.hide):this.out.write(h(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(!1),this.parts.reduce(((t,e,s)=>t.concat(s!==this.cursor||this.done?e:i.cyan().underline(e.toString()))),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce(((t,e,s)=>t+`\n${s?" ":o.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(l.line+a.to(0)+this.outputText))}}},function(t,e,s){"use strict";t.exports={DatePart:s(3),Meridiem:s(25),Day:s(26),Hours:s(27),Milliseconds:s(28),Minutes:s(29),Month:s(30),Seconds:s(31),Year:s(32)}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),e=this.date.getDay();return"DD"===this.token?String(t).padStart(2,"0"):"Do"===this.token?t+(s=t,1==(s%=10)?"st":2===s?"nd":3===s?"rd":"th"):"d"===this.token?e+1:"ddd"===this.token?this.locales.weekdaysShort[e]:"dddd"===this.token?this.locales.weekdays[e]:t;var s}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),e=this.token.length;return 2===e?String(t+1).padStart(2,"0"):3===e?this.locales.monthsShort[t]:4===e?this.locales.months[t]:String(t+1)}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}}},function(t,e,s){"use strict";const i=s(3);t.exports=class extends i{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?t.substr(-2):t}}},function(t,e,s){const i=s(0),r=s(4),{cursor:n,erase:h}=s(1),{style:o,figures:l,clear:a,lines:u}=s(2),d=/[0-9]/,c=t=>void 0!==t,p=(t,e)=>{let s=Math.pow(10,e);return Math.round(t*s)/s};t.exports=class extends r{constructor(t={}){super(t),this.transform=o.render(t.style),this.msg=t.message,this.initial=c(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=c(t.min)?t.min:-1/0,this.max=c(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){t||0===t?(this.placeholder=!1,this.rendered=this.transform.render(`${p(t,this.round)}`),this._value=p(t,this.round)):(this.placeholder=!0,this.rendered=i.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return"-"===t||"."===t&&this.float||d.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=""!==t?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let t=await this.validator(this.value);"string"==typeof t&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(await this.validate(),this.error)return this.color="red",this.fire(),void this.render();let t=this.value;this.value=""!==t?t:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){if(this.typed="",""===this.value&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",""===this.value&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let t=this.value.toString();if(0===t.length)return this.bell();this.value=this.parse(t=t.slice(0,-1))||"",""!==this.value&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(t,e){if(!this.valid(t))return this.bell();const s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=s,this.color="cyan","."===t)return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(n.down(u(this.outputError,this.out.columns)-1)+a(this.outputError,this.out.columns)),this.out.write(a(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(this.done),this.done&&(this.done||this.placeholder)?this.rendered:i[this.color]().underline(this.rendered)].join(" "),this.error&&(this.outputError+=this.errorMsg.split("\n").reduce(((t,e,s)=>t+`\n${s?" ":l.pointerSmall} ${i.red().italic(e)}`),"")),this.out.write(h.line+n.to(0)+this.outputText+n.save+this.outputError+n.restore))}}},function(t,e,s){"use strict";const i=s(0),r=s(4),{erase:n,cursor:h}=s(1),{style:o,clear:l,figures:a,wrap:u,entriesToDisplay:d}=s(2),c=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),p=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial="number"==typeof t.initial?t.initial:((t,e)=>{const s=t.findIndex((t=>t.value===e||t.title===e));return s>-1?s:void 0})(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=o.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=l("",this.out.columns),this.complete(this.render),this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return"number"==typeof this._fb?t=this.choices[this._fb]:"string"==typeof this._fb&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=c(this.suggestions,t):this.value=this.fallback.value,this.fire()}async complete(t){const e=this.completing=this.suggest(this.input,this.choices),s=await e;if(this.completing!==e)return;this.suggestions=s.map(((t,e,s)=>({title:p(s,e),value:c(s,e),description:t.description}))),this.completing=!1;const i=Math.max(s.length-1,0);this.moveSelect(Math.min(i,this.select)),t&&t()}reset(){this.input="",this.complete((()=>{this.moveSelect(void 0!==this.initial?this.initial:0),this.render()})),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(t,e){let s=this.input.slice(0,this.cursor),i=this.input.slice(this.cursor);this.input=`${s}${t}${i}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let t=this.input.slice(0,this.cursor-1),e=this.input.slice(this.cursor);this.input=`${t}${e}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),e=this.input.slice(this.cursor+1);this.input=`${t}${e}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){0===this.select?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(t,e,s,r){let n,h=s?a.arrowUp:r?a.arrowDown:" ",o=e?i.cyan().underline(t.title):t.title;return h=(e?i.cyan(a.pointer)+" ":" ")+h,t.description&&(n=` - ${t.description}`,(h.length+o.length+n.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(n="\n"+u(t.description,{margin:3,width:this.out.columns}))),h+" "+o+i.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(h.hide):this.out.write(l(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:e}=d(this.select,this.choices.length,this.limit);if(this.outputText=[o.symbol(this.done,this.aborted,this.exited),i.bold(this.msg),o.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const s=this.suggestions.slice(t,e).map(((s,i)=>this.renderOption(s,this.select===i+t,0===i&&t>0,i+t===e-1&&e<this.choices.length))).join("\n");this.outputText+="\n"+(s||i.gray(this.fallback.title))}this.out.write(n.line+h.to(0)+this.outputText)}}},function(t,e,s){"use strict";const i=s(0),{cursor:r}=s(1),n=s(7),{clear:h,style:o,figures:l}=s(2);t.exports=class extends n{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=h("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){0===this.cursor?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter((t=>!this.inputValue||(!("string"!=typeof t.title||!t.title.toLowerCase().includes(this.inputValue.toLowerCase()))||!("string"!=typeof t.value||!t.value.toLowerCase().includes(this.inputValue.toLowerCase())))));const e=this.filteredOptions.findIndex((e=>e===t));this.cursor=e<0?0:e,this.render()}handleSpaceToggle(){const t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter((t=>t.selected)).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,e){" "===t?this.handleSpaceToggle():this.handleInputChange(t)}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`\nInstructions:\n ${l.arrowUp}/${l.arrowDown}: Highlight option\n ${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection\n [a,b,c]/delete: Filter choices\n enter/return: Complete answer\n`:""}renderCurrentInput(){return`\nFiltered results for: ${this.inputValue?this.inputValue:i.gray("Enter something to filter")}\n`}renderOption(t,e,s){let r;return r=e.disabled?t===s?i.gray().underline(e.title):i.strikethrough().gray(e.title):t===s?i.cyan().underline(e.title):e.title,(e.selected?i.green(l.radioOn):l.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter((t=>t.selected)).map((t=>t.title)).join(", ");const t=[i.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(i.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(r.hide),super.render();let t=[o.symbol(this.done,this.aborted),i.bold(this.msg),o.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=i.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=h(t,this.out.columns)}}},function(t,e,s){const i=s(0),r=s(4),{style:n,clear:h}=s(2),{erase:o,cursor:l}=s(1);t.exports=class extends r{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(t,e){return"y"===t.toLowerCase()?(this.value=!0,this.submit()):"n"===t.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(l.hide):this.out.write(h(this.outputText,this.out.columns)),super.render(),this.outputText=[n.symbol(this.done,this.aborted),i.bold(this.msg),n.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:i.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(o.line+l.to(0)+this.outputText))}}}]));
|
package/sys/node/worker.js
CHANGED