Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

opossum

Package Overview
Dependencies
Maintainers
7
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opossum - npm Package Compare versions

Comparing version 6.2.0 to 6.2.1

17

CHANGELOG.md

@@ -5,2 +5,19 @@ # Changelog

### [6.2.1](https://www.github.com/nodeshift/opossum/compare/v6.2.0...v6.2.1) (2021-08-23)
### Bug Fixes
* @babel/core, @babel/preset-env ([#582](https://www.github.com/nodeshift/opossum/issues/582)) ([b5291ac](https://www.github.com/nodeshift/opossum/commit/b5291ac7c97b0693067d79c2491cafce8607dfef))
* upgrade coveralls from 3.1.0 to 3.1.1 ([#590](https://www.github.com/nodeshift/opossum/issues/590)) ([211dffa](https://www.github.com/nodeshift/opossum/commit/211dffa1035b2a1a3b3ccd0a0e6b3eb34c2791a9))
* upgrade documentation from 13.1.1 to 13.2.5 ([#583](https://www.github.com/nodeshift/opossum/issues/583)) ([b9d7bc2](https://www.github.com/nodeshift/opossum/commit/b9d7bc25caa8cbf6f4b82eff1192f4b51512e692))
* upgrade eslint from 7.24.0 to 7.29.0 ([#585](https://www.github.com/nodeshift/opossum/issues/585)) ([c4570f8](https://www.github.com/nodeshift/opossum/commit/c4570f808caef026a4c4ac594c7f18d7e9bdbe3f))
* upgrade eslint from 7.29.0 to 7.30.0 ([#592](https://www.github.com/nodeshift/opossum/issues/592)) ([2747b82](https://www.github.com/nodeshift/opossum/commit/2747b82619c022905c565c0e2bc834dfcf8665d1))
* upgrade eslint from 7.30.0 to 7.31.0 ([#594](https://www.github.com/nodeshift/opossum/issues/594)) ([536b312](https://www.github.com/nodeshift/opossum/commit/536b312b7cc9f00156c83b87dc268c0ab14e023b))
* upgrade eslint from 7.31.0 to 7.32.0 ([#597](https://www.github.com/nodeshift/opossum/issues/597)) ([1e7ca08](https://www.github.com/nodeshift/opossum/commit/1e7ca0870059da8963fa1a6a36c42ab6489aaee8))
* upgrade eslint-config-standard from 16.0.2 to 16.0.3 ([#589](https://www.github.com/nodeshift/opossum/issues/589)) ([ec1c3de](https://www.github.com/nodeshift/opossum/commit/ec1c3de6b15cff0ace131ca4a7f308d53a794fd4))
* upgrade eslint-plugin-import from 2.22.1 to 2.23.4 ([#584](https://www.github.com/nodeshift/opossum/issues/584)) ([15a0b18](https://www.github.com/nodeshift/opossum/commit/15a0b184938129890cd6204c04456c09f2ce326b))
* upgrade tape from 5.2.0 to 5.2.2 ([#588](https://www.github.com/nodeshift/opossum/issues/588)) ([4139fd7](https://www.github.com/nodeshift/opossum/commit/4139fd7f3f113147650dada672e376d8f579385b))
* upgrade webpack-cli from 4.5.0 to 4.7.2 ([#586](https://www.github.com/nodeshift/opossum/issues/586)) ([d588890](https://www.github.com/nodeshift/opossum/commit/d5888908011cc6b9a7ce5ec80a7936a2a0e8dbce))
## [6.2.0](https://www.github.com/nodeshift/opossum/compare/v6.1.0...v6.2.0) (2021-07-07)

@@ -7,0 +24,0 @@

4

dist/opossum.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.circuitBreaker=t():e.circuitBreaker=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){(function(t){var r=n(2),o=n(9);function i(){return(new Date).getTime()}var u,s=Array.prototype.slice,c={};u=void 0!==t&&t.console?t.console:"undefined"!=typeof window&&window.console?window.console:{};for(var a=[[function(){},"log"],[function(){u.log.apply(u,arguments)},"info"],[function(){u.log.apply(u,arguments)},"warn"],[function(){u.warn.apply(u,arguments)},"error"],[function(e){c[e]=i()},"time"],[function(e){var t=c[e];if(!t)throw new Error("No such label: "+e);delete c[e];var n=i()-t;u.log(e+": "+n+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=r.format.apply(null,arguments),u.error(e.stack)},"trace"],[function(e){u.log(r.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=s.call(arguments,1);o.ok(!1,r.format.apply(null,t))}},"assert"]],f=0;f<a.length;f++){var l=a[f],p=l[0],h=l[1];u[h]||(u[h]=p)}e.exports=u}).call(this,n(1))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e,r){var o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(c(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,u=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<o;s=r[++n])v(s)||!O(s)?u+=" "+s:u+=" "+c(s);return u},t.deprecate=function(n,o){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,o).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(o);e.traceDeprecation?r.trace(o):r.error(o),i=!0}return n.apply(this,arguments)}};var u,s={};function c(e,n){var r={seen:[],stylize:f};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),l(r,e,r.depth)}function a(e,t){var n=c.styles[t];return n?"["+c.colors[n][0]+"m"+e+"["+c.colors[n][1]+"m":e}function f(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&x(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return b(o)||(o=l(e,o,r)),o}var i=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(d(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,n);if(i)return i;var u=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(n)),E(n)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return p(n);if(0===u.length){if(x(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(j(n))return e.stylize(Date.prototype.toString.call(n),"date");if(E(n))return p(n)}var a,f="",O=!1,S=["{","}"];(y(n)&&(O=!0,S=["[","]"]),x(n))&&(f=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(f=" "+RegExp.prototype.toString.call(n)),j(n)&&(f=" "+Date.prototype.toUTCString.call(n)),E(n)&&(f=" "+p(n)),0!==u.length||O&&0!=n.length?r<0?w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),a=O?function(e,t,n,r,o){for(var i=[],u=0,s=t.length;u<s;++u)_(t,String(u))?i.push(h(e,t,n,r,String(u),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(h(e,t,n,r,o,!0))})),i}(e,n,r,s,u):u.map((function(t){return h(e,n,r,s,t,O)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(a,f,S)):S[0]+f+S[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var u,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),_(r,o)||(u="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=v(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),g(u)){if(i&&o.match(/^\d+$/))return s;(u=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,"string"))}return u+": "+s}function y(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function v(e){return null===e}function d(e){return"number"==typeof e}function b(e){return"string"==typeof e}function g(e){return void 0===e}function w(e){return O(e)&&"[object RegExp]"===S(e)}function O(e){return"object"==typeof e&&null!==e}function j(e){return O(e)&&"[object Date]"===S(e)}function E(e){return O(e)&&("[object Error]"===S(e)||e instanceof Error)}function x(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(g(u)&&(u=Object({WEB:"web"}).NODE_DEBUG||""),n=n.toUpperCase(),!s[n])if(new RegExp("\\b"+n+"\\b","i").test(u)){var o=e.pid;s[n]=function(){var e=t.format.apply(t,arguments);r.error("%s %d: %s",n,o,e)}}else s[n]=function(){};return s[n]},t.inspect=c,c.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]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=y,t.isBoolean=m,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=d,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=w,t.isObject=O,t.isDate=j,t.isError=E,t.isFunction=x,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(7);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){r.log("%s - %s",P(),t.format.apply(t,arguments))},t.inherits=n(8),t._extend=function(e,t){if(!t||!O(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var L="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(L&&e[L]){var t;if("function"!=typeof(t=e[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),L&&Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,o(e))},t.promisify.custom=L,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var o=n.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,u=function(){return o.apply(i,arguments)};t.apply(this,n).then((function(t){e.nextTick(u,null,t)}),(function(t){e.nextTick(A,t,u)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,o(t)),n}}).call(this,n(6),n(0))},function(e,t,n){"use strict";(function(t){var n,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function u(){u.init.call(this)}e.exports=u,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,o,{once:!0})}))},u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var s=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function f(e,n,r,o){var i,u,s,f;if(c(r),void 0===(u=e._events)?(u=e._events=Object.create(null),e._eventsCount=0):(void 0!==u.newListener&&(e.emit("newListener",n,r.listener?r.listener:r),u=e._events),s=u[n]),void 0===s)s=u[n]=r,++e._eventsCount;else if("function"==typeof s?s=u[n]=o?[r,s]:[s,r]:o?s.unshift(r):s.push(r),(i=a(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=n,l.count=s.length,f=l,t&&t.warn&&t.warn(f)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=l.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):m(o,o.length)}function y(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},u.prototype.getMaxListeners=function(){return a(this)},u.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var u;if(t.length>0&&(u=t[0]),u instanceof Error)throw u;var s=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw s.context=u,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var a=c.length,f=m(c,a);for(n=0;n<a;++n)o(f[n],this,t)}return!0},u.prototype.addListener=function(e,t){return f(this,e,t,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(e,t){return f(this,e,t,!0)},u.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},u.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},u.prototype.removeListener=function(e,t){var n,r,o,i,u;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){u=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,u||t)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},u.prototype.listeners=function(e){return h(this,e,!0)},u.prototype.rawListeners=function(e){return h(this,e,!1)},u.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},u.prototype.listenerCount=y,u.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}}).call(this,n(0))},function(e,t,n){"use strict";e.exports=n(5)},function(e,t,n){"use strict";(function(t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=n(3),y=n(11),m=n(12),v=Symbol("state"),d=Symbol("open"),b=Symbol("closed"),g=Symbol("half-open"),w=Symbol("pending-close"),O=Symbol("shutdown"),j=Symbol("fallback"),E=Symbol("status"),x=Symbol("name"),S=Symbol("group"),T=new WeakMap,k=Symbol("Enabled"),P=Symbol("warming-up"),_=Symbol("volume-threshold"),L=Symbol("our-error"),A=Symbol("reset-timeout"),C=Symbol("warmup-timeout"),D="options.maxFailures is deprecated. Please use options.errorThresholdPercentage",M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(f,e);var n,r,o,i=a(f);function f(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(u(this,f),(n=i.call(this)).options=r,n.options.timeout=!1!==r.timeout&&(r.timeout||1e4),n.options.resetTimeout=r.resetTimeout||3e4,n.options.errorThresholdPercentage=r.errorThresholdPercentage||50,n.options.rollingCountTimeout=r.rollingCountTimeout||1e4,n.options.rollingCountBuckets=r.rollingCountBuckets||10,n.options.rollingPercentilesEnabled=!1!==r.rollingPercentilesEnabled,n.options.capacity=Number.isInteger(r.capacity)?r.capacity:Number.MAX_SAFE_INTEGER,n.options.errorFilter=r.errorFilter||function(e){return!1},n.semaphore=new m(n.options.capacity),!e)throw new TypeError("No action provided. Cannot construct a CircuitBreaker without an invocable action.");if(n[_]=Number.isInteger(r.volumeThreshold)?r.volumeThreshold:0,n[P]=!0===r.allowWarmUp,n.options.status?n.options.status instanceof y?n[E]=n.options.status:n[E]=new y({stats:n.options.status}):n[E]=new y(n.options),n[v]=b,r.state?(n[k]=!1!==r.state.enabled,n[P]=r.state.warmUp||n[P],n[b]=!1!==r.state.closed,n[g]=n[w]=r.state.halfOpen||!1,n[d]=!n[b]&&!n[g],n[O]=r.state.shutdown||!1):(n[w]=!1,n[k]=!1!==r.enabled),n[j]=null,n[x]=r.name||e.name||F(),n[S]=r.group||n[x],n[P]){var o=n[C]=setTimeout((function(e){return n[P]=!1}),n.options.rollingCountTimeout);"function"==typeof o.unref&&o.unref()}n.action="function"!=typeof e?function(t){return Promise.resolve(e)}:e,r.maxFailures&&t.error(D);var s=function(e){return function(t,r){return n[E].increment(e,r)}};function c(e){return function(t){var n=e[A]=setTimeout((function(){e[v]=g,e[w]=!0,e.emit("halfOpen",e.options.resetTimeout)}),e.options.resetTimeout);"function"==typeof n.unref&&n.unref()}}return n.on("success",s("successes")),n.on("failure",s("failures")),n.on("fallback",s("fallbacks")),n.on("timeout",s("timeouts")),n.on("fire",s("fires")),n.on("reject",s("rejects")),n.on("cacheHit",s("cacheHits")),n.on("cacheMiss",s("cacheMisses")),n.on("open",(function(e){return n[E].open()})),n.on("close",(function(e){return n[E].close()})),n.on("semaphoreLocked",s("semaphoreRejections")),n.on("open",c(l(n))),n.on("success",(function(e){n.halfOpen&&n.close()})),n.options.cache&&T.set(l(n),void 0),n[O]?(n[v]=O,n.shutdown()):n[b]?n.close():n[d]?n.open():n[g]&&(n[v]=g),n}return n=f,o=[{key:"isOurError",value:function(e){return!!e[L]}},{key:"newStatus",value:function(e){return new y(e)}}],(r=[{key:"close",value:function(){this[v]!==b&&(this[A]&&clearTimeout(this[A]),this[v]=b,this[w]=!1,this.emit("close"))}},{key:"open",value:function(){this[v]!==d&&(this[v]=d,this[w]=!1,this.emit("open"))}},{key:"shutdown",value:function(){this.disable(),this.removeAllListeners(),this[A]&&clearTimeout(this[A]),this[C]&&clearTimeout(this[C]),this.status.shutdown(),this[v]=O,this.emit("shutdown")}},{key:"isShutdown",get:function(){return this[v]===O}},{key:"name",get:function(){return this[x]}},{key:"group",get:function(){return this[S]}},{key:"pendingClose",get:function(){return this[w]}},{key:"closed",get:function(){return this[v]===b}},{key:"opened",get:function(){return this[v]===d}},{key:"halfOpen",get:function(){return this[v]===g}},{key:"status",get:function(){return this[E]}},{key:"stats",get:function(){return this[E].stats}},{key:"toJSON",value:function(){return{state:{name:this.name,enabled:this.enabled,closed:this.closed,open:this.opened,halfOpen:this.halfOpen,warmUp:this.warmUp,shutdown:this.isShutdown},status:this.status.stats}}},{key:"enabled",get:function(){return this[k]}},{key:"warmUp",get:function(){return this[P]}},{key:"volumeThreshold",get:function(){return this[_]}},{key:"fallback",value:function(e){var t=e;return e instanceof f&&(t=function(){return e.fire.apply(e,arguments)}),this[j]=t,this}},{key:"fire",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.call.apply(this,[this.action].concat(t))}},{key:"call",value:function(e){var t=this;if(this.isShutdown){var n=q("The circuit has been shutdown.","ESHUTDOWN");return Promise.reject(n)}for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];var u,s=Array.prototype.slice.call(o);if(this.emit("fire",s),void 0!==T.get(this))return this.emit("cacheHit"),T.get(this);if(this.options.cache&&this.emit("cacheMiss"),!this[k]){var c=this.action.apply(e,s);return"function"==typeof c.then?c:Promise.resolve(c)}if(!this.closed&&!this.pendingClose){var a=q("Breaker is open","EOPENBREAKER");return this.emit("reject",a),N(this,a,s)||Promise.reject(a)}this[w]=!1;var f=!1;return new Promise((function(n,r){var o=Date.now();if(t.semaphore.test()){t.options.timeout&&(u=setTimeout((function(){f=!0;var e=q("Timed out after ".concat(t.options.timeout,"ms"),"ETIMEDOUT"),i=Date.now()-o;t.semaphore.release(),t.emit("timeout",e,i,s),R(e,t,u,s,i,n,r)}),t.options.timeout));try{var i=t.action.apply(e,s),c="function"==typeof i.then?i:Promise.resolve(i);c.then((function(e){f||(clearTimeout(u),t.emit("success",e,Date.now()-o),t.semaphore.release(),n(e),t.options.cache&&T.set(t,c))})).catch((function(e){if(!f){t.semaphore.release();var i=Date.now()-o;R(e,t,u,s,i,n,r)}}))}catch(e){t.semaphore.release();var a=Date.now()-o;R(e,t,u,s,a,n,r)}}else{var l=Date.now()-o,p=q("Semaphore locked","ESEMLOCKED");t.emit("semaphoreLocked",p,l),R(p,t,u,s,l,n,r)}}))}},{key:"clearCache",value:function(){T.set(this,void 0)}},{key:"healthCheck",value:function(e,t){var n=this;if(t=t||5e3,"function"!=typeof e)throw new TypeError("Health check function must be a function");if(isNaN(t))throw new TypeError("Health check interval must be a number");var r=function(t){e.apply(n).catch((function(e){n.emit("healthCheckFailed",e),n.open()}))},o=setInterval(r,t);"function"==typeof o.unref&&o.unref(),r()}},{key:"enable",value:function(){this[k]=!0}},{key:"disable",value:function(){this[k]=!1}}])&&s(n.prototype,r),o&&s(n,o),f}(h);function R(e,t,n,r,i,u,s){var c;if(clearTimeout(n),(c=t.options).errorFilter.apply(c,[e].concat(o(r))))t.emit("success",e,i);else{!function(e,t,n,r){if(e.emit("failure",t,r,n),e.warmUp)return;var o=e.stats;if(o.fires<e.volumeThreshold&&!e.halfOpen)return;(o.failures/o.fires*100>e.options.errorThresholdPercentage||o.failures>=e.options.maxFailures||e.halfOpen)&&e.open()}(t,e,r,i);var a=N(t,e,r);if(a)return u(a)}s(e)}function N(e,t,n){if(e[j])try{var r=e[j].apply(e[j],[].concat(o(n),[t]));return e.emit("fallback",r,t),r instanceof Promise?r:Promise.resolve(r)}catch(e){return Promise.reject(e)}}function q(e,t){var n=new Error(e);return n.code=t,n[L]=!0,n}var F=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))};e.exports=M}).call(this,n(0))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var c,a=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?a=c.concat(a):l=-1,a.length&&h())}function h(){if(!f){var e=s(p);f=!0;for(var t=a.length;t;){for(c=a,a=[];++l<t;)c&&c[l].run();l=-1,t=a.length}c=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];a.push(new y(e,t)),1!==a.length||f||s(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";(function(t){var r=n(10);
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.circuitBreaker=t():e.circuitBreaker=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){(function(t){var r=n(2),o=n(9);function i(){return(new Date).getTime()}var u,s=Array.prototype.slice,c={};u=void 0!==t&&t.console?t.console:"undefined"!=typeof window&&window.console?window.console:{};for(var a=[[function(){},"log"],[function(){u.log.apply(u,arguments)},"info"],[function(){u.log.apply(u,arguments)},"warn"],[function(){u.warn.apply(u,arguments)},"error"],[function(e){c[e]=i()},"time"],[function(e){var t=c[e];if(!t)throw new Error("No such label: "+e);delete c[e];var n=i()-t;u.log(e+": "+n+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=r.format.apply(null,arguments),u.error(e.stack)},"trace"],[function(e){u.log(r.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=s.call(arguments,1);o.ok(!1,r.format.apply(null,t))}},"assert"]],f=0;f<a.length;f++){var l=a[f],p=l[0],h=l[1];u[h]||(u[h]=p)}e.exports=u}).call(this,n(1))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e,r){var o=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(c(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,u=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<o;s=r[++n])v(s)||!O(s)?u+=" "+s:u+=" "+c(s);return u},t.deprecate=function(n,o){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,o).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(o);e.traceDeprecation?r.trace(o):r.error(o),i=!0}return n.apply(this,arguments)}};var u,s={};function c(e,n){var r={seen:[],stylize:f};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),g(r.showHidden)&&(r.showHidden=!1),g(r.depth)&&(r.depth=2),g(r.colors)&&(r.colors=!1),g(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),l(r,e,r.depth)}function a(e,t){var n=c.styles[t];return n?"["+c.colors[n][0]+"m"+e+"["+c.colors[n][1]+"m":e}function f(e,t){return e}function l(e,n,r){if(e.customInspect&&n&&x(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,e);return b(o)||(o=l(e,o,r)),o}var i=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(d(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(v(t))return e.stylize("null","null")}(e,n);if(i)return i;var u=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(n)),E(n)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return p(n);if(0===u.length){if(x(n)){var c=n.name?": "+n.name:"";return e.stylize("[Function"+c+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(j(n))return e.stylize(Date.prototype.toString.call(n),"date");if(E(n))return p(n)}var a,f="",O=!1,S=["{","}"];(y(n)&&(O=!0,S=["[","]"]),x(n))&&(f=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(f=" "+RegExp.prototype.toString.call(n)),j(n)&&(f=" "+Date.prototype.toUTCString.call(n)),E(n)&&(f=" "+p(n)),0!==u.length||O&&0!=n.length?r<0?w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),a=O?function(e,t,n,r,o){for(var i=[],u=0,s=t.length;u<s;++u)_(t,String(u))?i.push(h(e,t,n,r,String(u),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(h(e,t,n,r,o,!0))})),i}(e,n,r,s,u):u.map((function(t){return h(e,n,r,s,t,O)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(a,f,S)):S[0]+f+S[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var u,s,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),_(r,o)||(u="["+o+"]"),s||(e.seen.indexOf(c.value)<0?(s=v(n)?l(e,c.value,null):l(e,c.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),g(u)){if(i&&o.match(/^\d+$/))return s;(u=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(u=u.substr(1,u.length-2),u=e.stylize(u,"name")):(u=u.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),u=e.stylize(u,"string"))}return u+": "+s}function y(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function v(e){return null===e}function d(e){return"number"==typeof e}function b(e){return"string"==typeof e}function g(e){return void 0===e}function w(e){return O(e)&&"[object RegExp]"===S(e)}function O(e){return"object"==typeof e&&null!==e}function j(e){return O(e)&&"[object Date]"===S(e)}function E(e){return O(e)&&("[object Error]"===S(e)||e instanceof Error)}function x(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(g(u)&&(u=Object({WEB:"web"}).NODE_DEBUG||""),n=n.toUpperCase(),!s[n])if(new RegExp("\\b"+n+"\\b","i").test(u)){var o=e.pid;s[n]=function(){var e=t.format.apply(t,arguments);r.error("%s %d: %s",n,o,e)}}else s[n]=function(){};return s[n]},t.inspect=c,c.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]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=y,t.isBoolean=m,t.isNull=v,t.isNullOrUndefined=function(e){return null==e},t.isNumber=d,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=g,t.isRegExp=w,t.isObject=O,t.isDate=j,t.isError=E,t.isFunction=x,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(7);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function P(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),k[e.getMonth()],t].join(" ")}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){r.log("%s - %s",P(),t.format.apply(t,arguments))},t.inherits=n(8),t._extend=function(e,t){if(!t||!O(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var L="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function A(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(L&&e[L]){var t;if("function"!=typeof(t=e[L]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),L&&Object.defineProperty(t,L,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,o(e))},t.promisify.custom=L,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var o=n.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,u=function(){return o.apply(i,arguments)};t.apply(this,n).then((function(t){e.nextTick(u,null,t)}),(function(t){e.nextTick(A,t,u)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,o(t)),n}}).call(this,n(6),n(0))},function(e,t,n){"use strict";(function(t){var n,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function u(){u.init.call(this)}e.exports=u,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}v(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,n)}(e,o,{once:!0})}))},u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var s=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function a(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function f(e,n,r,o){var i,u,s,f;if(c(r),void 0===(u=e._events)?(u=e._events=Object.create(null),e._eventsCount=0):(void 0!==u.newListener&&(e.emit("newListener",n,r.listener?r.listener:r),u=e._events),s=u[n]),void 0===s)s=u[n]=r,++e._eventsCount;else if("function"==typeof s?s=u[n]=o?[r,s]:[s,r]:o?s.unshift(r):s.push(r),(i=a(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(n)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=n,l.count=s.length,f=l,t&&t.warn&&t.warn(f)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=l.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):m(o,o.length)}function y(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function v(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},u.prototype.getMaxListeners=function(){return a(this)},u.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var u;if(t.length>0&&(u=t[0]),u instanceof Error)throw u;var s=new Error("Unhandled error."+(u?" ("+u.message+")":""));throw s.context=u,s}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var a=c.length,f=m(c,a);for(n=0;n<a;++n)o(f[n],this,t)}return!0},u.prototype.addListener=function(e,t){return f(this,e,t,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(e,t){return f(this,e,t,!0)},u.prototype.once=function(e,t){return c(t),this.on(e,p(this,e,t)),this},u.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,p(this,e,t)),this},u.prototype.removeListener=function(e,t){var n,r,o,i,u;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){u=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,u||t)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},u.prototype.listeners=function(e){return h(this,e,!0)},u.prototype.rawListeners=function(e){return h(this,e,!1)},u.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):y.call(e,t)},u.prototype.listenerCount=y,u.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}}).call(this,n(0))},function(e,t,n){"use strict";e.exports=n(5)},function(e,t,n){"use strict";(function(t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=n(3),y=n(11),m=n(12),v=Symbol("state"),d=Symbol("open"),b=Symbol("closed"),g=Symbol("half-open"),w=Symbol("pending-close"),O=Symbol("shutdown"),j=Symbol("fallback"),E=Symbol("status"),x=Symbol("name"),S=Symbol("group"),T=new WeakMap,k=Symbol("Enabled"),P=Symbol("warming-up"),_=Symbol("volume-threshold"),L=Symbol("our-error"),A=Symbol("reset-timeout"),D=Symbol("warmup-timeout"),C="options.maxFailures is deprecated. Please use options.errorThresholdPercentage",M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(f,e);var n,r,o,i=a(f);function f(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(u(this,f),(n=i.call(this)).options=r,n.options.timeout=!1!==r.timeout&&(r.timeout||1e4),n.options.resetTimeout=r.resetTimeout||3e4,n.options.errorThresholdPercentage=r.errorThresholdPercentage||50,n.options.rollingCountTimeout=r.rollingCountTimeout||1e4,n.options.rollingCountBuckets=r.rollingCountBuckets||10,n.options.rollingPercentilesEnabled=!1!==r.rollingPercentilesEnabled,n.options.capacity=Number.isInteger(r.capacity)?r.capacity:Number.MAX_SAFE_INTEGER,n.options.errorFilter=r.errorFilter||function(e){return!1},n.semaphore=new m(n.options.capacity),!e)throw new TypeError("No action provided. Cannot construct a CircuitBreaker without an invocable action.");if(n[_]=Number.isInteger(r.volumeThreshold)?r.volumeThreshold:0,n[P]=!0===r.allowWarmUp,n.options.status?n.options.status instanceof y?n[E]=n.options.status:n[E]=new y({stats:n.options.status}):n[E]=new y(n.options),n[v]=b,r.state?(n[k]=!1!==r.state.enabled,n[P]=r.state.warmUp||n[P],n[b]=!1!==r.state.closed,n[g]=n[w]=r.state.halfOpen||!1,n[d]=!n[b]&&!n[g],n[O]=r.state.shutdown||!1):(n[w]=!1,n[k]=!1!==r.enabled),n[j]=null,n[x]=r.name||e.name||F(),n[S]=r.group||n[x],n[P]){var o=n[D]=setTimeout((function(e){return n[P]=!1}),n.options.rollingCountTimeout);"function"==typeof o.unref&&o.unref()}n.action="function"!=typeof e?function(t){return Promise.resolve(e)}:e,r.maxFailures&&t.error(C);var s=function(e){return function(t,r){return n[E].increment(e,r)}};function c(e){return function(t){var n=e[A]=setTimeout((function(){e[v]=g,e[w]=!0,e.emit("halfOpen",e.options.resetTimeout)}),e.options.resetTimeout);"function"==typeof n.unref&&n.unref()}}return n.on("success",s("successes")),n.on("failure",s("failures")),n.on("fallback",s("fallbacks")),n.on("timeout",s("timeouts")),n.on("fire",s("fires")),n.on("reject",s("rejects")),n.on("cacheHit",s("cacheHits")),n.on("cacheMiss",s("cacheMisses")),n.on("open",(function(e){return n[E].open()})),n.on("close",(function(e){return n[E].close()})),n.on("semaphoreLocked",s("semaphoreRejections")),n.on("open",c(l(n))),n.on("success",(function(e){n.halfOpen&&n.close()})),n.options.cache&&T.set(l(n),void 0),n[O]?(n[v]=O,n.shutdown()):n[b]?n.close():n[d]?n.open():n[g]&&(n[v]=g),n}return n=f,o=[{key:"isOurError",value:function(e){return!!e[L]}},{key:"newStatus",value:function(e){return new y(e)}}],(r=[{key:"close",value:function(){this[v]!==b&&(this[A]&&clearTimeout(this[A]),this[v]=b,this[w]=!1,this.emit("close"))}},{key:"open",value:function(){this[v]!==d&&(this[v]=d,this[w]=!1,this.emit("open"))}},{key:"shutdown",value:function(){this.disable(),this.removeAllListeners(),this[A]&&clearTimeout(this[A]),this[D]&&clearTimeout(this[D]),this.status.shutdown(),this[v]=O,this.emit("shutdown")}},{key:"isShutdown",get:function(){return this[v]===O}},{key:"name",get:function(){return this[x]}},{key:"group",get:function(){return this[S]}},{key:"pendingClose",get:function(){return this[w]}},{key:"closed",get:function(){return this[v]===b}},{key:"opened",get:function(){return this[v]===d}},{key:"halfOpen",get:function(){return this[v]===g}},{key:"status",get:function(){return this[E]}},{key:"stats",get:function(){return this[E].stats}},{key:"toJSON",value:function(){return{state:{name:this.name,enabled:this.enabled,closed:this.closed,open:this.opened,halfOpen:this.halfOpen,warmUp:this.warmUp,shutdown:this.isShutdown},status:this.status.stats}}},{key:"enabled",get:function(){return this[k]}},{key:"warmUp",get:function(){return this[P]}},{key:"volumeThreshold",get:function(){return this[_]}},{key:"fallback",value:function(e){var t=e;return e instanceof f&&(t=function(){return e.fire.apply(e,arguments)}),this[j]=t,this}},{key:"fire",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.call.apply(this,[this.action].concat(t))}},{key:"call",value:function(e){var t=this;if(this.isShutdown){var n=q("The circuit has been shutdown.","ESHUTDOWN");return Promise.reject(n)}for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];var u,s=Array.prototype.slice.call(o);if(this.emit("fire",s),void 0!==T.get(this))return this.emit("cacheHit"),T.get(this);if(this.options.cache&&this.emit("cacheMiss"),!this[k]){var c=this.action.apply(e,s);return"function"==typeof c.then?c:Promise.resolve(c)}if(!this.closed&&!this.pendingClose){var a=q("Breaker is open","EOPENBREAKER");return this.emit("reject",a),N(this,a,s)||Promise.reject(a)}this[w]=!1;var f=!1;return new Promise((function(n,r){var o=Date.now();if(t.semaphore.test()){t.options.timeout&&(u=setTimeout((function(){f=!0;var e=q("Timed out after ".concat(t.options.timeout,"ms"),"ETIMEDOUT"),i=Date.now()-o;t.semaphore.release(),t.emit("timeout",e,i,s),R(e,t,u,s,i,n,r)}),t.options.timeout));try{var i=t.action.apply(e,s),c="function"==typeof i.then?i:Promise.resolve(i);c.then((function(e){f||(clearTimeout(u),t.emit("success",e,Date.now()-o),t.semaphore.release(),n(e),t.options.cache&&T.set(t,c))})).catch((function(e){if(!f){t.semaphore.release();var i=Date.now()-o;R(e,t,u,s,i,n,r)}}))}catch(e){t.semaphore.release();var a=Date.now()-o;R(e,t,u,s,a,n,r)}}else{var l=Date.now()-o,p=q("Semaphore locked","ESEMLOCKED");t.emit("semaphoreLocked",p,l),R(p,t,u,s,l,n,r)}}))}},{key:"clearCache",value:function(){T.set(this,void 0)}},{key:"healthCheck",value:function(e,t){var n=this;if(t=t||5e3,"function"!=typeof e)throw new TypeError("Health check function must be a function");if(isNaN(t))throw new TypeError("Health check interval must be a number");var r=function(t){e.apply(n).catch((function(e){n.emit("healthCheckFailed",e),n.open()}))},o=setInterval(r,t);"function"==typeof o.unref&&o.unref(),r()}},{key:"enable",value:function(){this[k]=!0}},{key:"disable",value:function(){this[k]=!1}}])&&s(n.prototype,r),o&&s(n,o),f}(h);function R(e,t,n,r,i,u,s){var c;if(clearTimeout(n),(c=t.options).errorFilter.apply(c,[e].concat(o(r))))t.emit("success",e,i);else{!function(e,t,n,r){if(e.emit("failure",t,r,n),e.warmUp)return;var o=e.stats;if(o.fires<e.volumeThreshold&&!e.halfOpen)return;(o.failures/o.fires*100>e.options.errorThresholdPercentage||o.failures>=e.options.maxFailures||e.halfOpen)&&e.open()}(t,e,r,i);var a=N(t,e,r);if(a)return u(a)}s(e)}function N(e,t,n){if(e[j])try{var r=e[j].apply(e[j],[].concat(o(n),[t]));return e.emit("fallback",r,t),r instanceof Promise?r:Promise.resolve(r)}catch(e){return Promise.reject(e)}}function q(e,t){var n=new Error(e);return n.code=t,n[L]=!0,n}var F=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))};e.exports=M}).call(this,n(0))},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var c,a=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?a=c.concat(a):l=-1,a.length&&h())}function h(){if(!f){var e=s(p);f=!0;for(var t=a.length;t;){for(c=a,a=[];++l<t;)c&&c[l].run();l=-1,t=a.length}c=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];a.push(new y(e,t)),1!==a.length||f||s(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";(function(t){var r=n(10);
/*!

@@ -12,3 +12,3 @@ * The buffer module from node.js, for the browser.

@license MIT
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function u(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,c=u(e),a=1;a<arguments.length;a++){for(var f in n=Object(arguments[a]))o.call(n,f)&&(c[f]=n[f]);if(r){s=r(n);for(var l=0;l<s.length;l++)i.call(n,s[l])&&(c[s[l]]=n[s[l]])}}return c}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=Symbol("window"),h=Symbol("buckets"),y=Symbol("timeout"),m=Symbol("percentiles"),v=Symbol("bucket-interval"),d=Symbol("snapshot-interval"),b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(u,e);var t,n,r,o=a(u);function u(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=o.call(this))[h]=e.rollingCountBuckets||10,t[y]=e.rollingCountTimeout||1e4,t[p]=new Array(t[h]),t[m]=[0,.25,.5,.75,.9,.95,.99,.995,1],t.rollingPercentilesEnabled=!1!==e.rollingPercentilesEnabled;for(var n=0;n<t[h];n++)t[p][n]=w();var r=Math.floor(t[y]/t[h]);return t[v]=setInterval(g(t[p]),r),"function"==typeof t[v].unref&&t[v].unref(),t[d]=setInterval((function(e){return t.emit("snapshot",t.stats)}),r),"function"==typeof t[d].unref&&t[d].unref(),e.stats&&(t[p][0]=i(i({},w()),e.stats)),t}return t=u,(n=[{key:"stats",get:function(){var e=this,t=this[p].reduce((function(t,n){return n?(Object.keys(t).forEach((function(e){"latencyTimes"!==e&&"percentiles"!==e&&(t[e]+=n[e]||0)})),e.rollingPercentilesEnabled&&t.latencyTimes.push.apply(t.latencyTimes,n.latencyTimes||[]),t):t}),w());return this.rollingPercentilesEnabled?(t.latencyTimes.sort((function(e,t){return e-t})),t.latencyTimes.length?t.latencyMean=t.latencyTimes.reduce((function(e,t){return e+t}),0)/t.latencyTimes.length:t.latencyMean=0,this[m].forEach((function(e){t.percentiles[e]=function(e,t){if(0===e)return t[0]||0;var n=Math.ceil(e*t.length);return t[n-1]||0}(e,t.latencyTimes)}))):(t.latencyMean=-1,this[m].forEach((function(e){t.percentiles[e]=-1}))),t}},{key:"window",get:function(){return this[p].slice()}},{key:"increment",value:function(e,t){this[p][0][e]++,"successes"!==e&&"failures"!==e&&"timeouts"!==e||this[p][0].latencyTimes.push(t||0)}},{key:"open",value:function(){this[p][0].isCircuitBreakerOpen=!0}},{key:"close",value:function(){this[p][0].isCircuitBreakerOpen=!1}},{key:"shutdown",value:function(){this.removeAllListeners(),clearInterval(this[v]),clearInterval(this[d])}}])&&s(t.prototype,n),r&&s(t,r),u}(n(3).EventEmitter),g=function(e){return function(t){e.pop(),e.unshift(w())}},w=function(e){return{failures:0,fallbacks:0,successes:0,rejects:0,fires:0,timeouts:0,cacheHits:0,cacheMisses:0,semaphoreRejections:0,percentiles:{},latencyTimes:[]}};e.exports=b},function(e,t,n){"use strict";e.exports=function(e){var t=[],n=e,r={take:o,release:i,test:function(){return!(n<1)&&(o()&&!0)}};return Object.defineProperty(r,"count",{get:function(e){return n},enumerable:!0}),r;function o(e){return n>0?(--n,Promise.resolve(i)):new Promise((function(r,o){t.push((function(e){--n,r(i)})),e&&setTimeout((function(n){t.shift();var r=new Error("Timed out after ".concat(e,"ms"));r.code="ETIMEDOUT",o(r)}),e)}))}function i(){n++,t.length>0&&t.shift()()}}}])}));
*/var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function u(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,c=u(e),a=1;a<arguments.length;a++){for(var f in n=Object(arguments[a]))o.call(n,f)&&(c[f]=n[f]);if(r){s=r(n);for(var l=0;l<s.length;l++)i.call(n,s[l])&&(c[s[l]]=n[s[l]])}}return c}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=Symbol("window"),h=Symbol("buckets"),y=Symbol("timeout"),m=Symbol("percentiles"),v=Symbol("bucket-interval"),d=Symbol("snapshot-interval"),b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(u,e);var t,n,r,o=a(u);function u(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=o.call(this))[h]=e.rollingCountBuckets||10,t[y]=e.rollingCountTimeout||1e4,t[p]=new Array(t[h]),t[m]=[0,.25,.5,.75,.9,.95,.99,.995,1],t.rollingPercentilesEnabled=!1!==e.rollingPercentilesEnabled;for(var n=0;n<t[h];n++)t[p][n]=w();var r=Math.floor(t[y]/t[h]);return t[v]=setInterval(g(t[p]),r),"function"==typeof t[v].unref&&t[v].unref(),t[d]=setInterval((function(e){return t.emit("snapshot",t.stats)}),r),"function"==typeof t[d].unref&&t[d].unref(),e.stats&&(t[p][0]=i(i({},w()),e.stats)),t}return t=u,(n=[{key:"stats",get:function(){var e=this,t=this[p].reduce((function(t,n){return n?(Object.keys(t).forEach((function(e){"latencyTimes"!==e&&"percentiles"!==e&&(t[e]+=n[e]||0)})),e.rollingPercentilesEnabled&&t.latencyTimes.push.apply(t.latencyTimes,n.latencyTimes||[]),t):t}),w());return this.rollingPercentilesEnabled?(t.latencyTimes.sort((function(e,t){return e-t})),t.latencyTimes.length?t.latencyMean=t.latencyTimes.reduce((function(e,t){return e+t}),0)/t.latencyTimes.length:t.latencyMean=0,this[m].forEach((function(e){t.percentiles[e]=function(e,t){if(0===e)return t[0]||0;var n=Math.ceil(e*t.length);return t[n-1]||0}(e,t.latencyTimes)}))):(t.latencyMean=-1,this[m].forEach((function(e){t.percentiles[e]=-1}))),t}},{key:"window",get:function(){return this[p].slice()}},{key:"increment",value:function(e,t){this[p][0][e]++,"successes"!==e&&"failures"!==e&&"timeouts"!==e||this[p][0].latencyTimes.push(t||0)}},{key:"open",value:function(){this[p][0].isCircuitBreakerOpen=!0}},{key:"close",value:function(){this[p][0].isCircuitBreakerOpen=!1}},{key:"shutdown",value:function(){this.removeAllListeners(),clearInterval(this[v]),clearInterval(this[d])}}])&&s(t.prototype,n),r&&s(t,r),u}(n(3).EventEmitter),g=function(e){return function(t){e.pop(),e.unshift(w())}},w=function(e){return{failures:0,fallbacks:0,successes:0,rejects:0,fires:0,timeouts:0,cacheHits:0,cacheMisses:0,semaphoreRejections:0,percentiles:{},latencyTimes:[]}};e.exports=b},function(e,t,n){"use strict";e.exports=function(e){var t=[],n=e,r={take:o,release:i,test:function(){return!(n<1)&&(o()&&!0)}};return Object.defineProperty(r,"count",{get:function(e){return n},enumerable:!0}),r;function o(e){return n>0?(--n,Promise.resolve(i)):new Promise((function(r,o){t.push((function(e){--n,r(i)})),e&&setTimeout((function(n){t.shift();var r=new Error("Timed out after ".concat(e,"ms"));r.code="ETIMEDOUT",o(r)}),e)}))}function i(){n++,t.length>0&&t.shift()()}}}])}));
//# sourceMappingURL=opossum.min.map
{
"name": "opossum",
"version": "6.2.0",
"version": "6.2.1",
"author": "Red Hat, Inc.",

@@ -19,4 +19,2 @@ "license": "Apache-2.0",

"ci": "npm run build && npm run test && npm run test:headless",
"prerelease": "npm run ci",
"release": "standard-version -s -a",
"lint": "standardx test/*.js index.js lib/*.js test/*/*.js",

@@ -26,8 +24,2 @@ "clean": "rm -rf node_modules dist/*.js test/browser/webpack-test.js",

},
"standard-version": {
"scripts": {
"postbump": "npm run build:docs",
"precommit": "git add docs/"
}
},
"repository": {

@@ -48,12 +40,12 @@ "type": "git",

"devDependencies": {
"@babel/core": "^7.12.17",
"@babel/preset-env": "^7.12.17",
"@babel/core": "^7.14.6",
"@babel/preset-env": "^7.14.7",
"babel-loader": "^8.2.2",
"codacy-coverage": "^3.4.0",
"coveralls": "^3.1.0",
"documentation": "^13.1.1",
"coveralls": "^3.1.1",
"documentation": "^13.2.5",
"eslint": "^7.24.0",
"eslint-config-semistandard": "^15.0.1",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-node": "^11.1.0",

@@ -66,7 +58,6 @@ "eslint-plugin-promise": "^5.1.0",

"serve": "^11.3.2",
"standard-version": "9.1.1",
"tap-spec": "~5.0.0",
"tape": "~5.2.0",
"tape": "~5.2.2",
"webpack": "~4.46.0",
"webpack-cli": "~4.5.0"
"webpack-cli": "~4.7.2"
},

@@ -73,0 +64,0 @@ "description": "A fail-fast circuit breaker for promises and callbacks",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc