js2flowchart
Version:
> Why? While I've been working on [Under-the-hood-ReactJS](https://github.com/Bogdan-Lyashenko/Under-the-hood-ReactJS) I spent enormous amount of time on creating schemes. Each change in code or flowchart affects all entire scheme instantly, forcing you t
2 lines • 904 kB
JavaScript
/*! For license information please see js2flowchart.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("js2flowchart",[],t):"object"==typeof exports?exports.js2flowchart=t():e.js2flowchart=t()}("undefined"!=typeof window?window:this,(()=>(()=>{var e={2509:function(e,t,n){!function(e,t,n,r){"use strict";let i;e.addSegment=void 0,e.addMapping=void 0,e.maybeAddSegment=void 0,e.maybeAddMapping=void 0,e.setSourceContent=void 0,e.toDecodedMap=void 0,e.toEncodedMap=void 0,e.fromMap=void 0,e.allMappings=void 0;class s{constructor({file:e,sourceRoot:n}={}){this._names=new t.SetArray,this._sources=new t.SetArray,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=n}}function a(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function o(e,n){for(let r=0;r<n.length;r++)t.put(e,n[r])}function l(e,t,n){const{generated:r,source:s,original:a,name:o,content:l}=n;if(!s)return i(e,t,r.line-1,r.column,null,null,null,null,null);const c=s;return i(e,t,r.line-1,r.column,c,a.line-1,a.column,o,l)}e.addSegment=(e,t,n,r,s,a,o,l)=>i(!1,e,t,n,r,s,a,o,l),e.maybeAddSegment=(e,t,n,r,s,a,o,l)=>i(!0,e,t,n,r,s,a,o,l),e.addMapping=(e,t)=>l(!1,e,t),e.maybeAddMapping=(e,t)=>l(!0,e,t),e.setSourceContent=(e,n,r)=>{const{_sources:i,_sourcesContent:s}=e;s[t.put(i,n)]=r},e.toDecodedMap=e=>{const{file:t,sourceRoot:n,_mappings:r,_sources:i,_sourcesContent:s,_names:a}=e;return function(e){const{length:t}=e;let n=t;for(let t=n-1;t>=0&&!(e[t].length>0);n=t,t--);n<t&&(e.length=n)}(r),{version:3,file:t||void 0,names:a.array,sourceRoot:n||void 0,sources:i.array,sourcesContent:s,mappings:r}},e.toEncodedMap=t=>{const r=e.toDecodedMap(t);return Object.assign(Object.assign({},r),{mappings:n.encode(r.mappings)})},e.allMappings=e=>{const t=[],{_mappings:n,_sources:r,_names:i}=e;for(let e=0;e<n.length;e++){const s=n[e];for(let n=0;n<s.length;n++){const a=s[n],o={line:e+1,column:a[0]};let l,c,u;1!==a.length&&(l=r.array[a[1]],c={line:a[2]+1,column:a[3]},5===a.length&&(u=i.array[a[4]])),t.push({generated:o,source:l,original:c,name:u})}}return t},e.fromMap=e=>{const t=new r.TraceMap(e),n=new s({file:t.file,sourceRoot:t.sourceRoot});return o(n._names,t.names),o(n._sources,t.sources),n._sourcesContent=t.sourcesContent||t.sources.map((()=>null)),n._mappings=r.decodedMappings(t),n},i=(e,n,r,i,s,o,l,c,u)=>{const{_mappings:p,_sources:h,_sourcesContent:d,_names:f}=n,y=function(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}(p,r),m=function(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][0]);n=r--);return n}(y,i);if(!s){if(e&&function(e,t){return 0===t||1===e[t-1].length}(y,m))return;return a(y,m,[i])}const T=t.put(h,s),g=c?t.put(f,c):-1;if(T===d.length&&(d[T]=null!=u?u:null),!e||!function(e,t,n,r,i,s){if(0===t)return!1;const a=e[t-1];return 1!==a.length&&n===a[1]&&r===a[2]&&i===a[3]&&s===(5===a.length?a[4]:-1)}(y,m,T,o,l,g))return a(y,m,c?[i,T,o,l,g]:[i,T,o,l])},e.GenMapping=s,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(2208),n(2297),n(3446))},8435:function(e){e.exports=function(){"use strict";const e=/^[\w+.-]+:\/\//,t=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,n=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;var r;function i(e){return e.startsWith("/")}function s(e){return/^[.?#]/.test(e)}function a(e){const n=t.exec(e);return o(n[1],n[2]||"",n[3],n[4]||"",n[5]||"/",n[6]||"",n[7]||"")}function o(e,t,n,i,s,a,o){return{scheme:e,user:t,host:n,port:i,path:s,query:a,hash:o,type:r.Absolute}}function l(t){if(function(e){return e.startsWith("//")}(t)){const e=a("http:"+t);return e.scheme="",e.type=r.SchemeRelative,e}if(i(t)){const e=a("http://foo.com"+t);return e.scheme="",e.host="",e.type=r.AbsolutePath,e}if(function(e){return e.startsWith("file:")}(t))return function(e){const t=n.exec(e),r=t[2];return o("file:","",t[1]||"","",i(r)?r:"/"+r,t[3]||"",t[4]||"")}(t);if(function(t){return e.test(t)}(t))return a(t);const s=a("http://foo.com/"+t);return s.scheme="",s.host="",s.type=t?t.startsWith("?")?r.Query:t.startsWith("#")?r.Hash:r.RelativePath:r.Empty,s}function c(e,t){const n=t<=r.RelativePath,i=e.path.split("/");let s=1,a=0,o=!1;for(let e=1;e<i.length;e++){const t=i[e];t?(o=!1,"."!==t&&(".."!==t?(i[s++]=t,a++):a?(o=!0,a--,s--):n&&(i[s++]=t))):o=!0}let l="";for(let e=1;e<s;e++)l+="/"+i[e];(!l||o&&!l.endsWith("/.."))&&(l+="/"),e.path=l}return function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"}(r||(r={})),function(e,t){if(!e&&!t)return"";const n=l(e);let i=n.type;if(t&&i!==r.Absolute){const e=l(t),s=e.type;switch(i){case r.Empty:n.hash=e.hash;case r.Hash:n.query=e.query;case r.Query:case r.RelativePath:!function(e,t){c(t,t.type),"/"===e.path?e.path=t.path:e.path=function(e){if(e.endsWith("/.."))return e;const t=e.lastIndexOf("/");return e.slice(0,t+1)}(t.path)+e.path}(n,e);case r.AbsolutePath:n.user=e.user,n.host=e.host,n.port=e.port;case r.SchemeRelative:n.scheme=e.scheme}s>i&&(i=s)}c(n,i);const a=n.query+n.hash;switch(i){case r.Hash:case r.Query:return a;case r.RelativePath:{const r=n.path.slice(1);return r?s(t||e)&&!s(r)?"./"+r+a:r+a:a||"."}case r.AbsolutePath:return n.path+a;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+a}}}()},2208:function(e,t){!function(e){"use strict";e.get=void 0,e.put=void 0,e.pop=void 0;e.get=(e,t)=>e._indexes[t],e.put=(t,n)=>{const r=e.get(t,n);if(void 0!==r)return r;const{array:i,_indexes:s}=t;return s[n]=i.push(n)-1},e.pop=e=>{const{array:t,_indexes:n}=e;0!==t.length&&(n[t.pop()]=void 0)},e.SetArray=class{constructor(){this._indexes={__proto__:null},this.array=[]}},Object.defineProperty(e,"__esModule",{value:!0})}(t)},2297:function(e,t,n){var r=n(8764).lW;!function(e){"use strict";const t=",".charCodeAt(0),n=";".charCodeAt(0),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(64),a=new Uint8Array(128);for(let e=0;e<64;e++){const t=i.charCodeAt(e);s[e]=t,a[t]=e}const o="undefined"!=typeof TextDecoder?new TextDecoder:void 0!==r?{decode:e=>r.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}};function l(e,t){const n=e.indexOf(";",t);return-1===n?e.length:n}function c(e,t,n,r){let i=0,s=0,o=0;do{const n=e.charCodeAt(t++);o=a[n],i|=(31&o)<<s,s+=5}while(32&o);const l=1&i;return i>>>=1,l&&(i=-2147483648|-i),n[r]+=i,t}function u(e,n,r){return!(n>=r)&&e.charCodeAt(n)!==t}function p(e){e.sort(h)}function h(e,t){return e[0]-t[0]}function d(e,t,n,r,i){const a=r[i];let o=a-n[i];n[i]=a,o=o<0?-o<<1|1:o<<1;do{let n=31&o;o>>>=5,o>0&&(n|=32),e[t++]=s[n]}while(o>0);return t}e.decode=function(e){const t=new Int32Array(5),n=[];let r=0;do{const i=l(e,r),s=[];let a=!0,o=0;t[0]=0;for(let n=r;n<i;n++){let r;n=c(e,n,t,0);const l=t[0];l<o&&(a=!1),o=l,u(e,n,i)?(n=c(e,n,t,1),n=c(e,n,t,2),n=c(e,n,t,3),u(e,n,i)?(n=c(e,n,t,4),r=[l,t[1],t[2],t[3],t[4]]):r=[l,t[1],t[2],t[3]]):r=[l],s.push(r)}a||p(s),n.push(s),r=i+1}while(r<=e.length);return n},e.encode=function(e){const r=new Int32Array(5),i=16384,s=16348,a=new Uint8Array(i),l=a.subarray(0,s);let c=0,u="";for(let p=0;p<e.length;p++){const h=e[p];if(p>0&&(c===i&&(u+=o.decode(a),c=0),a[c++]=n),0!==h.length){r[0]=0;for(let e=0;e<h.length;e++){const n=h[e];c>s&&(u+=o.decode(l),a.copyWithin(0,s,c),c-=s),e>0&&(a[c++]=t),c=d(a,c,r,n,0),1!==n.length&&(c=d(a,c,r,n,1),c=d(a,c,r,n,2),c=d(a,c,r,n,3),4!==n.length&&(c=d(a,c,r,n,4)))}}}return u+o.decode(a.subarray(0,c))},Object.defineProperty(e,"__esModule",{value:!0})}(t)},3446:function(e,t,n){!function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=r(n);function s(e,t){return t&&!t.endsWith("/")&&(t+="/"),i.default(e,t)}const a=0,o=1,l=2,c=3,u=4;function p(e,t){for(let n=t;n<e.length;n++)if(!h(e[n]))return n;return e.length}function h(e){for(let t=1;t<e.length;t++)if(e[t][a]<e[t-1][a])return!1;return!0}function d(e,t){return t||(e=e.slice()),e.sort(f)}function f(e,t){return e[a]-t[a]}let y=!1;function m(e,t,n){for(let r=n+1;r<e.length&&e[r][a]===t;n=r++);return n}function T(e,t,n){for(let r=n-1;r>=0&&e[r][a]===t;n=r--);return n}function g(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function b(e,t,n,r){const{lastKey:i,lastNeedle:s,lastIndex:o}=n;let l=0,c=e.length-1;if(r===i){if(t===s)return y=-1!==o&&e[o][a]===t,o;t>=s?l=-1===o?0:o:c=o}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=function(e,t,n,r){for(;n<=r;){const i=n+(r-n>>1),s=e[i][a]-t;if(0===s)return y=!0,i;s<0?n=i+1:r=i-1}return y=!1,n-1}(e,t,l,c)}function E(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function S(){return{__proto__:null}}function P(e,t,n,r,i,s,a,o,l,c){const{sections:u}=e;for(let e=0;e<u.length;e++){const{map:p,offset:h}=u[e];let d=l,f=c;if(e+1<u.length){const t=u[e+1].offset;d=Math.min(l,a+t.line),d===l?f=Math.min(c,o+t.column):d<l&&(f=o+t.column)}x(p,t,n,r,i,s,a+h.line,o+h.column,d,f)}}function x(t,n,r,i,s,p,h,d,f,y){if("sections"in t)return P(...arguments);const m=new O(t,n),T=i.length,g=p.length,b=e.decodedMappings(m),{resolvedSources:E,sourcesContent:S}=m;if(D(i,E),D(p,m.names),S)D(s,S);else for(let e=0;e<E.length;e++)s.push(null);for(let e=0;e<b.length;e++){const t=h+e;if(t>f)return;const n=A(r,t),i=0===e?d:0,s=b[e];for(let e=0;e<s.length;e++){const r=s[e],p=i+r[a];if(t===f&&p>=y)return;if(1===r.length){n.push([p]);continue}const h=T+r[o],d=r[l],m=r[c];n.push(4===r.length?[p,h,d,m]:[p,h,d,m,g+r[u]])}}}function D(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function A(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}const v="`line` must be greater than 0 (lines start at line 1)",C="`column` must be greater than or equal to 0 (columns start at column 0)",w=-1;e.encodedMappings=void 0,e.decodedMappings=void 0,e.traceSegment=void 0,e.originalPositionFor=void 0,e.generatedPositionFor=void 0,e.allGeneratedPositionsFor=void 0,e.eachMapping=void 0,e.sourceContentFor=void 0,e.presortedDecodedMap=void 0,e.decodedMap=void 0,e.encodedMap=void 0;class O{constructor(e,t){const n="string"==typeof e;if(!n&&e._decodedMemo)return e;const r=n?JSON.parse(e):e,{version:i,file:a,names:o,sourceRoot:l,sources:c,sourcesContent:u}=r;this.version=i,this.file=a,this.names=o,this.sourceRoot=l,this.sources=c,this.sourcesContent=u;const h=s(l||"",function(e){if(!e)return"";const t=e.lastIndexOf("/");return e.slice(0,t+1)}(t));this.resolvedSources=c.map((e=>s(e||"",h)));const{mappings:f}=r;"string"==typeof f?(this._encoded=f,this._decoded=void 0):(this._encoded=void 0,this._decoded=function(e,t){const n=p(e,0);if(n===e.length)return e;t||(e=e.slice());for(let r=n;r<e.length;r=p(e,r+1))e[r]=d(e[r],t);return e}(f,n)),this._decodedMemo={lastKey:-1,lastNeedle:-1,lastIndex:-1},this._bySources=void 0,this._bySourceMemos=void 0}}function I(e,t){return{version:e.version,file:e.file,names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,mappings:t}}function N(e,t,n,r){return{source:e,line:t,column:n,name:r}}function F(e,t){return{line:e,column:t}}function k(e,t,n,r,i){let s=b(e,r,t,n);return y?s=(i===w?m:T)(e,r,s):i===w&&s++,-1===s||s===e.length?-1:s}(()=>{function n(t,n,r,i,s,u){if(--r<0)throw new Error(v);if(i<0)throw new Error(C);const{sources:p,resolvedSources:h}=t;let d=p.indexOf(n);if(-1===d&&(d=h.indexOf(n)),-1===d)return u?[]:F(null,null);const f=(t._bySources||(t._bySources=function(e,t){const n=t.map(S);for(let r=0;r<e.length;r++){const i=e[r];for(let e=0;e<i.length;e++){const s=i[e];if(1===s.length)continue;const u=s[o],p=s[l],h=s[c],d=n[u],f=d[p]||(d[p]=[]),y=t[u],T=m(f,h,b(f,h,y,p));E(f,y.lastIndex=T+1,[h,r,s[a]])}}return n}(e.decodedMappings(t),t._bySourceMemos=p.map(g))))[d][r];if(null==f)return u?[]:F(null,null);const P=t._bySourceMemos[d];if(u)return function(e,t,n,r,i){let s=k(e,t,n,r,1);if(y||i!==w||s++,-1===s||s===e.length)return[];const o=y?r:e[s][a];y||(s=T(e,o,s));const l=m(e,o,s),c=[];for(;s<=l;s++){const t=e[s];c.push(F(t[1]+1,t[2]))}return c}(f,P,r,i,s);const x=k(f,P,r,i,s);if(-1===x)return F(null,null);const D=f[x];return F(D[1]+1,D[2])}e.encodedMappings=e=>{var n;return null!==(n=e._encoded)&&void 0!==n?n:e._encoded=t.encode(e._decoded)},e.decodedMappings=e=>e._decoded||(e._decoded=t.decode(e._encoded)),e.traceSegment=(t,n,r)=>{const i=e.decodedMappings(t);if(n>=i.length)return null;const s=i[n],a=k(s,t._decodedMemo,n,r,1);return-1===a?null:s[a]},e.originalPositionFor=(t,{line:n,column:r,bias:i})=>{if(--n<0)throw new Error(v);if(r<0)throw new Error(C);const s=e.decodedMappings(t);if(n>=s.length)return N(null,null,null,null);const a=s[n],p=k(a,t._decodedMemo,n,r,i||1);if(-1===p)return N(null,null,null,null);const h=a[p];if(1===h.length)return N(null,null,null,null);const{names:d,resolvedSources:f}=t;return N(f[h[o]],h[l]+1,h[c],5===h.length?d[h[u]]:null)},e.allGeneratedPositionsFor=(e,{source:t,line:r,column:i,bias:s})=>n(e,t,r,i,s||w,!0),e.generatedPositionFor=(e,{source:t,line:r,column:i,bias:s})=>n(e,t,r,i,s||1,!1),e.eachMapping=(t,n)=>{const r=e.decodedMappings(t),{names:i,resolvedSources:s}=t;for(let e=0;e<r.length;e++){const t=r[e];for(let r=0;r<t.length;r++){const a=t[r],o=e+1,l=a[0];let c=null,u=null,p=null,h=null;1!==a.length&&(c=s[a[1]],u=a[2]+1,p=a[3]),5===a.length&&(h=i[a[4]]),n({generatedLine:o,generatedColumn:l,source:c,originalLine:u,originalColumn:p,name:h})}}},e.sourceContentFor=(e,t)=>{const{sources:n,resolvedSources:r,sourcesContent:i}=e;if(null==i)return null;let s=n.indexOf(t);return-1===s&&(s=r.indexOf(t)),-1===s?null:i[s]},e.presortedDecodedMap=(e,t)=>{const n=new O(I(e,[]),t);return n._decoded=e.mappings,n},e.decodedMap=t=>I(t,e.decodedMappings(t)),e.encodedMap=t=>I(t,e.encodedMappings(t))})(),e.AnyMap=function(t,n){const r="string"==typeof t?JSON.parse(t):t;if(!("sections"in r))return new O(r,n);const i=[],s=[],a=[],o=[];P(r,n,i,s,a,o,0,0,1/0,1/0);const l={version:3,file:r.file,names:o,sources:s,sourcesContent:a,mappings:i};return e.presortedDecodedMap(l)},e.GREATEST_LOWER_BOUND=1,e.LEAST_UPPER_BOUND=w,e.TraceMap=O,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(2297),n(8435))},6434:(e,t,n)=>{"use strict";e=n.nmd(e);const r=n(2085),i=(e,t)=>function(){return`[${e.apply(r,arguments)+t}m`},s=(e,t)=>function(){const n=e.apply(r,arguments);return`[${38+t};5;${n}m`},a=(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,o=(e,t,n)=>[e,t,n];t.color.close="[39m",t.bgColor.close="[49m",t.color.ansi={ansi:i(n,0)},t.color.ansi256={ansi256:s(n,0)},t.color.ansi16m={rgb:a(o,0)},t.bgColor.ansi={ansi:i(n,10)},t.bgColor.ansi256={ansi256:s(n,10)},t.bgColor.ansi16m={rgb:a(o,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]=a(n.rgb,0),t.bgColor.ansi16m[e]=a(n.rgb,10))}return t}})},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,s=o(e),a=s[0],l=s[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),u=0,p=l>0?a-4:a;for(n=0;n<p;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t),1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,s=[],a=16383,o=0,c=r-i;o<c;o+=a)s.push(l(e,o,o+a>c?c:o+a));return 1===i?(t=e[r-1],s.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],s.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),s.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=s[a],r[s.charCodeAt(a)]=a;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,s,a=[],o=t;o<r;o+=3)i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),a.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8764:(e,t,n)=>{"use strict";const r=n(9742),i=n(645),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=l,t.h2=50;const a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|y(e,t);let r=o(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if($(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if($(e,ArrayBuffer)||e&&$(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&($(e,SharedArrayBuffer)||e&&$(e.buffer,SharedArrayBuffer)))return d(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|f(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||G(e.length)?o(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return u(e),o(e<0?0:0|f(e))}function h(e){const t=e.length<0?0:0|f(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function d(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,l.prototype),r}function f(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(i)return r?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return v(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function T(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),G(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let s,a=1,o=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(s=n;s<o;s++)if(c(e,s)===c(t,-1===r?0:s-r)){if(-1===r&&(r=s),s-r+1===l)return r*a}else-1!==r&&(s-=s-r),r=-1}else for(n+l>o&&(n=o-l),s=n;s>=0;s--){let n=!0;for(let r=0;r<l;r++)if(c(e,s+r)!==c(t,r)){n=!1;break}if(n)return s}return-1}function E(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const s=t.length;let a;for(r>s/2&&(r=s/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(G(r))return a;e[n+a]=r}return a}function S(e,t,n,r){return J(q(t,e.length-n),e,n,r)}function P(e,t,n,r){return J(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return J(H(t),e,n,r)}function D(e,t,n,r){return J(function(e,t){let n,r,i;const s=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function v(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let s=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,o,l;switch(a){case 1:t<128&&(s=t);break;case 2:n=e[i+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(s=l));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:n=e[i+1],r=e[i+2],o=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&o)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&o,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return function(e){const t=e.length;if(t<=C)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=C));return n}(r)}l.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},l.allocUnsafe=function(e){return p(e)},l.allocUnsafeSlow=function(e){return p(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if($(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),$(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=l.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if($(t,Uint8Array))i+t.length>r.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=y,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)T(this,t,t+1);return this},l.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)T(this,t,t+3),T(this,t+1,t+2);return this},l.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)T(this,t,t+7),T(this,t+1,t+6),T(this,t+2,t+5),T(this,t+3,t+4);return this},l.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?v(this,0,e):m.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){let e="";const n=t.h2;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if($(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let s=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const o=Math.min(s,a),c=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<o;++e)if(c[e]!==u[e]){s=c[e],a=u[e];break}return s<a?-1:a<s?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let s=!1;for(;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return S(this,e,t,n);case"ascii":case"latin1":case"binary":return P(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const C=4096;function w(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function I(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=t;r<n;++r)i+=z[e[r]];return i}function N(e,t,n){const r=e.slice(t,n);let i="";for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+256*r[e+1]);return i}function F(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,n,r,i,s){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r,i){K(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function _(e,t,n,r,i){K(t,r,i,e,n,7);let s=Number(t&BigInt(4294967295));e[n+7]=s,s>>=8,e[n+6]=s,s>>=8,e[n+5]=s,s>>=8,e[n+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function M(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,s){return t=+t,n>>>=0,s||M(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,s){return t=+t,n>>>=0,s||M(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Q((function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||X(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),l.prototype.readBigUInt64BE=Q((function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||X(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);let r=this[e],i=1,s=0;for(;++s<t&&(i*=256);)r+=this[e+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||F(e,t,this.length);let r=t,i=1,s=this[e+--r];for(;r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},l.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Q((function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||X(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),l.prototype.readBigInt64BE=Q((function(e){W(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||X(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)})),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||k(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,s=0;for(this[t]=255&e;++s<n&&(i*=256);)this[t+s]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||k(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Q((function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Q((function(e,t=0){return _(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);k(this,e,t,n,r-1,-r)}let i=0,s=1,a=0;for(this[t]=255&e;++i<n&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);k(this,e,t,n,r-1,-r)}let i=n-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Q((function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Q((function(e,t=0){return _(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{const s=l.isBuffer(e)?e:l.from(e,r),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=s[i%a]}return this};const R={};function U(e,t,n){R[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function V(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function K(e,t,n,r,i,s){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let i;throw i=s>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(s+1)}${r}`:`>= -(2${r} ** ${8*(s+1)-1}${r}) and < 2 ** ${8*(s+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new R.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){W(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||X(t,e.length-(n+1))}(r,i,s)}function W(e,t){if("number"!=typeof e)throw new R.ERR_INVALID_ARG_TYPE(t,"number",e)}function X(e,t,n){if(Math.floor(e)!==e)throw W(e,n),new R.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new R.ERR_BUFFER_OUT_OF_BOUNDS;throw new R.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=V(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=V(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const Y=/[^+/0-9A-Za-z-_]/g;function q(e,t){let n;t=t||1/0;const r=e.length;let i=null;const s=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function H(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function J(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function G(e){return e!=e}const z=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},2589:(e,t,n)=>{"use strict";var r=n(4155);const i=n(3150),s=n(6434),a=n(8555).stdout,o=n(6864),l="win32"===r.platform&&!(r.env.TERM||"").toLowerCase().startsWith("xterm"),c=["ansi","ansi","ansi256","ansi16m"],u=new Set(["gray"]),p=Object.create(null);function h(e,t){t=t||{};const n=a?a.level:0;e.level=void 0===t.level?n:t.level,e.enabled="enabled"in t?t.enabled:e.level>0}function d(e){if(!this||!(this instanceof d)||this.template){const t={};return h(t,e),t.template=function(){const e=[].slice.call(arguments);return T.apply(null,[t.template].concat(e))},Object.setPrototypeOf(t,d.prototype),Object.setPrototypeOf(t.template,t),t.template.constructor=d,t.template}h(this,e)}l&&(s.blue.open="[94m");for(const e of Object.keys(s))s[e].closeRe=new RegExp(i(s[e].close),"g"),p[e]={get(){const t=s[e];return y.call(this,this._styles?this._styles.concat(t):[t],this._empty,e)}};p.visible={get(){return y.call(this,this._styles||[],!0,"visible")}},s.color.closeRe=new RegExp(i(s.color.close),"g");for(const e of Object.keys(s.color.ansi))u.has(e)||(p[e]={get(){const t=this.level;return function(){const n={open:s.color[c[t]][e].apply(null,arguments),close:s.color.close,closeRe:s.color.closeRe};return y.call(this,this._styles?this._styles.concat(n):[n],this._empty,e)}}});s.bgColor.closeRe=new RegExp(i(s.bgColor.close),"g");for(const e of Object.keys(s.bgColor.ansi))u.has(e)||(p["bg"+e[0].toUpperCase()+e.slice(1)]={get(){const t=this.level;return function(){const n={open:s.bgColor[c[t]][e].apply(null,arguments),close:s.bgColor.close,closeRe:s.bgColor.closeRe};return y.call(this,this._styles?this._styles.concat(n):[n],this._empty,e)}}});const f=Object.defineProperties((()=>{}),p);function y(e,t,n){const r=function(){return m.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__=f,r}function m(){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=s.dim.open;l&&this.hasGrey&&(s.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 s.dim.open=r,n}function T(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(d.prototype,p),e.exports=d(),e.exports.supportsColor=a,e.exports.default=e.exports},6864: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 a(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 o(e,t){const n=[],s=t.trim().split(/\s*,\s*/g);let o;for(const t of s)if(isNaN(t)){if(!(o=t.match(r)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);n.push(o[2].replace(i,((e,t,n)=>t?a(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=o(e,r[2]);t.push([e].concat(n))}else t.push([e])}return t}function c(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,o,u,p,h)=>{if(n)s.push(a(n));else if(u){const t=s.join("");s=[],i.push(0===r.length?t:c(e,r)(t)),r.push({inverse:o,styles:l(u)})}else if(p){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");i.push(c(e,r)(s.join(""))),s=[],r.pop()}else s.push(h)})),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("")}},8168:(e,t,n)=>{var r=n(3515),i={};for(var s in r)r.hasOwnProperty(s)&&(i[r[s]]=s);var a=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 o in a)if(a.hasOwnProperty(o)){if(!("channels"in a[o]))throw new Error("missing channels property: "+o);if(!("labels"in a[o]))throw new Error("missing channel labels property: "+o);if(a[o].labels.length!==a[o].channels)throw new Error("channel and label counts mismatch: "+o);var l=a[o].channels,c=a[o].labels;delete a[o].channels,delete a[o].labels,Object.defineProperty(a[o],"channels",{value:l}),Object.defineProperty(a[o],"labels",{value:c})}a.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,s=e[2]/255,a=Math.min(r,i,s),o=Math.max(r,i,s),l=o-a;return o===a?t=0:r===o?t=(i-s)/l:i===o?t=2+(s-r)/l:s===o&&(t=4+(r-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(a+o)/2,[t,100*(o===a?0:n<=.5?l/(o+a):l/(2-o-a)),100*n]},a.rgb.hsv=function(e){var t,n,r=e[0],i=e[1],s=e[2],a=Math.min(r,i,s),o=Math.max(r,i,s),l=o-a;return n=0===o?0:l/o*1e3/10,o===a?t=0:r===o?t=(i-s)/l:i===o?t=2+(s-r)/l:s===o&&(t=4+(r-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),[t,n,o/255*1e3/10]},a.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[a.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)))]},a.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]},a.rgb.keyword=function(e){var t=i[e];if(t)return t;var n,s,a,o=1/0;for(var l in r)if(r.hasOwnProperty(l)){var c=(s=e,a=r[l],Math.pow(s[0]-a[0],2)+Math.pow(s[1]-a[1],2)+Math.pow(s[2]-a[2],2));c<o&&(o=c,n=l)}return n},a.keyword.rgb=function(e){return r[e]},a.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)]},a.rgb.lab=function(e){var t=a.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))]},a.hsl.rgb=function(e){var t,n,r,i,s,a=e[0]/360,o=e[1]/100,l=e[2]/100;if(0===o)return[s=255*l,s,s];t=2*l-(n=l<.5?l*(1+o):l+o-l*o),i=[0,0,0];for(var c=0;c<3;c++)(r=a+1/3*-(c-1))<0&&r++,r>1&&r-