UNPKG

@perifinance/peri-finance

Version:

The smart contracts which make up the Peri Finance system. (pynths.com)

8 lines 26.6 MB
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?exports.perifinance=a():e.perifinance=a()}(window,(function(){return function(e){var a={};function b(f){if(a[f])return a[f].exports;var t=a[f]={i:f,l:!1,exports:{}};return e[f].call(t.exports,t,t.exports,b),t.l=!0,t.exports}return b.m=e,b.c=a,b.d=function(e,a,f){b.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:f})},b.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.t=function(e,a){if(1&a&&(e=b(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var f=Object.create(null);if(b.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var t in e)b.d(f,t,function(a){return e[a]}.bind(null,t));return f},b.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return b.d(a,"a",a),a},b.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},b.p="",b(b.s=19)}([function(e,a){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,a,b){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <http://feross.org> * @license MIT */ var f=b(22),t=b(23),n=b(24);function d(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(e,a){if(d()<a)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(a)).__proto__=s.prototype:(null===e&&(e=new s(a)),e.length=a),e}function s(e,a,b){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(e,a,b);if("number"==typeof e){if("string"==typeof a)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return i(this,e,a,b)}function i(e,a,b,f){if("number"==typeof a)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&a instanceof ArrayBuffer?function(e,a,b,f){if(a.byteLength,b<0||a.byteLength<b)throw new RangeError("'offset' is out of bounds");if(a.byteLength<b+(f||0))throw new RangeError("'length' is out of bounds");a=void 0===b&&void 0===f?new Uint8Array(a):void 0===f?new Uint8Array(a,b):new Uint8Array(a,b,f);s.TYPED_ARRAY_SUPPORT?(e=a).__proto__=s.prototype:e=r(e,a);return e}(e,a,b,f):"string"==typeof a?function(e,a,b){"string"==typeof b&&""!==b||(b="utf8");if(!s.isEncoding(b))throw new TypeError('"encoding" must be a valid string encoding');var f=0|l(a,b),t=(e=c(e,f)).write(a,b);t!==f&&(e=e.slice(0,t));return e}(e,a,b):function(e,a){if(s.isBuffer(a)){var b=0|y(a.length);return 0===(e=c(e,b)).length||a.copy(e,0,0,b),e}if(a){if("undefined"!=typeof ArrayBuffer&&a.buffer instanceof ArrayBuffer||"length"in a)return"number"!=typeof a.length||(f=a.length)!=f?c(e,0):r(e,a);if("Buffer"===a.type&&n(a.data))return r(e,a.data)}var f;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,a)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,a){if(u(a),e=c(e,a<0?0:0|y(a)),!s.TYPED_ARRAY_SUPPORT)for(var b=0;b<a;++b)e[b]=0;return e}function r(e,a){var b=a.length<0?0:0|y(a.length);e=c(e,b);for(var f=0;f<b;f+=1)e[f]=255&a[f];return e}function y(e){if(e>=d())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d().toString(16)+" bytes");return 0|e}function l(e,a){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var b=e.length;if(0===b)return 0;for(var f=!1;;)switch(a){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*b;case"hex":return b>>>1;case"base64":return V(e).length;default:if(f)return U(e).length;a=(""+a).toLowerCase(),f=!0}}function o(e,a,b){var f=!1;if((void 0===a||a<0)&&(a=0),a>this.length)return"";if((void 0===b||b>this.length)&&(b=this.length),b<=0)return"";if((b>>>=0)<=(a>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,a,b);case"utf8":case"utf-8":return A(this,a,b);case"ascii":return E(this,a,b);case"latin1":case"binary":return _(this,a,b);case"base64":return k(this,a,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,a,b);default:if(f)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),f=!0}}function m(e,a,b){var f=e[a];e[a]=e[b],e[b]=f}function T(e,a,b,f,t){if(0===e.length)return-1;if("string"==typeof b?(f=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),b=+b,isNaN(b)&&(b=t?0:e.length-1),b<0&&(b=e.length+b),b>=e.length){if(t)return-1;b=e.length-1}else if(b<0){if(!t)return-1;b=0}if("string"==typeof a&&(a=s.from(a,f)),s.isBuffer(a))return 0===a.length?-1:x(e,a,b,f,t);if("number"==typeof a)return a&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?t?Uint8Array.prototype.indexOf.call(e,a,b):Uint8Array.prototype.lastIndexOf.call(e,a,b):x(e,[a],b,f,t);throw new TypeError("val must be string, number or Buffer")}function x(e,a,b,f,t){var n,d=1,c=e.length,s=a.length;if(void 0!==f&&("ucs2"===(f=String(f).toLowerCase())||"ucs-2"===f||"utf16le"===f||"utf-16le"===f)){if(e.length<2||a.length<2)return-1;d=2,c/=2,s/=2,b/=2}function i(e,a){return 1===d?e[a]:e.readUInt16BE(a*d)}if(t){var u=-1;for(n=b;n<c;n++)if(i(e,n)===i(a,-1===u?0:n-u)){if(-1===u&&(u=n),n-u+1===s)return u*d}else-1!==u&&(n-=n-u),u=-1}else for(b+s>c&&(b=c-s),n=b;n>=0;n--){for(var p=!0,r=0;r<s;r++)if(i(e,n+r)!==i(a,r)){p=!1;break}if(p)return n}return-1}function g(e,a,b,f){b=Number(b)||0;var t=e.length-b;f?(f=Number(f))>t&&(f=t):f=t;var n=a.length;if(n%2!=0)throw new TypeError("Invalid hex string");f>n/2&&(f=n/2);for(var d=0;d<f;++d){var c=parseInt(a.substr(2*d,2),16);if(isNaN(c))return d;e[b+d]=c}return d}function w(e,a,b,f){return K(U(a,e.length-b),e,b,f)}function v(e,a,b,f){return K(function(e){for(var a=[],b=0;b<e.length;++b)a.push(255&e.charCodeAt(b));return a}(a),e,b,f)}function M(e,a,b,f){return v(e,a,b,f)}function h(e,a,b,f){return K(V(a),e,b,f)}function C(e,a,b,f){return K(function(e,a){for(var b,f,t,n=[],d=0;d<e.length&&!((a-=2)<0);++d)b=e.charCodeAt(d),f=b>>8,t=b%256,n.push(t),n.push(f);return n}(a,e.length-b),e,b,f)}function k(e,a,b){return 0===a&&b===e.length?f.fromByteArray(e):f.fromByteArray(e.slice(a,b))}function A(e,a,b){b=Math.min(e.length,b);for(var f=[],t=a;t<b;){var n,d,c,s,i=e[t],u=null,p=i>239?4:i>223?3:i>191?2:1;if(t+p<=b)switch(p){case 1:i<128&&(u=i);break;case 2:128==(192&(n=e[t+1]))&&(s=(31&i)<<6|63&n)>127&&(u=s);break;case 3:n=e[t+1],d=e[t+2],128==(192&n)&&128==(192&d)&&(s=(15&i)<<12|(63&n)<<6|63&d)>2047&&(s<55296||s>57343)&&(u=s);break;case 4:n=e[t+1],d=e[t+2],c=e[t+3],128==(192&n)&&128==(192&d)&&128==(192&c)&&(s=(15&i)<<18|(63&n)<<12|(63&d)<<6|63&c)>65535&&s<1114112&&(u=s)}null===u?(u=65533,p=1):u>65535&&(u-=65536,f.push(u>>>10&1023|55296),u=56320|1023&u),f.push(u),t+=p}return function(e){var a=e.length;if(a<=4096)return String.fromCharCode.apply(String,e);var b="",f=0;for(;f<a;)b+=String.fromCharCode.apply(String,e.slice(f,f+=4096));return b}(f)}a.Buffer=s,a.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},a.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),a.kMaxLength=d(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,a,b){return i(null,e,a,b)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,a,b){return function(e,a,b,f){return u(a),a<=0?c(e,a):void 0!==b?"string"==typeof f?c(e,a).fill(b,f):c(e,a).fill(b):c(e,a)}(null,e,a,b)},s.allocUnsafe=function(e){return p(null,e)},s.allocUnsafeSlow=function(e){return p(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,a){if(!s.isBuffer(e)||!s.isBuffer(a))throw new TypeError("Arguments must be Buffers");if(e===a)return 0;for(var b=e.length,f=a.length,t=0,n=Math.min(b,f);t<n;++t)if(e[t]!==a[t]){b=e[t],f=a[t];break}return b<f?-1:f<b?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,a){if(!n(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var b;if(void 0===a)for(a=0,b=0;b<e.length;++b)a+=e[b].length;var f=s.allocUnsafe(a),t=0;for(b=0;b<e.length;++b){var d=e[b];if(!s.isBuffer(d))throw new TypeError('"list" argument must be an Array of Buffers');d.copy(f,t),t+=d.length}return f},s.byteLength=l,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var a=0;a<e;a+=2)m(this,a,a+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var a=0;a<e;a+=4)m(this,a,a+3),m(this,a+1,a+2);return this},s.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var a=0;a<e;a+=8)m(this,a,a+7),m(this,a+1,a+6),m(this,a+2,a+5),m(this,a+3,a+4);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):o.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",b=a.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(e+=" ... ")),"<Buffer "+e+">"},s.prototype.compare=function(e,a,b,f,t){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===a&&(a=0),void 0===b&&(b=e?e.length:0),void 0===f&&(f=0),void 0===t&&(t=this.length),a<0||b>e.length||f<0||t>this.length)throw new RangeError("out of range index");if(f>=t&&a>=b)return 0;if(f>=t)return-1;if(a>=b)return 1;if(this===e)return 0;for(var n=(t>>>=0)-(f>>>=0),d=(b>>>=0)-(a>>>=0),c=Math.min(n,d),i=this.slice(f,t),u=e.slice(a,b),p=0;p<c;++p)if(i[p]!==u[p]){n=i[p],d=u[p];break}return n<d?-1:d<n?1:0},s.prototype.includes=function(e,a,b){return-1!==this.indexOf(e,a,b)},s.prototype.indexOf=function(e,a,b){return T(this,e,a,b,!0)},s.prototype.lastIndexOf=function(e,a,b){return T(this,e,a,b,!1)},s.prototype.write=function(e,a,b,f){if(void 0===a)f="utf8",b=this.length,a=0;else if(void 0===b&&"string"==typeof a)f=a,b=this.length,a=0;else{if(!isFinite(a))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");a|=0,isFinite(b)?(b|=0,void 0===f&&(f="utf8")):(f=b,b=void 0)}var t=this.length-a;if((void 0===b||b>t)&&(b=t),e.length>0&&(b<0||a<0)||a>this.length)throw new RangeError("Attempt to write outside buffer bounds");f||(f="utf8");for(var n=!1;;)switch(f){case"hex":return g(this,e,a,b);case"utf8":case"utf-8":return w(this,e,a,b);case"ascii":return v(this,e,a,b);case"latin1":case"binary":return M(this,e,a,b);case"base64":return h(this,e,a,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,a,b);default:if(n)throw new TypeError("Unknown encoding: "+f);f=(""+f).toLowerCase(),n=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(e,a,b){var f="";b=Math.min(e.length,b);for(var t=a;t<b;++t)f+=String.fromCharCode(127&e[t]);return f}function _(e,a,b){var f="";b=Math.min(e.length,b);for(var t=a;t<b;++t)f+=String.fromCharCode(e[t]);return f}function D(e,a,b){var f=e.length;(!a||a<0)&&(a=0),(!b||b<0||b>f)&&(b=f);for(var t="",n=a;n<b;++n)t+=z(e[n]);return t}function S(e,a,b){for(var f=e.slice(a,b),t="",n=0;n<f.length;n+=2)t+=String.fromCharCode(f[n]+256*f[n+1]);return t}function F(e,a,b){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+a>b)throw new RangeError("Trying to access beyond buffer length")}function B(e,a,b,f,t,n){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>t||a<n)throw new RangeError('"value" argument is out of bounds');if(b+f>e.length)throw new RangeError("Index out of range")}function R(e,a,b,f){a<0&&(a=65535+a+1);for(var t=0,n=Math.min(e.length-b,2);t<n;++t)e[b+t]=(a&255<<8*(f?t:1-t))>>>8*(f?t:1-t)}function P(e,a,b,f){a<0&&(a=4294967295+a+1);for(var t=0,n=Math.min(e.length-b,4);t<n;++t)e[b+t]=a>>>8*(f?t:3-t)&255}function I(e,a,b,f,t,n){if(b+f>e.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function O(e,a,b,f,n){return n||I(e,0,b,4),t.write(e,a,b,f,23,4),b+4}function L(e,a,b,f,n){return n||I(e,0,b,8),t.write(e,a,b,f,52,8),b+8}s.prototype.slice=function(e,a){var b,f=this.length;if((e=~~e)<0?(e+=f)<0&&(e=0):e>f&&(e=f),(a=void 0===a?f:~~a)<0?(a+=f)<0&&(a=0):a>f&&(a=f),a<e&&(a=e),s.TYPED_ARRAY_SUPPORT)(b=this.subarray(e,a)).__proto__=s.prototype;else{var t=a-e;b=new s(t,void 0);for(var n=0;n<t;++n)b[n]=this[n+e]}return b},s.prototype.readUIntLE=function(e,a,b){e|=0,a|=0,b||F(e,a,this.length);for(var f=this[e],t=1,n=0;++n<a&&(t*=256);)f+=this[e+n]*t;return f},s.prototype.readUIntBE=function(e,a,b){e|=0,a|=0,b||F(e,a,this.length);for(var f=this[e+--a],t=1;a>0&&(t*=256);)f+=this[e+--a]*t;return f},s.prototype.readUInt8=function(e,a){return a||F(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,a){return a||F(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,a){return a||F(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,a){return a||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,a){return a||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,a,b){e|=0,a|=0,b||F(e,a,this.length);for(var f=this[e],t=1,n=0;++n<a&&(t*=256);)f+=this[e+n]*t;return f>=(t*=128)&&(f-=Math.pow(2,8*a)),f},s.prototype.readIntBE=function(e,a,b){e|=0,a|=0,b||F(e,a,this.length);for(var f=a,t=1,n=this[e+--f];f>0&&(t*=256);)n+=this[e+--f]*t;return n>=(t*=128)&&(n-=Math.pow(2,8*a)),n},s.prototype.readInt8=function(e,a){return a||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,a){a||F(e,2,this.length);var b=this[e]|this[e+1]<<8;return 32768&b?4294901760|b:b},s.prototype.readInt16BE=function(e,a){a||F(e,2,this.length);var b=this[e+1]|this[e]<<8;return 32768&b?4294901760|b:b},s.prototype.readInt32LE=function(e,a){return a||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,a){return a||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,a){return a||F(e,4,this.length),t.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,a){return a||F(e,4,this.length),t.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,a){return a||F(e,8,this.length),t.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,a){return a||F(e,8,this.length),t.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,a,b,f){(e=+e,a|=0,b|=0,f)||B(this,e,a,b,Math.pow(2,8*b)-1,0);var t=1,n=0;for(this[a]=255&e;++n<b&&(t*=256);)this[a+n]=e/t&255;return a+b},s.prototype.writeUIntBE=function(e,a,b,f){(e=+e,a|=0,b|=0,f)||B(this,e,a,b,Math.pow(2,8*b)-1,0);var t=b-1,n=1;for(this[a+t]=255&e;--t>=0&&(n*=256);)this[a+t]=e/n&255;return a+b},s.prototype.writeUInt8=function(e,a,b){return e=+e,a|=0,b||B(this,e,a,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[a]=255&e,a+1},s.prototype.writeUInt16LE=function(e,a,b){return e=+e,a|=0,b||B(this,e,a,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[a]=255&e,this[a+1]=e>>>8):R(this,e,a,!0),a+2},s.prototype.writeUInt16BE=function(e,a,b){return e=+e,a|=0,b||B(this,e,a,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[a]=e>>>8,this[a+1]=255&e):R(this,e,a,!1),a+2},s.prototype.writeUInt32LE=function(e,a,b){return e=+e,a|=0,b||B(this,e,a,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[a+3]=e>>>24,this[a+2]=e>>>16,this[a+1]=e>>>8,this[a]=255&e):P(this,e,a,!0),a+4},s.prototype.writeUInt32BE=function(e,a,b){return e=+e,a|=0,b||B(this,e,a,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[a]=e>>>24,this[a+1]=e>>>16,this[a+2]=e>>>8,this[a+3]=255&e):P(this,e,a,!1),a+4},s.prototype.writeIntLE=function(e,a,b,f){if(e=+e,a|=0,!f){var t=Math.pow(2,8*b-1);B(this,e,a,b,t-1,-t)}var n=0,d=1,c=0;for(this[a]=255&e;++n<b&&(d*=256);)e<0&&0===c&&0!==this[a+n-1]&&(c=1),this[a+n]=(e/d>>0)-c&255;return a+b},s.prototype.writeIntBE=function(e,a,b,f){if(e=+e,a|=0,!f){var t=Math.pow(2,8*b-1);B(this,e,a,b,t-1,-t)}var n=b-1,d=1,c=0;for(this[a+n]=255&e;--n>=0&&(d*=256);)e<0&&0===c&&0!==this[a+n+1]&&(c=1),this[a+n]=(e/d>>0)-c&255;return a+b},s.prototype.writeInt8=function(e,a,b){return e=+e,a|=0,b||B(this,e,a,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[a]=255&e,a+1},s.prototype.writeInt16LE=function(e,a,b){return e=+e,a|=0,b||B(this,e,a,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[a]=255&e,this[a+1]=e>>>8):R(this,e,a,!0),a+2},s.prototype.writeInt16BE=function(e,a,b){return e=+e,a|=0,b||B(this,e,a,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[a]=e>>>8,this[a+1]=255&e):R(this,e,a,!1),a+2},s.prototype.writeInt32LE=function(e,a,b){return e=+e,a|=0,b||B(this,e,a,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[a]=255&e,this[a+1]=e>>>8,this[a+2]=e>>>16,this[a+3]=e>>>24):P(this,e,a,!0),a+4},s.prototype.writeInt32BE=function(e,a,b){return e=+e,a|=0,b||B(this,e,a,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[a]=e>>>24,this[a+1]=e>>>16,this[a+2]=e>>>8,this[a+3]=255&e):P(this,e,a,!1),a+4},s.prototype.writeFloatLE=function(e,a,b){return O(this,e,a,!0,b)},s.prototype.writeFloatBE=function(e,a,b){return O(this,e,a,!1,b)},s.prototype.writeDoubleLE=function(e,a,b){return L(this,e,a,!0,b)},s.prototype.writeDoubleBE=function(e,a,b){return L(this,e,a,!1,b)},s.prototype.copy=function(e,a,b,f){if(b||(b=0),f||0===f||(f=this.length),a>=e.length&&(a=e.length),a||(a=0),f>0&&f<b&&(f=b),f===b)return 0;if(0===e.length||0===this.length)return 0;if(a<0)throw new RangeError("targetStart out of bounds");if(b<0||b>=this.length)throw new RangeError("sourceStart out of bounds");if(f<0)throw new RangeError("sourceEnd out of bounds");f>this.length&&(f=this.length),e.length-a<f-b&&(f=e.length-a+b);var t,n=f-b;if(this===e&&b<a&&a<f)for(t=n-1;t>=0;--t)e[t+a]=this[t+b];else if(n<1e3||!s.TYPED_ARRAY_SUPPORT)for(t=0;t<n;++t)e[t+a]=this[t+b];else Uint8Array.prototype.set.call(e,this.subarray(b,b+n),a);return n},s.prototype.fill=function(e,a,b,f){if("string"==typeof e){if("string"==typeof a?(f=a,a=0,b=this.length):"string"==typeof b&&(f=b,b=this.length),1===e.length){var t=e.charCodeAt(0);t<256&&(e=t)}if(void 0!==f&&"string"!=typeof f)throw new TypeError("encoding must be a string");if("string"==typeof f&&!s.isEncoding(f))throw new TypeError("Unknown encoding: "+f)}else"number"==typeof e&&(e&=255);if(a<0||this.length<a||this.length<b)throw new RangeError("Out of range index");if(b<=a)return this;var n;if(a>>>=0,b=void 0===b?this.length:b>>>0,e||(e=0),"number"==typeof e)for(n=a;n<b;++n)this[n]=e;else{var d=s.isBuffer(e)?e:U(new s(e,f).toString()),c=d.length;for(n=0;n<b-a;++n)this[n+a]=d[n%c]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function z(e){return e<16?"0"+e.toString(16):e.toString(16)}function U(e,a){var b;a=a||1/0;for(var f=e.length,t=null,n=[],d=0;d<f;++d){if((b=e.charCodeAt(d))>55295&&b<57344){if(!t){if(b>56319){(a-=3)>-1&&n.push(239,191,189);continue}if(d+1===f){(a-=3)>-1&&n.push(239,191,189);continue}t=b;continue}if(b<56320){(a-=3)>-1&&n.push(239,191,189),t=b;continue}b=65536+(t-55296<<10|b-56320)}else t&&(a-=3)>-1&&n.push(239,191,189);if(t=null,b<128){if((a-=1)<0)break;n.push(b)}else if(b<2048){if((a-=2)<0)break;n.push(b>>6|192,63&b|128)}else if(b<65536){if((a-=3)<0)break;n.push(b>>12|224,b>>6&63|128,63&b|128)}else{if(!(b<1114112))throw new Error("Invalid code point");if((a-=4)<0)break;n.push(b>>18|240,b>>12&63|128,b>>6&63|128,63&b|128)}}return n}function V(e){return f.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,a,b,f){for(var t=0;t<f&&!(t+b>=a.length||t>=e.length);++t)a[t+b]=e[t];return t}}).call(this,b(3))},,function(e,a){var b;b=function(){return this}();try{b=b||new Function("return this")()}catch(e){"object"==typeof window&&(b=window)}e.exports=b},function(e,a,b){(function(e,b){var f;!function(){var t="object"==typeof self&&self.self===self&&self||"object"==typeof e&&e.global===e&&e||this||{},n=t._,d=Array.prototype,c=Object.prototype,s="undefined"!=typeof Symbol?Symbol.prototype:null,i=d.push,u=d.slice,p=c.toString,r=c.hasOwnProperty,y=Array.isArray,l=Object.keys,o=Object.create,m=function(){},T=function(e){return e instanceof T?e:this instanceof T?void(this._wrapped=e):new T(e)};a.nodeType?t._=T:(!b.nodeType&&b.exports&&(a=b.exports=T),a._=T),T.VERSION="1.9.1";var x,g=function(e,a,b){if(void 0===a)return e;switch(null==b?3:b){case 1:return function(b){return e.call(a,b)};case 3:return function(b,f,t){return e.call(a,b,f,t)};case 4:return function(b,f,t,n){return e.call(a,b,f,t,n)}}return function(){return e.apply(a,arguments)}},w=function(e,a,b){return T.iteratee!==x?T.iteratee(e,a):null==e?T.identity:T.isFunction(e)?g(e,a,b):T.isObject(e)&&!T.isArray(e)?T.matcher(e):T.property(e)};T.iteratee=x=function(e,a){return w(e,a,1/0)};var v=function(e,a){return a=null==a?e.length-1:+a,function(){for(var b=Math.max(arguments.length-a,0),f=Array(b),t=0;t<b;t++)f[t]=arguments[t+a];switch(a){case 0:return e.call(this,f);case 1:return e.call(this,arguments[0],f);case 2:return e.call(this,arguments[0],arguments[1],f)}var n=Array(a+1);for(t=0;t<a;t++)n[t]=arguments[t];return n[a]=f,e.apply(this,n)}},M=function(e){if(!T.isObject(e))return{};if(o)return o(e);m.prototype=e;var a=new m;return m.prototype=null,a},h=function(e){return function(a){return null==a?void 0:a[e]}},C=function(e,a){return null!=e&&r.call(e,a)},k=function(e,a){for(var b=a.length,f=0;f<b;f++){if(null==e)return;e=e[a[f]]}return b?e:void 0},A=Math.pow(2,53)-1,E=h("length"),_=function(e){var a=E(e);return"number"==typeof a&&a>=0&&a<=A};T.each=T.forEach=function(e,a,b){var f,t;if(a=g(a,b),_(e))for(f=0,t=e.length;f<t;f++)a(e[f],f,e);else{var n=T.keys(e);for(f=0,t=n.length;f<t;f++)a(e[n[f]],n[f],e)}return e},T.map=T.collect=function(e,a,b){a=w(a,b);for(var f=!_(e)&&T.keys(e),t=(f||e).length,n=Array(t),d=0;d<t;d++){var c=f?f[d]:d;n[d]=a(e[c],c,e)}return n};var D=function(e){var a=function(a,b,f,t){var n=!_(a)&&T.keys(a),d=(n||a).length,c=e>0?0:d-1;for(t||(f=a[n?n[c]:c],c+=e);c>=0&&c<d;c+=e){var s=n?n[c]:c;f=b(f,a[s],s,a)}return f};return function(e,b,f,t){var n=arguments.length>=3;return a(e,g(b,t,4),f,n)}};T.reduce=T.foldl=T.inject=D(1),T.reduceRight=T.foldr=D(-1),T.find=T.detect=function(e,a,b){var f=(_(e)?T.findIndex:T.findKey)(e,a,b);if(void 0!==f&&-1!==f)return e[f]},T.filter=T.select=function(e,a,b){var f=[];return a=w(a,b),T.each(e,(function(e,b,t){a(e,b,t)&&f.push(e)})),f},T.reject=function(e,a,b){return T.filter(e,T.negate(w(a)),b)},T.every=T.all=function(e,a,b){a=w(a,b);for(var f=!_(e)&&T.keys(e),t=(f||e).length,n=0;n<t;n++){var d=f?f[n]:n;if(!a(e[d],d,e))return!1}return!0},T.some=T.any=function(e,a,b){a=w(a,b);for(var f=!_(e)&&T.keys(e),t=(f||e).length,n=0;n<t;n++){var d=f?f[n]:n;if(a(e[d],d,e))return!0}return!1},T.contains=T.includes=T.include=function(e,a,b,f){return _(e)||(e=T.values(e)),("number"!=typeof b||f)&&(b=0),T.indexOf(e,a,b)>=0},T.invoke=v((function(e,a,b){var f,t;return T.isFunction(a)?t=a:T.isArray(a)&&(f=a.slice(0,-1),a=a[a.length-1]),T.map(e,(function(e){var n=t;if(!n){if(f&&f.length&&(e=k(e,f)),null==e)return;n=e[a]}return null==n?n:n.apply(e,b)}))})),T.pluck=function(e,a){return T.map(e,T.property(a))},T.where=function(e,a){return T.filter(e,T.matcher(a))},T.findWhere=function(e,a){return T.find(e,T.matcher(a))},T.max=function(e,a,b){var f,t,n=-1/0,d=-1/0;if(null==a||"number"==typeof a&&"object"!=typeof e[0]&&null!=e)for(var c=0,s=(e=_(e)?e:T.values(e)).length;c<s;c++)null!=(f=e[c])&&f>n&&(n=f);else a=w(a,b),T.each(e,(function(e,b,f){((t=a(e,b,f))>d||t===-1/0&&n===-1/0)&&(n=e,d=t)}));return n},T.min=function(e,a,b){var f,t,n=1/0,d=1/0;if(null==a||"number"==typeof a&&"object"!=typeof e[0]&&null!=e)for(var c=0,s=(e=_(e)?e:T.values(e)).length;c<s;c++)null!=(f=e[c])&&f<n&&(n=f);else a=w(a,b),T.each(e,(function(e,b,f){((t=a(e,b,f))<d||t===1/0&&n===1/0)&&(n=e,d=t)}));return n},T.shuffle=function(e){return T.sample(e,1/0)},T.sample=function(e,a,b){if(null==a||b)return _(e)||(e=T.values(e)),e[T.random(e.length-1)];var f=_(e)?T.clone(e):T.values(e),t=E(f);a=Math.max(Math.min(a,t),0);for(var n=t-1,d=0;d<a;d++){var c=T.random(d,n),s=f[d];f[d]=f[c],f[c]=s}return f.slice(0,a)},T.sortBy=function(e,a,b){var f=0;return a=w(a,b),T.pluck(T.map(e,(function(e,b,t){return{value:e,index:f++,criteria:a(e,b,t)}})).sort((function(e,a){var b=e.criteria,f=a.criteria;if(b!==f){if(b>f||void 0===b)return 1;if(b<f||void 0===f)return-1}return e.index-a.index})),"value")};var S=function(e,a){return function(b,f,t){var n=a?[[],[]]:{};return f=w(f,t),T.each(b,(function(a,t){var d=f(a,t,b);e(n,a,d)})),n}};T.groupBy=S((function(e,a,b){C(e,b)?e[b].push(a):e[b]=[a]})),T.indexBy=S((function(e,a,b){e[b]=a})),T.countBy=S((function(e,a,b){C(e,b)?e[b]++:e[b]=1}));var F=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;T.toArray=function(e){return e?T.isArray(e)?u.call(e):T.isString(e)?e.match(F):_(e)?T.map(e,T.identity):T.values(e):[]},T.size=function(e){return null==e?0:_(e)?e.length:T.keys(e).length},T.partition=S((function(e,a,b){e[b?0:1].push(a)}),!0),T.first=T.head=T.take=function(e,a,b){return null==e||e.length<1?null==a?void 0:[]:null==a||b?e[0]:T.initial(e,e.length-a)},T.initial=function(e,a,b){return u.call(e,0,Math.max(0,e.length-(null==a||b?1:a)))},T.last=function(e,a,b){return null==e||e.length<1?null==a?void 0:[]:null==a||b?e[e.length-1]:T.rest(e,Math.max(0,e.length-a))},T.rest=T.tail=T.drop=function(e,a,b){return u.call(e,null==a||b?1:a)},T.compact=function(e){return T.filter(e,Boolean)};var B=function(e,a,b,f){for(var t=(f=f||[]).length,n=0,d=E(e);n<d;n++){var c=e[n];if(_(c)&&(T.isArray(c)||T.isArguments(c)))if(a)for(var s=0,i=c.length;s<i;)f[t++]=c[s++];else B(c,a,b,f),t=f.length;else b||(f[t++]=c)}return f};T.flatten=function(e,a){return B(e,a,!1)},T.without=v((function(e,a){return T.difference(e,a)})),T.uniq=T.unique=function(e,a,b,f){T.isBoolean(a)||(f=b,b=a,a=!1),null!=b&&(b=w(b,f));for(var t=[],n=[],d=0,c=E(e);d<c;d++){var s=e[d],i=b?b(s,d,e):s;a&&!b?(d&&n===i||t.push(s),n=i):b?T.contains(n,i)||(n.push(i),t.push(s)):T.contains(t,s)||t.push(s)}return t},T.union=v((function(e){return T.uniq(B(e,!0,!0))})),T.intersection=function(e){for(var a=[],b=arguments.length,f=0,t=E(e);f<t;f++){var n=e[f];if(!T.contains(a,n)){var d;for(d=1;d<b&&T.contains(arguments[d],n);d++);d===b&&a.push(n)}}return a},T.difference=v((function(e,a){return a=B(a,!0,!0),T.filter(e,(function(e){return!T.contains(a,e)}))})),T.unzip=function(e){for(var a=e&&T.max(e,E).length||0,b=Array(a),f=0;f<a;f++)b[f]=T.pluck(e,f);return b},T.zip=v(T.unzip),T.object=function(e,a){for(var b={},f=0,t=E(e);f<t;f++)a?b[e[f]]=a[f]:b[e[f][0]]=e[f][1];return b};var R=function(e){return function(a,b,f){b=w(b,f);for(var t=E(a),n=e>0?0:t-1;n>=0&&n<t;n+=e)if(b(a[n],n,a))return n;return-1}};T.findIndex=R(1),T.findLastIndex=R(-1),T.sortedIndex=function(e,a,b,f){for(var t=(b=w(b,f,1))(a),n=0,d=E(e);n<d;){var c=Math.floor((n+d)/2);b(e[c])<t?n=c+1:d=c}return n};var P=function(e,a,b){return function(f,t,n){var d=0,c=E(f);if("number"==typeof n)e>0?d=n>=0?n:Math.max(n+c,d):c=n>=0?Math.min(n+1,c):n+c+1;else if(b&&n&&c)return f[n=b(f,t)]===t?n:-1;if(t!=t)return(n=a(u.call(f,d,c),T.isNaN))>=0?n+d:-1;for(n=e>0?d:c-1;n>=0&&n<c;n+=e)if(f[n]===t)return n;return-1}};T.indexOf=P(1,T.findIndex,T.sortedIndex),T.lastIndexOf=P(-1,T.findLastIndex),T.range=function(e,a,b){null==a&&(a=e||0,e=0),b||(b=a<e?-1:1);for(var f=Math.max(Math.ceil((a-e)/b),0),t=Array(f),n=0;n<f;n++,e+=b)t[n]=e;return t},T.chunk=function(e,a){if(null==a||a<1)return[];for(var b=[],f=0,t=e.length;f<t;)b.push(u.call(e,f,f+=a));return b};var I=function(e,a,b,f,t){if(!(f instanceof a))return e.apply(b,t);var n=M(e.prototype),d=e.apply(n,t);return T.isObject(d)?d:n};T.bind=v((function(e,a,b){if(!T.isFunction(e))throw new TypeError("Bind must be called on a function");var f=v((function(t){return I(e,f,a,this,b.concat(t))}));return f})),T.partial=v((function(e,a){var b=T.partial.placeholder,f=function(){for(var t=0,n=a.length,d=Array(n),c=0;c<n;c++)d[c]=a[c]===b?arguments[t++]:a[c];for(;t<arguments.length;)d.push(arguments[t++]);return I(e,f,this,this,d)};return f})),T.partial.placeholder=T,T.bindAll=v((function(e,a){var b=(a=B(a,!1,!1)).length;if(b<1)throw new Error("bindAll must be passed function names");for(;b--;){var f=a[b];e[f]=T.bind(e[f],e)}})),T.memoize=function(e,a){var b=function(f){var t=b.cache,n=""+(a?a.apply(this,arguments):f);return C(t,n)||(t[n]=e.apply(this,arguments)),t[n]};return b.cache={},b},T.delay=v((function(e,a,b){return setTimeout((function(){return e.apply(null,b)}),a)})),T.defer=T.partial(T.delay,T,1),T.throttle=function(e,a,b){var f,t,n,d,c=0;b||(b={});var s=function(){c=!1===b.leading?0:T.now(),f=null,d=e.apply(t,n),f||(t=n=null)},i=function(){var i=T.now();c||!1!==b.leading||(c=i);var u=a-(i-c);return t=this,n=arguments,u<=0||u>a?(f&&(clearTimeout(f),f=null),c=i,d=e.apply(t,n),f||(t=n=null)):f||!1===b.trailing||(f=setTimeout(s,u)),d};return i.cancel=function(){clearTimeout(f),c=0,f=t=n=null},i},T.debounce=function(e,a,b){var f,t,n=function(a,b){f=null,b&&(t=e.apply(a,b))},d=v((function(d){if(f&&clearTimeout(f),b){var c=!f;f=setTimeout(n,a),c&&(t=e.apply(this,d))}else f=T.delay(n,a,this,d);return t}));return d.cancel=function(){clearTimeout(f),f=null},d},T.wrap=function(e,a){return T.partial(a,e)},T.negate=function(e){return function(){return!e.apply(this,arguments)}},T.compose=function(){var e=arguments,a=e.length-1;return function(){for(var b=a,f=e[a].apply(this,arguments);b--;)f=e[b].call(this,f);return f}},T.after=function(e,a){return function(){if(--e<1)return a.apply(this,arguments)}},T.before=function(e,a){var b;return function(){return--e>0&&(b=a.apply(this,arguments)),e<=1&&(a=null),b}},T.once=T.partial(T.before,2),T.restArguments=v;var O=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],N=function(e,a){var b=L.length,f=e.constructor,t=T.isFunction(f)&&f.prototype||c,n="constructor";for(C(e,n)&&!T.contains(a,n)&&a.push(n);b--;)(n=L[b])in e&&e[n]!==t[n]&&!T.contains(a,n)&&a.push(n)};T.keys=function(e){if(!T.isObject(e))return[];if(l)return l(e);var a=[];for(var b in e)C(e,b)&&a.push(b);return O&&N(e,a),a},T.allKeys=function(e){if(!T.isObject(e))return[];var a=[];for(var b in e)a.push(b);return O&&N(e,a),a},T.values=function(e){for(var a=T.keys(e),b=a.length,f=Array(b),t=0;t<b;t++)f[t]=e[a[t]];return f},T.mapObject=function(e,a,b){a=w(a,b);for(var f=T.keys(e),t=f.length,n={},d=0;d<t;d++){var c=f[d];n[c]=a(e[c],c,e)}return n},T.pairs=function(e){for(var a=T.keys(e),b=a.length,f=Array(b),t=0;t<b;t++)f[t]=[a[t],e[a[t]]];return f},T.invert=function(e){for(var a={},b=T.keys(e),f=0,t=b.length;f<t;f++)a[e[b[f]]]=b[f];return a},T.functions=T.methods=function(e){var a=[];for(var b in e)T.isFunction(e[b])&&a.push(b);return a.sort()};var z=function(e,a){return function(b){var f=arguments.length;if(a&&(b=Object(b)),f<2||null==b)return b;for(var t=1;t<f;t++)for(var n=arguments[t],d=e(n),c=d.length,s=0;s<c;s++){var i=d[s];a&&void 0!==b[i]||(b[i]=n[i])}return b}};T.extend=z(T.allKeys),T.extendOwn=T.assign=z(T.keys),T.findKey=function(e,a,b){a=w(a,b);for(var f,t=T.keys(e),n=0,d=t.length;n<d;n++)if(a(e[f=t[n]],f,e))return f};var U,V,K=function(e,a,b){return a in b};T.pick=v((function(e,a){var b={},f=a[0];if(null==e)return b;T.isFunction(f)?(a.length>1&&(f=g(f,a[1])),a=T.allKeys(e)):(f=K,a=B(a,!1,!1),e=Object(e));for(var t=0,n=a.length;t<n;t++){var d=a[t],c=e[d];f(c,d,e)&&(b[d]=c)}return b})),T.omit=v((function(e,a){var b,f=a[0];return T.isFunction(f)?(f=T.negate(f),a.length>1&&(b=a[1])):(a=T.map(B(a,!1,!1),String),f=function(e,b){return!T.contains(a,b)}),T.pick(e,f,b)})),T.defaults=z(T.allKeys,!0),T.create=function(e,a){var b=M(e);return a&&T.extendOwn(b,a),b},T.clone=function(e){return T.isObject(e)?T.isArray(e)?e.slice():T.extend({},e):e},T.tap=function(e,a){return a(e),e},T.isMatch=function(e,a){var b=T.keys(a),f=b.length;if(null==e)return!f;for(var t=Object(e),n=0;n<f;n++){var d=b[n];if(a[d]!==t[d]||!(d in t))return!1}return!0},U=function(e,a,b,f){if(e===a)return 0!==e||1/e==1/a;if(null==e||null==a)return!1;if(e!=e)return a!=a;var t=typeof e;return("function"===t||"object"===t||"object"==typeof a)&&V(e,a,b,f)},V=function(e,a,b,f){e instanceof T&&(e=e._wrapped),a instanceof T&&(a=a._wrapped);var t=p.call(e);if(t!==p.call(a))return!1;switch(t){case"[object RegExp]":case"[object String]":return""+e==""+a;case"[object Number]":return+e!=+e?+a!=+a:0==+e?1/+e==1/a:+e==+a;case"[object Date]":case"[object Boolean]":return+e==+a;case"[object Symbol]":return s.valueOf.call(e)===s.valueOf.call(a)}var n="[object Array]"===t;if(!n){if("object"!=typeof e||"object"!=typeof a)return!1;var d=e.constructor,c=a.constructor;if(d!==c&&!(T.isFunction(d)&&d instanceof d&&T.isFunction(c)&&c instanceof c)&&"constructor"in e&&"constructor"in a)return!1}f=f||[];for(var i=(b=b||[]).length;i--;)if(b[i]===e)return f[i]===a;if(b.push(e),f.push(a),n){if((i=e.length)!==a.length)return!1;for(;i--;)if(!U(e[i],a[i],b,f))return!1}else{var u,r=T.keys(e);if(i=r.length,T.keys(a).length!==i)return!1;for(;i--;)if(u=r[i],!C(a,u)||!U(e[u],a[u],b,f))return!1}return b.pop(),f.pop(),!0},T.isEqual=function(e,a){return U(e,a)},T.isEmpty=function(e){return null==e||(_(e)&&(T.isArray(e)||T.isString(e)||T.isArguments(e))?0===e.length:0===T.keys(e).length)},T.isElement=function(e){return!(!e||1!==e.nodeType)},T.isArray=y||function(e){return"[object Array]"===p.call(e)},T.isObject=function(e){var a=typeof e;return"function"===a||"object"===a&&!!e},T.each(["Arguments","Function","String","Number","Date","RegExp","Error","Symbol","Map","WeakMap","Set","WeakSet"],(function(e){T["is"+e]=function(a){return p.call(a)==="[object "+e+"]"}})),T.isArguments(arguments)||(T.isArguments=function(e){return C(e,"callee")});var q=t.document&&t.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof q&&(T.isFunction=function(e){return"function"==typeof e||!1}),T.isFinite=function(e){return!T.isSymbol(e)&&isFinite(e)&&!isNaN(parseFloat(e))},T.isNaN=function(e){return T.isNumber(e)&&isNaN(e)},T.isBoolean=function(e){return!0===e||!1===e||"[object Boolean]"===p.call(e)},T.isNull=function(e){return null===e},T.isUndefined=function(e){return void 0===e},T.has=function(e,a){if(!T.isArray(a))return C(e,a);for(var b=a.length,f=0;f<b;f++){var t=a[f];if(null==e||!r.call(e,t))return!1;e=e[t]}return!!b},T.noConflict=function(){return t._=n,this},T.identity=function(e){return e},T.constant=function(e){return function(){return e}},T.noop=function(){},T.property=function(e){return T.isArray(e)?function(a){return k(a,e)}:h(e)},T.propertyOf=function(e){return null==e?function(){}:function(a){return T.isArray(a)?k(e,a):e[a]}},T.matcher=T.matches=function(e){return e=T.extendOwn({},e),function(a){return T.isMatch(a,e)}},T.times=function(e,a,b){var f=Array(Math.max(0,e));a=g(a,b,1);for(var t=0;t<e;t++)f[t]=a(t);return f},T.random=function(e,a){return null==a&&(a=e,e=0),e+Math.floor(Math.random()*(a-e+1))},T.now=Date.now||function(){return(new Date).getTime()};var Q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},Z=T.invert(Q),W=function(e){var a=function(a){return e[a]},b="(?:"+T.keys(e).join("|")+")",f=RegExp(b),t=RegExp(b,"g");return function(e){return e=null==e?"":""+e,f.test(e)?e.replace(t,a):e}};T.escape=W(Q),T.unescape=W(Z),T.result=function(e,a,b){T.isArray(a)||(a=[a]);var f=a.length;if(!f)return T.isFunction(b)?b.call(e):b;for(var t=0;t<f;t++){var n=null==e?void 0:e[a[t]];void 0===n&&(n=b,t=f),e=T.isFunction(n)?n.call(e):n}return e};var $=0;T.uniqueId=function(e){var a=++$+"";return e?e+a:a},T.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var X=/(.)^/,H={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},G=/\\|'|\r|\n|\u2028|\u2029/g,Y=function(e){return"\\"+H[e]};T.template=function(e,a,b){!a&&b&&(a=b),a=T.defaults({},a,T.templateSettings);var f,t=RegExp([(a.escape||X).source,(a.interpolate||X).source,(a.evaluate||X).source].join("|")+"|$","g"),n=0,d="__p+='";e.replace(t,(function(a,b,f,t,c){return d+=e.slice(n,c).replace(G,Y),n=c+a.length,b?d+="'+\n((__t=("+b+"))==null?'':_.escape(__t))+\n'":f?d+="'+\n((__t=("+f+"))==null?'':__t)+\n'":t&&(d+="';\n"+t+"\n__p+='"),a})),d+="';\n",a.variable||(d="with(obj||{}){\n"+d+"}\n"),d="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+d+"return __p;\n";try{f=new Function(a.variable||"obj","_",d)}catch(e){throw e.source=d,e}var c=function(e){return f.call(this,e,T)},s=a.variable||"obj";return c.source="function("+s+"){\n"+d+"}",c},T.chain=function(e){var a=T(e);return a._chain=!0,a};var j=function(e,a){return e._chain?T(a).chain():a};T.mixin=function(e){return T.each(T.functions(e),(function(a){var b=T[a]=e[a];T.prototype[a]=function(){var e=[this._wrapped];return i.apply(e,arguments),j(this,b.apply(T,e))}})),T},T.mixin(T),T.each(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var a=d[e];T.prototype[e]=function(){var b=this._wrapped;return a.apply(b,arguments),"shift"!==e&&"splice"!==e||0!==b.length||delete b[0],j(this,b)}})),T.each(["concat","join","slice"],(function(e){var a=d[e];T.prototype[e]=function(){return j(this,a.apply(this._wrapped,arguments))}})),T.prototype.value=function(){return this._wrapped},T.prototype.valueOf=T.prototype.toJSON=T.prototype.value,T.prototype.toString=function(){return String(this._wrapped)},void 0===(f=function(){return T}.apply(a,[]))||(b.exports=f)}()}).call(this,b(3),b(0)(e))},function(e,a,b){var f=b(25),t=b(26);e.exports=function(e){if("string"==typeof e||"number"==typeof e){var a=new f(1),b=String(e).toLowerCase().trim(),n="0x"===b.substr(0,2)||"-0x"===b.substr(0,3),d=t(b);if("-"===d.substr(0,1)&&(d=t(d.slice(1)),a=new f(-1,10)),!(d=""===d?"0":d).match(/^-?[0-9]+$/)&&d.match(/^[0-9A-Fa-f]+$/)||d.match(/^[a-fA-F]+$/)||!0===n&&d.match(/^[0-9A-Fa-f]+$/))return new f(d,16).mul(a);if((d.match(/^-?[0-9]+$/)||""===d)&&!1===n)return new f(d,10).mul(a)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new f(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},function(e,a){var b,f,t=e.exports={};function n(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function c(e){if(b===setTimeout)return setTimeout(e,0);if((b===n||!b)&&setTimeout)return b=setTimeout,setTimeout(e,0);try{return b(e,0)}catch(a){try{return b.call(null,e,0)}catch(a){return b.call(this,e,0)}}}!function(){try{b="function"==typeof setTimeout?setTimeout:n}catch(e){b=n}try{f="function"==typeof clearTimeout?clearTimeout:d}catch(e){f=d}}();var s,i=[],u=!1,p=-1;function r(){u&&s&&(u=!1,s.length?i=s.concat(i):p=-1,i.length&&y())}function y(){if(!u){var e=c(r);u=!0;for(var a=i.length;a;){for(s=i,i=[];++p<a;)s&&s[p].run();p=-1,a=i.length}s=null,u=!1,function(e){if(f===clearTimeout)return clearTimeout(e);if((f===d||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{f(e)}catch(a){try{return f.call(null,e)}catch(a){return f.call(this,e)}}}(e)}}function l(e,a){this.fun=e,this.array=a}function o(){}t.nextTick=function(e){var a=new Array(arguments.length-1);if(arguments.length>1)for(var b=1;b<arguments.length;b++)a[b-1]=arguments[b];i.push(new l(e,a)),1!==i.length||u||c(y)},l.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=o,t.addListener=o,t.once=o,t.off=o,t.removeListener=o,t.removeAllListeners=o,t.emit=o,t.prependListener=o,t.prependOnceListener=o,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},function(e,a,b){(function(e){!function(e,a){"use strict";function f(e,a){if(!e)throw new Error(a||"Assertion failed")}function t(e,a){e.super_=a;var b=function(){};b.prototype=a.prototype,e.prototype=new b,e.prototype.constructor=e}function n(e,a,b){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==a&&"be"!==a||(b=a,a=10),this._init(e||0,a||10,b||"be"))}var d;"object"==typeof e?e.exports=n:a.BN=n,n.BN=n,n.wordSize=26;try{d="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:b(38).Buffer}catch(e){}function c(e,a){var b=e.charCodeAt(a);return b>=65&&b<=70?b-55:b>=97&&b<=102?b-87:b-48&15}function s(e,a,b){var f=c(e,b);return b-1>=a&&(f|=c(e,b-1)<<4),f}function i(e,a,b,f){for(var t=0,n=Math.min(e.length,b),d=a;d<n;d++){var c=e.charCodeAt(d)-48;t*=f,t+=c>=49?c-49+10:c>=17?c-17+10:c}return t}n.isBN=function(e){return e instanceof n||null!==e&&"object"==typeof e&&e.constructor.wordSize===n.wordSize&&Array.isArray(e.words)},n.max=function(e,a){return e.cmp(a)>0?e:a},n.min=function(e,a){return e.cmp(a)<0?e:a},n.prototype._init=function(e,a,b){if("number"==typeof e)return this._initNumber(e,a,b);if("object"==typeof e)return this._initArray(e,a,b);"hex"===a&&(a=16),f(a===(0|a)&&a>=2&&a<=36);var t=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(t++,this.negative=1),t<e.length&&(16===a?this._parseHex(e,t,b):(this._parseBase(e,a,t),"le"===b&&this._initArray(this.toArray(),a,b)))},n.prototype._initNumber=function(e,a,b){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(f(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===b&&this._initArray(this.toArray(),a,b)},n.prototype._initArray=function(e,a,b){if(f("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var t=0;t<this.length;t++)this.words[t]=0;var n,d,c=0;if("be"===b)for(t=e.length-1,n=0;t>=0;t-=3)d=e[t]|e[t-1]<<8|e[t-2]<<16,this.words[n]|=d<<c&67108863,this.words[n+1]=d>>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);else if("le"===b)for(t=0,n=0;t<e.length;t+=3)d=e[t]|e[t+1]<<8|e[t+2]<<16,this.words[n]|=d<<c&67108863,this.words[n+1]=d>>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);return this.strip()},n.prototype._parseHex=function(e,a,b){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var t,n=0,d=0;if("be"===b)for(f=e.length-1;f>=a;f-=2)t=s(e,a,f)<<n,this.words[d]|=67108863&t,n>=18?(n-=18,d+=1,this.words[d]|=t>>>26):n+=8;else for(f=(e.length-a)%2==0?a+1:a;f<e.length;f+=2)t=s(e,a,f)<<n,this.words[d]|=67108863&t,n>=18?(n-=18,d+=1,this.words[d]|=t>>>26):n+=8;this.strip()},n.prototype._parseBase=function(e,a,b){this.words=[0],this.length=1;for(var f=0,t=1;t<=67108863;t*=a)f++;f--,t=t/a|0;for(var n=e.length-b,d=n%f,c=Math.min(n,n-d)+b,s=0,u=b;u<c;u+=f)s=i(e,u,u+f,a),this.imuln(t),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s);if(0!==d){var p=1;for(s=i(e,u,e.length,a),u=0;u<d;u++)p*=a;this.imuln(p),this.words[0]+s<67108864?this.words[0]+=s:this._iaddn(s)}this.strip()},n.prototype.copy=function(e){e.words=new Array(this.length);for(var a=0;a<this.length;a++)e.words[a]=this.words[a];e.length=this.length,e.negative=this.negative,e.red=this.red},n.prototype.clone=function(){var e=new n(null);return this.copy(e),e},n.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],r=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function y(e,a,b){b.negative=a.negative^e.negative;var f=e.length+a.length|0;b.length=f,f=f-1|0;var t=0|e.words[0],n=0|a.words[0],d=t*n,c=67108863&d,s=d/67108864|0;b.words[0]=c;for(var i=1;i<f;i++){for(var u=s>>>26,p=67108863&s,r=Math.min(i,a.length-1),y=Math.max(0,i-e.length+1);y<=r;y++){var l=i-y|0;u+=(d=(t=0|e.words[l])*(n=0|a.words[y])+p)/67108864|0,p=67108863&d}b.words[i]=0|p,s=0|u}return 0!==s?b.words[i]=0|s:b.length--,b.strip()}n.prototype.toString=function(e,a){var b;if(a=0|a||1,16===(e=e||10)||"hex"===e){b="";for(var t=0,n=0,d=0;d<this.length;d++){var c=this.words[d],s=(16777215&(c<<t|n)).toString(16);b=0!==(n=c>>>24-t&16777215)||d!==this.length-1?u[6-s.length]+s+b:s+b,(t+=2)>=26&&(t-=26,d--)}for(0!==n&&(b=n.toString(16)+b);b.length%a!=0;)b="0"+b;return 0!==this.negative&&(b="-"+b),b}if(e===(0|e)&&e>=2&&e<=36){var i=p[e],y=r[e];b="";var l=this.clone();for(l.negative=0;!l.isZero();){var o=l.modn(y).toString(e);b=(l=l.idivn(y)).isZero()?o+b:u[i-o.length]+o+b}for(this.isZero()&&(b="0"+b);b.length%a!=0;)b="0"+b;return 0!==this.negative&&(b="-"+b),b}f(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&f(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(e,a){return f(void 0!==d),this.toArrayLike(d,e,a)},n.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},n.prototype.toArrayLike=function(e,a,b){var t=this.byteLength(),n=b||Math.max(1,t);f(t<=n,"byte array longer than desired length"),f(n>0,"Requested array length <= 0"),this.strip();var d,c,s="le"===a,i=new e(n),u=this.clone();if(s){for(c=0;!u.isZero();c++)d=u.andln(255),u.iushrn(8),i[c]=d;for(;c<n;c++)i[c]=0}else{for(c=0;c<n-t;c++)i[c]=0;for(c=0;!u.isZero();c++)d=u.andln(255),u.iushrn(8),i[n-c-1]=d}return i},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var a=e,b=0;return a>=4096&&(b+=13,a>>>=13),a>=64&&(b+=7,a>>>=7),a>=8&&(b+=4,a>>>=4),a>=2&&(b+=2,a>>>=2),b+a},n.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,b=0;return 0==(8191&a)&&(b+=13,a>>>=13),0==(127&a)&&(b+=7,a>>>=7),0==(15&a)&&(b+=4,a>>>=4),0==(3&a)&&(b+=2,a>>>=2),0==(1&a)&&b++,b},n.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;a<this.length;a++){var b=this._zeroBits(this.words[a]);if(e+=b,26!==b)break}return e},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},n.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return 0!==this.negative},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var a=0;a<e.length;a++)this.words[a]=this.words[a]|e.words[a];return this.strip()},n.prototype.ior=function(e){return f(0==(this.negative|e.negative)),this.iuor(e)},n.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.len