diff --git a/bower.json b/bower.json index 361c041..9cd59a1 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ripple", - "version": "0.16.1", + "version": "0.16.2", "homepage": "https://github.com/ripple/ripple-lib", "description": "The Ripple JavaScript Library. Connect and interact to the Ripple network using the WebSocket protocol", "main": "./ripple.js", diff --git a/ripple-debug.js b/ripple-debug.js index dd9bc75..ab4da42 100644 --- a/ripple-debug.js +++ b/ripple-debug.js @@ -51,7 +51,7 @@ var ripple = /* 1 */ /***/ function(module, exports, __webpack_require__) { - eval("/* WEBPACK VAR INJECTION */(function(global) {\n'use strict';\n\n/* eslint-disable max-len */\n// Enable core-js polyfills. This allows use of ES6/7 extensions listed here:\n// https://github.com/zloirock/core-js/blob/fb0890f32dabe8d4d88a4350d1b268446127132e/shim.js#L1-L103\n/* eslint-enable max-len */\n\n// In node.js env, polyfill might be already loaded (from any npm package),\n// that's why we do this check.\n\nvar _get = __webpack_require__(2)['default'];\n\nvar _inherits = __webpack_require__(16)['default'];\n\nvar _createClass = __webpack_require__(27)['default'];\n\nvar _classCallCheck = __webpack_require__(30)['default'];\n\nvar _Promise = __webpack_require__(31)['default'];\n\nif (!global._babelPolyfill) {\n __webpack_require__(72);\n}\n\nvar _ = __webpack_require__(262);\nvar EventEmitter = __webpack_require__(264).EventEmitter;\nvar common = __webpack_require__(265);\nvar server = __webpack_require__(517);\nvar connect = server.connect;\nvar disconnect = server.disconnect;\nvar getServerInfo = server.getServerInfo;\nvar getFee = server.getFee;\nvar isConnected = server.isConnected;\nvar getLedgerVersion = server.getLedgerVersion;\nvar getTransaction = __webpack_require__(518);\nvar getTransactions = __webpack_require__(537);\nvar getTrustlines = __webpack_require__(622);\nvar getBalances = __webpack_require__(624);\nvar getBalanceSheet = __webpack_require__(625);\nvar getPaths = __webpack_require__(626);\nvar getOrders = __webpack_require__(628);\nvar getOrderbook = __webpack_require__(631);\nvar getSettings = __webpack_require__(633);\nvar getAccountInfo = __webpack_require__(634);\nvar preparePayment = __webpack_require__(635);\nvar prepareTrustline = __webpack_require__(637);\nvar prepareOrder = __webpack_require__(638);\nvar prepareOrderCancellation = __webpack_require__(639);\nvar prepareSuspendedPaymentCreation = __webpack_require__(640);\nvar prepareSuspendedPaymentExecution = __webpack_require__(641);\nvar prepareSuspendedPaymentCancellation = __webpack_require__(642);\nvar prepareSettings = __webpack_require__(643);\nvar sign = __webpack_require__(644);\nvar submit = __webpack_require__(645);\nvar errors = __webpack_require__(265).errors;\nvar generateAddress = __webpack_require__(646).generateAddressAPI;\nvar computeLedgerHash = __webpack_require__(647);\nvar getLedger = __webpack_require__(648);\n\n// prevent access to non-validated ledger versions\n\nvar RestrictedConnection = (function (_common$Connection) {\n _inherits(RestrictedConnection, _common$Connection);\n\n function RestrictedConnection() {\n _classCallCheck(this, RestrictedConnection);\n\n _get(Object.getPrototypeOf(RestrictedConnection.prototype), 'constructor', this).apply(this, arguments);\n }\n\n _createClass(RestrictedConnection, [{\n key: 'request',\n value: function request(_request, timeout) {\n var ledger_index = _request.ledger_index;\n if (ledger_index !== undefined && ledger_index !== 'validated') {\n if (!_.isNumber(ledger_index) || ledger_index > this._ledgerVersion) {\n return _Promise.reject(new errors.LedgerVersionError('ledgerVersion ' + ledger_index + ' is greater than server\\'s ' + ('most recent validated ledger: ' + this._ledgerVersion)));\n }\n }\n return _get(Object.getPrototypeOf(RestrictedConnection.prototype), 'request', this).call(this, _request, timeout);\n }\n }]);\n\n return RestrictedConnection;\n})(common.Connection);\n\nvar RippleAPI = (function (_EventEmitter) {\n _inherits(RippleAPI, _EventEmitter);\n\n function RippleAPI() {\n var _this = this;\n\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n _classCallCheck(this, RippleAPI);\n\n common.validate.apiOptions(options);\n _get(Object.getPrototypeOf(RippleAPI.prototype), 'constructor', this).call(this);\n this._feeCushion = options.feeCushion || 1.2;\n var serverURL = options.server;\n if (serverURL !== undefined) {\n this.connection = new RestrictedConnection(serverURL, options);\n this.connection.on('ledgerClosed', function (message) {\n _this.emit('ledger', server.formatLedgerClose(message));\n });\n this.connection.on('error', function (errorCode, errorMessage, data) {\n _this.emit('error', errorCode, errorMessage, data);\n });\n } else {\n // use null object pattern to provide better error message if user\n // tries to call a method that requires a connection\n this.connection = new RestrictedConnection(null, options);\n }\n }\n\n return RippleAPI;\n})(EventEmitter);\n\n_.assign(RippleAPI.prototype, {\n connect: connect,\n disconnect: disconnect,\n isConnected: isConnected,\n getServerInfo: getServerInfo,\n getFee: getFee,\n getLedgerVersion: getLedgerVersion,\n\n getTransaction: getTransaction,\n getTransactions: getTransactions,\n getTrustlines: getTrustlines,\n getBalances: getBalances,\n getBalanceSheet: getBalanceSheet,\n getPaths: getPaths,\n getOrders: getOrders,\n getOrderbook: getOrderbook,\n getSettings: getSettings,\n getAccountInfo: getAccountInfo,\n getLedger: getLedger,\n\n preparePayment: preparePayment,\n prepareTrustline: prepareTrustline,\n prepareOrder: prepareOrder,\n prepareOrderCancellation: prepareOrderCancellation,\n prepareSuspendedPaymentCreation: prepareSuspendedPaymentCreation,\n prepareSuspendedPaymentExecution: prepareSuspendedPaymentExecution,\n prepareSuspendedPaymentCancellation: prepareSuspendedPaymentCancellation,\n prepareSettings: prepareSettings,\n sign: sign,\n submit: submit,\n\n generateAddress: generateAddress,\n computeLedgerHash: computeLedgerHash,\n errors: errors\n});\n\n// these are exposed only for use by unit tests; they are not part of the API\nRippleAPI._PRIVATE = {\n validate: common.validate,\n RangeSet: __webpack_require__(350).RangeSet,\n ledgerUtils: __webpack_require__(519),\n schemaValidator: __webpack_require__(393)\n};\n\nmodule.exports = {\n RippleAPI: RippleAPI\n};\n/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/api.js\n ** module id = 1\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/api.js?"); + eval("/* WEBPACK VAR INJECTION */(function(global) {\n'use strict';\n\n/* eslint-disable max-len */\n// Enable core-js polyfills. This allows use of ES6/7 extensions listed here:\n// https://github.com/zloirock/core-js/blob/fb0890f32dabe8d4d88a4350d1b268446127132e/shim.js#L1-L103\n/* eslint-enable max-len */\n\n// In node.js env, polyfill might be already loaded (from any npm package),\n// that's why we do this check.\n\nvar _get = __webpack_require__(2)['default'];\n\nvar _inherits = __webpack_require__(18)['default'];\n\nvar _createClass = __webpack_require__(27)['default'];\n\nvar _classCallCheck = __webpack_require__(30)['default'];\n\nvar _Promise = __webpack_require__(31)['default'];\n\nif (!global._babelPolyfill) {\n __webpack_require__(72);\n}\n\nvar _ = __webpack_require__(262);\nvar EventEmitter = __webpack_require__(264).EventEmitter;\nvar common = __webpack_require__(265);\nvar server = __webpack_require__(517);\nvar connect = server.connect;\nvar disconnect = server.disconnect;\nvar getServerInfo = server.getServerInfo;\nvar getFee = server.getFee;\nvar isConnected = server.isConnected;\nvar getLedgerVersion = server.getLedgerVersion;\nvar getTransaction = __webpack_require__(518);\nvar getTransactions = __webpack_require__(537);\nvar getTrustlines = __webpack_require__(622);\nvar getBalances = __webpack_require__(624);\nvar getBalanceSheet = __webpack_require__(625);\nvar getPaths = __webpack_require__(626);\nvar getOrders = __webpack_require__(628);\nvar getOrderbook = __webpack_require__(631);\nvar getSettings = __webpack_require__(633);\nvar getAccountInfo = __webpack_require__(634);\nvar preparePayment = __webpack_require__(635);\nvar prepareTrustline = __webpack_require__(637);\nvar prepareOrder = __webpack_require__(638);\nvar prepareOrderCancellation = __webpack_require__(639);\nvar prepareSuspendedPaymentCreation = __webpack_require__(640);\nvar prepareSuspendedPaymentExecution = __webpack_require__(641);\nvar prepareSuspendedPaymentCancellation = __webpack_require__(642);\nvar prepareSettings = __webpack_require__(643);\nvar sign = __webpack_require__(644);\nvar submit = __webpack_require__(645);\nvar errors = __webpack_require__(265).errors;\nvar generateAddress = __webpack_require__(646).generateAddressAPI;\nvar computeLedgerHash = __webpack_require__(647);\nvar getLedger = __webpack_require__(648);\n\n// prevent access to non-validated ledger versions\n\nvar RestrictedConnection = (function (_common$Connection) {\n _inherits(RestrictedConnection, _common$Connection);\n\n function RestrictedConnection() {\n _classCallCheck(this, RestrictedConnection);\n\n _get(Object.getPrototypeOf(RestrictedConnection.prototype), 'constructor', this).apply(this, arguments);\n }\n\n _createClass(RestrictedConnection, [{\n key: 'request',\n value: function request(_request, timeout) {\n var ledger_index = _request.ledger_index;\n if (ledger_index !== undefined && ledger_index !== 'validated') {\n if (!_.isNumber(ledger_index) || ledger_index > this._ledgerVersion) {\n return _Promise.reject(new errors.LedgerVersionError('ledgerVersion ' + ledger_index + ' is greater than server\\'s ' + ('most recent validated ledger: ' + this._ledgerVersion)));\n }\n }\n return _get(Object.getPrototypeOf(RestrictedConnection.prototype), 'request', this).call(this, _request, timeout);\n }\n }]);\n\n return RestrictedConnection;\n})(common.Connection);\n\nvar RippleAPI = (function (_EventEmitter) {\n _inherits(RippleAPI, _EventEmitter);\n\n function RippleAPI() {\n var _this = this;\n\n var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n _classCallCheck(this, RippleAPI);\n\n common.validate.apiOptions(options);\n _get(Object.getPrototypeOf(RippleAPI.prototype), 'constructor', this).call(this);\n this._feeCushion = options.feeCushion || 1.2;\n var serverURL = options.server;\n if (serverURL !== undefined) {\n this.connection = new RestrictedConnection(serverURL, options);\n this.connection.on('ledgerClosed', function (message) {\n _this.emit('ledger', server.formatLedgerClose(message));\n });\n this.connection.on('error', function (errorCode, errorMessage, data) {\n _this.emit('error', errorCode, errorMessage, data);\n });\n } else {\n // use null object pattern to provide better error message if user\n // tries to call a method that requires a connection\n this.connection = new RestrictedConnection(null, options);\n }\n }\n\n return RippleAPI;\n})(EventEmitter);\n\n_.assign(RippleAPI.prototype, {\n connect: connect,\n disconnect: disconnect,\n isConnected: isConnected,\n getServerInfo: getServerInfo,\n getFee: getFee,\n getLedgerVersion: getLedgerVersion,\n\n getTransaction: getTransaction,\n getTransactions: getTransactions,\n getTrustlines: getTrustlines,\n getBalances: getBalances,\n getBalanceSheet: getBalanceSheet,\n getPaths: getPaths,\n getOrders: getOrders,\n getOrderbook: getOrderbook,\n getSettings: getSettings,\n getAccountInfo: getAccountInfo,\n getLedger: getLedger,\n\n preparePayment: preparePayment,\n prepareTrustline: prepareTrustline,\n prepareOrder: prepareOrder,\n prepareOrderCancellation: prepareOrderCancellation,\n prepareSuspendedPaymentCreation: prepareSuspendedPaymentCreation,\n prepareSuspendedPaymentExecution: prepareSuspendedPaymentExecution,\n prepareSuspendedPaymentCancellation: prepareSuspendedPaymentCancellation,\n prepareSettings: prepareSettings,\n sign: sign,\n submit: submit,\n\n generateAddress: generateAddress,\n computeLedgerHash: computeLedgerHash,\n errors: errors\n});\n\n// these are exposed only for use by unit tests; they are not part of the API\nRippleAPI._PRIVATE = {\n validate: common.validate,\n RangeSet: __webpack_require__(350).RangeSet,\n ledgerUtils: __webpack_require__(519),\n schemaValidator: __webpack_require__(393)\n};\n\nmodule.exports = {\n RippleAPI: RippleAPI\n};\n/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/api.js\n ** module id = 1\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/api.js?"); /***/ }, /* 2 */ @@ -111,13 +111,13 @@ var ripple = /* 11 */ /***/ function(module, exports, __webpack_require__) { - eval("// most Object methods by ES6 should accept primitives\nmodule.exports = function(KEY, exec){\n var $def = __webpack_require__(12)\n , fn = (__webpack_require__(14).Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $def($def.S + $def.F * __webpack_require__(15)(function(){ fn(1); }), 'Object', exp);\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.object-sap.js\n ** module id = 11\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.object-sap.js?"); + eval("// most Object methods by ES6 should accept primitives\nvar $export = __webpack_require__(12)\n , core = __webpack_require__(14)\n , fails = __webpack_require__(17);\nmodule.exports = function(KEY, exec){\n var fn = (core.Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.object-sap.js\n ** module id = 11\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.object-sap.js?"); /***/ }, /* 12 */ /***/ function(module, exports, __webpack_require__) { - eval("var global = __webpack_require__(13)\n , core = __webpack_require__(14)\n , PROTOTYPE = 'prototype';\nvar ctx = function(fn, that){\n return function(){\n return fn.apply(that, arguments);\n };\n};\nvar $def = function(type, name, source){\n var key, own, out, exp\n , isGlobal = type & $def.G\n , isProto = type & $def.P\n , target = isGlobal ? global : type & $def.S\n ? global[name] : (global[name] || {})[PROTOTYPE]\n , exports = isGlobal ? core : core[name] || (core[name] = {});\n if(isGlobal)source = name;\n for(key in source){\n // contains in native\n own = !(type & $def.F) && target && key in target;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n if(isGlobal && typeof target[key] != 'function')exp = source[key];\n // bind timers to global for call from export context\n else if(type & $def.B && own)exp = ctx(out, global);\n // wrap global constructors for prevent change them in library\n else if(type & $def.W && target[key] == out)!function(C){\n exp = function(param){\n return this instanceof C ? new C(param) : C(param);\n };\n exp[PROTOTYPE] = C[PROTOTYPE];\n }(out);\n else exp = isProto && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export\n exports[key] = exp;\n if(isProto)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;\n }\n};\n// type bitmap\n$def.F = 1; // forced\n$def.G = 2; // global\n$def.S = 4; // static\n$def.P = 8; // proto\n$def.B = 16; // bind\n$def.W = 32; // wrap\nmodule.exports = $def;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.def.js\n ** module id = 12\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.def.js?"); + eval("var global = __webpack_require__(13)\n , core = __webpack_require__(14)\n , ctx = __webpack_require__(15)\n , PROTOTYPE = 'prototype';\n\nvar $export = function(type, name, source){\n var IS_FORCED = type & $export.F\n , IS_GLOBAL = type & $export.G\n , IS_STATIC = type & $export.S\n , IS_PROTO = type & $export.P\n , IS_BIND = type & $export.B\n , IS_WRAP = type & $export.W\n , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})\n , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]\n , key, own, out;\n if(IS_GLOBAL)source = name;\n for(key in source){\n // contains in native\n own = !IS_FORCED && target && key in target;\n if(own && key in exports)continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function(C){\n var F = function(param){\n return this instanceof C ? new C(param) : C(param);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\nmodule.exports = $export;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.export.js\n ** module id = 12\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.export.js?"); /***/ }, /* 13 */ @@ -129,79 +129,79 @@ var ripple = /* 14 */ /***/ function(module, exports) { - eval("var core = module.exports = {version: '1.2.3'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.core.js\n ** module id = 14\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.core.js?"); + eval("var core = module.exports = {version: '1.2.6'};\nif(typeof __e == 'number')__e = core; // eslint-disable-line no-undef\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.core.js\n ** module id = 14\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.core.js?"); /***/ }, /* 15 */ -/***/ function(module, exports) { +/***/ function(module, exports, __webpack_require__) { - eval("module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.fails.js\n ** module id = 15\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.fails.js?"); + eval("// optional / simple context binding\nvar aFunction = __webpack_require__(16);\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.ctx.js\n ** module id = 15\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.ctx.js?"); /***/ }, /* 16 */ -/***/ function(module, exports, __webpack_require__) { +/***/ function(module, exports) { - eval("\"use strict\";\n\nvar _Object$create = __webpack_require__(17)[\"default\"];\n\nvar _Object$setPrototypeOf = __webpack_require__(19)[\"default\"];\n\nexports[\"default\"] = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = _Object$create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _Object$setPrototypeOf ? _Object$setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nexports.__esModule = true;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/inherits.js\n ** module id = 16\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/helpers/inherits.js?"); + eval("module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.a-function.js\n ** module id = 16\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.a-function.js?"); /***/ }, /* 17 */ -/***/ function(module, exports, __webpack_require__) { +/***/ function(module, exports) { - eval("module.exports = { \"default\": __webpack_require__(18), __esModule: true };\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/create.js\n ** module id = 17\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/core-js/object/create.js?"); + eval("module.exports = function(exec){\n try {\n return !!exec();\n } catch(e){\n return true;\n }\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.fails.js\n ** module id = 17\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.fails.js?"); /***/ }, /* 18 */ /***/ function(module, exports, __webpack_require__) { - eval("var $ = __webpack_require__(5);\nmodule.exports = function create(P, D){\n return $.create(P, D);\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/fn/object/create.js\n ** module id = 18\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/fn/object/create.js?"); + eval("\"use strict\";\n\nvar _Object$create = __webpack_require__(19)[\"default\"];\n\nvar _Object$setPrototypeOf = __webpack_require__(21)[\"default\"];\n\nexports[\"default\"] = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = _Object$create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _Object$setPrototypeOf ? _Object$setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nexports.__esModule = true;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/helpers/inherits.js\n ** module id = 18\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/helpers/inherits.js?"); /***/ }, /* 19 */ /***/ function(module, exports, __webpack_require__) { - eval("module.exports = { \"default\": __webpack_require__(20), __esModule: true };\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/set-prototype-of.js\n ** module id = 19\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/core-js/object/set-prototype-of.js?"); + eval("module.exports = { \"default\": __webpack_require__(20), __esModule: true };\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/create.js\n ** module id = 19\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/core-js/object/create.js?"); /***/ }, /* 20 */ /***/ function(module, exports, __webpack_require__) { - eval("__webpack_require__(21);\nmodule.exports = __webpack_require__(14).Object.setPrototypeOf;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/fn/object/set-prototype-of.js\n ** module id = 20\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/fn/object/set-prototype-of.js?"); + eval("var $ = __webpack_require__(5);\nmodule.exports = function create(P, D){\n return $.create(P, D);\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/fn/object/create.js\n ** module id = 20\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/fn/object/create.js?"); /***/ }, /* 21 */ /***/ function(module, exports, __webpack_require__) { - eval("// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $def = __webpack_require__(12);\n$def($def.S, 'Object', {setPrototypeOf: __webpack_require__(22).set});\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.object.set-prototype-of.js\n ** module id = 21\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.object.set-prototype-of.js?"); + eval("module.exports = { \"default\": __webpack_require__(22), __esModule: true };\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/core-js/object/set-prototype-of.js\n ** module id = 21\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/core-js/object/set-prototype-of.js?"); /***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { - eval("// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar getDesc = __webpack_require__(5).getDesc\n , isObject = __webpack_require__(23)\n , anObject = __webpack_require__(24);\nvar check = function(O, proto){\n anObject(O);\n if(!isObject(proto) && proto !== null)throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function(test, buggy, set){\n try {\n set = __webpack_require__(25)(Function.call, getDesc(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch(e){ buggy = true; }\n return function setPrototypeOf(O, proto){\n check(O, proto);\n if(buggy)O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.set-proto.js\n ** module id = 22\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.set-proto.js?"); + eval("__webpack_require__(23);\nmodule.exports = __webpack_require__(14).Object.setPrototypeOf;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/fn/object/set-prototype-of.js\n ** module id = 22\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/fn/object/set-prototype-of.js?"); /***/ }, /* 23 */ -/***/ function(module, exports) { +/***/ function(module, exports, __webpack_require__) { - eval("module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.is-object.js\n ** module id = 23\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.is-object.js?"); + eval("// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = __webpack_require__(12);\n$export($export.S, 'Object', {setPrototypeOf: __webpack_require__(24).set});\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.object.set-prototype-of.js\n ** module id = 23\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.object.set-prototype-of.js?"); /***/ }, /* 24 */ /***/ function(module, exports, __webpack_require__) { - eval("var isObject = __webpack_require__(23);\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.an-object.js\n ** module id = 24\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.an-object.js?"); + eval("// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar getDesc = __webpack_require__(5).getDesc\n , isObject = __webpack_require__(25)\n , anObject = __webpack_require__(26);\nvar check = function(O, proto){\n anObject(O);\n if(!isObject(proto) && proto !== null)throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function(test, buggy, set){\n try {\n set = __webpack_require__(15)(Function.call, getDesc(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch(e){ buggy = true; }\n return function setPrototypeOf(O, proto){\n check(O, proto);\n if(buggy)O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.set-proto.js\n ** module id = 24\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.set-proto.js?"); /***/ }, /* 25 */ -/***/ function(module, exports, __webpack_require__) { +/***/ function(module, exports) { - eval("// optional / simple context binding\nvar aFunction = __webpack_require__(26);\nmodule.exports = function(fn, that, length){\n aFunction(fn);\n if(that === undefined)return fn;\n switch(length){\n case 1: return function(a){\n return fn.call(that, a);\n };\n case 2: return function(a, b){\n return fn.call(that, a, b);\n };\n case 3: return function(a, b, c){\n return fn.call(that, a, b, c);\n };\n }\n return function(/* ...args */){\n return fn.apply(that, arguments);\n };\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.ctx.js\n ** module id = 25\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.ctx.js?"); + eval("module.exports = function(it){\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.is-object.js\n ** module id = 25\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.is-object.js?"); /***/ }, /* 26 */ -/***/ function(module, exports) { +/***/ function(module, exports, __webpack_require__) { - eval("module.exports = function(it){\n if(typeof it != 'function')throw TypeError(it + ' is not a function!');\n return it;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.a-function.js\n ** module id = 26\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.a-function.js?"); + eval("var isObject = __webpack_require__(25);\nmodule.exports = function(it){\n if(!isObject(it))throw TypeError(it + ' is not an object!');\n return it;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.an-object.js\n ** module id = 26\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.an-object.js?"); /***/ }, /* 27 */ @@ -255,7 +255,7 @@ var ripple = /* 35 */ /***/ function(module, exports, __webpack_require__) { - eval("// true -> String#at\n// false -> String#codePointAt\nvar toInteger = __webpack_require__(36)\n , defined = __webpack_require__(10);\nmodule.exports = function(TO_STRING){\n return function(that, pos){\n var s = String(defined(that))\n , i = toInteger(pos)\n , l = s.length\n , a, b;\n if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l\n || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.string-at.js\n ** module id = 35\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.string-at.js?"); + eval("var toInteger = __webpack_require__(36)\n , defined = __webpack_require__(10);\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function(TO_STRING){\n return function(that, pos){\n var s = String(defined(that))\n , i = toInteger(pos)\n , l = s.length\n , a, b;\n if(i < 0 || i >= l)return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.string-at.js\n ** module id = 35\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.string-at.js?"); /***/ }, /* 36 */ @@ -267,7 +267,7 @@ var ripple = /* 37 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\nvar LIBRARY = __webpack_require__(38)\n , $def = __webpack_require__(12)\n , $redef = __webpack_require__(39)\n , hide = __webpack_require__(40)\n , has = __webpack_require__(43)\n , SYMBOL_ITERATOR = __webpack_require__(44)('iterator')\n , Iterators = __webpack_require__(47)\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\nvar returnThis = function(){ return this; };\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){\n __webpack_require__(48)(Constructor, NAME, next);\n var createMethod = function(kind){\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , proto = Base.prototype\n , _native = proto[SYMBOL_ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , _default = _native || createMethod(DEFAULT)\n , methods, key;\n // Fix native\n if(_native){\n var IteratorPrototype = __webpack_require__(5).getProto(_default.call(new Base));\n // Set @@toStringTag to native iterators\n __webpack_require__(49)(IteratorPrototype, TAG, true);\n // FF fix\n if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, SYMBOL_ITERATOR, returnThis);\n }\n // Define iterator\n if(!LIBRARY || FORCE)hide(proto, SYMBOL_ITERATOR, _default);\n // Plug for library\n Iterators[NAME] = _default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEFAULT == VALUES ? _default : createMethod(VALUES),\n keys: IS_SET ? _default : createMethod(KEYS),\n entries: DEFAULT != VALUES ? _default : createMethod('entries')\n };\n if(FORCE)for(key in methods){\n if(!(key in proto))$redef(proto, key, methods[key]);\n } else $def($def.P + $def.F * BUGGY, NAME, methods);\n }\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.iter-define.js\n ** module id = 37\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.iter-define.js?"); + eval("'use strict';\nvar LIBRARY = __webpack_require__(38)\n , $export = __webpack_require__(12)\n , redefine = __webpack_require__(39)\n , hide = __webpack_require__(40)\n , has = __webpack_require__(43)\n , Iterators = __webpack_require__(44)\n , $iterCreate = __webpack_require__(45)\n , setToStringTag = __webpack_require__(46)\n , getProto = __webpack_require__(5).getProto\n , ITERATOR = __webpack_require__(47)('iterator')\n , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`\n , FF_ITERATOR = '@@iterator'\n , KEYS = 'keys'\n , VALUES = 'values';\n\nvar returnThis = function(){ return this; };\n\nmodule.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){\n $iterCreate(Constructor, NAME, next);\n var getMethod = function(kind){\n if(!BUGGY && kind in proto)return proto[kind];\n switch(kind){\n case KEYS: return function keys(){ return new Constructor(this, kind); };\n case VALUES: return function values(){ return new Constructor(this, kind); };\n } return function entries(){ return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator'\n , DEF_VALUES = DEFAULT == VALUES\n , VALUES_BUG = false\n , proto = Base.prototype\n , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]\n , $default = $native || getMethod(DEFAULT)\n , methods, key;\n // Fix native\n if($native){\n var IteratorPrototype = getProto($default.call(new Base));\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // FF fix\n if(!LIBRARY && has(proto, FF_ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);\n // fix Array#{values, @@iterator}.name in V8 / FF\n if(DEF_VALUES && $native.name !== VALUES){\n VALUES_BUG = true;\n $default = function values(){ return $native.call(this); };\n }\n }\n // Define iterator\n if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if(DEFAULT){\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: !DEF_VALUES ? $default : getMethod('entries')\n };\n if(FORCED)for(key in methods){\n if(!(key in proto))redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.iter-define.js\n ** module id = 37\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.iter-define.js?"); /***/ }, /* 38 */ @@ -279,7 +279,7 @@ var ripple = /* 39 */ /***/ function(module, exports, __webpack_require__) { - eval("module.exports = __webpack_require__(40);\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.redef.js\n ** module id = 39\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.redef.js?"); + eval("module.exports = __webpack_require__(40);\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.redefine.js\n ** module id = 39\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.redefine.js?"); /***/ }, /* 40 */ @@ -297,7 +297,7 @@ var ripple = /* 42 */ /***/ function(module, exports, __webpack_require__) { - eval("// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(15)(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.support-desc.js\n ** module id = 42\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.support-desc.js?"); + eval("// Thank's IE8 for his funny defineProperty\nmodule.exports = !__webpack_require__(17)(function(){\n return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;\n});\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.descriptors.js\n ** module id = 42\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.descriptors.js?"); /***/ }, /* 43 */ @@ -307,57 +307,57 @@ var ripple = /***/ }, /* 44 */ -/***/ function(module, exports, __webpack_require__) { +/***/ function(module, exports) { - eval("var store = __webpack_require__(45)('wks')\n , Symbol = __webpack_require__(13).Symbol;\nmodule.exports = function(name){\n return store[name] || (store[name] =\n Symbol && Symbol[name] || (Symbol || __webpack_require__(46))('Symbol.' + name));\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.wks.js\n ** module id = 44\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.wks.js?"); + eval("module.exports = {};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.iterators.js\n ** module id = 44\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.iterators.js?"); /***/ }, /* 45 */ /***/ function(module, exports, __webpack_require__) { - eval("var global = __webpack_require__(13)\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.shared.js\n ** module id = 45\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.shared.js?"); + eval("'use strict';\nvar $ = __webpack_require__(5)\n , descriptor = __webpack_require__(41)\n , setToStringTag = __webpack_require__(46)\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(40)(IteratorPrototype, __webpack_require__(47)('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = $.create(IteratorPrototype, {next: descriptor(1, next)});\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.iter-create.js\n ** module id = 45\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.iter-create.js?"); /***/ }, /* 46 */ -/***/ function(module, exports) { +/***/ function(module, exports, __webpack_require__) { - eval("var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.uid.js\n ** module id = 46\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.uid.js?"); + eval("var def = __webpack_require__(5).setDesc\n , has = __webpack_require__(43)\n , TAG = __webpack_require__(47)('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.set-to-string-tag.js\n ** module id = 46\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.set-to-string-tag.js?"); /***/ }, /* 47 */ -/***/ function(module, exports) { +/***/ function(module, exports, __webpack_require__) { - eval("module.exports = {};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.iterators.js\n ** module id = 47\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.iterators.js?"); + eval("var store = __webpack_require__(48)('wks')\n , uid = __webpack_require__(49)\n , Symbol = __webpack_require__(13).Symbol;\nmodule.exports = function(name){\n return store[name] || (store[name] =\n Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.wks.js\n ** module id = 47\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.wks.js?"); /***/ }, /* 48 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\nvar $ = __webpack_require__(5)\n , IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\n__webpack_require__(40)(IteratorPrototype, __webpack_require__(44)('iterator'), function(){ return this; });\n\nmodule.exports = function(Constructor, NAME, next){\n Constructor.prototype = $.create(IteratorPrototype, {next: __webpack_require__(41)(1,next)});\n __webpack_require__(49)(Constructor, NAME + ' Iterator');\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.iter-create.js\n ** module id = 48\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.iter-create.js?"); + eval("var global = __webpack_require__(13)\n , SHARED = '__core-js_shared__'\n , store = global[SHARED] || (global[SHARED] = {});\nmodule.exports = function(key){\n return store[key] || (store[key] = {});\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.shared.js\n ** module id = 48\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.shared.js?"); /***/ }, /* 49 */ -/***/ function(module, exports, __webpack_require__) { +/***/ function(module, exports) { - eval("var def = __webpack_require__(5).setDesc\n , has = __webpack_require__(43)\n , TAG = __webpack_require__(44)('toStringTag');\n\nmodule.exports = function(it, tag, stat){\n if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.tag.js\n ** module id = 49\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.tag.js?"); + eval("var id = 0\n , px = Math.random();\nmodule.exports = function(key){\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.uid.js\n ** module id = 49\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.uid.js?"); /***/ }, /* 50 */ /***/ function(module, exports, __webpack_require__) { - eval("__webpack_require__(51);\nvar Iterators = __webpack_require__(47);\nIterators.NodeList = Iterators.HTMLCollection = Iterators.Array;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/web.dom.iterable.js\n ** module id = 50\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/web.dom.iterable.js?"); + eval("__webpack_require__(51);\nvar Iterators = __webpack_require__(44);\nIterators.NodeList = Iterators.HTMLCollection = Iterators.Array;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/web.dom.iterable.js\n ** module id = 50\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/web.dom.iterable.js?"); /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\nvar setUnscope = __webpack_require__(52)\n , step = __webpack_require__(53)\n , Iterators = __webpack_require__(47)\n , toIObject = __webpack_require__(7);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\n__webpack_require__(37)(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\nsetUnscope('keys');\nsetUnscope('values');\nsetUnscope('entries');\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.array.iterator.js\n ** module id = 51\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.array.iterator.js?"); + eval("'use strict';\nvar addToUnscopables = __webpack_require__(52)\n , step = __webpack_require__(53)\n , Iterators = __webpack_require__(44)\n , toIObject = __webpack_require__(7);\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = __webpack_require__(37)(Array, 'Array', function(iterated, kind){\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function(){\n var O = this._t\n , kind = this._k\n , index = this._i++;\n if(!O || index >= O.length){\n this._t = undefined;\n return step(1);\n }\n if(kind == 'keys' )return step(0, index);\n if(kind == 'values')return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.array.iterator.js\n ** module id = 51\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.array.iterator.js?"); /***/ }, /* 52 */ /***/ function(module, exports) { - eval("module.exports = function(){ /* empty */ };\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.unscope.js\n ** module id = 52\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.unscope.js?"); + eval("module.exports = function(){ /* empty */ };\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.add-to-unscopables.js\n ** module id = 52\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.add-to-unscopables.js?"); /***/ }, /* 53 */ @@ -369,13 +369,13 @@ var ripple = /* 54 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\nvar $ = __webpack_require__(5)\n , LIBRARY = __webpack_require__(38)\n , global = __webpack_require__(13)\n , ctx = __webpack_require__(25)\n , classof = __webpack_require__(55)\n , $def = __webpack_require__(12)\n , isObject = __webpack_require__(23)\n , anObject = __webpack_require__(24)\n , aFunction = __webpack_require__(26)\n , strictNew = __webpack_require__(56)\n , forOf = __webpack_require__(57)\n , setProto = __webpack_require__(22).set\n , same = __webpack_require__(62)\n , species = __webpack_require__(63)\n , SPECIES = __webpack_require__(44)('species')\n , speciesConstructor = __webpack_require__(64)\n , RECORD = __webpack_require__(46)('record')\n , asap = __webpack_require__(65)\n , PROMISE = 'Promise'\n , process = global.process\n , isNode = classof(process) == 'process'\n , P = global[PROMISE]\n , Wrapper;\n\nvar testResolve = function(sub){\n var test = new P(function(){});\n if(sub)test.constructor = Object;\n return P.resolve(test) === test;\n};\n\nvar useNative = function(){\n var works = false;\n function P2(x){\n var self = new P(x);\n setProto(self, P2.prototype);\n return self;\n }\n try {\n works = P && P.resolve && testResolve();\n setProto(P2, P);\n P2.prototype = $.create(P.prototype, {constructor: {value: P2}});\n // actual Firefox has broken subclass support, test that\n if(!(P2.resolve(5).then(function(){}) instanceof P2)){\n works = false;\n }\n // actual V8 bug, https://code.google.com/p/v8/issues/detail?id=4162\n if(works && __webpack_require__(42)){\n var thenableThenGotten = false;\n P.resolve($.setDesc({}, 'then', {\n get: function(){ thenableThenGotten = true; }\n }));\n works = thenableThenGotten;\n }\n } catch(e){ works = false; }\n return works;\n}();\n\n// helpers\nvar isPromise = function(it){\n return isObject(it) && (useNative ? classof(it) == 'Promise' : RECORD in it);\n};\nvar sameConstructor = function(a, b){\n // library wrapper special case\n if(LIBRARY && a === P && b === Wrapper)return true;\n return same(a, b);\n};\nvar getConstructor = function(C){\n var S = anObject(C)[SPECIES];\n return S != undefined ? S : C;\n};\nvar isThenable = function(it){\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar notify = function(record, isReject){\n if(record.n)return;\n record.n = true;\n var chain = record.c;\n asap(function(){\n var value = record.v\n , ok = record.s == 1\n , i = 0;\n var run = function(react){\n var cb = ok ? react.ok : react.fail\n , ret, then;\n try {\n if(cb){\n if(!ok)record.h = true;\n ret = cb === true ? value : cb(value);\n if(ret === react.P){\n react.rej(TypeError('Promise-chain cycle'));\n } else if(then = isThenable(ret)){\n then.call(ret, react.res, react.rej);\n } else react.res(ret);\n } else react.rej(value);\n } catch(err){\n react.rej(err);\n }\n };\n while(chain.length > i)run(chain[i++]); // variable length - can't use forEach\n chain.length = 0;\n record.n = false;\n if(isReject)setTimeout(function(){\n var promise = record.p\n , handler, console;\n if(isUnhandled(promise)){\n if(isNode){\n process.emit('unhandledRejection', value, promise);\n } else if(handler = global.onunhandledrejection){\n handler({promise: promise, reason: value});\n } else if((console = global.console) && console.error){\n console.error('Unhandled promise rejection', value);\n }\n } record.a = undefined;\n }, 1);\n });\n};\nvar isUnhandled = function(promise){\n var record = promise[RECORD]\n , chain = record.a || record.c\n , i = 0\n , react;\n if(record.h)return false;\n while(chain.length > i){\n react = chain[i++];\n if(react.fail || !isUnhandled(react.P))return false;\n } return true;\n};\nvar $reject = function(value){\n var record = this;\n if(record.d)return;\n record.d = true;\n record = record.r || record; // unwrap\n record.v = value;\n record.s = 2;\n record.a = record.c.slice();\n notify(record, true);\n};\nvar $resolve = function(value){\n var record = this\n , then;\n if(record.d)return;\n record.d = true;\n record = record.r || record; // unwrap\n try {\n if(then = isThenable(value)){\n asap(function(){\n var wrapper = {r: record, d: false}; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch(e){\n $reject.call(wrapper, e);\n }\n });\n } else {\n record.v = value;\n record.s = 1;\n notify(record, false);\n }\n } catch(e){\n $reject.call({r: record, d: false}, e); // wrap\n }\n};\n\n// constructor polyfill\nif(!useNative){\n // 25.4.3.1 Promise(executor)\n P = function Promise(executor){\n aFunction(executor);\n var record = {\n p: strictNew(this, P, PROMISE), // <- promise\n c: [], // <- awaiting reactions\n a: undefined, // <- checked in isUnhandled reactions\n s: 0, // <- state\n d: false, // <- done\n v: undefined, // <- value\n h: false, // <- handled rejection\n n: false // <- notify\n };\n this[RECORD] = record;\n try {\n executor(ctx($resolve, record, 1), ctx($reject, record, 1));\n } catch(err){\n $reject.call(record, err);\n }\n };\n __webpack_require__(70)(P.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected){\n var react = {\n ok: typeof onFulfilled == 'function' ? onFulfilled : true,\n fail: typeof onRejected == 'function' ? onRejected : false\n };\n var promise = react.P = new (speciesConstructor(this, P))(function(res, rej){\n react.res = res;\n react.rej = rej;\n });\n aFunction(react.res);\n aFunction(react.rej);\n var record = this[RECORD];\n record.c.push(react);\n if(record.a)record.a.push(react);\n if(record.s)notify(record, false);\n return promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function(onRejected){\n return this.then(undefined, onRejected);\n }\n });\n}\n\n// export\n$def($def.G + $def.W + $def.F * !useNative, {Promise: P});\n__webpack_require__(49)(P, PROMISE);\nspecies(P);\nspecies(Wrapper = __webpack_require__(14)[PROMISE]);\n\n// statics\n$def($def.S + $def.F * !useNative, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r){\n return new this(function(res, rej){ rej(r); });\n }\n});\n$def($def.S + $def.F * (!useNative || testResolve(true)), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x){\n return isPromise(x) && sameConstructor(x.constructor, this)\n ? x : new this(function(res){ res(x); });\n }\n});\n$def($def.S + $def.F * !(useNative && __webpack_require__(71)(function(iter){\n P.all(iter)['catch'](function(){});\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable){\n var C = getConstructor(this)\n , values = [];\n return new C(function(res, rej){\n forOf(iterable, false, values.push, values);\n var remaining = values.length\n , results = Array(remaining);\n if(remaining)$.each.call(values, function(promise, index){\n C.resolve(promise).then(function(value){\n results[index] = value;\n --remaining || res(results);\n }, rej);\n });\n else res(results);\n });\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable){\n var C = getConstructor(this);\n return new C(function(res, rej){\n forOf(iterable, false, function(promise){\n C.resolve(promise).then(res, rej);\n });\n });\n }\n});\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.promise.js\n ** module id = 54\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.promise.js?"); + eval("'use strict';\nvar $ = __webpack_require__(5)\n , LIBRARY = __webpack_require__(38)\n , global = __webpack_require__(13)\n , ctx = __webpack_require__(15)\n , classof = __webpack_require__(55)\n , $export = __webpack_require__(12)\n , isObject = __webpack_require__(25)\n , anObject = __webpack_require__(26)\n , aFunction = __webpack_require__(16)\n , strictNew = __webpack_require__(56)\n , forOf = __webpack_require__(57)\n , setProto = __webpack_require__(24).set\n , same = __webpack_require__(62)\n , SPECIES = __webpack_require__(47)('species')\n , speciesConstructor = __webpack_require__(63)\n , asap = __webpack_require__(64)\n , PROMISE = 'Promise'\n , process = global.process\n , isNode = classof(process) == 'process'\n , P = global[PROMISE]\n , Wrapper;\n\nvar testResolve = function(sub){\n var test = new P(function(){});\n if(sub)test.constructor = Object;\n return P.resolve(test) === test;\n};\n\nvar USE_NATIVE = function(){\n var works = false;\n function P2(x){\n var self = new P(x);\n setProto(self, P2.prototype);\n return self;\n }\n try {\n works = P && P.resolve && testResolve();\n setProto(P2, P);\n P2.prototype = $.create(P.prototype, {constructor: {value: P2}});\n // actual Firefox has broken subclass support, test that\n if(!(P2.resolve(5).then(function(){}) instanceof P2)){\n works = false;\n }\n // actual V8 bug, https://code.google.com/p/v8/issues/detail?id=4162\n if(works && __webpack_require__(42)){\n var thenableThenGotten = false;\n P.resolve($.setDesc({}, 'then', {\n get: function(){ thenableThenGotten = true; }\n }));\n works = thenableThenGotten;\n }\n } catch(e){ works = false; }\n return works;\n}();\n\n// helpers\nvar sameConstructor = function(a, b){\n // library wrapper special case\n if(LIBRARY && a === P && b === Wrapper)return true;\n return same(a, b);\n};\nvar getConstructor = function(C){\n var S = anObject(C)[SPECIES];\n return S != undefined ? S : C;\n};\nvar isThenable = function(it){\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\nvar PromiseCapability = function(C){\n var resolve, reject;\n this.promise = new C(function($$resolve, $$reject){\n if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve),\n this.reject = aFunction(reject)\n};\nvar perform = function(exec){\n try {\n exec();\n } catch(e){\n return {error: e};\n }\n};\nvar notify = function(record, isReject){\n if(record.n)return;\n record.n = true;\n var chain = record.c;\n asap(function(){\n var value = record.v\n , ok = record.s == 1\n , i = 0;\n var run = function(reaction){\n var handler = ok ? reaction.ok : reaction.fail\n , resolve = reaction.resolve\n , reject = reaction.reject\n , result, then;\n try {\n if(handler){\n if(!ok)record.h = true;\n result = handler === true ? value : handler(value);\n if(result === reaction.promise){\n reject(TypeError('Promise-chain cycle'));\n } else if(then = isThenable(result)){\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch(e){\n reject(e);\n }\n };\n while(chain.length > i)run(chain[i++]); // variable length - can't use forEach\n chain.length = 0;\n record.n = false;\n if(isReject)setTimeout(function(){\n var promise = record.p\n , handler, console;\n if(isUnhandled(promise)){\n if(isNode){\n process.emit('unhandledRejection', value, promise);\n } else if(handler = global.onunhandledrejection){\n handler({promise: promise, reason: value});\n } else if((console = global.console) && console.error){\n console.error('Unhandled promise rejection', value);\n }\n } record.a = undefined;\n }, 1);\n });\n};\nvar isUnhandled = function(promise){\n var record = promise._d\n , chain = record.a || record.c\n , i = 0\n , reaction;\n if(record.h)return false;\n while(chain.length > i){\n reaction = chain[i++];\n if(reaction.fail || !isUnhandled(reaction.promise))return false;\n } return true;\n};\nvar $reject = function(value){\n var record = this;\n if(record.d)return;\n record.d = true;\n record = record.r || record; // unwrap\n record.v = value;\n record.s = 2;\n record.a = record.c.slice();\n notify(record, true);\n};\nvar $resolve = function(value){\n var record = this\n , then;\n if(record.d)return;\n record.d = true;\n record = record.r || record; // unwrap\n try {\n if(record.p === value)throw TypeError(\"Promise can't be resolved itself\");\n if(then = isThenable(value)){\n asap(function(){\n var wrapper = {r: record, d: false}; // wrap\n try {\n then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));\n } catch(e){\n $reject.call(wrapper, e);\n }\n });\n } else {\n record.v = value;\n record.s = 1;\n notify(record, false);\n }\n } catch(e){\n $reject.call({r: record, d: false}, e); // wrap\n }\n};\n\n// constructor polyfill\nif(!USE_NATIVE){\n // 25.4.3.1 Promise(executor)\n P = function Promise(executor){\n aFunction(executor);\n var record = this._d = {\n p: strictNew(this, P, PROMISE), // <- promise\n c: [], // <- awaiting reactions\n a: undefined, // <- checked in isUnhandled reactions\n s: 0, // <- state\n d: false, // <- done\n v: undefined, // <- value\n h: false, // <- handled rejection\n n: false // <- notify\n };\n try {\n executor(ctx($resolve, record, 1), ctx($reject, record, 1));\n } catch(err){\n $reject.call(record, err);\n }\n };\n __webpack_require__(69)(P.prototype, {\n // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)\n then: function then(onFulfilled, onRejected){\n var reaction = new PromiseCapability(speciesConstructor(this, P))\n , promise = reaction.promise\n , record = this._d;\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n record.c.push(reaction);\n if(record.a)record.a.push(reaction);\n if(record.s)notify(record, false);\n return promise;\n },\n // 25.4.5.1 Promise.prototype.catch(onRejected)\n 'catch': function(onRejected){\n return this.then(undefined, onRejected);\n }\n });\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: P});\n__webpack_require__(46)(P, PROMISE);\n__webpack_require__(70)(PROMISE);\nWrapper = __webpack_require__(14)[PROMISE];\n\n// statics\n$export($export.S + $export.F * !USE_NATIVE, PROMISE, {\n // 25.4.4.5 Promise.reject(r)\n reject: function reject(r){\n var capability = new PromiseCapability(this)\n , $$reject = capability.reject;\n $$reject(r);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * (!USE_NATIVE || testResolve(true)), PROMISE, {\n // 25.4.4.6 Promise.resolve(x)\n resolve: function resolve(x){\n // instanceof instead of internal slot check because we should fix it without replacement native Promise core\n if(x instanceof P && sameConstructor(x.constructor, this))return x;\n var capability = new PromiseCapability(this)\n , $$resolve = capability.resolve;\n $$resolve(x);\n return capability.promise;\n }\n});\n$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(71)(function(iter){\n P.all(iter)['catch'](function(){});\n})), PROMISE, {\n // 25.4.4.1 Promise.all(iterable)\n all: function all(iterable){\n var C = getConstructor(this)\n , capability = new PromiseCapability(C)\n , resolve = capability.resolve\n , reject = capability.reject\n , values = [];\n var abrupt = perform(function(){\n forOf(iterable, false, values.push, values);\n var remaining = values.length\n , results = Array(remaining);\n if(remaining)$.each.call(values, function(promise, index){\n var alreadyCalled = false;\n C.resolve(promise).then(function(value){\n if(alreadyCalled)return;\n alreadyCalled = true;\n results[index] = value;\n --remaining || resolve(results);\n }, reject);\n });\n else resolve(results);\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n },\n // 25.4.4.4 Promise.race(iterable)\n race: function race(iterable){\n var C = getConstructor(this)\n , capability = new PromiseCapability(C)\n , reject = capability.reject;\n var abrupt = perform(function(){\n forOf(iterable, false, function(promise){\n C.resolve(promise).then(capability.resolve, reject);\n });\n });\n if(abrupt)reject(abrupt.error);\n return capability.promise;\n }\n});\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.promise.js\n ** module id = 54\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.promise.js?"); /***/ }, /* 55 */ /***/ function(module, exports, __webpack_require__) { - eval("// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = __webpack_require__(9)\n , TAG = __webpack_require__(44)('toStringTag')\n // ES3 wrong here\n , ARG = cof(function(){ return arguments; }()) == 'Arguments';\n\nmodule.exports = function(it){\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = (O = Object(it))[TAG]) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.classof.js\n ** module id = 55\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.classof.js?"); + eval("// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = __webpack_require__(9)\n , TAG = __webpack_require__(47)('toStringTag')\n // ES3 wrong here\n , ARG = cof(function(){ return arguments; }()) == 'Arguments';\n\nmodule.exports = function(it){\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = (O = Object(it))[TAG]) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.classof.js\n ** module id = 55\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.classof.js?"); /***/ }, /* 56 */ @@ -387,19 +387,19 @@ var ripple = /* 57 */ /***/ function(module, exports, __webpack_require__) { - eval("var ctx = __webpack_require__(25)\n , call = __webpack_require__(58)\n , isArrayIter = __webpack_require__(59)\n , anObject = __webpack_require__(24)\n , toLength = __webpack_require__(60)\n , getIterFn = __webpack_require__(61);\nmodule.exports = function(iterable, entries, fn, that){\n var iterFn = getIterFn(iterable)\n , f = ctx(fn, that, entries ? 2 : 1)\n , index = 0\n , length, step, iterator;\n if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){\n entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){\n call(iterator, f, step.value, entries);\n }\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.for-of.js\n ** module id = 57\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.for-of.js?"); + eval("var ctx = __webpack_require__(15)\n , call = __webpack_require__(58)\n , isArrayIter = __webpack_require__(59)\n , anObject = __webpack_require__(26)\n , toLength = __webpack_require__(60)\n , getIterFn = __webpack_require__(61);\nmodule.exports = function(iterable, entries, fn, that){\n var iterFn = getIterFn(iterable)\n , f = ctx(fn, that, entries ? 2 : 1)\n , index = 0\n , length, step, iterator;\n if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){\n entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){\n call(iterator, f, step.value, entries);\n }\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.for-of.js\n ** module id = 57\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.for-of.js?"); /***/ }, /* 58 */ /***/ function(module, exports, __webpack_require__) { - eval("// call something on iterator step with safe closing on error\nvar anObject = __webpack_require__(24);\nmodule.exports = function(iterator, fn, value, entries){\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch(e){\n var ret = iterator['return'];\n if(ret !== undefined)anObject(ret.call(iterator));\n throw e;\n }\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.iter-call.js\n ** module id = 58\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.iter-call.js?"); + eval("// call something on iterator step with safe closing on error\nvar anObject = __webpack_require__(26);\nmodule.exports = function(iterator, fn, value, entries){\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch(e){\n var ret = iterator['return'];\n if(ret !== undefined)anObject(ret.call(iterator));\n throw e;\n }\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.iter-call.js\n ** module id = 58\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.iter-call.js?"); /***/ }, /* 59 */ /***/ function(module, exports, __webpack_require__) { - eval("// check on default Array iterator\nvar Iterators = __webpack_require__(47)\n , ITERATOR = __webpack_require__(44)('iterator');\nmodule.exports = function(it){\n return (Iterators.Array || Array.prototype[ITERATOR]) === it;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.is-array-iter.js\n ** module id = 59\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.is-array-iter.js?"); + eval("// check on default Array iterator\nvar Iterators = __webpack_require__(44)\n , ITERATOR = __webpack_require__(47)('iterator')\n , ArrayProto = Array.prototype;\n\nmodule.exports = function(it){\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.is-array-iter.js\n ** module id = 59\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.is-array-iter.js?"); /***/ }, /* 60 */ @@ -411,67 +411,67 @@ var ripple = /* 61 */ /***/ function(module, exports, __webpack_require__) { - eval("var classof = __webpack_require__(55)\n , ITERATOR = __webpack_require__(44)('iterator')\n , Iterators = __webpack_require__(47);\nmodule.exports = __webpack_require__(14).getIteratorMethod = function(it){\n if(it != undefined)return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/core.get-iterator-method.js\n ** module id = 61\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/core.get-iterator-method.js?"); + eval("var classof = __webpack_require__(55)\n , ITERATOR = __webpack_require__(47)('iterator')\n , Iterators = __webpack_require__(44);\nmodule.exports = __webpack_require__(14).getIteratorMethod = function(it){\n if(it != undefined)return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/core.get-iterator-method.js\n ** module id = 61\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/core.get-iterator-method.js?"); /***/ }, /* 62 */ /***/ function(module, exports) { - eval("module.exports = Object.is || function is(x, y){\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.same.js\n ** module id = 62\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.same.js?"); + eval("// 7.2.9 SameValue(x, y)\nmodule.exports = Object.is || function is(x, y){\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.same-value.js\n ** module id = 62\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.same-value.js?"); /***/ }, /* 63 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\nvar $ = __webpack_require__(5)\n , SPECIES = __webpack_require__(44)('species');\nmodule.exports = function(C){\n if(__webpack_require__(42) && !(SPECIES in C))$.setDesc(C, SPECIES, {\n configurable: true,\n get: function(){ return this; }\n });\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.species.js\n ** module id = 63\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.species.js?"); + eval("// 7.3.20 SpeciesConstructor(O, defaultConstructor)\nvar anObject = __webpack_require__(26)\n , aFunction = __webpack_require__(16)\n , SPECIES = __webpack_require__(47)('species');\nmodule.exports = function(O, D){\n var C = anObject(O).constructor, S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.species-constructor.js\n ** module id = 63\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.species-constructor.js?"); /***/ }, /* 64 */ /***/ function(module, exports, __webpack_require__) { - eval("// 7.3.20 SpeciesConstructor(O, defaultConstructor)\r\nvar anObject = __webpack_require__(24)\r\n , aFunction = __webpack_require__(26)\r\n , SPECIES = __webpack_require__(44)('species');\r\nmodule.exports = function(O, D){\r\n var C = anObject(O).constructor, S;\r\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);\r\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.species-constructor.js\n ** module id = 64\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.species-constructor.js?"); + eval("var global = __webpack_require__(13)\n , macrotask = __webpack_require__(65).set\n , Observer = global.MutationObserver || global.WebKitMutationObserver\n , process = global.process\n , Promise = global.Promise\n , isNode = __webpack_require__(9)(process) == 'process'\n , head, last, notify;\n\nvar flush = function(){\n var parent, domain, fn;\n if(isNode && (parent = process.domain)){\n process.domain = null;\n parent.exit();\n }\n while(head){\n domain = head.domain;\n fn = head.fn;\n if(domain)domain.enter();\n fn(); // <- currently we use it only for Promise - try / catch not required\n if(domain)domain.exit();\n head = head.next;\n } last = undefined;\n if(parent)parent.enter();\n};\n\n// Node.js\nif(isNode){\n notify = function(){\n process.nextTick(flush);\n };\n// browsers with MutationObserver\n} else if(Observer){\n var toggle = 1\n , node = document.createTextNode('');\n new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new\n notify = function(){\n node.data = toggle = -toggle;\n };\n// environments with maybe non-completely correct, but existent Promise\n} else if(Promise && Promise.resolve){\n notify = function(){\n Promise.resolve().then(flush);\n };\n// for other environments - macrotask based on:\n// - setImmediate\n// - MessageChannel\n// - window.postMessag\n// - onreadystatechange\n// - setTimeout\n} else {\n notify = function(){\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n}\n\nmodule.exports = function asap(fn){\n var task = {fn: fn, next: undefined, domain: isNode && process.domain};\n if(last)last.next = task;\n if(!head){\n head = task;\n notify();\n } last = task;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.microtask.js\n ** module id = 64\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.microtask.js?"); /***/ }, /* 65 */ /***/ function(module, exports, __webpack_require__) { - eval("var global = __webpack_require__(13)\n , macrotask = __webpack_require__(66).set\n , Observer = global.MutationObserver || global.WebKitMutationObserver\n , process = global.process\n , isNode = __webpack_require__(9)(process) == 'process'\n , head, last, notify;\n\nvar flush = function(){\n var parent, domain;\n if(isNode && (parent = process.domain)){\n process.domain = null;\n parent.exit();\n }\n while(head){\n domain = head.domain;\n if(domain)domain.enter();\n head.fn.call(); // <- currently we use it only for Promise - try / catch not required\n if(domain)domain.exit();\n head = head.next;\n } last = undefined;\n if(parent)parent.enter();\n};\n\n// Node.js\nif(isNode){\n notify = function(){\n process.nextTick(flush);\n };\n// browsers with MutationObserver\n} else if(Observer){\n var toggle = 1\n , node = document.createTextNode('');\n new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new\n notify = function(){\n node.data = toggle = -toggle;\n };\n// for other environments - macrotask based on:\n// - setImmediate\n// - MessageChannel\n// - window.postMessag\n// - onreadystatechange\n// - setTimeout\n} else {\n notify = function(){\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n}\n\nmodule.exports = function asap(fn){\n var task = {fn: fn, next: undefined, domain: isNode && process.domain};\n if(last)last.next = task;\n if(!head){\n head = task;\n notify();\n } last = task;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.microtask.js\n ** module id = 65\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.microtask.js?"); + eval("var ctx = __webpack_require__(15)\n , invoke = __webpack_require__(66)\n , html = __webpack_require__(67)\n , cel = __webpack_require__(68)\n , global = __webpack_require__(13)\n , process = global.process\n , setTask = global.setImmediate\n , clearTask = global.clearImmediate\n , MessageChannel = global.MessageChannel\n , counter = 0\n , queue = {}\n , ONREADYSTATECHANGE = 'onreadystatechange'\n , defer, channel, port;\nvar run = function(){\n var id = +this;\n if(queue.hasOwnProperty(id)){\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listner = function(event){\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n setTask = function setImmediate(fn){\n var args = [], i = 1;\n while(arguments.length > i)args.push(arguments[i++]);\n queue[++counter] = function(){\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id){\n delete queue[id];\n };\n // Node.js 0.8-\n if(__webpack_require__(9)(process) == 'process'){\n defer = function(id){\n process.nextTick(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if(MessageChannel){\n channel = new MessageChannel;\n port = channel.port2;\n channel.port1.onmessage = listner;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n defer = function(id){\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listner, false);\n // IE8-\n } else if(ONREADYSTATECHANGE in cel('script')){\n defer = function(id){\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function(id){\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.task.js\n ** module id = 65\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.task.js?"); /***/ }, /* 66 */ -/***/ function(module, exports, __webpack_require__) { +/***/ function(module, exports) { - eval("'use strict';\nvar ctx = __webpack_require__(25)\n , invoke = __webpack_require__(67)\n , html = __webpack_require__(68)\n , cel = __webpack_require__(69)\n , global = __webpack_require__(13)\n , process = global.process\n , setTask = global.setImmediate\n , clearTask = global.clearImmediate\n , MessageChannel = global.MessageChannel\n , counter = 0\n , queue = {}\n , ONREADYSTATECHANGE = 'onreadystatechange'\n , defer, channel, port;\nvar run = function(){\n var id = +this;\n if(queue.hasOwnProperty(id)){\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\nvar listner = function(event){\n run.call(event.data);\n};\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif(!setTask || !clearTask){\n setTask = function setImmediate(fn){\n var args = [], i = 1;\n while(arguments.length > i)args.push(arguments[i++]);\n queue[++counter] = function(){\n invoke(typeof fn == 'function' ? fn : Function(fn), args);\n };\n defer(counter);\n return counter;\n };\n clearTask = function clearImmediate(id){\n delete queue[id];\n };\n // Node.js 0.8-\n if(__webpack_require__(9)(process) == 'process'){\n defer = function(id){\n process.nextTick(ctx(run, id, 1));\n };\n // Browsers with MessageChannel, includes WebWorkers\n } else if(MessageChannel){\n channel = new MessageChannel;\n port = channel.port2;\n channel.port1.onmessage = listner;\n defer = ctx(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){\n defer = function(id){\n global.postMessage(id + '', '*');\n };\n global.addEventListener('message', listner, false);\n // IE8-\n } else if(ONREADYSTATECHANGE in cel('script')){\n defer = function(id){\n html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){\n html.removeChild(this);\n run.call(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function(id){\n setTimeout(ctx(run, id, 1), 0);\n };\n }\n}\nmodule.exports = {\n set: setTask,\n clear: clearTask\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.task.js\n ** module id = 66\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.task.js?"); + eval("// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n var un = that === undefined;\n switch(args.length){\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.invoke.js\n ** module id = 66\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.invoke.js?"); /***/ }, /* 67 */ -/***/ function(module, exports) { +/***/ function(module, exports, __webpack_require__) { - eval("// fast apply, http://jsperf.lnkit.com/fast-apply/5\nmodule.exports = function(fn, args, that){\n var un = that === undefined;\n switch(args.length){\n case 0: return un ? fn()\n : fn.call(that);\n case 1: return un ? fn(args[0])\n : fn.call(that, args[0]);\n case 2: return un ? fn(args[0], args[1])\n : fn.call(that, args[0], args[1]);\n case 3: return un ? fn(args[0], args[1], args[2])\n : fn.call(that, args[0], args[1], args[2]);\n case 4: return un ? fn(args[0], args[1], args[2], args[3])\n : fn.call(that, args[0], args[1], args[2], args[3]);\n } return fn.apply(that, args);\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.invoke.js\n ** module id = 67\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.invoke.js?"); + eval("module.exports = __webpack_require__(13).document && document.documentElement;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.html.js\n ** module id = 67\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.html.js?"); /***/ }, /* 68 */ /***/ function(module, exports, __webpack_require__) { - eval("module.exports = __webpack_require__(13).document && document.documentElement;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.html.js\n ** module id = 68\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.html.js?"); + eval("var isObject = __webpack_require__(25)\n , document = __webpack_require__(13).document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.dom-create.js\n ** module id = 68\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.dom-create.js?"); /***/ }, /* 69 */ /***/ function(module, exports, __webpack_require__) { - eval("var isObject = __webpack_require__(23)\n , document = __webpack_require__(13).document\n // in old IE typeof document.createElement is 'object'\n , is = isObject(document) && isObject(document.createElement);\nmodule.exports = function(it){\n return is ? document.createElement(it) : {};\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.dom-create.js\n ** module id = 69\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.dom-create.js?"); + eval("var redefine = __webpack_require__(39);\nmodule.exports = function(target, src){\n for(var key in src)redefine(target, key, src[key]);\n return target;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.redefine-all.js\n ** module id = 69\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.redefine-all.js?"); /***/ }, /* 70 */ /***/ function(module, exports, __webpack_require__) { - eval("var $redef = __webpack_require__(39);\nmodule.exports = function(target, src){\n for(var key in src)$redef(target, key, src[key]);\n return target;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.mix.js\n ** module id = 70\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.mix.js?"); + eval("'use strict';\nvar core = __webpack_require__(14)\n , $ = __webpack_require__(5)\n , DESCRIPTORS = __webpack_require__(42)\n , SPECIES = __webpack_require__(47)('species');\n\nmodule.exports = function(KEY){\n var C = core[KEY];\n if(DESCRIPTORS && C && !C[SPECIES])$.setDesc(C, SPECIES, {\n configurable: true,\n get: function(){ return this; }\n });\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.set-species.js\n ** module id = 70\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.set-species.js?"); /***/ }, /* 71 */ /***/ function(module, exports, __webpack_require__) { - eval("var SYMBOL_ITERATOR = __webpack_require__(44)('iterator')\n , SAFE_CLOSING = false;\ntry {\n var riter = [7][SYMBOL_ITERATOR]();\n riter['return'] = function(){ SAFE_CLOSING = true; };\n Array.from(riter, function(){ throw 2; });\n} catch(e){ /* empty */ }\nmodule.exports = function(exec, skipClosing){\n if(!skipClosing && !SAFE_CLOSING)return false;\n var safe = false;\n try {\n var arr = [7]\n , iter = arr[SYMBOL_ITERATOR]();\n iter.next = function(){ safe = true; };\n arr[SYMBOL_ITERATOR] = function(){ return iter; };\n exec(arr);\n } catch(e){ /* empty */ }\n return safe;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.iter-detect.js\n ** module id = 71\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.iter-detect.js?"); + eval("var ITERATOR = __webpack_require__(47)('iterator')\n , SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function(){ SAFE_CLOSING = true; };\n Array.from(riter, function(){ throw 2; });\n} catch(e){ /* empty */ }\n\nmodule.exports = function(exec, skipClosing){\n if(!skipClosing && !SAFE_CLOSING)return false;\n var safe = false;\n try {\n var arr = [7]\n , iter = arr[ITERATOR]();\n iter.next = function(){ safe = true; };\n arr[ITERATOR] = function(){ return iter; };\n exec(arr);\n } catch(e){ /* empty */ }\n return safe;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.iter-detect.js\n ** module id = 71\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.iter-detect.js?"); /***/ }, /* 72 */ @@ -1647,7 +1647,7 @@ var ripple = /* 267 */ /***/ function(module, exports, __webpack_require__) { - eval("var __WEBPACK_AMD_DEFINE_RESULT__;/*! bignumber.js v2.0.8 https://github.com/MikeMcl/bignumber.js/LICENCE */\r\n\r\n;(function (global) {\r\n 'use strict';\r\n\r\n /*\r\n bignumber.js v2.0.8\r\n A JavaScript library for arbitrary-precision arithmetic.\r\n https://github.com/MikeMcl/bignumber.js\r\n Copyright (c) 2015 Michael Mclaughlin \r\n MIT Expat Licence\r\n */\r\n\r\n\r\n var BigNumber, crypto, parseNumeric,\r\n isNumeric = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n notBool = ' not a boolean or binary digit',\r\n roundingMode = 'rounding mode',\r\n tooManyDigits = 'number type has more than 15 significant digits',\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_',\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n /*\r\n * The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n * the arguments to toExponential, toFixed, toFormat, and toPrecision, beyond which an\r\n * exception is thrown (if ERRORS is true).\r\n */\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n /*\r\n * Create and return a BigNumber constructor.\r\n */\r\n function another(configObj) {\r\n var div,\r\n\r\n // id tracks the caller function, so its name can be included in error messages.\r\n id = 0,\r\n P = BigNumber.prototype,\r\n ONE = new BigNumber(1),\r\n\r\n\r\n /********************************* EDITABLE DEFAULTS **********************************/\r\n\r\n\r\n /*\r\n * The default values below must be integers within the inclusive ranges stated.\r\n * The values can also be changed at run-time using BigNumber.config.\r\n */\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n /*\r\n * The rounding mode used when rounding to the above decimal places, and when using\r\n * toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n * UP 0 Away from zero.\r\n * DOWN 1 Towards zero.\r\n * CEIL 2 Towards +Infinity.\r\n * FLOOR 3 Towards -Infinity.\r\n * HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n * HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n * HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n * HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n * HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n */\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether BigNumber Errors are ever thrown.\r\n ERRORS = true, // true or false\r\n\r\n // Change to intValidatorNoErrors if ERRORS is false.\r\n isValidInt = intValidatorWithErrors, // intValidatorWithErrors/intValidatorNoErrors\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n /*\r\n * The modulo mode used when calculating the modulus: a mod n.\r\n * The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n * The remainder (r) is calculated as: r = a - n * q.\r\n *\r\n * UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n * DOWN 1 The remainder has the same sign as the dividend.\r\n * This modulo mode is commonly known as 'truncated division' and is\r\n * equivalent to (a % n) in JavaScript.\r\n * FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n * HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n * EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n * The remainder is always positive.\r\n *\r\n * The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n * modes are commonly used for the modulus operation.\r\n * Although the other rounding modes can also be used, they may not give useful results.\r\n */\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the toPower operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 100, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n decimalSeparator: '.',\r\n groupSeparator: ',',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n fractionGroupSize: 0\r\n };\r\n\r\n\r\n /******************************************************************************************/\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * n {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of n. Integer, 2 to 64 inclusive.\r\n */\r\n function BigNumber( n, b ) {\r\n var c, e, i, num, len, str,\r\n x = this;\r\n\r\n // Enable constructor usage without new.\r\n if ( !( x instanceof BigNumber ) ) {\r\n\r\n // 'BigNumber() constructor call without new: {n}'\r\n if (ERRORS) raise( 26, 'constructor call without new', n );\r\n return new BigNumber( n, b );\r\n }\r\n\r\n // 'new BigNumber() base not an integer: {b}'\r\n // 'new BigNumber() base out of range: {b}'\r\n if ( b == null || !isValidInt( b, 2, 64, id, 'base' ) ) {\r\n\r\n // Duplicate.\r\n if ( n instanceof BigNumber ) {\r\n x.s = n.s;\r\n x.e = n.e;\r\n x.c = ( n = n.c ) ? n.slice() : n;\r\n id = 0;\r\n return;\r\n }\r\n\r\n if ( ( num = typeof n == 'number' ) && n * 0 == 0 ) {\r\n x.s = 1 / n < 0 ? ( n = -n, -1 ) : 1;\r\n\r\n // Fast path for integers.\r\n if ( n === ~~n ) {\r\n for ( e = 0, i = n; i >= 10; i /= 10, e++ );\r\n x.e = e;\r\n x.c = [n];\r\n id = 0;\r\n return;\r\n }\r\n\r\n str = n + '';\r\n } else {\r\n if ( !isNumeric.test( str = n + '' ) ) return parseNumeric( x, str, num );\r\n x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1;\r\n }\r\n } else {\r\n b = b | 0;\r\n str = n + '';\r\n\r\n // Ensure return value is rounded to DECIMAL_PLACES as with other bases.\r\n // Allow exponential notation to be used with base 10 argument.\r\n if ( b == 10 ) {\r\n x = new BigNumber( n instanceof BigNumber ? n : str );\r\n return round( x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE );\r\n }\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n // Any number in exponential form will fail due to the [Ee][+-].\r\n if ( ( num = typeof n == 'number' ) && n * 0 != 0 ||\r\n !( new RegExp( '^-?' + ( c = '[' + ALPHABET.slice( 0, b ) + ']+' ) +\r\n '(?:\\\\.' + c + ')?$',b < 37 ? 'i' : '' ) ).test(str) ) {\r\n return parseNumeric( x, str, num, b );\r\n }\r\n\r\n if (num) {\r\n x.s = 1 / n < 0 ? ( str = str.slice(1), -1 ) : 1;\r\n\r\n if ( ERRORS && str.replace( /^0\\.0*|\\./, '' ).length > 15 ) {\r\n\r\n // 'new BigNumber() number type has more than 15 significant digits: {n}'\r\n raise( id, tooManyDigits, n );\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n num = false;\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1;\r\n }\r\n\r\n str = convertBase( str, 10, b, x.s );\r\n }\r\n\r\n // Decimal point?\r\n if ( ( e = str.indexOf('.') ) > -1 ) str = str.replace( '.', '' );\r\n\r\n // Exponential form?\r\n if ( ( i = str.search( /e/i ) ) > 0 ) {\r\n\r\n // Determine exponent.\r\n if ( e < 0 ) e = i;\r\n e += +str.slice( i + 1 );\r\n str = str.substring( 0, i );\r\n } else if ( e < 0 ) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for ( i = 0; str.charCodeAt(i) === 48; i++ );\r\n\r\n // Determine trailing zeros.\r\n for ( len = str.length; str.charCodeAt(--len) === 48; );\r\n str = str.slice( i, len + 1 );\r\n\r\n if (str) {\r\n len = str.length;\r\n\r\n // Disallow numbers with over 15 significant digits if number type.\r\n // 'new BigNumber() number type has more than 15 significant digits: {n}'\r\n if ( num && ERRORS && len > 15 ) raise( id, tooManyDigits, x.s * n );\r\n\r\n e = e - i - 1;\r\n\r\n // Overflow?\r\n if ( e > MAX_EXP ) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if ( e < MIN_EXP ) {\r\n\r\n // Zero.\r\n x.c = [ x.e = 0 ];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = ( e + 1 ) % LOG_BASE;\r\n if ( e < 0 ) i += LOG_BASE;\r\n\r\n if ( i < len ) {\r\n if (i) x.c.push( +str.slice( 0, i ) );\r\n\r\n for ( len -= LOG_BASE; i < len; ) {\r\n x.c.push( +str.slice( i, i += LOG_BASE ) );\r\n }\r\n\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for ( ; i--; str += '0' );\r\n x.c.push( +str );\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [ x.e = 0 ];\r\n }\r\n\r\n id = 0;\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.another = another;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object or an argument list, with one or many of the following properties or\r\n * parameters respectively:\r\n *\r\n * DECIMAL_PLACES {number} Integer, 0 to MAX inclusive\r\n * ROUNDING_MODE {number} Integer, 0 to 8 inclusive\r\n * EXPONENTIAL_AT {number|number[]} Integer, -MAX to MAX inclusive or\r\n * [integer -MAX to 0 incl., 0 to MAX incl.]\r\n * RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n * [integer -MAX to -1 incl., integer 1 to MAX incl.]\r\n * ERRORS {boolean|number} true, false, 1 or 0\r\n * CRYPTO {boolean|number} true, false, 1 or 0\r\n * MODULO_MODE {number} 0 to 9 inclusive\r\n * POW_PRECISION {number} 0 to MAX inclusive\r\n * FORMAT {object} See BigNumber.prototype.toFormat\r\n * decimalSeparator {string}\r\n * groupSeparator {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * fractionGroupSize {number}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config(20, 4) is equivalent to\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined.\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = function () {\r\n var v, p,\r\n i = 0,\r\n r = {},\r\n a = arguments,\r\n o = a[0],\r\n has = o && typeof o == 'object'\r\n ? function () { if ( o.hasOwnProperty(p) ) return ( v = o[p] ) != null; }\r\n : function () { if ( a.length > i ) return ( v = a[i++] ) != null; };\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // 'config() DECIMAL_PLACES not an integer: {v}'\r\n // 'config() DECIMAL_PLACES out of range: {v}'\r\n if ( has( p = 'DECIMAL_PLACES' ) && isValidInt( v, 0, MAX, 2, p ) ) {\r\n DECIMAL_PLACES = v | 0;\r\n }\r\n r[p] = DECIMAL_PLACES;\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // 'config() ROUNDING_MODE not an integer: {v}'\r\n // 'config() ROUNDING_MODE out of range: {v}'\r\n if ( has( p = 'ROUNDING_MODE' ) && isValidInt( v, 0, 8, 2, p ) ) {\r\n ROUNDING_MODE = v | 0;\r\n }\r\n r[p] = ROUNDING_MODE;\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // 'config() EXPONENTIAL_AT not an integer: {v}'\r\n // 'config() EXPONENTIAL_AT out of range: {v}'\r\n if ( has( p = 'EXPONENTIAL_AT' ) ) {\r\n\r\n if ( isArray(v) ) {\r\n if ( isValidInt( v[0], -MAX, 0, 2, p ) && isValidInt( v[1], 0, MAX, 2, p ) ) {\r\n TO_EXP_NEG = v[0] | 0;\r\n TO_EXP_POS = v[1] | 0;\r\n }\r\n } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) {\r\n TO_EXP_NEG = -( TO_EXP_POS = ( v < 0 ? -v : v ) | 0 );\r\n }\r\n }\r\n r[p] = [ TO_EXP_NEG, TO_EXP_POS ];\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // 'config() RANGE not an integer: {v}'\r\n // 'config() RANGE cannot be zero: {v}'\r\n // 'config() RANGE out of range: {v}'\r\n if ( has( p = 'RANGE' ) ) {\r\n\r\n if ( isArray(v) ) {\r\n if ( isValidInt( v[0], -MAX, -1, 2, p ) && isValidInt( v[1], 1, MAX, 2, p ) ) {\r\n MIN_EXP = v[0] | 0;\r\n MAX_EXP = v[1] | 0;\r\n }\r\n } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) {\r\n if ( v | 0 ) MIN_EXP = -( MAX_EXP = ( v < 0 ? -v : v ) | 0 );\r\n else if (ERRORS) raise( 2, p + ' cannot be zero', v );\r\n }\r\n }\r\n r[p] = [ MIN_EXP, MAX_EXP ];\r\n\r\n // ERRORS {boolean|number} true, false, 1 or 0.\r\n // 'config() ERRORS not a boolean or binary digit: {v}'\r\n if ( has( p = 'ERRORS' ) ) {\r\n\r\n if ( v === !!v || v === 1 || v === 0 ) {\r\n id = 0;\r\n isValidInt = ( ERRORS = !!v ) ? intValidatorWithErrors : intValidatorNoErrors;\r\n } else if (ERRORS) {\r\n raise( 2, p + notBool, v );\r\n }\r\n }\r\n r[p] = ERRORS;\r\n\r\n // CRYPTO {boolean|number} true, false, 1 or 0.\r\n // 'config() CRYPTO not a boolean or binary digit: {v}'\r\n // 'config() crypto unavailable: {crypto}'\r\n if ( has( p = 'CRYPTO' ) ) {\r\n\r\n if ( v === !!v || v === 1 || v === 0 ) {\r\n CRYPTO = !!( v && crypto && typeof crypto == 'object' );\r\n if ( v && !CRYPTO && ERRORS ) raise( 2, 'crypto unavailable', crypto );\r\n } else if (ERRORS) {\r\n raise( 2, p + notBool, v );\r\n }\r\n }\r\n r[p] = CRYPTO;\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // 'config() MODULO_MODE not an integer: {v}'\r\n // 'config() MODULO_MODE out of range: {v}'\r\n if ( has( p = 'MODULO_MODE' ) && isValidInt( v, 0, 9, 2, p ) ) {\r\n MODULO_MODE = v | 0;\r\n }\r\n r[p] = MODULO_MODE;\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // 'config() POW_PRECISION not an integer: {v}'\r\n // 'config() POW_PRECISION out of range: {v}'\r\n if ( has( p = 'POW_PRECISION' ) && isValidInt( v, 0, MAX, 2, p ) ) {\r\n POW_PRECISION = v | 0;\r\n }\r\n r[p] = POW_PRECISION;\r\n\r\n // FORMAT {object}\r\n // 'config() FORMAT not an object: {v}'\r\n if ( has( p = 'FORMAT' ) ) {\r\n\r\n if ( typeof v == 'object' ) {\r\n FORMAT = v;\r\n } else if (ERRORS) {\r\n raise( 2, p + ' not an object', v );\r\n }\r\n }\r\n r[p] = FORMAT;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.max = function () { return maxOrMin( arguments, P.lt ); };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.min = function () { return maxOrMin( arguments, P.gt ); };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * 'random() decimal places not an integer: {dp}'\r\n * 'random() decimal places out of range: {dp}'\r\n * 'random() crypto unavailable: {crypto}'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor( Math.random() * pow2_53 ); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n dp = dp == null || !isValidInt( dp, 0, MAX, 14 ) ? DECIMAL_PLACES : dp | 0;\r\n k = mathceil( dp / LOG_BASE );\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if ( crypto && crypto.getRandomValues ) {\r\n\r\n a = crypto.getRandomValues( new Uint32Array( k *= 2 ) );\r\n\r\n for ( ; i < k; ) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if ( v >= 9e15 ) {\r\n b = crypto.getRandomValues( new Uint32Array(2) );\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push( v % 1e14 );\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if ( crypto && crypto.randomBytes ) {\r\n\r\n // buffer\r\n a = crypto.randomBytes( k *= 7 );\r\n\r\n for ( ; i < k; ) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ( ( a[i] & 31 ) * 0x1000000000000 ) + ( a[i + 1] * 0x10000000000 ) +\r\n ( a[i + 2] * 0x100000000 ) + ( a[i + 3] * 0x1000000 ) +\r\n ( a[i + 4] << 16 ) + ( a[i + 5] << 8 ) + a[i + 6];\r\n\r\n if ( v >= 9e15 ) {\r\n crypto.randomBytes(7).copy( a, i );\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push( v % 1e14 );\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else if (ERRORS) {\r\n raise( 14, 'crypto unavailable', crypto );\r\n }\r\n }\r\n\r\n // Use Math.random: CRYPTO is false or crypto is unavailable and ERRORS is false.\r\n if (!i) {\r\n\r\n for ( ; i < k; ) {\r\n v = random53bitInt();\r\n if ( v < 9e15 ) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if ( k && dp ) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor( k / v ) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for ( ; c[i] === 0; c.pop(), i-- );\r\n\r\n // Zero?\r\n if ( i < 0 ) {\r\n c = [ e = 0 ];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for ( e = -1 ; c[0] === 0; c.shift(), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for ( i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if ( i < LOG_BASE ) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n function convertBase( str, baseOut, baseIn, sign ) {\r\n var d, e, k, r, x, xc, y,\r\n i = str.indexOf( '.' ),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n if ( baseIn < 37 ) str = str.toLowerCase();\r\n\r\n // Non-integer.\r\n if ( i >= 0 ) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace( '.', '' );\r\n y = new BigNumber(baseIn);\r\n x = y.pow( str.length - i );\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n y.c = toBaseOut( toFixedPoint( coeffToString( x.c ), x.e ), 10, baseOut );\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n xc = toBaseOut( str, baseIn, baseOut );\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for ( ; xc[--k] == 0; xc.pop() );\r\n if ( !xc[0] ) return '0';\r\n\r\n if ( i < 0 ) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div( x, y, dp, rm, baseOut );\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n d = e + dp + 1;\r\n\r\n // The rounding digit, i.e. the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? ( i != null || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) )\r\n : i > k || i == k &&( rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == ( x.s < 0 ? 8 : 7 ) );\r\n\r\n if ( d < 1 || !xc[0] ) {\r\n\r\n // 1^-dp or 0.\r\n str = r ? toFixedPoint( '1', -dp ) : '0';\r\n } else {\r\n xc.length = d;\r\n\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for ( --baseOut; ++xc[--d] > baseOut; ) {\r\n xc[d] = 0;\r\n\r\n if ( !d ) {\r\n ++e;\r\n xc.unshift(1);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for ( k = xc.length; !xc[--k]; );\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for ( i = 0, str = ''; i <= k; str += ALPHABET.charAt( xc[i++] ) );\r\n str = toFixedPoint( str, e );\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n }\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply( x, k, base ) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for ( x = x.slice(); i--; ) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ( ( m % SQRT_BASE ) * SQRT_BASE ) + carry;\r\n carry = ( temp / base | 0 ) + ( m / SQRT_BASE | 0 ) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x.unshift(carry);\r\n\r\n return x;\r\n }\r\n\r\n function compare( a, b, aL, bL ) {\r\n var i, cmp;\r\n\r\n if ( aL != bL ) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for ( i = cmp = 0; i < aL; i++ ) {\r\n\r\n if ( a[i] != b[i] ) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n return cmp;\r\n }\r\n\r\n function subtract( a, b, aL, base ) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for ( ; aL--; ) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for ( ; !a[0] && a.length > 1; a.shift() );\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function ( x, y, dp, rm, base ) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if ( !xc || !xc[0] || !yc || !yc[0] ) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || ( xc ? yc && xc[0] == yc[0] : !yc ) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if ( !base ) {\r\n base = BASE;\r\n e = bitFloor( x.e / LOG_BASE ) - bitFloor( y.e / LOG_BASE );\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for ( i = 0; yc[i] == ( xc[i] || 0 ); i++ );\r\n if ( yc[i] > ( xc[i] || 0 ) ) e--;\r\n\r\n if ( s < 0 ) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor( base / ( yc[0] + 1 ) );\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == ( base / 2 ) - 1.\r\n // if ( n > 1 || n++ == 1 && yc[0] < base / 2 ) {\r\n if ( n > 1 ) {\r\n yc = multiply( yc, n, base );\r\n xc = multiply( xc, n, base );\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice( 0, yL );\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for ( ; remL < yL; rem[remL++] = 0 );\r\n yz = yc.slice();\r\n yz.unshift(0);\r\n yc0 = yc[0];\r\n if ( yc[1] >= base / 2 ) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if ( base == 3 && yc0 == 1 ) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare( yc, rem, yL, remL );\r\n\r\n // If divisor < remainder.\r\n if ( cmp < 0 ) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if ( yL != remL ) rem0 = rem0 * base + ( rem[1] || 0 );\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor( rem0 / yc0 );\r\n\r\n // Algorithm:\r\n // 1. product = divisor * trial digit (n)\r\n // 2. if product > remainder: product -= divisor, n--\r\n // 3. remainder -= product\r\n // 4. if product was < remainder at 2:\r\n // 5. compare new remainder and divisor\r\n // 6. If remainder > divisor: remainder -= divisor, n++\r\n\r\n if ( n > 1 ) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply( yc, n, base );\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder.\r\n // Trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while ( compare( prod, rem, prodL, remL ) == 1 ) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract( prod, yL < prodL ? yz : yc, prodL, base );\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if ( n == 0 ) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if ( prodL < remL ) prod.unshift(0);\r\n\r\n // Subtract product from remainder.\r\n subtract( rem, prod, remL, base );\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if ( cmp == -1 ) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while ( compare( yc, rem, yL, remL ) < 1 ) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract( rem, yL < remL ? yz : yc, remL, base );\r\n remL = rem.length;\r\n }\r\n }\r\n } else if ( cmp === 0 ) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if ( rem[0] ) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [ xc[xi] ];\r\n remL = 1;\r\n }\r\n } while ( ( xi++ < xL || rem[0] != null ) && s-- );\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if ( !qc[0] ) qc.shift();\r\n }\r\n\r\n if ( base == BASE ) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for ( i = 1, s = qc[0]; s >= 10; s /= 10, i++ );\r\n round( q, dp + ( q.e = i + e * LOG_BASE - 1 ) + 1, rm, more );\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n is a BigNumber.\r\n * i is the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm is the rounding mode.\r\n * caller is caller id: toExponential 19, toFixed 20, toFormat 21, toPrecision 24.\r\n */\r\n function format( n, i, rm, caller ) {\r\n var c0, e, ne, len, str;\r\n\r\n rm = rm != null && isValidInt( rm, 0, 8, caller, roundingMode )\r\n ? rm | 0 : ROUNDING_MODE;\r\n\r\n if ( !n.c ) return n.toString();\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if ( i == null ) {\r\n str = coeffToString( n.c );\r\n str = caller == 19 || caller == 24 && ne <= TO_EXP_NEG\r\n ? toExponential( str, ne )\r\n : toFixedPoint( str, ne );\r\n } else {\r\n n = round( new BigNumber(n), i, rm );\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString( n.c );\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if ( caller == 19 || caller == 24 && ( i <= e || e <= TO_EXP_NEG ) ) {\r\n\r\n // Append zeros?\r\n for ( ; len < i; str += '0', len++ );\r\n str = toExponential( str, e );\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint( str, e );\r\n\r\n // Append zeros?\r\n if ( e + 1 > len ) {\r\n if ( --i > 0 ) for ( str += '.'; i--; str += '0' );\r\n } else {\r\n i += e - len;\r\n if ( i > 0 ) {\r\n if ( e + 1 == len ) str += '.';\r\n for ( ; i--; str += '0' );\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n function maxOrMin( args, method ) {\r\n var m, n,\r\n i = 0;\r\n\r\n if ( isArray( args[0] ) ) args = args[0];\r\n m = new BigNumber( args[0] );\r\n\r\n for ( ; ++i < args.length; ) {\r\n n = new BigNumber( args[i] );\r\n\r\n // If any number is NaN, return NaN.\r\n if ( !n.s ) {\r\n m = n;\r\n break;\r\n } else if ( method.call( m, n ) ) {\r\n m = n;\r\n }\r\n }\r\n\r\n return m;\r\n }\r\n\r\n\r\n /*\r\n * Return true if n is an integer in range, otherwise throw.\r\n * Use for argument validation when ERRORS is true.\r\n */\r\n function intValidatorWithErrors( n, min, max, caller, name ) {\r\n if ( n < min || n > max || n != truncate(n) ) {\r\n raise( caller, ( name || 'decimal places' ) +\r\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n }\r\n\r\n return true;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise( n, c, e ) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for ( ; !c[--j]; c.pop() );\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for ( j = c[0]; j >= 10; j /= 10, i++ );\r\n\r\n // Overflow?\r\n if ( ( e = i + e * LOG_BASE - 1 ) > MAX_EXP ) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if ( e < MIN_EXP ) {\r\n\r\n // Zero.\r\n n.c = [ n.e = 0 ];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function ( x, str, num, b ) {\r\n var base,\r\n s = num ? str : str.replace( whitespaceOrPlus, '' );\r\n\r\n // No exception on ±Infinity or NaN.\r\n if ( isInfinityOrNaN.test(s) ) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if ( !num ) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace( basePrefix, function ( m, p1, p2 ) {\r\n base = ( p2 = p2.toLowerCase() ) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace( dotAfter, '$1' ).replace( dotBefore, '0.$1' );\r\n }\r\n\r\n if ( str != s ) return new BigNumber( s, base );\r\n }\r\n\r\n // 'new BigNumber() not a number: {n}'\r\n // 'new BigNumber() not a base {b} number: {n}'\r\n if (ERRORS) raise( id, 'not a' + ( b ? ' base ' + b : '' ) + ' number', str );\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n id = 0;\r\n }\r\n })();\r\n\r\n\r\n // Throw a BigNumber Error.\r\n function raise( caller, msg, val ) {\r\n var error = new Error( [\r\n 'new BigNumber', // 0\r\n 'cmp', // 1\r\n 'config', // 2\r\n 'div', // 3\r\n 'divToInt', // 4\r\n 'eq', // 5\r\n 'gt', // 6\r\n 'gte', // 7\r\n 'lt', // 8\r\n 'lte', // 9\r\n 'minus', // 10\r\n 'mod', // 11\r\n 'plus', // 12\r\n 'precision', // 13\r\n 'random', // 14\r\n 'round', // 15\r\n 'shift', // 16\r\n 'times', // 17\r\n 'toDigits', // 18\r\n 'toExponential', // 19\r\n 'toFixed', // 20\r\n 'toFormat', // 21\r\n 'toFraction', // 22\r\n 'pow', // 23\r\n 'toPrecision', // 24\r\n 'toString', // 25\r\n 'BigNumber' // 26\r\n ][caller] + '() ' + msg + ': ' + val );\r\n\r\n error.name = 'BigNumber Error';\r\n id = 0;\r\n throw error;\r\n }\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round( x, sd, rm, r ) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for ( d = 1, k = xc[0]; k >= 10; k /= 10, d++ );\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if ( i < 0 ) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ ni = 0 ];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = n / pows10[ d - j - 1 ] % 10 | 0;\r\n } else {\r\n ni = mathceil( ( i + 1 ) / LOG_BASE );\r\n\r\n if ( ni >= xc.length ) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for ( ; xc.length <= ni; xc.push(0) );\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for ( d = 1; k >= 10; k /= 10, d++ );\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : n / pows10[ d - j - 1 ] % 10 | 0;\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[ d - j - 1 ] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || ( j < 0 ? n : n % pows10[ d - j - 1 ] );\r\n\r\n r = rm < 4\r\n ? ( rd || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) )\r\n : rd > 5 || rd == 5 && ( rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ( ( i > 0 ? j > 0 ? n / pows10[ d - j ] : 0 : xc[ni - 1] ) % 10 ) & 1 ||\r\n rm == ( x.s < 0 ? 8 : 7 ) );\r\n\r\n if ( sd < 1 || !xc[0] ) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[ ( LOG_BASE - sd % LOG_BASE ) % LOG_BASE ];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if ( i == 0 ) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[ LOG_BASE - i ];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor( n / pows10[ d - j ] % pows10[j] ) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for ( ; ; ) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if ( ni == 0 ) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for ( i = 1, j = xc[0]; j >= 10; j /= 10, i++ );\r\n j = xc[0] += k;\r\n for ( k = 1; j >= 10; j /= 10, k++ );\r\n\r\n // if i != k the length has increased.\r\n if ( i != k ) {\r\n x.e++;\r\n if ( xc[0] == BASE ) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if ( xc[ni] != BASE ) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for ( i = xc.length; xc[--i] === 0; xc.pop() );\r\n }\r\n\r\n // Overflow? Infinity.\r\n if ( x.e > MAX_EXP ) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if ( x.e < MIN_EXP ) {\r\n x.c = [ x.e = 0 ];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if ( x.s < 0 ) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole\r\n * number in the direction of Infinity.\r\n */\r\n P.ceil = function () {\r\n return round( new BigNumber(this), this.e + 1, 2 );\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = P.cmp = function ( y, b ) {\r\n id = 1;\r\n return compare( this, new BigNumber( y, b ) );\r\n };\r\n\r\n\r\n /*\r\n * Return the number of decimal places of the value of this BigNumber, or null if the value\r\n * of this BigNumber is ±Infinity or NaN.\r\n */\r\n P.decimalPlaces = P.dp = function () {\r\n var n, v,\r\n c = this.c;\r\n\r\n if ( !c ) return null;\r\n n = ( ( v = c.length - 1 ) - bitFloor( this.e / LOG_BASE ) ) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if ( v = c[v] ) for ( ; v % 10 == 0; v /= 10, n-- );\r\n if ( n < 0 ) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function ( y, b ) {\r\n id = 3;\r\n return div( this, new BigNumber( y, b ), DECIMAL_PLACES, ROUNDING_MODE );\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.divToInt = function ( y, b ) {\r\n id = 4;\r\n return div( this, new BigNumber( y, b ), 0, 1 );\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise returns false.\r\n */\r\n P.equals = P.eq = function ( y, b ) {\r\n id = 5;\r\n return compare( this, new BigNumber( y, b ) ) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole\r\n * number in the direction of -Infinity.\r\n */\r\n P.floor = function () {\r\n return round( new BigNumber(this), this.e + 1, 3 );\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise returns false.\r\n */\r\n P.greaterThan = P.gt = function ( y, b ) {\r\n id = 6;\r\n return compare( this, new BigNumber( y, b ) ) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise returns false.\r\n */\r\n P.greaterThanOrEqualTo = P.gte = function ( y, b ) {\r\n id = 7;\r\n return ( b = compare( this, new BigNumber( y, b ) ) ) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise returns false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = P.isInt = function () {\r\n return !!this.c && bitFloor( this.e / LOG_BASE ) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise returns false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise returns false.\r\n */\r\n P.isNegative = P.isNeg = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise returns false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise returns false.\r\n */\r\n P.lessThan = P.lt = function ( y, b ) {\r\n id = 8;\r\n return compare( this, new BigNumber( y, b ) ) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise returns false.\r\n */\r\n P.lessThanOrEqualTo = P.lte = function ( y, b ) {\r\n id = 9;\r\n return ( b = compare( this, new BigNumber( y, b ) ) ) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = P.sub = function ( y, b ) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n id = 10;\r\n y = new BigNumber( y, b );\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if ( !a || !b ) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if ( a != b ) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if ( !xe || !ye ) {\r\n\r\n // Either Infinity?\r\n if ( !xc || !yc ) return xc ? ( y.s = -b, y ) : new BigNumber( yc ? x : NaN );\r\n\r\n // Either zero?\r\n if ( !xc[0] || !yc[0] ) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? ( y.s = -b, y ) : new BigNumber( xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0 );\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if ( a = xe - ye ) {\r\n\r\n if ( xLTy = a < 0 ) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for ( b = a; b--; t.push(0) );\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = ( xLTy = ( a = xc.length ) < ( b = yc.length ) ) ? a : b;\r\n\r\n for ( a = b = 0; b < j; b++ ) {\r\n\r\n if ( xc[b] != yc[b] ) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;\r\n\r\n b = ( j = yc.length ) - ( i = xc.length );\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if ( b > 0 ) for ( ; b--; xc[i++] = 0 );\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for ( ; j > a; ) {\r\n\r\n if ( xc[--j] < yc[j] ) {\r\n for ( i = j; i && !xc[--i]; xc[i] = b );\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for ( ; xc[0] == 0; xc.shift(), --ye );\r\n\r\n // Zero?\r\n if ( !xc[0] ) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [ y.e = 0 ];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise( y, xc, ye );\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function ( y, b ) {\r\n var q, s,\r\n x = this;\r\n\r\n id = 11;\r\n y = new BigNumber( y, b );\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if ( !x.c || !y.s || y.c && !y.c[0] ) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if ( !y.c || x.c && !x.c[0] ) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if ( MODULO_MODE == 9 ) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div( x, y, 0, 3 );\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div( x, y, 0, MODULO_MODE );\r\n }\r\n\r\n return x.minus( q.times(y) );\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = P.neg = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = P.add = function ( y, b ) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n id = 12;\r\n y = new BigNumber( y, b );\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if ( !a || !b ) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if ( a != b ) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if ( !xe || !ye ) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if ( !xc || !yc ) return new BigNumber( a / 0 );\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if ( !xc[0] || !yc[0] ) return yc[0] ? y : new BigNumber( xc[0] ? x : a * 0 );\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if ( a = xe - ye ) {\r\n if ( a > 0 ) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for ( ; a--; t.push(0) );\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if ( a - b < 0 ) t = yc, yc = xc, xc = t, b = a;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for ( a = 0; b; ) {\r\n a = ( xc[--b] = xc[b] + yc[b] + a ) / BASE | 0;\r\n xc[b] %= BASE;\r\n }\r\n\r\n if (a) {\r\n xc.unshift(a);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise( y, xc, ye );\r\n };\r\n\r\n\r\n /*\r\n * Return the number of significant digits of the value of this BigNumber.\r\n *\r\n * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.\r\n */\r\n P.precision = P.sd = function (z) {\r\n var n, v,\r\n x = this,\r\n c = x.c;\r\n\r\n // 'precision() argument not a boolean or binary digit: {z}'\r\n if ( z != null && z !== !!z && z !== 1 && z !== 0 ) {\r\n if (ERRORS) raise( 13, 'argument' + notBool, z );\r\n if ( z != !!z ) z = null;\r\n }\r\n\r\n if ( !c ) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if ( v = c[v] ) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for ( ; v % 10 == 0; v /= 10, n-- );\r\n\r\n // Add the number of digits of the first element.\r\n for ( v = c[0]; v >= 10; v /= 10, n++ );\r\n }\r\n\r\n if ( z && x.e + 1 > n ) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of\r\n * dp decimal places using rounding mode rm, or to 0 and ROUNDING_MODE respectively if\r\n * omitted.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'round() decimal places out of range: {dp}'\r\n * 'round() decimal places not an integer: {dp}'\r\n * 'round() rounding mode not an integer: {rm}'\r\n * 'round() rounding mode out of range: {rm}'\r\n */\r\n P.round = function ( dp, rm ) {\r\n var n = new BigNumber(this);\r\n\r\n if ( dp == null || isValidInt( dp, 0, MAX, 15 ) ) {\r\n round( n, ~~dp + this.e + 1, rm == null ||\r\n !isValidInt( rm, 0, 8, 15, roundingMode ) ? ROUNDING_MODE : rm | 0 );\r\n }\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * If k is out of range and ERRORS is false, the result will be ±0 if k < 0, or ±Infinity\r\n * otherwise.\r\n *\r\n * 'shift() argument not an integer: {k}'\r\n * 'shift() argument out of range: {k}'\r\n */\r\n P.shift = function (k) {\r\n var n = this;\r\n return isValidInt( k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 16, 'argument' )\r\n\r\n // k < 1e+21, or truncate(k) will produce exponential notation.\r\n ? n.times( '1e' + truncate(k) )\r\n : new BigNumber( n.c && n.c[0] && ( k < -MAX_SAFE_INTEGER || k > MAX_SAFE_INTEGER )\r\n ? n.s * ( k < 0 ? 0 : 1 / 0 )\r\n : n );\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt( N) = N\r\n * sqrt(-I) = N\r\n * sqrt( I) = I\r\n * sqrt( 0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if ( s !== 1 || !c || !c[0] ) {\r\n return new BigNumber( !s || s < 0 && ( !c || c[0] ) ? NaN : c ? x : 1 / 0 );\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt( +x );\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if ( s == 0 || s == 1 / 0 ) {\r\n n = coeffToString(c);\r\n if ( ( n.length + e ) % 2 == 0 ) n += '0';\r\n s = Math.sqrt(n);\r\n e = bitFloor( ( e + 1 ) / 2 ) - ( e < 0 || e % 2 );\r\n\r\n if ( s == 1 / 0 ) {\r\n n = '1e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice( 0, n.indexOf('e') + 1 ) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber( s + '' );\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if ( r.c[0] ) {\r\n e = r.e;\r\n s = e + dp;\r\n if ( s < 3 ) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for ( ; ; ) {\r\n t = r;\r\n r = half.times( t.plus( div( x, t, dp, 1 ) ) );\r\n\r\n if ( coeffToString( t.c ).slice( 0, s ) === ( n =\r\n coeffToString( r.c ) ).slice( 0, s ) ) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if ( r.e < e ) --s;\r\n n = n.slice( s - 3, s + 1 );\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if ( n == '9999' || !rep && n == '4999' ) {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if ( !rep ) {\r\n round( t, t.e + DECIMAL_PLACES + 2, 0 );\r\n\r\n if ( t.times(t).eq(x) ) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if ( !+n || !+n.slice(1) && n.charAt(0) == '5' ) {\r\n\r\n // Truncate to the first rounding digit.\r\n round( r, r.e + DECIMAL_PLACES + 2, 1 );\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round( r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m );\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber times the value of\r\n * BigNumber(y, b).\r\n */\r\n P.times = P.mul = function ( y, b ) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = ( id = 17, y = new BigNumber( y, b ) ).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if ( !xc || !yc || !xc[0] || !yc[0] ) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if ( !x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc ) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if ( !xc || !yc ) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor( x.e / LOG_BASE ) + bitFloor( y.e / LOG_BASE );\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if ( xcL < ycL ) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;\r\n\r\n // Initialise the result array with zeros.\r\n for ( i = xcL + ycL, zc = []; i--; zc.push(0) );\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for ( i = ycL; --i >= 0; ) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for ( k = xcL, j = i + k; j > i; ) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ( ( m % sqrtBase ) * sqrtBase ) + zc[j] + c;\r\n c = ( xlo / base | 0 ) + ( m / sqrtBase | 0 ) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.shift();\r\n }\r\n\r\n return normalise( y, zc, e );\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of\r\n * sd significant digits using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toDigits() precision out of range: {sd}'\r\n * 'toDigits() precision not an integer: {sd}'\r\n * 'toDigits() rounding mode not an integer: {rm}'\r\n * 'toDigits() rounding mode out of range: {rm}'\r\n */\r\n P.toDigits = function ( sd, rm ) {\r\n var n = new BigNumber(this);\r\n sd = sd == null || !isValidInt( sd, 1, MAX, 18, 'precision' ) ? null : sd | 0;\r\n rm = rm == null || !isValidInt( rm, 0, 8, 18, roundingMode ) ? ROUNDING_MODE : rm | 0;\r\n return sd ? round( n, sd, rm ) : n;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toExponential() decimal places not an integer: {dp}'\r\n * 'toExponential() decimal places out of range: {dp}'\r\n * 'toExponential() rounding mode not an integer: {rm}'\r\n * 'toExponential() rounding mode out of range: {rm}'\r\n */\r\n P.toExponential = function ( dp, rm ) {\r\n return format( this,\r\n dp != null && isValidInt( dp, 0, MAX, 19 ) ? ~~dp + 1 : null, rm, 19 );\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toFixed() decimal places not an integer: {dp}'\r\n * 'toFixed() decimal places out of range: {dp}'\r\n * 'toFixed() rounding mode not an integer: {rm}'\r\n * 'toFixed() rounding mode out of range: {rm}'\r\n */\r\n P.toFixed = function ( dp, rm ) {\r\n return format( this, dp != null && isValidInt( dp, 0, MAX, 20 )\r\n ? ~~dp + this.e + 1 : null, rm, 20 );\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the FORMAT object (see BigNumber.config).\r\n *\r\n * FORMAT = {\r\n * decimalSeparator : '.',\r\n * groupSeparator : ',',\r\n * groupSize : 3,\r\n * secondaryGroupSize : 0,\r\n * fractionGroupSeparator : '\\xA0', // non-breaking space\r\n * fractionGroupSize : 0\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toFormat() decimal places not an integer: {dp}'\r\n * 'toFormat() decimal places out of range: {dp}'\r\n * 'toFormat() rounding mode not an integer: {rm}'\r\n * 'toFormat() rounding mode out of range: {rm}'\r\n */\r\n P.toFormat = function ( dp, rm ) {\r\n var str = format( this, dp != null && isValidInt( dp, 0, MAX, 21 )\r\n ? ~~dp + this.e + 1 : null, rm, 21 );\r\n\r\n if ( this.c ) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +FORMAT.groupSize,\r\n g2 = +FORMAT.secondaryGroupSize,\r\n groupSeparator = FORMAT.groupSeparator,\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = this.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) i = g1, g1 = g2, g2 = i, len -= i;\r\n\r\n if ( g1 > 0 && len > 0 ) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr( 0, i );\r\n\r\n for ( ; i < len; i += g1 ) {\r\n intPart += groupSeparator + intDigits.substr( i, g1 );\r\n }\r\n\r\n if ( g2 > 0 ) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + FORMAT.decimalSeparator + ( ( g2 = +FORMAT.fractionGroupSize )\r\n ? fractionPart.replace( new RegExp( '\\\\d{' + g2 + '}\\\\B', 'g' ),\r\n '$&' + FORMAT.fractionGroupSeparator )\r\n : fractionPart )\r\n : intPart;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return a string array representing the value of this BigNumber as a simple fraction with\r\n * an integer numerator and an integer denominator. The denominator will be a positive\r\n * non-zero value less than or equal to the specified maximum denominator. If a maximum\r\n * denominator is not specified, the denominator will be the lowest value necessary to\r\n * represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1 and < Infinity. The maximum denominator.\r\n *\r\n * 'toFraction() max denominator not an integer: {md}'\r\n * 'toFraction() max denominator out of range: {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var arr, d0, d2, e, exp, n, n0, q, s,\r\n k = ERRORS,\r\n x = this,\r\n xc = x.c,\r\n d = new BigNumber(ONE),\r\n n1 = d0 = new BigNumber(ONE),\r\n d1 = n0 = new BigNumber(ONE);\r\n\r\n if ( md != null ) {\r\n ERRORS = false;\r\n n = new BigNumber(md);\r\n ERRORS = k;\r\n\r\n if ( !( k = n.isInt() ) || n.lt(ONE) ) {\r\n\r\n if (ERRORS) {\r\n raise( 22,\r\n 'max denominator ' + ( k ? 'out of range' : 'not an integer' ), md );\r\n }\r\n\r\n // ERRORS is false:\r\n // If md is a finite non-integer >= 1, round it to an integer and use it.\r\n md = !k && n.c && round( n, n.e + 1, 1 ).gte(ONE) ? n : null;\r\n }\r\n }\r\n\r\n if ( !xc ) return x.toString();\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[ ( exp = e % LOG_BASE ) < 0 ? LOG_BASE + exp : exp ];\r\n md = !md || n.cmp(d) > 0 ? ( e > 0 ? d : n1 ) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for ( ; ; ) {\r\n q = div( n, d, 0, 1 );\r\n d2 = d0.plus( q.times(d1) );\r\n if ( d2.cmp(md) == 1 ) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus( q.times( d2 = n1 ) );\r\n n0 = d2;\r\n d = n.minus( q.times( d2 = d ) );\r\n n = d2;\r\n }\r\n\r\n d2 = div( md.minus(d0), d1, 0, 1 );\r\n n0 = n0.plus( d2.times(n1) );\r\n d0 = d0.plus( d2.times(d1) );\r\n n0.s = n1.s = x.s;\r\n e *= 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n arr = div( n1, d1, e, ROUNDING_MODE ).minus(x).abs().cmp(\r\n div( n0, d0, e, ROUNDING_MODE ).minus(x).abs() ) < 1\r\n ? [ n1.toString(), d1.toString() ]\r\n : [ n0.toString(), d0.toString() ];\r\n\r\n MAX_EXP = exp;\r\n return arr;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +this;\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber raised to the power n.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is not 0, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * n {number} Integer, -9007199254740992 to 9007199254740992 inclusive.\r\n * (Performs 54 loop iterations for n of 9007199254740992.)\r\n *\r\n * 'pow() exponent not an integer: {n}'\r\n * 'pow() exponent out of range: {n}'\r\n */\r\n P.toPower = P.pow = function (n) {\r\n var k, y,\r\n i = mathfloor( n < 0 ? -n : +n ),\r\n x = this;\r\n\r\n // Pass ±Infinity to Math.pow if exponent is out of range.\r\n if ( !isValidInt( n, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 23, 'exponent' ) &&\r\n ( !isFinite(n) || i > MAX_SAFE_INTEGER && ( n /= 0 ) ||\r\n parseFloat(n) != n && !( n = NaN ) ) ) {\r\n return new BigNumber( Math.pow( +x, n ) );\r\n }\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication equates\r\n // to truncating significant digits to POW_PRECISION + [28, 41], i.e. there will be a\r\n // minimum of 28 guard digits retained. (Using + 1.5 would give [9, 21] guard digits.)\r\n k = POW_PRECISION ? mathceil( POW_PRECISION / LOG_BASE + 2 ) : 0;\r\n y = new BigNumber(ONE);\r\n\r\n for ( ; ; ) {\r\n\r\n if ( i % 2 ) {\r\n y = y.times(x);\r\n if ( !y.c ) break;\r\n if ( k && y.c.length > k ) y.c.length = k;\r\n }\r\n\r\n i = mathfloor( i / 2 );\r\n if ( !i ) break;\r\n\r\n x = x.times(x);\r\n if ( k && x.c && x.c.length > k ) x.c.length = k;\r\n }\r\n\r\n if ( n < 0 ) y = ONE.div(y);\r\n return k ? round( y, POW_PRECISION, ROUNDING_MODE ) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toPrecision() precision not an integer: {sd}'\r\n * 'toPrecision() precision out of range: {sd}'\r\n * 'toPrecision() rounding mode not an integer: {rm}'\r\n * 'toPrecision() rounding mode out of range: {rm}'\r\n */\r\n P.toPrecision = function ( sd, rm ) {\r\n return format( this, sd != null && isValidInt( sd, 1, MAX, 24, 'precision' )\r\n ? sd | 0 : null, rm, 24 );\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to 64 inclusive.\r\n *\r\n * 'toString() base not an integer: {b}'\r\n * 'toString() base out of range: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if ( e === null ) {\r\n\r\n if (s) {\r\n str = 'Infinity';\r\n if ( s < 0 ) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n str = coeffToString( n.c );\r\n\r\n if ( b == null || !isValidInt( b, 2, 64, 25, 'base' ) ) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential( str, e )\r\n : toFixedPoint( str, e );\r\n } else {\r\n str = convertBase( toFixedPoint( str, e ), b | 0, 10, s );\r\n }\r\n\r\n if ( s < 0 && n.c[0] ) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber truncated to a whole\r\n * number.\r\n */\r\n P.truncated = P.trunc = function () {\r\n return round( new BigNumber(this), this.e + 1, 1 );\r\n };\r\n\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n var str,\r\n n = this,\r\n e = n.e;\r\n\r\n if ( e === null ) return n.toString();\r\n\r\n str = coeffToString( n.c );\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential( str, e )\r\n : toFixedPoint( str, e );\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n };\r\n\r\n\r\n // Aliases for BigDecimal methods.\r\n //P.add = P.plus; // P.add included above\r\n //P.subtract = P.minus; // P.sub included above\r\n //P.multiply = P.times; // P.mul included above\r\n //P.divide = P.div;\r\n //P.remainder = P.mod;\r\n //P.compareTo = P.cmp;\r\n //P.negate = P.neg;\r\n\r\n\r\n if ( configObj != null ) BigNumber.config(configObj);\r\n\r\n return BigNumber;\r\n }\r\n\r\n\r\n // PRIVATE HELPER FUNCTIONS\r\n\r\n\r\n function bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n }\r\n\r\n\r\n // Return a coefficient array as a string of base 10 digits.\r\n function coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for ( ; i < j; ) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for ( ; z--; s = '0' + s );\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for ( j = r.length; r.charCodeAt(--j) === 48; );\r\n return r.slice( 0, j + 1 || 1 );\r\n }\r\n\r\n\r\n // Compare the value of BigNumbers x and y.\r\n function compare( x, y ) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if ( !i || !j ) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if ( a || b ) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if ( i != j ) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if ( !xc || !yc ) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if ( !b ) return k > l ^ a ? 1 : -1;\r\n\r\n j = ( k = xc.length ) < ( l = yc.length ) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for ( i = 0; i < j; i++ ) if ( xc[i] != yc[i] ) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }\r\n\r\n\r\n /*\r\n * Return true if n is a valid number in range, otherwise false.\r\n * Use for argument validation when ERRORS is false.\r\n * Note: parseInt('1e+1') == 1 but parseFloat('1e+1') == 10.\r\n */\r\n function intValidatorNoErrors( n, min, max ) {\r\n return ( n = truncate(n) ) >= min && n <= max;\r\n }\r\n\r\n\r\n function isArray(obj) {\r\n return Object.prototype.toString.call(obj) == '[object Array]';\r\n }\r\n\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. convertBase('255', 10, 16) returns [15, 15].\r\n * Eg. convertBase('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut( str, baseIn, baseOut ) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for ( ; i < len; ) {\r\n for ( arrL = arr.length; arrL--; arr[arrL] *= baseIn );\r\n arr[ j = 0 ] += ALPHABET.indexOf( str.charAt( i++ ) );\r\n\r\n for ( ; j < arr.length; j++ ) {\r\n\r\n if ( arr[j] > baseOut - 1 ) {\r\n if ( arr[j + 1] == null ) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n\r\n function toExponential( str, e ) {\r\n return ( str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str ) +\r\n ( e < 0 ? 'e' : 'e+' ) + e;\r\n }\r\n\r\n\r\n function toFixedPoint( str, e ) {\r\n var len, z;\r\n\r\n // Negative exponent?\r\n if ( e < 0 ) {\r\n\r\n // Prepend zeros.\r\n for ( z = '0.'; ++e; z += '0' );\r\n str = z + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if ( ++e > len ) {\r\n for ( z = '0', e -= len; --e; z += '0' );\r\n str += z;\r\n } else if ( e < len ) {\r\n str = str.slice( 0, e ) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n function truncate(n) {\r\n n = parseFloat(n);\r\n return n < 0 ? mathceil(n) : mathfloor(n);\r\n }\r\n\r\n\r\n // EXPORT\r\n\r\n\r\n BigNumber = another();\r\n\r\n // AMD.\r\n if ( true ) {\r\n !(__WEBPACK_AMD_DEFINE_RESULT__ = function () { return BigNumber; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\r\n // Node and other environments that support module.exports.\r\n } else if ( typeof module != 'undefined' && module.exports ) {\r\n module.exports = BigNumber;\r\n if ( !crypto ) try { crypto = require('crypto'); } catch (e) {}\r\n\r\n // Browser.\r\n } else {\r\n global.BigNumber = BigNumber;\r\n }\r\n})(this);\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bignumber.js/bignumber.js\n ** module id = 267\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/bignumber.js/bignumber.js?"); + eval("var __WEBPACK_AMD_DEFINE_RESULT__;/*! bignumber.js v2.1.2 https://github.com/MikeMcl/bignumber.js/LICENCE */\r\n\r\n;(function (global) {\r\n 'use strict';\r\n\r\n /*\r\n bignumber.js v2.1.2\r\n A JavaScript library for arbitrary-precision arithmetic.\r\n https://github.com/MikeMcl/bignumber.js\r\n Copyright (c) 2015 Michael Mclaughlin \r\n MIT Expat Licence\r\n */\r\n\r\n\r\n var BigNumber, parseNumeric,\r\n crypto = global.crypto,\r\n isNumeric = /^-?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,\r\n mathceil = Math.ceil,\r\n mathfloor = Math.floor,\r\n notBool = ' not a boolean or binary digit',\r\n roundingMode = 'rounding mode',\r\n tooManyDigits = 'number type has more than 15 significant digits',\r\n ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_',\r\n BASE = 1e14,\r\n LOG_BASE = 14,\r\n MAX_SAFE_INTEGER = 0x1fffffffffffff, // 2^53 - 1\r\n // MAX_INT32 = 0x7fffffff, // 2^31 - 1\r\n POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13],\r\n SQRT_BASE = 1e7,\r\n\r\n /*\r\n * The limit on the value of DECIMAL_PLACES, TO_EXP_NEG, TO_EXP_POS, MIN_EXP, MAX_EXP, and\r\n * the arguments to toExponential, toFixed, toFormat, and toPrecision, beyond which an\r\n * exception is thrown (if ERRORS is true).\r\n */\r\n MAX = 1E9; // 0 to MAX_INT32\r\n\r\n\r\n /*\r\n * Create and return a BigNumber constructor.\r\n */\r\n function another(configObj) {\r\n var div,\r\n\r\n // id tracks the caller function, so its name can be included in error messages.\r\n id = 0,\r\n P = BigNumber.prototype,\r\n ONE = new BigNumber(1),\r\n\r\n\r\n /********************************* EDITABLE DEFAULTS **********************************/\r\n\r\n\r\n /*\r\n * The default values below must be integers within the inclusive ranges stated.\r\n * The values can also be changed at run-time using BigNumber.config.\r\n */\r\n\r\n // The maximum number of decimal places for operations involving division.\r\n DECIMAL_PLACES = 20, // 0 to MAX\r\n\r\n /*\r\n * The rounding mode used when rounding to the above decimal places, and when using\r\n * toExponential, toFixed, toFormat and toPrecision, and round (default value).\r\n * UP 0 Away from zero.\r\n * DOWN 1 Towards zero.\r\n * CEIL 2 Towards +Infinity.\r\n * FLOOR 3 Towards -Infinity.\r\n * HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n * HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n * HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n * HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n * HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n */\r\n ROUNDING_MODE = 4, // 0 to 8\r\n\r\n // EXPONENTIAL_AT : [TO_EXP_NEG , TO_EXP_POS]\r\n\r\n // The exponent value at and beneath which toString returns exponential notation.\r\n // Number type: -7\r\n TO_EXP_NEG = -7, // 0 to -MAX\r\n\r\n // The exponent value at and above which toString returns exponential notation.\r\n // Number type: 21\r\n TO_EXP_POS = 21, // 0 to MAX\r\n\r\n // RANGE : [MIN_EXP, MAX_EXP]\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // Number type: -324 (5e-324)\r\n MIN_EXP = -1e7, // -1 to -MAX\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // Number type: 308 (1.7976931348623157e+308)\r\n // For MAX_EXP > 1e7, e.g. new BigNumber('1e100000000').plus(1) may be slow.\r\n MAX_EXP = 1e7, // 1 to MAX\r\n\r\n // Whether BigNumber Errors are ever thrown.\r\n ERRORS = true, // true or false\r\n\r\n // Change to intValidatorNoErrors if ERRORS is false.\r\n isValidInt = intValidatorWithErrors, // intValidatorWithErrors/intValidatorNoErrors\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n CRYPTO = false, // true or false\r\n\r\n /*\r\n * The modulo mode used when calculating the modulus: a mod n.\r\n * The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n * The remainder (r) is calculated as: r = a - n * q.\r\n *\r\n * UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n * DOWN 1 The remainder has the same sign as the dividend.\r\n * This modulo mode is commonly known as 'truncated division' and is\r\n * equivalent to (a % n) in JavaScript.\r\n * FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n * HALF_EVEN 6 This modulo mode implements the IEEE 754 remainder function.\r\n * EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)).\r\n * The remainder is always positive.\r\n *\r\n * The truncated division, floored division, Euclidian division and IEEE 754 remainder\r\n * modes are commonly used for the modulus operation.\r\n * Although the other rounding modes can also be used, they may not give useful results.\r\n */\r\n MODULO_MODE = 1, // 0 to 9\r\n\r\n // The maximum number of significant digits of the result of the toPower operation.\r\n // If POW_PRECISION is 0, there will be unlimited significant digits.\r\n POW_PRECISION = 100, // 0 to MAX\r\n\r\n // The format specification used by the BigNumber.prototype.toFormat method.\r\n FORMAT = {\r\n decimalSeparator: '.',\r\n groupSeparator: ',',\r\n groupSize: 3,\r\n secondaryGroupSize: 0,\r\n fractionGroupSeparator: '\\xA0', // non-breaking space\r\n fractionGroupSize: 0\r\n };\r\n\r\n\r\n /******************************************************************************************/\r\n\r\n\r\n // CONSTRUCTOR\r\n\r\n\r\n /*\r\n * The BigNumber constructor and exported function.\r\n * Create and return a new instance of a BigNumber object.\r\n *\r\n * n {number|string|BigNumber} A numeric value.\r\n * [b] {number} The base of n. Integer, 2 to 64 inclusive.\r\n */\r\n function BigNumber( n, b ) {\r\n var c, e, i, num, len, str,\r\n x = this;\r\n\r\n // Enable constructor usage without new.\r\n if ( !( x instanceof BigNumber ) ) {\r\n\r\n // 'BigNumber() constructor call without new: {n}'\r\n if (ERRORS) raise( 26, 'constructor call without new', n );\r\n return new BigNumber( n, b );\r\n }\r\n\r\n // 'new BigNumber() base not an integer: {b}'\r\n // 'new BigNumber() base out of range: {b}'\r\n if ( b == null || !isValidInt( b, 2, 64, id, 'base' ) ) {\r\n\r\n // Duplicate.\r\n if ( n instanceof BigNumber ) {\r\n x.s = n.s;\r\n x.e = n.e;\r\n x.c = ( n = n.c ) ? n.slice() : n;\r\n id = 0;\r\n return;\r\n }\r\n\r\n if ( ( num = typeof n == 'number' ) && n * 0 == 0 ) {\r\n x.s = 1 / n < 0 ? ( n = -n, -1 ) : 1;\r\n\r\n // Fast path for integers.\r\n if ( n === ~~n ) {\r\n for ( e = 0, i = n; i >= 10; i /= 10, e++ );\r\n x.e = e;\r\n x.c = [n];\r\n id = 0;\r\n return;\r\n }\r\n\r\n str = n + '';\r\n } else {\r\n if ( !isNumeric.test( str = n + '' ) ) return parseNumeric( x, str, num );\r\n x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1;\r\n }\r\n } else {\r\n b = b | 0;\r\n str = n + '';\r\n\r\n // Ensure return value is rounded to DECIMAL_PLACES as with other bases.\r\n // Allow exponential notation to be used with base 10 argument.\r\n if ( b == 10 ) {\r\n x = new BigNumber( n instanceof BigNumber ? n : str );\r\n return round( x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE );\r\n }\r\n\r\n // Avoid potential interpretation of Infinity and NaN as base 44+ values.\r\n // Any number in exponential form will fail due to the [Ee][+-].\r\n if ( ( num = typeof n == 'number' ) && n * 0 != 0 ||\r\n !( new RegExp( '^-?' + ( c = '[' + ALPHABET.slice( 0, b ) + ']+' ) +\r\n '(?:\\\\.' + c + ')?$',b < 37 ? 'i' : '' ) ).test(str) ) {\r\n return parseNumeric( x, str, num, b );\r\n }\r\n\r\n if (num) {\r\n x.s = 1 / n < 0 ? ( str = str.slice(1), -1 ) : 1;\r\n\r\n if ( ERRORS && str.replace( /^0\\.0*|\\./, '' ).length > 15 ) {\r\n\r\n // 'new BigNumber() number type has more than 15 significant digits: {n}'\r\n raise( id, tooManyDigits, n );\r\n }\r\n\r\n // Prevent later check for length on converted number.\r\n num = false;\r\n } else {\r\n x.s = str.charCodeAt(0) === 45 ? ( str = str.slice(1), -1 ) : 1;\r\n }\r\n\r\n str = convertBase( str, 10, b, x.s );\r\n }\r\n\r\n // Decimal point?\r\n if ( ( e = str.indexOf('.') ) > -1 ) str = str.replace( '.', '' );\r\n\r\n // Exponential form?\r\n if ( ( i = str.search( /e/i ) ) > 0 ) {\r\n\r\n // Determine exponent.\r\n if ( e < 0 ) e = i;\r\n e += +str.slice( i + 1 );\r\n str = str.substring( 0, i );\r\n } else if ( e < 0 ) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for ( i = 0; str.charCodeAt(i) === 48; i++ );\r\n\r\n // Determine trailing zeros.\r\n for ( len = str.length; str.charCodeAt(--len) === 48; );\r\n str = str.slice( i, len + 1 );\r\n\r\n if (str) {\r\n len = str.length;\r\n\r\n // Disallow numbers with over 15 significant digits if number type.\r\n // 'new BigNumber() number type has more than 15 significant digits: {n}'\r\n if ( num && ERRORS && len > 15 ) raise( id, tooManyDigits, x.s * n );\r\n\r\n e = e - i - 1;\r\n\r\n // Overflow?\r\n if ( e > MAX_EXP ) {\r\n\r\n // Infinity.\r\n x.c = x.e = null;\r\n\r\n // Underflow?\r\n } else if ( e < MIN_EXP ) {\r\n\r\n // Zero.\r\n x.c = [ x.e = 0 ];\r\n } else {\r\n x.e = e;\r\n x.c = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first element of the coefficient array.\r\n i = ( e + 1 ) % LOG_BASE;\r\n if ( e < 0 ) i += LOG_BASE;\r\n\r\n if ( i < len ) {\r\n if (i) x.c.push( +str.slice( 0, i ) );\r\n\r\n for ( len -= LOG_BASE; i < len; ) {\r\n x.c.push( +str.slice( i, i += LOG_BASE ) );\r\n }\r\n\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for ( ; i--; str += '0' );\r\n x.c.push( +str );\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.c = [ x.e = 0 ];\r\n }\r\n\r\n id = 0;\r\n }\r\n\r\n\r\n // CONSTRUCTOR PROPERTIES\r\n\r\n\r\n BigNumber.another = another;\r\n\r\n BigNumber.ROUND_UP = 0;\r\n BigNumber.ROUND_DOWN = 1;\r\n BigNumber.ROUND_CEIL = 2;\r\n BigNumber.ROUND_FLOOR = 3;\r\n BigNumber.ROUND_HALF_UP = 4;\r\n BigNumber.ROUND_HALF_DOWN = 5;\r\n BigNumber.ROUND_HALF_EVEN = 6;\r\n BigNumber.ROUND_HALF_CEIL = 7;\r\n BigNumber.ROUND_HALF_FLOOR = 8;\r\n BigNumber.EUCLID = 9;\r\n\r\n\r\n /*\r\n * Configure infrequently-changing library-wide settings.\r\n *\r\n * Accept an object or an argument list, with one or many of the following properties or\r\n * parameters respectively:\r\n *\r\n * DECIMAL_PLACES {number} Integer, 0 to MAX inclusive\r\n * ROUNDING_MODE {number} Integer, 0 to 8 inclusive\r\n * EXPONENTIAL_AT {number|number[]} Integer, -MAX to MAX inclusive or\r\n * [integer -MAX to 0 incl., 0 to MAX incl.]\r\n * RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n * [integer -MAX to -1 incl., integer 1 to MAX incl.]\r\n * ERRORS {boolean|number} true, false, 1 or 0\r\n * CRYPTO {boolean|number} true, false, 1 or 0\r\n * MODULO_MODE {number} 0 to 9 inclusive\r\n * POW_PRECISION {number} 0 to MAX inclusive\r\n * FORMAT {object} See BigNumber.prototype.toFormat\r\n * decimalSeparator {string}\r\n * groupSeparator {string}\r\n * groupSize {number}\r\n * secondaryGroupSize {number}\r\n * fractionGroupSeparator {string}\r\n * fractionGroupSize {number}\r\n *\r\n * (The values assigned to the above FORMAT object properties are not checked for validity.)\r\n *\r\n * E.g.\r\n * BigNumber.config(20, 4) is equivalent to\r\n * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 })\r\n *\r\n * Ignore properties/parameters set to null or undefined.\r\n * Return an object with the properties current values.\r\n */\r\n BigNumber.config = function () {\r\n var v, p,\r\n i = 0,\r\n r = {},\r\n a = arguments,\r\n o = a[0],\r\n has = o && typeof o == 'object'\r\n ? function () { if ( o.hasOwnProperty(p) ) return ( v = o[p] ) != null; }\r\n : function () { if ( a.length > i ) return ( v = a[i++] ) != null; };\r\n\r\n // DECIMAL_PLACES {number} Integer, 0 to MAX inclusive.\r\n // 'config() DECIMAL_PLACES not an integer: {v}'\r\n // 'config() DECIMAL_PLACES out of range: {v}'\r\n if ( has( p = 'DECIMAL_PLACES' ) && isValidInt( v, 0, MAX, 2, p ) ) {\r\n DECIMAL_PLACES = v | 0;\r\n }\r\n r[p] = DECIMAL_PLACES;\r\n\r\n // ROUNDING_MODE {number} Integer, 0 to 8 inclusive.\r\n // 'config() ROUNDING_MODE not an integer: {v}'\r\n // 'config() ROUNDING_MODE out of range: {v}'\r\n if ( has( p = 'ROUNDING_MODE' ) && isValidInt( v, 0, 8, 2, p ) ) {\r\n ROUNDING_MODE = v | 0;\r\n }\r\n r[p] = ROUNDING_MODE;\r\n\r\n // EXPONENTIAL_AT {number|number[]}\r\n // Integer, -MAX to MAX inclusive or [integer -MAX to 0 inclusive, 0 to MAX inclusive].\r\n // 'config() EXPONENTIAL_AT not an integer: {v}'\r\n // 'config() EXPONENTIAL_AT out of range: {v}'\r\n if ( has( p = 'EXPONENTIAL_AT' ) ) {\r\n\r\n if ( isArray(v) ) {\r\n if ( isValidInt( v[0], -MAX, 0, 2, p ) && isValidInt( v[1], 0, MAX, 2, p ) ) {\r\n TO_EXP_NEG = v[0] | 0;\r\n TO_EXP_POS = v[1] | 0;\r\n }\r\n } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) {\r\n TO_EXP_NEG = -( TO_EXP_POS = ( v < 0 ? -v : v ) | 0 );\r\n }\r\n }\r\n r[p] = [ TO_EXP_NEG, TO_EXP_POS ];\r\n\r\n // RANGE {number|number[]} Non-zero integer, -MAX to MAX inclusive or\r\n // [integer -MAX to -1 inclusive, integer 1 to MAX inclusive].\r\n // 'config() RANGE not an integer: {v}'\r\n // 'config() RANGE cannot be zero: {v}'\r\n // 'config() RANGE out of range: {v}'\r\n if ( has( p = 'RANGE' ) ) {\r\n\r\n if ( isArray(v) ) {\r\n if ( isValidInt( v[0], -MAX, -1, 2, p ) && isValidInt( v[1], 1, MAX, 2, p ) ) {\r\n MIN_EXP = v[0] | 0;\r\n MAX_EXP = v[1] | 0;\r\n }\r\n } else if ( isValidInt( v, -MAX, MAX, 2, p ) ) {\r\n if ( v | 0 ) MIN_EXP = -( MAX_EXP = ( v < 0 ? -v : v ) | 0 );\r\n else if (ERRORS) raise( 2, p + ' cannot be zero', v );\r\n }\r\n }\r\n r[p] = [ MIN_EXP, MAX_EXP ];\r\n\r\n // ERRORS {boolean|number} true, false, 1 or 0.\r\n // 'config() ERRORS not a boolean or binary digit: {v}'\r\n if ( has( p = 'ERRORS' ) ) {\r\n\r\n if ( v === !!v || v === 1 || v === 0 ) {\r\n id = 0;\r\n isValidInt = ( ERRORS = !!v ) ? intValidatorWithErrors : intValidatorNoErrors;\r\n } else if (ERRORS) {\r\n raise( 2, p + notBool, v );\r\n }\r\n }\r\n r[p] = ERRORS;\r\n\r\n // CRYPTO {boolean|number} true, false, 1 or 0.\r\n // 'config() CRYPTO not a boolean or binary digit: {v}'\r\n // 'config() crypto unavailable: {crypto}'\r\n if ( has( p = 'CRYPTO' ) ) {\r\n\r\n if ( v === !!v || v === 1 || v === 0 ) {\r\n CRYPTO = !!( v && crypto && typeof crypto == 'object' );\r\n if ( v && !CRYPTO && ERRORS ) raise( 2, 'crypto unavailable', crypto );\r\n } else if (ERRORS) {\r\n raise( 2, p + notBool, v );\r\n }\r\n }\r\n r[p] = CRYPTO;\r\n\r\n // MODULO_MODE {number} Integer, 0 to 9 inclusive.\r\n // 'config() MODULO_MODE not an integer: {v}'\r\n // 'config() MODULO_MODE out of range: {v}'\r\n if ( has( p = 'MODULO_MODE' ) && isValidInt( v, 0, 9, 2, p ) ) {\r\n MODULO_MODE = v | 0;\r\n }\r\n r[p] = MODULO_MODE;\r\n\r\n // POW_PRECISION {number} Integer, 0 to MAX inclusive.\r\n // 'config() POW_PRECISION not an integer: {v}'\r\n // 'config() POW_PRECISION out of range: {v}'\r\n if ( has( p = 'POW_PRECISION' ) && isValidInt( v, 0, MAX, 2, p ) ) {\r\n POW_PRECISION = v | 0;\r\n }\r\n r[p] = POW_PRECISION;\r\n\r\n // FORMAT {object}\r\n // 'config() FORMAT not an object: {v}'\r\n if ( has( p = 'FORMAT' ) ) {\r\n\r\n if ( typeof v == 'object' ) {\r\n FORMAT = v;\r\n } else if (ERRORS) {\r\n raise( 2, p + ' not an object', v );\r\n }\r\n }\r\n r[p] = FORMAT;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.max = function () { return maxOrMin( arguments, P.lt ); };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|BigNumber}\r\n */\r\n BigNumber.min = function () { return maxOrMin( arguments, P.gt ); };\r\n\r\n\r\n /*\r\n * Return a new BigNumber with a random value equal to or greater than 0 and less than 1,\r\n * and with dp, or DECIMAL_PLACES if dp is omitted, decimal places (or less if trailing\r\n * zeros are produced).\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n *\r\n * 'random() decimal places not an integer: {dp}'\r\n * 'random() decimal places out of range: {dp}'\r\n * 'random() crypto unavailable: {crypto}'\r\n */\r\n BigNumber.random = (function () {\r\n var pow2_53 = 0x20000000000000;\r\n\r\n // Return a 53 bit integer n, where 0 <= n < 9007199254740992.\r\n // Check if Math.random() produces more than 32 bits of randomness.\r\n // If it does, assume at least 53 bits are produced, otherwise assume at least 30 bits.\r\n // 0x40000000 is 2^30, 0x800000 is 2^23, 0x1fffff is 2^21 - 1.\r\n var random53bitInt = (Math.random() * pow2_53) & 0x1fffff\r\n ? function () { return mathfloor( Math.random() * pow2_53 ); }\r\n : function () { return ((Math.random() * 0x40000000 | 0) * 0x800000) +\r\n (Math.random() * 0x800000 | 0); };\r\n\r\n return function (dp) {\r\n var a, b, e, k, v,\r\n i = 0,\r\n c = [],\r\n rand = new BigNumber(ONE);\r\n\r\n dp = dp == null || !isValidInt( dp, 0, MAX, 14 ) ? DECIMAL_PLACES : dp | 0;\r\n k = mathceil( dp / LOG_BASE );\r\n\r\n if (CRYPTO) {\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n if ( crypto && crypto.getRandomValues ) {\r\n\r\n a = crypto.getRandomValues( new Uint32Array( k *= 2 ) );\r\n\r\n for ( ; i < k; ) {\r\n\r\n // 53 bits:\r\n // ((Math.pow(2, 32) - 1) * Math.pow(2, 21)).toString(2)\r\n // 11111 11111111 11111111 11111111 11100000 00000000 00000000\r\n // ((Math.pow(2, 32) - 1) >>> 11).toString(2)\r\n // 11111 11111111 11111111\r\n // 0x20000 is 2^21.\r\n v = a[i] * 0x20000 + (a[i + 1] >>> 11);\r\n\r\n // Rejection sampling:\r\n // 0 <= v < 9007199254740992\r\n // Probability that v >= 9e15, is\r\n // 7199254740992 / 9007199254740992 ~= 0.0008, i.e. 1 in 1251\r\n if ( v >= 9e15 ) {\r\n b = crypto.getRandomValues( new Uint32Array(2) );\r\n a[i] = b[0];\r\n a[i + 1] = b[1];\r\n } else {\r\n\r\n // 0 <= v <= 8999999999999999\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push( v % 1e14 );\r\n i += 2;\r\n }\r\n }\r\n i = k / 2;\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if ( crypto && crypto.randomBytes ) {\r\n\r\n // buffer\r\n a = crypto.randomBytes( k *= 7 );\r\n\r\n for ( ; i < k; ) {\r\n\r\n // 0x1000000000000 is 2^48, 0x10000000000 is 2^40\r\n // 0x100000000 is 2^32, 0x1000000 is 2^24\r\n // 11111 11111111 11111111 11111111 11111111 11111111 11111111\r\n // 0 <= v < 9007199254740992\r\n v = ( ( a[i] & 31 ) * 0x1000000000000 ) + ( a[i + 1] * 0x10000000000 ) +\r\n ( a[i + 2] * 0x100000000 ) + ( a[i + 3] * 0x1000000 ) +\r\n ( a[i + 4] << 16 ) + ( a[i + 5] << 8 ) + a[i + 6];\r\n\r\n if ( v >= 9e15 ) {\r\n crypto.randomBytes(7).copy( a, i );\r\n } else {\r\n\r\n // 0 <= (v % 1e14) <= 99999999999999\r\n c.push( v % 1e14 );\r\n i += 7;\r\n }\r\n }\r\n i = k / 7;\r\n } else if (ERRORS) {\r\n raise( 14, 'crypto unavailable', crypto );\r\n }\r\n }\r\n\r\n // Use Math.random: CRYPTO is false or crypto is unavailable and ERRORS is false.\r\n if (!i) {\r\n\r\n for ( ; i < k; ) {\r\n v = random53bitInt();\r\n if ( v < 9e15 ) c[i++] = v % 1e14;\r\n }\r\n }\r\n\r\n k = c[--i];\r\n dp %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to dp.\r\n if ( k && dp ) {\r\n v = POWS_TEN[LOG_BASE - dp];\r\n c[i] = mathfloor( k / v ) * v;\r\n }\r\n\r\n // Remove trailing elements which are zero.\r\n for ( ; c[i] === 0; c.pop(), i-- );\r\n\r\n // Zero?\r\n if ( i < 0 ) {\r\n c = [ e = 0 ];\r\n } else {\r\n\r\n // Remove leading elements which are zero and adjust exponent accordingly.\r\n for ( e = -1 ; c[0] === 0; c.shift(), e -= LOG_BASE);\r\n\r\n // Count the digits of the first element of c to determine leading zeros, and...\r\n for ( i = 1, v = c[0]; v >= 10; v /= 10, i++);\r\n\r\n // adjust the exponent accordingly.\r\n if ( i < LOG_BASE ) e -= LOG_BASE - i;\r\n }\r\n\r\n rand.e = e;\r\n rand.c = c;\r\n return rand;\r\n };\r\n })();\r\n\r\n\r\n // PRIVATE FUNCTIONS\r\n\r\n\r\n // Convert a numeric string of baseIn to a numeric string of baseOut.\r\n function convertBase( str, baseOut, baseIn, sign ) {\r\n var d, e, k, r, x, xc, y,\r\n i = str.indexOf( '.' ),\r\n dp = DECIMAL_PLACES,\r\n rm = ROUNDING_MODE;\r\n\r\n if ( baseIn < 37 ) str = str.toLowerCase();\r\n\r\n // Non-integer.\r\n if ( i >= 0 ) {\r\n k = POW_PRECISION;\r\n\r\n // Unlimited precision.\r\n POW_PRECISION = 0;\r\n str = str.replace( '.', '' );\r\n y = new BigNumber(baseIn);\r\n x = y.pow( str.length - i );\r\n POW_PRECISION = k;\r\n\r\n // Convert str as if an integer, then restore the fraction part by dividing the\r\n // result by its base raised to a power.\r\n y.c = toBaseOut( toFixedPoint( coeffToString( x.c ), x.e ), 10, baseOut );\r\n y.e = y.c.length;\r\n }\r\n\r\n // Convert the number as integer.\r\n xc = toBaseOut( str, baseIn, baseOut );\r\n e = k = xc.length;\r\n\r\n // Remove trailing zeros.\r\n for ( ; xc[--k] == 0; xc.pop() );\r\n if ( !xc[0] ) return '0';\r\n\r\n if ( i < 0 ) {\r\n --e;\r\n } else {\r\n x.c = xc;\r\n x.e = e;\r\n\r\n // sign is needed for correct rounding.\r\n x.s = sign;\r\n x = div( x, y, dp, rm, baseOut );\r\n xc = x.c;\r\n r = x.r;\r\n e = x.e;\r\n }\r\n\r\n d = e + dp + 1;\r\n\r\n // The rounding digit, i.e. the digit to the right of the digit that may be rounded up.\r\n i = xc[d];\r\n k = baseOut / 2;\r\n r = r || d < 0 || xc[d + 1] != null;\r\n\r\n r = rm < 4 ? ( i != null || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) )\r\n : i > k || i == k &&( rm == 4 || r || rm == 6 && xc[d - 1] & 1 ||\r\n rm == ( x.s < 0 ? 8 : 7 ) );\r\n\r\n if ( d < 1 || !xc[0] ) {\r\n\r\n // 1^-dp or 0.\r\n str = r ? toFixedPoint( '1', -dp ) : '0';\r\n } else {\r\n xc.length = d;\r\n\r\n if (r) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for ( --baseOut; ++xc[--d] > baseOut; ) {\r\n xc[d] = 0;\r\n\r\n if ( !d ) {\r\n ++e;\r\n xc.unshift(1);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for ( k = xc.length; !xc[--k]; );\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for ( i = 0, str = ''; i <= k; str += ALPHABET.charAt( xc[i++] ) );\r\n str = toFixedPoint( str, e );\r\n }\r\n\r\n // The caller will add the sign.\r\n return str;\r\n }\r\n\r\n\r\n // Perform division in the specified base. Called by div and convertBase.\r\n div = (function () {\r\n\r\n // Assume non-zero x and k.\r\n function multiply( x, k, base ) {\r\n var m, temp, xlo, xhi,\r\n carry = 0,\r\n i = x.length,\r\n klo = k % SQRT_BASE,\r\n khi = k / SQRT_BASE | 0;\r\n\r\n for ( x = x.slice(); i--; ) {\r\n xlo = x[i] % SQRT_BASE;\r\n xhi = x[i] / SQRT_BASE | 0;\r\n m = khi * xlo + xhi * klo;\r\n temp = klo * xlo + ( ( m % SQRT_BASE ) * SQRT_BASE ) + carry;\r\n carry = ( temp / base | 0 ) + ( m / SQRT_BASE | 0 ) + khi * xhi;\r\n x[i] = temp % base;\r\n }\r\n\r\n if (carry) x.unshift(carry);\r\n\r\n return x;\r\n }\r\n\r\n function compare( a, b, aL, bL ) {\r\n var i, cmp;\r\n\r\n if ( aL != bL ) {\r\n cmp = aL > bL ? 1 : -1;\r\n } else {\r\n\r\n for ( i = cmp = 0; i < aL; i++ ) {\r\n\r\n if ( a[i] != b[i] ) {\r\n cmp = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n return cmp;\r\n }\r\n\r\n function subtract( a, b, aL, base ) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for ( ; aL--; ) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for ( ; !a[0] && a.length > 1; a.shift() );\r\n }\r\n\r\n // x: dividend, y: divisor.\r\n return function ( x, y, dp, rm, base ) {\r\n var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0,\r\n yL, yz,\r\n s = x.s == y.s ? 1 : -1,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n // Either NaN, Infinity or 0?\r\n if ( !xc || !xc[0] || !yc || !yc[0] ) {\r\n\r\n return new BigNumber(\r\n\r\n // Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || ( xc ? yc && xc[0] == yc[0] : !yc ) ? NaN :\r\n\r\n // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.\r\n xc && xc[0] == 0 || !yc ? s * 0 : s / 0\r\n );\r\n }\r\n\r\n q = new BigNumber(s);\r\n qc = q.c = [];\r\n e = x.e - y.e;\r\n s = dp + e + 1;\r\n\r\n if ( !base ) {\r\n base = BASE;\r\n e = bitFloor( x.e / LOG_BASE ) - bitFloor( y.e / LOG_BASE );\r\n s = s / LOG_BASE | 0;\r\n }\r\n\r\n // Result exponent may be one less then the current value of e.\r\n // The coefficients of the BigNumbers from convertBase may have trailing zeros.\r\n for ( i = 0; yc[i] == ( xc[i] || 0 ); i++ );\r\n if ( yc[i] > ( xc[i] || 0 ) ) e--;\r\n\r\n if ( s < 0 ) {\r\n qc.push(1);\r\n more = true;\r\n } else {\r\n xL = xc.length;\r\n yL = yc.length;\r\n i = 0;\r\n s += 2;\r\n\r\n // Normalise xc and yc so highest order digit of yc is >= base / 2.\r\n\r\n n = mathfloor( base / ( yc[0] + 1 ) );\r\n\r\n // Not necessary, but to handle odd bases where yc[0] == ( base / 2 ) - 1.\r\n // if ( n > 1 || n++ == 1 && yc[0] < base / 2 ) {\r\n if ( n > 1 ) {\r\n yc = multiply( yc, n, base );\r\n xc = multiply( xc, n, base );\r\n yL = yc.length;\r\n xL = xc.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xc.slice( 0, yL );\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for ( ; remL < yL; rem[remL++] = 0 );\r\n yz = yc.slice();\r\n yz.unshift(0);\r\n yc0 = yc[0];\r\n if ( yc[1] >= base / 2 ) yc0++;\r\n // Not necessary, but to prevent trial digit n > base, when using base 3.\r\n // else if ( base == 3 && yc0 == 1 ) yc0 = 1 + 1e-15;\r\n\r\n do {\r\n n = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare( yc, rem, yL, remL );\r\n\r\n // If divisor < remainder.\r\n if ( cmp < 0 ) {\r\n\r\n // Calculate trial digit, n.\r\n\r\n rem0 = rem[0];\r\n if ( yL != remL ) rem0 = rem0 * base + ( rem[1] || 0 );\r\n\r\n // n is how many times the divisor goes into the current remainder.\r\n n = mathfloor( rem0 / yc0 );\r\n\r\n // Algorithm:\r\n // 1. product = divisor * trial digit (n)\r\n // 2. if product > remainder: product -= divisor, n--\r\n // 3. remainder -= product\r\n // 4. if product was < remainder at 2:\r\n // 5. compare new remainder and divisor\r\n // 6. If remainder > divisor: remainder -= divisor, n++\r\n\r\n if ( n > 1 ) {\r\n\r\n // n may be > base only when base is 3.\r\n if (n >= base) n = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiply( yc, n, base );\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n // If product > remainder.\r\n // Trial digit n too high.\r\n // n is 1 too high about 5% of the time, and is not known to have\r\n // ever been more than 1 too high.\r\n while ( compare( prod, rem, prodL, remL ) == 1 ) {\r\n n--;\r\n\r\n // Subtract divisor from product.\r\n subtract( prod, yL < prodL ? yz : yc, prodL, base );\r\n prodL = prod.length;\r\n cmp = 1;\r\n }\r\n } else {\r\n\r\n // n is 0 or 1, cmp is -1.\r\n // If n is 0, there is no need to compare yc and rem again below,\r\n // so change cmp to 1 to avoid it.\r\n // If n is 1, leave cmp as -1, so yc and rem are compared again.\r\n if ( n == 0 ) {\r\n\r\n // divisor < remainder, so n must be at least 1.\r\n cmp = n = 1;\r\n }\r\n\r\n // product = divisor\r\n prod = yc.slice();\r\n prodL = prod.length;\r\n }\r\n\r\n if ( prodL < remL ) prod.unshift(0);\r\n\r\n // Subtract product from remainder.\r\n subtract( rem, prod, remL, base );\r\n remL = rem.length;\r\n\r\n // If product was < remainder.\r\n if ( cmp == -1 ) {\r\n\r\n // Compare divisor and new remainder.\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n // Trial digit n too low.\r\n // n is 1 too low about 5% of the time, and very rarely 2 too low.\r\n while ( compare( yc, rem, yL, remL ) < 1 ) {\r\n n++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract( rem, yL < remL ? yz : yc, remL, base );\r\n remL = rem.length;\r\n }\r\n }\r\n } else if ( cmp === 0 ) {\r\n n++;\r\n rem = [0];\r\n } // else cmp === 1 and n will be 0\r\n\r\n // Add the next digit, n, to the result array.\r\n qc[i++] = n;\r\n\r\n // Update the remainder.\r\n if ( rem[0] ) {\r\n rem[remL++] = xc[xi] || 0;\r\n } else {\r\n rem = [ xc[xi] ];\r\n remL = 1;\r\n }\r\n } while ( ( xi++ < xL || rem[0] != null ) && s-- );\r\n\r\n more = rem[0] != null;\r\n\r\n // Leading zero?\r\n if ( !qc[0] ) qc.shift();\r\n }\r\n\r\n if ( base == BASE ) {\r\n\r\n // To calculate q.e, first get the number of digits of qc[0].\r\n for ( i = 1, s = qc[0]; s >= 10; s /= 10, i++ );\r\n round( q, dp + ( q.e = i + e * LOG_BASE - 1 ) + 1, rm, more );\r\n\r\n // Caller is convertBase.\r\n } else {\r\n q.e = e;\r\n q.r = +more;\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Return a string representing the value of BigNumber n in fixed-point or exponential\r\n * notation rounded to the specified decimal places or significant digits.\r\n *\r\n * n is a BigNumber.\r\n * i is the index of the last digit required (i.e. the digit that may be rounded up).\r\n * rm is the rounding mode.\r\n * caller is caller id: toExponential 19, toFixed 20, toFormat 21, toPrecision 24.\r\n */\r\n function format( n, i, rm, caller ) {\r\n var c0, e, ne, len, str;\r\n\r\n rm = rm != null && isValidInt( rm, 0, 8, caller, roundingMode )\r\n ? rm | 0 : ROUNDING_MODE;\r\n\r\n if ( !n.c ) return n.toString();\r\n c0 = n.c[0];\r\n ne = n.e;\r\n\r\n if ( i == null ) {\r\n str = coeffToString( n.c );\r\n str = caller == 19 || caller == 24 && ne <= TO_EXP_NEG\r\n ? toExponential( str, ne )\r\n : toFixedPoint( str, ne );\r\n } else {\r\n n = round( new BigNumber(n), i, rm );\r\n\r\n // n.e may have changed if the value was rounded up.\r\n e = n.e;\r\n\r\n str = coeffToString( n.c );\r\n len = str.length;\r\n\r\n // toPrecision returns exponential notation if the number of significant digits\r\n // specified is less than the number of digits necessary to represent the integer\r\n // part of the value in fixed-point notation.\r\n\r\n // Exponential notation.\r\n if ( caller == 19 || caller == 24 && ( i <= e || e <= TO_EXP_NEG ) ) {\r\n\r\n // Append zeros?\r\n for ( ; len < i; str += '0', len++ );\r\n str = toExponential( str, e );\r\n\r\n // Fixed-point notation.\r\n } else {\r\n i -= ne;\r\n str = toFixedPoint( str, e );\r\n\r\n // Append zeros?\r\n if ( e + 1 > len ) {\r\n if ( --i > 0 ) for ( str += '.'; i--; str += '0' );\r\n } else {\r\n i += e - len;\r\n if ( i > 0 ) {\r\n if ( e + 1 == len ) str += '.';\r\n for ( ; i--; str += '0' );\r\n }\r\n }\r\n }\r\n }\r\n\r\n return n.s < 0 && c0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Handle BigNumber.max and BigNumber.min.\r\n function maxOrMin( args, method ) {\r\n var m, n,\r\n i = 0;\r\n\r\n if ( isArray( args[0] ) ) args = args[0];\r\n m = new BigNumber( args[0] );\r\n\r\n for ( ; ++i < args.length; ) {\r\n n = new BigNumber( args[i] );\r\n\r\n // If any number is NaN, return NaN.\r\n if ( !n.s ) {\r\n m = n;\r\n break;\r\n } else if ( method.call( m, n ) ) {\r\n m = n;\r\n }\r\n }\r\n\r\n return m;\r\n }\r\n\r\n\r\n /*\r\n * Return true if n is an integer in range, otherwise throw.\r\n * Use for argument validation when ERRORS is true.\r\n */\r\n function intValidatorWithErrors( n, min, max, caller, name ) {\r\n if ( n < min || n > max || n != truncate(n) ) {\r\n raise( caller, ( name || 'decimal places' ) +\r\n ( n < min || n > max ? ' out of range' : ' not an integer' ), n );\r\n }\r\n\r\n return true;\r\n }\r\n\r\n\r\n /*\r\n * Strip trailing zeros, calculate base 10 exponent and check against MIN_EXP and MAX_EXP.\r\n * Called by minus, plus and times.\r\n */\r\n function normalise( n, c, e ) {\r\n var i = 1,\r\n j = c.length;\r\n\r\n // Remove trailing zeros.\r\n for ( ; !c[--j]; c.pop() );\r\n\r\n // Calculate the base 10 exponent. First get the number of digits of c[0].\r\n for ( j = c[0]; j >= 10; j /= 10, i++ );\r\n\r\n // Overflow?\r\n if ( ( e = i + e * LOG_BASE - 1 ) > MAX_EXP ) {\r\n\r\n // Infinity.\r\n n.c = n.e = null;\r\n\r\n // Underflow?\r\n } else if ( e < MIN_EXP ) {\r\n\r\n // Zero.\r\n n.c = [ n.e = 0 ];\r\n } else {\r\n n.e = e;\r\n n.c = c;\r\n }\r\n\r\n return n;\r\n }\r\n\r\n\r\n // Handle values that fail the validity test in BigNumber.\r\n parseNumeric = (function () {\r\n var basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i,\r\n dotAfter = /^([^.]+)\\.$/,\r\n dotBefore = /^\\.([^.]+)$/,\r\n isInfinityOrNaN = /^-?(Infinity|NaN)$/,\r\n whitespaceOrPlus = /^\\s*\\+(?=[\\w.])|^\\s+|\\s+$/g;\r\n\r\n return function ( x, str, num, b ) {\r\n var base,\r\n s = num ? str : str.replace( whitespaceOrPlus, '' );\r\n\r\n // No exception on ±Infinity or NaN.\r\n if ( isInfinityOrNaN.test(s) ) {\r\n x.s = isNaN(s) ? null : s < 0 ? -1 : 1;\r\n } else {\r\n if ( !num ) {\r\n\r\n // basePrefix = /^(-?)0([xbo])(?=\\w[\\w.]*$)/i\r\n s = s.replace( basePrefix, function ( m, p1, p2 ) {\r\n base = ( p2 = p2.toLowerCase() ) == 'x' ? 16 : p2 == 'b' ? 2 : 8;\r\n return !b || b == base ? p1 : m;\r\n });\r\n\r\n if (b) {\r\n base = b;\r\n\r\n // E.g. '1.' to '1', '.1' to '0.1'\r\n s = s.replace( dotAfter, '$1' ).replace( dotBefore, '0.$1' );\r\n }\r\n\r\n if ( str != s ) return new BigNumber( s, base );\r\n }\r\n\r\n // 'new BigNumber() not a number: {n}'\r\n // 'new BigNumber() not a base {b} number: {n}'\r\n if (ERRORS) raise( id, 'not a' + ( b ? ' base ' + b : '' ) + ' number', str );\r\n x.s = null;\r\n }\r\n\r\n x.c = x.e = null;\r\n id = 0;\r\n }\r\n })();\r\n\r\n\r\n // Throw a BigNumber Error.\r\n function raise( caller, msg, val ) {\r\n var error = new Error( [\r\n 'new BigNumber', // 0\r\n 'cmp', // 1\r\n 'config', // 2\r\n 'div', // 3\r\n 'divToInt', // 4\r\n 'eq', // 5\r\n 'gt', // 6\r\n 'gte', // 7\r\n 'lt', // 8\r\n 'lte', // 9\r\n 'minus', // 10\r\n 'mod', // 11\r\n 'plus', // 12\r\n 'precision', // 13\r\n 'random', // 14\r\n 'round', // 15\r\n 'shift', // 16\r\n 'times', // 17\r\n 'toDigits', // 18\r\n 'toExponential', // 19\r\n 'toFixed', // 20\r\n 'toFormat', // 21\r\n 'toFraction', // 22\r\n 'pow', // 23\r\n 'toPrecision', // 24\r\n 'toString', // 25\r\n 'BigNumber' // 26\r\n ][caller] + '() ' + msg + ': ' + val );\r\n\r\n error.name = 'BigNumber Error';\r\n id = 0;\r\n throw error;\r\n }\r\n\r\n\r\n /*\r\n * Round x to sd significant digits using rounding mode rm. Check for over/under-flow.\r\n * If r is truthy, it is known that there are more digits after the rounding digit.\r\n */\r\n function round( x, sd, rm, r ) {\r\n var d, i, j, k, n, ni, rd,\r\n xc = x.c,\r\n pows10 = POWS_TEN;\r\n\r\n // if x is not Infinity or NaN...\r\n if (xc) {\r\n\r\n // rd is the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // n is a base 1e14 number, the value of the element of array x.c containing rd.\r\n // ni is the index of n within x.c.\r\n // d is the number of digits of n.\r\n // i is the index of rd within n including leading zeros.\r\n // j is the actual index of rd within n (if < 0, rd is a leading zero).\r\n out: {\r\n\r\n // Get the number of digits of the first element of xc.\r\n for ( d = 1, k = xc[0]; k >= 10; k /= 10, d++ );\r\n i = sd - d;\r\n\r\n // If the rounding digit is in the first element of xc...\r\n if ( i < 0 ) {\r\n i += LOG_BASE;\r\n j = sd;\r\n n = xc[ ni = 0 ];\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = n / pows10[ d - j - 1 ] % 10 | 0;\r\n } else {\r\n ni = mathceil( ( i + 1 ) / LOG_BASE );\r\n\r\n if ( ni >= xc.length ) {\r\n\r\n if (r) {\r\n\r\n // Needed by sqrt.\r\n for ( ; xc.length <= ni; xc.push(0) );\r\n n = rd = 0;\r\n d = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n n = k = xc[ni];\r\n\r\n // Get the number of digits of n.\r\n for ( d = 1; k >= 10; k /= 10, d++ );\r\n\r\n // Get the index of rd within n.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within n, adjusted for leading zeros.\r\n // The number of leading zeros of n is given by LOG_BASE - d.\r\n j = i - LOG_BASE + d;\r\n\r\n // Get the rounding digit at index j of n.\r\n rd = j < 0 ? 0 : n / pows10[ d - j - 1 ] % 10 | 0;\r\n }\r\n }\r\n\r\n r = r || sd < 0 ||\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n // The expression n % pows10[ d - j - 1 ] returns all digits of n to the right\r\n // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.\r\n xc[ni + 1] != null || ( j < 0 ? n : n % pows10[ d - j - 1 ] );\r\n\r\n r = rm < 4\r\n ? ( rd || r ) && ( rm == 0 || rm == ( x.s < 0 ? 3 : 2 ) )\r\n : rd > 5 || rd == 5 && ( rm == 4 || r || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ( ( i > 0 ? j > 0 ? n / pows10[ d - j ] : 0 : xc[ni - 1] ) % 10 ) & 1 ||\r\n rm == ( x.s < 0 ? 8 : 7 ) );\r\n\r\n if ( sd < 1 || !xc[0] ) {\r\n xc.length = 0;\r\n\r\n if (r) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xc[0] = pows10[ ( LOG_BASE - sd % LOG_BASE ) % LOG_BASE ];\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xc[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if ( i == 0 ) {\r\n xc.length = ni;\r\n k = 1;\r\n ni--;\r\n } else {\r\n xc.length = ni + 1;\r\n k = pows10[ LOG_BASE - i ];\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of n.\r\n xc[ni] = j > 0 ? mathfloor( n / pows10[ d - j ] % pows10[j] ) * k : 0;\r\n }\r\n\r\n // Round up?\r\n if (r) {\r\n\r\n for ( ; ; ) {\r\n\r\n // If the digit to be rounded up is in the first element of xc...\r\n if ( ni == 0 ) {\r\n\r\n // i will be the length of xc[0] before k is added.\r\n for ( i = 1, j = xc[0]; j >= 10; j /= 10, i++ );\r\n j = xc[0] += k;\r\n for ( k = 1; j >= 10; j /= 10, k++ );\r\n\r\n // if i != k the length has increased.\r\n if ( i != k ) {\r\n x.e++;\r\n if ( xc[0] == BASE ) xc[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xc[ni] += k;\r\n if ( xc[ni] != BASE ) break;\r\n xc[ni--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for ( i = xc.length; xc[--i] === 0; xc.pop() );\r\n }\r\n\r\n // Overflow? Infinity.\r\n if ( x.e > MAX_EXP ) {\r\n x.c = x.e = null;\r\n\r\n // Underflow? Zero.\r\n } else if ( x.e < MIN_EXP ) {\r\n x.c = [ x.e = 0 ];\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n // PROTOTYPE/INSTANCE METHODS\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the absolute value of this BigNumber.\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new BigNumber(this);\r\n if ( x.s < 0 ) x.s = 1;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole\r\n * number in the direction of Infinity.\r\n */\r\n P.ceil = function () {\r\n return round( new BigNumber(this), this.e + 1, 2 );\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * -1 if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * 0 if they have the same value,\r\n * or null if the value of either is NaN.\r\n */\r\n P.comparedTo = P.cmp = function ( y, b ) {\r\n id = 1;\r\n return compare( this, new BigNumber( y, b ) );\r\n };\r\n\r\n\r\n /*\r\n * Return the number of decimal places of the value of this BigNumber, or null if the value\r\n * of this BigNumber is ±Infinity or NaN.\r\n */\r\n P.decimalPlaces = P.dp = function () {\r\n var n, v,\r\n c = this.c;\r\n\r\n if ( !c ) return null;\r\n n = ( ( v = c.length - 1 ) - bitFloor( this.e / LOG_BASE ) ) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last number.\r\n if ( v = c[v] ) for ( ; v % 10 == 0; v /= 10, n-- );\r\n if ( n < 0 ) n = 0;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber divided by the value of\r\n * BigNumber(y, b), rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.dividedBy = P.div = function ( y, b ) {\r\n id = 3;\r\n return div( this, new BigNumber( y, b ), DECIMAL_PLACES, ROUNDING_MODE );\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the integer part of dividing the value of this\r\n * BigNumber by the value of BigNumber(y, b).\r\n */\r\n P.dividedToIntegerBy = P.divToInt = function ( y, b ) {\r\n id = 4;\r\n return div( this, new BigNumber( y, b ), 0, 1 );\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is equal to the value of BigNumber(y, b),\r\n * otherwise returns false.\r\n */\r\n P.equals = P.eq = function ( y, b ) {\r\n id = 5;\r\n return compare( this, new BigNumber( y, b ) ) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a whole\r\n * number in the direction of -Infinity.\r\n */\r\n P.floor = function () {\r\n return round( new BigNumber(this), this.e + 1, 3 );\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than the value of BigNumber(y, b),\r\n * otherwise returns false.\r\n */\r\n P.greaterThan = P.gt = function ( y, b ) {\r\n id = 6;\r\n return compare( this, new BigNumber( y, b ) ) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is greater than or equal to the value of\r\n * BigNumber(y, b), otherwise returns false.\r\n */\r\n P.greaterThanOrEqualTo = P.gte = function ( y, b ) {\r\n id = 7;\r\n return ( b = compare( this, new BigNumber( y, b ) ) ) === 1 || b === 0;\r\n\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is a finite number, otherwise returns false.\r\n */\r\n P.isFinite = function () {\r\n return !!this.c;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is an integer, otherwise return false.\r\n */\r\n P.isInteger = P.isInt = function () {\r\n return !!this.c && bitFloor( this.e / LOG_BASE ) > this.c.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is NaN, otherwise returns false.\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is negative, otherwise returns false.\r\n */\r\n P.isNegative = P.isNeg = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is 0 or -0, otherwise returns false.\r\n */\r\n P.isZero = function () {\r\n return !!this.c && this.c[0] == 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than the value of BigNumber(y, b),\r\n * otherwise returns false.\r\n */\r\n P.lessThan = P.lt = function ( y, b ) {\r\n id = 8;\r\n return compare( this, new BigNumber( y, b ) ) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this BigNumber is less than or equal to the value of\r\n * BigNumber(y, b), otherwise returns false.\r\n */\r\n P.lessThanOrEqualTo = P.lte = function ( y, b ) {\r\n id = 9;\r\n return ( b = compare( this, new BigNumber( y, b ) ) ) === -1 || b === 0;\r\n };\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber minus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.minus = P.sub = function ( y, b ) {\r\n var i, j, t, xLTy,\r\n x = this,\r\n a = x.s;\r\n\r\n id = 10;\r\n y = new BigNumber( y, b );\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if ( !a || !b ) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if ( a != b ) {\r\n y.s = -b;\r\n return x.plus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if ( !xe || !ye ) {\r\n\r\n // Either Infinity?\r\n if ( !xc || !yc ) return xc ? ( y.s = -b, y ) : new BigNumber( yc ? x : NaN );\r\n\r\n // Either zero?\r\n if ( !xc[0] || !yc[0] ) {\r\n\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n return yc[0] ? ( y.s = -b, y ) : new BigNumber( xc[0] ? x :\r\n\r\n // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity\r\n ROUNDING_MODE == 3 ? -0 : 0 );\r\n }\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Determine which is the bigger number.\r\n if ( a = xe - ye ) {\r\n\r\n if ( xLTy = a < 0 ) {\r\n a = -a;\r\n t = xc;\r\n } else {\r\n ye = xe;\r\n t = yc;\r\n }\r\n\r\n t.reverse();\r\n\r\n // Prepend zeros to equalise exponents.\r\n for ( b = a; b--; t.push(0) );\r\n t.reverse();\r\n } else {\r\n\r\n // Exponents equal. Check digit by digit.\r\n j = ( xLTy = ( a = xc.length ) < ( b = yc.length ) ) ? a : b;\r\n\r\n for ( a = b = 0; b < j; b++ ) {\r\n\r\n if ( xc[b] != yc[b] ) {\r\n xLTy = xc[b] < yc[b];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // x < y? Point xc to the array of the bigger number.\r\n if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;\r\n\r\n b = ( j = yc.length ) - ( i = xc.length );\r\n\r\n // Append zeros to xc if shorter.\r\n // No need to add zeros to yc if shorter as subtract only needs to start at yc.length.\r\n if ( b > 0 ) for ( ; b--; xc[i++] = 0 );\r\n b = BASE - 1;\r\n\r\n // Subtract yc from xc.\r\n for ( ; j > a; ) {\r\n\r\n if ( xc[--j] < yc[j] ) {\r\n for ( i = j; i && !xc[--i]; xc[i] = b );\r\n --xc[i];\r\n xc[j] += BASE;\r\n }\r\n\r\n xc[j] -= yc[j];\r\n }\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for ( ; xc[0] == 0; xc.shift(), --ye );\r\n\r\n // Zero?\r\n if ( !xc[0] ) {\r\n\r\n // Following IEEE 754 (2008) 6.3,\r\n // n - n = +0 but n - n = -0 when rounding towards -Infinity.\r\n y.s = ROUNDING_MODE == 3 ? -1 : 1;\r\n y.c = [ y.e = 0 ];\r\n return y;\r\n }\r\n\r\n // No need to check for Infinity as +x - +y != Infinity && -x - -y != Infinity\r\n // for finite x and y.\r\n return normalise( y, xc, ye );\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber modulo the value of\r\n * BigNumber(y, b). The result depends on the value of MODULO_MODE.\r\n */\r\n P.modulo = P.mod = function ( y, b ) {\r\n var q, s,\r\n x = this;\r\n\r\n id = 11;\r\n y = new BigNumber( y, b );\r\n\r\n // Return NaN if x is Infinity or NaN, or y is NaN or zero.\r\n if ( !x.c || !y.s || y.c && !y.c[0] ) {\r\n return new BigNumber(NaN);\r\n\r\n // Return x if y is Infinity or x is zero.\r\n } else if ( !y.c || x.c && !x.c[0] ) {\r\n return new BigNumber(x);\r\n }\r\n\r\n if ( MODULO_MODE == 9 ) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // r = x - qy where 0 <= r < abs(y)\r\n s = y.s;\r\n y.s = 1;\r\n q = div( x, y, 0, 3 );\r\n y.s = s;\r\n q.s *= s;\r\n } else {\r\n q = div( x, y, 0, MODULO_MODE );\r\n }\r\n\r\n return x.minus( q.times(y) );\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber negated,\r\n * i.e. multiplied by -1.\r\n */\r\n P.negated = P.neg = function () {\r\n var x = new BigNumber(this);\r\n x.s = -x.s || null;\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber plus the value of\r\n * BigNumber(y, b).\r\n */\r\n P.plus = P.add = function ( y, b ) {\r\n var t,\r\n x = this,\r\n a = x.s;\r\n\r\n id = 12;\r\n y = new BigNumber( y, b );\r\n b = y.s;\r\n\r\n // Either NaN?\r\n if ( !a || !b ) return new BigNumber(NaN);\r\n\r\n // Signs differ?\r\n if ( a != b ) {\r\n y.s = -b;\r\n return x.minus(y);\r\n }\r\n\r\n var xe = x.e / LOG_BASE,\r\n ye = y.e / LOG_BASE,\r\n xc = x.c,\r\n yc = y.c;\r\n\r\n if ( !xe || !ye ) {\r\n\r\n // Return ±Infinity if either ±Infinity.\r\n if ( !xc || !yc ) return new BigNumber( a / 0 );\r\n\r\n // Either zero?\r\n // Return y if y is non-zero, x if x is non-zero, or zero if both are zero.\r\n if ( !xc[0] || !yc[0] ) return yc[0] ? y : new BigNumber( xc[0] ? x : a * 0 );\r\n }\r\n\r\n xe = bitFloor(xe);\r\n ye = bitFloor(ye);\r\n xc = xc.slice();\r\n\r\n // Prepend zeros to equalise exponents. Faster to use reverse then do unshifts.\r\n if ( a = xe - ye ) {\r\n if ( a > 0 ) {\r\n ye = xe;\r\n t = yc;\r\n } else {\r\n a = -a;\r\n t = xc;\r\n }\r\n\r\n t.reverse();\r\n for ( ; a--; t.push(0) );\r\n t.reverse();\r\n }\r\n\r\n a = xc.length;\r\n b = yc.length;\r\n\r\n // Point xc to the longer array, and b to the shorter length.\r\n if ( a - b < 0 ) t = yc, yc = xc, xc = t, b = a;\r\n\r\n // Only start adding at yc.length - 1 as the further digits of xc can be ignored.\r\n for ( a = 0; b; ) {\r\n a = ( xc[--b] = xc[b] + yc[b] + a ) / BASE | 0;\r\n xc[b] %= BASE;\r\n }\r\n\r\n if (a) {\r\n xc.unshift(a);\r\n ++ye;\r\n }\r\n\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n // ye = MAX_EXP + 1 possible\r\n return normalise( y, xc, ye );\r\n };\r\n\r\n\r\n /*\r\n * Return the number of significant digits of the value of this BigNumber.\r\n *\r\n * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.\r\n */\r\n P.precision = P.sd = function (z) {\r\n var n, v,\r\n x = this,\r\n c = x.c;\r\n\r\n // 'precision() argument not a boolean or binary digit: {z}'\r\n if ( z != null && z !== !!z && z !== 1 && z !== 0 ) {\r\n if (ERRORS) raise( 13, 'argument' + notBool, z );\r\n if ( z != !!z ) z = null;\r\n }\r\n\r\n if ( !c ) return null;\r\n v = c.length - 1;\r\n n = v * LOG_BASE + 1;\r\n\r\n if ( v = c[v] ) {\r\n\r\n // Subtract the number of trailing zeros of the last element.\r\n for ( ; v % 10 == 0; v /= 10, n-- );\r\n\r\n // Add the number of digits of the first element.\r\n for ( v = c[0]; v >= 10; v /= 10, n++ );\r\n }\r\n\r\n if ( z && x.e + 1 > n ) n = x.e + 1;\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of\r\n * dp decimal places using rounding mode rm, or to 0 and ROUNDING_MODE respectively if\r\n * omitted.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'round() decimal places out of range: {dp}'\r\n * 'round() decimal places not an integer: {dp}'\r\n * 'round() rounding mode not an integer: {rm}'\r\n * 'round() rounding mode out of range: {rm}'\r\n */\r\n P.round = function ( dp, rm ) {\r\n var n = new BigNumber(this);\r\n\r\n if ( dp == null || isValidInt( dp, 0, MAX, 15 ) ) {\r\n round( n, ~~dp + this.e + 1, rm == null ||\r\n !isValidInt( rm, 0, 8, 15, roundingMode ) ? ROUNDING_MODE : rm | 0 );\r\n }\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber shifted by k places\r\n * (powers of 10). Shift to the right if n > 0, and to the left if n < 0.\r\n *\r\n * k {number} Integer, -MAX_SAFE_INTEGER to MAX_SAFE_INTEGER inclusive.\r\n *\r\n * If k is out of range and ERRORS is false, the result will be ±0 if k < 0, or ±Infinity\r\n * otherwise.\r\n *\r\n * 'shift() argument not an integer: {k}'\r\n * 'shift() argument out of range: {k}'\r\n */\r\n P.shift = function (k) {\r\n var n = this;\r\n return isValidInt( k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 16, 'argument' )\r\n\r\n // k < 1e+21, or truncate(k) will produce exponential notation.\r\n ? n.times( '1e' + truncate(k) )\r\n : new BigNumber( n.c && n.c[0] && ( k < -MAX_SAFE_INTEGER || k > MAX_SAFE_INTEGER )\r\n ? n.s * ( k < 0 ? 0 : 1 / 0 )\r\n : n );\r\n };\r\n\r\n\r\n /*\r\n * sqrt(-n) = N\r\n * sqrt( N) = N\r\n * sqrt(-I) = N\r\n * sqrt( I) = I\r\n * sqrt( 0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n * Return a new BigNumber whose value is the square root of the value of this BigNumber,\r\n * rounded according to DECIMAL_PLACES and ROUNDING_MODE.\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, r, rep, t,\r\n x = this,\r\n c = x.c,\r\n s = x.s,\r\n e = x.e,\r\n dp = DECIMAL_PLACES + 4,\r\n half = new BigNumber('0.5');\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if ( s !== 1 || !c || !c[0] ) {\r\n return new BigNumber( !s || s < 0 && ( !c || c[0] ) ? NaN : c ? x : 1 / 0 );\r\n }\r\n\r\n // Initial estimate.\r\n s = Math.sqrt( +x );\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if ( s == 0 || s == 1 / 0 ) {\r\n n = coeffToString(c);\r\n if ( ( n.length + e ) % 2 == 0 ) n += '0';\r\n s = Math.sqrt(n);\r\n e = bitFloor( ( e + 1 ) / 2 ) - ( e < 0 || e % 2 );\r\n\r\n if ( s == 1 / 0 ) {\r\n n = '1e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice( 0, n.indexOf('e') + 1 ) + e;\r\n }\r\n\r\n r = new BigNumber(n);\r\n } else {\r\n r = new BigNumber( s + '' );\r\n }\r\n\r\n // Check for zero.\r\n // r could be zero if MIN_EXP is changed after the this value was created.\r\n // This would cause a division by zero (x/t) and hence Infinity below, which would cause\r\n // coeffToString to throw.\r\n if ( r.c[0] ) {\r\n e = r.e;\r\n s = e + dp;\r\n if ( s < 3 ) s = 0;\r\n\r\n // Newton-Raphson iteration.\r\n for ( ; ; ) {\r\n t = r;\r\n r = half.times( t.plus( div( x, t, dp, 1 ) ) );\r\n\r\n if ( coeffToString( t.c ).slice( 0, s ) === ( n =\r\n coeffToString( r.c ) ).slice( 0, s ) ) {\r\n\r\n // The exponent of r may here be one less than the final result exponent,\r\n // e.g 0.0009999 (e-4) --> 0.001 (e-3), so adjust s so the rounding digits\r\n // are indexed correctly.\r\n if ( r.e < e ) --s;\r\n n = n.slice( s - 3, s + 1 );\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits\r\n // are 9999 or 4999 (i.e. approaching a rounding boundary) continue the\r\n // iteration.\r\n if ( n == '9999' || !rep && n == '4999' ) {\r\n\r\n // On the first iteration only, check to see if rounding up gives the\r\n // exact result as the nines may infinitely repeat.\r\n if ( !rep ) {\r\n round( t, t.e + DECIMAL_PLACES + 2, 0 );\r\n\r\n if ( t.times(t).eq(x) ) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n dp += 4;\r\n s += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If rounding digits are null, 0{0,4} or 50{0,3}, check for exact\r\n // result. If not, then there are further digits and m will be truthy.\r\n if ( !+n || !+n.slice(1) && n.charAt(0) == '5' ) {\r\n\r\n // Truncate to the first rounding digit.\r\n round( r, r.e + DECIMAL_PLACES + 2, 1 );\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return round( r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m );\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new BigNumber whose value is the value of this BigNumber times the value of\r\n * BigNumber(y, b).\r\n */\r\n P.times = P.mul = function ( y, b ) {\r\n var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc,\r\n base, sqrtBase,\r\n x = this,\r\n xc = x.c,\r\n yc = ( id = 17, y = new BigNumber( y, b ) ).c;\r\n\r\n // Either NaN, ±Infinity or ±0?\r\n if ( !xc || !yc || !xc[0] || !yc[0] ) {\r\n\r\n // Return NaN if either is NaN, or one is 0 and the other is Infinity.\r\n if ( !x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc ) {\r\n y.c = y.e = y.s = null;\r\n } else {\r\n y.s *= x.s;\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n if ( !xc || !yc ) {\r\n y.c = y.e = null;\r\n\r\n // Return ±0 if either is ±0.\r\n } else {\r\n y.c = [0];\r\n y.e = 0;\r\n }\r\n }\r\n\r\n return y;\r\n }\r\n\r\n e = bitFloor( x.e / LOG_BASE ) + bitFloor( y.e / LOG_BASE );\r\n y.s *= x.s;\r\n xcL = xc.length;\r\n ycL = yc.length;\r\n\r\n // Ensure xc points to longer array and xcL to its length.\r\n if ( xcL < ycL ) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;\r\n\r\n // Initialise the result array with zeros.\r\n for ( i = xcL + ycL, zc = []; i--; zc.push(0) );\r\n\r\n base = BASE;\r\n sqrtBase = SQRT_BASE;\r\n\r\n for ( i = ycL; --i >= 0; ) {\r\n c = 0;\r\n ylo = yc[i] % sqrtBase;\r\n yhi = yc[i] / sqrtBase | 0;\r\n\r\n for ( k = xcL, j = i + k; j > i; ) {\r\n xlo = xc[--k] % sqrtBase;\r\n xhi = xc[k] / sqrtBase | 0;\r\n m = yhi * xlo + xhi * ylo;\r\n xlo = ylo * xlo + ( ( m % sqrtBase ) * sqrtBase ) + zc[j] + c;\r\n c = ( xlo / base | 0 ) + ( m / sqrtBase | 0 ) + yhi * xhi;\r\n zc[j--] = xlo % base;\r\n }\r\n\r\n zc[j] = c;\r\n }\r\n\r\n if (c) {\r\n ++e;\r\n } else {\r\n zc.shift();\r\n }\r\n\r\n return normalise( y, zc, e );\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber rounded to a maximum of\r\n * sd significant digits using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toDigits() precision out of range: {sd}'\r\n * 'toDigits() precision not an integer: {sd}'\r\n * 'toDigits() rounding mode not an integer: {rm}'\r\n * 'toDigits() rounding mode out of range: {rm}'\r\n */\r\n P.toDigits = function ( sd, rm ) {\r\n var n = new BigNumber(this);\r\n sd = sd == null || !isValidInt( sd, 1, MAX, 18, 'precision' ) ? null : sd | 0;\r\n rm = rm == null || !isValidInt( rm, 0, 8, 18, roundingMode ) ? ROUNDING_MODE : rm | 0;\r\n return sd ? round( n, sd, rm ) : n;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in exponential notation and\r\n * rounded using ROUNDING_MODE to dp fixed decimal places.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toExponential() decimal places not an integer: {dp}'\r\n * 'toExponential() decimal places out of range: {dp}'\r\n * 'toExponential() rounding mode not an integer: {rm}'\r\n * 'toExponential() rounding mode out of range: {rm}'\r\n */\r\n P.toExponential = function ( dp, rm ) {\r\n return format( this,\r\n dp != null && isValidInt( dp, 0, MAX, 19 ) ? ~~dp + 1 : null, rm, 19 );\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounding\r\n * to dp fixed decimal places using rounding mode rm, or ROUNDING_MODE if rm is omitted.\r\n *\r\n * Note: as with JavaScript's number type, (-0).toFixed(0) is '0',\r\n * but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toFixed() decimal places not an integer: {dp}'\r\n * 'toFixed() decimal places out of range: {dp}'\r\n * 'toFixed() rounding mode not an integer: {rm}'\r\n * 'toFixed() rounding mode out of range: {rm}'\r\n */\r\n P.toFixed = function ( dp, rm ) {\r\n return format( this, dp != null && isValidInt( dp, 0, MAX, 20 )\r\n ? ~~dp + this.e + 1 : null, rm, 20 );\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in fixed-point notation rounded\r\n * using rm or ROUNDING_MODE to dp decimal places, and formatted according to the properties\r\n * of the FORMAT object (see BigNumber.config).\r\n *\r\n * FORMAT = {\r\n * decimalSeparator : '.',\r\n * groupSeparator : ',',\r\n * groupSize : 3,\r\n * secondaryGroupSize : 0,\r\n * fractionGroupSeparator : '\\xA0', // non-breaking space\r\n * fractionGroupSize : 0\r\n * };\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toFormat() decimal places not an integer: {dp}'\r\n * 'toFormat() decimal places out of range: {dp}'\r\n * 'toFormat() rounding mode not an integer: {rm}'\r\n * 'toFormat() rounding mode out of range: {rm}'\r\n */\r\n P.toFormat = function ( dp, rm ) {\r\n var str = format( this, dp != null && isValidInt( dp, 0, MAX, 21 )\r\n ? ~~dp + this.e + 1 : null, rm, 21 );\r\n\r\n if ( this.c ) {\r\n var i,\r\n arr = str.split('.'),\r\n g1 = +FORMAT.groupSize,\r\n g2 = +FORMAT.secondaryGroupSize,\r\n groupSeparator = FORMAT.groupSeparator,\r\n intPart = arr[0],\r\n fractionPart = arr[1],\r\n isNeg = this.s < 0,\r\n intDigits = isNeg ? intPart.slice(1) : intPart,\r\n len = intDigits.length;\r\n\r\n if (g2) i = g1, g1 = g2, g2 = i, len -= i;\r\n\r\n if ( g1 > 0 && len > 0 ) {\r\n i = len % g1 || g1;\r\n intPart = intDigits.substr( 0, i );\r\n\r\n for ( ; i < len; i += g1 ) {\r\n intPart += groupSeparator + intDigits.substr( i, g1 );\r\n }\r\n\r\n if ( g2 > 0 ) intPart += groupSeparator + intDigits.slice(i);\r\n if (isNeg) intPart = '-' + intPart;\r\n }\r\n\r\n str = fractionPart\r\n ? intPart + FORMAT.decimalSeparator + ( ( g2 = +FORMAT.fractionGroupSize )\r\n ? fractionPart.replace( new RegExp( '\\\\d{' + g2 + '}\\\\B', 'g' ),\r\n '$&' + FORMAT.fractionGroupSeparator )\r\n : fractionPart )\r\n : intPart;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return a string array representing the value of this BigNumber as a simple fraction with\r\n * an integer numerator and an integer denominator. The denominator will be a positive\r\n * non-zero value less than or equal to the specified maximum denominator. If a maximum\r\n * denominator is not specified, the denominator will be the lowest value necessary to\r\n * represent the number exactly.\r\n *\r\n * [md] {number|string|BigNumber} Integer >= 1 and < Infinity. The maximum denominator.\r\n *\r\n * 'toFraction() max denominator not an integer: {md}'\r\n * 'toFraction() max denominator out of range: {md}'\r\n */\r\n P.toFraction = function (md) {\r\n var arr, d0, d2, e, exp, n, n0, q, s,\r\n k = ERRORS,\r\n x = this,\r\n xc = x.c,\r\n d = new BigNumber(ONE),\r\n n1 = d0 = new BigNumber(ONE),\r\n d1 = n0 = new BigNumber(ONE);\r\n\r\n if ( md != null ) {\r\n ERRORS = false;\r\n n = new BigNumber(md);\r\n ERRORS = k;\r\n\r\n if ( !( k = n.isInt() ) || n.lt(ONE) ) {\r\n\r\n if (ERRORS) {\r\n raise( 22,\r\n 'max denominator ' + ( k ? 'out of range' : 'not an integer' ), md );\r\n }\r\n\r\n // ERRORS is false:\r\n // If md is a finite non-integer >= 1, round it to an integer and use it.\r\n md = !k && n.c && round( n, n.e + 1, 1 ).gte(ONE) ? n : null;\r\n }\r\n }\r\n\r\n if ( !xc ) return x.toString();\r\n s = coeffToString(xc);\r\n\r\n // Determine initial denominator.\r\n // d is a power of 10 and the minimum max denominator that specifies the value exactly.\r\n e = d.e = s.length - x.e - 1;\r\n d.c[0] = POWS_TEN[ ( exp = e % LOG_BASE ) < 0 ? LOG_BASE + exp : exp ];\r\n md = !md || n.cmp(d) > 0 ? ( e > 0 ? d : n1 ) : n;\r\n\r\n exp = MAX_EXP;\r\n MAX_EXP = 1 / 0;\r\n n = new BigNumber(s);\r\n\r\n // n0 = d1 = 0\r\n n0.c[0] = 0;\r\n\r\n for ( ; ; ) {\r\n q = div( n, d, 0, 1 );\r\n d2 = d0.plus( q.times(d1) );\r\n if ( d2.cmp(md) == 1 ) break;\r\n d0 = d1;\r\n d1 = d2;\r\n n1 = n0.plus( q.times( d2 = n1 ) );\r\n n0 = d2;\r\n d = n.minus( q.times( d2 = d ) );\r\n n = d2;\r\n }\r\n\r\n d2 = div( md.minus(d0), d1, 0, 1 );\r\n n0 = n0.plus( d2.times(n1) );\r\n d0 = d0.plus( d2.times(d1) );\r\n n0.s = n1.s = x.s;\r\n e *= 2;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1\r\n arr = div( n1, d1, e, ROUNDING_MODE ).minus(x).abs().cmp(\r\n div( n0, d0, e, ROUNDING_MODE ).minus(x).abs() ) < 1\r\n ? [ n1.toString(), d1.toString() ]\r\n : [ n0.toString(), d0.toString() ];\r\n\r\n MAX_EXP = exp;\r\n return arr;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this BigNumber converted to a number primitive.\r\n */\r\n P.toNumber = function () {\r\n return +this;\r\n };\r\n\r\n\r\n /*\r\n * Return a BigNumber whose value is the value of this BigNumber raised to the power n.\r\n * If n is negative round according to DECIMAL_PLACES and ROUNDING_MODE.\r\n * If POW_PRECISION is not 0, round to POW_PRECISION using ROUNDING_MODE.\r\n *\r\n * n {number} Integer, -9007199254740992 to 9007199254740992 inclusive.\r\n * (Performs 54 loop iterations for n of 9007199254740992.)\r\n *\r\n * 'pow() exponent not an integer: {n}'\r\n * 'pow() exponent out of range: {n}'\r\n */\r\n P.toPower = P.pow = function (n) {\r\n var k, y,\r\n i = mathfloor( n < 0 ? -n : +n ),\r\n x = this;\r\n\r\n // Pass ±Infinity to Math.pow if exponent is out of range.\r\n if ( !isValidInt( n, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER, 23, 'exponent' ) &&\r\n ( !isFinite(n) || i > MAX_SAFE_INTEGER && ( n /= 0 ) ||\r\n parseFloat(n) != n && !( n = NaN ) ) ) {\r\n return new BigNumber( Math.pow( +x, n ) );\r\n }\r\n\r\n // Truncating each coefficient array to a length of k after each multiplication equates\r\n // to truncating significant digits to POW_PRECISION + [28, 41], i.e. there will be a\r\n // minimum of 28 guard digits retained. (Using + 1.5 would give [9, 21] guard digits.)\r\n k = POW_PRECISION ? mathceil( POW_PRECISION / LOG_BASE + 2 ) : 0;\r\n y = new BigNumber(ONE);\r\n\r\n for ( ; ; ) {\r\n\r\n if ( i % 2 ) {\r\n y = y.times(x);\r\n if ( !y.c ) break;\r\n if ( k && y.c.length > k ) y.c.length = k;\r\n }\r\n\r\n i = mathfloor( i / 2 );\r\n if ( !i ) break;\r\n\r\n x = x.times(x);\r\n if ( k && x.c && x.c.length > k ) x.c.length = k;\r\n }\r\n\r\n if ( n < 0 ) y = ONE.div(y);\r\n return k ? round( y, POW_PRECISION, ROUNDING_MODE ) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber rounded to sd significant digits\r\n * using rounding mode rm or ROUNDING_MODE. If sd is less than the number of digits\r\n * necessary to represent the integer part of the value in fixed-point notation, then use\r\n * exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toPrecision() precision not an integer: {sd}'\r\n * 'toPrecision() precision out of range: {sd}'\r\n * 'toPrecision() rounding mode not an integer: {rm}'\r\n * 'toPrecision() rounding mode out of range: {rm}'\r\n */\r\n P.toPrecision = function ( sd, rm ) {\r\n return format( this, sd != null && isValidInt( sd, 1, MAX, 24, 'precision' )\r\n ? sd | 0 : null, rm, 24 );\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this BigNumber in base b, or base 10 if b is\r\n * omitted. If a base is specified, including base 10, round according to DECIMAL_PLACES and\r\n * ROUNDING_MODE. If a base is not specified, and this BigNumber has a positive exponent\r\n * that is equal to or greater than TO_EXP_POS, or a negative exponent equal to or less than\r\n * TO_EXP_NEG, return exponential notation.\r\n *\r\n * [b] {number} Integer, 2 to 64 inclusive.\r\n *\r\n * 'toString() base not an integer: {b}'\r\n * 'toString() base out of range: {b}'\r\n */\r\n P.toString = function (b) {\r\n var str,\r\n n = this,\r\n s = n.s,\r\n e = n.e;\r\n\r\n // Infinity or NaN?\r\n if ( e === null ) {\r\n\r\n if (s) {\r\n str = 'Infinity';\r\n if ( s < 0 ) str = '-' + str;\r\n } else {\r\n str = 'NaN';\r\n }\r\n } else {\r\n str = coeffToString( n.c );\r\n\r\n if ( b == null || !isValidInt( b, 2, 64, 25, 'base' ) ) {\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential( str, e )\r\n : toFixedPoint( str, e );\r\n } else {\r\n str = convertBase( toFixedPoint( str, e ), b | 0, 10, s );\r\n }\r\n\r\n if ( s < 0 && n.c[0] ) str = '-' + str;\r\n }\r\n\r\n return str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new BigNumber whose value is the value of this BigNumber truncated to a whole\r\n * number.\r\n */\r\n P.truncated = P.trunc = function () {\r\n return round( new BigNumber(this), this.e + 1, 1 );\r\n };\r\n\r\n\r\n\r\n /*\r\n * Return as toString, but do not accept a base argument, and include the minus sign for\r\n * negative zero.\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n var str,\r\n n = this,\r\n e = n.e;\r\n\r\n if ( e === null ) return n.toString();\r\n\r\n str = coeffToString( n.c );\r\n\r\n str = e <= TO_EXP_NEG || e >= TO_EXP_POS\r\n ? toExponential( str, e )\r\n : toFixedPoint( str, e );\r\n\r\n return n.s < 0 ? '-' + str : str;\r\n };\r\n\r\n\r\n // Aliases for BigDecimal methods.\r\n //P.add = P.plus; // P.add included above\r\n //P.subtract = P.minus; // P.sub included above\r\n //P.multiply = P.times; // P.mul included above\r\n //P.divide = P.div;\r\n //P.remainder = P.mod;\r\n //P.compareTo = P.cmp;\r\n //P.negate = P.neg;\r\n\r\n\r\n if ( configObj != null ) BigNumber.config(configObj);\r\n\r\n return BigNumber;\r\n }\r\n\r\n\r\n // PRIVATE HELPER FUNCTIONS\r\n\r\n\r\n function bitFloor(n) {\r\n var i = n | 0;\r\n return n > 0 || n === i ? i : i - 1;\r\n }\r\n\r\n\r\n // Return a coefficient array as a string of base 10 digits.\r\n function coeffToString(a) {\r\n var s, z,\r\n i = 1,\r\n j = a.length,\r\n r = a[0] + '';\r\n\r\n for ( ; i < j; ) {\r\n s = a[i++] + '';\r\n z = LOG_BASE - s.length;\r\n for ( ; z--; s = '0' + s );\r\n r += s;\r\n }\r\n\r\n // Determine trailing zeros.\r\n for ( j = r.length; r.charCodeAt(--j) === 48; );\r\n return r.slice( 0, j + 1 || 1 );\r\n }\r\n\r\n\r\n // Compare the value of BigNumbers x and y.\r\n function compare( x, y ) {\r\n var a, b,\r\n xc = x.c,\r\n yc = y.c,\r\n i = x.s,\r\n j = y.s,\r\n k = x.e,\r\n l = y.e;\r\n\r\n // Either NaN?\r\n if ( !i || !j ) return null;\r\n\r\n a = xc && !xc[0];\r\n b = yc && !yc[0];\r\n\r\n // Either zero?\r\n if ( a || b ) return a ? b ? 0 : -j : i;\r\n\r\n // Signs differ?\r\n if ( i != j ) return i;\r\n\r\n a = i < 0;\r\n b = k == l;\r\n\r\n // Either Infinity?\r\n if ( !xc || !yc ) return b ? 0 : !xc ^ a ? 1 : -1;\r\n\r\n // Compare exponents.\r\n if ( !b ) return k > l ^ a ? 1 : -1;\r\n\r\n j = ( k = xc.length ) < ( l = yc.length ) ? k : l;\r\n\r\n // Compare digit by digit.\r\n for ( i = 0; i < j; i++ ) if ( xc[i] != yc[i] ) return xc[i] > yc[i] ^ a ? 1 : -1;\r\n\r\n // Compare lengths.\r\n return k == l ? 0 : k > l ^ a ? 1 : -1;\r\n }\r\n\r\n\r\n /*\r\n * Return true if n is a valid number in range, otherwise false.\r\n * Use for argument validation when ERRORS is false.\r\n * Note: parseInt('1e+1') == 1 but parseFloat('1e+1') == 10.\r\n */\r\n function intValidatorNoErrors( n, min, max ) {\r\n return ( n = truncate(n) ) >= min && n <= max;\r\n }\r\n\r\n\r\n function isArray(obj) {\r\n return Object.prototype.toString.call(obj) == '[object Array]';\r\n }\r\n\r\n\r\n /*\r\n * Convert string of baseIn to an array of numbers of baseOut.\r\n * Eg. convertBase('255', 10, 16) returns [15, 15].\r\n * Eg. convertBase('ff', 16, 10) returns [2, 5, 5].\r\n */\r\n function toBaseOut( str, baseIn, baseOut ) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n len = str.length;\r\n\r\n for ( ; i < len; ) {\r\n for ( arrL = arr.length; arrL--; arr[arrL] *= baseIn );\r\n arr[ j = 0 ] += ALPHABET.indexOf( str.charAt( i++ ) );\r\n\r\n for ( ; j < arr.length; j++ ) {\r\n\r\n if ( arr[j] > baseOut - 1 ) {\r\n if ( arr[j + 1] == null ) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n\r\n function toExponential( str, e ) {\r\n return ( str.length > 1 ? str.charAt(0) + '.' + str.slice(1) : str ) +\r\n ( e < 0 ? 'e' : 'e+' ) + e;\r\n }\r\n\r\n\r\n function toFixedPoint( str, e ) {\r\n var len, z;\r\n\r\n // Negative exponent?\r\n if ( e < 0 ) {\r\n\r\n // Prepend zeros.\r\n for ( z = '0.'; ++e; z += '0' );\r\n str = z + str;\r\n\r\n // Positive exponent\r\n } else {\r\n len = str.length;\r\n\r\n // Append zeros.\r\n if ( ++e > len ) {\r\n for ( z = '0', e -= len; --e; z += '0' );\r\n str += z;\r\n } else if ( e < len ) {\r\n str = str.slice( 0, e ) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n function truncate(n) {\r\n n = parseFloat(n);\r\n return n < 0 ? mathceil(n) : mathfloor(n);\r\n }\r\n\r\n\r\n // EXPORT\r\n\r\n\r\n BigNumber = another();\r\n\r\n // AMD.\r\n if ( true ) {\r\n !(__WEBPACK_AMD_DEFINE_RESULT__ = function () { return BigNumber; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n\r\n // Node and other environments that support module.exports.\r\n } else if ( typeof module != 'undefined' && module.exports ) {\r\n module.exports = BigNumber;\r\n if ( !crypto ) try { crypto = require('cry' + 'pto'); } catch (e) {}\r\n\r\n // Browser.\r\n } else {\r\n global.BigNumber = BigNumber;\r\n }\r\n})(this);\r\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/bignumber.js/bignumber.js\n ** module id = 267\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/bignumber.js/bignumber.js?"); /***/ }, /* 268 */ @@ -1713,7 +1713,7 @@ var ripple = /* 278 */ /***/ function(module, exports) { - eval("\n/**\n * isArray\n */\n\nvar isArray = Array.isArray;\n\n/**\n * toString\n */\n\nvar str = Object.prototype.toString;\n\n/**\n * Whether or not the given `val`\n * is an array.\n *\n * example:\n *\n * isArray([]);\n * // > true\n * isArray(arguments);\n * // > false\n * isArray('');\n * // > false\n *\n * @param {mixed} val\n * @return {bool}\n */\n\nmodule.exports = isArray || function (val) {\n return !! val && '[object Array]' == str.call(val);\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/~/node-libs-browser/~/buffer/~/is-array/index.js\n ** module id = 278\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///(webpack)/~/node-libs-browser/~/buffer/~/is-array/index.js?"); + eval("module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** (webpack)/~/node-libs-browser/~/buffer/~/isarray/index.js\n ** module id = 278\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///(webpack)/~/node-libs-browser/~/buffer/~/isarray/index.js?"); /***/ }, /* 279 */ @@ -1851,7 +1851,7 @@ var ripple = /* 301 */ /***/ function(module, exports) { - eval("module.exports = {\n\t\"name\": \"elliptic\",\n\t\"version\": \"5.2.1\",\n\t\"description\": \"EC cryptography\",\n\t\"main\": \"lib/elliptic.js\",\n\t\"scripts\": {\n\t\t\"test\": \"make lint && istanbul test _mocha --reporter=spec test/*-test.js\",\n\t\t\"coveralls\": \"cat ./coverage/lcov.info | coveralls\"\n\t},\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"git+ssh://git@github.com/indutny/elliptic.git\"\n\t},\n\t\"keywords\": [\n\t\t\"EC\",\n\t\t\"Elliptic\",\n\t\t\"curve\",\n\t\t\"Cryptography\"\n\t],\n\t\"author\": {\n\t\t\"name\": \"Fedor Indutny\",\n\t\t\"email\": \"fedor@indutny.com\"\n\t},\n\t\"license\": \"MIT\",\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/indutny/elliptic/issues\"\n\t},\n\t\"homepage\": \"https://github.com/indutny/elliptic\",\n\t\"devDependencies\": {\n\t\t\"browserify\": \"^3.44.2\",\n\t\t\"coveralls\": \"^2.11.3\",\n\t\t\"istanbul\": \"^0.3.17\",\n\t\t\"jscs\": \"^1.11.3\",\n\t\t\"jshint\": \"^2.6.0\",\n\t\t\"mocha\": \"^2.1.0\",\n\t\t\"uglify-js\": \"^2.4.13\"\n\t},\n\t\"dependencies\": {\n\t\t\"bn.js\": \"^3.1.1\",\n\t\t\"brorand\": \"^1.0.1\",\n\t\t\"hash.js\": \"^1.0.0\",\n\t\t\"inherits\": \"^2.0.1\"\n\t},\n\t\"readme\": \"# Elliptic [![Build Status](https://secure.travis-ci.org/indutny/elliptic.png)](http://travis-ci.org/indutny/elliptic) [![Coverage Status](https://coveralls.io/repos/indutny/elliptic/badge.svg?branch=master&service=github)](https://coveralls.io/github/indutny/elliptic?branch=master)\\n\\nFast elliptic-curve cryptography in a plain javascript implementation.\\n\\nNOTE: Please take a look at http://safecurves.cr.yp.to/ before choosing a curve\\nfor your cryptography operations.\\n\\n## Incentive\\n\\nECC is much slower than regular RSA cryptography, the JS implementations are\\neven more slower.\\n\\n## Benchmarks\\n\\n```bash\\n$ node benchmarks/index.js\\nBenchmarking: sign\\nelliptic#sign x 262 ops/sec ±0.51% (177 runs sampled)\\neccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled)\\n------------------------\\nFastest is elliptic#sign\\n========================\\nBenchmarking: verify\\nelliptic#verify x 113 ops/sec ±0.50% (166 runs sampled)\\neccjs#verify x 48.56 ops/sec ±0.36% (125 runs sampled)\\n------------------------\\nFastest is elliptic#verify\\n========================\\nBenchmarking: gen\\nelliptic#gen x 294 ops/sec ±0.43% (176 runs sampled)\\neccjs#gen x 62.25 ops/sec ±0.63% (129 runs sampled)\\n------------------------\\nFastest is elliptic#gen\\n========================\\nBenchmarking: ecdh\\nelliptic#ecdh x 136 ops/sec ±0.85% (156 runs sampled)\\n------------------------\\nFastest is elliptic#ecdh\\n========================\\n```\\n\\n## API\\n\\n### ECDSA\\n\\n```javascript\\nvar EC = require('elliptic').ec;\\n\\n// Create and initialize EC context\\n// (better do it once and reuse it)\\nvar ec = new EC('secp256k1');\\n\\n// Generate keys\\nvar key = ec.genKeyPair();\\n\\n// Sign message (must be an array, or it'll be treated as a hex sequence)\\nvar msg = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];\\nvar signature = key.sign(msg);\\n\\n// Export DER encoded signature in Array\\nvar derSign = signature.toDER();\\n\\n// Verify signature\\nconsole.log(key.verify(msg, derSign));\\n```\\n\\n### ECDH\\n\\n```javascript\\n// Generate keys\\nvar key1 = ec.genKeyPair();\\nvar key2 = ec.genKeyPair();\\n\\nvar shared1 = key1.derive(key2.getPublic());\\nvar shared2 = key2.derive(key1.getPublic());\\n\\nconsole.log('Both shared secrets are BN instances');\\nconsole.log(shared1.toString(16));\\nconsole.log(shared2.toString(16));\\n```\\n\\nNOTE: `.derive()` returns a [BN][1] instance.\\n\\n## Supported curves\\n\\nElliptic.js support following curve types:\\n\\n* Short Weierstrass\\n* Montgomery\\n* Edwards\\n* Twisted Edwards\\n\\nFollowing curve 'presets' are embedded into the library:\\n\\n* `secp256k1`\\n* `p192`\\n* `p224`\\n* `p256`\\n* `curve25519`\\n* `ed25519`\\n\\nNOTE: That `curve25519` could not be used for ECDSA, use `ed25519` instead.\\n\\n### Implementation details\\n\\nECDSA is using deterministic `k` value generation as per [RFC6979][0]. Most of\\nthe curve operations are performed on non-affine coordinates (either projective\\nor extended), various windowing techniques are used for different cases.\\n\\nAll operations are performed in reduction context using [bn.js][1], hashing is\\nprovided by [hash.js][2]\\n\\n### Related projects\\n\\n* [eccrypto][3]: isomorphic implementation of ECDSA, ECDH and ECIES for both\\n browserify and node (uses `elliptic` for browser and [secp256k1-node][4] for\\n node)\\n\\n#### LICENSE\\n\\nThis software is licensed under the MIT License.\\n\\nCopyright Fedor Indutny, 2014.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a\\ncopy of this software and associated documentation files (the\\n\\\"Software\\\"), to deal in the Software without restriction, including\\nwithout limitation the rights to use, copy, modify, merge, publish,\\ndistribute, sublicense, and/or sell copies of the Software, and to permit\\npersons to whom the Software is furnished to do so, subject to the\\nfollowing conditions:\\n\\nThe above copyright notice and this permission notice shall be included\\nin all copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n[0]: http://tools.ietf.org/html/rfc6979\\n[1]: https://github.com/indutny/bn.js\\n[2]: https://github.com/indutny/hash.js\\n[3]: https://github.com/bitchan/eccrypto\\n[4]: https://github.com/wanderer/secp256k1-node\\n\",\n\t\"readmeFilename\": \"README.md\",\n\t\"_id\": \"elliptic@5.2.1\",\n\t\"_shasum\": \"fa294b6563c6ddbc9ba3dc8594687ae840858f10\",\n\t\"_resolved\": \"https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz\",\n\t\"_from\": \"https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz\"\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/ripple-keypairs/~/elliptic/package.json\n ** module id = 301\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/ripple-keypairs/~/elliptic/package.json?"); + eval("module.exports = {\n\t\"name\": \"elliptic\",\n\t\"version\": \"5.2.1\",\n\t\"description\": \"EC cryptography\",\n\t\"main\": \"lib/elliptic.js\",\n\t\"scripts\": {\n\t\t\"test\": \"make lint && istanbul test _mocha --reporter=spec test/*-test.js\",\n\t\t\"coveralls\": \"cat ./coverage/lcov.info | coveralls\"\n\t},\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"git+ssh://git@github.com/indutny/elliptic.git\"\n\t},\n\t\"keywords\": [\n\t\t\"EC\",\n\t\t\"Elliptic\",\n\t\t\"curve\",\n\t\t\"Cryptography\"\n\t],\n\t\"author\": {\n\t\t\"name\": \"Fedor Indutny\",\n\t\t\"email\": \"fedor@indutny.com\"\n\t},\n\t\"license\": \"MIT\",\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/indutny/elliptic/issues\"\n\t},\n\t\"homepage\": \"https://github.com/indutny/elliptic\",\n\t\"devDependencies\": {\n\t\t\"browserify\": \"^3.44.2\",\n\t\t\"coveralls\": \"^2.11.3\",\n\t\t\"istanbul\": \"^0.3.17\",\n\t\t\"jscs\": \"^1.11.3\",\n\t\t\"jshint\": \"^2.6.0\",\n\t\t\"mocha\": \"^2.1.0\",\n\t\t\"uglify-js\": \"^2.4.13\"\n\t},\n\t\"dependencies\": {\n\t\t\"bn.js\": \"^3.1.1\",\n\t\t\"brorand\": \"^1.0.1\",\n\t\t\"hash.js\": \"^1.0.0\",\n\t\t\"inherits\": \"^2.0.1\"\n\t},\n\t\"readme\": \"# Elliptic [![Build Status](https://secure.travis-ci.org/indutny/elliptic.png)](http://travis-ci.org/indutny/elliptic) [![Coverage Status](https://coveralls.io/repos/indutny/elliptic/badge.svg?branch=master&service=github)](https://coveralls.io/github/indutny/elliptic?branch=master)\\n\\nFast elliptic-curve cryptography in a plain javascript implementation.\\n\\nNOTE: Please take a look at http://safecurves.cr.yp.to/ before choosing a curve\\nfor your cryptography operations.\\n\\n## Incentive\\n\\nECC is much slower than regular RSA cryptography, the JS implementations are\\neven more slower.\\n\\n## Benchmarks\\n\\n```bash\\n$ node benchmarks/index.js\\nBenchmarking: sign\\nelliptic#sign x 262 ops/sec ±0.51% (177 runs sampled)\\neccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled)\\n------------------------\\nFastest is elliptic#sign\\n========================\\nBenchmarking: verify\\nelliptic#verify x 113 ops/sec ±0.50% (166 runs sampled)\\neccjs#verify x 48.56 ops/sec ±0.36% (125 runs sampled)\\n------------------------\\nFastest is elliptic#verify\\n========================\\nBenchmarking: gen\\nelliptic#gen x 294 ops/sec ±0.43% (176 runs sampled)\\neccjs#gen x 62.25 ops/sec ±0.63% (129 runs sampled)\\n------------------------\\nFastest is elliptic#gen\\n========================\\nBenchmarking: ecdh\\nelliptic#ecdh x 136 ops/sec ±0.85% (156 runs sampled)\\n------------------------\\nFastest is elliptic#ecdh\\n========================\\n```\\n\\n## API\\n\\n### ECDSA\\n\\n```javascript\\nvar EC = require('elliptic').ec;\\n\\n// Create and initialize EC context\\n// (better do it once and reuse it)\\nvar ec = new EC('secp256k1');\\n\\n// Generate keys\\nvar key = ec.genKeyPair();\\n\\n// Sign message (must be an array, or it'll be treated as a hex sequence)\\nvar msg = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];\\nvar signature = key.sign(msg);\\n\\n// Export DER encoded signature in Array\\nvar derSign = signature.toDER();\\n\\n// Verify signature\\nconsole.log(key.verify(msg, derSign));\\n```\\n\\n### ECDH\\n\\n```javascript\\n// Generate keys\\nvar key1 = ec.genKeyPair();\\nvar key2 = ec.genKeyPair();\\n\\nvar shared1 = key1.derive(key2.getPublic());\\nvar shared2 = key2.derive(key1.getPublic());\\n\\nconsole.log('Both shared secrets are BN instances');\\nconsole.log(shared1.toString(16));\\nconsole.log(shared2.toString(16));\\n```\\n\\nNOTE: `.derive()` returns a [BN][1] instance.\\n\\n## Supported curves\\n\\nElliptic.js support following curve types:\\n\\n* Short Weierstrass\\n* Montgomery\\n* Edwards\\n* Twisted Edwards\\n\\nFollowing curve 'presets' are embedded into the library:\\n\\n* `secp256k1`\\n* `p192`\\n* `p224`\\n* `p256`\\n* `curve25519`\\n* `ed25519`\\n\\nNOTE: That `curve25519` could not be used for ECDSA, use `ed25519` instead.\\n\\n### Implementation details\\n\\nECDSA is using deterministic `k` value generation as per [RFC6979][0]. Most of\\nthe curve operations are performed on non-affine coordinates (either projective\\nor extended), various windowing techniques are used for different cases.\\n\\nAll operations are performed in reduction context using [bn.js][1], hashing is\\nprovided by [hash.js][2]\\n\\n### Related projects\\n\\n* [eccrypto][3]: isomorphic implementation of ECDSA, ECDH and ECIES for both\\n browserify and node (uses `elliptic` for browser and [secp256k1-node][4] for\\n node)\\n\\n#### LICENSE\\n\\nThis software is licensed under the MIT License.\\n\\nCopyright Fedor Indutny, 2014.\\n\\nPermission is hereby granted, free of charge, to any person obtaining a\\ncopy of this software and associated documentation files (the\\n\\\"Software\\\"), to deal in the Software without restriction, including\\nwithout limitation the rights to use, copy, modify, merge, publish,\\ndistribute, sublicense, and/or sell copies of the Software, and to permit\\npersons to whom the Software is furnished to do so, subject to the\\nfollowing conditions:\\n\\nThe above copyright notice and this permission notice shall be included\\nin all copies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\\n\\n[0]: http://tools.ietf.org/html/rfc6979\\n[1]: https://github.com/indutny/bn.js\\n[2]: https://github.com/indutny/hash.js\\n[3]: https://github.com/bitchan/eccrypto\\n[4]: https://github.com/wanderer/secp256k1-node\\n\",\n\t\"readmeFilename\": \"README.md\",\n\t\"_id\": \"elliptic@5.2.1\",\n\t\"_shasum\": \"fa294b6563c6ddbc9ba3dc8594687ae840858f10\",\n\t\"_resolved\": \"https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz\",\n\t\"_from\": \"elliptic@>=5.1.0 <6.0.0\"\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/ripple-keypairs/~/elliptic/package.json\n ** module id = 301\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/ripple-keypairs/~/elliptic/package.json?"); /***/ }, /* 302 */ @@ -2049,7 +2049,7 @@ var ripple = /* 334 */ /***/ function(module, exports, __webpack_require__) { - eval("/* WEBPACK VAR INJECTION */(function(Buffer) {'use strict';\n\nvar _get = __webpack_require__(2)['default'];\n\nvar _inherits = __webpack_require__(16)['default'];\n\nvar _createClass = __webpack_require__(27)['default'];\n\nvar _classCallCheck = __webpack_require__(30)['default'];\n\nvar _Number$isInteger = __webpack_require__(335)['default'];\n\nvar _Promise = __webpack_require__(31)['default'];\n\nvar _Object$assign = __webpack_require__(339)['default'];\n\nvar _ = __webpack_require__(262);\n\nvar _require = __webpack_require__(264);\n\nvar EventEmitter = _require.EventEmitter;\n\nvar WebSocket = __webpack_require__(344);\nvar parseURL = __webpack_require__(345).parse;\nvar RangeSet = __webpack_require__(350).RangeSet;\n\nvar _require2 = __webpack_require__(358);\n\nvar RippledError = _require2.RippledError;\nvar DisconnectedError = _require2.DisconnectedError;\nvar NotConnectedError = _require2.NotConnectedError;\nvar TimeoutError = _require2.TimeoutError;\nvar ResponseFormatError = _require2.ResponseFormatError;\nvar ConnectionError = _require2.ConnectionError;\n\nfunction isStreamMessageType(type) {\n return type === 'ledgerClosed' || type === 'transaction' || type === 'path_find';\n}\n\nvar Connection = (function (_EventEmitter) {\n _inherits(Connection, _EventEmitter);\n\n function Connection(url) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n _classCallCheck(this, Connection);\n\n _get(Object.getPrototypeOf(Connection.prototype), 'constructor', this).call(this);\n this.setMaxListeners(Infinity);\n this._url = url;\n this._trace = options.trace;\n if (this._trace) {\n // for easier unit testing\n this._console = console;\n }\n this._proxyURL = options.proxy;\n this._proxyAuthorization = options.proxyAuthorization;\n this._authorization = options.authorization;\n this._trustedCertificates = options.trustedCertificates;\n this._key = options.key;\n this._passphrase = options.passphrase;\n this._certificate = options.certificate;\n this._timeout = options.timeout || 20 * 1000;\n this._isReady = false;\n this._ws = null;\n this._ledgerVersion = null;\n this._availableLedgerVersions = new RangeSet();\n this._nextRequestID = 1;\n }\n\n // return value is array of arguments to Connection.emit\n\n _createClass(Connection, [{\n key: '_parseMessage',\n value: function _parseMessage(message) {\n var data = JSON.parse(message);\n if (data.type === 'response') {\n if (!(_Number$isInteger(data.id) && data.id >= 0)) {\n throw new ResponseFormatError('valid id not found in response');\n }\n return [data.id.toString(), data];\n } else if (isStreamMessageType(data.type)) {\n if (data.type === 'ledgerClosed') {\n this._ledgerVersion = Number(data.ledger_index);\n this._availableLedgerVersions.reset();\n this._availableLedgerVersions.parseAndAddRanges(data.validated_ledgers);\n }\n return [data.type, data];\n } else if (data.type === undefined && data.error) {\n return ['error', data.error, data.error_message, data]; // e.g. slowDown\n }\n throw new ResponseFormatError('unrecognized message type: ' + data.type);\n }\n }, {\n key: '_onMessage',\n value: function _onMessage(message) {\n var parameters = undefined;\n if (this._trace) {\n this._console.log(message);\n }\n try {\n parameters = this._parseMessage(message);\n } catch (error) {\n this.emit('error', 'badMessage', error.message, message);\n return;\n }\n // we don't want this inside the try/catch or exceptions in listener\n // will be caught\n this.emit.apply(this, parameters);\n }\n }, {\n key: 'isConnected',\n value: function isConnected() {\n return this._state === WebSocket.OPEN && this._isReady;\n }\n }, {\n key: '_onUnexpectedClose',\n value: function _onUnexpectedClose() {\n this._ws = null;\n this._isReady = false;\n this.connect().then();\n }\n }, {\n key: '_onOpen',\n value: function _onOpen() {\n var _this = this;\n\n var request = {\n command: 'subscribe',\n streams: ['ledger']\n };\n return this.request(request).then(function (response) {\n _this._ledgerVersion = Number(response.ledger_index);\n _this._availableLedgerVersions.parseAndAddRanges(response.validated_ledgers);\n _this._isReady = true;\n _this.emit('connected');\n });\n }\n }, {\n key: '_createWebSocket',\n value: function _createWebSocket() {\n var options = {};\n if (this._proxyURL !== undefined) {\n var parsedURL = parseURL(this._url);\n var parsedProxyURL = parseURL(this._proxyURL);\n var proxyOverrides = _.omit({\n secureEndpoint: parsedURL.protocol === 'wss:',\n secureProxy: parsedProxyURL.protocol === 'https:',\n auth: this._proxyAuthorization,\n ca: this._trustedCertificates,\n key: this._key,\n passphrase: this._passphrase,\n cert: this._certificate\n }, _.isUndefined);\n var proxyOptions = _.assign({}, parsedProxyURL, proxyOverrides);\n var HttpsProxyAgent = undefined;\n try {\n HttpsProxyAgent = __webpack_require__(359);\n } catch (error) {\n throw new Error('\"proxy\" option is not supported in the browser');\n }\n options.agent = new HttpsProxyAgent(proxyOptions);\n }\n if (this._authorization !== undefined) {\n var base64 = new Buffer(this._authorization).toString('base64');\n options.headers = { Authorization: 'Basic ' + base64 };\n }\n var optionsOverrides = _.omit({\n ca: this._trustedCertificates,\n key: this._key,\n passphrase: this._passphrase,\n cert: this._certificate\n }, _.isUndefined);\n var websocketOptions = _.assign({}, options, optionsOverrides);\n var websocket = new WebSocket(this._url, websocketOptions);\n // we will have a listener for each outstanding request,\n // so we have to raise the limit (the default is 10)\n websocket.setMaxListeners(Infinity);\n return websocket;\n }\n }, {\n key: 'connect',\n value: function connect() {\n var _this2 = this;\n\n return new _Promise(function (resolve, reject) {\n if (!_this2._url) {\n reject(new ConnectionError('Cannot connect because no server was specified'));\n }\n if (_this2._state === WebSocket.OPEN) {\n resolve();\n } else if (_this2._state === WebSocket.CONNECTING) {\n _this2._ws.once('open', resolve);\n } else {\n _this2._ws = _this2._createWebSocket();\n // when an error causes the connection to close, the close event\n // should still be emitted; the \"ws\" documentation says: \"The close\n // event is also emitted when then underlying net.Socket closes the\n // connection (end or close).\"\n _this2._ws.on('error', function (error) {\n return _this2.emit('error', 'websocket', error.messsage, error);\n });\n _this2._ws.on('message', _this2._onMessage.bind(_this2));\n _this2._onUnexpectedCloseBound = _this2._onUnexpectedClose.bind(_this2);\n _this2._ws.once('close', _this2._onUnexpectedCloseBound);\n _this2._ws.once('open', function () {\n return _this2._onOpen().then(resolve, reject);\n });\n }\n });\n }\n }, {\n key: 'disconnect',\n value: function disconnect() {\n var _this3 = this;\n\n return new _Promise(function (resolve) {\n if (_this3._state === WebSocket.CLOSED) {\n resolve();\n } else if (_this3._state === WebSocket.CLOSING) {\n _this3._ws.once('close', resolve);\n } else {\n _this3._ws.removeListener('close', _this3._onUnexpectedCloseBound);\n _this3._ws.once('close', function () {\n _this3._ws = null;\n _this3._isReady = false;\n resolve();\n });\n _this3._ws.close();\n }\n });\n }\n }, {\n key: 'reconnect',\n value: function reconnect() {\n var _this4 = this;\n\n return this.disconnect().then(function () {\n return _this4.connect();\n });\n }\n }, {\n key: '_whenReady',\n value: function _whenReady(promise) {\n var _this5 = this;\n\n return new _Promise(function (resolve, reject) {\n if (!_this5._shouldBeConnected) {\n reject(new NotConnectedError());\n } else if (_this5._state === WebSocket.OPEN && _this5._isReady) {\n promise.then(resolve, reject);\n } else {\n _this5.once('connected', function () {\n return promise.then(resolve, reject);\n });\n }\n });\n }\n }, {\n key: 'getLedgerVersion',\n value: function getLedgerVersion() {\n return this._whenReady(_Promise.resolve(this._ledgerVersion));\n }\n }, {\n key: 'hasLedgerVersions',\n value: function hasLedgerVersions(lowLedgerVersion, highLedgerVersion) {\n return this._whenReady(_Promise.resolve(this._availableLedgerVersions.containsRange(lowLedgerVersion, highLedgerVersion || this._ledgerVersion)));\n }\n }, {\n key: 'hasLedgerVersion',\n value: function hasLedgerVersion(ledgerVersion) {\n return this.hasLedgerVersions(ledgerVersion, ledgerVersion);\n }\n }, {\n key: '_send',\n value: function _send(message) {\n var _this6 = this;\n\n if (this._trace) {\n this._console.log(message);\n }\n return new _Promise(function (resolve, reject) {\n _this6._ws.send(message, undefined, function (error, result) {\n if (error) {\n reject(new DisconnectedError(error.message));\n } else {\n resolve(result);\n }\n });\n });\n }\n }, {\n key: 'request',\n value: function request(_request, timeout) {\n var _this7 = this;\n\n return new _Promise(function (resolve, reject) {\n if (!_this7._shouldBeConnected) {\n reject(new NotConnectedError());\n }\n\n var timer = null;\n var self = _this7;\n var id = _this7._nextRequestID;\n _this7._nextRequestID += 1;\n var eventName = id.toString();\n\n function onDisconnect() {\n clearTimeout(timer);\n self.removeAllListeners(eventName);\n reject(new DisconnectedError());\n }\n\n function cleanup() {\n clearTimeout(timer);\n self.removeAllListeners(eventName);\n if (self._ws !== null) {\n self._ws.removeListener('close', onDisconnect);\n }\n }\n\n function _resolve(response) {\n cleanup();\n resolve(response);\n }\n\n function _reject(error) {\n cleanup();\n reject(error);\n }\n\n _this7.once(eventName, function (response) {\n if (response.status === 'error') {\n _reject(new RippledError(response.error));\n } else if (response.status === 'success') {\n _resolve(response.result);\n } else {\n _reject(new ResponseFormatError('unrecognized status: ' + response.status));\n }\n });\n\n _this7._ws.once('close', onDisconnect);\n\n // JSON.stringify automatically removes keys with value of 'undefined'\n var message = JSON.stringify(_Object$assign({}, _request, { id: id }));\n\n _this7._whenReady(_this7._send(message)).then(function () {\n var delay = timeout || _this7._timeout;\n timer = setTimeout(function () {\n return _reject(new TimeoutError());\n }, delay);\n })['catch'](_reject);\n });\n }\n }, {\n key: '_state',\n get: function get() {\n return this._ws ? this._ws.readyState : WebSocket.CLOSED;\n }\n }, {\n key: '_shouldBeConnected',\n get: function get() {\n return this._ws !== null;\n }\n }]);\n\n return Connection;\n})(EventEmitter);\n\nmodule.exports = Connection;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(275).Buffer))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/common/connection.js\n ** module id = 334\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/common/connection.js?"); + eval("/* WEBPACK VAR INJECTION */(function(Buffer) {'use strict';\n\nvar _get = __webpack_require__(2)['default'];\n\nvar _inherits = __webpack_require__(18)['default'];\n\nvar _createClass = __webpack_require__(27)['default'];\n\nvar _classCallCheck = __webpack_require__(30)['default'];\n\nvar _Number$isInteger = __webpack_require__(335)['default'];\n\nvar _Promise = __webpack_require__(31)['default'];\n\nvar _Object$assign = __webpack_require__(339)['default'];\n\nvar _ = __webpack_require__(262);\n\nvar _require = __webpack_require__(264);\n\nvar EventEmitter = _require.EventEmitter;\n\nvar WebSocket = __webpack_require__(344);\nvar parseURL = __webpack_require__(345).parse;\nvar RangeSet = __webpack_require__(350).RangeSet;\n\nvar _require2 = __webpack_require__(358);\n\nvar RippledError = _require2.RippledError;\nvar DisconnectedError = _require2.DisconnectedError;\nvar NotConnectedError = _require2.NotConnectedError;\nvar TimeoutError = _require2.TimeoutError;\nvar ResponseFormatError = _require2.ResponseFormatError;\nvar ConnectionError = _require2.ConnectionError;\n\nfunction isStreamMessageType(type) {\n return type === 'ledgerClosed' || type === 'transaction' || type === 'path_find';\n}\n\nvar Connection = (function (_EventEmitter) {\n _inherits(Connection, _EventEmitter);\n\n function Connection(url) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n _classCallCheck(this, Connection);\n\n _get(Object.getPrototypeOf(Connection.prototype), 'constructor', this).call(this);\n this.setMaxListeners(Infinity);\n this._url = url;\n this._trace = options.trace;\n if (this._trace) {\n // for easier unit testing\n this._console = console;\n }\n this._proxyURL = options.proxy;\n this._proxyAuthorization = options.proxyAuthorization;\n this._authorization = options.authorization;\n this._trustedCertificates = options.trustedCertificates;\n this._key = options.key;\n this._passphrase = options.passphrase;\n this._certificate = options.certificate;\n this._timeout = options.timeout || 20 * 1000;\n this._isReady = false;\n this._ws = null;\n this._ledgerVersion = null;\n this._availableLedgerVersions = new RangeSet();\n this._nextRequestID = 1;\n }\n\n // return value is array of arguments to Connection.emit\n\n _createClass(Connection, [{\n key: '_parseMessage',\n value: function _parseMessage(message) {\n var data = JSON.parse(message);\n if (data.type === 'response') {\n if (!(_Number$isInteger(data.id) && data.id >= 0)) {\n throw new ResponseFormatError('valid id not found in response');\n }\n return [data.id.toString(), data];\n } else if (isStreamMessageType(data.type)) {\n if (data.type === 'ledgerClosed') {\n this._ledgerVersion = Number(data.ledger_index);\n this._availableLedgerVersions.reset();\n this._availableLedgerVersions.parseAndAddRanges(data.validated_ledgers);\n }\n return [data.type, data];\n } else if (data.type === undefined && data.error) {\n return ['error', data.error, data.error_message, data]; // e.g. slowDown\n }\n throw new ResponseFormatError('unrecognized message type: ' + data.type);\n }\n }, {\n key: '_onMessage',\n value: function _onMessage(message) {\n var parameters = undefined;\n if (this._trace) {\n this._console.log(message);\n }\n try {\n parameters = this._parseMessage(message);\n } catch (error) {\n this.emit('error', 'badMessage', error.message, message);\n return;\n }\n // we don't want this inside the try/catch or exceptions in listener\n // will be caught\n this.emit.apply(this, parameters);\n }\n }, {\n key: 'isConnected',\n value: function isConnected() {\n return this._state === WebSocket.OPEN && this._isReady;\n }\n }, {\n key: '_onUnexpectedClose',\n value: function _onUnexpectedClose() {\n this._ws = null;\n this._isReady = false;\n this.connect().then();\n }\n }, {\n key: '_onOpen',\n value: function _onOpen() {\n var _this = this;\n\n var request = {\n command: 'subscribe',\n streams: ['ledger']\n };\n return this.request(request).then(function (response) {\n _this._ledgerVersion = Number(response.ledger_index);\n _this._availableLedgerVersions.parseAndAddRanges(response.validated_ledgers);\n _this._isReady = true;\n _this.emit('connected');\n });\n }\n }, {\n key: '_createWebSocket',\n value: function _createWebSocket() {\n var options = {};\n if (this._proxyURL !== undefined) {\n var parsedURL = parseURL(this._url);\n var parsedProxyURL = parseURL(this._proxyURL);\n var proxyOverrides = _.omit({\n secureEndpoint: parsedURL.protocol === 'wss:',\n secureProxy: parsedProxyURL.protocol === 'https:',\n auth: this._proxyAuthorization,\n ca: this._trustedCertificates,\n key: this._key,\n passphrase: this._passphrase,\n cert: this._certificate\n }, _.isUndefined);\n var proxyOptions = _.assign({}, parsedProxyURL, proxyOverrides);\n var HttpsProxyAgent = undefined;\n try {\n HttpsProxyAgent = __webpack_require__(359);\n } catch (error) {\n throw new Error('\"proxy\" option is not supported in the browser');\n }\n options.agent = new HttpsProxyAgent(proxyOptions);\n }\n if (this._authorization !== undefined) {\n var base64 = new Buffer(this._authorization).toString('base64');\n options.headers = { Authorization: 'Basic ' + base64 };\n }\n var optionsOverrides = _.omit({\n ca: this._trustedCertificates,\n key: this._key,\n passphrase: this._passphrase,\n cert: this._certificate\n }, _.isUndefined);\n var websocketOptions = _.assign({}, options, optionsOverrides);\n var websocket = new WebSocket(this._url, websocketOptions);\n // we will have a listener for each outstanding request,\n // so we have to raise the limit (the default is 10)\n websocket.setMaxListeners(Infinity);\n return websocket;\n }\n }, {\n key: 'connect',\n value: function connect() {\n var _this2 = this;\n\n return new _Promise(function (resolve, reject) {\n if (!_this2._url) {\n reject(new ConnectionError('Cannot connect because no server was specified'));\n }\n if (_this2._state === WebSocket.OPEN) {\n resolve();\n } else if (_this2._state === WebSocket.CONNECTING) {\n _this2._ws.once('open', resolve);\n } else {\n _this2._ws = _this2._createWebSocket();\n // when an error causes the connection to close, the close event\n // should still be emitted; the \"ws\" documentation says: \"The close\n // event is also emitted when then underlying net.Socket closes the\n // connection (end or close).\"\n _this2._ws.on('error', function (error) {\n return _this2.emit('error', 'websocket', error.messsage, error);\n });\n _this2._ws.on('message', _this2._onMessage.bind(_this2));\n _this2._onUnexpectedCloseBound = _this2._onUnexpectedClose.bind(_this2);\n _this2._ws.once('close', _this2._onUnexpectedCloseBound);\n _this2._ws.once('open', function () {\n return _this2._onOpen().then(resolve, reject);\n });\n }\n });\n }\n }, {\n key: 'disconnect',\n value: function disconnect() {\n var _this3 = this;\n\n return new _Promise(function (resolve) {\n if (_this3._state === WebSocket.CLOSED) {\n resolve();\n } else if (_this3._state === WebSocket.CLOSING) {\n _this3._ws.once('close', resolve);\n } else {\n _this3._ws.removeListener('close', _this3._onUnexpectedCloseBound);\n _this3._ws.once('close', function () {\n _this3._ws = null;\n _this3._isReady = false;\n resolve();\n });\n _this3._ws.close();\n }\n });\n }\n }, {\n key: 'reconnect',\n value: function reconnect() {\n var _this4 = this;\n\n return this.disconnect().then(function () {\n return _this4.connect();\n });\n }\n }, {\n key: '_whenReady',\n value: function _whenReady(promise) {\n var _this5 = this;\n\n return new _Promise(function (resolve, reject) {\n if (!_this5._shouldBeConnected) {\n reject(new NotConnectedError());\n } else if (_this5._state === WebSocket.OPEN && _this5._isReady) {\n promise.then(resolve, reject);\n } else {\n _this5.once('connected', function () {\n return promise.then(resolve, reject);\n });\n }\n });\n }\n }, {\n key: 'getLedgerVersion',\n value: function getLedgerVersion() {\n return this._whenReady(_Promise.resolve(this._ledgerVersion));\n }\n }, {\n key: 'hasLedgerVersions',\n value: function hasLedgerVersions(lowLedgerVersion, highLedgerVersion) {\n return this._whenReady(_Promise.resolve(this._availableLedgerVersions.containsRange(lowLedgerVersion, highLedgerVersion || this._ledgerVersion)));\n }\n }, {\n key: 'hasLedgerVersion',\n value: function hasLedgerVersion(ledgerVersion) {\n return this.hasLedgerVersions(ledgerVersion, ledgerVersion);\n }\n }, {\n key: '_send',\n value: function _send(message) {\n var _this6 = this;\n\n if (this._trace) {\n this._console.log(message);\n }\n return new _Promise(function (resolve, reject) {\n _this6._ws.send(message, undefined, function (error, result) {\n if (error) {\n reject(new DisconnectedError(error.message));\n } else {\n resolve(result);\n }\n });\n });\n }\n }, {\n key: 'request',\n value: function request(_request, timeout) {\n var _this7 = this;\n\n return new _Promise(function (resolve, reject) {\n if (!_this7._shouldBeConnected) {\n reject(new NotConnectedError());\n }\n\n var timer = null;\n var self = _this7;\n var id = _this7._nextRequestID;\n _this7._nextRequestID += 1;\n var eventName = id.toString();\n\n function onDisconnect() {\n clearTimeout(timer);\n self.removeAllListeners(eventName);\n reject(new DisconnectedError());\n }\n\n function cleanup() {\n clearTimeout(timer);\n self.removeAllListeners(eventName);\n if (self._ws !== null) {\n self._ws.removeListener('close', onDisconnect);\n }\n }\n\n function _resolve(response) {\n cleanup();\n resolve(response);\n }\n\n function _reject(error) {\n cleanup();\n reject(error);\n }\n\n _this7.once(eventName, function (response) {\n if (response.status === 'error') {\n _reject(new RippledError(response.error));\n } else if (response.status === 'success') {\n _resolve(response.result);\n } else {\n _reject(new ResponseFormatError('unrecognized status: ' + response.status));\n }\n });\n\n _this7._ws.once('close', onDisconnect);\n\n // JSON.stringify automatically removes keys with value of 'undefined'\n var message = JSON.stringify(_Object$assign({}, _request, { id: id }));\n\n _this7._whenReady(_this7._send(message)).then(function () {\n var delay = timeout || _this7._timeout;\n timer = setTimeout(function () {\n return _reject(new TimeoutError());\n }, delay);\n })['catch'](_reject);\n });\n }\n }, {\n key: '_state',\n get: function get() {\n return this._ws ? this._ws.readyState : WebSocket.CLOSED;\n }\n }, {\n key: '_shouldBeConnected',\n get: function get() {\n return this._ws !== null;\n }\n }]);\n\n return Connection;\n})(EventEmitter);\n\nmodule.exports = Connection;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(275).Buffer))\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/common/connection.js\n ** module id = 334\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/common/connection.js?"); /***/ }, /* 335 */ @@ -2067,13 +2067,13 @@ var ripple = /* 337 */ /***/ function(module, exports, __webpack_require__) { - eval("// 20.1.2.3 Number.isInteger(number)\nvar $def = __webpack_require__(12);\n\n$def($def.S, 'Number', {isInteger: __webpack_require__(338)});\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.number.is-integer.js\n ** module id = 337\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.number.is-integer.js?"); + eval("// 20.1.2.3 Number.isInteger(number)\nvar $export = __webpack_require__(12);\n\n$export($export.S, 'Number', {isInteger: __webpack_require__(338)});\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.number.is-integer.js\n ** module id = 337\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.number.is-integer.js?"); /***/ }, /* 338 */ /***/ function(module, exports, __webpack_require__) { - eval("// 20.1.2.3 Number.isInteger(number)\nvar isObject = __webpack_require__(23)\n , floor = Math.floor;\nmodule.exports = function isInteger(it){\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.is-integer.js\n ** module id = 338\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.is-integer.js?"); + eval("// 20.1.2.3 Number.isInteger(number)\nvar isObject = __webpack_require__(25)\n , floor = Math.floor;\nmodule.exports = function isInteger(it){\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.is-integer.js\n ** module id = 338\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.is-integer.js?"); /***/ }, /* 339 */ @@ -2091,13 +2091,13 @@ var ripple = /* 341 */ /***/ function(module, exports, __webpack_require__) { - eval("// 19.1.3.1 Object.assign(target, source)\nvar $def = __webpack_require__(12);\n\n$def($def.S + $def.F, 'Object', {assign: __webpack_require__(342)});\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.object.assign.js\n ** module id = 341\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.object.assign.js?"); + eval("// 19.1.3.1 Object.assign(target, source)\nvar $export = __webpack_require__(12);\n\n$export($export.S + $export.F, 'Object', {assign: __webpack_require__(342)});\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.object.assign.js\n ** module id = 341\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.object.assign.js?"); /***/ }, /* 342 */ /***/ function(module, exports, __webpack_require__) { - eval("// 19.1.2.1 Object.assign(target, source, ...)\nvar $ = __webpack_require__(5)\n , toObject = __webpack_require__(343)\n , IObject = __webpack_require__(8);\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = __webpack_require__(15)(function(){\n var a = Object.assign\n , A = {}\n , B = {}\n , S = Symbol()\n , K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function(k){ B[k] = k; });\n return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K;\n}) ? function assign(target, source){ // eslint-disable-line no-unused-vars\n var T = toObject(target)\n , $$ = arguments\n , $$len = $$.length\n , index = 1\n , getKeys = $.getKeys\n , getSymbols = $.getSymbols\n , isEnum = $.isEnum;\n while($$len > index){\n var S = IObject($$[index++])\n , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)\n , length = keys.length\n , j = 0\n , key;\n while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];\n }\n return T;\n} : Object.assign;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.assign.js\n ** module id = 342\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.assign.js?"); + eval("// 19.1.2.1 Object.assign(target, source, ...)\nvar $ = __webpack_require__(5)\n , toObject = __webpack_require__(343)\n , IObject = __webpack_require__(8);\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = __webpack_require__(17)(function(){\n var a = Object.assign\n , A = {}\n , B = {}\n , S = Symbol()\n , K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function(k){ B[k] = k; });\n return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K;\n}) ? function assign(target, source){ // eslint-disable-line no-unused-vars\n var T = toObject(target)\n , $$ = arguments\n , $$len = $$.length\n , index = 1\n , getKeys = $.getKeys\n , getSymbols = $.getSymbols\n , isEnum = $.isEnum;\n while($$len > index){\n var S = IObject($$[index++])\n , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)\n , length = keys.length\n , j = 0\n , key;\n while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];\n }\n return T;\n} : Object.assign;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.object-assign.js\n ** module id = 342\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.object-assign.js?"); /***/ }, /* 343 */ @@ -2157,13 +2157,13 @@ var ripple = /* 352 */ /***/ function(module, exports, __webpack_require__) { - eval("__webpack_require__(353);\nmodule.exports = __webpack_require__(14).Symbol;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/fn/symbol/index.js\n ** module id = 352\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/fn/symbol/index.js?"); + eval("__webpack_require__(353);\n__webpack_require__(33);\nmodule.exports = __webpack_require__(14).Symbol;\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/fn/symbol/index.js\n ** module id = 352\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/fn/symbol/index.js?"); /***/ }, /* 353 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n// ECMAScript 6 symbols shim\nvar $ = __webpack_require__(5)\n , global = __webpack_require__(13)\n , has = __webpack_require__(43)\n , SUPPORT_DESC = __webpack_require__(42)\n , $def = __webpack_require__(12)\n , $redef = __webpack_require__(39)\n , $fails = __webpack_require__(15)\n , shared = __webpack_require__(45)\n , setTag = __webpack_require__(49)\n , uid = __webpack_require__(46)\n , wks = __webpack_require__(44)\n , keyOf = __webpack_require__(354)\n , $names = __webpack_require__(355)\n , enumKeys = __webpack_require__(356)\n , isArray = __webpack_require__(357)\n , anObject = __webpack_require__(24)\n , toIObject = __webpack_require__(7)\n , createDesc = __webpack_require__(41)\n , getDesc = $.getDesc\n , setDesc = $.setDesc\n , _create = $.create\n , getNames = $names.get\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , setter = false\n , HIDDEN = wks('_hidden')\n , isEnum = $.isEnum\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , useNative = typeof $Symbol == 'function'\n , ObjectProto = Object.prototype;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = SUPPORT_DESC && $fails(function(){\n return _create(setDesc({}, 'a', {\n get: function(){ return setDesc(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = getDesc(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n setDesc(it, key, D);\n if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);\n} : setDesc;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol.prototype);\n sym._k = tag;\n SUPPORT_DESC && setter && setSymbolDesc(ObjectProto, tag, {\n configurable: true,\n set: function(value){\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n }\n });\n return sym;\n};\n\nvar isSymbol = function(it){\n return typeof it == 'symbol';\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(D && has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return setDesc(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key);\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]\n ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n var D = getDesc(it = toIObject(it), key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);\n return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);\n return result;\n};\nvar $stringify = function stringify(it){\n var args = [it]\n , i = 1\n , $$ = arguments\n , replacer, $replacer;\n while($$.length > i)args.push($$[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n};\nvar buggyJSON = $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n});\n\n// 19.4.1.1 Symbol([description])\nif(!useNative){\n $Symbol = function Symbol(){\n if(isSymbol(this))throw TypeError('Symbol is not a constructor');\n return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));\n };\n $redef($Symbol.prototype, 'toString', function toString(){\n return this._k;\n });\n\n isSymbol = function(it){\n return it instanceof $Symbol;\n };\n\n $.create = $create;\n $.isEnum = $propertyIsEnumerable;\n $.getDesc = $getOwnPropertyDescriptor;\n $.setDesc = $defineProperty;\n $.setDescs = $defineProperties;\n $.getNames = $names.get = $getOwnPropertyNames;\n $.getSymbols = $getOwnPropertySymbols;\n\n if(SUPPORT_DESC && !__webpack_require__(38)){\n $redef(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n}\n\nvar symbolStatics = {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n return keyOf(SymbolRegistry, key);\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n};\n// 19.4.2.2 Symbol.hasInstance\n// 19.4.2.3 Symbol.isConcatSpreadable\n// 19.4.2.4 Symbol.iterator\n// 19.4.2.6 Symbol.match\n// 19.4.2.8 Symbol.replace\n// 19.4.2.9 Symbol.search\n// 19.4.2.10 Symbol.species\n// 19.4.2.11 Symbol.split\n// 19.4.2.12 Symbol.toPrimitive\n// 19.4.2.13 Symbol.toStringTag\n// 19.4.2.14 Symbol.unscopables\n$.each.call((\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +\n 'species,split,toPrimitive,toStringTag,unscopables'\n).split(','), function(it){\n var sym = wks(it);\n symbolStatics[it] = useNative ? sym : wrap(sym);\n});\n\nsetter = true;\n\n$def($def.G + $def.W, {Symbol: $Symbol});\n\n$def($def.S, 'Symbol', symbolStatics);\n\n$def($def.S + $def.F * !useNative, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $def($def.S + $def.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});\n\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetTag(global.JSON, 'JSON', true);\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.symbol.js\n ** module id = 353\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.symbol.js?"); + eval("'use strict';\n// ECMAScript 6 symbols shim\nvar $ = __webpack_require__(5)\n , global = __webpack_require__(13)\n , has = __webpack_require__(43)\n , DESCRIPTORS = __webpack_require__(42)\n , $export = __webpack_require__(12)\n , redefine = __webpack_require__(39)\n , $fails = __webpack_require__(17)\n , shared = __webpack_require__(48)\n , setToStringTag = __webpack_require__(46)\n , uid = __webpack_require__(49)\n , wks = __webpack_require__(47)\n , keyOf = __webpack_require__(354)\n , $names = __webpack_require__(355)\n , enumKeys = __webpack_require__(356)\n , isArray = __webpack_require__(357)\n , anObject = __webpack_require__(26)\n , toIObject = __webpack_require__(7)\n , createDesc = __webpack_require__(41)\n , getDesc = $.getDesc\n , setDesc = $.setDesc\n , _create = $.create\n , getNames = $names.get\n , $Symbol = global.Symbol\n , $JSON = global.JSON\n , _stringify = $JSON && $JSON.stringify\n , setter = false\n , HIDDEN = wks('_hidden')\n , isEnum = $.isEnum\n , SymbolRegistry = shared('symbol-registry')\n , AllSymbols = shared('symbols')\n , useNative = typeof $Symbol == 'function'\n , ObjectProto = Object.prototype;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function(){\n return _create(setDesc({}, 'a', {\n get: function(){ return setDesc(this, 'a', {value: 7}).a; }\n })).a != 7;\n}) ? function(it, key, D){\n var protoDesc = getDesc(ObjectProto, key);\n if(protoDesc)delete ObjectProto[key];\n setDesc(it, key, D);\n if(protoDesc && it !== ObjectProto)setDesc(ObjectProto, key, protoDesc);\n} : setDesc;\n\nvar wrap = function(tag){\n var sym = AllSymbols[tag] = _create($Symbol.prototype);\n sym._k = tag;\n DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {\n configurable: true,\n set: function(value){\n if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n }\n });\n return sym;\n};\n\nvar isSymbol = function(it){\n return typeof it == 'symbol';\n};\n\nvar $defineProperty = function defineProperty(it, key, D){\n if(D && has(AllSymbols, key)){\n if(!D.enumerable){\n if(!has(it, HIDDEN))setDesc(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;\n D = _create(D, {enumerable: createDesc(0, false)});\n } return setSymbolDesc(it, key, D);\n } return setDesc(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P){\n anObject(it);\n var keys = enumKeys(P = toIObject(P))\n , i = 0\n , l = keys.length\n , key;\n while(l > i)$defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P){\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key){\n var E = isEnum.call(this, key);\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key]\n ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){\n var D = getDesc(it = toIObject(it), key);\n if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);\n return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it){\n var names = getNames(toIObject(it))\n , result = []\n , i = 0\n , key;\n while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);\n return result;\n};\nvar $stringify = function stringify(it){\n if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined\n var args = [it]\n , i = 1\n , $$ = arguments\n , replacer, $replacer;\n while($$.length > i)args.push($$[i++]);\n replacer = args[1];\n if(typeof replacer == 'function')$replacer = replacer;\n if($replacer || !isArray(replacer))replacer = function(key, value){\n if($replacer)value = $replacer.call(this, key, value);\n if(!isSymbol(value))return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n};\nvar buggyJSON = $fails(function(){\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';\n});\n\n// 19.4.1.1 Symbol([description])\nif(!useNative){\n $Symbol = function Symbol(){\n if(isSymbol(this))throw TypeError('Symbol is not a constructor');\n return wrap(uid(arguments.length > 0 ? arguments[0] : undefined));\n };\n redefine($Symbol.prototype, 'toString', function toString(){\n return this._k;\n });\n\n isSymbol = function(it){\n return it instanceof $Symbol;\n };\n\n $.create = $create;\n $.isEnum = $propertyIsEnumerable;\n $.getDesc = $getOwnPropertyDescriptor;\n $.setDesc = $defineProperty;\n $.setDescs = $defineProperties;\n $.getNames = $names.get = $getOwnPropertyNames;\n $.getSymbols = $getOwnPropertySymbols;\n\n if(DESCRIPTORS && !__webpack_require__(38)){\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n}\n\nvar symbolStatics = {\n // 19.4.2.1 Symbol.for(key)\n 'for': function(key){\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(key){\n return keyOf(SymbolRegistry, key);\n },\n useSetter: function(){ setter = true; },\n useSimple: function(){ setter = false; }\n};\n// 19.4.2.2 Symbol.hasInstance\n// 19.4.2.3 Symbol.isConcatSpreadable\n// 19.4.2.4 Symbol.iterator\n// 19.4.2.6 Symbol.match\n// 19.4.2.8 Symbol.replace\n// 19.4.2.9 Symbol.search\n// 19.4.2.10 Symbol.species\n// 19.4.2.11 Symbol.split\n// 19.4.2.12 Symbol.toPrimitive\n// 19.4.2.13 Symbol.toStringTag\n// 19.4.2.14 Symbol.unscopables\n$.each.call((\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +\n 'species,split,toPrimitive,toStringTag,unscopables'\n).split(','), function(it){\n var sym = wks(it);\n symbolStatics[it] = useNative ? sym : wrap(sym);\n});\n\nsetter = true;\n\n$export($export.G + $export.W, {Symbol: $Symbol});\n\n$export($export.S, 'Symbol', symbolStatics);\n\n$export($export.S + $export.F * !useNative, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!useNative || buggyJSON), 'JSON', {stringify: $stringify});\n\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.symbol.js\n ** module id = 353\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.symbol.js?"); /***/ }, /* 354 */ @@ -2175,7 +2175,7 @@ var ripple = /* 355 */ /***/ function(module, exports, __webpack_require__) { - eval("// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toString = {}.toString\n , toIObject = __webpack_require__(7)\n , getNames = __webpack_require__(5).getNames;\n\nvar windowNames = typeof window == 'object' && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return getNames(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.get = function getOwnPropertyNames(it){\n if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);\n return getNames(toIObject(it));\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.get-names.js\n ** module id = 355\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.get-names.js?"); + eval("// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = __webpack_require__(7)\n , getNames = __webpack_require__(5).getNames\n , toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function(it){\n try {\n return getNames(it);\n } catch(e){\n return windowNames.slice();\n }\n};\n\nmodule.exports.get = function getOwnPropertyNames(it){\n if(windowNames && toString.call(it) == '[object Window]')return getWindowNames(it);\n return getNames(toIObject(it));\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/$.get-names.js\n ** module id = 355\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/$.get-names.js?"); /***/ }, /* 356 */ @@ -2193,7 +2193,7 @@ var ripple = /* 358 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n\nvar _get = __webpack_require__(2)['default'];\n\nvar _inherits = __webpack_require__(16)['default'];\n\nvar _createClass = __webpack_require__(27)['default'];\n\nvar _classCallCheck = __webpack_require__(30)['default'];\n\nvar util = __webpack_require__(270);\n\nvar RippleError = (function (_Error) {\n _inherits(RippleError, _Error);\n\n function RippleError(message, data) {\n _classCallCheck(this, RippleError);\n\n _get(Object.getPrototypeOf(RippleError.prototype), 'constructor', this).call(this, message);\n this.name = this.constructor.name;\n this.message = message;\n this.data = data;\n Error.captureStackTrace(this, this.constructor.name);\n }\n\n _createClass(RippleError, [{\n key: 'toString',\n value: function toString() {\n var result = '[' + this.name + '(' + this.message;\n if (this.data) {\n result += ', ' + util.inspect(this.data);\n }\n result += ')]';\n return result;\n }\n\n /* console.log in node uses util.inspect on object, and util.inspect allows\n us to cutomize its output:\n https://nodejs.org/api/util.html#util_custom_inspect_function_on_objects */\n }, {\n key: 'inspect',\n value: function inspect() {\n return this.toString();\n }\n }]);\n\n return RippleError;\n})(Error);\n\nvar RippledError = (function (_RippleError) {\n _inherits(RippledError, _RippleError);\n\n function RippledError() {\n _classCallCheck(this, RippledError);\n\n _get(Object.getPrototypeOf(RippledError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return RippledError;\n})(RippleError);\n\nvar UnexpectedError = (function (_RippleError2) {\n _inherits(UnexpectedError, _RippleError2);\n\n function UnexpectedError() {\n _classCallCheck(this, UnexpectedError);\n\n _get(Object.getPrototypeOf(UnexpectedError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return UnexpectedError;\n})(RippleError);\n\nvar LedgerVersionError = (function (_RippleError3) {\n _inherits(LedgerVersionError, _RippleError3);\n\n function LedgerVersionError() {\n _classCallCheck(this, LedgerVersionError);\n\n _get(Object.getPrototypeOf(LedgerVersionError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return LedgerVersionError;\n})(RippleError);\n\nvar ConnectionError = (function (_RippleError4) {\n _inherits(ConnectionError, _RippleError4);\n\n function ConnectionError() {\n _classCallCheck(this, ConnectionError);\n\n _get(Object.getPrototypeOf(ConnectionError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return ConnectionError;\n})(RippleError);\n\nvar NotConnectedError = (function (_ConnectionError) {\n _inherits(NotConnectedError, _ConnectionError);\n\n function NotConnectedError() {\n _classCallCheck(this, NotConnectedError);\n\n _get(Object.getPrototypeOf(NotConnectedError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return NotConnectedError;\n})(ConnectionError);\n\nvar DisconnectedError = (function (_ConnectionError2) {\n _inherits(DisconnectedError, _ConnectionError2);\n\n function DisconnectedError() {\n _classCallCheck(this, DisconnectedError);\n\n _get(Object.getPrototypeOf(DisconnectedError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return DisconnectedError;\n})(ConnectionError);\n\nvar TimeoutError = (function (_ConnectionError3) {\n _inherits(TimeoutError, _ConnectionError3);\n\n function TimeoutError() {\n _classCallCheck(this, TimeoutError);\n\n _get(Object.getPrototypeOf(TimeoutError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return TimeoutError;\n})(ConnectionError);\n\nvar ResponseFormatError = (function (_ConnectionError4) {\n _inherits(ResponseFormatError, _ConnectionError4);\n\n function ResponseFormatError() {\n _classCallCheck(this, ResponseFormatError);\n\n _get(Object.getPrototypeOf(ResponseFormatError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return ResponseFormatError;\n})(ConnectionError);\n\nvar ValidationError = (function (_RippleError5) {\n _inherits(ValidationError, _RippleError5);\n\n function ValidationError() {\n _classCallCheck(this, ValidationError);\n\n _get(Object.getPrototypeOf(ValidationError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return ValidationError;\n})(RippleError);\n\nvar NotFoundError = (function (_RippleError6) {\n _inherits(NotFoundError, _RippleError6);\n\n function NotFoundError(message) {\n _classCallCheck(this, NotFoundError);\n\n _get(Object.getPrototypeOf(NotFoundError.prototype), 'constructor', this).call(this, message || 'Not found');\n }\n\n return NotFoundError;\n})(RippleError);\n\nvar MissingLedgerHistoryError = (function (_RippleError7) {\n _inherits(MissingLedgerHistoryError, _RippleError7);\n\n function MissingLedgerHistoryError(message) {\n _classCallCheck(this, MissingLedgerHistoryError);\n\n _get(Object.getPrototypeOf(MissingLedgerHistoryError.prototype), 'constructor', this).call(this, message || 'Server is missing ledger history in the specified range');\n }\n\n return MissingLedgerHistoryError;\n})(RippleError);\n\nvar PendingLedgerVersionError = (function (_RippleError8) {\n _inherits(PendingLedgerVersionError, _RippleError8);\n\n function PendingLedgerVersionError(message) {\n _classCallCheck(this, PendingLedgerVersionError);\n\n _get(Object.getPrototypeOf(PendingLedgerVersionError.prototype), 'constructor', this).call(this, message || 'maxLedgerVersion is greater than server\\'s' + ' most recent validated ledger');\n }\n\n return PendingLedgerVersionError;\n})(RippleError);\n\nmodule.exports = {\n RippleError: RippleError,\n UnexpectedError: UnexpectedError,\n ConnectionError: ConnectionError,\n RippledError: RippledError,\n NotConnectedError: NotConnectedError,\n DisconnectedError: DisconnectedError,\n TimeoutError: TimeoutError,\n ResponseFormatError: ResponseFormatError,\n ValidationError: ValidationError,\n NotFoundError: NotFoundError,\n PendingLedgerVersionError: PendingLedgerVersionError,\n MissingLedgerHistoryError: MissingLedgerHistoryError,\n LedgerVersionError: LedgerVersionError\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/common/errors.js\n ** module id = 358\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/common/errors.js?"); + eval("'use strict';\n\nvar _get = __webpack_require__(2)['default'];\n\nvar _inherits = __webpack_require__(18)['default'];\n\nvar _createClass = __webpack_require__(27)['default'];\n\nvar _classCallCheck = __webpack_require__(30)['default'];\n\nvar util = __webpack_require__(270);\n\nvar RippleError = (function (_Error) {\n _inherits(RippleError, _Error);\n\n function RippleError(message, data) {\n _classCallCheck(this, RippleError);\n\n _get(Object.getPrototypeOf(RippleError.prototype), 'constructor', this).call(this, message);\n this.name = this.constructor.name;\n this.message = message;\n this.data = data;\n Error.captureStackTrace(this, this.constructor.name);\n }\n\n _createClass(RippleError, [{\n key: 'toString',\n value: function toString() {\n var result = '[' + this.name + '(' + this.message;\n if (this.data) {\n result += ', ' + util.inspect(this.data);\n }\n result += ')]';\n return result;\n }\n\n /* console.log in node uses util.inspect on object, and util.inspect allows\n us to cutomize its output:\n https://nodejs.org/api/util.html#util_custom_inspect_function_on_objects */\n }, {\n key: 'inspect',\n value: function inspect() {\n return this.toString();\n }\n }]);\n\n return RippleError;\n})(Error);\n\nvar RippledError = (function (_RippleError) {\n _inherits(RippledError, _RippleError);\n\n function RippledError() {\n _classCallCheck(this, RippledError);\n\n _get(Object.getPrototypeOf(RippledError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return RippledError;\n})(RippleError);\n\nvar UnexpectedError = (function (_RippleError2) {\n _inherits(UnexpectedError, _RippleError2);\n\n function UnexpectedError() {\n _classCallCheck(this, UnexpectedError);\n\n _get(Object.getPrototypeOf(UnexpectedError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return UnexpectedError;\n})(RippleError);\n\nvar LedgerVersionError = (function (_RippleError3) {\n _inherits(LedgerVersionError, _RippleError3);\n\n function LedgerVersionError() {\n _classCallCheck(this, LedgerVersionError);\n\n _get(Object.getPrototypeOf(LedgerVersionError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return LedgerVersionError;\n})(RippleError);\n\nvar ConnectionError = (function (_RippleError4) {\n _inherits(ConnectionError, _RippleError4);\n\n function ConnectionError() {\n _classCallCheck(this, ConnectionError);\n\n _get(Object.getPrototypeOf(ConnectionError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return ConnectionError;\n})(RippleError);\n\nvar NotConnectedError = (function (_ConnectionError) {\n _inherits(NotConnectedError, _ConnectionError);\n\n function NotConnectedError() {\n _classCallCheck(this, NotConnectedError);\n\n _get(Object.getPrototypeOf(NotConnectedError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return NotConnectedError;\n})(ConnectionError);\n\nvar DisconnectedError = (function (_ConnectionError2) {\n _inherits(DisconnectedError, _ConnectionError2);\n\n function DisconnectedError() {\n _classCallCheck(this, DisconnectedError);\n\n _get(Object.getPrototypeOf(DisconnectedError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return DisconnectedError;\n})(ConnectionError);\n\nvar TimeoutError = (function (_ConnectionError3) {\n _inherits(TimeoutError, _ConnectionError3);\n\n function TimeoutError() {\n _classCallCheck(this, TimeoutError);\n\n _get(Object.getPrototypeOf(TimeoutError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return TimeoutError;\n})(ConnectionError);\n\nvar ResponseFormatError = (function (_ConnectionError4) {\n _inherits(ResponseFormatError, _ConnectionError4);\n\n function ResponseFormatError() {\n _classCallCheck(this, ResponseFormatError);\n\n _get(Object.getPrototypeOf(ResponseFormatError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return ResponseFormatError;\n})(ConnectionError);\n\nvar ValidationError = (function (_RippleError5) {\n _inherits(ValidationError, _RippleError5);\n\n function ValidationError() {\n _classCallCheck(this, ValidationError);\n\n _get(Object.getPrototypeOf(ValidationError.prototype), 'constructor', this).apply(this, arguments);\n }\n\n return ValidationError;\n})(RippleError);\n\nvar NotFoundError = (function (_RippleError6) {\n _inherits(NotFoundError, _RippleError6);\n\n function NotFoundError(message) {\n _classCallCheck(this, NotFoundError);\n\n _get(Object.getPrototypeOf(NotFoundError.prototype), 'constructor', this).call(this, message || 'Not found');\n }\n\n return NotFoundError;\n})(RippleError);\n\nvar MissingLedgerHistoryError = (function (_RippleError7) {\n _inherits(MissingLedgerHistoryError, _RippleError7);\n\n function MissingLedgerHistoryError(message) {\n _classCallCheck(this, MissingLedgerHistoryError);\n\n _get(Object.getPrototypeOf(MissingLedgerHistoryError.prototype), 'constructor', this).call(this, message || 'Server is missing ledger history in the specified range');\n }\n\n return MissingLedgerHistoryError;\n})(RippleError);\n\nvar PendingLedgerVersionError = (function (_RippleError8) {\n _inherits(PendingLedgerVersionError, _RippleError8);\n\n function PendingLedgerVersionError(message) {\n _classCallCheck(this, PendingLedgerVersionError);\n\n _get(Object.getPrototypeOf(PendingLedgerVersionError.prototype), 'constructor', this).call(this, message || 'maxLedgerVersion is greater than server\\'s' + ' most recent validated ledger');\n }\n\n return PendingLedgerVersionError;\n})(RippleError);\n\nmodule.exports = {\n RippleError: RippleError,\n UnexpectedError: UnexpectedError,\n ConnectionError: ConnectionError,\n RippledError: RippledError,\n NotConnectedError: NotConnectedError,\n DisconnectedError: DisconnectedError,\n TimeoutError: TimeoutError,\n ResponseFormatError: ResponseFormatError,\n ValidationError: ValidationError,\n NotFoundError: NotFoundError,\n PendingLedgerVersionError: PendingLedgerVersionError,\n MissingLedgerHistoryError: MissingLedgerHistoryError,\n LedgerVersionError: LedgerVersionError\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/common/errors.js\n ** module id = 358\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/common/errors.js?"); /***/ }, /* 359 */ @@ -2421,7 +2421,7 @@ var ripple = /* 396 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n\nvar url = __webpack_require__(345)\n , equal = __webpack_require__(397)\n , util = __webpack_require__(398)\n , SchemaObject = __webpack_require__(403);\n\nmodule.exports = resolve;\n\nresolve.normalizeId = normalizeId;\nresolve.fullPath = getFullPath;\nresolve.url = resolveUrl;\nresolve.ids = resolveIds;\nresolve.inlineRef = inlineRef;\n\nfunction resolve(compile, root, ref) {\n /* jshint validthis: true */\n var refVal = this._refs[ref];\n if (typeof refVal == 'string') {\n if (this._refs[refVal]) refVal = this._refs[refVal];\n else return resolve.call(this, compile, root, refVal);\n }\n \n refVal = refVal || this._schemas[ref];\n if (refVal instanceof SchemaObject)\n return inlineRef(refVal.schema, this.opts.inlineRefs)\n ? refVal.schema\n : refVal.validate || this._compile(refVal);\n\n var res = _resolve.call(this, root, ref);\n var schema, v, baseId;\n if (res) {\n schema = res.schema;\n root = res.root;\n baseId = res.baseId;\n }\n\n if (schema instanceof SchemaObject)\n v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);\n else if (schema)\n v = inlineRef(schema, this.opts.inlineRefs)\n ? schema\n : compile.call(this, schema, root, undefined, baseId);\n\n return v;\n}\n\n\nfunction _resolve(root, ref) {\n /* jshint validthis: true */\n var p = url.parse(ref, false, true)\n , refPath = _getFullPath(p)\n , baseId = getFullPath(root.schema.id);\n if (refPath !== baseId) {\n var id = normalizeId(refPath);\n var refVal = this._refs[id];\n if (typeof refVal == 'string') {\n return resolveRecursive.call(this, root, refVal, p);\n } else if (refVal instanceof SchemaObject) {\n if (!refVal.validate) this._compile(refVal);\n root = refVal;\n } else {\n refVal = this._schemas[id];\n if (refVal instanceof SchemaObject) {\n if (!refVal.validate) this._compile(refVal);\n if (id == normalizeId(ref))\n return { schema: refVal, root: root, baseId: baseId };\n root = refVal;\n }\n }\n if (!root.schema) return;\n baseId = getFullPath(root.schema.id);\n }\n return getJsonPointer.call(this, p, baseId, root.schema, root);\n}\n\n\nfunction resolveRecursive(root, ref, parsedRef) {\n /* jshint validthis: true */\n var res = _resolve.call(this, root, ref);\n if (res) {\n var schema = res.schema;\n var baseId = res.baseId;\n root = res.root;\n if (schema.id) baseId = resolveUrl(baseId, schema.id);\n return getJsonPointer.call(this, parsedRef, baseId, schema, root);\n }\n}\n\n\nvar PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum']);\nfunction getJsonPointer(parsedRef, baseId, schema, root) {\n /* jshint validthis: true */\n parsedRef.hash = parsedRef.hash || '';\n if (parsedRef.hash.slice(0,2) != '#/') return;\n var parts = parsedRef.hash.split('/');\n\n for (var i = 1; i < parts.length; i++) {\n var part = parts[i];\n if (part) {\n part = unescapeFragment(part);\n schema = schema[part];\n if (!schema) break;\n if (schema.id && !PREVENT_SCOPE_CHANGE[part]) baseId = resolveUrl(baseId, schema.id);\n if (schema.$ref) {\n var $ref = resolveUrl(baseId, schema.$ref);\n var res = _resolve.call(this, root, $ref);\n if (res) {\n schema = res.schema;\n root = res.root;\n }\n }\n }\n }\n if (schema && schema != root.schema)\n return { schema: schema, root: root, baseId: baseId };\n}\n\n\nvar SIMPLE_INLINED = util.toHash([\n 'type', 'format', 'pattern',\n 'maxLength', 'minLength',\n 'maxProperties', 'minProperties',\n 'maxItems', 'minItems',\n 'maximum', 'minimum',\n 'uniqueItems', 'multipleOf',\n 'required', 'enum' \n]);\nfunction inlineRef(schema, limit) {\n if (limit === undefined) return checkNoRef(schema);\n else if (limit) return countKeys(schema) <= limit;\n}\n\n\nfunction checkNoRef(schema) {\n var item;\n if (Array.isArray(schema)) {\n for (var i=0; i 1 ? $$[1] : undefined\n , mapping = mapfn !== undefined\n , index = 0\n , iterFn = getIterFn(O)\n , length, result, step, iterator;\n if(mapping)mapfn = ctx(mapfn, $$len > 2 ? $$[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){\n for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){\n result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;\n }\n } else {\n length = toLength(O.length);\n for(result = new C(length); length > index; index++){\n result[index] = mapping ? mapfn(O[index], index) : O[index];\n }\n }\n result.length = index;\n return result;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.array.from.js\n ** module id = 565\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.array.from.js?"); + eval("'use strict';\nvar ctx = __webpack_require__(15)\n , $export = __webpack_require__(12)\n , toObject = __webpack_require__(343)\n , call = __webpack_require__(58)\n , isArrayIter = __webpack_require__(59)\n , toLength = __webpack_require__(60)\n , getIterFn = __webpack_require__(61);\n$export($export.S + $export.F * !__webpack_require__(71)(function(iter){ Array.from(iter); }), 'Array', {\n // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)\n from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){\n var O = toObject(arrayLike)\n , C = typeof this == 'function' ? this : Array\n , $$ = arguments\n , $$len = $$.length\n , mapfn = $$len > 1 ? $$[1] : undefined\n , mapping = mapfn !== undefined\n , index = 0\n , iterFn = getIterFn(O)\n , length, result, step, iterator;\n if(mapping)mapfn = ctx(mapfn, $$len > 2 ? $$[2] : undefined, 2);\n // if object isn't iterable or it's array with default iterator - use simple case\n if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){\n for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){\n result[index] = mapping ? call(iterator, mapfn, [step.value, index], true) : step.value;\n }\n } else {\n length = toLength(O.length);\n for(result = new C(length); length > index; index++){\n result[index] = mapping ? mapfn(O[index], index) : O[index];\n }\n }\n result.length = index;\n return result;\n }\n});\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/babel-runtime/~/core-js/library/modules/es6.array.from.js\n ** module id = 565\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./~/babel-runtime/~/core-js/library/modules/es6.array.from.js?"); /***/ }, /* 566 */ @@ -3945,7 +3945,7 @@ var ripple = /* 650 */ /***/ function(module, exports, __webpack_require__) { - eval("'use strict';\n\nvar _get = __webpack_require__(2)['default'];\n\nvar _inherits = __webpack_require__(16)['default'];\n\nvar _createClass = __webpack_require__(27)['default'];\n\nvar _classCallCheck = __webpack_require__(30)['default'];\n\nvar _Promise = __webpack_require__(31)['default'];\n\nvar _ = __webpack_require__(262);\nvar RippleAPI = __webpack_require__(1).RippleAPI;\n\nvar RippleAPIBroadcast = (function (_RippleAPI) {\n _inherits(RippleAPIBroadcast, _RippleAPI);\n\n function RippleAPIBroadcast(servers, options) {\n var _this = this;\n\n _classCallCheck(this, RippleAPIBroadcast);\n\n _get(Object.getPrototypeOf(RippleAPIBroadcast.prototype), 'constructor', this).call(this, options);\n this.ledgerVersion = 0;\n\n var apis = servers.map(function (server) {\n return new RippleAPI(_.assign({}, options, { server: server }));\n });\n\n this.getMethodNames().forEach(function (name) {\n _this[name] = function () {\n var _arguments = arguments;\n // eslint-disable-line no-loop-func\n return _Promise.race(apis.map(function (api) {\n return api[name].apply(api, _arguments);\n }));\n };\n });\n\n // connection methods must be overridden to apply to all api instances\n this.connect = function () {\n return _Promise.all(apis.map(function (api) {\n return api.connect();\n }));\n };\n this.disconnect = function () {\n return _Promise.all(apis.map(function (api) {\n return api.disconnect();\n }));\n };\n this.isConnected = function () {\n return _.every(apis.map(function (api) {\n return api.isConnected();\n }));\n };\n\n // synchronous methods are all passed directly to the first api instance\n var defaultAPI = apis[0];\n var syncMethods = ['sign', 'generateAddress', 'computeLedgerHash'];\n syncMethods.forEach(function (name) {\n _this[name] = defaultAPI[name].bind(defaultAPI);\n });\n\n apis.forEach(function (api) {\n api.on('ledger', _this.onLedgerEvent.bind(_this));\n api.on('error', function (errorCode, errorMessage, data) {\n return _this.emit('error', errorCode, errorMessage, data);\n });\n });\n }\n\n _createClass(RippleAPIBroadcast, [{\n key: 'onLedgerEvent',\n value: function onLedgerEvent(ledger) {\n if (ledger.ledgerVersion > this.ledgerVersion) {\n this.ledgerVersion = ledger.ledgerVersion;\n this.emit('ledger', ledger);\n }\n }\n }, {\n key: 'getMethodNames',\n value: function getMethodNames() {\n var methodNames = [];\n for (var _name in RippleAPI.prototype) {\n if (RippleAPI.prototype.hasOwnProperty(_name)) {\n if (typeof RippleAPI.prototype[_name] === 'function') {\n methodNames.push(_name);\n }\n }\n }\n return methodNames;\n }\n }]);\n\n return RippleAPIBroadcast;\n})(RippleAPI);\n\nmodule.exports = {\n RippleAPIBroadcast: RippleAPIBroadcast\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/broadcast.js\n ** module id = 650\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/broadcast.js?"); + eval("'use strict';\n\nvar _get = __webpack_require__(2)['default'];\n\nvar _inherits = __webpack_require__(18)['default'];\n\nvar _createClass = __webpack_require__(27)['default'];\n\nvar _classCallCheck = __webpack_require__(30)['default'];\n\nvar _Promise = __webpack_require__(31)['default'];\n\nvar _ = __webpack_require__(262);\nvar RippleAPI = __webpack_require__(1).RippleAPI;\n\nvar RippleAPIBroadcast = (function (_RippleAPI) {\n _inherits(RippleAPIBroadcast, _RippleAPI);\n\n function RippleAPIBroadcast(servers, options) {\n var _this = this;\n\n _classCallCheck(this, RippleAPIBroadcast);\n\n _get(Object.getPrototypeOf(RippleAPIBroadcast.prototype), 'constructor', this).call(this, options);\n this.ledgerVersion = 0;\n\n var apis = servers.map(function (server) {\n return new RippleAPI(_.assign({}, options, { server: server }));\n });\n\n this.getMethodNames().forEach(function (name) {\n _this[name] = function () {\n var _arguments = arguments;\n // eslint-disable-line no-loop-func\n return _Promise.race(apis.map(function (api) {\n return api[name].apply(api, _arguments);\n }));\n };\n });\n\n // connection methods must be overridden to apply to all api instances\n this.connect = function () {\n return _Promise.all(apis.map(function (api) {\n return api.connect();\n }));\n };\n this.disconnect = function () {\n return _Promise.all(apis.map(function (api) {\n return api.disconnect();\n }));\n };\n this.isConnected = function () {\n return _.every(apis.map(function (api) {\n return api.isConnected();\n }));\n };\n\n // synchronous methods are all passed directly to the first api instance\n var defaultAPI = apis[0];\n var syncMethods = ['sign', 'generateAddress', 'computeLedgerHash'];\n syncMethods.forEach(function (name) {\n _this[name] = defaultAPI[name].bind(defaultAPI);\n });\n\n apis.forEach(function (api) {\n api.on('ledger', _this.onLedgerEvent.bind(_this));\n api.on('error', function (errorCode, errorMessage, data) {\n return _this.emit('error', errorCode, errorMessage, data);\n });\n });\n }\n\n _createClass(RippleAPIBroadcast, [{\n key: 'onLedgerEvent',\n value: function onLedgerEvent(ledger) {\n if (ledger.ledgerVersion > this.ledgerVersion) {\n this.ledgerVersion = ledger.ledgerVersion;\n this.emit('ledger', ledger);\n }\n }\n }, {\n key: 'getMethodNames',\n value: function getMethodNames() {\n var methodNames = [];\n for (var _name in RippleAPI.prototype) {\n if (RippleAPI.prototype.hasOwnProperty(_name)) {\n if (typeof RippleAPI.prototype[_name] === 'function') {\n methodNames.push(_name);\n }\n }\n }\n return methodNames;\n }\n }]);\n\n return RippleAPIBroadcast;\n})(RippleAPI);\n\nmodule.exports = {\n RippleAPIBroadcast: RippleAPIBroadcast\n};\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/broadcast.js\n ** module id = 650\n ** module chunks = 0\n **/\n//# sourceURL=webpack:///./src/broadcast.js?"); /***/ }, /* 651 */ diff --git a/ripple-min.js b/ripple-min.js index f924c15..bc5d1dd 100644 --- a/ripple-min.js +++ b/ripple-min.js @@ -1,25 +1,25 @@ -var ripple=function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";e.exports={RippleAPI:r(1).RippleAPI,RippleAPIBroadcast:r(650).RippleAPIBroadcast,createHTTPServer:r(651).createHTTPServer}},function(e,t,r){(function(t){"use strict";var n=r(2)["default"],i=r(16)["default"],o=r(27)["default"],s=r(30)["default"],a=r(31)["default"];t._babelPolyfill||r(72);var u=r(262),c=r(264).EventEmitter,f=r(265),h=r(517),d=h.connect,l=h.disconnect,p=h.getServerInfo,g=h.getFee,v=h.isConnected,m=h.getLedgerVersion,y=r(518),b=r(537),_=r(622),w=r(624),S=r(625),x=r(626),E=r(628),A=r(631),P=r(633),T=r(634),I=r(635),R=r(637),O=r(638),k=r(639),L=r(640),j=r(641),N=r(642),F=r(643),M=r(644),C=r(645),B=r(265).errors,q=r(646).generateAddressAPI,D=r(647),z=r(648),U=function(e){function t(){s(this,t),n(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),o(t,[{key:"request",value:function(e,r){var i=e.ledger_index;return void 0!==i&&"validated"!==i&&(!u.isNumber(i)||i>this._ledgerVersion)?a.reject(new B.LedgerVersionError("ledgerVersion "+i+" is greater than server's most recent validated ledger: "+this._ledgerVersion)):n(Object.getPrototypeOf(t.prototype),"request",this).call(this,e,r)}}]),t}(f.Connection),V=function(e){function t(){var e=this,r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];s(this,t),f.validate.apiOptions(r),n(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this._feeCushion=r.feeCushion||1.2;var i=r.server;void 0!==i?(this.connection=new U(i,r),this.connection.on("ledgerClosed",function(t){e.emit("ledger",h.formatLedgerClose(t))}),this.connection.on("error",function(t,r,n){e.emit("error",t,r,n)})):this.connection=new U(null,r)}return i(t,e),t}(c);u.assign(V.prototype,{connect:d,disconnect:l,isConnected:v,getServerInfo:p,getFee:g,getLedgerVersion:m,getTransaction:y,getTransactions:b,getTrustlines:_,getBalances:w,getBalanceSheet:S,getPaths:x,getOrders:E,getOrderbook:A,getSettings:P,getAccountInfo:T,getLedger:z,preparePayment:I,prepareTrustline:R,prepareOrder:O,prepareOrderCancellation:k,prepareSuspendedPaymentCreation:L,prepareSuspendedPaymentExecution:j,prepareSuspendedPaymentCancellation:N,prepareSettings:F,sign:M,submit:C,generateAddress:q,computeLedgerHash:D,errors:B}),V._PRIVATE={validate:f.validate,RangeSet:r(350).RangeSet,ledgerUtils:r(519),schemaValidator:r(393)},e.exports={RippleAPI:V}}).call(t,function(){return this}())},function(e,t,r){"use strict";var n=r(3)["default"];t["default"]=function(e,t,r){for(var i=!0;i;){var o=e,s=t,a=r;i=!1,null===o&&(o=Function.prototype);var u=n(o,s);if(void 0!==u){if("value"in u)return u.value;var c=u.get;if(void 0===c)return;return c.call(a)}var f=Object.getPrototypeOf(o);if(null===f)return;e=f,t=s,r=a,i=!0,u=f=void 0}},t.__esModule=!0},function(e,t,r){e.exports={"default":r(4),__esModule:!0}},function(e,t,r){var n=r(5);r(6),e.exports=function(e,t){return n.getDesc(e,t)}},function(e,t){var r=Object;e.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(e,t,r){var n=r(7);r(11)("getOwnPropertyDescriptor",function(e){return function(t,r){return e(n(t),r)}})},function(e,t,r){var n=r(8),i=r(10);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(9);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){e.exports=function(e,t){var n=r(12),i=(r(14).Object||{})[e]||Object[e],o={};o[e]=t(i),n(n.S+n.F*r(15)(function(){i(1)}),"Object",o)}},function(e,t,r){var n=r(13),i=r(14),o="prototype",s=function(e,t){return function(){return e.apply(t,arguments)}},a=function(e,t,r){var u,c,f,h,d=e&a.G,l=e&a.P,p=d?n:e&a.S?n[t]:(n[t]||{})[o],g=d?i:i[t]||(i[t]={});d&&(r=t);for(u in r)c=!(e&a.F)&&p&&u in p,c&&u in g||(f=c?p[u]:r[u],d&&"function"!=typeof p[u]?h=r[u]:e&a.B&&c?h=s(f,n):e&a.W&&p[u]==f?!function(e){h=function(t){return this instanceof e?new e(t):e(t)},h[o]=e[o]}(f):h=l&&"function"==typeof f?s(Function.call,f):f,g[u]=h,l&&((g[o]||(g[o]={}))[u]=f))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,e.exports=a},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t){var r=e.exports={version:"1.2.3"};"number"==typeof __e&&(__e=r)},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,r){"use strict";var n=r(17)["default"],i=r(19)["default"];t["default"]=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=n(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i?i(e,t):e.__proto__=t)},t.__esModule=!0},function(e,t,r){e.exports={"default":r(18),__esModule:!0}},function(e,t,r){var n=r(5);e.exports=function(e,t){return n.create(e,t)}},function(e,t,r){e.exports={"default":r(20),__esModule:!0}},function(e,t,r){r(21),e.exports=r(14).Object.setPrototypeOf},function(e,t,r){var n=r(12);n(n.S,"Object",{setPrototypeOf:r(22).set})},function(e,t,r){var n=r(5).getDesc,i=r(23),o=r(24),s=function(e,t){if(o(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{i=r(25)(Function.call,n(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,r){return s(e,r),t?e.__proto__=r:i(e,r),e}}({},!1):void 0),check:s}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,r){var n=r(23);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){var n=r(26);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){"use strict";var n=r(28)["default"];t["default"]=function(){function e(e,t){for(var r=0;r=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r){var n=r(36),i=r(10);e.exports=function(e){return function(t,r){var o,s,a=String(i(t)),u=n(r),c=a.length;return 0>u||u>=c?e?"":void 0:(o=a.charCodeAt(u),55296>o||o>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?e?a.charAt(u):o:e?a.slice(u,u+2):(o-55296<<10)+(s-56320)+65536)}}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){"use strict";var n=r(38),i=r(12),o=r(39),s=r(40),a=r(43),u=r(44)("iterator"),c=r(47),f=!([].keys&&"next"in[].keys()),h="@@iterator",d="keys",l="values",p=function(){return this};e.exports=function(e,t,g,v,m,y,b){r(48)(g,t,v);var _,w,S=function(e){switch(e){case d:return function(){return new g(this,e)};case l:return function(){return new g(this,e)}}return function(){return new g(this,e)}},x=t+" Iterator",E=e.prototype,A=E[u]||E[h]||m&&E[m],P=A||S(m);if(A){var T=r(5).getProto(P.call(new e));r(49)(T,x,!0),!n&&a(E,h)&&s(T,u,p)}if((!n||b)&&s(E,u,P),c[t]=P,c[x]=p,m)if(_={values:m==l?P:S(l),keys:y?P:S(d),entries:m!=l?P:S("entries")},b)for(w in _)w in E||o(E,w,_[w]);else i(i.P+i.F*f,t,_)}},function(e,t){e.exports=!0},function(e,t,r){e.exports=r(40)},function(e,t,r){var n=r(5),i=r(41);e.exports=r(42)?function(e,t,r){return n.setDesc(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){e.exports=!r(15)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){var n=r(45)("wks"),i=r(13).Symbol;e.exports=function(e){return n[e]||(n[e]=i&&i[e]||(i||r(46))("Symbol."+e))}},function(e,t,r){var n=r(13),i="__core-js_shared__",o=n[i]||(n[i]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t){e.exports={}},function(e,t,r){"use strict";var n=r(5),i={};r(40)(i,r(44)("iterator"),function(){return this}),e.exports=function(e,t,o){e.prototype=n.create(i,{next:r(41)(1,o)}),r(49)(e,t+" Iterator")}},function(e,t,r){var n=r(5).setDesc,i=r(43),o=r(44)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t,r){r(51);var n=r(47);n.NodeList=n.HTMLCollection=n.Array},function(e,t,r){"use strict";var n=r(52),i=r(53),o=r(47),s=r(7);r(37)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){"use strict";var n,i=r(5),o=r(38),s=r(13),a=r(25),u=r(55),c=r(12),f=r(23),h=r(24),d=r(26),l=r(56),p=r(57),g=r(22).set,v=r(62),m=r(63),y=r(44)("species"),b=r(64),_=r(46)("record"),w=r(65),S="Promise",x=s.process,E="process"==u(x),A=s[S],P=function(e){var t=new A(function(){});return e&&(t.constructor=Object),A.resolve(t)===t},T=function(){function e(t){var r=new A(t);return g(r,e.prototype),r}var t=!1;try{if(t=A&&A.resolve&&P(),g(e,A),e.prototype=i.create(A.prototype,{constructor:{value:e}}),e.resolve(5).then(function(){})instanceof e||(t=!1),t&&r(42)){var n=!1;A.resolve(i.setDesc({},"then",{get:function(){n=!0}})),t=n}}catch(o){t=!1}return t}(),I=function(e){return f(e)&&(T?"Promise"==u(e):_ in e)},R=function(e,t){return o&&e===A&&t===n?!0:v(e,t)},O=function(e){var t=h(e)[y];return void 0!=t?t:e},k=function(e){var t;return f(e)&&"function"==typeof(t=e.then)?t:!1},L=function(e,t){if(!e.n){e.n=!0;var r=e.c;w(function(){for(var n=e.v,i=1==e.s,o=0,a=function(t){var r,o,s=i?t.ok:t.fail;try{s?(i||(e.h=!0),r=s===!0?n:s(n),r===t.P?t.rej(TypeError("Promise-chain cycle")):(o=k(r))?o.call(r,t.res,t.rej):t.res(r)):t.rej(n)}catch(a){t.rej(a)}};r.length>o;)a(r[o++]);r.length=0,e.n=!1,t&&setTimeout(function(){var t,r,i=e.p;j(i)&&(E?x.emit("unhandledRejection",n,i):(t=s.onunhandledrejection)?t({promise:i,reason:n}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",n)),e.a=void 0},1)})}},j=function(e){var t,r=e[_],n=r.a||r.c,i=0;if(r.h)return!1;for(;n.length>i;)if(t=n[i++],t.fail||!j(t.P))return!1;return!0},N=function(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,t.a=t.c.slice(),L(t,!0))},F=function(e){var t,r=this;if(!r.d){r.d=!0,r=r.r||r;try{(t=k(e))?w(function(){var n={r:r,d:!1};try{t.call(e,a(F,n,1),a(N,n,1))}catch(i){N.call(n,i)}}):(r.v=e,r.s=1,L(r,!1))}catch(n){N.call({r:r,d:!1},n)}}};T||(A=function(e){d(e);var t={p:l(this,A,S),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};this[_]=t;try{e(a(F,t,1),a(N,t,1))}catch(r){N.call(t,r)}},r(70)(A.prototype,{then:function(e,t){var r={ok:"function"==typeof e?e:!0,fail:"function"==typeof t?t:!1},n=r.P=new(b(this,A))(function(e,t){r.res=e,r.rej=t});d(r.res),d(r.rej);var i=this[_];return i.c.push(r),i.a&&i.a.push(r),i.s&&L(i,!1),n},"catch":function(e){return this.then(void 0,e)}})),c(c.G+c.W+c.F*!T,{Promise:A}),r(49)(A,S),m(A),m(n=r(14)[S]),c(c.S+c.F*!T,S,{reject:function(e){return new this(function(t,r){r(e)})}}),c(c.S+c.F*(!T||P(!0)),S,{resolve:function(e){return I(e)&&R(e.constructor,this)?e:new this(function(t){t(e)})}}),c(c.S+c.F*!(T&&r(71)(function(e){A.all(e)["catch"](function(){})})),S,{all:function(e){var t=O(this),r=[];return new t(function(n,o){p(e,!1,r.push,r);var s=r.length,a=Array(s);s?i.each.call(r,function(e,r){t.resolve(e).then(function(e){a[r]=e,--s||n(a)},o)}):n(a)})},race:function(e){var t=O(this);return new t(function(r,n){p(e,!1,function(e){t.resolve(e).then(r,n)})})}})},function(e,t,r){var n=r(9),i=r(44)("toStringTag"),o="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=(t=Object(e))[i])?r:o?n(t):"Object"==(s=n(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t){e.exports=function(e,t,r){if(!(e instanceof t))throw TypeError(r+": use the 'new' operator!");return e}},function(e,t,r){var n=r(25),i=r(58),o=r(59),s=r(24),a=r(60),u=r(61);e.exports=function(e,t,r,c){var f,h,d,l=u(e),p=n(r,c,t?2:1),g=0;if("function"!=typeof l)throw TypeError(e+" is not iterable!");if(o(l))for(f=a(e.length);f>g;g++)t?p(s(h=e[g])[0],h[1]):p(e[g]);else for(d=l.call(e);!(h=d.next()).done;)i(d,p,h.value,t)}},function(e,t,r){var n=r(24);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(o){var s=e["return"];throw void 0!==s&&n(s.call(e)),o}}},function(e,t,r){var n=r(47),i=r(44)("iterator");e.exports=function(e){return(n.Array||Array.prototype[i])===e}},function(e,t,r){var n=r(36),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){var n=r(55),i=r(44)("iterator"),o=r(47);e.exports=r(14).getIteratorMethod=function(e){return void 0!=e?e[i]||e["@@iterator"]||o[n(e)]:void 0}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,r){"use strict";var n=r(5),i=r(44)("species");e.exports=function(e){!r(42)||i in e||n.setDesc(e,i,{configurable:!0,get:function(){return this}})}},function(e,t,r){var n=r(24),i=r(26),o=r(44)("species");e.exports=function(e,t){var r,s=n(e).constructor;return void 0===s||void 0==(r=n(s)[o])?t:i(r)}},function(e,t,r){var n,i,o,s=r(13),a=r(66).set,u=s.MutationObserver||s.WebKitMutationObserver,c=s.process,f="process"==r(9)(c),h=function(){var e,t;for(f&&(e=c.domain)&&(c.domain=null,e.exit());n;)t=n.domain,t&&t.enter(),n.fn.call(),t&&t.exit(),n=n.next;i=void 0,e&&e.enter()};if(f)o=function(){c.nextTick(h)};else if(u){var d=1,l=document.createTextNode("");new u(h).observe(l,{characterData:!0}),o=function(){l.data=d=-d}}else o=function(){a.call(s,h)};e.exports=function(e){var t={fn:e,next:void 0,domain:f&&c.domain};i&&(i.next=t),n||(n=t,o()),i=t}},function(e,t,r){"use strict";var n,i,o,s=r(25),a=r(67),u=r(68),c=r(69),f=r(13),h=f.process,d=f.setImmediate,l=f.clearImmediate,p=f.MessageChannel,g=0,v={},m="onreadystatechange",y=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},b=function(e){y.call(e.data)};d&&l||(d=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return v[++g]=function(){a("function"==typeof e?e:Function(e),t)},n(g),g},l=function(e){delete v[e]},"process"==r(9)(h)?n=function(e){h.nextTick(s(y,e,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=b,n=s(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(e){f.postMessage(e+"","*")},f.addEventListener("message",b,!1)):n=m in c("script")?function(e){u.appendChild(c("script"))[m]=function(){u.removeChild(this),y.call(e)}}:function(e){setTimeout(s(y,e,1),0)}),e.exports={set:d,clear:l}},function(e,t){e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){e.exports=r(13).document&&document.documentElement},function(e,t,r){var n=r(23),i=r(13).document,o=n(i)&&n(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,r){var n=r(39);e.exports=function(e,t){for(var r in t)n(e,r,t[r]);return e}},function(e,t,r){var n=r(44)("iterator"),i=!1;try{var o=[7][n]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(s){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o=[7],s=o[n]();s.next=function(){r=!0},o[n]=function(){return s},e(o)}catch(a){}return r}},function(e,t,r){(function(e){"use strict";if(r(73),r(260),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0}).call(t,function(){return this}())},function(e,t,r){r(74),r(107),r(113),r(115),r(117),r(119),r(121),r(123),r(124),r(125),r(126),r(127),r(128),r(129),r(130),r(131),r(132),r(133),r(134),r(137),r(138),r(139),r(141),r(142),r(143),r(144),r(145),r(146),r(147),r(149),r(150),r(151),r(153),r(154),r(155),r(157),r(158),r(159),r(160),r(161),r(162),r(163),r(164),r(165),r(166),r(167),r(168),r(169),r(170),r(175),r(176),r(180),r(181),r(183),r(184),r(189),r(190),r(193),r(195),r(197),r(199),r(200),r(201),r(203),r(204),r(206),r(207),r(208),r(209),r(216),r(219),r(220),r(222),r(223),r(224),r(225),r(226),r(227),r(228),r(229),r(230),r(231),r(232),r(233),r(235),r(236),r(237),r(238),r(239),r(240),r(242),r(243),r(244),r(245),r(247),r(248),r(250),r(251),r(253),r(254),r(255),r(258),r(259),e.exports=r(78)},function(e,t,r){"use strict";var n,i=r(75),o=r(76),s=r(81),a=r(80),u=r(87),c=r(88),f=r(90),h=r(91),d=r(92),l=r(82),p=r(93),g=r(86),v=r(89),m=r(94),y=r(96),b=r(98),_=r(99),w=r(100),S=r(97),x=r(84)("__proto__"),E=r(101),A=r(106)(!1),P=Object.prototype,T=Array.prototype,I=T.slice,R=T.join,O=i.setDesc,k=i.getDesc,L=i.setDescs,j={};s||(n=!l(function(){return 7!=O(c("div"),"a",{get:function(){return 7}}).a}),i.setDesc=function(e,t,r){if(n)try{return O(e,t,r)}catch(i){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(p(e)[t]=r.value),e},i.getDesc=function(e,t){if(n)try{return k(e,t)}catch(r){}return f(e,t)?a(!P.propertyIsEnumerable.call(e,t),e[t]):void 0},i.setDescs=L=function(e,t){p(e);for(var r,n=i.getKeys(t),o=n.length,s=0;o>s;)i.setDesc(e,r=n[s++],t[r]);return e}),o(o.S+o.F*!s,"Object",{getOwnPropertyDescriptor:i.getDesc,defineProperty:i.setDesc,defineProperties:L});var N="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),F=N.concat("length","prototype"),M=N.length,C=function(){var e,t=c("iframe"),r=M,n=">";for(t.style.display="none",u.appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("