"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const T=require("../../../../../_virtual/util.js"),x=require("./support/isBufferBrowser.js"),ee=require("../../../inherits@2.0.3/node_modules/inherits/inherits_browser.js");var q;function re(){return q||(q=1,function(o){var A=Object.getOwnPropertyDescriptors||function(r){for(var t=Object.keys(r),n={},s=0;s<t.length;s++)n[t[s]]=Object.getOwnPropertyDescriptor(r,t[s]);return n},B=/%[sdj%]/g;o.format=function(e){if(!h(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(a(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,s=n.length,u=String(e).replace(B,function(f){if(f==="%%")return"%";if(t>=s)return f;switch(f){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch{return"[Circular]"}default:return f}}),i=n[t];t<s;i=n[++t])b(i)||!g(i)?u+=" "+i:u+=" "+a(i);return u},o.deprecate=function(e,r){if(typeof process<"u"&&process.noDeprecation===!0)return e;if(typeof process>"u")return function(){return o.deprecate(e,r).apply(this,arguments)};var t=!1;function n(){if(!t){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),t=!0}return e.apply(this,arguments)}return n};var m={},E;o.debuglog=function(e){if(p(E)&&(E=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!m[e])if(new RegExp("\\b"+e+"\\b","i").test(E)){var r=process.pid;m[e]=function(){var t=o.format.apply(o,arguments);console.error("%s %d: %s",e,r,t)}}else m[e]=function(){};return m[e]};function a(e,r){var t={seen:[],stylize:H};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),_(r)?t.showHidden=r:r&&o._extend(t,r),p(t.showHidden)&&(t.showHidden=!1),p(t.depth)&&(t.depth=2),p(t.colors)&&(t.colors=!1),p(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=C),d(t,e,t.depth)}o.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function C(e,r){var t=a.styles[r];return t?"\x1B["+a.colors[t][0]+"m"+e+"\x1B["+a.colors[t][1]+"m":e}function H(e,r){return e}function J(e){var r={};return e.forEach(function(t,n){r[t]=!0}),r}function d(e,r,t){if(e.customInspect&&r&&j(r.inspect)&&r.inspect!==o.inspect&&!(r.constructor&&r.constructor.prototype===r)){var n=r.inspect(t,e);return h(n)||(n=d(e,n,t)),n}var s=M(e,r);if(s)return s;var u=Object.keys(r),i=J(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(r)),w(r)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return v(r);if(u.length===0){if(j(r)){var f=r.name?": "+r.name:"";return e.stylize("[Function"+f+"]","special")}if(O(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(z(r))return e.stylize(Date.prototype.toString.call(r),"date");if(w(r))return v(r)}var c="",l=!1,S=["{","}"];if(F(r)&&(l=!0,S=["[","]"]),j(r)){var X=r.name?": "+r.name:"";c=" [Function"+X+"]"}if(O(r)&&(c=" "+RegExp.prototype.toString.call(r)),z(r)&&(c=" "+Date.prototype.toUTCString.call(r)),w(r)&&(c=" "+v(r)),u.length===0&&(!l||r.length==0))return S[0]+c+S[1];if(t<0)return O(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var R;return l?R=$(e,r,t,i,u):R=u.map(function(Y){return P(e,r,t,i,Y,l)}),e.seen.pop(),G(R,c,S)}function M(e,r){if(p(r))return e.stylize("undefined","undefined");if(h(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(U(r))return e.stylize(""+r,"number");if(_(r))return e.stylize(""+r,"boolean");if(b(r))return e.stylize("null","null")}function v(e){return"["+Error.prototype.toString.call(e)+"]"}function $(e,r,t,n,s){for(var u=[],i=0,f=r.length;i<f;++i)k(r,String(i))?u.push(P(e,r,t,n,String(i),!0)):u.push("");return s.forEach(function(c){c.match(/^\d+$/)||u.push(P(e,r,t,n,c,!0))}),u}function P(e,r,t,n,s,u){var i,f,c;if(c=Object.getOwnPropertyDescriptor(r,s)||{value:r[s]},c.get?c.set?f=e.stylize("[Getter/Setter]","special"):f=e.stylize("[Getter]","special"):c.set&&(f=e.stylize("[Setter]","special")),k(n,s)||(i="["+s+"]"),f||(e.seen.indexOf(c.value)<0?(b(t)?f=d(e,c.value,null):f=d(e,c.value,t-1),f.indexOf(`
`)>-1&&(u?f=f.split(`
`).map(function(l){return"  "+l}).join(`
`).substr(2):f=`
`+f.split(`
`).map(function(l){return"   "+l}).join(`
`))):f=e.stylize("[Circular]","special")),p(i)){if(u&&s.match(/^\d+$/))return f;i=JSON.stringify(""+s),i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+f}function G(e,r,t){var n=e.reduce(function(s,u){return u.indexOf(`
`)>=0,s+u.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?t[0]+(r===""?"":r+`
 `)+" "+e.join(`,
  `)+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function F(e){return Array.isArray(e)}o.isArray=F;function _(e){return typeof e=="boolean"}o.isBoolean=_;function b(e){return e===null}o.isNull=b;function I(e){return e==null}o.isNullOrUndefined=I;function U(e){return typeof e=="number"}o.isNumber=U;function h(e){return typeof e=="string"}o.isString=h;function Z(e){return typeof e=="symbol"}o.isSymbol=Z;function p(e){return e===void 0}o.isUndefined=p;function O(e){return g(e)&&D(e)==="[object RegExp]"}o.isRegExp=O;function g(e){return typeof e=="object"&&e!==null}o.isObject=g;function z(e){return g(e)&&D(e)==="[object Date]"}o.isDate=z;function w(e){return g(e)&&(D(e)==="[object Error]"||e instanceof Error)}o.isError=w;function j(e){return typeof e=="function"}o.isFunction=j;function V(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}o.isPrimitive=V,o.isBuffer=x.__require();function D(e){return Object.prototype.toString.call(e)}function N(e){return e<10?"0"+e.toString(10):e.toString(10)}var W=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function K(){var e=new Date,r=[N(e.getHours()),N(e.getMinutes()),N(e.getSeconds())].join(":");return[e.getDate(),W[e.getMonth()],r].join(" ")}o.log=function(){console.log("%s - %s",K(),o.format.apply(o,arguments))},o.inherits=ee.__require(),o._extend=function(e,r){if(!r||!g(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e};function k(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var y=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;o.promisify=function(r){if(typeof r!="function")throw new TypeError('The "original" argument must be of type Function');if(y&&r[y]){var t=r[y];if(typeof t!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,y,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var n,s,u=new Promise(function(c,l){n=c,s=l}),i=[],f=0;f<arguments.length;f++)i.push(arguments[f]);i.push(function(c,l){c?s(c):n(l)});try{r.apply(this,i)}catch(c){s(c)}return u}return Object.setPrototypeOf(t,Object.getPrototypeOf(r)),y&&Object.defineProperty(t,y,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,A(r))},o.promisify.custom=y;function L(e,r){if(!e){var t=new Error("Promise was rejected with a falsy value");t.reason=e,e=t}return r(e)}function Q(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');function r(){for(var t=[],n=0;n<arguments.length;n++)t.push(arguments[n]);var s=t.pop();if(typeof s!="function")throw new TypeError("The last argument must be of type Function");var u=this,i=function(){return s.apply(u,arguments)};e.apply(this,t).then(function(f){process.nextTick(i,null,f)},function(f){process.nextTick(L,f,i)})}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,A(e)),r}o.callbackify=Q}(T.__exports)),T.__exports}exports.__require=re;
//# sourceMappingURL=util.js.map
