!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.DualEmitter=e()}}(function(){return function e(t,n,r){function o(u,s){if(!n[u]){if(!t[u]){var c="function"==typeof require&&require;if(!s&&c)return c(u,!0);if(i)return i(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var a=n[u]={exports:{}};t[u][0].call(a.exports,function(e){var n=t[u][1][e];return o(n?n:e)},a,a.exports,e,t,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u1)for(var n=1;n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),h(t)?r.showHidden=t:t&&n._extend(r,t),O(r.showHidden)&&(r.showHidden=!1),O(r.depth)&&(r.depth=2),O(r.colors)&&(r.colors=!1),O(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=i),c(r,e,r.depth)}function i(e,t){var n=o.styles[t];return n?"["+o.colors[n][0]+"m"+e+"["+o.colors[n][1]+"m":e}function u(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function c(e,t,r){if(e.customInspect&&t&&D(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(r,e);return b(o)||(o=c(e,o,r)),o}var i=f(e,t);if(i)return i;var u=Object.keys(t),h=s(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(t)),j(t)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return a(t);if(0===u.length){if(D(t)){var d=t.name?": "+t.name:"";return e.stylize("[Function"+d+"]","special")}if(E(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(_(t))return e.stylize(Date.prototype.toString.call(t),"date");if(j(t))return a(t)}var v="",m=!1,w=["{","}"];if(g(t)&&(m=!0,w=["[","]"]),D(t)){var O=t.name?": "+t.name:"";v=" [Function"+O+"]"}if(E(t)&&(v=" "+RegExp.prototype.toString.call(t)),_(t)&&(v=" "+Date.prototype.toUTCString.call(t)),j(t)&&(v=" "+a(t)),0===u.length&&(!m||0==t.length))return w[0]+v+w[1];if(0>r)return E(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var x;return x=m?p(e,t,r,h,u):u.map(function(n){return l(e,t,r,h,n,m)}),e.seen.pop(),y(x,v,w)}function f(e,t){if(O(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")}return m(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}function a(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,o){for(var i=[],u=0,s=t.length;s>u;++u)N(t,String(u))?i.push(l(e,t,n,r,String(u),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(l(e,t,n,r,o,!0))}),i}function l(e,t,n,r,o,i){var u,s,f;if(f=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]},f.get?s=f.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):f.set&&(s=e.stylize("[Setter]","special")),N(r,o)||(u="["+o+"]"),s||(e.seen.indexOf(f.value)<0?(s=d(n)?c(e,f.value,null):c(e,f.value,n-1),s.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")),O(u)){if(i&&o.match(/^\d+$/))return s;u=JSON.stringify(""+o),u.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,t,n){var r=0,o=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function g(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function d(e){return null===e}function v(e){return null==e}function m(e){return"number"==typeof e}function b(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function O(e){return void 0===e}function E(e){return x(e)&&"[object RegExp]"===z(e)}function x(e){return"object"==typeof e&&null!==e}function _(e){return x(e)&&"[object Date]"===z(e)}function j(e){return x(e)&&("[object Error]"===z(e)||e instanceof Error)}function D(e){return"function"==typeof e}function S(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function z(e){return Object.prototype.toString.call(e)}function T(e){return 10>e?"0"+e.toString(10):e.toString(10)}function L(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),U[e.getMonth()],t].join(" ")}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var A=/%[sdj%]/g;n.format=function(e){if(!b(e)){for(var t=[],n=0;n=i)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(t){return"[Circular]"}default:return e}}),s=r[n];i>n;s=r[++n])u+=d(s)||!x(s)?" "+s:" "+o(s);return u},n.deprecate=function(e,o){function i(){if(!u){if(t.throwDeprecation)throw new Error(o);t.traceDeprecation?console.trace(o):console.error(o),u=!0}return e.apply(this,arguments)}if(O(r.process))return function(){return n.deprecate(e,o).apply(this,arguments)};if(t.noDeprecation===!0)return e;var u=!1;return i};var H,M={};n.debuglog=function(e){if(O(H)&&(H=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!M[e])if(new RegExp("\\b"+e+"\\b","i").test(H)){var r=t.pid;M[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else M[e]=function(){};return M[e]},n.inspect=o,o.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]},o.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=g,n.isBoolean=h,n.isNull=d,n.isNullOrUndefined=v,n.isNumber=m,n.isString=b,n.isSymbol=w,n.isUndefined=O,n.isRegExp=E,n.isObject=x,n.isDate=_,n.isError=j,n.isFunction=D,n.isPrimitive=S,n.isBuffer=e("./support/isBuffer");var U=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",L(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!x(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":3,_process:2,inherits:1}],5:[function(e,t,n){"use strict";function r(e){return this instanceof r?void(this._events=e&&"object"==typeof e?e:{}):new r(e)}var o=e("util");t.exports=r,r.prototype.on=function(e,t,n){if("string"!=typeof e)throw new TypeError("DualEmitter#on expect `name` be string");if("function"!=typeof t)throw new TypeError("DualEmitter#on expect `fn` be function");return this._events[e]=this._hasOwn(this._events,e)?this._events[e]:[],this._events[e].push(t),n&&this._isDom(n)&&(t.outerHTML=n.outerHTML,this._element=n,n.addEventListener?n.addEventListener(e,t,!1):n.attachEvent("on"+e,t)),this},r.prototype.off=function(e,t,n){if("string"!=typeof e)throw new TypeError("DualEmitter#off expect `name` be string");if("function"!=typeof t)throw new TypeError("DualEmitter#off expect `fn` be function");return this._hasOwn(this._events,e)?(this._events[e].splice(this._events[e].indexOf(t),1),n&&this._isDom(n)&&(n.removeEventListener?n.removeEventListener(e,t,!1):n.detachEvent("on"+e,t)),this):this},r.prototype.once=function(e,t,n){function r(){return o.off(e,r,n),t.apply(n,arguments)}var o=this;return this.on(e,r,n)},r.prototype.emit=function(e){if(!this._hasOwn(this._events,e))return this;var t=Array.prototype.slice.call(arguments,1),n=t[t.length-1],r=this._isDom(n);n=r?n:this,t=r?t.slice(0,-1):t;for(var o=0;o