ethstats-server/public/js/lib/primus.min.js

1 line
22 KiB
JavaScript
Raw Normal View History

2015-05-08 04:30:51 +02:00
!function(t,e,n){e[t]=n.call(e),"undefined"!=typeof module&&module.exports?module.exports=e[t]:"function"==typeof define&&define.amd&&define(function(){return e[t]})}("Primus",this,function(){var t,e=function n(t,e,r){function o(s,c){if(!e[s]){if(!t[s]){var a="function"==typeof require&&require;if(!c&&a)return a(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var f=e[s]={exports:{}};t[s][0].call(f.exports,function(e){var n=t[s][1][e];return o(n?n:e)},f,f.exports,n,t,e,r)}return e[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e){"use strict";e.exports=function(t,e){function n(t,n){if(e[t]){if("string"==typeof e[t]&&(e[t]=e[t].split(r)),"function"==typeof e[t])return e[t].call(n);for(var o,i,s=0;s<e[t].length;s++)i=e[t][s],o=typeof i,"function"===o?i.call(n):"string"===o&&"function"==typeof n[i]&&n[i]()}}var r=/[, ]+/;return e=e||{},t=t||[],"string"==typeof t&&(t=t.split(r)),function(){var e,r=this,o=0;if(null===r[t[0]])return!1;for(n("before",r);o<t.length;o++)e=t[o],r[e]&&("function"==typeof r[e].destroy&&r[e].destroy(),r[e]=null);return r.emit&&r.emit("destroy"),n("after",r),!0}}},{}],2:[function(t,e){"use strict";e.exports=function(){for(var t,e=this,n=0,r=arguments.length,o=new Array(r);r>n;n++)o[n]=arguments[n];return"function"!=typeof o[o.length-1]?function(){for(var t=0,n=arguments.length,r=new Array(n);n>t;t++)r[t]=arguments[t];return e.emit.apply(e,o.concat(r))}:(t=o.pop(),function(){for(var n=0,r=arguments.length,i=new Array(r+1);r>n;n++)i[n+1]=arguments[n];return i[0]=function(t,n){return t?e.emit("error",t):(i=void 0===n?i.slice(1):null===n?[]:n,void e.emit.apply(e,o.concat(i)))},t.apply(e,i),!0})}},{}],3:[function(t,e){"use strict";function n(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function r(){}r.prototype._events=void 0,r.prototype.listeners=function(t){if(!this._events||!this._events[t])return[];if(this._events[t].fn)return[this._events[t].fn];for(var e=0,n=this._events[t].length,r=new Array(n);n>e;e++)r[e]=this._events[t][e].fn;return r},r.prototype.emit=function(t,e,n,r,o,i){if(!this._events||!this._events[t])return!1;var s,c,a=this._events[t],u=arguments.length;if("function"==typeof a.fn){switch(a.once&&this.removeListener(t,a.fn,!0),u){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,e),!0;case 3:return a.fn.call(a.context,e,n),!0;case 4:return a.fn.call(a.context,e,n,r),!0;case 5:return a.fn.call(a.context,e,n,r,o),!0;case 6:return a.fn.call(a.context,e,n,r,o,i),!0}for(c=1,s=new Array(u-1);u>c;c++)s[c-1]=arguments[c];a.fn.apply(a.context,s)}else{var f,p=a.length;for(c=0;p>c;c++)switch(a[c].once&&this.removeListener(t,a[c].fn,!0),u){case 1:a[c].fn.call(a[c].context);break;case 2:a[c].fn.call(a[c].context,e);break;case 3:a[c].fn.call(a[c].context,e,n);break;default:if(!s)for(f=1,s=new Array(u-1);u>f;f++)s[f-1]=arguments[f];a[c].fn.apply(a[c].context,s)}}return!0},r.prototype.on=function(t,e,r){var o=new n(e,r||this);return this._events||(this._events={}),this._events[t]?this._events[t].fn?this._events[t]=[this._events[t],o]:this._events[t].push(o):this._events[t]=o,this},r.prototype.once=function(t,e,r){var o=new n(e,r||this,!0);return this._events||(this._events={}),this._events[t]?this._events[t].fn?this._events[t]=[this._events[t],o]:this._events[t].push(o):this._events[t]=o,this},r.prototype.removeListener=function(t,e,n){if(!this._events||!this._events[t])return this;var r=this._events[t],o=[];if(e&&(r.fn&&(r.fn!==e||n&&!r.once)&&o.push(r),!r.fn))for(var i=0,s=r.length;s>i;i++)(r[i].fn!==e||n&&!r[i].once)&&o.push(r[i]);return o.length?this._events[t]=1===o.length?o[0]:o:delete this._events[t],this},r.prototype.removeAllListeners=function(t){return this._events?(t?delete this._events[t]:this._events={},this):this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.EventEmitter=r,r.EventEmitter2=r,r.EventEmitter3=r,e.exports=r},{}],4:[function(t,e,n){"use strict";fun