UNPKG

chessfessor

Version:

The best app to extract your chess data from Lichess and Chess.com

3 lines 56.4 kB
#!/usr/bin/env node /*! For license information please see chessfessor.js.LICENSE.txt */ (()=>{var e={434:(e,t,n)=>{"use strict";e=n.nmd(e);const r=n(85),i=(e,t)=>function(){const n=e.apply(r,arguments);return`[${n+t}m`},s=(e,t)=>function(){const n=e.apply(r,arguments);return`[${38+t};5;${n}m`},o=(e,t)=>function(){const n=e.apply(r,arguments);return`[${38+t};2;${n[0]};${n[1]};${n[2]}m`};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,t={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};t.color.grey=t.color.gray;for(const n of Object.keys(t)){const r=t[n];for(const n of Object.keys(r)){const i=r[n];t[n]={open:`[${i[0]}m`,close:`[${i[1]}m`},r[n]=t[n],e.set(i[0],i[1])}Object.defineProperty(t,n,{value:r,enumerable:!1}),Object.defineProperty(t,"codes",{value:e,enumerable:!1})}const n=e=>e,a=(e,t,n)=>[e,t,n];t.color.close="",t.bgColor.close="",t.color.ansi={ansi:i(n,0)},t.color.ansi256={ansi256:s(n,0)},t.color.ansi16m={rgb:o(a,0)},t.bgColor.ansi={ansi:i(n,10)},t.bgColor.ansi256={ansi256:s(n,10)},t.bgColor.ansi16m={rgb:o(a,10)};for(let e of Object.keys(r)){if("object"!=typeof r[e])continue;const n=r[e];"ansi16"===e&&(e="ansi"),"ansi16"in n&&(t.color.ansi[e]=i(n.ansi16,0),t.bgColor.ansi[e]=i(n.ansi16,10)),"ansi256"in n&&(t.color.ansi256[e]=s(n.ansi256,0),t.bgColor.ansi256[e]=s(n.ansi256,10)),"rgb"in n&&(t.color.ansi16m[e]=o(n.rgb,0),t.bgColor.ansi16m[e]=o(n.rgb,10))}return t}})},589:(e,t,n)=>{"use strict";const r=n(150),i=n(434),s=n(130).stdout,o=n(864),a="win32"===process.platform&&!(process.env.TERM||"").toLowerCase().startsWith("xterm"),l=["ansi","ansi","ansi256","ansi16m"],u=new Set(["gray"]),c=Object.create(null);function h(e,t){t=t||{};const n=s?s.level:0;e.level=void 0===t.level?n:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function f(e){if(!this||!(this instanceof f)||this.template){const t={};return h(t,e),t.template=function(){const e=[].slice.call(arguments);return m.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,f.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=f,t.template}h(this,e)}a&&(i.blue.open="");for(const e of Object.keys(i))i[e].closeRe=new RegExp(r(i[e].close),"g"),c[e]={get(){const t=i[e];return p.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};c.visible={get(){return p.call(this,this._styles||[],!0,"visible")}},i.color.closeRe=new RegExp(r(i.color.close),"g");for(const e of Object.keys(i.color.ansi))u.has(e)||(c[e]={get(){const t=this.level;return function(){const n=i.color[l[t]][e].apply(null,arguments),r={open:n,close:i.color.close,closeRe:i.color.closeRe};return p.call(this,this._styles?this._styles.concat(r):[r],this._empty,e)}}});i.bgColor.closeRe=new RegExp(r(i.bgColor.close),"g");for(const e of Object.keys(i.bgColor.ansi))u.has(e)||(c["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const t=this.level;return function(){const n=i.bgColor[l[t]][e].apply(null,arguments),r={open:n,close:i.bgColor.close,closeRe:i.bgColor.closeRe};return p.call(this,this._styles?this._styles.concat(r):[r],this._empty,e)}}});const d=Object.defineProperties((()=>{}),c);function p(e,t,n){const r=function(){return g.apply(r,arguments)};r._styles=e,r._empty=t;const i=this;return Object.defineProperty(r,"level",{enumerable:!0,get:()=>i.level,set(e){i.level=e}}),Object.defineProperty(r,"enabled",{enumerable:!0,get:()=>i.enabled,set(e){i.enabled=e}}),r.hasGrey=this.hasGrey||"gray"===n||"grey"===n,r.__proto__=d,r}function g(){const e=arguments,t=e.length;let n=String(arguments[0]);if(0===t)return"";if(t>1)for(let r=1;r<t;r++)n+=" "+e[r];if(!this.enabled||this.level<=0||!n)return this._empty?"":n;const r=i.dim.open;a&&this.hasGrey&&(i.dim.open="");for(const e of this._styles.slice().reverse())n=e.open+n.replace(e.closeRe,e.open)+e.close,n=n.replace(/\r?\n/g,`${e.close}$&${e.open}`);return i.dim.open=r,n}function m(e,t){if(!Array.isArray(t))return[].slice.call(arguments,1).join(" ");const n=[].slice.call(arguments,2),r=[t.raw[0]];for(let e=1;e<t.length;e++)r.push(String(n[e-1]).replace(/[{}\\]/g,"\\$&")),r.push(String(t.raw[e]));return o(e,r.join(""))}Object.defineProperties(f.prototype,c),e.exports=f(),e.exports.supportsColor=s,e.exports.default=e.exports},864:e=>{"use strict";const t=/(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,n=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,r=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,i=/\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi,s=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function o(e){return"u"===e[0]&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):s.get(e)||e}function a(e,t){const n=[],s=t.trim().split(/\s*,\s*/g);let a;for(const t of s)if(isNaN(t)){if(!(a=t.match(r)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);n.push(a[2].replace(i,((e,t,n)=>t?o(t):n)))}else n.push(Number(t));return n}function l(e){n.lastIndex=0;const t=[];let r;for(;null!==(r=n.exec(e));){const e=r[1];if(r[2]){const n=a(e,r[2]);t.push([e].concat(n))}else t.push([e])}return t}function u(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const e of Object.keys(n))if(Array.isArray(n[e])){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=n[e].length>0?r[e].apply(r,n[e]):r[e]}return r}e.exports=(e,n)=>{const r=[],i=[];let s=[];if(n.replace(t,((t,n,a,c,h,f)=>{if(n)s.push(o(n));else if(c){const t=s.join("");s=[],i.push(0===r.length?t:u(e,r)(t)),r.push({inverse:a,styles:l(c)})}else if(h){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");i.push(u(e,r)(s.join(""))),s=[],r.pop()}else s.push(f)})),i.push(s.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")}},562:function(e,t){!function(e){"use strict";e.pgn2json=function(e){var t,n,r=e.split("\n"),i={str:{},moves:[],annotations:[],nag:[]},s=[];r.forEach(((e,t,n)=>n[t]=n[t].trim().replace("\r",""))),r=function(e){return e.filter((e=>"%"!==e.trim()[0]))}(r),[i.str,t]=function(e){var t={};for(let r=0;r<e.length;r++){var n=e[r];if("["===n[0]){let e=n.substring(1,n.indexOf(" ")),r=n.substring(n.indexOf(" ")+2,n.length-2);t[e]=r}else if("["!==n[0]&&""!==n.trim())return[t,e.slice(e.indexOf(n)).join(" ").trim().split("")]}}(r),n=t.join("").split(" ");for(let e=1;n.includes(`${e}.`);e++)s.push(n.indexOf(`${e}.`));return i.nag=function(e,t){var n=[];return e.filter((e=>e.includes("$"))).map((r=>{var i=0;n.length&&(i=n[n.length-1]);var s=t.filter((t=>t<e.indexOf(r,i)));return n.push(s[s.length-1]),{moveCount:s.length,value:r}}))}(n,s),i.annotations=function(e,t,n){for(var r=[];-1!==e.indexOf("{");){var i=e.indexOf("{"),s=e.indexOf("}"),o=e.splice(i,s-i+2).join(""),a=t.indexOf(o.split(" ")[0]);r.push({moveCount:n.filter((e=>e<a)).length,comment:o.substring(1,o.length-2)})}return r}(t,n,s),(t=(t=t.join("").split(" ")).filter((e=>!e.includes(".")&&!e.includes("$")))).pop(),i.moves=t,JSON.stringify(i,null,4)},Object.defineProperty(e,"__esModule",{value:!0})}(t)},168:(e,t,n)=>{var r=n(874),i={};for(var s in r)r.hasOwnProperty(s)&&(i[r[s]]=s);var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var a in o)if(o.hasOwnProperty(a)){if(!("channels"in o[a]))throw new Error("missing channels property: "+a);if(!("labels"in o[a]))throw new Error("missing channel labels property: "+a);if(o[a].labels.length!==o[a].channels)throw new Error("channel and label counts mismatch: "+a);var l=o[a].channels,u=o[a].labels;delete o[a].channels,delete o[a].labels,Object.defineProperty(o[a],"channels",{value:l}),Object.defineProperty(o[a],"labels",{value:u})}o.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,s=e[2]/255,o=Math.min(r,i,s),a=Math.max(r,i,s),l=a-o;return a===o?t=0:r===a?t=(i-s)/l:i===a?t=2+(s-r)/l:s===a&&(t=4+(r-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+a)/2,[t,100*(a===o?0:n<=.5?l/(a+o):l/(2-a-o)),100*n]},o.rgb.hsv=function(e){var t,n,r,i,s,o=e[0]/255,a=e[1]/255,l=e[2]/255,u=Math.max(o,a,l),c=u-Math.min(o,a,l),h=function(e){return(u-e)/6/c+.5};return 0===c?i=s=0:(s=c/u,t=h(o),n=h(a),r=h(l),o===u?i=r-n:a===u?i=1/3+t-r:l===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*s,100*u]},o.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[o.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(n,r))*100,100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},o.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},o.rgb.keyword=function(e){var t=i[e];if(t)return t;var n,s,o,a=1/0;for(var l in r)if(r.hasOwnProperty(l)){var u=(s=e,o=r[l],Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)+Math.pow(s[2]-o[2],2));u<a&&(a=u,n=l)}return n},o.keyword.rgb=function(e){return r[e]},o.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},o.rgb.lab=function(e){var t=o.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return r/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},o.hsl.rgb=function(e){var t,n,r,i,s,o=e[0]/360,a=e[1]/100,l=e[2]/100;if(0===a)return[s=255*l,s,s];t=2*l-(n=l<.5?l*(1+a):l+a-l*a),i=[0,0,0];for(var u=0;u<3;u++)(r=o+1/3*-(u-1))<0&&r++,r>1&&r--,s=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[u]=255*s;return i},o.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,s=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=s<=1?s:2-s,[t,100*(0===r?2*i/(s+i):2*n/(r+n)),(r+n)/2*100]},o.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,s=t-Math.floor(t),o=255*r*(1-n),a=255*r*(1-n*s),l=255*r*(1-n*(1-s));switch(r*=255,i){case 0:return[r,l,o];case 1:return[a,r,o];case 2:return[o,r,l];case 3:return[o,a,r];case 4:return[l,o,r];case 5:return[r,o,a]}},o.hsv.hsl=function(e){var t,n,r,i=e[0],s=e[1]/100,o=e[2]/100,a=Math.max(o,.01);return r=(2-s)*o,n=s*a,[i,100*(n=(n/=(t=(2-s)*a)<=1?t:2-t)||0),100*(r/=2)]},o.hwb.rgb=function(e){var t,n,r,i,s,o,a,l=e[0]/360,u=e[1]/100,c=e[2]/100,h=u+c;switch(h>1&&(u/=h,c/=h),r=6*l-(t=Math.floor(6*l)),0!=(1&t)&&(r=1-r),i=u+r*((n=1-c)-u),t){default:case 6:case 0:s=n,o=i,a=u;break;case 1:s=i,o=n,a=u;break;case 2:s=u,o=n,a=i;break;case 3:s=u,o=i,a=n;break;case 4:s=i,o=u,a=n;break;case 5:s=n,o=u,a=i}return[255*s,255*o,255*a]},o.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},o.xyz.rgb=function(e){var t,n,r,i=e[0]/100,s=e[1]/100,o=e[2]/100;return n=-.9689*i+1.8758*s+.0415*o,r=.0557*i+-.204*s+1.057*o,t=(t=3.2406*i+-1.5372*s+-.4986*o)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},o.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},o.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var s=Math.pow(n,3),o=Math.pow(t,3),a=Math.pow(r,3);return n=s>.008856?s:(n-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},o.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},o.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},o.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],i=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var s=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===i&&(s+=60),s},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},o.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},o.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},o.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},o.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,s=Math.max(Math.max(n,r),i),o=Math.min(Math.min(n,r),i),a=s-o;return t=a<=0?0:s===n?(r-i)/a%6:s===r?2+(i-n)/a:4+(n-r)/a+4,t/=6,[360*(t%=1),100*a,100*(a<1?o/(1-a):0)]},o.hsl.hcg=function(e){var t,n=e[1]/100,r=e[2]/100,i=0;return(t=r<.5?2*n*r:2*n*(1-r))<1&&(i=(r-.5*t)/(1-t)),[e[0],100*t,100*i]},o.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},o.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,s=[0,0,0],o=t%1*6,a=o%1,l=1-a;switch(Math.floor(o)){case 0:s[0]=1,s[1]=a,s[2]=0;break;case 1:s[0]=l,s[1]=1,s[2]=0;break;case 2:s[0]=0,s[1]=1,s[2]=a;break;case 3:s[0]=0,s[1]=l,s[2]=1;break;case 4:s[0]=a,s[1]=0,s[2]=1;break;default:s[0]=1,s[1]=0,s[2]=l}return i=(1-n)*r,[255*(n*s[0]+i),255*(n*s[1]+i),255*(n*s[2]+i)]},o.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},o.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},o.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},o.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]},o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},85:(e,t,n)=>{var r=n(168),i=n(111),s={};Object.keys(r).forEach((function(e){s[e]={},Object.defineProperty(s[e],"channels",{value:r[e].channels}),Object.defineProperty(s[e],"labels",{value:r[e].labels});var t=i(e);Object.keys(t).forEach((function(n){var r=t[n];s[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,i=0;i<r;i++)n[i]=Math.round(n[i]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(r),s[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=s},111:(e,t,n)=>{var r=n(168);function i(e,t){return function(n){return t(e(n))}}function s(e,t){for(var n=[t[e].parent,e],s=r[t[e].parent][e],o=t[e].parent;t[o].parent;)n.unshift(t[o].parent),s=i(r[t[o].parent][o],s),o=t[o].parent;return s.conversion=n,s}e.exports=function(e){for(var t=function(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,i=0;i<n;i++)e[t[i]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var i=n.pop(),s=Object.keys(r[i]),o=s.length,a=0;a<o;a++){var l=s[a],u=t[l];-1===u.distance&&(u.distance=t[i].distance+1,u.parent=i,n.unshift(l))}return t}(e),n={},i=Object.keys(t),o=i.length,a=0;a<o;a++){var l=i[a];null!==t[l].parent&&(n[l]=s(l,t))}return n}},874:e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},933:(e,t,n)=>{"use strict";const r=(i=n(884))&&"object"==typeof i&&"default"in i?i.default:i;var i;function s(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)?Array.prototype.slice.call(e):[e]}function o(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)?Array.prototype.slice.call(e):[e]}function a(e,t){const n=[],r=o(arguments);return r.splice(0,2),o(e).forEach(((e,i)=>{let s=[];r.forEach((t=>{"function"==typeof t?s=s.concat(t(e)):s.push(t)})),t(e)&&n.push({index:i,replaceWithValue:s})})),n.reverse().forEach((t=>{const n=[t.index,1].concat(t.replaceWithValue);e.splice.apply(e,n)})),e}const l={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/};class u extends Array{load(e){if(this.clear(),e&&e!==process.argv)e=s(e);else{e=process.argv.slice(0);const t=process.execArgv.some(g)?1:2;e.splice(0,t)}e.forEach((e=>this.push(String(e))))}clear(){this.length=0}expandOptionEqualsNotation(){if(this.some((e=>l.optEquals.test(e)))){const e=[];this.forEach((t=>{const n=t.match(l.optEquals);n?e.push(n[1],n[2]):e.push(t)})),this.clear(),this.load(e)}}expandGetoptNotation(){this.hasCombinedShortOptions()&&a(this,l.combinedShort,c)}hasCombinedShortOptions(){return this.some((e=>l.combinedShort.test(e)))}static from(e){const t=new this;return t.load(e),t}}function c(e){return(e=e.slice(1)).split("").map((e=>"-"+e))}function h(e){return l.optEquals.test(e)}function f(e){return(l.short.test(e)||l.long.test(e))&&!l.optEquals.test(e)}function d(e){return l.short.test(e)?e.match(l.short)[1]:function(e){return l.long.test(e)&&!h(e)}(e)?e.match(l.long)[1]:h(e)?e.match(l.optEquals)[1].replace(/^--/,""):null}function p(e){return!(f(e)||l.combinedShort.test(e)||l.optEquals.test(e))}function g(e){return["--eval","-e"].indexOf(e)>-1||e.startsWith("--eval=")}function m(e){return"object"==typeof e&&null!==e}function b(e){return void 0!==e}function y(e){return"function"==typeof e}const v={isNumber:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isString:function(e){return"string"==typeof e},isBoolean:function(e){return"boolean"==typeof e},isPlainObject:function(e){return null!==e&&"object"==typeof e&&e.constructor===Object},isArrayLike:function(e){return m(e)&&"number"==typeof e.length},isObject:m,isDefined:b,isFunction:y,isClass:function(e){return!!y(e)&&/^class /.test(Function.prototype.toString.call(e))},isPrimitive:function(e){if(null===e)return!0;switch(typeof e){case"string":case"number":case"symbol":case"undefined":case"boolean":return!0;default:return!1}},isPromise:function(e){if(e){const t=b(Promise)&&e instanceof Promise,n=e.then&&"function"==typeof e.then;return!(!t&&!n)}return!1},isIterable:function(e){return!(null===e||!b(e)||"function"!=typeof e[Symbol.iterator]&&"function"!=typeof e[Symbol.asyncIterator])}};class w{constructor(e){this.name=e.name,this.type=e.type||String,this.alias=e.alias,this.multiple=e.multiple,this.lazyMultiple=e.lazyMultiple,this.defaultOption=e.defaultOption,this.defaultValue=e.defaultValue,this.group=e.group;for(const t in e)this[t]||(this[t]=e[t])}isBoolean(){return this.type===Boolean||v.isFunction(this.type)&&"Boolean"===this.type.name}isMultiple(){return this.multiple||this.lazyMultiple}static create(e){return new this(e)}}class x extends Array{validate(){let e;this.some((e=>!e.name))&&O("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition"),this.some((e=>e.type&&"function"!=typeof e.type))&&O("INVALID_DEFINITIONS","Invalid option definitions: the `type` property must be a setter fuction (default: `Boolean`)"),this.some((t=>(e=t,v.isDefined(t.alias)&&v.isNumber(t.alias))))&&O("INVALID_DEFINITIONS","Invalid option definition: to avoid ambiguity an alias cannot be numeric [--"+e.name+" alias is -"+e.alias+"]"),this.some((t=>(e=t,v.isDefined(t.alias)&&1!==t.alias.length)))&&O("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character"),this.some((t=>(e=t,"-"===t.alias)))&&O("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"'),j(this.map((e=>e.name)))&&O("INVALID_DEFINITIONS","Two or more option definitions have the same name"),j(this.map((e=>e.alias)))&&O("INVALID_DEFINITIONS","Two or more option definitions have the same alias"),j(this.map((e=>e.defaultOption)))&&O("INVALID_DEFINITIONS","Only one option definition can be the defaultOption"),this.some((t=>(e=t,t.isBoolean()&&t.defaultOption)))&&O("INVALID_DEFINITIONS",`A boolean option ["${e.name}"] can not also be the defaultOption.`)}get(e){return f(e)?l.short.test(e)?this.find((t=>t.alias===d(e))):this.find((t=>t.name===d(e))):this.find((t=>t.name===e))}getDefault(){return this.find((e=>!0===e.defaultOption))}isGrouped(){return this.some((e=>e.group))}whereGrouped(){return this.filter(k)}whereNotGrouped(){return this.filter((e=>!k(e)))}whereDefaultValueSet(){return this.filter((e=>v.isDefined(e.defaultValue)))}static from(e){if(e instanceof this)return e;const t=super.from(s(e),(e=>w.create(e)));return t.validate(),t}}function O(e,t){const n=new Error(t);throw n.name=e,n}function k(e){return s(e.group).some((e=>e))}function j(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];if(t[r])return!0;v.isDefined(r)&&(t[r]=!0)}}class M{constructor(e,t){this.options=Object.assign({},t),this.definitions=x.from(e),this.argv=u.from(this.options.argv),this.argv.hasCombinedShortOptions()&&a(this.argv,l.combinedShort.test.bind(l.combinedShort),(e=>(e=e.slice(1)).split("").map((t=>({origArg:`-${e}`,arg:"-"+t})))))}*[Symbol.iterator](){const e=this.definitions;let t,n,r,i,s,o=!1,a=!1;for(let u of this.argv){if(v.isPlainObject(u)&&(s=u.origArg,u=u.arg),a&&this.options.stopAtFirstUnknown){yield{event:"unknown_value",arg:u,name:"_unknown",value:void 0};continue}if(f(u))t=e.get(u),n=void 0,t?(n=!!t.isBoolean()||null,i="set"):i="unknown_option";else if(h(u)){const r=u.match(l.optEquals);t=e.get(r[1]),t?t.isBoolean()?(yield{event:"unknown_value",arg:u,name:"_unknown",value:n,def:t},i="set",n=!0):(i="set",n=r[2]):i="unknown_option"}else p(u)&&(t?(n=u,i="set"):(t=this.definitions.getDefault(),t&&!o?(n=u,i="set"):(i="unknown_value",t=void 0)));r=t?t.name:"_unknown";const c={event:i,arg:u,name:r,value:n,def:t};s&&(c.subArg=u,c.arg=s),yield c,"_unknown"===r&&(a=!0),t&&t.defaultOption&&!t.isMultiple()&&"set"===i&&(o=!0),t&&t.isBoolean()&&(t=void 0),t&&!t.multiple&&v.isDefined(n)&&null!==n&&(t=void 0),n=void 0,i=void 0,r=void 0,s=void 0}}}const E=new WeakMap;class W{constructor(e){this.definition=new w(e),this.state=null,this.resetToDefault()}get(){return E.get(this)}set(e){this._set(e,"set")}_set(e,t){const n=this.definition;if(n.isMultiple()){if(null!=e){const r=this.get();"default"===this.state&&(r.length=0),r.push(n.type(e)),this.state=t}}else{if(!n.isMultiple()&&"set"===this.state){const t=new Error(`Singular option already set [${this.definition.name}=${this.get()}]`);throw t.name="ALREADY_SET",t.value=e,t.optionName=n.name,t}null==e?E.set(this,e):(E.set(this,n.type(e)),this.state=t)}}resetToDefault(){v.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?E.set(this,s(this.definition.defaultValue).slice()):E.set(this,this.definition.defaultValue):this.definition.isMultiple()?E.set(this,[]):E.set(this,null),this.state="default"}static create(e){return(e=new w(e)).isBoolean()?C.create(e):new this(e)}}class C extends W{set(e){super.set(!0)}static create(e){return new this(e)}}class N extends Map{constructor(e){super(),this.definitions=x.from(e),this.set("_unknown",W.create({name:"_unknown",multiple:!0}));for(const e of this.definitions.whereDefaultValueSet())this.set(e.name,W.create(e))}toObject(e){e=e||{};const t={};for(const n of this){const i=e.camelCase&&"_unknown"!==n[0]?r(n[0]):n[0],s=n[1];("_unknown"!==i||s.get().length)&&(t[i]=s.get())}return e.skipUnknown&&delete t._unknown,t}}class I extends N{toObject(e){const t=super.toObject({skipUnknown:e.skipUnknown}),n=super.toObject(e),i=n._unknown;delete n._unknown;const o={_all:n};return i&&i.length&&(o._unknown=i),this.definitions.whereGrouped().forEach((n=>{const i=e.camelCase?r(n.name):n.name,a=t[n.name];for(const e of s(n.group))o[e]=o[e]||{},v.isDefined(a)&&(o[e][i]=a)})),this.definitions.whereNotGrouped().forEach((n=>{const i=e.camelCase?r(n.name):n.name,s=t[n.name];v.isDefined(s)&&(o._none||(o._none={}),o._none[i]=s)})),o}}e.exports=function(e,t){(t=t||{}).stopAtFirstUnknown&&(t.partial=!0),e=x.from(e);const n=new M(e,{argv:t.argv,stopAtFirstUnknown:t.stopAtFirstUnknown}),r=new(e.isGrouped()?I:N)(e);for(const e of n){const n=e.subArg||e.arg;if(!t.partial){if("unknown_value"===e.event){const e=new Error(`Unknown value: ${n}`);throw e.name="UNKNOWN_VALUE",e.value=n,e}if("unknown_option"===e.event){const e=new Error(`Unknown option: ${n}`);throw e.name="UNKNOWN_OPTION",e.optionName=n,e}}let i;r.has(e.name)?i=r.get(e.name):(i=W.create(e.def),r.set(e.name,i)),"_unknown"===e.name?i.set(n):i.set(e.value)}return r.toObject({skipUnknown:!t.partial,camelCase:t.camelCase})}},222:(e,t,n)=>{e.exports=function(e){if((e=n(51)(e)).length){const t=n(119),r=n(391);return"\n"+e.map((e=>e.optionList?new t(e):new r(e))).join("\n")}return""}},688:(e,t,n)=>{e.exports=function(e){return e?(e=e.replace(/`/g,"\\`"),n(589)(Object.assign([],{raw:[e]}))):""}},782:(e,t,n)=>{e.exports=class{constructor(){this.lines=[]}add(e){e?n(51)(e).forEach((e=>this.lines.push(e))):this.lines.push("")}toString(){const e=n(87);return this.lines.join(e.EOL)}header(e){const t=n(589);e&&(this.add(t.underline.bold(e)),this.add())}}},391:(e,t,n)=>{const r=n(782),i=n(319),s=n(68),o=n(688);function a(e){for(const t in e)e[t]=o(e[t]);return e}e.exports=class extends r{constructor(e){if(super(),this.header(e.header),e.content){if(e.raw){const t=n(51)(e.content).map((e=>o(e)));this.add(t)}else this.add(function(e){const t={left:" ",right:" "};if(e){if(i.isString(e))return new s({column:o(e)},{padding:t,maxWidth:80}).renderLines();if(Array.isArray(e)&&e.every(i.isString)){const n=e.map((e=>({column:o(e)})));return new s(n,{padding:t,maxWidth:80}).renderLines()}if(Array.isArray(e)&&e.every(i.isPlainObject))return new s(e.map((e=>a(e))),{padding:t}).renderLines();if(i.isPlainObject(e)){if(!e.options||!e.data)throw new Error('must have an "options" or "data" property\n'+JSON.stringify(e));const n=Object.assign({padding:t},e.options);return n.columns&&(n.columns=n.columns.map((e=>(e.nowrap&&(e.noWrap=e.nowrap,delete e.nowrap),e)))),new s(e.data.map((e=>a(e))),n).renderLines()}{const t=`invalid input - 'content' must be a string, array of strings, or array of plain objects:\n\n${JSON.stringify(e)}`;throw new Error(t)}}}(e.content));this.add()}}}},119:(e,t,n)=>{const r=n(782),i=n(68),s=n(688),o=n(319),a=n(51);function l(e,t){let n=e.type?e.type.name.toLowerCase():"string";const r=e.multiple||e.lazyMultiple?"[]":"";n&&(n="boolean"===n?"":`{underline ${n}${r}}`),n=s(e.typeLabel||n);let i="";return i=e.alias?e.name?s(t?`{bold --${e.name}}, {bold -${e.alias}} ${n}`:`{bold -${e.alias}}, {bold --${e.name}} ${n}`):s(`{bold -${e.alias}} ${n}`):s(`{bold --${e.name}} ${n}`),i}e.exports=class extends r{constructor(e){super();let t=a(e.optionList);const n=a(e.hide),r=a(e.group);n.length&&(t=t.filter((e=>-1===n.indexOf(e.name)))),e.header&&this.header(e.header),r.length&&(t=t.filter((e=>{const t=r.indexOf("_none")>-1&&!o.isDefined(e.group),n=(i=a(e.group),s=r,i.some((function(e){return s.some((function(t){return e===t}))})));var i,s;if(t||n)return e})));const u=t.map((t=>({option:l(t,e.reverseNameOrder),description:s(t.description)}))),c=e.tableOptions||{padding:{left:" ",right:" "},columns:[{name:"option",noWrap:!0},{name:"description",maxWidth:80}]},h=new i(u,c);this.add(h.renderLines()),this.add()}}},51:function(e){e.exports=function(){"use strict";return function(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)||e instanceof Set?Array.from(e):[e]}}()},319:function(e,t){!function(e){"use strict";function t(e){return!isNaN(parseFloat(e))&&isFinite(e)}function n(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function r(e){return i(e)&&"number"==typeof e.length}function i(e){return"object"==typeof e&&null!==e}function s(e){return void 0!==e}function o(e){return!s(e)}function a(e){return null===e}function l(e){return s(e)&&!a(e)&&!Number.isNaN(e)}function u(e){return"function"==typeof e&&/^class /.test(Function.prototype.toString.call(e))}function c(e){if(null===e)return!0;switch(typeof e){case"string":case"number":case"symbol":case"undefined":case"boolean":return!0;default:return!1}}function h(e){if(e){const t=s(Promise)&&e instanceof Promise,n=e.then&&"function"==typeof e.then;return!(!t&&!n)}return!1}function f(e){return!(null===e||!s(e)||"function"!=typeof e[Symbol.iterator]&&"function"!=typeof e[Symbol.asyncIterator])}function d(e){return"string"==typeof e}function p(e){return"function"==typeof e}var g={isNumber:t,isPlainObject:n,isArrayLike:r,isObject:i,isDefined:s,isUndefined:o,isNull:a,isDefinedValue:l,isClass:u,isPrimitive:c,isPromise:h,isIterable:f,isString:d,isFunction:p};e.default=g,e.isArrayLike=r,e.isClass=u,e.isDefined=s,e.isDefinedValue=l,e.isFunction=p,e.isIterable=f,e.isNull=a,e.isNumber=t,e.isObject=i,e.isPlainObject=n,e.isPrimitive=c,e.isPromise=h,e.isString=d,e.isUndefined=o,Object.defineProperty(e,"__esModule",{value:!0})}(t)},698:e=>{"use strict";function t(e){return e instanceof Buffer||e instanceof Date||e instanceof RegExp}function n(e){if(e instanceof Buffer){var t=Buffer.alloc?Buffer.alloc(e.length):new Buffer(e.length);return e.copy(t),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function r(e){var i=[];return e.forEach((function(e,o){"object"==typeof e&&null!==e?Array.isArray(e)?i[o]=r(e):t(e)?i[o]=n(e):i[o]=s({},e):i[o]=e})),i}function i(e,t){return"__proto__"===t?void 0:e[t]}var s=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,o,a=arguments[0],l=Array.prototype.slice.call(arguments,1);return l.forEach((function(l){"object"!=typeof l||null===l||Array.isArray(l)||Object.keys(l).forEach((function(u){return o=i(a,u),(e=i(l,u))===a?void 0:"object"!=typeof e||null===e?void(a[u]=e):Array.isArray(e)?void(a[u]=r(e)):t(e)?void(a[u]=n(e)):"object"!=typeof o||null===o||Array.isArray(o)?void(a[u]=s({},e)):void(a[u]=s(o,e))}))})),a}},150:e=>{"use strict";var t=/[|\\{}()[\]^$+*?.]/g;e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(t,"\\$&")}},560:e=>{"use strict";e.exports=(e,t)=>{t=t||process.argv;const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)}},884:e=>{var t,n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i="a-z\\xdf-\\xf6\\xf8-\\xff",s="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a="["+o+"]",l="[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]",u="\\d+",c="["+i+"]",h="[^\\ud800-\\udfff"+o+u+"\\u2700-\\u27bf"+i+s+"]",f="\\ud83c[\\udffb-\\udfff]",d="[^\\ud800-\\udfff]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",m="["+s+"]",b="(?:"+c+"|"+h+")",y="(?:"+m+"|"+h+")",v="(?:['’](?:d|ll|m|re|s|t|ve))?",w="(?:['’](?:D|LL|M|RE|S|T|VE))?",x="(?:"+l+"|"+f+")?",O="[\\ufe0e\\ufe0f]?",k=O+x+"(?:\\u200d(?:"+[d,p,g].join("|")+")"+O+x+")*",j="(?:"+["[\\u2700-\\u27bf]",p,g].join("|")+")"+k,M="(?:"+[d+l+"?",l,p,g,"[\\ud800-\\udfff]"].join("|")+")",E=RegExp("['’]","g"),W=RegExp(l,"g"),C=RegExp(f+"(?="+f+")|"+M+k,"g"),N=RegExp([m+"?"+c+"+"+v+"(?="+[a,m,"$"].join("|")+")",y+"+"+w+"(?="+[a,m+b,"$"].join("|")+")",m+"?"+b+"+"+v,m+"+"+w,u,j].join("|"),"g"),I=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]"),S=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,A="object"==typeof global&&global&&global.Object===Object&&global,D="object"==typeof self&&self&&self.Object===Object&&self,_=A||D||Function("return this")(),P=(t={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},function(e){return null==t?void 0:t[e]});function R(e){return I.test(e)}var L=Object.prototype.toString,F=_.Symbol,T=F?F.prototype:void 0,$=T?T.toString:void 0;function B(e){return null==e?"":function(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==L.call(e)}(e))return $?$.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}var U,V=(U=function(e,t,n){return t=t.toLowerCase(),e+(n?q(B(t).toLowerCase()):t)},function(e){return function(e,t,n,r){for(var i=-1,s=e?e.length:0;++i<s;)n=t(n,e[i],i,e);return n}(function(e,t,r){return e=B(e),void 0===(t=t)?function(e){return S.test(e)}(e)?function(e){return e.match(N)||[]}(e):function(e){return e.match(n)||[]}(e):e.match(t)||[]}(function(e){return(e=B(e))&&e.replace(r,P).replace(W,"")}(e).replace(E,"")),U,"")}),q=("toUpperCase",function(e){var t,n,r,i,s=R(e=B(e))?function(e){return R(e)?function(e){return e.match(C)||[]}(e):function(e){return e.split("")}(e)}(e):void 0,o=s?s[0]:e.charAt(0),a=s?(t=s,n=1,i=t.length,r=void 0===r?i:r,!n&&r>=i?t:function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}(t,n,r)).join(""):e.slice(1);return o.toUpperCase()+a});e.exports=V},224:e=>{e.exports=function(e,t){return e.concat(t)}},130:(e,t,n)=>{"use strict";const r=n(87),i=n(560),s=process.env;let o;function a(e){return 0!==(t=function(e){if(!1===o)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!e.isTTY&&!0!==o)return 0;const t=o?1:0;if("win32"===process.platform){const e=r.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some((e=>e in s))||"codeship"===s.CI_NAME?1:t;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("truecolor"===s.COLORTERM)return 3;if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:(s.TERM,t)}(e))&&{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3};var t}i("no-color")||i("no-colors")||i("color=false")?o=!1:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(o=!0),"FORCE_COLOR"in s&&(o=0===s.FORCE_COLOR.length||0!==parseInt(s.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},68:(e,t,n)=>{const r=n(87);e.exports=class{constructor(e,t){let i=process&&(process.stdout.columns||process.stderr.columns)||0;i&&"win32"===r.platform()&&i--;let s={padding:{left:" ",right:" "},maxWidth:i||80,columns:[]};const o=n(698);this.options=o(s,t),this.load(e)}load(e){const t=n(306),r=n(246);let i=this.options;return i.ignoreEmptyColumns&&(e=t.removeEmptyColumns(e)),this.columns=r.getColumns(e),this.rows=new t(e,this.columns),this.columns.maxWidth=i.maxWidth,this.columns.list.forEach((e=>{i.padding&&(e.padding=i.padding),i.noWrap&&(e.noWrap=i.noWrap),i.break&&(e.break=i.break,e.contentWrappable=!0)})),i.columns.forEach((e=>{let t=this.columns.get(e.name);t&&(e.padding&&(t.padding.left=e.padding.left,t.padding.right=e.padding.right),e.width&&(t.width=e.width),e.maxWidth&&(t.maxWidth=e.maxWidth),e.minWidth&&(t.minWidth=e.minWidth),e.noWrap&&(t.noWrap=e.noWrap),e.break&&(t.break=e.break,t.contentWrappable=!0))})),this.columns.autoSize(),this}getWrapped(){const e=n(594);return this.columns.autoSize(),this.rows.list.map((t=>{let n=[];return t.forEach(((t,r)=>{r.noWrap?n.push(t.value.split(/\r\n?|\n/)):n.push(e.lines(t.value,{width:r.wrappedContentWidth,break:r.break,noTrim:this.options.noTrim}))})),n}))}getLines(){var e=this.getWrapped(),t=[];return e.forEach((e=>{let n=(r=e.map((e=>e.length)),Math.max.apply(null,r));var r;for(let r=0;r<n;r++){let n=[];e.forEach((e=>{n.push(e[r]||"")})),t.push(n)}})),t}renderLines(){return this.getLines().map((e=>e.reduce(((e,t,r)=>{let i=this.columns.list[r];return e+function(e,t,r){const i=n(697);var s=e.length-i.remove(e).length;return e=e||"",(t.left||"")+e.padEnd(r-t.length()+s)+(t.right||"")}(t,i.padding,i.generatedWidth)}),"")))}toString(){return this.renderLines().join(r.EOL)+r.EOL}}},697:(e,t)=>{const n=/\u001b.*?m/g;t.remove=function(e){return e.replace(n,"")},t.has=function(e){return n.test(e)}},804:(e,t,n)=>{n(824);const r=new WeakMap,i=new WeakMap;e.exports=class{constructor(e,t){this.value=e,i.set(this,t)}set value(e){r.set(this,e)}get value(){let e=r.get(this);return"function"==typeof e&&(e=e.call(i.get(this))),e=void 0===e?"":String(e),e}}},746:(e,t,n)=>{const r=n(824),i=n(923),s=new WeakMap;e.exports=class{constructor(e){r.isDefined(e.name)&&(this.name=e.name),r.isDefined(e.width)&&(this.width=e.width),r.isDefined(e.maxWidth)&&(this.maxWidth=e.maxWidth),r.isDefined(e.minWidth)&&(this.minWidth=e.minWidth),r.isDefined(e.noWrap)&&(this.noWrap=e.noWrap),r.isDefined(e.break)&&(this.break=e.break),r.isDefined(e.contentWrappable)&&(this.contentWrappable=e.contentWrappable),r.isDefined(e.contentWidth)&&(this.contentWidth=e.contentWidth),r.isDefined(e.minContentWidth)&&(this.minContentWidth=e.minContentWidth),this.padding=e.padding||{left:" ",right:" "},this.generatedWidth=null}set padding(e){s.set(this,new i(e))}get padding(){return s.get(this)}get wrappedContentWidth(){return Math.max(this.generatedWidth-this.padding.length(),0)}isResizable(){return!this.isFixed()}isFixed(){return r.isDefined(this.width)||this.noWrap||!this.contentWrappable}generateWidth(){this.generatedWidth=this.width||this.contentWidth+this.padding.length()}generateMinWidth(){this.minWidth=this.minContentWidth+this.padding.length()}}},246:(e,t,n)=>{const r=n(824),i=n(242),s=n(746),o=n(594),a=n(804),l=n(697),u=new WeakMap;class c{constructor(e){this.list=[],i(e).forEach(this.add.bind(this))}totalWidth(){return this.list.length?this.list.map((e=>e.generatedWidth)).reduce(((e,t)=>e+t)):0}totalFixedWidth(){return this.getFixed().map((e=>e.generatedWidth)).reduce(((e,t)=>e+t),0)}get(e){return this.list.find((t=>t.name===e))}getResizable(){return this.list.filter((e=>e.isResizable()))}getFixed(){return this.list.filter((e=>e.isFixed()))}add(e){const t=e instanceof s?e:new s(e);return this.list.push(t),t}set maxWidth(e){u.set(this,e)}autoSize(){const e=u.get(this);this.list.forEach((e=>{e.generateWidth(),e.generateMinWidth()})),this.list.forEach((e=>{r.isDefined(e.maxWidth)&&e.generatedWidth>e.maxWidth&&(e.generatedWidth=e.maxWidth),r.isDefined(e.minWidth)&&e.generatedWidth<e.minWidth&&(e.generatedWidth=e.minWidth)})),this.totalWidth();const t=this.totalWidth()-e,n=(this.totalFixedWidth(),Math.max(e-this.totalFixedWidth(),0));if(t>0){let e=this.getResizable();e.forEach((t=>{t.generatedWidth=Math.floor(n/e.length)}));const t=this.list.filter((e=>e.generatedWidth>e.contentWidth)),r=this.list.filter((e=>e.generatedWidth<e.contentWidth));let i=0;t.forEach((e=>{const t=e.generatedWidth;e.generateWidth(),i+=t-e.generatedWidth})),r.forEach((e=>{e.generatedWidth+=Math.floor(i/r.length)}))}return this}static getColumns(e){var t=new c;return i(e).forEach((e=>{for(let r in e){let i=t.get(r);i||(i=t.add({name:r,contentWidth:0,minContentWidth:0}));let s=new a(e[r],i).value;l.has(s)&&(s=l.remove(s)),s.length>i.contentWidth&&(i.contentWidth=s.length);let u=(n=s,o.getChunks(n).reduce(((e,t)=>Math.max(t.length,e)),0));u>i.minContentWidth&&(i.minContentWidth=u),i.contentWrappable||(i.contentWrappable=o.isWrappable(s))}var n})),t}}e.exports=c},923:e=>{e.exports=class{constructor(e){this.left=e.left,this.right=e.right}length(){return this.left.length+this.right.length}}},306:(e,t,n)=>{const r=n(242),i=n(804),s=n(824);e.exports=class{constructor(e,t){this.list=[],this.load(e,t)}load(e,t){r(e).forEach((e=>{this.list.push(new Map(function(e,t){return t.list.map((t=>[t,new i(e[t.name],t)]))}(e,t)))}))}static removeEmptyColumns(e){const t=e.reduce(((e,t)=>(Object.keys(t).forEach((t=>{-1===e.indexOf(t)&&e.push(t)})),e)),[]).filter((t=>!e.some((e=>{const n=e[t];return s.isDefined(n)&&"string"!=typeof n||"string"==typeof n&&/\S+/.test(n)}))));return e.map((e=>(t.forEach((t=>delete e[t])),e)))}}},242:function(e){e.exports=function(){"use strict";return function(e){return Array.isArray(e)?e:void 0===e?[]:function(e){return function(e){return"object"==typeof e&&null!==e}(e)&&"number"==typeof e.length}(e)||e instanceof Set?Array.from(e):[e]}}()},824:function(e,t){!function(e){"use strict";function t(e){return!isNaN(parseFloat(e))&&isFinite(e)}function n(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function r(e){return i(e)&&"number"==typeof e.length}function i(e){return"object"==typeof e&&null!==e}function s(e){return void 0!==e}function o(e){return!s(e)}function a(e){return null===e}function l(e){return s(e)&&!a(e)&&!Number.isNaN(e)}function u(e){return"function"==typeof e&&/^class /.test(Function.prototype.toString.call(e))}function c(e){if(null===e)return!0;switch(typeof e){case"string":case"number":case"symbol":case"undefined":case"boolean":return!0;default:return!1}}function h(e){if(e){const t=s(Promise)&&e instanceof Promise,n=e.then&&"function"==typeof e.then;return!(!t&&!n)}return!1}function f(e){return!(null===e||!s(e)||"function"!=typeof e[Symbol.iterator]&&"function"!=typeof e[Symbol.asyncIterator])}function d(e){return"string"==typeof e}function p(e){return"function"==typeof e}var g={isNumber:t,isPlainObject:n,isArrayLike:r,isObject:i,isDefined:s,isUndefined:o,isNull:a,isDefinedValue:l,isClass:u,isPrimitive:c,isPromise:h,isIterable:f,isString:d,isFunction:p};e.default=g,e.isArrayLike=r,e.isClass=u,e.isDefined=s,e.isDefinedValue=l,e.isFunction=p,e.isIterable=f,e.isNull=a,e.isNumber=t,e.isObject=i,e.isPlainObject=n,e.isPrimitive=c,e.isPromise=h,e.isString=d,e.isUndefined=o,Object.defineProperty(e,"__esModule",{value:!0})}(t)},594:(e,t,n)=>{const r=n(87),i=n(604),s=/[^\s-]+?-\b|\S+|\s+|\r\n?|\n/g,o=/\u001b.*?m/g;function a(e){return this.options.noTrim?e:e.trim()}function l(e){return e.replace(o,"")}function u(e){if(l(e).length>this.options.width){const t=e.split("");let n;const r=[];for(;(n=t.splice(0,this.options.width)).length;)r.push(n.join(""));return r}return e}e.exports=class{constructor(e,t){t=t||{},i.isDefined(e)||(e=""),this._lines=String(e).split(/\r\n|\n/g),this.options=t,this.options.width=void 0===t.width?30:t.width}lines(){const e=n(224);return this._lines.map(a.bind(this)).map((e=>e.match(s)||["~~empty~~"])).map((e=>this.options.break?e.map(u.bind(this)):e)).map((t=>t.reduce(e,[]))).map((e=>e.reduce(((e,t)=>{let n=e[e.length-1];return l(t).length+l(n).length>this.options.width?e.push(t):e[e.length-1]+=t,e}),[""]))).reduce(e,[]).map(a.bind(this)).filter((e=>e.trim())).map((e=>e.replace("~~empty~~","")))}wrap(){return this.lines().join(r.EOL)}toString(){return this.wrap()}static wrap(e,t){return