**Describe the bug** - multiple pages of cancelled open orders in the Activity Tab - Clicking any cancelled order tab is void of info: account, order placed, asset - Clicking the Block number (after clicking the cancelled order tab) opens a blue "go to block" field. - Clicking the Block number on Cryptofresh or other Explorers yields the same results. - Multiple assets are not populating either in Portfolio balance: BEOS, Cryptobridge, etc **To Reproduce** Steps to reproduce the behavior: 1. Go to the Activity tab in the Dashboard 2. Click on a cancelled order 3. Scroll down to your transaction if you can find it 4. Click on the Block number 5. See error of blue "go to block" 6. find the same cancelled order on a Explorer; click the block number 7. See error void of transaction information **Expected behavior** 1. A clear and concise description of the cancelled order, transaction, and block number. 2. More information regarding cancelled orders in the Activity Tab without having to click the cancelled order tab. Clicking the cancelled order tab can still redirect to the block number, but it would be nice to simply have that information displayed, same as other transactions. **Screenshots**   **Desktop (please complete the following information):** - OS: Windows 8.1 - Version bitshares 3.1.190618-rc1-rc1 **Additional context** `!function(e) { function t(t) { for (var a, n, s = t[0], l = t[1], c = t[2], u = 0, p = []; u < s.length; u++) n = s[u], i[n] && p.push(i[n][0]), i[n] = 0; for (a in l) Object.prototype.hasOwnProperty.call(l, a) && (e[a] = l[a]); for (d && d(t); p.length; ) p.shift()(); return o.push.apply(o, c || []), r() } function r() { for (var e, t = 0; t < o.length; t++) { for (var r = o[t], a = !0, n = 1; n < r.length; n++) { var l = r[n]; 0 !== i[l] && (a = !1) } a && (o.splice(t--, 1), e = s(s.s = r[0])) } return e } var a = {} , n = { 7: 0 } , i = { 7: 0 } , o = []; function s(t) { if (a[t]) return a[t].exports; var r = a[t] = { i: t, l: !1, exports: {} }; return e[t].call(r.exports, r, r.exports, s), r.l = !0, r.exports } s.e = function(e) { var t = []; n[e] ? t.push(n[e]) : 0 !== n[e] && { 0: 1, 1: 1, 10: 1, 15: 1, 20: 1 }[e] && t.push(n[e] = new Promise(function(t, r) { for (var a = ({ 0: "account~dashboard-accounts~deposit-withdraw~transfer", 1: "existing-account", 2: "vendors~account~exchange~explorer", 3: "vendors~deposit-withdraw~exchange~explorer", 4: "wallet", 5: "vendors~exchange~explorer", 6: "account~settings", 9: "exchange", 10: "explorer", 11: "account", 12: "transfer", 13: "deposit-withdraw", 14: "news", 15: "settings", 16: "help", 17: "asset", 18: "block", 19: "dashboard-accounts", 20: "dashboard", 21: "create-worker", 23: "vendors~deposit-withdraw", 24: "vendors~exchange", 25: "vendors~account", 26: "vendors~news", 27: "vendors~transfer" }[e] || e) + "." + { 0: "cbd0ee53fe8c94e9a452", 1: "c678f08f16fd6f6a8cf8", 2: "31d6cfe0d16ae931b73c", 3: "31d6cfe0d16ae931b73c", 4: "31d6cfe0d16ae931b73c", 5: "31d6cfe0d16ae931b73c", 6: "31d6cfe0d16ae931b73c", 8: "31d6cfe0d16ae931b73c", 9: "31d6cfe0d16ae931b73c", 10: "4b005b9ac73124a58b5c", 11: "31d6cfe0d16ae931b73c", 12: "31d6cfe0d16ae931b73c", 13: "31d6cfe0d16ae931b73c", 14: "31d6cfe0d16ae931b73c", 15: "78ea325ca95294a9f9fa", 16: "31d6cfe0d16ae931b73c", 17: "31d6cfe0d16ae931b73c", 18: "31d6cfe0d16ae931b73c", 19: "31d6cfe0d16ae931b73c", 20: "cbd0ee53fe8c94e9a452", 21: "31d6cfe0d16ae931b73c", 23: "31d6cfe0d16ae931b73c", 24: "31d6cfe0d16ae931b73c", 25: "31d6cfe0d16ae931b73c", 26: "31d6cfe0d16ae931b73c", 27: "31d6cfe0d16ae931b73c", 28: "31d6cfe0d16ae931b73c" }[e] + ".css", n = s.p + a, i = document.getElementsByTagName("link"), o = 0; o < i.length; o++) { var l = (u = i[o]).getAttribute("data-href") || u.getAttribute("href"); if ("stylesheet" === u.rel && (l === a || l === n)) return t() } var c = document.getElementsByTagName("style"); for (o = 0; o < c.length; o++) { var u; if ((l = (u = c[o]).getAttribute("data-href")) === a || l === n) return t() } var d = document.createElement("link"); d.rel = "stylesheet", d.type = "text/css", d.onload = t, d.onerror = function(t) { var a = t && t.target && t.target.src || n , i = new Error("Loading CSS chunk " + e + " failed.\n(" + a + ")"); i.request = a, r(i) } , d.href = n, document.getElementsByTagName("head")[0].appendChild(d) } ).then(function() { n[e] = 0 })); var r = i[e]; if (0 !== r) if (r) t.push(r[2]); else { var a = new Promise(function(t, a) { r = i[e] = [t, a] } ); t.push(r[2] = a); var o, l = document.getElementsByTagName("head")[0], c = document.createElement("script"); c.charset = "utf-8", c.timeout = 120, s.nc && c.setAttribute("nonce", s.nc), c.src = function(e) { return s.p + "" + ({ 0: "account~dashboard-accounts~deposit-withdraw~transfer", 1: "existing-account", 2: "vendors~account~exchange~explorer", 3: "vendors~deposit-withdraw~exchange~explorer", 4: "wallet", 5: "vendors~exchange~explorer", 6: "account~settings", 9: "exchange", 10: "explorer", 11: "account", 12: "transfer", 13: "deposit-withdraw", 14: "news", 15: "settings", 16: "help", 17: "asset", 18: "block", 19: "dashboard-accounts", 20: "dashboard", 21: "create-worker", 23: "vendors~deposit-withdraw", 24: "vendors~exchange", 25: "vendors~account", 26: "vendors~news", 27: "vendors~transfer" }[e] || e) + "." + { 0: "85d542548d2786364dac", 1: "24234c0650e8d4ad5a96", 2: "65dcb48d37232464f1a7", 3: "12b6607a14b78ff946fa", 4: "29482c59bf660f984f2b", 5: "60794ce98e4a1b613326", 6: "895ae3dc094eadd22202", 8: "86c339141aa45b1880c8", 9: "9151c1c019e3cd884de3", 10: "33db300ef0a5a3f098c6", 11: "4cd209696513ac219e04", 12: "dc23651ee248e61933ce", 13: "d14887a92b80ebe63100", 14: "cd86f7662e742f965959", 15: "440755a2f5c1484bfaa6", 16: "6c44bf1f6dc84c1a8ad7", 17: "acbdb1c9491dd6dc73ac", 18: "3f7eb801cfce0a736ce0", 19: "100e0b373e2f7034affe", 20: "8ec7e943256431c3f079", 21: "8b5b45444e82f5b4d40d", 23: "9a1439d6e23aef023d95", 24: "990c9577bbcaae77a016", 25: "529eece2d876efed8792", 26: "ec1ecb30e2826b048c3e", 27: "e5b7ce52d20f99176ef3", 28: "08251f07a98c14eba5fa" }[e] + ".js" }(e), o = function(t) { c.onerror = c.onload = null, clearTimeout(u); var r = i[e]; if (0 !== r) { if (r) { var a = t && ("load" === t.type ? "missing" : t.type) , n = t && t.target && t.target.src , o = new Error("Loading chunk " + e + " failed.\n(" + a + ": " + n + ")"); o.type = a, o.request = n, r[1](o) } i[e] = void 0 } } ; var u = setTimeout(function() { o({ type: "timeout", target: c }) }, 12e4); c.onerror = c.onload = o, l.appendChild(c) } return Promise.all(t) } , s.m = e, s.c = a, s.d = function(e, t, r) { s.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: r }) } , s.r = function(e) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }) } , s.t = function(e, t) { if (1 & t && (e = s(e)), 8 & t) return e; if (4 & t && "object" == typeof e && e && e.__esModule) return e; var r = Object.create(null); if (s.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e) for (var a in e) s.d(r, a, function(t) { return e[t] } .bind(null, a)); return r } , s.n = function(e) { var t = e && e.__esModule ? function() { return e.default } : function() { return e } ; return s.d(t, "a", t), t } , s.o = function(e, t) { return Object.prototype.hasOwnProperty.call(e, t) } , s.p = "", s.oe = function(e) { throw console.error(e), e } ; var l = window.webpackJsonp = window.webpackJsonp || [] , c = l.push.bind(l); l.push = t, l = l.slice(); for (var u = 0; u < l.length; u++) t(l[u]); var d = c; o.push([869, 22]), r() }([, , , , , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(107) , n = r(5) , i = r(42) , o = r(1262) , s = /\b\d+\.\d+\.(\d+)\b/ , l = n.ChainTypes.object_type , c = { is_object_id: function(e) { return "string" == typeof e && (null !== s.exec(e) && 3 === e.split(".").length) }, is_object_type: function(e, t) { var r = l[t]; return r && e ? (r = "1." + r.toString(), e.substring(0, r.length) === r) : null }, get_asset_precision: function(e) { return e = e.toJS ? e.get("precision") : e, Math.pow(10, e) }, get_asset_amount: function(e, t) { return 0 === e ? e : e ? e / this.get_asset_precision(t.toJS ? t.get("precision") : t.precision) : null }, convert_satoshi_to_typed: function(e, t) { return 0 === e ? e : e ? e / this.get_asset_precision(t.toJS ? t.get("precision") : t.precision) : null }, convert_typed_to_satoshi: function(e, t) { return e * this.get_asset_precision(t.toJS ? t.get("precision") : t.precision) }, get_asset_price: function(e, t, r, a) { var n = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; if (!t || !a) return 1; var i = this.get_asset_amount(e, t) / this.get_asset_amount(r, a); return n ? 1 / i : i }, format_volume: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 3; return e < 1e4 ? this.format_number(e, t) : e < 1e6 ? (Math.round(e / 10) / 100).toFixed(2) + "k" : (Math.round(e / 1e4) / 100).toFixed(2) + "M" }, format_number: function(e, t) { var r = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2]; if (isNaN(e) || !isFinite(e) || void 0 === e || null === e) return ""; for (var a = ".", n = 0; n < t; n++) a += "0"; var i = o(e).format("0,0" + a); return i.indexOf(".") > 0 && !r ? i.replace(/0+$/, "").replace(/\.$/, "") : i }, format_asset: function(e, t, r) { var a = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3] , n = void 0 , i = 0; if (void 0 !== t) { "symbol"in t ? (n = t.symbol, i = t.precision) : (n = t.get("symbol"), i = t.get("precision")); var o = this.get_asset_precision(i); return this.format_number(e / o, i, a) + (r ? "" : " " + n) } }, price_text: function(e, t, r) { var a = r.toJS ? r.get("id") : r.id , n = r.toJS ? r.get("precision") : r.precision , i = t.toJS ? t.get("id") : t.id , o = t.toJS ? t.get("precision") : t.precision , s = { "1.3.113": 5, "1.3.121": 5 }; return "1.3.0" === a ? this.format_number(e, n) : "1.3.0" === i ? this.format_number(e, Math.min(8, n + 2)) : s[a] ? this.format_number(e, s[a]) : this.format_number(e, Math.min(8, Math.max(n + o, 2))) }, price_to_text: function(e, t, r) { var a = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null; if ("number" == typeof e && t && r) { e === 1 / 0 && (e = 0); var n = void 0 , i = (n = a ? this.format_number(e, a) : this.price_text(e, t, r)).split(".") , o = i[0] , s = i[1] , l = void 0 , c = 0; if (s) if (e > 1) { for (l = s.length - 1; l >= 0 && "0" === s[l]; l--) c++ } else { var u = s.length; for (l = 0; l < u; l++) { if ("0" !== s[l]) { l--; break } c++ } } var d = c ? s.substr(Math.max(0, l + 1), s.length) : null; return d && (d.length === s.length ? s = null : d.length && (s = s.substr(0, l + 1))), { text: n, int: o, dec: s, trailing: d, full: e } } }, check_market_stats: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : { close: {} } , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { close: {} }; return e.volumeBase !== t.volumeBase || !this.are_equal_shallow(e.close && e.close.base, t.close && t.close.base) || !this.are_equal_shallow(e.close && e.close.quote, t.close && t.close.quote) }, are_equal_shallow: function(e, t) { if (!e && t || e && !t) return !1; if (Array.isArray(e) && Array.isArray(e) && e.length > t.length) return !1; if ("string" == typeof e && "string" == typeof t) return e === t; if ("string" == typeof e && "string" != typeof t || "string" != typeof e && "string" == typeof t) return !1; if (e && e.toJS && t && t.toJS) return e === t; for (var r in e) if (e.hasOwnProperty(r) && !(r in t) || e[r] !== t[r]) return !1; for (var r in t) if (t.hasOwnProperty(r) && !(r in e) || e[r] !== t[r]) return !1; return !0 }, makeISODateString: function(e) { return "string" != typeof e || /Z$/.test(e) || (e += "Z"), e }, format_date: function(e) { return e = this.makeISODateString(e), new Date(e).toLocaleDateString() }, format_time: function(e) { return e = this.makeISODateString(e), new Date(e).toLocaleString() }, limitByPrecision: function(e, t) { var r = e.toString() , a = r.split("."); return 1 === a.length || 2 === a.length && a[1].length <= t ? r : a[0] + "." + a[1].substr(0, t) }, convertPrice: function(e, t, r, n) { if (!e || !t) return null; e.toJS && this.is_object_type(e.get("id"), "asset") && (r = e.get("id"), e = e.get("bitasset") ? a.a.extractRawFeedPrice(e).toJS() : e.getIn(["options", "core_exchange_rate"]).toJS()), t.toJS && this.is_object_type(t.get("id"), "asset") && (n = t.get("id"), t = t.get("bitasset") ? a.a.extractRawFeedPrice(t).toJS() : t.getIn(["options", "core_exchange_rate"]).toJS()); var i = e.quote.asset_id , o = t.quote.asset_id , s = void 0 , l = void 0; i === r ? (s = e.quote.amount, l = e.base.amount) : (s = e.base.amount, l = e.quote.amount); var c = void 0 , u = void 0; o === n ? (c = t.quote.amount, u = t.base.amount) : (c = t.base.amount, u = t.quote.amount); var d = void 0 , p = void 0; return u > l ? (d = s * (u / l), p = c) : (d = s, p = c * (l / u)), { quote: { amount: d, asset_id: n }, base: { amount: p, asset_id: r } } }, convertValue: function(e, t, r, a) { e = e.toJS ? e.toJS() : e; var n = this.get_asset_precision(r.get("precision")) , i = this.get_asset_precision(a.get("precision")) , o = this.get_asset_price(e.quote.amount, r, e.base.amount, a) , s = r.get("id") !== a.get("id") ? i * (t / n) / o : t; return isNaN(s) || !isFinite(s) ? null : s }, sortText: function(e, t) { var r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; return e > t ? r ? 1 : -1 : e < t ? r ? -1 : 1 : 0 }, sortID: function(e, t) { var r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] , a = parseInt(e.split(".")[2], 10) , n = parseInt(t.split(".")[2], 10); return r ? n - a : a - n }, calc_block_time: function(e, t, r) { var a = null , n = null , i = null; return arguments.length > 3 && void 0 !== arguments[3] && arguments[3] || t && r ? (a = t ? t.get("parameters").get("block_interval") : 3, r ? (n = r.get("head_block_number"), i = new Date(r.get("time") + "Z")) : (n = 37025190, i = new Date("2019-04-30T07:55:24Z")), new Date(i - 1e3 * ((n - e) * a))) : null }, get_translation_parts: function(e) { return e.split(/{(.*?)}/g) }, get_percentage: function(e, t) { return Math.round(e / t * 100) + "%" }, replaceName: function(e) { if (!e) return { name: "", prefix: null, isBitAsset: !1 }; var t = e.get("symbol") , r = e.get("bitasset") && !e.getIn(["bitasset", "is_prediction_market"]) && "1.2.0" === e.get("issuer") , a = Object(i.d)() , n = void 0; for (n = 0; n < a.length; n++) if (-1 !== t.indexOf(a[n])) { t = t.replace(a[n], "") + ""; break } var o = r ? "bit" : a[n] , s = null; return Object(i.c)().find(function(e) { return -1 !== e.indexOf(o) }) || (s = o ? o.toLowerCase() : null), { name: t, prefix: s, isBitAsset: !!r } } }; t.a = c } , , , , function(e, t, r) { "use strict"; (function(e) { var a = r(587) , n = r(30) , i = r(99) , o = r(50) , s = r(97) , l = r(103) , c = r(26) , u = r(199) , d = r(164) , p = r(44) , h = r(162) , m = r(39) , f = r(5) , g = r(14) , _ = r(215) , b = r(25) , y = r(7) , v = r(4) , w = r.n(v) , k = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var x = null , S = null , A = void 0 , E = void 0; E = r(1576), A = r(586); var T = function(t) { function r() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, r); var e = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (r.__proto__ || Object.getPrototypeOf(r)).call(this)); return e.state = { wallet: null, saving_keys: !1 }, e.confirm_transactions = !0, f.ChainStore.subscribe(e.checkNextGeneratedKey.bind(e)), e.generateNextKey_pubcache = [], e._export("checkNextGeneratedKey", "getWallet", "onLock", "isLocked", "decryptTcomb_PrivateKey", "getPrivateKey", "process_transaction", "transaction_update", "transaction_update_keys", "getBrainKey", "getBrainKeyPrivate", "onCreateWallet", "validatePassword", "changePassword", "generateNextKey", "incrementBrainKeySequence", "saveKeys", "saveKey", "setWalletModified", "setBackupDate", "setBrainkeyBackupDate", "_updateWallet", "loadDbData", "importKeysWorker", "resetBrainKeySequence", "decrementBrainKeySequence", "generateKeyFromPassword"), e.generatingKey = !1, e } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(r, i["a"]), k(r, [{ key: "checkNextGeneratedKey", value: function() { if (this.state.wallet && x && this.state.wallet.encrypted_brainkey && this.chainstore_account_ids_by_key !== f.ChainStore.account_ids_by_key) { this.chainstore_account_ids_by_key = f.ChainStore.account_ids_by_key; try { this.generateNextKey(!1) } catch (e) { console.error(e) } } } }, { key: "getWallet", value: function() { return this.state.wallet } }, { key: "onLock", value: function() { S = null, x = null } }, { key: "isLocked", value: function() { return !(x || S) } }, { key: "decryptTcomb_PrivateKey", value: function(t) { if (!t) return null; if (this.isLocked()) throw new Error("wallet locked"); if (S && S[t.pubkey]) return S[t.pubkey]; var r = x.decryptHex(t.encrypted_key); return f.PrivateKey.fromBuffer(new e(r,"hex")) } }, { key: "getPrivateKey", value: function(e) { if (S) return S[e]; if (!e) return null; e.Q && (e = e.toPublicKeyString()); var t = l.a.getTcomb_byPubkey(e); return t ? this.decryptTcomb_PrivateKey(t) : null } }, { key: "process_transaction", value: function(e, t, r) { var a = this , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : []; return c.a.getState().settings.get("passwordLogin") || g.Apis.instance().chain_id === this.state.wallet.chain_id ? p.a.unlock().then(function() { return m.a.tryToSetCurrentAccount(), Promise.all([e.set_required_fees(), e.update_head_block()]).then(function() { var i = {}; if (t) { var o = l.a.getPubkeys_having_PrivateKey(t); if (!o.length) throw new Error("Missing signing key"); var s = !0 , c = !1 , u = void 0; try { for (var p, h = o[Symbol.iterator](); !(s = (p = h.next()).done); s = !0) { var m = p.value , f = a.getPrivateKey(m); e.add_signer(f, m), i[m] = !0 } } catch (e) { c = !0, u = e } finally { try { !s && h.return && h.return() } finally { if (c) throw u } } } return e.get_potential_signatures().then(function(t) { var r = t.pubkeys , o = t.addys , s = l.a.getPubkeys_having_PrivateKey(r.concat(n), o); return e.get_required_signatures(s).then(function(t) { var r = !0 , n = !1 , o = void 0; try { for (var s, l = t[Symbol.iterator](); !(r = (s = l.next()).done); r = !0) { var c = s.value; if (!i[c]) { var u = a.getPrivateKey(c); if (!u) throw new Error("Missing signing key for " + c); e.add_signer(u, c) } } } catch (e) { n = !0, o = e } finally { try { !r && l.return && l.return() } finally { if (n) throw o } } }) }).then(function() { return r ? a.confirm_transactions ? new Promise(function(t, r) { d.a.confirm(e, t, r) } ) : e.broadcast() : e.serialize() }) }) }).catch(function() {}) : Promise.reject("Mismatched chain_id; expecting " + this.state.wallet.chain_id + ", but got " + g.Apis.instance().chain_id) } }, { key: "transaction_update", value: function() { return o.a.instance().db().transaction(["wallet"], "readwrite") } }, { key: "transaction_update_keys", value: function() { return o.a.instance().db().transaction(["wallet", "private_keys"], "readwrite") } }, { key: "getBrainKey", value: function() { var e = this.state.wallet; if (!e.encrypted_brainkey) throw new Error("missing brainkey"); if (!x) throw new Error("wallet locked"); return x.decryptHexToText(e.encrypted_brainkey) } }, { key: "getBrainKeyPrivate", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.getBrainKey(); if (!e) throw new Error("missing brainkey"); return f.PrivateKey.fromSeed(f.key.normalize_brainKey(e)) } }, { key: "onCreateWallet", value: function(e, t) { var r = this , a = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : "default"; return function(i) { return new Promise(function(o, l) { if ("string" != typeof e) throw new Error("password string is required"); var c = void 0; if (t) { if ("string" != typeof t) throw new Error("Brainkey must be a string"); if ("" === t.trim()) throw new Error("Brainkey can not be an empty string"); if (t.length < 50) throw new Error("Brainkey must be at least 50 characters long"); c = new Date } var d = f.Aes.fromSeed(e) , h = f.key.get_random_key().toBuffer() , m = d.encryptToHex(h) , _ = f.Aes.fromSeed(h); t = t ? f.key.normalize_brainKey(t) : f.key.suggest_brain_key(i.en); var b = r.getBrainKeyPrivate(t).toPublicKey().toPublicKeyString() , y = _.encryptToHex(t) , v = f.PrivateKey.fromSeed(e).toPublicKey().toPublicKeyString() , w = { public_name: n, password_pubkey: v, encryption_key: m, encrypted_brainkey: y, brainkey_pubkey: b, brainkey_sequence: 0, brainkey_backup_date: c, created: new Date, last_modified: new Date, chain_id: g.Apis.instance().chain_id }; Object(u.b)(w); var k = r.transaction_update() , S = s.a.add(k.objectStore("wallet"), w) , A = s.a.on_transaction_end(k).then(function() { r.state.wallet = w, r.setState({ wallet: w }), a && (x = _, p.a.unlock().catch(function() {})) }); Promise.all([S, A]).then(function() { o() }).catch(function(e) { l(e) }) } ) }(A) } }, { key: "generateKeyFromPassword", value: function(e, t, r) { var a = e + t + r , n = f.PrivateKey.fromSeed(a); return { privKey: n, pubKey: n.toPublicKey().toString() } } }, { key: "validatePassword", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] , r = this , a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : ["active", "owner", "memo"]; if (a) { var i = function(e, t, r) { S || (S = {}), S[r] = t, o++, l.a.setPasswordLoginKey({ pubkey: r, import_account_names: [a], encrypted_key: null, id: o, brainkey_sequence: null }) } , o = 0 , s = void 0; try { s = f.PrivateKey.fromWif(e) } catch (e) {} var c = f.ChainStore.getAccount(a, !1) , u = void 0; if (s && (u = { privKey: s, pubKey: s.toPublicKey().toString() }), n.forEach(function(t) { s || (u = r.generateKeyFromPassword(a, t, e)); var n = !1; if (c) if ("memo" === t) c.getIn(["options", "memo_key"]) === u.pubKey && (i(0, u.privKey, u.pubKey), n = !0); else if (c.getIn([t, "key_auths"]).forEach(function(e) { if (e.get(0) === u.pubKey) return i(0, u.privKey, u.pubKey), n = !0, !1 }), !n) { var o = "active" === t ? "owner" : "active"; c.getIn([o, "key_auths"]).forEach(function(e) { if (e.get(0) === u.pubKey) return i(0, u.privKey, u.pubKey), n = !0, !1 }) } }), !S && this.state.wallet) { var d = this.validatePassword(e, !0) , p = d.success , h = d.cloudMode; if (p && !h) return y.Notification.success({ message: w.a.translate("wallet.local_switch") }), b.a.changeSetting({ setting: "passwordLogin", value: !1 }), { success: !0, cloudMode: !1 } } return { success: !!S, cloudMode: !0 } } var m = this.state.wallet; try { var g = f.PrivateKey.fromSeed(e).toPublicKey().toPublicKeyString(); if (m.password_pubkey !== g) return !1; if (t) { var _ = f.Aes.fromSeed(e).decryptHexToBuffer(m.encryption_key); x = f.Aes.fromSeed(_) } return { success: !0, cloudMode: !1 } } catch (e) { return console.error(e), { success: !1, cloudMode: !1 } } } }, { key: "changePassword", value: function(e, t) { var r = this , a = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; return new Promise(function(n) { var i = r.state.wallet; if (!r.validatePassword(e).success) throw new Error("wrong password"); var o = f.Aes.fromSeed(e) , s = f.Aes.fromSeed(t); if (!i.encryption_key) throw new Error("This wallet does not support the change password feature."); var l = o.decryptHexToBuffer(i.encryption_key); i.encryption_key = s.encryptToHex(l); var c = f.PrivateKey.fromSeed(t); i.password_pubkey = c.toPublicKey().toPublicKeyString(), x = a ? f.Aes.fromSeed(l) : null, n(r.setWalletModified()) } ) } }, { key: "generateNextKey", value: function() { var e = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0]; if (!this.generatingKey) { this.generatingKey = !0; var t = this.getBrainKey() , r = this.state.wallet , a = Math.max(r.brainkey_sequence, 0) , n = null; this.brainkey_look_ahead = Math.min(10, (this.brainkey_look_ahead || 0) + 1); for (var i = a ? a + this.brainkey_look_ahead : Math.max(a + this.brainkey_look_ahead, 10), o = a; o < i; o++) { var s = f.key.get_brainPrivateKey(t, o) , l = this.generateNextKey_pubcache[o] ? this.generateNextKey_pubcache[o] : this.generateNextKey_pubcache[o] = s.toPublicKey().toPublicKeyString() , c = f.ChainStore.getAccountRefsOfKey(l); c && c.size && (n = o, console.log("WARN: Private key sequence " + n + " in-use. I am saving the private key and will go onto the next one."), this.saveKey(s, n)) } null !== n && (r.brainkey_sequence = n + 1, this._updateWallet()), a = Math.max(r.brainkey_sequence, 0); var u = f.key.get_brainPrivateKey(t, a); return e && u && (this.saveKey(u, a), this.incrementBrainKeySequence()), this.generatingKey = !1, { private_key: u, sequence: a } } } }, { key: "incrementBrainKeySequence", value: function(e) { return this.state.wallet.brainkey_sequence++, this._updateWallet(e) } }, { key: "decrementBrainKeySequence", value: function() { var e = this.state.wallet; return e.brainkey_sequence = Math.max(0, e.brainkey_sequence - 1), this._updateWallet() } }, { key: "resetBrainKeySequence", value: function() { var e = this.state.wallet; return e.brainkey_sequence = 0, console.log("reset sequence", e.brainkey_sequence), this._updateWallet() } }, { key: "importKeysWorker", value: function(e) { var t = this; return new Promise(function(r, a) { var n = [] , i = !0 , o = !1 , c = void 0; try { for (var u, d = e[Symbol.iterator](); !(i = (u = d.next()).done); i = !0) { var p = u.value; n.push(p.public_key_string) } } catch (e) { o = !0, c = e } finally { try { !i && d.return && d.return() } finally { if (o) throw c } } var h = _.a.addAll(n) , m = [] , b = !0 , y = !1 , v = void 0; try { for (var w, k = e[Symbol.iterator](); !(b = (w = k.next()).done); b = !0) { var S = w.value; m.push(S.private_plainhex) } } catch (e) { y = !0, v = e } finally { try { !b && k.return && k.return() } finally { if (y) throw v } } var A = new E; A.postMessage({ private_plainhex_array: m, key: x.key, iv: x.iv }); var T = t; t.setState({ saving_keys: !0 }), A.onmessage = function(t) { try { console.log("Preparing for private keys save"); for (var n = t.data, i = [], o = 0; o < e.length; o++) { var c = e[o] , u = c.import_account_names , d = c.public_key_string , p = c.private_plainhex , m = n[o]; if (d) { if (0 != d.indexOf(g.ChainConfig.address_prefix)) throw new Error("Public Key should start with " + g.ChainConfig.address_prefix) } else d = f.PrivateKey.fromHex(p).toPublicKey().toPublicKeyString(); var _ = { import_account_names: u, encrypted_key: m, pubkey: d }; i.push(_) } console.log("Saving private keys", (new Date).toString()); var b = T.transaction_update_keys() , y = s.a.on_transaction_end(b); try { var v = l.a.addPrivateKeys_noindex(i, b); e.length != v && T.setWalletModified(b), T.setState({ saving_keys: !1 }), r(Promise.all([y, h]).then(function() { console.log("Done saving keys", (new Date).toString()) })) } catch (e) { b.abort(), console.error(e), a(e) } } catch (e) { console.error("AesWorker.encrypt", e) } } } ) } }, { key: "saveKeys", value: function(e, t, r) { var a = [] , n = !0 , i = !1 , o = void 0; try { for (var s, l = e[Symbol.iterator](); !(n = (s = l.next()).done); n = !0) { var c = s.value; a.push(this.saveKey(c.private_key, c.sequence, null, r, t)) } } catch (e) { i = !0, o = e } finally { try { !n && l.return && l.return() } finally { if (i) throw o } } return Promise.all(a) } }, { key: "saveKey", value: function(e, t, r, a) { var n = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.transaction_update_keys() , i = x.encryptToHex(e.toBuffer()); this.state.wallet; if (a) { if (0 != a.indexOf(g.ChainConfig.address_prefix)) throw new Error("Public Key should start with " + g.ChainConfig.address_prefix) } else a = e.toPublicKey().toPublicKeyString(); var o = { import_account_names: r, encrypted_key: i, pubkey: a, brainkey_sequence: t }; return h.a.addKey(o, n).then(function(e) { return e }) } }, { key: "setWalletModified", value: function(e) { return this._updateWallet(e) } }, { key: "setBackupDate", value: function() { return this.state.wallet.backup_date = new Date, this._updateWallet() } }, { key: "setBrainkeyBackupDate", value: function() { return this.state.wallet.brainkey_backup_date = new Date, this._updateWallet() } }, { key: "_updateWallet", value: function() { var e = this , t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.transaction_update() , r = this.state.wallet; if (r) { var n = Object(a.a)(r); n.last_modified = new Date, Object(u.b)(n); var i = t.objectStore("wallet") , o = s.a.on_request_end(i.put(n)) , l = s.a.on_transaction_end(t).then(function() { e.state.wallet = n, e.setState({ wallet: n }) }); return Promise.all([o, l]) } !function(e) { throw console.error("----- WalletDb reject error -----", e), new Error(e) }("missing wallet") } }, { key: "loadDbData", value: function() { var e = this; return s.a.cursor("wallet", function(t) { if (!t) return !1; var r = t.value; r.created = new Date(r.created), r.last_modified = new Date(r.last_modified), r.backup_date = r.backup_date ? new Date(r.backup_date) : null, r.brainkey_backup_date = r.brainkey_backup_date ? new Date(r.brainkey_backup_date) : null; try { Object(u.b)(r) } catch (e) { console.log("WalletDb format error", e) } return e.state.wallet = r, e.setState({ wallet: r }), !1 }) } }]), r }() , C = n.a.createStore(T, "WalletDb"); t.a = C } ).call(this, r(126).Buffer) } , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(4) , o = r.n(i) , s = r(1) , l = r.n(s) , c = {} , u = !0 , d = !1 , p = void 0; try { for (var h, m = ["photo-camera", "adjust", "alarm", "assets", "autolock", "barter", "borrow", "checkmark-circle", "chevron-down", "clippy", "clock", "cog", "cogs", "coming_soon", "connected", "connect", "cross-circle", "dashboard", "deposit", "disconnected", "direct_debit", "dollar-green", "dollar", "download", "excel", "eye", "eye-striked", "fi-star", "folder", "grouping", "hamburger-x", "hamburger", "htlc", "hourglass", "key", "list", "locked", "minus-circle", "news", "plus-circle", "power", "question-circle", "server", "settle", "share", "showcases", "shuffle", "text", "thumb-tack", "thumb-untack", "thumbs-up", "times", "trade", "transfer", "unlocked", "user", "voting", "warning", "withdraw", "filter", "info-circle-o", "zoom", "people", "fire", "question-in-circle", "attention", "checkmark", "paperclip", "wallet"][Symbol.iterator](); !(u = (h = m.next()).done); u = !0) { var f = h.value; c[f] = r(1578)("./" + f + ".svg") } } catch (e) { d = !0, p = e } finally { try { !u && m.return && m.return() } finally { if (d) throw p } } var g = c , _ = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); r(1648); var b = function(e) { function t() { return function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t), function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), _(t, [{ key: "shouldComponentUpdate", value: function(e) { return e.className !== this.props.className || e.name !== this.props.name || e.title !== this.props.title || e.size !== this.props.size } }, { key: "render", value: function() { var e = "icon " + this.props.name; if (this.props.size && (e += " icon-" + this.props.size), this.props.className && (e += " " + this.props.className), null != this.props.title) { var t = this.props.title; return "string" == typeof t && t.indexOf(".") > 0 && (t = o.a.translate(t)), n.a.createElement("span", { title: t, className: e, style: this.props.style || {}, dangerouslySetInnerHTML: { __html: g[this.props.name] }, onClick: this.props.onClick }) } return n.a.createElement("span", { className: e, style: this.props.style || {}, dangerouslySetInnerHTML: { __html: g[this.props.name] }, onClick: this.props.onClick }) } }]), t }(); b.propTypes = { name: l.a.string.isRequired, title: l.a.string, size: l.a.oneOf(["1x", "1_5x", "2x", "3x", "4x", "5x", "10x"]), inverse: l.a.bool, className: l.a.string }, b.defaultProps = { title: null }; t.a = b } , , function(e, t, r) { "use strict"; var a = r(99) , n = r(11) , i = r.n(n) , o = r(30) , s = r(39) , l = r(25) , c = r(64) , u = r(50) , d = r(103) , p = r(5) , h = r(14) , m = r(291) , f = r(215) , g = r(55) , _ = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var b = new g.a("__graphene__") , y = function(e) { function t() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var e = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); e.bindListeners({ onSetCurrentAccount: s.a.setCurrentAccount, onCreateAccount: s.a.createAccount, onAccountSearch: s.a.accountSearch, tryToSetCurrentAccount: s.a.tryToSetCurrentAccount, onSetPasswordAccount: s.a.setPasswordAccount, onChangeSetting: l.a.changeSetting, onSetWallet: c.a.setWallet, onAddStarAccount: s.a.addStarAccount, onRemoveStarAccount: s.a.removeStarAccount, onAddAccountContact: s.a.addAccountContact, onRemoveAccountContact: s.a.removeAccountContact, onToggleHideAccount: s.a.toggleHideAccount }), e._export("loadDbData", "tryToSetCurrentAccount", "onCreateAccount", "getMyAccounts", "isMyAccount", "getMyAuthorityForAccount", "isMyKey", "reset", "setWallet"); var r = b.get("settings_v4", {}); void 0 === r.passwordLogin && (r.passwordLogin = !0); var a = e._checkReferrer(); return e.state = { subbed: !1, myActiveAccounts: i.a.Set(), myHiddenAccounts: i.a.Set(), currentAccount: null, passwordAccount: null, starredAccounts: i.a.Map(), searchAccounts: i.a.Map(), accountContacts: i.a.Set(), linkedAccounts: i.a.Set(), referralAccount: a, passwordLogin: r.passwordLogin }, e.getMyAccounts = e.getMyAccounts.bind(e), e.chainStoreUpdate = e.chainStoreUpdate.bind(e), e._getStorageKey = e._getStorageKey.bind(e), e.setWallet = e.setWallet.bind(e), e } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, a["a"]), _(t, [{ key: "_migrateUnfollowedAccounts", value: function(e) { try { var t = b.get("unfollowed_accounts", []) , r = b.get(this._getStorageKey("hiddenAccounts", e), []); t.length && !r.length && (b.set(this._getStorageKey("hiddenAccounts", e), t), b.remove("unfollowed_accounts"), this.setState({ myHiddenAccounts: i.a.Set(t) })) } catch (e) { console.error(e) } } }, { key: "_checkReferrer", value: function() { var e = ""; if (window) for (var t = function(e) { var t = window.location.search.match(new RegExp("(\\?|&)" + e + "(\\[\\])?=([^&]*)")); return !!t && decodeURIComponent(t[3]) }, r = ["r", "ref", "referrer", "referral"], a = 0; a < r.length && !(e = t(r[a])); a++) ; return e ? b.set("referralAccount", e) : b.remove("referralAccount"), e && console.log("referralAccount", e), e } }, { key: "reset", value: function() { this.state.subbed && p.ChainStore.unsubscribe(this.chainStoreUpdate), this.setState(this._getInitialState()) } }, { key: "onSetWallet", value: function(e) { var t = e.wallet_name; this.setWallet(t) } }, { key: "setWallet", value: function(e) { e !== this.state.wallet_name && (this.setState({ wallet_name: e, passwordAccount: b.get(this._getStorageKey("passwordAccount", { wallet_name: e }), null), starredAccounts: i.a.Map(b.get(this._getStorageKey("starredAccounts", { wallet_name: e }))), myActiveAccounts: i.a.Set(), accountContacts: i.a.Set(b.get(this._getStorageKey("accountContacts", { wallet_name: e }), [])), myHiddenAccounts: i.a.Set(b.get(this._getStorageKey("hiddenAccounts", { wallet_name: e }), [])) }), this.tryToSetCurrentAccount(), this._migrateUnfollowedAccounts({ wallet_name: e })) } }, { key: "_getInitialState", value: function() { this.account_refs = null, this.initial_account_refs_load = !0; var e = this.state.wallet_name || "" , t = i.a.Map(b.get(this._getStorageKey("starredAccounts", { wallet_name: e }))) , r = i.a.Set(b.get(this._getStorageKey("accountContacts", { wallet_name: e }), [])); return { neverShowBrowsingModeNotice: !1, update: !1, subbed: !1, accountsLoaded: !1, refsLoaded: !1, currentAccount: null, referralAccount: b.get("referralAccount", ""), passwordAccount: b.get(this._getStorageKey("passwordAccount", { wallet_name: e }), ""), myActiveAccounts: i.a.Set(), myHiddenAccounts: i.a.Set(b.get(this._getStorageKey("hiddenAccounts", { wallet_name: e }), [])), searchAccounts: i.a.Map(), searchTerm: "", wallet_name: e, starredAccounts: t, accountContacts: r } } }, { key: "onAddStarAccount", value: function(e) { if (this.state.starredAccounts.has(e)) return !1; var t = this.state.starredAccounts.set(e, { name: e }); this.setState({ starredAccounts: t }), b.set(this._getStorageKey("starredAccounts"), t.toJS()) } }, { key: "onRemoveStarAccount", value: function(e) { var t = this.state.starredAccounts.delete(e); this.setState({ starredAccounts: t }), b.set(this._getStorageKey("starredAccounts"), t.toJS()) } }, { key: "onSetPasswordAccount", value: function(e) { var t = this._getStorageKey("passwordAccount"); e ? b.set(t, e) : b.remove(t), this.state.passwordAccount !== e && this.setState({ passwordAccount: e }) } }, { key: "onToggleHideAccount", value: function(e) { var t = e.account , r = e.hide , a = this.state , n = a.myHiddenAccounts , i = a.myActiveAccounts; r && !n.has(t) ? (n = n.add(t), i = i.delete(t)) : n.has(t) && (n = n.delete(t), i = i.add(t)), this.setState({ myHiddenAccounts: n, myActiveAccounts: i }) } }, { key: "loadDbData", value: function() { var e = this , t = i.a.Set().asMutable() , r = h.Apis.instance().chain_id; return new Promise(function(a, n) { u.a.load_data("linked_accounts").then(function(o) { e.state.linkedAccounts = i.a.fromJS(o || []).toSet(); var s = e.state.passwordLogin && e.state.passwordAccount ? [Object(p.FetchChain)("getAccount", e.state.passwordAccount)] : e.state.passwordLogin ? [] : o.filter(function(e) { return !e.chainId || e.chainId === r }).map(function(e) { return Object(p.FetchChain)("getAccount", e.name) }); Promise.all(s).then(function(r) { r.forEach(function(r) { r && e.isMyAccount(r) && !e.state.myHiddenAccounts.has(r.get("name")) ? t.add(r.get("name")) : r && !e.isMyAccount(r) && e._unlinkAccount(r.get("name")) }); var n = t.asImmutable(); e.state.myActiveAccounts !== n && e.setState({ myActiveAccounts: t.asImmutable() }), !1 === e.state.accountsLoaded && e.setState({ accountsLoaded: !0 }), e.state.subbed || p.ChainStore.subscribe(e.chainStoreUpdate), e.state.subbed = !0, e.emitChange(), e.chainStoreUpdate(), a() }).catch(function(t) { e.state.subbed || p.ChainStore.subscribe(e.chainStoreUpdate), e.state.subbed = !0, e.emitChange(), e.chainStoreUpdate(), n(t) }) }).catch(function(e) { n(e) }) } ) } }, { key: "chainStoreUpdate", value: function() { this.addAccountRefs() } }, { key: "addAccountRefs", value: function() { var e = this , t = m.a.getAccountRefs(); if (this.initial_account_refs_load || this.account_refs !== t) { this.account_refs = t; var r = !1; if (!this.addAccountRefsInProgress) { this.addAccountRefsInProgress = !0; var a = this.state.myActiveAccounts.withMutations(function(a) { t.forEach(function(t) { var n = p.ChainStore.getAccount(t); if (void 0 !== n) { var i = n.get("name") , o = h.Apis.instance().chain_id , s = e.state.linkedAccounts.find(function(e) { return e.get("name") === i && e.get("chainId") === o }) , l = e.state.linkedAccounts.findKey(function(e) { return e.get("name") === i && !e.has("chainId") }); l && (e.state.linkedAccounts = e.state.linkedAccounts.delete(l), e._unlinkAccount(n.get("name")), s = !1), n && e.isMyAccount(n) && !s && e._linkAccount(n.get("name")), !n || a.includes(n.get("name")) || e.state.myHiddenAccounts.has(n.get("name")) || a.add(n.get("name")) } else r = !0 }) }); this.state.passwordLogin && (a = i.a.Set(this.state.passwordAccount ? [this.state.passwordAccount] : [])), a !== this.state.myActiveAccounts && this.setState({ myActiveAccounts: a }), this.initial_account_refs_load = r, this.tryToSetCurrentAccount(), this.addAccountRefsInProgress = !1 } } else !1 === this.state.refsLoaded && this.setState({ refsLoaded: !0 }) } }, { key: "getMyAccounts", value: function() { if (!this.state.subbed) return []; var e = [] , t = !0 , r = !1 , a = void 0; try { for (var n, i = this.state.myActiveAccounts[Symbol.iterator](); !(t = (n = i.next()).done); t = !0) { var o = n.value , s = p.ChainStore.getAccount(o); if (void 0 !== s) if (null != s) { var l = this.getMyAuthorityForAccount(s); void 0 !== l && ("full" !== l && "partial" !== l || e.push(o)) } else console.log("WARN: non-chain account name in myActiveAccounts", o) } } catch (e) { r = !0, a = e } finally { try { !t && i.return && i.return() } finally { if (r) throw a } } return this.state.passwordLogin ? this.state.passwordAccount ? [this.state.passwordAccount] : [] : e.sort() } }, { key: "getMyAuthorityForAccount", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 1; if (e) { var r = e.get("owner") , a = e.get("active") , n = v(r); if ("full" == n) return "full"; var i = v(a); if ("full" == i) return "full"; var o = w(r); if ("full" == o) return "full"; var s = w(a); if ("full" == s) return "full"; var l = void 0 , c = void 0; if (t < 3) { if (void 0 === (l = this._accountThreshold(r, t))) return; if ("full" == l) return "full"; if (void 0 === (c = this._accountThreshold(a, t))) return; if ("full" == c) return "full" } return "partial" === n || "partial" === i || "partial" === o || "partial" === s || "partial" === l || "partial" === c ? "partial" : "none" } } }, { key: "_accountThreshold", value: function(e, t) { var r = this , a = e.get("account_auths"); if (!a.size) return "none"; var n = a.map(function(e) { var a = p.ChainStore.getAccount(e.get(0), !1); if (void 0 !== a) return r.getMyAuthorityForAccount(a, ++t) }).reduce(function(e, t) { return e.set(t, !0) }, i.a.Map()); return n.get("full") && 1 === n.size ? "full" : n.get("partial") && 1 === n.size ? "partial" : n.get("none") && 1 === n.size ? "none" : n.get("full") || n.get("partial") ? "partial" : void 0 } }, { key: "isMyAccount", value: function(e) { var t = this.getMyAuthorityForAccount(e); if (void 0 !== t) return "partial" === t || "full" === t } }, { key: "onAccountSearch", value: function(e) { var t = this; this.state.searchTerm = e.searchTerm, this.state.searchAccounts = this.state.searchAccounts.clear(), e.accounts.forEach(function(e) { t.state.searchAccounts = t.state.searchAccounts.withMutations(function(t) { t.set(e[1], e[0]) }) }) } }, { key: "_getStorageKey", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "currentAccount" , t = (arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.state).wallet_name , r = h.Apis.instance().chain_id; return e + (r ? "_" + r.substr(0, 8) : "") + (t ? "_" + t : "") } }, { key: "tryToSetCurrentAccount", value: function() { var e = this._getStorageKey("passwordAccount") , t = this._getStorageKey("currentAccount"); if (b.has(e)) { var r = b.get(e, null); return this.state.passwordAccount !== r && this.setState({ passwordAccount: r }), this.setCurrentAccount(r) } if (b.has(t)) return this.setCurrentAccount(b.get(t, null)); var a = this.state.starredAccounts; return a.size ? this.setCurrentAccount(a.first().name) : this.state.myActiveAccounts.size ? this.setCurrentAccount(this.state.myActiveAccounts.first()) : void 0 } }, { key: "setCurrentAccount", value: function(e) { this.state.passwordAccount && (e = this.state.passwordAccount); var t = this._getStorageKey(); e || (e = null), this.state.currentAccount !== e && this.setState({ currentAccount: e }), b.set(t, e || null) } }, { key: "onSetCurrentAccount", value: function(e) { this.setCurrentAccount(e) } }, { key: "onCreateAccount", value: function(e) { var t = this , r = e; if ("string" == typeof r && (r = { name: r }), r.toJS && (r = r.toJS()), "" == r.name || this.state.myActiveAccounts.get(r.name)) return Promise.resolve(); if (!p.ChainValidation.is_account_name(r.name)) throw new Error("Invalid account name: " + r.name); return u.a.add_to_store("linked_accounts", { name: r.name, chainId: h.Apis.instance().chain_id }).then(function() { console.log("[AccountStore.js] ----- Added account to store: -----\x3e", r.name), t.state.myActiveAccounts = t.state.myActiveAccounts.add(r.name), 1 === t.state.myActiveAccounts.size && t.setCurrentAccount(r.name) }) } }, { key: "onAddAccountContact", value: function(e) { if (!p.ChainValidation.is_account_name(e, !0)) throw new Error("Invalid account name: " + e); if (!this.state.accountContacts.has(e)) { var t = this.state.accountContacts.add(e); b.set(this._getStorageKey("accountContacts"), t.toArray()), this.setState({ accountContacts: t }) } } }, { key: "onRemoveAccountContact", value: function(e) { if (!p.ChainValidation.is_account_name(e, !0)) throw new Error("Invalid account name: " + e); if (this.state.accountContacts.has(e)) { var t = this.state.accountContacts.remove(e); b.set(this._getStorageKey("accountContacts"), t), this.setState({ accountContacts: t }) } } }, { key: "_linkAccount", value: function(e) { if (!p.ChainValidation.is_account_name(e, !0)) throw new Error("Invalid account name: " + e); var t = { name: e, chainId: h.Apis.instance().chain_id }; try { u.a.add_to_store("linked_accounts", t), this.state.linkedAccounts = this.state.linkedAccounts.add(i.a.fromJS(t)), this.state.myHiddenAccounts.has(e) || (this.state.myActiveAccounts = this.state.myActiveAccounts.add(e)), 1 === this.state.myActiveAccounts.size && this.setCurrentAccount(e) } catch (e) { console.error(e) } } }, { key: "_unlinkAccount", value: function(e) { if (!p.ChainValidation.is_account_name(e, !0)) throw new Error("Invalid account name: " + e); u.a.remove_from_store("linked_accounts", e) } }, { key: "isMyKey", value: function(e) { return d.a.hasKey(e) } }, { key: "onChangeSetting", value: function(e) { "passwordLogin" === e.setting && (!1 === e.value ? (this.onSetPasswordAccount(null), b.remove(this._getStorageKey()), this.loadDbData()) : this.setState({ myActiveAccounts: i.a.Set() }), this.setState({ passwordLogin: e.value })) } }]), t }(); function v(e) { var t = 0 , r = e.get("weight_threshold") , a = e.get("key_auths") , n = !0 , i = !1 , o = void 0; try { for (var s, l = a[Symbol.iterator](); !(n = (s = l.next()).done); n = !0) { var c = s.value; if (d.a.hasKey(c.get(0)) && (t += c.get(1)), t >= r) break } } catch (e) { i = !0, o = e } finally { try { !n && l.return && l.return() } finally { if (i) throw o } } return t >= r ? "full" : t > 0 ? "partial" : "none" } function w(e) { var t = 0 , r = e.get("weight_threshold") , a = e.get("address_auths"); if (!a.size) return "none"; var n = f.a.getState().addresses , i = !0 , o = !1 , s = void 0; try { for (var l, c = a[Symbol.iterator](); !(i = (l = c.next()).done); i = !0) { var u = l.value , p = u.get(0) , h = n.get(p); if (d.a.hasKey(h) && (t += u.get(1)), t >= r) break } } catch (e) { o = !0, s = e } finally { try { !i && c.return && c.return() } finally { if (o) throw s } } return t >= r ? "full" : t > 0 ? "partial" : "none" } t.a = o.a.createStore(y, "AccountStore") } , function(e, t, r) { "use strict"; var a = r(30) , n = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var i = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return n(e, [{ key: "changeSetting", value: function(e) { return e } }, { key: "changeViewSetting", value: function(e) { return e } }, { key: "changeMarketDirection", value: function(e) { return e } }, { key: "addStarMarket", value: function(e, t) { return { quote: e, base: t } } }, { key: "removeStarMarket", value: function(e, t) { return { quote: e, base: t } } }, { key: "clearStarredMarkets", value: function() { return !0 } }, { key: "setUserMarket", value: function(e, t, r) { return { quote: e, base: t, value: r } } }, { key: "addWS", value: function(e) { return e } }, { key: "removeWS", value: function(e) { return e } }, { key: "hideWS", value: function(e) { return e } }, { key: "showWS", value: function(e) { return e } }, { key: "hideAsset", value: function(e, t) { return { id: e, status: t } } }, { key: "hideMarket", value: function(e, t) { return { id: e, status: t } } }, { key: "clearSettings", value: function() { return function(e) { return new Promise(function(t) { e(t) } ) } } }, { key: "updateLatencies", value: function(e) { return e } }, { key: "setExchangeLastExpiration", value: function(e) { return e } }, { key: "setExchangeTutorialShown", value: function(e) { return e } }, { key: "modifyPreferedBases", value: function(e) { return e } }, { key: "updateUnits", value: function() { return !0 } }, { key: "setPriceAlert", value: function(e) { return e } }, { key: "hideNewsHeadline", value: function(e) { return e } }]), e }(); t.a = a.a.createActions(i) } , function(e, t, r) { "use strict"; var a = r(30) , n = r(25) , i = r(195) , o = r(11) , s = r.n(o) , l = r(55) , c = r(14) , u = r(49) , d = r(42) , p = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e } , h = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var m = new l.a("__graphene__") , f = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e), this.exportPublicMethods({ init: this.init.bind(this), getSetting: this.getSetting.bind(this), getLastBudgetObject: this.getLastBudgetObject.bind(this), setLastBudgetObject: this.setLastBudgetObject.bind(this), hasAnyPriceAlert: this.hasAnyPriceAlert.bind(this) }), this.bindListeners({ onSetPriceAlert: n.a.setPriceAlert, onSetExchangeLastExpiration: n.a.setExchangeLastExpiration, onSetExchangeTutorialShown: n.a.setExchangeTutorialShown, onChangeSetting: n.a.changeSetting, onChangeViewSetting: n.a.changeViewSetting, onChangeMarketDirection: n.a.changeMarketDirection, onAddStarMarket: n.a.addStarMarket, onRemoveStarMarket: n.a.removeStarMarket, onClearStarredMarkets: n.a.clearStarredMarkets, onAddWS: n.a.addWS, onRemoveWS: n.a.removeWS, onShowWS: n.a.showWS, onHideWS: n.a.hideWS, onHideAsset: n.a.hideAsset, onHideMarket: n.a.hideMarket, onClearSettings: n.a.clearSettings, onSwitchLocale: i.a.switchLocale, onSetUserMarket: n.a.setUserMarket, onUpdateLatencies: n.a.updateLatencies, onModifyPreferedBases: n.a.modifyPreferedBases, onUpdateUnits: n.a.updateUnits, onHideNewsHeadline: n.a.hideNewsHeadline }), this.initDone = !1, this.settings = s.a.Map(this._getSetting()), this.defaultSettings = s.a.Map(this._getDefaultSetting()), this.defaults = this._getChoices(), this.viewSettings = s.a.Map(m.get("viewSettings_v1")), this.marketDirections = s.a.Map(m.get("marketDirections")), this.hiddenAssets = s.a.List(m.get("hiddenAssets", [])), this.hiddenMarkets = s.a.List(m.get("hiddenMarkets", [])), this.apiLatencies = m.get("apiLatencies", {}), this.mainnet_faucet = m.get("mainnet_faucet", u.i.DEFAULT_FAUCET), this.testnet_faucet = m.get("testnet_faucet", u.i.TESTNET_FAUCET), this.exchange = Object(o.fromJS)(m.get("exchange", {})), this.priceAlert = Object(o.fromJS)(m.get("priceAlert", [])), this.hiddenNewsHeadline = s.a.List(m.get("hiddenNewsHeadline", [])) } return h(e, [{ key: "_getDefaultSetting", value: function() { return { locale: "en", apiServer: u.i.DEFAULT_WS_NODE, faucet_address: u.i.DEFAULT_FAUCET, unit: "BTS", showSettles: !1, showAssetPercent: !1, walletLockTimeout: 600, themes: Object(d.f)(), passwordLogin: "password" == Object(d.e)(), browser_notifications: { allow: !0, additional: { transferToMe: !0 } }, rememberMe: !0, viewOnlyMode: !0 } } }, { key: "_getDefaultChoices", value: function() { return { locale: ["en", "zh", "fr", "ko", "de", "es", "it", "tr", "ru", "ja"], apiServer: u.i.WS_NODE_LIST.slice(0), unit: Object(d.l)(), showSettles: [{ translate: "yes" }, { translate: "no" }], showAssetPercent: [{ translate: "yes" }, { translate: "no" }], themes: ["darkTheme", "lightTheme", "midnightTheme"], passwordLogin: [{ translate: "cloud_login" }, { translate: "local_wallet" }], browser_notifications: { allow: [!0, !1], additional: { transferToMe: [!0, !1] } }, rememberMe: [!0, !1], viewOnlyMode: [{ translate: "show" }, { translate: "hide" }] } } }, { key: "_isEmpty", value: function(e) { var t = !0; return Object.keys(e).forEach(function(r) { e.hasOwnProperty(r) && null !== e[r] && (t = !1) }), t } }, { key: "_replaceDefaults", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "saving" , t = this , r = arguments[1] , a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null; null == a && (a = this._getDefaultSetting()); var n = ["activeNode"] , i = {}; return "saving" === e ? Object.keys(r).forEach(function(e) { if (!n.includes(e) && p(r[e]) === p(a[e])) if ("object" == p(r[e])) { var o = t._replaceDefaults("saving", r[e], a[e]); t._isEmpty(o) || (i[e] = o) } else r[e] !== a[e] && (i[e] = r[e]) }) : (Object.keys(a).forEach(function(e) { var n = !1; void 0 !== r[e] ? p(r[e]) !== p(a[e]) ? n = !0 : "object" == p(r[e]) ? i[e] = t._replaceDefaults("loading", r[e], a[e]) : i[e] = r[e] : n = !0, n && ("object" == p(r[e]) ? i[e] = JSON.parse(JSON.stringify(a[e])) : i[e] = a[e]) }), Object.keys(r).forEach(function(e) { void 0 == i[e] && (i[e] = JSON.parse(JSON.stringify(r[e]))) })), i } }, { key: "_getSetting", value: function() { var e = new Date("2018-10-20T00:00:00Z"); if (!m.has("settings_v4") && new Date < e) { var t = m.get("settings_v3"); t && "olDarkTheme" === t.themes && (t.themes = "midnightTheme"), this._saveSettings(t, this._getDefaultSetting()) } return this._loadSettings() } }, { key: "_injectApiConfiguration", value: function(e, t) { e.hidden = t.hidden } }, { key: "_saveSettings", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null; null == e && (e = this.settings.toJS()), m.set("settings_v4", this._replaceDefaults("saving", e)) } }, { key: "_loadSettings", value: function() { var e = m.get("settings_v4"); return this._replaceDefaults("loading", e) } }, { key: "_getChoices", value: function() { var e = this._getDefaultChoices() , t = this._ensureBackwardsCompatibilityChoices(m.get("defaults_v1", { apiServer: [] })) , r = Object.assign({}, t); return Object.keys(e).forEach(function(t) { "apiServer" != t && (r[t] = e[t]) }), r.apiServer = this._getApiServerChoices(e, t), r } }, { key: "_getApiServerChoices", value: function(e, t) { var r = this , a = e.apiServer.slice(0); return t.apiServer.forEach(function(e) { var t = a.find(function(t) { return t.url == e.url }); t ? r._injectApiConfiguration(t, e) : e.default || a.push(e) }), a = a.map(function(t) { var r = e.apiServer.find(function(e) { return e.url == t.url }); return t.default = !!r, t.hidden = !!t.hidden, t }) } }, { key: "_ensureBackwardsCompatibilityChoices", value: function(e) { if (e && e.locale) { var t = e.locale.findIndex(function(e) { return "cn" === e }); -1 !== t && (e.locale[t] = "zh") } if (e && e.themes) { var r = e.themes.findIndex(function(e) { return "olDarkTheme" === e }); -1 !== r && (e.themes[r] = "midnightTheme") } return e && e.apiServer && (e.apiServer = e.apiServer.map(function(e) { return "string" == typeof e && (e = { url: e, location: null }), e })), e } }, { key: "init", value: function() { var e = this; return new Promise(function(t) { e.initDone && t(), e.starredKey = e._getChainKey("markets"), e.marketsKey = e._getChainKey("userMarkets"), e.basesKey = e._getChainKey("preferredBases"); var r = { markets_4018d784: Object(d.k)(), markets_39f5e2ed: ["PEG.FAKEUSD", "BTWTY"] } , a = { markets_4018d784: Object(d.j)(), markets_39f5e2ed: ["TEST"] } , n = { markets_4018d784: "BTS", markets_39f5e2ed: "TEST" }[e.starredKey] || "BTS"; e.onUpdateUnits(), e.defaults.unit[0] = n; var i = a[e.starredKey] || a.markets_4018d784 , o = m.get(e.basesKey, []); e.preferredBases = s.a.List(o.length ? o : i), e.chainMarkets = r[e.starredKey] || []; var l = e._getDefaultMarkets(); e.defaultMarkets = s.a.Map(l), e.starredMarkets = s.a.Map(m.get(e.starredKey, [])), e.userMarkets = s.a.Map(m.get(e.marketsKey, {})), e.initDone = !0, t() } ) } }, { key: "_getDefaultMarkets", value: function() { var e = this , t = []; return this.preferredBases.forEach(function(r) { !function(e, t, r) { r.filter(function(e) { return e !== t }).forEach(function(r) { e.push([r + "_" + t, { quote: r, base: t }]) }) }(t, r, e.chainMarkets) }), t } }, { key: "getSetting", value: function(e) { return this.settings.get(e) } }, { key: "onChangeSetting", value: function(e) { var t = !0; switch (e.setting) { case "faucet_address": -1 === e.value.indexOf("testnet") ? (this.mainnet_faucet = e.value, m.set("mainnet_faucet", e.value)) : (this.testnet_faucet = e.value, m.set("testnet_faucet", e.value)); break; case "walletLockTimeout": m.set("lockTimeout", e.value); break; case "activeNode": t = !0 } this.settings.get(e.setting) !== e.value && (this.settings = this.settings.set(e.setting, e.value), t && this._saveSettings()) } }, { key: "onChangeViewSetting", value: function(e) { for (var t in e) this.viewSettings = this.viewSettings.set(t, e[t]); m.set("viewSettings_v1", this.viewSettings.toJS()) } }, { key: "onChangeMarketDirection", value: function(e) { for (var t in e) e[t] ? this.marketDirections = this.marketDirections.set(t, e[t]) : this.marketDirections = this.marketDirections.delete(t); m.set("marketDirections", this.marketDirections.toJS()) } }, { key: "onHideAsset", value: function(e) { e.id && (e.status ? this.hiddenAssets = this.hiddenAssets.push(e.id) : this.hiddenAssets = this.hiddenAssets.delete(this.hiddenAssets.indexOf(e.id))), m.set("hiddenAssets", this.hiddenAssets.toJS()) } }, { key: "onHideMarket", value: function(e) { e.id && (e.status ? this.hiddenMarkets = this.hiddenMarkets.push(e.id) : this.hiddenMarkets = this.hiddenMarkets.delete(this.hiddenMarkets.indexOf(e.id))), m.set("hiddenMarkets", this.hiddenMarkets.toJS()) } }, { key: "onAddStarMarket", value: function(e) { var t = e.quote + "_" + e.base; if (this.starredMarkets.has(t)) return !1; this.starredMarkets = this.starredMarkets.set(t, { quote: e.quote, base: e.base }), m.set(this.starredKey, this.starredMarkets.toJS()) } }, { key: "onSetUserMarket", value: function(e) { var t = e.quote + "_" + e.base; e.value ? this.userMarkets = this.userMarkets.set(t, { quote: e.quote, base: e.base }) : this.userMarkets = this.userMarkets.delete(t), m.set(this.marketsKey, this.userMarkets.toJS()) } }, { key: "onRemoveStarMarket", value: function(e) { var t = e.quote + "_" + e.base; this.starredMarkets = this.starredMarkets.delete(t), m.set(this.starredKey, this.starredMarkets.toJS()) } }, { key: "onClearStarredMarkets", value: function() { this.starredMarkets = s.a.Map({}), m.set(this.starredKey, this.starredMarkets.toJS()) } }, { key: "onAddWS", value: function(e) { "string" == typeof e && (e = { url: e, location: null }), this.defaults.apiServer.push(e), m.set("defaults_v1", this.defaults) } }, { key: "onRemoveWS", value: function(e) { this.defaults.apiServer.splice(e, 1), m.set("defaults_v1", this.defaults) } }, { key: "onHideWS", value: function(e) { this.defaults.apiServer.find(function(t) { return t.url === e }).hidden = !0, m.set("defaults_v1", this.defaults) } }, { key: "onShowWS", value: function(e) { this.defaults.apiServer.find(function(t) { return t.url === e }).hidden = !1, m.set("defaults_v1", this.defaults) } }, { key: "onClearSettings", value: function(e) { m.remove("settings_v3"), m.remove("settings_v4"), this.settings = this.defaultSettings, this._saveSettings(), e && e() } }, { key: "onSwitchLocale", value: function(e) { var t = e.locale; this.onChangeSetting({ setting: "locale", value: t }) } }, { key: "_getChainId", value: function() { return (c.Apis.instance().chain_id || "4018d784").substr(0, 8) } }, { key: "_getChainKey", value: function(e) { var t = this._getChainId(); return e + (t ? "_" + t.substr(0, 8) : "") } }, { key: "onUpdateLatencies", value: function(e) { m.set("apiLatencies", e), this.apiLatencies = e } }, { key: "getLastBudgetObject", value: function() { return m.get(this._getChainKey("lastBudgetObject"), "2.13.1") } }, { key: "setLastBudgetObject", value: function(e) { m.set(this._getChainKey("lastBudgetObject"), e) } }, { key: "setExchangeSettings", value: function(e, t) { this.exchange = this.exchange.set(e, t), m.set("exchange", this.exchange.toJS()) } }, { key: "getPriceAlert", value: function() { return this.priceAlert.toJS() } }, { key: "onSetPriceAlert", value: function(e) { this.priceAlert = Object(o.fromJS)(e), m.set("priceAlert", e) } }, { key: "hasAnyPriceAlert", value: function(e, t) { return this.priceAlert.some(function(r) { return r.get("quoteAssetSymbol") === e && r.get("baseAssetSymbol") === t }) } }, { key: "getExchangeSettings", value: function(e) { return this.exchange.get(e) } }, { key: "onSetExchangeLastExpiration", value: function(e) { this.setExchangeSettings("lastExpiration", Object(o.fromJS)(e)) } }, { key: "onSetExchangeTutorialShown", value: function(e) { this.setExchangeSettings("tutorialShown", e) } }, { key: "getExhchangeLastExpiration", value: function() { return this.getExchangeSettings("lastExpiration") } }, { key: "onModifyPreferedBases", value: function(e) { if ("newIndex"in e && "oldIndex"in e) { var t = this.preferredBases.get(e.newIndex); this.preferredBases = this.preferredBases.set(e.newIndex, this.preferredBases.get(e.oldIndex)), this.preferredBases = this.preferredBases.set(e.oldIndex, t) } else if ("remove"in e) { this.preferredBases = this.preferredBases.delete(e.remove); var r = this._getDefaultMarkets(); this.defaultMarkets = s.a.Map(r) } else if ("add"in e) { this.preferredBases = this.preferredBases.push(e.add); var a = this._getDefaultMarkets(); this.defaultMarkets = s.a.Map(a) } m.set(this.basesKey, this.preferredBases.toArray()) } }, { key: "onUpdateUnits", value: function() { this.defaults.unit = Object(d.l)(), -1 === this.defaults.unit.indexOf(this.settings.get("unit")) && (this.settings = this.settings.set("unit", this.defaults.unit[0])) } }, { key: "onHideNewsHeadline", value: function(e) { e && this.hiddenNewsHeadline.indexOf(e) && (this.hiddenNewsHeadline = this.hiddenNewsHeadline.push(e), m.set("hiddenNewsHeadline", this.hiddenNewsHeadline.toJS())) } }]), e }(); t.a = a.a.createStore(f, "SettingsStore") } , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(4) , o = r.n(i) , s = r(15) , l = r(119) , c = r(177) , u = r(2238) , d = r(33) , p = r(127) , h = r(88) , m = r(2) , f = r.n(m) , g = r(22) , _ = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var b = function(e) { function t() { return function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t), function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), _(t, [{ key: "shouldComponentUpdate", value: function(e) { return !s.a.are_equal_shallow(e.keys, this.props.keys) } }, { key: "linkToAccount", value: function(e) { var t = this.props.noLink; return e ? s.a.is_object_id(e) ? n.a.createElement(l.a, { account: e, noLink: t }) : t ? n.a.createElement("span", null, e) : n.a.createElement(u.a, { to: "/account/" + e + "/overview" }, e) : n.a.createElement("span", null, "-") } }, { key: "linkToAsset", value: function(e) { var t = this.props , r = t.noLink , a = t.noTip; return e ? s.a.is_object_id(e) ? n.a.createElement(c.a, { asset: e, noLink: r }) : r ? n.a.createElement(h.a, { name: e, dataPlace: "top", noTip: a }) : n.a.createElement(u.a, { to: "/asset/" + e }, n.a.createElement(h.a, { name: e, dataPlace: "top", noTip: a })) : n.a.createElement("span", null, "-") } }, { key: "render", value: function() { var e = this , t = this.props , r = t.string , a = t.params , i = t.keys , l = o.a.translate(r, a) , c = s.a.get_translation_parts(l); i.forEach(function(t) { if (c.indexOf(t.arg)) { var r = void 0; switch (t.type) { case "account": r = e.linkToAccount(t.value); break; case "amount": r = n.a.createElement("span", null, n.a.createElement(d.a, { amount: t.value.amount, asset: t.value.asset_id, decimalOffset: t.decimalOffset, hide_asset: !0 }), " ", e.linkToAsset(t.value.asset_id)); break; case "price": r = n.a.createElement(p.a, { base_asset: t.value.base.asset_id, base_amount: t.value.base.amount, quote_asset: t.value.quote.asset_id, quote_amount: t.value.quote.amount }); break; case "asset": r = e.linkToAsset(t.value); break; case "translate": r = n.a.createElement(f.a, { content: t.value }); break; case "link": r = n.a.createElement(u.a, { to: t.value, "data-intro": t.dataIntro ? t.dataIntro : null }, n.a.createElement(f.a, { content: t.translation })); break; case "icon": var a = name.replace("-", "_"); r = n.a.createElement(g.a, { className: t.className, name: t.value, title: a }); break; case "change": if (t.value && Object.keys(t.value).length > 0) { var i = t.value , s = i.votes , l = i.active , h = i.owner , m = i.memo , _ = s && n.a.createElement("div", null, n.a.createElement(f.a, { content: "proposal.votes" }), s.minus.length ? n.a.createElement("div", null, "- " + o.a.translate("proposal.remove") + " ", " ", s.minus.join(", ")) : null, s.plus.length ? n.a.createElement("div", null, "- " + o.a.translate("proposal.add") + " ", " ", s.plus.join(", ")) : null) , b = (l || h || m) && n.a.createElement("div", null, n.a.createElement(f.a, { content: "proposal.permission_changes" }), ", ", n.a.createElement(f.a, { style: { color: "red" }, content: "proposal.danger_operation" }), "!") , y = l && n.a.createElement(n.a.Fragment, null, n.a.createElement(f.a, { content: "proposal.changes_to_active" }), n.a.createElement("div", { style: { marginLeft: "0.5rem" } }, l.keys.plus.length > 0 || l.accounts.plus.length > 0 && n.a.createElement("div", null, "- " + o.a.translate("proposal.add") + " ", l.keys.plus.join(", "), " ", l.accounts.plus.map(function(t) { return n.a.createElement("span", { key: t }, e.linkToAccount(t)) })), l.keys.minus.length > 0 || l.accounts.minus.length > 0 && n.a.createElement("div", null, "- " + o.a.translate("proposal.remove") + " ", l.keys.minus.join(", "), " ", l.accounts.minus.map(function(t) { return n.a.createElement("span", { key: t }, e.linkToAccount(t)) })), l.weight_threshold && n.a.createElement("div", null, "- " + o.a.translate("proposal.set_threshold", { threshold: l.weight_threshold })))) , v = h && n.a.createElement(n.a.Fragment, null, n.a.createElement(f.a, { content: "proposal.changes_to_owner" }), n.a.createElement("div", { style: { marginLeft: "0.5rem" } }, h.keys.plus.length > 0 || h.accounts.plus.length > 0 && n.a.createElement("div", null, "- " + o.a.translate("proposal.add") + " ", h.keys.plus.join(", "), " ", h.accounts.plus.map(function(t) { return n.a.createElement("span", { key: t }, e.linkToAccount(t)) })), h.keys.minus.length > 0 || h.accounts.minus.length > 0 && n.a.createElement("div", null, "- " + o.a.translate("proposal.remove") + " ", h.keys.minus.join(", "), " ", h.accounts.minus.map(function(t) { return n.a.createElement("span", { key: t }, e.linkToAccount(t)) })), h.weight_threshold && n.a.createElement("div", null, "- " + o.a.translate("proposal.set_threshold", { threshold: h.weight_threshold })))) , w = m && (m.keys.plus.length > 0 || m.keys.minus.length > 0) && n.a.createElement("div", null, n.a.createElement(f.a, { content: "proposal.changes_to_memo" }), m.keys.plus.length > 0 && n.a.createElement("div", null, " ", "+ ", m.keys.plus.join(", ")), m.keys.minus.length > 0 && n.a.createElement("div", null, " ", "- ", m.keys.minus.join(", "))); r = n.a.createElement("div", { style: { marginLeft: "0.5rem", marginTop: "0.5rem" } }, b, _, y, v, w) } else r = ""; break; case "date": r = null === t.value ? "-" : o.a.localize(t.value, { type: "date", format: "full" }); break; default: r = t.value } c[c.indexOf(t.arg)] = r } }); var h = c.map(function(e, t) { return n.a.createElement("span", { key: t }, e) }); return n.a.createElement("span", null, h) } }]), t }(); t.a = b } , , , function(e, t, r) { "use strict"; var a = new (r(852).a); t.a = a } , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(108) , o = r(15) , s = r(107) , l = r(1) , c = r.n(l) , u = r(7) , d = r(568) , p = r(88) , h = r(441) , m = r(5) , f = r(140) , g = r(45) , _ = r(43) , b = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]) } return e } , y = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e } , v = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function w(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function k(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function x(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } var S = function(e) { function t() { return w(this, t), k(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return x(t, n.a.Component), v(t, [{ key: "render", value: function() { var e = parseInt(this.props.do.get("current_supply"), 10) , t = o.a.format_number(this.props.amount / e * 100, 4); return n.a.createElement("span", { className: this.props.colorClass }, t, "%") } }]), t }(); S.propTypes = { do: _.a.ChainObject.isRequired }, S = Object(g.a)(S); var A = function(e) { function t(e) { w(this, t); var r = k(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.state = { isPopoverOpen: !1 }, r.togglePopover = r.togglePopover.bind(r), r.closePopover = r.closePopover.bind(r), r } return x(t, n.a.Component), v(t, [{ key: "togglePopover", value: function(e) { e.preventDefault(), this.setState({ isPopoverOpen: !this.state.isPopoverOpen }) } }, { key: "closePopover", value: function() { this.setState({ isPopoverOpen: !1 }) } }, { key: "render", value: function() { var e = this.props , t = e.amount , r = e.decimalOffset , a = e.color , l = e.asset , c = e.hide_asset , f = e.hide_amount , g = e.asPercentage , _ = e.pulsate; if (void 0 === t || null == t) return null; l && l.toJS && (l = l.toJS()); var v = a ? "facolor-" + a : "" , w = o.a.get_asset_precision(l.precision) , k = Math.max(0, l.precision - r); if (f && (v += " no-amount"), g) return n.a.createElement(S, { amount: t, colorClass: v, do: l.dynamic_asset_data_id }); var x = m.ChainStore.getObject(l.issuer, !1, !1) , A = x ? x.get("name") : "" , E = s.a.parseDescription(l.options.description) , T = !c && this.props.assetInfo && n.a.createElement("div", null, n.a.createElement(d.a, { path: "assets/Asset", section: "summary", symbol: l.symbol, description: E.short_name ? E.short_name : E.main, issuer: A }), this.props.assetInfo) , C = null; if (!f) { var z = this.props.exact_amount ? t : t / w; C = n.a.createElement(i.b, { value: z, minimumFractionDigits: Math.max(k, 0), maximumFractionDigits: Math.max(k, 0) }), _ && ("object" !== (void 0 === _ ? "undefined" : y(_)) && (_ = {}), C = n.a.createElement(h.a, b({ value: z }, _), C)) } return n.a.createElement("span", { className: v }, C, !c && (this.props.assetInfo ? n.a.createElement("span", null, " ", n.a.createElement(u.Popover, { trigger: "click", content: T, mouseEnterDelay: .5 }, n.a.createElement("span", { className: "currency click-for-help" }, n.a.createElement(p.a, { name: l.symbol })))) : n.a.createElement("span", { className: "currency" }, " ", n.a.createElement(p.a, { noTip: this.props.noTip, noPrefix: this.props.noPrefix, name: l.symbol, replace: this.props.replace })))) } }]), t }(); A.propTypes = { amount: c.a.any, exact_amount: c.a.bool, decimalOffset: c.a.number, color: c.a.string, hide_asset: c.a.bool, hide_amount: c.a.bool, asPercentage: c.a.bool, assetInfo: c.a.node }, A.defaultProps = { amount: null, decimalOffset: 0, hide_asset: !1, hide_amount: !1, asPercentage: !1, assetInfo: null, replace: !0 }, A = Object(f.a)(A), t.a = A } , , , , function(e, t, r) { "use strict"; r.d(t, "a", function() { return h }), r.d(t, "i", function() { return m }), r.d(t, "d", function() { return f }), r.d(t, "h", function() { return g }), r.d(t, "g", function() { return _ }), r.d(t, "b", function() { return b }), r.d(t, "c", function() { return k }), r.d(t, "j", function() { return y }), r.d(t, "k", function() { return p }), r.d(t, "f", function() { return v }), r.d(t, "e", function() { return w }); var a = r(15) , n = r(161) , i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e } , o = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function s(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function l(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } function c(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function u(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 8; if ("number" != typeof t) throw new Error("Input must be a number"); var r = e.toString() , a = r.split("."); return 1 === a.length || 2 === a.length && a[1].length <= t ? parseFloat(r) : parseFloat(a[0] + "." + a[1].substr(0, t)) } function d(e) { if ("number" != typeof e) throw new Error("Input must be a number"); return Math.pow(10, e) } function p(e, t) { var r = t && t.size !== e.size; return r || (e.forEach(function(e, a) { var n = t.get(a); n ? e.market_base === n.market_base && (r = r || e.ne(n)) : r = !0 }), r) } var h = function() { function e() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} , r = t.asset_id , a = void 0 === r ? "1.3.0" : r , n = t.amount , i = void 0 === n ? 0 : n , o = t.precision , s = void 0 === o ? 5 : o , l = t.real , u = void 0 === l ? null : l; c(this, e), this.satoshi = d(s), this.asset_id = a, this.setAmount({ sats: i, real: u }), this.precision = s } return o(e, [{ key: "hasAmount", value: function() { return this.amount > 0 } }, { key: "toSats", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1; return Math.round(e * this.satoshi) } }, { key: "setAmount", value: function(e) { var t = e.sats , r = e.real; if ("string" == typeof t && (t = parseInt(t, 10)), "string" == typeof r && (r = parseFloat(r)), "number" != typeof t && "number" != typeof r) throw new Error("Invalid arguments for setAmount"); if ("number" == typeof r) this.amount = this.toSats(r), this._clearCache(); else { if ("number" != typeof t) throw new Error("Invalid setAmount input"); this.amount = Math.floor(t), this._clearCache() } } }, { key: "_clearCache", value: function() { this._real_amount = null } }, { key: "getAmount", value: function() { var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).real; return void 0 !== e && e ? this._real_amount ? this._real_amount : this._real_amount = u(this.amount / this.toSats(), this.precision) : Math.floor(this.amount) } }, { key: "plus", value: function(e) { if (e.asset_id !== this.asset_id) throw new Error("Assets are not the same type"); this.amount += e.amount, this._clearCache() } }, { key: "minus", value: function(e) { if (e.asset_id !== this.asset_id) throw new Error("Assets are not the same type"); this.amount -= e.amount, this.amount = Math.max(0, this.amount), this._clearCache() } }, { key: "equals", value: function(e) { return this.asset_id === e.asset_id && this.getAmount() === e.getAmount() } }, { key: "ne", value: function(e) { return !this.equals(e) } }, { key: "gt", value: function(e) { return this.getAmount() > e.getAmount() } }, { key: "lt", value: function(e) { return this.getAmount() < e.getAmount() } }, { key: "times", value: function(t) { var r = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] , a = void 0 , n = void 0; if (this.asset_id === t.base.asset_id) return a = this.amount * t.quote.amount / t.base.amount, n = Math.floor(a), r && a !== n && (n += 1), 0 === n && (n = 1), new e({ asset_id: t.quote.asset_id, amount: n, precision: t.quote.precision }); if (this.asset_id === t.quote.asset_id) return a = this.amount * t.base.amount / t.quote.amount, n = Math.floor(a), r && a !== n && (n += 1), 0 === n && (n = 1), new e({ asset_id: t.base.asset_id, amount: n, precision: t.base.precision }); throw new Error("Invalid asset types for price multiplication") } }, { key: "divide", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this; return new m({ base: t, quote: e }) } }, { key: "toObject", value: function() { return { asset_id: this.asset_id, amount: this.amount } } }, { key: "clone", value: function() { return new e({ amount: arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.amount, asset_id: this.asset_id, precision: this.precision }) } }]), e }() , m = function() { function e() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} , r = t.base , a = t.quote , n = t.real , i = void 0 !== n && n; if (c(this, e), !r || !a) throw new Error("Base and Quote assets must be defined"); if (r.asset_id === a.asset_id) throw new Error("Base and Quote assets must be different"); if (!(r.asset_id && "amount"in r && a.asset_id && "amount"in a)) throw new Error("Invalid Price inputs"); this.base = r.clone(), this.quote = a.clone(), this.setPriceFromReal(i) } return o(e, [{ key: "setPriceFromReal", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.base , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.quote; if (e && "number" == typeof e) { e > 1e5 && (e = u(e, 5)); var a = new n.BigNumber(e.toString()).toFraction() , i = t.toSats() , o = r.toSats() , s = i / o , l = o / i; i >= o ? l = 1 : s = 1, t.setAmount({ sats: a[0] * s }), r.setAmount({ sats: a[1] * l }) } else 0 === e && (t.setAmount({ sats: 0 }), r.setAmount({ sats: 0 })) } }, { key: "getUnits", value: function() { return this.base.asset_id + "_" + this.quote.asset_id } }, { key: "isValid", value: function() { return 0 !== this.base.amount && 0 !== this.quote.amount && !isNaN(this.toReal()) && isFinite(this.toReal()) } }, { key: "toReal", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] , t = e ? "_samebase_real" : "_not_samebase_real"; if (this[t]) return this[t]; var r = e ? this.quote.amount * this.base.toSats() / (this.base.amount * this.quote.toSats()) : this.base.amount * this.quote.toSats() / (this.quote.amount * this.base.toSats()); return this[t] = parseFloat(r.toFixed(8)) } }, { key: "invert", value: function() { return new e({ base: this.quote, quote: this.base }) } }, { key: "clone", value: function() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null; return new e({ base: this.base, quote: this.quote, real: t }) } }, { key: "equals", value: function(e) { return this.base.asset_id === e.base.asset_id && this.quote.asset_id === e.quote.asset_id && e.quote.amount * this.base.amount === this.quote.amount * e.base.amount } }, { key: "lt", value: function(e) { if (this.base.asset_id !== e.base.asset_id || this.quote.asset_id !== e.quote.asset_id) throw new Error("Cannot compare prices for different assets"); return e.quote.amount * this.base.amount < this.quote.amount * e.base.amount } }, { key: "lte", value: function(e) { return this.equals(e) || this.lt(e) } }, { key: "ne", value: function(e) { return !this.equals(e) } }, { key: "gt", value: function(e) { return !this.lte(e) } }, { key: "gte", value: function(e) { return !this.lt(e) } }, { key: "toObject", value: function() { return { base: this.base.toObject(), quote: this.quote.toObject() } } }, { key: "times", value: function(t) { var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "1.3.0" , a = t.base.asset_id === r && this.quote.asset_id === r || t.quote.asset_id === r && this.base.asset_id === r ? t.clone() : t.invert() , n = a.toReal() * this.toReal(); return new e({ base: a.base, quote: this.quote, real: n }) } }]), e }() , f = function(e) { function t(e) { var r = e.priceObject , a = e.assets , n = e.market_base , o = e.sqr , l = e.real , u = void 0 !== l && l; if (c(this, t), !(r && "object" === (void 0 === r ? "undefined" : i(r)) && n && a && o)) throw new Error("Invalid FeedPrice inputs"); r.toJS && (r = r.toJS()); var d = n === r.base.asset_id , p = new h({ asset_id: r.base.asset_id, amount: r.base.amount, precision: a[r.base.asset_id].precision }) , m = new h({ asset_id: r.quote.asset_id, amount: r.quote.amount, precision: a[r.quote.asset_id].precision }) , f = s(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, { base: d ? m : p, quote: d ? p : m, real: u })); return f.sqr = parseInt(o, 10) / 1e3, f.inverted = d, f } return l(t, m), o(t, [{ key: "getSqueezePrice", value: function() { var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).real , t = void 0 !== e && e; return this._squeeze_price || (this._squeeze_price = this.clone(), this.inverted ? (this._squeeze_price.base.amount = Math.floor(this._squeeze_price.base.amount * this.sqr * 1e3), this._squeeze_price.quote.amount *= 1e3) : this.inverted || (this._squeeze_price.quote.amount = Math.floor(this._squeeze_price.quote.amount * this.sqr * 1e3), this._squeeze_price.base.amount *= 1e3)), t ? this._squeeze_price.toReal() : this._squeeze_price } }]), t }() , g = function() { function e() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} , r = t.for_sale , a = t.to_receive , n = t.seller , i = void 0 === n ? "" : n , o = t.expiration , s = void 0 === o ? new Date : o , l = t.fill_or_kill , u = void 0 !== l && l , d = t.fee , p = void 0 === d ? { amount: 0, asset_id: "1.3.0" } : d; if (c(this, e), !r || !a) throw new Error("Missing order amounts"); if (r.asset_id === a.asset_id) throw new Error("Order assets cannot be the same"); this.amount_for_sale = r, this.min_to_receive = a, this.setExpiration(s), this.fill_or_kill = u, this.seller = i, this.fee = p } return o(e, [{ key: "setExpiration", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null; e || (e = new Date).setYear(e.getFullYear() + 5), this.expiration = e } }, { key: "getExpiration", value: function() { return this.expiration } }, { key: "toObject", value: function() { return { seller: this.seller, min_to_receive: this.min_to_receive.toObject(), amount_to_sell: this.amount_for_sale.toObject(), expiration: this.expiration, fill_or_kill: this.fill_or_kill, fee: this.fee } } }]), e }() , _ = function() { function e(t, r, n) { if (c(this, e), !n) throw new Error("LimitOrder requires a market_base id"); this.order = t, this.assets = r, this.market_base = n, this.id = t.id, this.sellers = [t.seller], this.expiration = t.expiration && new Date(a.a.makeISODateString(t.expiration)), this.seller = t.seller, this.for_sale = parseInt(t.for_sale, 10); var i = new h({ asset_id: t.sell_price.base.asset_id, amount: parseInt(t.sell_price.base.amount, 10), precision: r[t.sell_price.base.asset_id].precision }) , o = new h({ asset_id: t.sell_price.quote.asset_id, amount: parseInt(t.sell_price.quote.amount, 10), precision: r[t.sell_price.quote.asset_id].precision }); this.sell_price = new m({ base: i, quote: o }), this.fee = t.deferred_fee } return o(e, [{ key: "getPrice", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.sell_price; return this._real_price ? this._real_price : this._real_price = e.toReal(e.base.asset_id === this.market_base) } }, { key: "isBid", value: function() { return !(this.sell_price.base.asset_id === this.market_base) } }, { key: "isCall", value: function() { return !1 } }, { key: "sellPrice", value: function() { return this.sell_price } }, { key: "amountForSale", value: function() { return this._for_sale ? this._for_sale : this._for_sale = new h({ asset_id: this.sell_price.base.asset_id, amount: this.for_sale, precision: this.assets[this.sell_price.base.asset_id].precision }) } }, { key: "amountToReceive", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.isBid(); return this._to_receive ? this._to_receive : (this._to_receive = this.amountForSale().times(this.sell_price, e), this._to_receive) } }, { key: "sum", value: function(e) { var t = this.clone(); return -1 === t.sellers.indexOf(e.seller) && t.sellers.push(e.seller), t.for_sale += e.for_sale, t } }, { key: "isMine", value: function(e) { return -1 !== this.sellers.indexOf(e) } }, { key: "clone", value: function() { return new e(this.order,this.assets,this.market_base) } }, { key: "ne", value: function(e) { return this.sell_price.ne(e.sell_price) || this.for_sale !== e.for_sale } }, { key: "equals", value: function(e) { return !this.ne(e) } }, { key: "setTotalToReceive", value: function(e) { this.total_to_receive = e } }, { key: "setTotalForSale", value: function(e) { this.total_for_sale = e, this._total_to_receive = null } }, { key: "totalToReceive", value: function() { var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).noCache; return void 0 !== e && e || !this._total_to_receive ? (this._total_to_receive = (this.total_to_receive || this.amountToReceive()).clone(), this._total_to_receive) : this._total_to_receive } }, { key: "totalForSale", value: function() { var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).noCache; return !(void 0 !== e && e) && this._total_for_sale ? this._total_for_sale : this._total_for_sale = (this.total_for_sale || this.amountForSale()).clone() } }]), e }() , b = function() { function e(t, r, a, n, i) { var o = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; if (c(this, e), !(t && r && a && n && i)) throw new Error("CallOrder missing inputs"); this.mcr = i, this.isSum = !1, this.order = t, this.assets = r, this.market_base = a, this.is_prediction_market = o, this.inverted = a === t.call_price.base.asset_id, this.id = t.id, this.borrower = t.borrower, this.borrowers = [t.borrower], this.target_collateral_ratio = t.target_collateral_ratio ? t.target_collateral_ratio / 1e3 : null, this.collateral = parseInt(t.collateral, 10), this.collateral_id = t.call_price.base.asset_id, this.debt = parseInt(t.debt, 10), this.debt_id = t.call_price.quote.asset_id, this.precisionsRatio = d(r[this.debt_id].precision) / d(r[this.collateral_id].precision); var s = new h({ asset_id: this.collateral_id, amount: t.collateral, precision: r[this.collateral_id].precision }) , l = new h({ asset_id: this.debt_id, amount: t.debt * (i / 1e3), precision: r[this.debt_id].precision }); if (this.call_price = new m({ base: s, quote: l }), this.inverted && (this.call_price = this.call_price.invert()), n.base.asset_id !== this.call_price.base.asset_id) throw new Error("Feed price assets and call price assets must be the same"); this.feed_price = n, this.assignMaxDebtAndCollateral(), this.expiration = { toLocaleString: function() { return null } } } return o(e, [{ key: "clone", value: function() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.feed_price; return new e(this.order,this.assets,this.market_base,t,this.mcr) } }, { key: "setFeed", value: function(e) { this.feed_price = e, this._clearCache() } }, { key: "getPrice", value: function() { var e = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0] , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.call_price; return e ? this.getSqueezePrice() : this._real_price ? this._real_price : this._real_price = t.toReal(t.base.asset_id === this.market_base) } }, { key: "getFeedPrice", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.feed_price; return this._feed_price ? this._feed_price : this._feed_price = e.toReal(e.base.asset_id === this.market_base) } }, { key: "getSqueezePrice", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.feed_price; return this._squeeze_price ? this._squeeze_price : this._squeeze_price = e.getSqueezePrice().toReal() } }, { key: "isMarginCalled", value: function() { return !this.is_prediction_market && (this.isBid() ? this.call_price.lt(this.feed_price) : this.call_price.gt(this.feed_price)) } }, { key: "isBid", value: function() { return !this.inverted } }, { key: "isCall", value: function() { return !0 } }, { key: "sellPrice", value: function() { return !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0] ? this.isBid() ? this.feed_price.getSqueezePrice() : this.feed_price.getSqueezePrice().invert() : this.call_price } }, { key: "getCollateral", value: function() { return this._collateral ? this._collateral : this._collateral = new h({ amount: this.collateral, asset_id: this.collateral_id, precision: this.assets[this.collateral_id].precision }) } }, { key: "_getMaxCollateralToSell", value: function() { if (this.target_collateral_ratio && this.getRatio() < this.target_collateral_ratio) { var e = this._getFeedPrice() , t = this._getMatchPrice(); return (this.debt * this.target_collateral_ratio - this.collateral * e) / (this.target_collateral_ratio * t - e) } return this.collateral } }, { key: "_getMaxDebtToCover", value: function() { return this._getMaxCollateralToSell() * this._getMatchPrice() } }, { key: "_getFeedPrice", value: function() { return (this.inverted ? this.getFeedPrice() : this.feed_price.invert().toReal()) * this.precisionsRatio } }, { key: "_getMatchPrice", value: function() { return (this.inverted ? this.getSqueezePrice() : parseFloat((1 / this.getSqueezePrice()).toFixed(8))) * this.precisionsRatio } }, { key: "assignMaxDebtAndCollateral", value: function() { if (this.target_collateral_ratio) { var e = this._getMatchPrice() , t = this._getMaxDebtToCover() , r = void 0; Math.round(t) !== t && (r = Math.floor(t) + 1); var a = Math.ceil(r / e); this.max_debt_to_cover = new h({ amount: r, asset_id: this.debt_id, precision: this.assets[this.debt_id].precision }), this.max_collateral_to_sell = new h({ amount: a, asset_id: this.collateral_id, precision: this.assets[this.collateral_id].precision }) } } }, { key: "amountForSale", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.isBid(); return this._for_sale ? this._for_sale : this._useTargetCR() || this.isSum ? this._for_sale = this.max_collateral_to_sell : this._for_sale = this.amountToReceive().times(this.feed_price.getSqueezePrice(), e) } }, { key: "_useTargetCR", value: function() { return !!this.target_collateral_ratio && this.getRatio() < this.target_collateral_ratio } }, { key: "amountToReceive", value: function() { return this._to_receive ? this._to_receive : this._useTargetCR() || this.isSum ? this._to_receive = this.max_debt_to_cover : this._to_receive = new h({ asset_id: this.debt_id, amount: this.debt, precision: this.assets[this.debt_id].precision }) } }, { key: "sum", value: function(e) { var t = this.clone(); -1 === t.borrowers.indexOf(e.borrower) && t.borrowers.push(e.borrower); var r = e._useTargetCR() , a = t._useTargetCR() , n = e.iSum ? e.debt : r ? e.max_debt_to_cover.getAmount() : e.amountToReceive().getAmount() , i = t.iSum ? t.debt : a ? t.max_debt_to_cover.getAmount() : t.amountToReceive().getAmount() , o = e.iSum ? e.collateral : r ? e.max_collateral_to_sell.getAmount() : e.amountForSale().getAmount() , s = t.iSum ? t.collateral : a ? t.max_collateral_to_sell.getAmount() : t.amountForSale().getAmount(); return t.debt = i + n, t.collateral = s + o, t._clearCache(), t.max_debt_to_cover = new h({ amount: t.debt, asset_id: this.debt_id, precision: this.assets[this.debt_id].precision }), t.max_collateral_to_sell = new h({ amount: t.collateral, asset_id: this.collateral_id, precision: this.assets[this.collateral_id].precision }), t.isSum = !0, t } }, { key: "_clearCache", value: function() { this._for_sale = null, this._to_receive = null, this._feed_price = null, this._squeeze_price = null, this._total_to_receive = null, this._total_for_sale = null } }, { key: "ne", value: function(e) { return this.call_price.ne(e.call_price) || this.feed_price.ne(e.feed_price) || this.debt !== e.debt || this.collateral !== e.collateral } }, { key: "equals", value: function(e) { return !this.ne(e) } }, { key: "setTotalToReceive", value: function(e) { this.total_to_receive = e } }, { key: "setTotalForSale", value: function(e) { this.total_for_sale = e } }, { key: "totalToReceive", value: function() { var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).noCache; return void 0 !== e && e || !this._total_to_receive ? (this._total_to_receive = (this.total_to_receive || this.amountToReceive()).clone(), this._total_to_receive) : this._total_to_receive } }, { key: "totalForSale", value: function() { var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).noCache; return !(void 0 !== e && e) && this._total_for_sale ? this._total_for_sale : this._total_for_sale = (this.total_for_sale || this.amountForSale()).clone() } }, { key: "getRatio", value: function() { return this.collateral / (this.debt / this._getFeedPrice()) } }, { key: "getStatus", value: function() { var e = this.assets[this.debt_id].bitasset.current_feed.maintenance_collateral_ratio / 1e3 , t = this.getRatio(); return isNaN(t) ? null : t < e ? "danger" : t < e + .5 ? "warning" : "" } }, { key: "isMine", value: function(e) { return -1 !== this.borrowers.indexOf(e) } }]), e }() , y = function(e) { function t(e, r, n, i, o) { if (c(this, t), !i || !o) throw new Error("SettleOrder needs feed_price and bitasset_options inputs"); e.sell_price = i.toObject(), e.seller = e.owner; var l = s(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e, r, n)); return l.offset_percent = o.force_settlement_offset_percent, l.settlement_date = new Date(a.a.makeISODateString(e.settlement_date)), l.for_sale = new h({ amount: e.balance.amount, asset_id: e.balance.asset_id, precision: r[e.balance.asset_id].precision }), l.inverted = l.for_sale.asset_id === n, l.feed_price = i[l.inverted ? "invert" : "clone"](), l } return l(t, _), o(t, [{ key: "isBefore", value: function(e) { return this.settlement_date < e.settlement_date } }, { key: "amountForSale", value: function() { return this.for_sale } }, { key: "amountToReceive", value: function() { var e = this.for_sale.times(this.feed_price, this.isBid()); return e.setAmount({ sats: e.getAmount() * ((1e4 - this.offset_percent) / 1e4) }), this._to_receive = e } }, { key: "isBid", value: function() { return !this.inverted } }]), t }() , v = function() { function e(t, r, a) { if (c(this, e), void 0 === a) throw new Error("GroupedOrder requires is_bid"); this.order = t, this.assets = r, this.is_bid = a, this.max_price = t.max_price, this.min_price = t.min_price, this.for_sale = parseInt(t.total_for_sale, 10), this._for_sale = null, this._to_receive = null; var n = this.is_bid ? new h({ asset_id: t.min_price.base.asset_id, amount: parseInt(t.min_price.base.amount, 10), precision: r[t.min_price.base.asset_id].precision }) : new h({ asset_id: t.max_price.base.asset_id, amount: parseInt(t.max_price.base.amount, 10), precision: r[t.max_price.base.asset_id].precision }) , i = this.is_bid ? new h({ asset_id: t.min_price.quote.asset_id, amount: parseInt(t.min_price.quote.amount, 10), precision: r[t.min_price.quote.asset_id].precision }) : new h({ asset_id: t.max_price.quote.asset_id, amount: parseInt(t.max_price.quote.amount, 10), precision: r[t.max_price.quote.asset_id].precision }); this.sell_price = new m({ base: n, quote: i }), this.base = n, this.quote = i, this.total_for_sale = this.amountForSale().getAmount({ real: !0 }), this.total_to_receive = this.amountToReceive().getAmount({ real: !0 }), this._total_for_sale = null, this._total_to_receive = null, this.market_base = this.is_bid ? this.base.asset_id : this.quote.asset_id } return o(e, [{ key: "isBid", value: function() { return this.is_bid } }, { key: "sellPrice", value: function() { return this.sell_price } }, { key: "getPrice", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.sell_price; return this._real_price ? this._real_price : this._real_price = e.toReal(e.base.asset_id !== this.market_base) } }, { key: "amountForSale", value: function() { return this._for_sale ? this._for_sale : this._for_sale = new h({ asset_id: this.sell_price.base.asset_id, amount: this.for_sale, precision: this.assets[this.sell_price.base.asset_id].precision }) } }, { key: "amountToReceive", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.isBid(); return this._to_receive ? this._to_receive : (this._to_receive = this.amountForSale().times(this.sell_price, e), this._to_receive) } }, { key: "clone", value: function() { return new e(this.order,this.assets,this.is_bid) } }, { key: "_clearCache", value: function() { this._for_sale = null, this._to_receive = null, this._total_to_receive = null, this._total_for_sale = null, this._real_price = null } }, { key: "ne", value: function(e) { return this.sell_price.ne(e.sell_price) || this.for_sale !== e.for_sale } }, { key: "equals", value: function(e) { return !this.ne(e) } }, { key: "setTotalToReceive", value: function(e) { this.total_to_receive = e } }, { key: "setTotalForSale", value: function(e) { this.total_for_sale = e, this._total_to_receive = null } }, { key: "totalToReceive", value: function() { var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).noCache; return void 0 !== e && e || !this._total_to_receive ? (this._total_to_receive = (this.total_to_receive || this.amountToReceive()).clone(), this._total_to_receive) : this._total_to_receive } }, { key: "totalForSale", value: function() { var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).noCache; return void 0 !== e && e || !this._total_for_sale ? (this._total_for_sale = (this.total_for_sale || this.amountForSale()).clone(), this._total_for_sale) : this._total_for_sale } }]), e }() , w = function() { function e(t, r, n) { if (c(this, e), "virtual_op"in t && (t = { id: t.id, op: t.op[1], time: null, block: t.block_num }), !n) throw new Error("LimitOrder requires a market_base id"); this.op = t.op, this.assets = r, this.market_base = n, this.id = t.id, this.order_id = t.op.order_id, this.isCall = !!a.a.is_object_type(t.op.order_id, "call_order"), this.isBid = t.op.receives.asset_id === this.market_base, this.className = this.isCall ? "orderHistoryCall" : this.isBid ? "orderHistoryBid" : "orderHistoryAsk", this.time = t.time && new Date(a.a.makeISODateString(t.time)), this.block = t.block, this.account = t.op.account || t.op.account_id, this.is_maker = t.op.is_maker; var i = new h({ asset_id: t.op.pays.asset_id, amount: parseInt(t.op.pays.amount, 10), precision: r[t.op.pays.asset_id].precision }) , o = new h({ asset_id: t.op.receives.asset_id, amount: parseInt(t.op.receives.amount, 10), precision: r[t.op.receives.asset_id].precision }); this.pays = this.isBid ? i : o, this.receives = this.isBid ? o : i, t.op.fill_price && (this.fill_price = new m({ base: new h({ asset_id: t.op.fill_price.base.asset_id, amount: parseInt(t.op.fill_price.base.amount, 10), precision: r[t.op.fill_price.base.asset_id].precision }), quote: new h({ asset_id: t.op.fill_price.quote.asset_id, amount: parseInt(t.op.fill_price.quote.amount, 10), precision: r[t.op.fill_price.quote.asset_id].precision }) })), this.fee = new h({ asset_id: t.op.fee.asset_id, amount: parseInt(t.op.fee.amount, 10), precision: r[t.op.fee.asset_id].precision }) } return o(e, [{ key: "_calculatePrice", value: function() { return this._cached_price ? this._cached_price : this._cached_price = new m({ base: this.pays, quote: this.receives }).toReal(!1) } }, { key: "getPrice", value: function() { return this.fill_price ? this.fill_price.toReal(this.fill_price.base.asset_id === this.receives.asset_id) : this._calculatePrice() } }, { key: "amountToReceive", value: function() { var e = this.fill_price ? this.pays.times(this.fill_price).getAmount({ real: !0 }) : this.receives.getAmount({ real: !0 }); return a.a.format_number(e, this.receives.precision) } }, { key: "amountToPay", value: function() { return a.a.format_number(this.pays.getAmount({ real: !0 }), this.pays.precision) } }]), e }() , k = function() { function e(t, r, a, n) { if (c(this, e), !t || !r) throw new Error("Collateral Bid missing inputs"); this.market_base = a, this.inverted = a === t.inv_swan_price.base.asset_id, this.id = t.id, this.bidder = t.bidder, this.collateral = parseInt(t.inv_swan_price.base.amount, 10), this.debt = parseInt(t.inv_swan_price.quote.amount, 10), this.bid = new m({ base: new h({ asset_id: t.inv_swan_price.base.asset_id, amount: parseInt(t.inv_swan_price.base.amount, 10), precision: r[t.inv_swan_price.base.asset_id].precision }), quote: new h({ asset_id: t.inv_swan_price.quote.asset_id, amount: parseInt(t.inv_swan_price.quote.amount, 10), precision: r[t.inv_swan_price.quote.asset_id].precision }) }), this.precisionsRatio = d(r[t.inv_swan_price.base.asset_id].precision) / d(r[t.inv_swan_price.quote.asset_id].precision), this.inverted && (this.bid = this.bid.invert()), this.feed_price = n } return o(e, [{ key: "getFeedPrice", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.feed_price; return this._feed_price ? this._feed_price : this._feed_price = e.toReal(e.base.asset_id === this.market_base) } }, { key: "_getFeedPrice", value: function() { return (this.inverted ? this.getFeedPrice() : this.feed_price.invert().toReal()) * this.precisionsRatio } }, { key: "getRatio", value: function() { return this.collateral / (this.debt / this._getFeedPrice()) / 100 } }]), e }() } , , function(e, t, r) { "use strict"; var a = r(30) , n = r(80) , i = r(14) , o = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var s = new (function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return o(e, [{ key: "lookupAccounts", value: function(e, t) { return i.Apis.instance().db_api().exec("lookup_accounts", [e, t]) } }]), e }()) , l = r(94) , c = r(233) , u = r(19) , d = r(64) , p = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var h = {} , m = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return p(e, [{ key: "accountSearch", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 50 , r = e + "_" + t + "}"; return function(a) { if (!h[r]) return h[r] = !0, s.lookupAccounts(e, t).then(function(t) { h[r] = !1, a({ accounts: t, searchTerm: e }) }) } } }, { key: "setCurrentAccount", value: function(e) { return e } }, { key: "tryToSetCurrentAccount", value: function() { return !0 } }, { key: "addStarAccount", value: function(e) { return e } }, { key: "removeStarAccount", value: function(e) { return e } }, { key: "toggleHideAccount", value: function(e, t) { return { account: e, hide: t } } }, { key: "transfer", value: function(e, t, r, a, i) { var o = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : null , s = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : "1.3.0"; s = n.a.getFinalFeeAsset(o || e, "transfer", s); try { return function(n) { return c.a.transfer({ from_account: e, to_account: t, amount: r, asset: a, memo: i, propose_account: o, fee_asset_id: s }).then(function(e) { n(e) }) } } catch (e) { return console.log("[AccountActions.js:90] ----- transfer error -----\x3e", e), new Promise(function(t, r) { r(e) } ) } } }, { key: "createAccount", value: function(e, t, r, a, n) { return function(i) { return d.a.createAccount(e, t, r, a, n).then(function() { return i(e), e }) } } }, { key: "createAccountWithPassword", value: function(e, t, r, a, n, i) { return function(o) { return d.a.createAccountWithPassword(e, t, r, a, n, i).then(function() { return o(e), e }) } } }, { key: "upgradeAccount", value: function(e, t) { var r = n.a.getFinalFeeAsset(e, "account_upgrade") , a = l.a.new_transaction(); return a.add_type_operation("account_upgrade", { fee: { amount: 0, asset_id: r }, account_to_upgrade: e, upgrade_to_lifetime_member: t }), u.a.process_transaction(a, null, !0) } }, { key: "addAccountContact", value: function(e) { return e } }, { key: "removeAccountContact", value: function(e) { return e } }, { key: "setPasswordAccount", value: function(e) { return e } }, { key: "createCommittee", value: function(e) { var t = e.url , r = e.account.get("id") , a = l.a.new_transaction(); return a.add_type_operation("committee_member_create", { fee: { amount: 0, asset_id: "1.3.0" }, committee_member_account: r, url: t }), function(e) { return u.a.process_transaction(a, null, !0).then(function() { e(!0) }).catch(function(t) { console.log("----- Add Committee member error -----\x3e", t), e(!1) }) } } }, { key: "createWitness", value: function(e) { var t = e.url , r = e.account , a = e.signingKey , n = r.get("id") , i = l.a.new_transaction(); return i.add_type_operation("witness_create", { fee: { amount: 0, asset_id: "1.3.0" }, witness_account: n, url: t, block_signing_key: a }), function(e) { return u.a.process_transaction(i, null, !0).then(function() { e(!0) }).catch(function(t) { console.log("----- Create witness error -----\x3e", t), e(!1) }) } } }]), e }(); t.a = a.a.createActions(m) } , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(1) , o = r.n(i) , s = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var l = function(e) { function t(e) { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var r = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.state = { progress: 0 }, r } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), s(t, [{ key: "render", value: function() { switch (this.props.type) { case "three-bounce": return n.a.createElement("div", { className: "three-bounce" }, n.a.createElement("div", { className: "bounce1" }), n.a.createElement("div", { className: "bounce2" }), n.a.createElement("div", { className: "bounce3" })); case "circle": return n.a.createElement("div", { className: "circle-wrapper" }, n.a.createElement("div", { className: "circle1 circle" }), n.a.createElement("div", { className: "circle2 circle" }), n.a.createElement("div", { className: "circle3 circle" }), n.a.createElement("div", { className: "circle4 circle" }), n.a.createElement("div", { className: "circle5 circle" }), n.a.createElement("div", { className: "circle6 circle" }), n.a.createElement("div", { className: "circle7 circle" }), n.a.createElement("div", { className: "circle8 circle" }), n.a.createElement("div", { className: "circle9 circle" }), n.a.createElement("div", { className: "circle10 circle" }), n.a.createElement("div", { className: "circle11 circle" }), n.a.createElement("div", { className: "circle12 circle" })); case "circle-small": return n.a.createElement("div", { className: "circle-wrapper", style: { height: "15px", minHeight: "15px" } }, n.a.createElement("div", { className: "circle1 circle" }), n.a.createElement("div", { className: "circle2 circle" }), n.a.createElement("div", { className: "circle3 circle" }), n.a.createElement("div", { className: "circle4 circle" }), n.a.createElement("div", { className: "circle5 circle" }), n.a.createElement("div", { className: "circle6 circle" }), n.a.createElement("div", { className: "circle7 circle" }), n.a.createElement("div", { className: "circle8 circle" }), n.a.createElement("div", { className: "circle9 circle" }), n.a.createElement("div", { className: "circle10 circle" }), n.a.createElement("div", { className: "circle11 circle" }), n.a.createElement("div", { className: "circle12 circle" })); default: var e = "loading-overlay"; return this.progress > 0 && (e += " with-progress"), n.a.createElement("div", { className: e }, n.a.createElement("div", { className: "loading-panel" }, this.props.loadingText && n.a.createElement("div", { className: "text-center", style: { paddingTop: "10px", color: "black" } }, this.props.loadingText), n.a.createElement("div", { className: "spinner" }, n.a.createElement("div", { className: "bounce1" }), n.a.createElement("div", { className: "bounce2" }), n.a.createElement("div", { className: "bounce3" })), n.a.createElement("div", { className: "progress-indicator" }, n.a.createElement("span", null, this.state.progress)))) } } }]), t }(); l.propTypes = { type: o.a.string, loadingText: o.a.string }, l.defaultProps = { type: null, loadingText: null }, t.a = l } , , function(e, t, r) { "use strict"; r.d(t, "m", function() { return i }), r.d(t, "n", function() { return o }), r.d(t, "g", function() { return s }), r.d(t, "i", function() { return l }), r.d(t, "f", function() { return c }), r.d(t, "e", function() { return u }), r.d(t, "l", function() { return d }), r.d(t, "j", function() { return p }), r.d(t, "k", function() { return h }), r.d(t, "d", function() { return m }), r.d(t, "c", function() { return f }), r.d(t, "a", function() { return g }), r.d(t, "b", function() { return _ }), r.d(t, "h", function() { return b }); var a = r(14); function n() { return "4018d784" !== (a.Apis.instance().chain_id || "4018d784").substr(0, 8) } function i() { return "BitShares" } function o() { return "https://wallet.bitshares.org" } function s() { return { url: "https://faucet.bitshares.eu/onboarding", show: !0, editable: !1 } } function l() { return r(1263) } function c() { return "darkTheme" } function u() { return "password" } function d() { return n() ? ["TEST"] : ["BTS", "USD", "CNY", "BTC", "EUR", "GBP"] } function p() { return ["BTC", "ETH", "BTS", "USD", "CNY"] } function h() { var e = { nativeTokens: ["BTC", "BTS", "CNY", "EUR", "GOLD", "KRW", "RUBLE", "SILVER", "USD"], bridgeTokens: ["BRIDGE.BCO", "BRIDGE.BTC", "BRIDGE.MONA", "BRIDGE.ZNY"], gdexTokens: ["GDEX.BTC", "GDEX.BTO", "GDEX.EOS", "GDEX.ETH", "GDEX.BTM", "GDEX.NEO", "GDEX.GAS", "GDEX.QTUM", "GDEX.BKBT", "GDEX.GXC", "GDEX.HPB", "GDEX.SEER", "GDEX.FOTA", "GDEX.JRC", "GDEX.EOSDAC", "GDEX.MTS", "GDEX.GUSD", "GDEX.IQ", "GDEX.NULS", "GDEX.USDT"], openledgerTokens: ["OBITS", "OPEN.BTC", "OPEN.DASH", "OPEN.DGD", "OPEN.DOGE", "OPEN.EOS", "OPEN.EOSDAC", "OPEN.ETH", "OPEN.EURT", "OPEN.GRC", "OPEN.INCNT", "OPEN.KRM", "OPEN.LISK", "OPEN.LTC", "OPEN.MAID", "OPEN.MKR", "OPEN.NEO", "OPEN.OMG", "OPEN.SBD", "OPEN.STEEM", "OPEN.TUSD", "OPEN.USDT", "OPEN.WAVES", "OPEN.XMR", "OPEN.ZEC", "OPEN.ZRX"], rudexTokens: ["PPY", "RUDEX.GBG", "RUDEX.GOLOS", "RUDEX.KRM", "RUDEX.SBD", "RUDEX.STEEM", "RUDEX.BTC", "RUDEX.ETH", "RUDEX.EOS", "RUDEX.WLS", "RUDEX.SMOKE", "RUDEX.GRC"], sparkTokens: ["ZEPH", "PEG.PHP", "SPARKDEX.ETH", "SPARKDEX.BTC", "SPARKDEX.HKD", "SPARKDEX.SGD", "SPARKDEX.AUD", "SPARKDEX.EUR", "SPARKDEX.GBP"], xbtsxTokens: ["XBTSX.STH", "XBTSX.POST", "XBTSX.DOGE", "XBTSX.BTC", "XBTSX.LTC", "XBTSX.DASH", "XBTSX.BTG", "XBTSX.XSPEC", "XBTSX.NVC", "XBTSX.UNI", "XBTSX.NMC", "XBTSX.WAVES", "XBTSX.COF", "XBTSX.XRUP", "XBTSX.P2P", "XBTSX.STEEP", "XBTSX.MDL", "XBTSX.ETH", "XBTSX.EXR", "XBTSX.LCRT"], otherTokens: ["BTWTY", "TWENTIX", "CVCOIN", "HERO", "OCT", "HERTZ", "ICOO", "SMOKE", "STEALTH", "YOYOW"] } , t = []; for (var r in e) t = t.concat(e[r]); return t } function m() { return ["OPEN.", "RUDEX.", "BRIDGE.", "GDEX.", "XBTSX.", "SPARKDEX.", "CITADEL."] } function f() { return [] } function g(e) { return ["OPEN", "RUDEX", "BRIDGE", "GDEX", "XBTSX", "SPARKDEX", "CITADEL"].indexOf(e) >= 0 } function _() { return ["password", "wallet"] } function b() { return n() ? ["NOTIFICATIONS"] : ["TEST"] } } , function(e, t, r) { "use strict"; var a = r(15) , n = r(11) , i = r.n(n) , o = r(5) , s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e } ; o.ChainTypes.object_type; function l(e) { function t(t, r, a, n, i) { return n = n || ANONYMOUS, null == r[a] ? t ? new Error("Required " + i + " `" + a + "` was not specified in `" + n + "`.") : null : e(r, a, n, i) } var r = t.bind(null, !1); return r.isRequired = t.bind(null, !0), r } function c(e, t, r) { return r = r || "ANONYMOUS", e[t] ? "string" == typeof e[t] ? null : new Error(t + " in " + r + " should be a key string") : null } var u = l(function(e, t, r) { if (r = r || "ANONYMOUS", e[t]) { var n = e[t]; if ("string" == typeof n) return a.a.is_object_id(n) ? null : new Error(t + " in " + r + " should be an object id"); if ("object" !== (void 0 === n ? "undefined" : s(n))) return new Error(t + " in " + r + " should be an object id or object") } return null }) , d = l(function(e, t, r) { if (r = r || "ANONYMOUS", e[t]) { var a = e[t]; if ("string" == typeof a) return null; if ("object" !== (void 0 === a ? "undefined" : s(a))) return new Error(t + " of " + a + " in " + r + " should be an account id"); if (a instanceof Map && a.get("name") && 1 == a.size) return null } return null }) , p = l(function(e, t, r) { if (r = r || "ANONYMOUS", e[t]) { var a = e[t]; return o.ChainValidation.is_account_name(a) ? null : new Error(t + " value of " + a + " in " + r + " is not a valid account name") } return null }) , h = l(c) , m = l(c) , f = l(function(e, t, r) { if (r = r || "ANONYMOUS", e[t]) { var a = e[t]; if ("string" == typeof a) return null; if ("object" !== (void 0 === a ? "undefined" : s(a))) return new Error(t + " of " + a + " in " + r + " should be an asset symbol or id") } return null }) , g = l(function(e, t, r) { if (r = r || "ANONYMOUS", e[t]) { var a = e[t]; return i.a.List.isList(a) || i.a.Set.isSet(a) || a instanceof Object ? null : new Error(t + " in " + r + " should be Immutable.List") } return null }) , _ = l(function(e, t, r) { if (r = r || "ANONYMOUS", e[t]) { var a = e[t]; return i.a.List.isList(a) || i.a.Set.isSet(a) || a instanceof Object ? null : new Error(t + " in " + r + " should be Immutable.List") } return null }) , b = l(function(e, t, r) { if (r = r || "ANONYMOUS", e[t]) { var a = e[t]; return i.a.List.isList(a) || i.a.Set.isSet(a) || a instanceof Object ? null : new Error(t + " in " + r + " should be Immutable.List") } return null }); t.a = { ChainObject: u, ChainAccount: d, ChainAccountName: p, ChainKeyRefs: h, ChainAddressBalances: m, ChainAsset: f, ChainObjectsList: g, ChainAccountsList: _, ChainAssetsList: b } } , function(e, t, r) { "use strict"; var a = r(30) , n = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var i = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return n(e, [{ key: "unlock", value: function() { return function(e) { return new Promise(function(t, r) { e({ resolve: t, reject: r }) } ).then(function(e) { e && o.change() }).catch(function(e) { throw e }) } } }, { key: "lock", value: function() { return function(e) { return new Promise(function(t) { e({ resolve: t }) } ).then(function(e) { e && o.change() }) } } }, { key: "cancel", value: function() { return !0 } }, { key: "change", value: function() { return !0 } }, { key: "checkLock", value: function() { return !0 } }]), e }() , o = a.a.createActions(i); t.a = o } , function(e, t, r) { "use strict"; var a = r(856) , n = r(269) , i = r(854) , o = r(592) , s = r(835) , l = r(567) , c = r(168) , u = r(453) , d = r(0) , p = r.n(d) , h = r(5) , m = r(43) , f = r(15) , g = r(351) , _ = r(40) , b = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]) } return e } , y = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function v(e) { if (Array.isArray(e)) { for (var t = 0, r = Array(e.length); t < e.length; t++) r[t] = e[t]; return r } return Array.from(e) } function w(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function k(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function x(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } var S = function(e, t) { return t[e] } , A = Object(u.a)(S)(0) , E = Object(u.a)(S)(1) , T = Object(u.a)(function(e, t) { return t === e || t === e.isRequired }) , C = T(m.a.ChainObject) , z = T(m.a.ChainAccount) , B = T(m.a.ChainKeyRefs) , O = T(m.a.ChainAddressBalances) , P = T(m.a.ChainAsset) , j = T(m.a.ChainObjectsList) , I = T(m.a.ChainAccountsList) , M = T(m.a.ChainAssetsList) , N = T(m.a.ChainAccountName); function R(e) { for (var t in m.a) { if (e === m.a[t].isRequired) return !0 } return !1 } function q(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} , r = function(r) { function u(r) { w(this, u); var a = k(this, (u.__proto__ || Object.getPrototypeOf(u)).call(this, r)); a.hasErrored = !1; var i = Object(o.a)(e.propTypes); for (var d in t && t.all_props ? (a.chain_objects = Object(l.a)(Object.keys(a.props), function(e) { return "children" === e || "show_loader" === e }), a.chain_accounts = [], a.chain_account_names = [], a.chain_key_refs = [], a.chain_address_balances = [], a.chain_assets = [], a.chain_objects_list = [], a.chain_accounts_list = [], a.chain_assets_list = [], a.required_props = [], a.all_chain_props = a.chain_objects) : (a.chain_objects = i.filter(Object(c.a)(E, C)).map(A), a.chain_accounts = i.filter(Object(c.a)(E, z)).map(A), a.chain_account_names = i.filter(Object(c.a)(E, N)).map(A), a.chain_key_refs = i.filter(Object(c.a)(E, B)).map(A), a.chain_address_balances = i.filter(Object(c.a)(E, O)).map(A), a.chain_assets = i.filter(Object(c.a)(E, P)).map(A), a.chain_objects_list = i.filter(Object(c.a)(E, j)).map(A), a.chain_accounts_list = i.filter(Object(c.a)(E, I)).map(A), a.chain_assets_list = i.filter(Object(c.a)(E, M)).map(A), a.required_props = i.filter(Object(c.a)(E, R)).map(A), a.all_chain_props = [].concat(v(a.chain_objects), v(a.chain_accounts), v(a.chain_account_names), v(a.chain_key_refs), v(a.chain_address_balances), v(a.chain_assets), v(a.chain_objects_list))), t && t.require_all_props && (a.required_props = a.all_chain_props), a.dynamic_props = {}, a.default_props = Object(s.a)(e.defaultProps) || {}, a.default_props) { var p = a.default_props[d]; "string" == typeof p && 0 === p.indexOf("props.") && (a.dynamic_props[d] = Object(n.a)(a, p)) } return a.tempComponent = e.defaultProps && e.defaultProps.tempComponent || null, a.update = a.update.bind(a), a.state = { resolved: !1 }, a } return x(u, p.a.Component), y(u, [{ key: "shouldComponentUpdate", value: function(e, t) { return !f.a.are_equal_shallow(this.props, e) || !f.a.are_equal_shallow(this.state, t) } }, { key: "componentDidCatch", value: function(e, t) { this._errored(e, t) } }, { key: "_errored", value: function(t, r) { console.error("BindToChainState(" + Object(g.a)(e) + ")", t, r), this.setState({ hasErrored: !0 }) } }, { key: "componentWillMount", value: function() { h.ChainStore.subscribe(this.update), this.update() } }, { key: "componentWillUnmount", value: function() { h.ChainStore.unsubscribe(this.update) } }, { key: "componentWillReceiveProps", value: function(e) { if (t && t.all_props) { this.chain_objects = Object(l.a)(Object.keys(e), function(e) { return "children" === e || "show_loader" === e }), this.all_chain_props = this.chain_objects; var r = Object(a.a)(this.state, this.chain_objects); f.a.are_equal_shallow(r, this.state) || this.setState(r) } var i = null; for (var o in this.dynamic_props) { var s = this.default_props[o]; i || (i = { props: e }); var c = Object(n.a)(this, s) , u = Object(n.a)(i, s); u && u !== c && (this.dynamic_props[o] = Object(n.a)(i, s)) } this.update(e) } }, { key: "update", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null; try { this._update(e) } catch (e) { this._errored(e) } } }, { key: "_update", value: function() { var e = this , t = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null) || this.props , r = {} , a = 0 , n = 0 , i = !0 , o = !1 , s = void 0; try { for (var l, c = this.chain_objects[Symbol.iterator](); !(i = (l = c.next()).done); i = !0) { var u = l.value; if (pe = t[u] || this.dynamic_props[u] || this.default_props[u]) { var d = h.ChainStore.getObject(pe, !1, this.default_props.autosubscribe); void 0 === d && -1 === this.required_props.indexOf(u) && d !== this.state[u] ? r[u] = d : d && d !== this.state[u] && (r[u] = d), ++a, void 0 !== d && ++n } else this.state[u] && (r[u] = null) } } catch (e) { o = !0, s = e } finally { try { !i && c.return && c.return() } finally { if (o) throw s } } var p = !0 , m = !1 , g = void 0; try { for (var _, b = this.chain_accounts[Symbol.iterator](); !(p = (_ = b.next()).done); p = !0) { var y = _.value; if (pe = t[y] || this.dynamic_props[y] || this.default_props[y]) { "#" === pe[0] && Number.parseInt(pe.substring(1)) && (pe = "1.2." + pe.substring(1)), pe instanceof Map && pe.get("name") && 1 == pe.size && (pe = pe.get("name")); var v = h.ChainStore.getAccount(pe, this.default_props.autosubscribe); void 0 === v && -1 === this.required_props.indexOf(y) && v !== this.state[y] ? r[y] = v : v && v !== this.state[y] ? r[y] = v : null === v && (r[y] = v), ++a, void 0 !== v && ++n, "bitsharesblocksazdazdz" === pe && console.log("account:", pe, "new_obj", v, "all_objects_counter", a, "resolved_objects_counter", n) } else this.state[y] && (r[y] = null) } } catch (e) { m = !0, g = e } finally { try { !p && b.return && b.return() } finally { if (m) throw g } } var w = !0 , k = !1 , x = void 0; try { for (var S, A = this.chain_account_names[Symbol.iterator](); !(w = (S = A.next()).done); w = !0) { var E = S.value; if (pe = t[E] || this.dynamic_props[E] || this.default_props[E]) { var T = h.ChainStore.getAccountName(pe); void 0 === T && -1 === this.required_props.indexOf(E) && T !== this.state[E] ? r[E] = T : T && T !== this.state[E] && (r[E] = T), ++a, void 0 !== T && ++n } else this.state[E] && (r[E] = null) } } catch (e) { k = !0, x = e } finally { try { !w && A.return && A.return() } finally { if (k) throw x } } var C = !0 , z = !1 , B = void 0; try { for (var O, P = this.chain_key_refs[Symbol.iterator](); !(C = (O = P.next()).done); C = !0) { var j = O.value; if (pe = t[j] || this.dynamic_prop[j] || this.default_props[j]) { var I = h.ChainStore.getAccountRefsOfKey(pe); void 0 === I && -1 === this.required_props.indexOf(j) && I !== this.state[j] ? r[j] = I : I && I !== this.state[j] && (r[j] = I), ++a, void 0 !== I && ++n } else this.state[j] && (r[j] = null) } } catch (e) { z = !0, B = e } finally { try { !C && P.return && P.return() } finally { if (z) throw B } } var M = !0 , N = !1 , R = void 0; try { for (var q, D = this.chain_address_balances[Symbol.iterator](); !(M = (q = D.next()).done); M = !0) { var L = q.value; if (pe = t[L] || this.dynamic_props[L] || this.default_props[L]) { var F = h.ChainStore.getBalanceObjects(pe); void 0 === F && -1 === this.required_props.indexOf(L) && F !== this.state[L] ? r[L] = F : F && F !== this.state[L] && (r[L] = F), ++a, void 0 !== F && ++n } else this.state[L] && (r[L] = null) } } catch (e) { N = !0, R = e } finally { try { !M && D.return && D.return() } finally { if (N) throw R } } var U = !0 , W = !1 , H = void 0; try { for (var K, V = this.chain_assets[Symbol.iterator](); !(U = (K = V.next()).done); U = !0) { var G = K.value; if (pe = t[G] || this.dynamic_props[G] || this.default_props[G]) { var Y = h.ChainStore.getAsset(pe); void 0 === Y && -1 === this.required_props.indexOf(G) && Y !== this.state[G] ? r[G] = Y : (Y && Y !== this.state[G] || null === Y) && (r[G] = Y), ++a, void 0 !== Y && ++n } else this.state[G] && (r[G] = null) } } catch (e) { W = !0, H = e } finally { try { !U && V.return && V.return() } finally { if (W) throw H } } var J = !0 , X = !1 , Z = void 0; try { for (var Q, $ = this.chain_objects_list[Symbol.iterator](); !(J = (Q = $.next()).done); J = !0) { var ee = Q.value; (pe = t[ee] || this.dynamic_props[ee] || this.default_props[ee]) ? function() { var t = e.state[ee] , i = [] , o = !1; t && t.length === pe.size || (t = [], o = !0); var s = 0; pe.forEach(function(r) { if (++s, r) { var l = h.ChainStore.getObject(r, !1, e.default_props.autosubscribe); l && ++n, t[s] !== l ? (o = !0, i[s] = l) : i[s] = t[s] } ++a }), o && (r[ee] = i) }() : this.state[ee] && (r[ee] = null) } } catch (e) { X = !0, Z = e } finally { try { !J && $.return && $.return() } finally { if (X) throw Z } } var te = !0 , re = !1 , ae = void 0; try { for (var ne, ie = this.chain_accounts_list[Symbol.iterator](); !(te = (ne = ie.next()).done); te = !0) { var oe = ne.value; (pe = t[oe] || this.dynamic_props[oe] || this.default_props[oe]) ? function() { var t = e.state[oe] , i = [] , o = !1; t && t.length === pe.size || (t = [], o = !0); var s = 0; pe.forEach(function(r) { if (r) { var l = h.ChainStore.getAccount(r, e.default_props.autosubscribe); l && ++n, t[s] !== l ? (o = !0, i[s] = l) : i[s] = t[s] } ++s, ++a }), o && (r[oe] = i) }() : this.state[oe] && (r[oe] = null) } } catch (e) { re = !0, ae = e } finally { try { !te && ie.return && ie.return() } finally { if (re) throw ae } } var se = !0 , le = !1 , ce = void 0; try { for (var ue, de = this.chain_assets_list[Symbol.iterator](); !(se = (ue = de.next()).done); se = !0) { var pe, he = ue.value; (pe = t[he] || this.dynamic_props[he] || this.default_props[he]) ? function() { var t = e.state[he] , i = [] , o = !1; t && t.length === pe.size || (t = [], o = !0); var s = 0; pe.forEach(function(e) { if (++s, e) { var r = h.ChainStore.getAsset(e); r && ++n, t[s] !== r ? (o = !0, i[s] = r) : i[s] = t[s] } ++a }), o && (r[he] = i) }() : this.state[he] && (r[he] = null) } } catch (e) { le = !0, ce = e } finally { try { !se && de.return && de.return() } finally { if (le) throw ce } } a <= n && (r.resolved = !0); var me = !1; function fe(e) { var t = {}; for (var r in e) null === e[r] ? t[r] = "null" : t[r] = e[r]; return t } var ge = fe(this.state) , _e = fe(r); for (var be in _e) f.a.are_equal_shallow(_e[be], ge[be]) ? delete r[be] : me = !0; me && this.setState(r) } }, { key: "render", value: function() { var r = Object(i.a)(this.props, this.all_chain_props) , a = !0 , n = !1 , o = void 0; try { for (var s, l = this.required_props[Symbol.iterator](); !(a = (s = l.next()).done); a = !0) { var c = s.value; if (void 0 === this.state[c]) return void 0 !== t && t.show_loader ? p.a.createElement(_.a, null) : this.hasErrored ? p.a.createElement("span", null, "Error rendering component, please report") : this.tempComponent ? p.a.createElement(this.tempComponent) : p.a.createElement("span", null) } } catch (e) { n = !0, o = e } finally { try { !a && l.return && l.return() } finally { if (n) throw o } } return p.a.createElement(e, b({ ref: "bound_component" }, r, this.state)) } }]), u }(); return r.displayName = "BindToChainState(" + Object(g.a)(e) + ")", r } var D = function(e) { function t() { return w(this, t), k(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return x(t, p.a.Component), y(t, [{ key: "render", value: function() { return p.a.createElement("span", { className: "wrapper" }, this.props.children(this.props)) } }]), t }(); D = q(D, { all_props: !0, require_all_props: !0 }), q.Wrapper = D, t.a = q } , , , , function(e, t, r) { "use strict"; r.d(t, "b", function() { return n }), r.d(t, "g", function() { return i }), r.d(t, "h", function() { return o }), r.d(t, "a", function() { return s }), r.d(t, "d", function() { return l }), r.d(t, "c", function() { return c }), r.d(t, "e", function() { return u }), r.d(t, "f", function() { return d }), r.d(t, "j", function() { return p }), r.d(t, "i", function() { return h }); var a = r(42) , n = { BASE: "https://api.blocktrades.us/v2", COINS_LIST: "/coins", ACTIVE_WALLETS: "/active-wallets", TRADING_PAIRS: "/trading-pairs", DEPOSIT_LIMIT: "/deposit-limits", ESTIMATE_OUTPUT: "/estimate-output-amount", ESTIMATE_INPUT: "/estimate-input-amount" } , i = { BASE: "https://ol-api1.openledger.info/api/v0/ol/support", COINS_LIST: "/coins", ACTIVE_WALLETS: "/active-wallets", TRADING_PAIRS: "/trading-pairs", DEPOSIT_LIMIT: "/deposit-limits", ESTIMATE_OUTPUT: "/estimate-output-amount", ESTIMATE_INPUT: "/estimate-input-amount", RPC_URL: "https://openledger.info/api/" } , o = { BASE: "https://gateway.rudex.org/api/v0_1", COINS_LIST: "/coins", NEW_DEPOSIT_ADDRESS: "/new-deposit-address" } , s = { BASE: "https://dex-api.bitspark.io/api/v1", COINS_LIST: "/coins", ACTIVE_WALLETS: "/active-wallets", TRADING_PAIRS: "/trading-pairs", DEPOSIT_LIMIT: "/deposit-limits", ESTIMATE_OUTPUT: "/estimate-output-amount", ESTIMATE_INPUT: "/estimate-input-amount" } , l = { BASE: "https://api.crypto-bridge.org/api/v1", COINS_LIST: "/coins", ACTIVE_WALLETS: "/wallets", MARKETS: "/markets", TRADING_PAIRS: "/trading-pairs" } , c = { BASE: "https://citadel.li/trade", COINS_LIST: "/coins", ACTIVE_WALLETS: "/active-wallets", TRADING_PAIRS: "/trading-pairs", DEPOSIT_LIMIT: "/deposit-limits", ESTIMATE_OUTPUT: "/estimate-output-amount", ESTIMATE_INPUT: "/estimate-input-amount" } , u = { BASE: "https://api.gdex.io/adjust", COINS_LIST: "/coins", ACTIVE_WALLETS: "/active-wallets", TRADING_PAIRS: "/trading-pairs" } , d = { BASE: "https://api.gdex.io", ASSET_LIST: "/gateway/asset/assetList", ASSET_DETAIL: "/gateway/asset/assetDetail", GET_DEPOSIT_ADDRESS: "/gateway/address/getAddress", CHECK_WITHDRAY_ADDRESS: "/gateway/address/checkAddress", DEPOSIT_RECORD_LIST: "/gateway/deposit/recordList", DEPOSIT_RECORD_DETAIL: "/gateway/deposit/recordDetail", WITHDRAW_RECORD_LIST: "/gateway/withdraw/recordList", WITHDRAW_RECORD_DETAIL: "/gateway/withdraw/recordDetail", GET_USER_INFO: "/gateway/user/getUserInfo", USER_AGREEMENT: "/gateway/user/isAgree", WITHDRAW_RULE: "/gateway/withdraw/rule" } , p = { BASE: "https://apis.xbts.io/api/v1", COINS_LIST: "/coin" } , h = { DEFAULT_WS_NODE: "wss://fake.automatic-selection.com", WS_NODE_LIST: [{ url: "wss://fake.automatic-selection.com", location: { translate: "settings.api_closest" } }, { url: "ws://127.0.0.1:8090", location: "Locally hosted" }, { url: "wss://dex.iobanker.com:9090", region: "Western Europe", country: "Germany", location: "Frankfurt", operator: "Witness: iobanker-core", contact: "email:admin@iobanker.com" }, { url: "wss://bitshares.openledger.info/ws", location: "Nuremberg", region: "Western Europe", country: "Germany", operator: "Witness: openledger-dc", contact: "telegram:mtopenledger" }, { url: "wss://openledger.hk/ws", region: "Southeastern Asia", country: "Singapore", operator: "Witness: openledger-dc", contact: "telegram:mtopenledger" }, { url: "wss://na.openledger.info/ws", location: "Quebec", region: "Northern America", country: "Canada", operator: "Witness: openledger-dc", contact: "telegram:mtopenledger" }, { url: "wss://bit.btsabc.org/ws", region: "Eastern Asia", country: "China", location: "Hong Kong", operator: "Witness: abc123", contact: "QQ:58291;email:58291@qq.com" }, { url: "wss://bitshares.crypto.fans/ws", region: "Western Europe", country: "Germany", location: "Munich", operator: "Witness: sc-ol", contact: "telegram:startail" }, { url: "wss://ws.gdex.top", region: "Eastern Asia", country: "China", location: "Shanghai", operator: "Witness: gdex-witness", contact: "telegram:BrianZhang" }, { url: "wss://api.weaccount.cn", region: "Eastern Asia", country: "China", location: "Hangzhou", operator: "Witness: btspp-witness", contact: "telegram:btsplusplus" }, { url: "wss://dex.rnglab.org", region: "Northern Europe", country: "Netherlands", location: "Amsterdam", operator: "Witness: rnglab", contact: "keybase:rnglab" }, { url: "wss://dexnode.net/ws", region: "Northern America", country: "U.S.A.", location: "Dallas", operator: "Witness: Sahkan", contact: "telegram:Sahkan_bitshares" }, { url: "wss://kc-us-dex.xeldal.com/ws", region: "North America", country: "U.S.A.", location: "Kansas City", operator: "Witness: xeldal", contact: "telegram:xeldal" }, { url: "wss://api.bts.blckchnd.com", region: "Western Europe", country: "Germany", location: "Falkenstein", operator: "Witness: blckchnd", contact: "email:admin@blckchnd.com;telegram:ruslansalikhov;github:blckchnd" }, { url: "wss://api-ru.bts.blckchnd.com", region: "Eastern Europe", country: "Russia", location: "Moscow", operator: "Witness: blckchnd", contact: "email:admin@blckchnd.com;telegram:ruslansalikhov;github:blckchnd" }, { url: "wss://api.bitsharesdex.com", region: "Northern America", country: "U.S.A.", location: "Kansas City", operator: "Witness: delegate.ihashfury", contact: "telegram:ihashfury" }, { url: "wss://api.fr.bitsharesdex.com", region: "Western Europe", country: "France", location: "Paris", operator: "Witness: delegate.ihashfury", contact: "telegram:ihashfury" }, { url: "wss://blockzms.xyz/ws ", region: "North America", country: "U.S.A.", location: "New Jersey", operator: "Witness: delegate-zhaomu", contact: "telegram:lzmlam;wechat:lzmlam" }, { url: "wss://eu.nodes.bitshares.ws", region: "Western Europe", country: "Germany", operator: "Infrastructure Worker", contact: "email:info@blockchainprojectsbv.com" }, { url: "wss://us.nodes.bitshares.ws", region: "North America", country: "U.S.A.", operator: "Infrastructure Worker", contact: "email:info@blockchainprojectsbv.com" }, { url: "wss://sg.nodes.bitshares.ws", region: "Southeastern Asia", country: "Singapore", operator: "Infrastructure Worker", contact: "email:info@blockchainprojectsbv.com" }, { url: "wss://api.bts.mobi/ws", region: "Northern America", country: "U.S.A.", location: "Virginia", operator: "Witness: in.abit", contact: "telegram:abitmore" }, { url: "wss://api.btsxchng.com", region: "Multiple", country: "Worldwide", location: "Singapore / N. Virginia / London", operator: "Witness: elmato", contact: "telegram:elmato" }, { url: "wss://api.bts.network/", region: "North America", country: "U.S.A.", location: "Virginia", operator: "Witness: fox", contact: "telegram:ryanRfox" }, { url: "wss://btsws.roelandp.nl/ws", region: "Northern Europe", country: "Finland", location: "Helsinki", operator: "Witness: roelandp", contact: "telegram:roelandp" }, { url: "wss://api.bitshares.bhuz.info/ws", region: "Northern America", country: "Canada", operator: "Witness: bhuz", contact: "telegram:bhuzor" }, { url: "wss://bts-api.lafona.net/ws", region: "Northern America", country: "Canada", location: "Montreal", operator: "Witness: delegate-1.lafona", contact: "telegram:lafona" }, { url: "wss://kimziv.com/ws", region: "North America", country: "U.S.A.", location: "New Jersey", operator: "Witness: witness.yao", contact: "telegram:imyao" }, { url: "wss://api.btsgo.net/ws", region: "Asia", location: "Singapore", operator: "Witness: xn-delegate", contact: "wechat:Necklace" }, { url: "wss://bts.proxyhosts.info/wss", region: "Western Europe", country: "Germany", location: "", operator: "Witness: verbaltech2", contact: "keybase:jgaltman" }, { url: "wss://bts.open.icowallet.net/ws", region: "Eastern Asia", country: "China", location: "Hangzhou", operator: "Witness: magicwallet.witness", contact: "telegram:plus_wave" }, { url: "wss://crazybit.online", region: "Asia", country: "China", location: "Shenzhen", operator: "Witness: crazybit", contact: "telegram:crazybits;wechat:JamesCai" }, { url: "wss://freedom.bts123.cc:15138/", region: "South China", country: "China", location: "Changsha", operator: "Witness: delegate.freedom", contact: "telegram:eggplant" }, { url: "wss://bitshares.bts123.cc:15138/", region: "North China", country: "China", location: "Hangzhou", operator: "Witness: delegate.freedom", contact: "telegram:eggplant" }, { url: "wss://api.bts.ai", region: "Eastern Asia", country: "China", location: "Beijing", operator: "Witness: witness.hiblockchain", contact: "telegram:vianull;wechat:strugglingl" }, { url: "wss://ws.hellobts.com", region: "Eastern Asia", country: "Japan", location: "Tokyo", operator: "Witness: xman", contact: "wechat:hidpos;email:hellobts@qq.com" }, { url: "wss://bitshares.cyberit.io", region: "Eastern Asia", country: "China", location: "Hong Kong", operator: "Witness: witness.still", contact: "telegram:gordoor;wechat:overyard" }, { url: "wss://bts-seoul.clockwork.gr", region: "Southeastern Asia", country: "Korea", location: "Seoul", operator: "Witness: clockwork", contact: "telegram:clockworkgr" }, { url: "wss://bts.liuye.tech:4443/ws", region: "Eastern Asia", country: "China", location: "Shandong", operator: "Witness: liuye", contact: "email:work@liuye.tech" }, { url: "wss://btsfullnode.bangzi.info/ws", region: "Western Europe", country: "Germany", location: "Munich", operator: "Witness: Bangzi", contact: "telegram:Bangzi" }, { url: "wss://api.dex.trading/", region: "Western Europe", country: "France", location: "Paris", operator: "Witness: zapata42-witness", contact: "telegram:Zapata_42" }, { url: "wss://citadel.li/node", region: "Western Europe", country: "Iceland", location: "Reykjavik", operator: "CITADEL", contact: "email:citadel.li;support" }, { url: "wss://us-west-2.bts.crypto-bridge.org", region: "Northern America", country: "U.S.A.", location: "North California", operator: "CryptoBridge", contact: "email:support@crypto-bridge.org" }, { url: "wss://eu-central-1.bts.crypto-bridge.org", region: "Western Europe", country: "Netherlands", location: "Amsterdam", operator: "CryptoBridge", contact: "email:support@crypto-bridge.org" }, { url: "wss://ap-northeast-1.bts.crypto-bridge.org", region: "Southeastern Asia", country: "Japan", location: "Tokyo", operator: "CryptoBridge", contact: "email:support@crypto-bridge.org" }, { url: "wss://ap-southeast-1.bts.crypto-bridge.org", region: "Southeastern Asia", country: "Singapore", location: "Singapore", operator: "CryptoBridge", contact: "email:support@crypto-bridge.org" }, { url: "wss://ap-southeast-2.bts.crypto-bridge.org", region: "Australia", country: "Australia", location: "Sydney", operator: "CryptoBridge", contact: "email:support@crypto-bridge.org" }, { url: "wss://ap-southeast-3.bts.crypto-bridge.org", region: "Southeastern Asia", country: "Singapore", location: "Singapore", operator: "CryptoBridge", contact: "email:support@crypto-bridge.org" }, { url: "wss://master.us.api.bitshares.org/ws", region: "Northern America", country: "U.S.A.", location: "New Jersey", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://new-york.us.api.bitshares.org/ws", region: "Northern America", country: "U.S.A.", location: "New York", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://chicago.us.api.bitshares.org/ws", region: "Northern America", country: "U.S.A.", location: "Chicago", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://seattle.us.api.bitshares.org/ws", region: "Northern America", country: "U.S.A.", location: "Seattle", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://losangeles.us.api.bitshares.org/ws", region: "Northern America", country: "U.S.A.", location: "Los Angeles", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://atlanta.us.api.bitshares.org/ws", region: "Northern America", country: "U.S.A.", location: "Atlanta", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://siliconvalley.us.api.bitshares.org/ws", region: "Northern America", country: "U.S.A.", location: "Silicon Valley", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://dallas.us.api.bitshares.org/ws", region: "Northern America", country: "U.S.A.", location: "Dallas", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://miami.us.api.bitshares.org/ws", region: "Northern America", country: "U.S.A.", location: "Miami", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://toronto.ca.api.bitshares.org/ws", region: "Canada", country: "Canada", location: "Toronto", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://toronto2.ca.api.bitshares.org/ws", region: "Canada", country: "Canada", location: "Toronto", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://master.eu.api.bitshares.org/ws", region: "Northern Europe", country: "Germany", location: "Frankfurt", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://amsterdam.eu.api.bitshares.org/ws", region: "Northern Europe", country: "Netherlands", location: "Amsterdam", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://london.eu.api.bitshares.org/ws", region: "Western Europe", country: "England", location: "London", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://paris.eu.api.bitshares.org/ws", region: "Western Europe", country: "France", location: "Paris", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://frankfurt.eu.api.bitshares.org/ws", region: "Western Europe", country: "Germany", location: "Frankfurt", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://sydney.au.api.bitshares.org/ws", region: "Oceania", country: "Australia", location: "Sydney", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://sydney2.au.api.bitshares.org/ws", region: "Oceania", country: "Australia", location: "Sydney", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://singapore.asia.api.bitshares.org/ws", region: "Asia", country: "Singapore", location: "Singapore", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://tokyo.eu.api.bitshares.org/ws", region: "Asia", country: "Japan", location: "Tokyo", operator: "'Exotic flavors' infra worker", contact: "telegram:murda_ra;email:hostmaster@bitshares.org" }, { url: "wss://node.testnet.bitshares.eu", region: "TESTNET - Western Europe", country: "Germany", location: "Frankfurt", operator: "BitShares Europe", contact: "telegram:xeroc" }, { url: "wss://testnet.nodes.bitshares.ws", region: "TESTNET - Western Europe", country: "Germany", location: "Nuremberg", operator: "Infrastructure Worker", contact: "email:info@blockchainprojectsbv.com" }, { url: "wss://testnet.dex.trading/", region: "TESTNET - Western Europe", country: "France", location: "Paris", operator: "Witness: zapata42-witness", contact: "telegram:Zapata_42" }], ES_WRAPPER_LIST: [{ url: "https://wrapper.elasticsearch.bitshares.ws", region: "Western Europe", country: "Germany", operator: "Infrastructure Worker", contact: "email:info@blockchainprojectsbv.com" }], DEFAULT_FAUCET: Object(a.g)().url, TESTNET_FAUCET: "https://faucet.testnet.bitshares.eu" } } , function(e, t, r) { "use strict"; var a = r(14) , n = r(97) , i = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var o = function() { function e(t) { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e), this.impl = t } return i(e, [{ key: "setDbSuffix", value: function(e) { this.database_name = "graphene_db" + e } }, { key: "openIndexedDB", value: function() { var e = this; return this.db ? Promise.resolve(this.db) : new Promise(function(t, r) { var a = e.impl.open(e.database_name, 1); a.onupgradeneeded = function(t) { e.db = t.target.result, e.db.createObjectStore("properties", { keyPath: "name" }) } , a.onsuccess = function(r) { e.db = r.target.result, t(e.db) } , a.onerror = function(e) { r(e.target.error) } } ) } }, { key: "getProperty", value: function(e, t) { return this.openIndexedDB().then(function(r) { var a = r.transaction(["properties"], "readonly").objectStore("properties"); return n.a.on_request_end(a.get(e)).then(function(e) { var r = e.target.result; return r ? r.value : t }) }).catch(function(e) { throw console.error(e), e }) } }, { key: "setProperty", value: function(e, t) { return this.openIndexedDB().then(function(r) { var a = r.transaction(["properties"], "readwrite").objectStore("properties"); return t && t.toJS && (t = t.toJS()), n.a.on_request_end(a.put({ name: e, value: t })) }).catch(function(e) { throw console.error(e), e }) } }, { key: "deleteDatabase", value: function() { return arguments.length > 0 && void 0 !== arguments[0] && arguments[0] ? (console.log("deleting", this.database_name), iDB.impl.deleteDatabase(this.database_name).result) : "Are you sure?" } }, { key: "close", value: function() { this.db.close(), this.db = null } }]), e }() , s = "graphene_v2" , l = ["wallet", "private_keys", "linked_accounts"] , c = (r(414).a.MAIN_NET, "default") , u = function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : c , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : a.Apis.instance().chain_id; return [s, t ? t.substring(0, 6) : "", e].join("_") } , d = function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.getDatabaseName(); return new Promise(function(t, r) { var a = p.impl.open(e, 2); a.onupgradeneeded = function(e) { !function(e, t) { 0 === t && (e.createObjectStore("wallet", { keyPath: "public_name" }), n.a.autoIncrement_unique(e, "private_keys", "pubkey"), e.createObjectStore("linked_accounts", { keyPath: "name" })), t < 2 && e.createObjectStore("cached_properties", { keyPath: "name" }) }(e.target.result, e.oldVersion) } , a.onsuccess = function(r) { var a = r.target.result; p.database_name = e, n.a.set_graphene_db(a), t(a) } , a.onerror = function(e) { r(e.target.error) } } ) } , p = function() { var e, t; function r(e) { var r = function(e) { return p.root.getProperty("current_wallet", "default").then(function(t) { c = t; var r = u(t, e); return d(r) }) }(e); return r.then(function(e) { t = e }), { init_promise: r, db: function() { return t } } } return { WALLET_BACKUP_STORES: l, getDatabaseName: u, getCurrentWalletName: function() { return c }, deleteDatabase: function() { return arguments.length > 0 && void 0 !== arguments[0] && arguments[0] ? (console.log("deleting", this.database_name), p.impl.deleteDatabase(this.database_name).result) : "Are you sure?" }, set_impl: function(e) { this.impl = e, this.root = new o(this.impl) }, set_chain_id: function(e) { this.chain_id = e; var t = e ? e.substring(0, 6) : ""; this.root.setDbSuffix("_" + t) }, init_instance: function(t) { var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : a.Apis.instance().chain_id; return e || (t && (this.set_impl(t), "__useShim"in t && this.impl.__useShim()), this.set_chain_id(n), e = r(n)), e }, instance: function() { if (!e) throw new Error("Internal Database instance is not initialized"); return e }, close: function() { e && e.db() && e.db().close(), n.a.set_graphene_db(null), e = void 0 }, add_to_store: function(e, t) { var r = this; return new Promise(function(a, n) { var i = r.instance().db().transaction([e], "readwrite").objectStore(e).add(t); i.onsuccess = function() { a(t) } , i.onerror = function(e) { console.log("ERROR!!! add_to_store - can't store value in db. ", e.target.error.message, t), n(e.target.error.message) } } ) }, remove_from_store: function(e, t) { var r = this; return new Promise(function(a, n) { var i = r.instance().db().transaction([e], "readwrite").objectStore(e).delete(t); i.onsuccess = function() { a() } , i.onerror = function(e) { console.log("ERROR!!! remove_from_store - can't remove value from db. ", e.target.error.message, t), n(e.target.error.message) } } ) }, load_data: function(e) { var t = this; return new Promise(function(r, a) { var n = [] , i = t.instance().db().transaction([e], "readonly").objectStore(e).openCursor(); i.onsuccess = function(e) { var t = e.target.result; t ? (n.push(t.value), t.continue()) : r(n) } , i.onerror = function(e) { console.log("ERROR!!! open_store - can't get '`${store_name}`' cursor. ", e.target.error.message), a(e.target.error.message) } } ) }, getCachedProperty: function(e, t) { var r = this.instance().db().transaction(["cached_properties"], "readonly").objectStore("cached_properties"); return n.a.on_request_end(r.get(e)).then(function(e) { var r = e.target.result; return r ? r.value : t }).catch(function(e) { throw console.error(e), e }) }, setCachedProperty: function(e, t) { var r = this.instance().db().transaction(["cached_properties"], "readwrite").objectStore("cached_properties"); return t && t.toJS && (t = t.toJS()), n.a.on_request_end(r.put({ name: e, value: t })).catch(function(e) { throw console.error(e), e }) }, backup: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : l , t = [] , r = !0 , a = !1 , n = void 0; try { for (var i, o = e[Symbol.iterator](); !(r = (i = o.next()).done); r = !0) { var s = i.value; t.push(this.load_data(s)) } } catch (e) { a = !0, n = e } finally { try { !r && o.return && o.return() } finally { if (a) throw n } } return Promise.all(t).then(function(t) { for (var r = {}, a = 0; a < e.length; a++) { var n = e[a]; if ("wallet" === n) { var i = t[a] , o = !0 , s = !1 , l = void 0; try { for (var c, u = i[Symbol.iterator](); !(o = (c = u.next()).done); o = !0) { c.value.backup_date = (new Date).toISOString() } } catch (e) { s = !0, l = e } finally { try { !o && u.return && u.return() } finally { if (s) throw l } } } r[n] = t[a] } return r }) }, restore: function(e, t) { var r = u(e); return d(r).then(function(e) { var r = Object.keys(t) , a = e.transaction(r, "readwrite") , i = !0 , o = !1 , s = void 0; try { for (var l, c = r[Symbol.iterator](); !(i = (l = c.next()).done); i = !0) { var u = l.value , d = a.objectStore(u) , p = t[u] , h = !0 , m = !1 , f = void 0; try { for (var g, _ = p[Symbol.iterator](); !(h = (g = _.next()).done); h = !0) { var b = g.value; d.put(b) } } catch (e) { m = !0, f = e } finally { try { !h && _.return && _.return() } finally { if (m) throw f } } } } catch (e) { o = !0, s = e } finally { try { !i && c.return && c.return() } finally { if (o) throw s } } return n.a.on_transaction_end(a) }) } } }(); t.a = p } , , , , , function(e, t, r) { "use strict"; var a = "undefined" == typeof localStorage ? null : localStorage; r.d(t, "c", function() { return p }), r.d(t, "b", function() { return h }); var n = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function i(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function o(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } function s(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } var l = function() { function e(t) { s(this, e), this._storage_prefix = t } return n(e, [{ key: "_translateKey", value: function(e) { return this._storage_prefix + e } }, { key: "get", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; try { if (this.has(e)) { e = this._translateKey(e); var r = this._get(e); return void 0 === r || null === r ? t : r } return t } catch (e) { return t } } }, { key: "_get", value: function(e) { throw Error("Needs implementation") } }, { key: "set", value: function(e, t) { this._set(this._translateKey(e), t) } }, { key: "_set", value: function(e) { throw Error("Needs implementation") } }, { key: "remove", value: function(e) { this._remove(this._translateKey(e)) } }, { key: "has", value: function(e) { return this._has(this._translateKey(e)) } }, { key: "_remove", value: function(e) { throw Error("Needs implementation") } }, { key: "_has", value: function(e) { throw Error("Needs implementation") } }]), e }() , c = function(e) { function t() { return s(this, t), i(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return o(t, l), n(t, [{ key: "_get", value: function(e) { var t = a.getItem(e); return "" === t ? t : JSON.parse(t) } }, { key: "_set", value: function(e, t) { "" === t ? a.setItem(e, t) : a.setItem(e, JSON.stringify(t)) } }, { key: "_remove", value: function(e) { a.removeItem(e) } }, { key: "_has", value: function(e) { return function(e, t) { return e in t }(e, a) } }, { key: "_getLocalStorage", value: function() { return a } }]), t }() , u = function(e) { function t(e) { s(this, t); var r = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r._dict = {}, r } return o(t, l), n(t, [{ key: "_get", value: function(e) { return this._dict.get(e) } }, { key: "_set", value: function(e, t) { this._dict[e] = JSON.stringify(t) } }, { key: "_remove", value: function(e) { delete this._dict[e] } }, { key: "_has", value: function(e) { return e in this._dict } }]), t }() , d = null , p = function(e) { if ("inram" !== e && "persistant" !== e) throw "Please choose inram or persistant storage type"; d = e } , h = function() { return null == d || "persistant" == d } , m = function(e) { function t(e) { s(this, t); var r = i(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return null === a ? r.useInRam() : r.usePersistant(), r } return o(t, l), n(t, [{ key: "isPersistant", value: function() { return this._impl instanceof c } }, { key: "_switchIfNecessary", value: function() { null != d && ("inram" == d ? this.useInRam() : this.usePersistant()) } }, { key: "_get", value: function(e) { return this._switchIfNecessary(), this._impl._get(e) } }, { key: "_set", value: function(e, t) { this._switchIfNecessary(), this._impl._set(e, t) } }, { key: "_remove", value: function(e) { this._switchIfNecessary(), this._impl._remove(e) } }, { key: "_has", value: function(e) { return this._switchIfNecessary(), this._impl._has(e) } }, { key: "useInRam", value: function() { var e = {}; if (this.isPersistant()) { console.log("Switching to InRam storage for private session"); for (var t = 0, r = this._impl._getLocalStorage().length; t < r; ++t) { var a = this._impl._getLocalStorage().key(t); e[a] = this._impl._getLocalStorage().getItem(a) } } for (var n in this._impl = new u(this._storage_prefix), e) this._impl._set(n, e[n]) } }, { key: "usePersistant", value: function() { this._impl = new c(this._storage_prefix) } }]), t }() , f = {}; t.a = function(e) { return e in f || (f[e] = new m(e)), f[e] } } , , , , , , , , , function(e, t, r) { "use strict"; var a = r(19) , n = r(44) , i = r(261) , o = r(233) , s = r(5) , l = r(14) , c = r(30) , u = r(26) , d = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var p = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return d(e, [{ key: "restore", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "default" , t = arguments[1]; return { wallet_name: e = e.toLowerCase(), wallet_object: t } } }, { key: "setWallet", value: function(e, t, r) { return n.a.lock(), e || (e = "default"), function(a) { return new Promise(function(n) { a({ wallet_name: e, create_wallet_password: t, brnkey: r, resolve: n }) } ) } } }, { key: "setBackupDate", value: function() { return i.a.set("backup_recommended", !1), !0 } }, { key: "setBrainkeyBackupDate", value: function() { return !0 } }, { key: "deleteWallet", value: function(e) { return e } }, { key: "createAccountWithPassword", value: function(e, t, r, n, i, s) { var l = a.a.generateKeyFromPassword(e, "owner", t).privKey , c = a.a.generateKeyFromPassword(e, "active", t).privKey , d = a.a.generateKeyFromPassword(e, "memo", t).privKey; return console.log("create account:", e), console.log("new active pubkey", c.toPublicKey().toPublicKeyString()), console.log("new owner pubkey", l.toPublicKey().toPublicKeyString()), console.log("new memo pubkey", d.toPublicKey().toPublicKeyString()), new Promise(function(t, a) { if (r) return o.a.create_account(l.toPublicKey().toPublicKeyString(), c.toPublicKey().toPublicKeyString(), d.toPublicKey().toPublicKeyString(), e, r, n, i, !0).then(t).catch(a); var p = u.a.getSetting("faucet_address"); return window && window.location && "https:" === window.location.protocol && (p = p.replace(/http:\/\//, "https://")), fetch(p + "/api/v1/accounts", { method: "post", mode: "cors", headers: { Accept: "application/json", "Content-type": "application/json" }, body: JSON.stringify({ account: { name: e, owner_key: l.toPublicKey().toPublicKeyString(), active_key: c.toPublicKey().toPublicKeyString(), memo_key: d.toPublicKey().toPublicKeyString(), refcode: s, referrer: n } }) }).then(function(e) { return e.json().then(function(e) { !e || e && e.error ? a(e.error) : t(e) }) }).catch(a).then(function(e) { e && e.error ? a(e.error) : t(e) }).catch(function(e) { a(e) }) } ) } }, { key: "createAccount", value: function(e, t, r, n, i) { if (a.a.isLocked()) { return Promise.reject("wallet locked") } var s = a.a.generateNextKey() , l = a.a.generateNextKey() , c = a.a.generateNextKey() , d = function() { var e = a.a.transaction_update_keys(); return a.a.saveKeys([s, l, c], e).catch(function() { return e.abort() }) }; if (t) return o.a.create_account(s.private_key.toPublicKey().toPublicKeyString(), l.private_key.toPublicKey().toPublicKeyString(), c.private_key.toPublicKey().toPublicKeyString(), e, t, r, n, !0).then(function() { return d() }); var p = u.a.getSetting("faucet_address"); return window && window.location && "https:" === window.location.protocol && (p = p.replace(/http:\/\//, "https://")), fetch(p + "/api/v1/accounts", { method: "post", mode: "cors", headers: { Accept: "application/json", "Content-type": "application/json" }, body: JSON.stringify({ account: { name: e, owner_key: s.private_key.toPublicKey().toPublicKeyString(), active_key: l.private_key.toPublicKey().toPublicKeyString(), memo_key: l.private_key.toPublicKey().toPublicKeyString(), refcode: i, referrer: r } }) }).then(function(e) { return e.json() }).then(function(e) { if (e.error) throw e.error; return d() }).catch(function(e) { throw a.a.decrementBrainKeySequence(), a.a.decrementBrainKeySequence(), a.a.decrementBrainKeySequence(), e }) } }, { key: "claimVestingBalance", value: function(e, t) { var r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] , n = new s.TransactionBuilder , i = t.balance.amount , o = t.policy[1].coin_seconds_earned , l = t.policy[1].vesting_seconds , c = 0 === (r || l) ? 1 : o / (l * i); return n.add_type_operation("vesting_balance_withdraw", { fee: { amount: "0", asset_id: "1.3.0" }, owner: e, vesting_balance: t.id, amount: { amount: Math.floor(i * c), asset_id: t.balance.asset_id } }), a.a.process_transaction(n, null, !0).then(function(e) {}).catch(function(e) { console.log("vesting_balance_withdraw err:", e) }) } }, { key: "importBalance", value: function(e, t, r) { return function(i) { return new Promise(function(o, c) { l.Apis.instance().db_api(); var u = Object(s.FetchChain)("getAccount", e) , d = n.a.unlock(); o(Promise.all([d, u]).then(function(n) { var o = n[1]; if (void 0 == o) return Promise.reject("Unknown account " + e); var l = [] , c = {} , u = !0 , d = !1 , p = void 0; try { for (var h, m = t[Symbol.iterator](); !(u = (h = m.next()).done); u = !0) { var f = h.value , g = f.vested_balance , _ = f.public_key_string , b = void 0; if (g) { if (0 == g.amount) continue; b = g.amount } else b = f.balance.amount; if (g && g.asset_id != f.balance.asset_id) throw new Error("Vested balance record and balance record asset_id missmatch",g.asset_id,f.balance.asset_id); c[_] = !0, l.push({ fee: { amount: "0", asset_id: "1.3.0" }, deposit_to_account: o.get("id"), balance_to_claim: f.id, balance_owner_key: _, total_claimed: { amount: b, asset_id: f.balance.asset_id } }) } } catch (e) { d = !0, p = e } finally { try { !u && m.return && m.return() } finally { if (d) throw p } } var y = new s.TransactionBuilder , v = !0 , w = !1 , k = void 0; try { for (var x, S = l[Symbol.iterator](); !(v = (x = S.next()).done); v = !0) { var A = x.value; y.add_type_operation("balance_claim", A) } } catch (e) { w = !0, k = e } finally { try { !v && S.return && S.return() } finally { if (w) throw k } } return y.set_expire_seconds(900 + l.length), a.a.process_transaction(y, Object.keys(c), r).then(function(e) { return i(!0), e }) }).catch(function() {})) } ) } } }]), e }(); t.a = c.a.createActions(p) } , , , function(e, t, r) { "use strict"; var a = r(15) , n = r(5) , i = r(37) , o = n.ChainTypes.object_type , s = Object.keys(o) , l = 3e4 , c = {} , u = { order_type: function(e) { if ("string" != typeof e) return !1; var t = e.split(".")[1]; return s[t] }, isAsk: function(e, t) { var r = t.toJS ? t.get("id") : t.id; return e.sell_price ? e.sell_price.quote.asset_id === r : e.call_price ? e.call_price.quote.asset_id === r : void 0 }, isAskOp: function(e) { return e.amount_to_sell.asset_id !== e.fee.asset_id }, limitByPrecision: function(e, t) { var r = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2] , n = t.toJS ? t.get("precision") : t.precision , i = e.toString().split("."); if (1 === i.length || 2 === i.length && i[1].length <= n) return e; var o = a.a.get_asset_precision(n); return e = r ? Math.floor(e * o) / o : Math.round(e * o) / o, isNaN(e) || !isFinite(e) ? 0 : e }, getFeedPrice: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] , r = n.ChainStore.getAsset(e.getIn(["quote", "asset_id"])) , i = n.ChainStore.getAsset(e.getIn(["base", "asset_id"])) , o = a.a.get_asset_price(e.getIn(["quote", "amount"]), r, e.getIn(["base", "amount"]), i); return t ? 1 / o : o }, getFinalPrice: function(e, t, r, a) { var n = arguments.length > 4 && void 0 !== arguments[4] && arguments[4] , i = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; if (r.get("id") === t.get("id")) return 1; var o = this.getMarketName(r, e).marketName , s = this.getMarketName(t, e).marketName , u = this.getMarketName(t, r).marketName; if (c[u] && !i) return n ? c[u].toReal(r.get("id") !== c[u].base.asset_id) : c[u]; var d = a.get(u); if (d && d.price && 0 !== d.volumeBase) return n ? d.price.toReal(r.get("id") !== d.price.base.asset_id) : d.price; var p = void 0 , h = void 0 , m = a.get(s); if (m && m.price) { if (0 === m.volumeBase && 0 === m.volumeQuote) return null; h = m.price.clone() } var f = a.get(o); f && f.price && (p = f.price.clone()); var g = void 0; if (p && h) { if (0 == h.base.amount || 0 == p.base.amount) return null; g = p.times(h) } else p ? g = p : h && (g = h); if (!g) return null; var _ = [g.base.asset_id, g.quote.asset_id]; return -1 === _.indexOf(r.get("id")) || -1 === _.indexOf(t.get("id")) ? null : (c[u] = g, function(e) { setTimeout(function() { delete c[e] }, l) }(), n ? g.toReal(r.get("id") !== g.base.asset_id) : g) }, convertValue: function(e, t, r, a, n) { var o = !(arguments.length > 5 && void 0 !== arguments[5]) || arguments[5] , s = o ? new i.a({ amount: e, asset_id: r.get("id"), precision: r.get("precision") }) : new i.a({ real: e, asset_id: r.get("id"), precision: r.get("precision") }) , l = this.getFinalPrice(n, r, t, a, !1); return 1 === l ? s.getAmount({ real: !o }) : l && l.toReal ? s.times(l).getAmount({ real: !o }) : null }, parseOrder: function(e, t, r) { var n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3] , i = this.isAsk(e, t) , o = a.a.get_asset_precision(r.toJS ? r.get("precision") : r.precision) , s = a.a.get_asset_precision(t.toJS ? t.get("precision") : t.precision) , l = (e.call_price ? r.toJS ? r.get("precision") : r.precision : t.toJS ? t.get("precision") : t.precision, void 0) , c = void 0 , u = void 0; if (e.sell_price) l = i ? e.sell_price.base : e.sell_price.quote, c = i ? e.sell_price.quote : e.sell_price.base; else if (e.call_price) { l = e.call_price.base, c = e.call_price.quote; var d = l.amount / s / (c.amount / o); u = n ? 1 / d : d } "number" != typeof c.amount && (c.amount = parseInt(c.amount, 10)), "number" != typeof l.amount && (l.amount = parseInt(l.amount, 10)); var p = u || c.amount / s / (l.amount / o) , h = a.a.price_to_text(p, e.call_price ? t : r, e.call_price ? r : t) , m = void 0 , f = void 0; return e.debt ? n ? (f = e.debt / o, m = this.limitByPrecision(f / h.full, t)) : (m = this.limitByPrecision(e.debt / o, r), f = h.full * m) : i ? (m = this.limitByPrecision(e.for_sale / o, r), f = h.full * m) : (m = this.limitByPrecision(l.amount / c.amount * e.for_sale / o, r), f = e.for_sale / s), f = this.limitByPrecision(f, t), !i && e.for_sale && (f = this.limitByPrecision(h.full * m, t)), { value: f, price: h, amount: m } }, split_price: function(e, t) { var r = a.a.format_number(e, Math.max(5, t)).split("."); return { int: r[0], dec: r[1] } }, flatten_orderbookchart_highcharts: function(e, t, r, a) { var n = [] , i = void 0; if (r = void 0 !== r && r) { if (e && e.length) if (i = e.length - 1, n.unshift([e[i][0], e[i][1]]), e.length > 1) for (var o = e.length - 2; o >= 0; o--) t && (e[o][1] += e[o + 1][1]), n.unshift([e[o][0], e[o][1]]); else n.unshift([0, e[i][1]]) } else if (e && e.length) if (n.push([e[0][0], e[0][1]]), e.length > 1) for (var s = 1; s < e.length; s++) t && (e[s][1] += e[s - 1][1]), n.push([e[s][0], e[s][1]]); else n.push([1.5 * e[0][0], e[0][1]]); return n }, priceToObject: function(e, t) { var r = 1 , a = 0 , n = 0 , i = 1 , o = e; do { var s = Math.floor(o) , l = r; r = s * r + a, a = l, l = n, n = s * n + i, i = l, o = 1 / (o - s) } while (Math.abs(e - r / n) > 1e-8 * e);if ("ask" === t) return { base: r, quote: n }; if ("bid" === t) return { quote: r, base: n }; throw "Unknown type" }, isMarketAsset: function(e, t) { var r = !1 , a = void 0 , n = !1; return e.get("bitasset") && t.get("id") === e.getIn(["bitasset", "options", "short_backing_asset"]) ? (r = !0, a = { id: e.get("id") }) : t.get("bitasset") && e.get("id") === t.getIn(["bitasset", "options", "short_backing_asset"]) && (n = !0, r = !0, a = { id: t.get("id") }), { isMarketAsset: r, marketAsset: a, inverted: n } }, getMarketName: function(e, t) { if (!e || !t) return { marketName: "_" }; var r = parseInt(e.get("id").split(".")[2], 10) , a = parseInt(t.get("id").split(".")[2], 10) , n = a > r ? t : e , i = a > r ? e : t; return { baseID: r, quoteID: a, marketName: n.get("symbol") + "_" + i.get("symbol"), first: n, second: i } } }; t.a = u } , , function(e, t, r) { "use strict"; (function(e) { r.d(t, "a", function() { return d }), r.d(t, "d", function() { return p }), r.d(t, "b", function() { return h }); var a = r(30) , n = r(50) , i = r(565) , o = r(5) , s = r(64) , l = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var c = function() { function t() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t) } return l(t, [{ key: "incommingWebFile", value: function(t) { return function(r) { var a = new FileReader; a.onload = function(a) { var n = new e(a.target.result,"binary") , i = t.name , o = new Date(t.lastModified).toString(); r({ name: i, contents: n, last_modified: o }) } , a.readAsBinaryString(t) } } }, { key: "incommingBuffer", value: function(e) { return e } }, { key: "reset", value: function() { return !0 } }]), t }() , u = a.a.createActions(c); function d(t) { return new Promise(function(r) { r(n.a.backup().then(function(r) { return function(t, r, a, n) { return new Promise(function(s) { var l = o.PublicKey.fromPublicKeyString(t) , c = o.key.get_random_key(n) , u = JSON.stringify(r, null, 0); Object(i.compress)(u, a, function(t) { var r = o.Aes.encrypt_with_checksum(c, l, null, t) , a = c.toPublicKey() , n = e.concat([a.toBuffer(), r]); s(n) }) } ) }(t, r, 1) })) } ) } function p(e, t, r) { return new Promise(function(a) { a(h(e, t).then(function(e) { return s.a.restore(r, e) })) } ) } function h(t, r) { return new Promise(function(a, n) { e.isBuffer(r) || (r = new e(r,"binary")); var s = o.PrivateKey.fromWif(t) , l = void 0; try { l = o.PublicKey.fromBuffer(r.slice(0, 33)) } catch (e) { throw console.error(e, e.stack), new Error("Invalid backup file") } r = r.slice(33); try { r = o.Aes.decrypt_with_checksum(s, l, null, r) } catch (e) { return console.error("Error decrypting wallet", e, e.stack), void n("invalid_decryption_key") } try { Object(i.decompress)(r, function(e) { try { var t = JSON.parse(e); a(t) } catch (t) { e || (e = ""), console.error("Error parsing wallet json", e.substring(0, 10) + "..."), n("Error parsing wallet json") } }) } catch (e) { return console.error("Error decompressing wallet", e, e.stack), void n("Error decompressing wallet") } } ) } t.c = u } ).call(this, r(126).Buffer) } , , , , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(164) , i = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]) } return e } , o = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var s = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e), this.bindActions(n.a), this.state = this.getInitialState(), this.exportPublicMethods({ reset: this.reset.bind(this) }) } return o(e, [{ key: "getInitialState", value: function() { return { transaction: null, error: null, broadcasting: !1, broadcast: !1, included: !1, trx_id: null, trx_block_num: null, closed: !0, broadcasted_transaction: null, propose: !1, fee_paying_account: null } } }, { key: "onConfirm", value: function(e) { var t = e.transaction , r = e.resolve , a = e.reject , n = this.getInitialState() , o = i({}, n, { transaction: t, closed: !1, broadcasted_transaction: null, resolve: r, reject: a }); this.setState(o) } }, { key: "onClose", value: function() { this.setState({ closed: !0 }) } }, { key: "onBroadcast", value: function(e) { this.setState(e), e.broadcasted_transaction && this.setState({ broadcasted_transaction: this.state.transaction }) } }, { key: "onWasBroadcast", value: function(e) { this.setState({ broadcasting: !1, broadcast: !0 }) } }, { key: "onWasIncluded", value: function(e) { this.setState({ error: null, broadcasting: !1, broadcast: !0, included: !0, trx_id: e[0].id, trx_block_num: e[0].block_num, broadcasted_transaction: this.state.transaction }) } }, { key: "onError", value: function(e) { var t = e.error; this.setState({ broadcast: !1, broadcasting: !1, error: t }) } }, { key: "onTogglePropose", value: function() { this.setState({ propose: !this.state.propose }) } }, { key: "onProposeFeePayingAccount", value: function(e) { this.setState({ fee_paying_account: e }) } }, { key: "reset", value: function() { this.state = this.getInitialState() } }]), e }(); t.a = a.a.createStore(s, "TransactionConfirmStore") } , , , function(e, t, r) { "use strict"; r.d(t, "a", function() { return i }), r.d(t, "c", function() { return o }), r.d(t, "d", function() { return s }); var a = r(49) , n = r(42) , i = { OPEN: { id: "OPEN", name: "OPENLEDGER", baseAPI: a.g, isEnabled: Object(n.a)("OPEN"), selected: !1, options: { enabled: !1, selected: !1 } }, RUDEX: { id: "RUDEX", name: "RUDEX", baseAPI: a.h, isEnabled: Object(n.a)("RUDEX"), isSimple: !0, selected: !1, simpleAssetGateway: !0, fixedMemo: { prepend: "dex:", append: "" }, addressValidatorMethod: "POST", options: { enabled: !1, selected: !1 } }, SPARKDEX: { id: "SPARKDEX", name: "SPARKDEX", baseAPI: a.a, isEnabled: Object(n.a)("SPARKDEX"), selected: !1, options: { enabled: !1, selected: !1 } }, BRIDGE: { id: "BRIDGE", name: "CRYPTO-BRIDGE", baseAPI: a.d, isEnabled: Object(n.a)("BRIDGE"), selected: !1, singleWallet: !0, addressValidatorAsset: !0, useFullAssetName: !0, intermediateAccount: "cryptobridge", options: { enabled: !1, selected: !1 } }, GDEX: { id: "GDEX", name: "GDEX", baseAPI: a.e, isEnabled: Object(n.a)("GDEX"), options: { enabled: !1, selected: !1 } }, XBTSX: { id: "XBTSX", name: "XBTSX", baseAPI: a.j, isEnabled: Object(n.a)("XBTSX"), isSimple: !0, selected: !1, simpleAssetGateway: !1, addressValidatorMethod: "POST", options: { enabled: !1, selected: !1 } }, CITADEL: { id: "CITADEL", name: "CITADEL", baseAPI: a.c, isEnabled: Object(n.a)("CITADEL"), selected: !1, assetWithdrawlAlias: { monero: "xmr" }, options: { enabled: !1, selected: !1 } } } , o = Object.keys(i); function s(e) { return o.reduce(function(t, r) { return e.forEach(function(e) { t.push(r + "." + e) }), t }, []) } t.b = i } , , function(e, t, r) { "use strict"; var a = r(5) , n = r(15) , i = r(4) , o = r.n(i) , s = r(152) , l = ["polonie-wallet", "1.2.27842", "polonie-xwallet", "1.2.27850", "poloniewallet", "1.2.20873", "poloniex-deposit", "1.2.25426", "poloniex-wallet", "1.2.20821", "poloniexwall-et", "1.2.28079", "poloniexwallett", "1.2.28188", "poloniexwall-t", "1.2.28072", "poloniexwalle", "1.2.20580", "poloniex", "1.2.2340", "poloneix", "1.2.24900"] , c = ["bittrex-deopsit", "1.2.34361", "bittrex-deposi", "1.2.23638", "bittrex-depositt", "1.2.23640", "bittrex-dposit", "1.2.32594", "bittrex", "1.2.2343", "bittrex-deposits", "1.2.161093"] , u = ["aacoin", "1.2.1005892", "abucoins", "1.2.463335", "acinq", "1.2.878058", "aex-bitcny-deposit", "1.2.455052", "aex-bts-deposit-walle", "1.2.454205", "aex-cnc-cza", "1.2.878029", "aex88", "1.2.831039", "aexdepositbm", "1.2.1031653", "aida", "1.2.539184", "aidosmarket", "1.2.787065", "allah-iraq", "1.2.979541", "aliant", "1.2.878061", "alta", "1.2.878079", "altcointrader", "1.2.787049", "antpool", "1.2.524132", "aporoo", "1.2.1018792", "apus", "1.2.999997", "arcbit", "1.2.465096", "archive", "1.2.786888", "armory", "1.2.465097", "ate-io-bts", "1.2.730842", "atoken", "1.2.599845", "azex", "1.2.986608", "b2bx", "1.2.897119", "bancor.network", "1.2.781941", "barterdex", "1.2.787093", "baseline", "1.2.599803", "bbex", "1.2.484215", "bbts001", "1.2.815730", "bc1q", "1.2.791043", "bcoin", "1.2.1029906", "bcos", "1.2.446259", "beechat", "1.2.599849", "bepal", "1.2.605394", "bft-dpos", "1.2.1026134", "bgogo", "1.2.1007568", "bhex", "1.2.1030020", "bibox.com", "1.2.621440", "bigbag", "1.2.789783", "bigether", "1.2.694013", "bigether.vip", "1.2.694015", "bilaxy", "1.2.1023782", "binance-btc-1", "1.2.467525", "binance-bts-i", "1.2.467527", "binance-bts-l", "1.2.467526", "binancecleos", "1.2.1017616", "bishengtopex", "1.2.1029188", "bisq", "1.2.787078", "bisq.network", "1.2.787079", "bitarg", "1.2.878042", "bitasiaex", "1.2.878018", "bitbill", "1.2.524063", "bitbill.app", "1.2.1000037", "bitbns", "1.2.782094", "bitcoinindonesi", "1.2.609628", "bitcoinindonesia", "1.2.35250", "bitcointrade", "1.2.781957", "bitfinexdep1", "1.2.1019320", "bitflip", "1.2.787068", "bitflyer.com", "1.2.901469", "bithd", "1.2.745701", "bitholic", "1.2.787035", "bitinka", "1.2.781928", "bitkk", "1.2.878012", "bitkkchubei00", "1.2.815733", "bitkkchubei001", "1.2.815732", "bitkkchubei02", "1.2.815734", "bitkonan", "1.2.787113", "bitkop", "1.2.962262", "bitmaszyna", "1.2.787101", "bitoex", "1.2.599690", "bitonic", "1.2.781953", "bitopro", "1.2.885538", "bitpaction", "1.2.878571", "bitpal", "1.2.599671", "bitpesa", "1.2.742633", "bitpie", "1.2.465092", "bitrefill", "1.2.878076", "bits.farm", "1.2.749087", "bitsblockchain", "1.2.781926", "bitsfarm", "1.2.749090", "bitshares-app", "1.2.1000006", "bitshares.app", "1.2.1000008", "bitspark-hold", "1.2.1032019", "bitun", "1.2.782084", "bitupro", "1.2.878037", "bitvip.com", "1.2.599832", "bjex", "1.2.540676", "bkex", "1.2.988882", "blind", "1.2.745696", "blind-transfer", "1.2.745698", "blocktrade", "1.2.161090", "bloex", "1.2.1030028", "blox", "1.2.940022", "bonus-event-in-end-of-years-2018", "1.2.1208797", "bsend001", "1.2.815731", "btc-alpha.com", "1.2.781944", "btc.eos", "1.2.659986", "btc38.com", "1.2.92089", "btcalph", "1.2.878023", "btcmarkets.net", "1.2.781936", "btcxindia", "1.2.782095", "btex", "1.2.1026071", "bts.app", "1.2.1000010", "bts.eos", "1.2.659985", "btsalpha", "1.2.878025", "btsid", "1.2.599680", "btsmoney", "1.2.32810", "burstnation", "1.2.787122", "buyucoin", "1.2.812978", "buyucoin-walle", "1.2.812979", "c-patex", "1.2.787114", "cashaddr", "1.2.791045", "cashierest", "1.2.878112", "cetus", "1.2.1000009", "cex.com", "1.2.599797", "chaince", "1.2.939977", "chaince.com", "1.2.939982", "chainceoneos", "1.2.1020153", "changelly", "1.2.599892", "changenow", "1.2.620292", "chaoex.com", "1.2.599812", "citcon", "1.2.878074", "cobo", "1.2.742630", "cobowalletcn", "1.2.1026084", "cobowalletio", "1.2.1026083", "cohescure", "1.2.705164", "coin.space", "1.2.599877", "coin2co", "1.2.1026070", "coin900", "1.2.557720", "coin900.com", "1.2.620298", "coinbase", "1.2.709", "coinbase.com", "1.2.92130", "coinbe", "1.2.787120", "coinbell", "1.2.782088", "coinbene", "1.2.465091", "coinbig", "1.2.707653", "coinbig.com", "1.2.707655", "coincode", "1.2.599683", "coincoming", "1.2.620294", "coineal", "1.2.999276", "coinegg.main", "1.2.447093", "coinex", "1.2.467667", "coinex.com", "1.2.553120", "coinexchange", "1.2.463328", "coinexmarket", "1.2.897140", "coinfloorex", "1.2.812983", "coingeto", "1.2.878077", "coinhouse", "1.2.787106", "coinhub", "1.2.897122", "coinlink", "1.2.787076", "coinmate", "1.2.463339", "coinoah", "1.2.940511", "coinoah.com", "1.2.940514", "coinpark", "1.2.999275", "coinrail", "1.2.781937", "coinsave", "1.2.999292", "coinstocks", "1.2.745645", "cointiger-deposit-bts", "1.2.1029192", "cointiger-deposit-bts0", "1.2.1029193", "cointiger-deposit-bts1", "1.2.1029194", "cointobe", "1.2.599669", "cointome", "1.2.693998", "cointopay", "1.2.742639", "coinut", "1.2.463336", "coinut.com", "1.2.781955", "coinw", "1.2.462799", "coinw.com", "1.2.599798", "coinyee", "1.2.878013", "coldlar", "1.2.465101", "committee", "1.2.599999", "committee-101", "1.2.999719", "committee-102", "1.2.999727", "committee-103", "1.2.999720", "committee-104", "1.2.999724", "committee-105", "1.2.999722", "committee-106", "1.2.999721", "committee-107", "1.2.999723", "committee-108", "1.2.999725", "committee-109", "1.2.999728", "committee-110", "1.2.999726", "committee-accou", "1.2.999694", "committee-accoun", "1.2.807841", "committee-accounr", "1.2.500266", "committee-cnytrade", "1.2.999697", "committee-usdoperato", "1.2.999696", "committe-security", "1.2.1273199", "contractland", "1.2.878062", "counterwallet", "1.2.787112", "crux", "1.2.999998", "cryptobridg", "1.2.614370", "cryptobridge-payout", "1.2.745721", "cryptoderivatives", "1.2.787129", "cryptoderivatives.market", "1.2.787130", "cryptomkt", "1.2.787095", "cryptomkt.com", "1.2.787094", "crypton", "1.2.1026067", "cryptonize", "1.2.999284", "crypviser", "1.2.1026359", "ctpmall", "1.2.599726", "cx-bitcny-deposit-wallet", "1.2.827934", "cx-bitcny-withdraw-wallet", "1.2.827938", "cx-bts-deposit-wallet", "1.2.827946", "cx-bts-withdraw-wallet", "1.2.827943", "daex", "1.2.792704", "dax-deposit", "1.2.970985", "dax-exchange", "1.2.970987", "dax-mn", "1.2.970989", "dax-withdraw", "1.2.970993", "ddex", "1.2.599757", "decred", "1.2.742642", "dewone", "1.2.749261", "dex.top", "1.2.962058", "dexko", "1.2.694029", "dgtmarket", "1.2.787107", "diceex", "1.2.999511", "diceex-bit", "1.2.999518", "diceex-bitcn", "1.2.999513", "diceex-bitusd", "1.2.999517", "diceex-btc", "1.2.999514", "diceex-cny", "1.2.999516", "dig-exchange", "1.2.795378", "digifinex", "1.2.878066", "digitaex", "1.2.693969", "door.one", "1.2.620671", "dragonex", "1.2.599785", "eclair", "1.2.878057", "ecoex-bts-1", "1.2.990386", "eidoo", "1.2.782093", "eip-20", "1.2.658953", "eip20", "1.2.658949", "electrum", "1.2.465095", "eligma", "1.2.878056", "entapay", "1.2.787075", "enumivo", "1.2.898598", "eos.btc", "1.2.659984", "eos.bts", "1.2.659983", "eosdac", "1.2.878054", "eosfinix", "1.2.742627", "erc-20", "1.2.611002", "erc-721", "1.2.611005", "erc721", "1.2.611000", "etherflyer", "1.2.749253", "etherflyer.com", "1.2.749255", "ethfinex", "1.2.781930", "ewex", "1.2.999306", "excambriorex", "1.2.787124", "exnow", "1.2.1006068", "expie", "1.2.658199", "expie.com", "1.2.658200", "exvo", "1.2.878032", "exx.com", "1.2.599826", "exxbtc001", "1.2.815746", "exxbts00", "1.2.815718", "exxbts01", "1.2.815719", "exxsend00", "1.2.815720", "exxsend01", "1.2.815723", "ezbtc", "1.2.787057", "fargobase", "1.2.463337", "fhex", "1.2.1030027", "firefoxotc", "1.2.812985", "forkdelta", "1.2.766759", "freiexchange", "1.2.787118", "gate-io-b", "1.2.743303", "gate-io-bt", "1.2.730841", "gate-io-btc", "1.2.730836", "gateio", "1.2.797076", "gateiowallet", "1.2.1020027", "gcox", "1.2.789782", "gdexioforeos", "1.2.1031969", "geos", "1.2.940146", "geta-io-bts", "1.2.730843", "geth", "1.2.599793", "ggex", "1.2.999285", "glidera", "1.2.878068", "greenaddress", "1.2.599879", "greenbits", "1.2.599875", "grus", "1.2.999999", "guldentrader", "1.2.787126", "hackers", "1.2.21846", "hadax", "1.2.705160", "hadax.com", "1.2.705162", "hbus", "1.2.1026050", "hcoin", "1.2.1018787", "heatwallet", "1.2.787111", "heatwallet.com", "1.2.787109", "heztanrqgene", "1.2.1020148", "hitbtc-exchang", "1.2.984724", "hitbtc.exchange", "1.2.984983", "hotbit", "1.2.643056", "huobi-bts-deposi", "1.2.852510", "huobi-deposi", "1.2.852506", "huobideposit", "1.2.1019310", "huobipro", "1.2.764427", "iceex-bitcny", "1.2.999519", "ico-china", "1.2.705561", "icoape", "1.2.706057", "icoape.com", "1.2.706060", "idax", "1.2.787045", "idax-deposi", "1.2.970984", "idax-exchang", "1.2.970986", "idax-nm", "1.2.970988", "idax-withdra", "1.2.970991", "idax.deposit", "1.2.970994", "idax.exchange", "1.2.970995", "idax.withdraw", "1.2.970997", "idex", "1.2.749252", "idex.market", "1.2.749251", "idle", "1.2.900001", "ifish", "1.2.800510", "independentreserve", "1.2.781950", "indodax", "1.2.878015", "indus", "1.2.1000007", "infinitycoin", "1.2.787092", "infinitycoin.exchange", "1.2.787091", "iquant", "1.2.787044", "issuer", "1.2.424070", "itbtc-exchange", "1.2.984791", "jaxx", "1.2.524055", "jrex", "1.2.1030022", "kairex", "1.2.878049", "kcash", "1.2.562936", "keepkey", "1.2.599863", "kkcoin", "1.2.519919", "kkcoin.wallet", "1.2.519960", "kkcoinwallet", "1.2.519959", "koineks.com", "1.2.781952", "koinim.com", "1.2.781958", "krakenkraken", "1.2.1020138", "kucoin", "1.2.463330", "kucoindoteos", "1.2.1084351", "lakebtc", "1.2.463326", "lakebtc.com", "1.2.781938", "latoken", "1.2.897147", "lbank.info", "1.2.621443", "leoxchange", "1.2.787121", "licai.deposit", "1.2.675961", "liteforex", "1.2.782098", "litepay", "1.2.742614", "liteshares", "1.2.899346", "livecoi-net", "1.2.183860", "livecoin.net", "1.2.322811", "livecoinnet", "1.2.322812", "llex", "1.2.999290", "locktrades", "1.2.161091", "loois", "1.2.999301", "loom", "1.2.897934", "ls123", "1.2.394942", "luckygame", "1.2.971018", "luckygames", "1.2.971013", "luckygames-i", "1.2.971014", "lupus", "1.2.1000005", "lykke.com", "1.2.787036", "lyra", "1.2.1000000", "mai1100", "1.2.158598", "mark.space", "1.2.897148", "meet-up", "1.2.999282", "meet.one", "1.2.782091", "meetup", "1.2.999280", "memo.cash", "1.2.878020", "mensa", "1.2.1000004", "mercadobitcoin", "1.2.781951", "metamask", "1.2.963272", "mexc", "1.2.924294", "mmex", "1.2.999287", "more.top", "1.2.782089", "morphtoken", "1.2.878065", "msigna", "1.2.465098", "mycelium", "1.2.599873", "mycrypto", "1.2.742624", "mydicewallet", "1.2.787099", "mydicewallet.com", "1.2.787096", "myetherwallet", "1.2.599843", "mywallet-1023", "1.2.999689", "n0stradumpus", "1.2.435299", "nanex", "1.2.897150", "negociecoins", "1.2.897142", "neraex", "1.2.463333", "neraex.pro", "1.2.781933", "nevbit", "1.2.463340", "new.one", "1.2.782090", "nicehash", "1.2.812986", "nix-e", "1.2.787123", "nocks", "1.2.787070", "oasisdex", "1.2.787061", "obit-wallet", "1.2.800539", "octaex", "1.2.897139", "ocx-bitcny-deposit-walle", "1.2.827932", "ocx-bitcny-withdraw-walle", "1.2.827937", "ocx-bts-deposit-walle", "1.2.827945", "ocx-bts-withdraw-walle", "1.2.827942", "oex.com", "1.2.694035", "ointiger-deposit-bts01", "1.2.1029195", "ojbk", "1.2.878030", "okbtothemoon", "1.2.1029923", "okcoinkr", "1.2.854387", "omicrex", "1.2.897131", "ommittee-account", "1.2.999695", "omniexplorer", "1.2.787128", "omniexplorer.info", "1.2.787127", "onchainfx", "1.2.742618", "onchainfx.com", "1.2.742621", "ooex", "1.2.1026069", "ooobtc", "1.2.897124", "openledger-support", "1.2.153124", "otcbtc", "1.2.599673", "otcbtcdotcom", "1.2.1020116", "otcbtcdotnet", "1.2.1028053", "otcwallet", "1.2.1029165", "otcx", "1.2.492286", "ourdax", "1.2.599817", "ovis", "1.2.897135", "p2pbucks", "1.2.766633", "palmpay", "1.2.745458", "paradex", "1.2.962048", "pavo", "1.2.1000001", "pay.bts.com", "1.2.92203", "pay.coinbase.com", "1.2.92185", "paymium", "1.2.787072", "pieotc", "1.2.878047", "pinocaitoken", "1.2.1026118", "pocketeos", "1.2.1026453", "poim", "1.2.475488", "pomelo", "1.2.965566", "protokenbank", "1.2.1026086", "pxn-eos", "1.2.1028325", "pxn-incom", "1.2.1026076", "pxn.eos", "1.2.1028326", "pxn.one", "1.2.999512", "pxneos", "1.2.1028324", "pxneos-income", "1.2.1028328", "pxneosincome", "1.2.1028322", "pxnincome", "1.2.1026079", "pyxis", "1.2.1000003", "qbao", "1.2.650495", "qcash", "1.2.473774", "qlink", "1.2.878073", "qtum-electrum", "1.2.761861", "quadrigacx", "1.2.463332", "rabobit", "1.2.782096", "radarrelay", "1.2.787081", "radarrelay.com", "1.2.787080", "ranswiser-wallet", "1.2.161364", "referrer", "1.2.745704", "renrenbit", "1.2.999291", "richcore", "1.2.688600", "richcore.com", "1.2.688621", "rippex", "1.2.787117", "ripple.com", "1.2.92097", "ripplechina.net", "1.2.787054", "ripplefox", "1.2.787038", "rootoken", "1.2.742632", "rrex", "1.2.999289", "rudexgateway", "1.2.1031975", "safewallet", "1.2.693983", "secp256k1", "1.2.539247", "sendy", "1.2.878072", "simex.global", "1.2.781934", "sistemkoin", "1.2.897127", "spectrocoin", "1.2.898120", "stealth", "1.2.745699", "stellarterm", "1.2.787039", "stellarterm.com", "1.2.787040", "stex", "1.2.749264", "stex.exchange", "1.2.749263", "stronghold", "1.2.781945", "superleague1", "1.2.1026458", "support-team", "1.2.1265329", "swft.pro", "1.2.940110", "swftc", "1.2.533080", "swftcoin", "1.2.533082", "tcalpha", "1.2.878024", "tcash", "1.2.749256", "tdax", "1.2.693995", "tdax.com", "1.2.693996", "tdex", "1.2.1002884", "therocktrading", "1.2.787052", "therocktrading.com", "1.2.787051", "thinkbit", "1.2.1007570", "tidebit", "1.2.787053", "token.store", "1.2.787056", "token360", "1.2.999298", "token365", "1.2.999295", "tokenlon", "1.2.878033", "tokenxx", "1.2.754276", "top.one", "1.2.599746", "topbtc", "1.2.463334", "topbtc.com", "1.2.781935", "toshi", "1.2.878046", "tradebytrade", "1.2.781947", "tradebytrade.com", "1.2.781946", "tradeogre", "1.2.787088", "tradesatoshi.com", "1.2.787041", "transwiser-walle", "1.2.161362", "transwiser-wallets", "1.2.161363", "truecoin", "1.2.800533", "trueusd", "1.2.791378", "trusty.fund", "1.2.878014", "tusd", "1.2.800535", "tuxexchange", "1.2.787103", "tuxexchange.com", "1.2.787102", "u-coin", "1.2.494585", "uckygames-io", "1.2.971015", "unblock", "1.2.878069", "uncoinex", "1.2.475307", "unicode", "1.2.800540", "uniex", "1.2.1007569", "uobi-bts-deposit", "1.2.852511", "uobi-deposit", "1.2.852508", "upbitwallets", "1.2.1020123", "usadae", "1.2.887944", "usadae.com", "1.2.887947", "usdc", "1.2.929449", "utxo", "1.2.878026", "uuex", "1.2.1026068", "uyucoin-wallet", "1.2.812980", "vebitcoin", "1.2.781940", "vela", "1.2.1000002", "virtacoinworld", "1.2.787131", "vuniyuoxoeub", "1.2.1026794", "vvbtc", "1.2.959755", "walletdunamu", "1.2.1020156", "wazirx", "1.2.742650", "wetez", "1.2.1026072", "winex.pro", "1.2.599675", "wirex", "1.2.599807", "www.binance.com", "1.2.553014", "www.coinex.com", "1.2.553121", "www.hadax.com", "1.2.705161", "www.usadae.com", "1.2.887949", "www.yyex.com", "1.2.731038", "www.zhaobi.com", "1.2.675956", "xbrick", "1.2.458197", "xbrick.btc", "1.2.459690", "xbrick.cny", "1.2.459688", "xbrick.usd", "1.2.459689", "xbtce", "1.2.463329", "xdaex", "1.2.1026062", "xdag", "1.2.999278", "xn-income", "1.2.1026077", "xxbts001", "1.2.815729", "xxsend001", "1.2.815727", "yex.com", "1.2.734592", "yhex", "1.2.1030023", "yobit-wall", "1.2.800538", "yobit-walle", "1.2.800536", "yobtc", "1.2.599688", "yun.bts", "1.2.161529", "yunbi.com", "1.2.92101", "yuxiao", "1.2.1031166", "yyex", "1.2.731035", "yyex.com", "1.2.731037", "z-201", "1.2.1025474", "zbbtc", "1.2.442315", "zbbtc001", "1.2.815745", "zbbts00", "1.2.815716", "zbbts01", "1.2.815717", "zbeoscharge1", "1.2.1019012", "zbsen", "1.2.745722", "zbsend00", "1.2.815712", "zbsend01", "1.2.815714", "zecoex", "1.2.990383", "zecoex-btc", "1.2.990385", "zecoex-bts", "1.2.990384", "zeniex", "1.2.681261", "zhaobi", "1.2.599681", "zhaobi.com", "1.2.675955", "zhex", "1.2.1030026", "zilla", "1.2.878051", "openledger-gex", "1.2.1540900", "enter", "1.2.12300", "hi", "1.2.707", "bts", "1.2.383", "eos-bounties", "1.2.1055529", "jobs001", "1.2.1147979", "noble-group", "1.2.997905", "my-change", "1.2.637403", "openledger-upgrade", "1.2.1544053", "cryptobridge-upgrade", "1.2.1570095", "aex-bts-deposite-wallet", "1.2.1586667", "gdex-security", "1.2.1568938", "escrow-pannf", "1.2.1586672", "openledger-security", "1.2.1547751", "openlegder-dex", "1.2.1566849", "committee-collateral", "1.2.1607515", "toolate1488", "1.2.486728", "beos-upgrade", "1.2.1600697", "cryptobridge-guarantee", "1.2.1602050", "construction-rates", "1.2.184377", "committee-update", "1.2.1600131", "committee-securuti", "1.2.1544160", "committee-seccurity", "1.2.1546307", "committee-proposalss", "1.2.1559233", "committee-account-update", "1.2.1589838", "committee-security-update", "1.2.1592605", "committee-accounr", "1.2.500266"] , d = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var p = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return d(e, null, [{ key: "checkFeePool", value: function(e, t) { if (e = e.toJS ? e : a.ChainStore.getAsset(e)) { var r = a.ChainStore.getObject(e.get("dynamic_asset_data_id")); if (r) return parseInt(r.get("fee_pool"), 10) >= t } } }, { key: "getPossibleFees", value: function(e, t) { var r = this , i = a.ChainStore.getAsset("1.3.0"); if (!(e = !e || e.toJS ? e : a.ChainStore.getAccount(e)) || !i) return { assets: ["1.3.0"], fees: { "1.3.0": 0 } }; var o = [] , l = {} , c = a.ChainStore.getObject("2.0.0") , u = Object(s.c)(t, null, c) , d = e.get("balances"); return d ? (d.forEach(function(e, t) { var s = a.ChainStore.getObject(e) , c = s ? parseInt(s.get("balance"), 10) : 0 , d = !1 , p = void 0; if ("1.3.0" === t && c >= u) d = !0; else if (c && a.ChainStore.getAsset(t)) { var h = a.ChainStore.getAsset(t) , m = n.a.convertPrice(i, h.getIn(["options", "core_exchange_rate"]).toJS(), null, h.get("id")); p = parseInt(n.a.convertValue(m, u, i, h), 10), parseInt(p, 10) !== p && (p += 1), c >= p && r.checkFeePool(h, p) && (d = !0) } d && (o.push(t), l[t] = p || u) }), { assets: o, fees: l }) : { assets: ["1.3.0"], fees: { "1.3.0": 0 } } } }, { key: "getFinalFeeAsset", value: function(e, t) { var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "1.3.0" , a = this.getPossibleFees(e, t).assets; return 1 === a.length ? r = a[0] : a.length > 0 && -1 === a.indexOf(r) && (r = a[0]), r } }, { key: "isKnownScammer", value: function(e) { var t = null; return -1 !== l.indexOf(e) ? t = o.a.translate("account.polo_scam") : -1 !== c.indexOf(e) ? t = o.a.translate("account.bittrex_scam") : -1 !== u.indexOf(e) && (t = o.a.translate("account.other_scam")), t } }]), e }(); t.a = p } , , function(e, t, r) { "use strict"; r.d(t, "d", function() { return p }), r.d(t, "e", function() { return h }), r.d(t, "f", function() { return m }), r.d(t, "k", function() { return f }), r.d(t, "c", function() { return g }), r.d(t, "b", function() { return _ }), r.d(t, "g", function() { return b }), r.d(t, "j", function() { return y }), r.d(t, "l", function() { return w }), r.d(t, "h", function() { return k }), r.d(t, "m", function() { return x }), r.d(t, "i", function() { return A }), r.d(t, "a", function() { return E }); var a = r(55) , n = r(49) , i = r(78) , o = new a.a("") , s = {} , l = {} , c = {} , u = 3e4; function d(e) { c[e] = setTimeout(function() { delete l[e], delete c[e] }, u) } function p() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : n.g.BASE + n.g.COINS_LIST , t = "fetchCoins_" + e , r = s[t]; return l[t] ? Promise.resolve(l[t]) : (r || (s[t] = r = fetch(e).then(function(e) { return e.json().then(function(e) { return e }) }).catch(function(t) { throw console.log("fetchCoins error from " + e + ": " + t), t })), new Promise(function(e, a) { r.then(function(r) { l[t] = r, e(r), delete s[t], c[t] || d(t) }).catch(a) } )) } function h() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : n.g.BASE + n.g.COINS_LIST; return fetch(e).then(function(e) { return e.json().then(function(e) { return e }) }).catch(function(t) { throw console.log("fetchCoinsSimple error from " + e + ": " + t), t }) } function m() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : n.b.BASE + n.b.TRADING_PAIRS , t = "fetchTradingPairs_" + e , r = s[t]; return l[t] ? Promise.resolve(l[t]) : (r || (s[t] = r = fetch(e, { method: "get", headers: new Headers({ Accept: "application/json" }) }).then(function(e) { return e.json().then(function(e) { return e }) }).catch(function(t) { throw console.log("fetchTradingPairs error from " + e + ": " + t), t })), new Promise(function(e, a) { r.then(function(r) { l[t] = r, e(r), delete s[t], c[t] || d(t) }).catch(a) } )) } function f(e, t) { var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : n.b.BASE + n.b.DEPOSIT_LIMIT; return fetch(r + "?inputCoinType=" + encodeURIComponent(e) + "&outputCoinType=" + encodeURIComponent(t), { method: "get", headers: new Headers({ Accept: "application/json" }) }).then(function(e) { return e.json().then(function(e) { return e }) }).catch(function(r) { console.log("error fetching deposit limit of", e, t, r) }) } function g(e, t, r) { var a = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : n.b.BASE + n.b.ESTIMATE_OUTPUT; return fetch(a + "?inputAmount=" + encodeURIComponent(e) + "&inputCoinType=" + encodeURIComponent(t) + "&outputCoinType=" + encodeURIComponent(r), { method: "get", headers: new Headers({ Accept: "application/json" }) }).then(function(e) { return e.json().then(function(e) { return e }) }).catch(function(e) { console.log("error fetching deposit limit of", t, r, e) }) } function _(e, t, r) { var a = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : n.b.BASE + n.b.ESTIMATE_INPUT; return fetch(a + "?outputAmount=" + encodeURIComponent(e) + "&inputCoinType=" + encodeURIComponent(t) + "&outputCoinType=" + encodeURIComponent(r), { method: "get", headers: new Headers({ Accept: "application/json" }) }).then(function(e) { return e.json().then(function(e) { return e }) }).catch(function(e) { console.log("error fetching deposit limit of", t, r, e) }) } function b() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : n.g.BASE + n.g.ACTIVE_WALLETS , t = "getActiveWallets_" + e , r = s[t]; return l[t] ? Promise.resolve(l[t]) : (r || (s[t] = r = fetch(e).then(function(e) { return e.json().then(function(e) { return e }) }).catch(function(t) { console.log("error fetching blocktrades active wallets", t, e) })), new Promise(function(e) { r.then(function(r) { l[t] = r, e(r), delete s[t], c[t] || d(t) }) } )) } function y(e) { var t = e.coin , r = e.account , a = e.stateCallback , i = { coin: t, account: r } , o = JSON.stringify(i); fetch(n.g.BASE + "/simple-api/get-last-address", { method: "POST", headers: new Headers({ Accept: "application/json", "Content-Type": "application/json" }), body: o }).then(function(e) { e.json().then(function(e) { var t = { address: e.address, memo: e.memo || null, error: e.error || null, loading: !1 }; a && a(t) }, function(e) { console.log("error: ", e), a && a({ address: e.message, memo: null }) }) }, function(e) { console.log("error: ", e), a && a({ address: e.message, memo: null }) }).catch(function(e) { console.log("fetch error:", e) }) } var v = {}; function w(e) { var t = e.inputCoinType , r = e.outputCoinType , a = e.outputAddress , o = e.url , s = void 0 === o ? n.g.BASE : o , l = e.stateCallback , c = e.selectedGateway , u = i.a[c] , d = { inputCoinType: t = u && u.assetWithdrawlAlias ? u.assetWithdrawlAlias[t.toLowerCase()] || t.toLowerCase() : t, outputCoinType: r, outputAddress: a } , p = JSON.stringify(d); v[p] || (v[p] = !0, fetch(s + "/simple-api/initiate-trade", { method: "post", headers: new Headers({ Accept: "application/json", "Content-Type": "application/json" }), body: p }).then(function(e) { e.json().then(function(e) { delete v[p]; var t = { address: e.inputAddress || "unknown", memo: e.inputMemo, error: e.error || null }; l && l(t) }, function(e) { console.log("error: ", e), delete v[p], l && l(null) }) }, function(e) { console.log("error: ", e), delete v[p], l && l(null) }).catch(function(e) { console.log("fetch error:", e), delete v[p] })) } function k(e) { var t = e.allCoins , r = e.tradingPairs , a = e.backer , n = i.a[a] , o = {}; n.singleWallet && t.forEach(function(e) { return o[e.backingCoinType] = e }), t.forEach(function(e) { return o[e.coinType] = e }); var s = {}; r.forEach(function(e) { s[e.inputCoinType] || (s[e.inputCoinType] = {}), s[e.inputCoinType][e.outputCoinType] = !0 }); var l = []; return t.forEach(function(e) { var t = o[e.backingCoinType]; if (e.walletSymbol.startsWith(a + ".") && e.backingCoinType && t) { var r = s[e.backingCoinType] && s[e.backingCoinType][e.coinType] , i = s[e.coinType] && s[e.coinType][e.backingCoinType]; l.push({ name: t.name, intermediateAccount: n.intermediateAccount ? n.intermediateAccount : t.intermediateAccount, gateFee: t.gateFee || t.transactionFee, walletType: t.walletType, backingCoinType: n.singleWallet ? e.backingCoinType.toUpperCase() : t.walletSymbol, minAmount: t.minAmount || 0, maxAmount: t.maxAmount || 999999999, symbol: e.walletSymbol, supportsMemos: t.supportsOutputMemos, depositAllowed: r, withdrawalAllowed: i }) } }), l } function x(e) { var t = e.url , r = void 0 === t ? n.b.BASE : t , a = e.walletType , i = e.newAddress , o = e.output_coin_type , s = void 0 === o ? null : o , l = e.method , c = void 0 === l ? null : l; return i ? c && "GET" != c ? "POST" == c ? fetch(r + "/wallets/" + a + "/check-address", { method: "post", headers: new Headers({ Accept: "application/json", "Content-Type": "application/json" }), body: JSON.stringify({ address: i }) }).then(function(e) { return e.json().then(function(e) { return e.isValid }) }).catch(function(e) { console.log("validate error:", e) }) : void 0 : (r += "/wallets/" + a + "/address-validator?address=" + encodeURIComponent(i), s && (r += "&outputCoinType=" + s), fetch(r, { method: "get", headers: new Headers({ Accept: "application/json", "Content-Type": "application/json" }) }).then(function(e) { return e.json().then(function(e) { return e.isValid }) }).catch(function(e) { console.log("validate error:", e) })) : new Promise(function(e) { return e() } ) } var S = {}; function A(e) { var t = e.input_coin_type , r = e.output_coin_type , a = e.url , n = e.account_name; if (!t || !r) return Promise.reject(); var i = JSON.stringify({ inputCoinType: t, outputCoinType: r, outputAddress: n, inputMemo: "blocktrades conversion: " + t + "to" + r }) , o = a + t + r + n; return new Promise(function(e, t) { if (S[o]) return e(S[o]); fetch(a + "/simple-api/initiate-trade", { method: "post", headers: new Headers({ Accept: "application/json", "Content-Type": "application/json" }), body: i }).then(function(r) { r.json().then(function(t) { S[o] = t, e(t) }, t).catch(t) }).catch(t) } ) } var E = { has: function(e) { return o.has("history_address_" + e) }, set: function(e) { var t = e.wallet , r = e.addresses; o.set("history_address_" + t, r) }, get: function(e) { return o.get("history_address_" + e, []) }, setLast: function(e) { var t = e.wallet , r = e.address; o.set("history_address_last_" + t, r) }, getLast: function(e) { return o.get("history_address_last_" + e, "") } } } , function(e, t, r) { "use strict"; var a = r(30) , n = r(19) , i = r(291) , o = r(24) , s = r(575) , l = r(350) , c = r(162) , u = r(64) , d = r(5) , p = r(99) , h = r(50) , m = r(11) , f = r.n(m) , g = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }() , _ = function e(t, r, a) { null === t && (t = Function.prototype); var n = Object.getOwnPropertyDescriptor(t, r); if (void 0 === n) { var i = Object.getPrototypeOf(t); return null === i ? void 0 : e(i, r, a) } if ("value"in n) return n.value; var o = n.get; return void 0 !== o ? o.call(a) : void 0 }; var b = function(e) { function t() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var e = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.state = e._getInitialState(), e.bindListeners({ onRestore: u.a.restore, onSetWallet: u.a.setWallet, onSetBackupDate: u.a.setBackupDate, onSetBrainkeyBackupDate: u.a.setBrainkeyBackupDate, onDeleteWallet: u.a.deleteWallet }), _(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "_export", e).call(e, "init", "setNewWallet", "onDeleteWallet", "onDeleteAllWallets"), e } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, p["a"]), g(t, [{ key: "_getInitialState", value: function() { return { new_wallet: void 0, current_wallet: void 0, wallet_names: f.a.Set() } } }, { key: "onRestore", value: function(e) { var t = this , r = e.wallet_name , a = e.wallet_object; h.a.restore(r, a).then(function() { return o.a.setWallet(r), t.onSetWallet({ wallet_name: r }) }).catch(function(e) { return console.error(e), Promise.reject(e) }) } }, { key: "onSetWallet", value: function(e) { var t = this , r = e.wallet_name , a = void 0 === r ? "default" : r , u = e.create_wallet_password , p = e.brnkey , m = e.resolve , f = new Promise(function(e) { if (/[^a-z0-9_-]/.test(a) || "" === a) throw new Error("Invalid wallet name"); if (t.state.current_wallet !== a) { var r; if (!t.state.wallet_names.has(a)) { var m = t.state.wallet_names.add(a); r = h.a.root.setProperty("wallet_names", m), t.setState({ wallet_names: m }) } var f = h.a.root.setProperty("current_wallet", a); e(Promise.all([r, f]).then(function() { return h.a.close(), d.ChainStore.clearCache(), s.a.reset(), h.a.init_instance().init_promise.then(function() { return l.a.reset(), Promise.all([n.a.loadDbData().then(function() { return o.a.loadDbData() }), c.a.loadDbData().then(function() { return i.a.loadDbData() })]).then(function() { if (u) return n.a.onCreateWallet(u, p, !0, a).then(function() { return t.setState({ current_wallet: a }) }); t.setState({ current_wallet: a }) }) }) })) } else e() } ).catch(function(e) { return console.error(e), Promise.reject(e) }); m && m(f) } }, { key: "setNewWallet", value: function(e) { this.setState({ new_wallet: e }) } }, { key: "init", value: function() { var e = this; return h.a.root.getProperty("current_wallet").then(function(t) { return h.a.root.getProperty("wallet_names", []).then(function(r) { e.setState({ wallet_names: f.a.Set(r), current_wallet: t }), o.a.setWallet(t) }) }) } }, { key: "onDeleteAllWallets", value: function() { var e = this , t = []; return this.state.wallet_names.forEach(function(r) { return t.push(e.onDeleteWallet(r)) }), Promise.all(t) } }, { key: "onDeleteWallet", value: function(e) { var t = this; return new Promise(function(r) { var a = t.state , n = a.current_wallet , i = a.wallet_names; if (!i.has(e)) throw new Error("Can't delete wallet, does not exist in index"); i = i.delete(e), h.a.root.setProperty("wallet_names", i), n === e && (n = i.size ? i.first() : void 0, h.a.root.setProperty("current_wallet", n), n && u.a.setWallet(n)), t.setState({ current_wallet: n, wallet_names: i }); var o = h.a.getDatabaseName(e); h.a.impl.deleteDatabase(o); r(o) } ) } }, { key: "onSetBackupDate", value: function() { n.a.setBackupDate() } }, { key: "onSetBrainkeyBackupDate", value: function() { n.a.setBrainkeyBackupDate() } }]), t }() , y = a.a.createStore(b, "WalletManagerStore"); t.a = y } , , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(15) , o = r(107) , s = r(140) , l = r(4) , c = r.n(l) , u = r(1) , d = r.n(u) , p = r(7) , h = r(5) , m = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]) } return e } , f = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function g(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function _(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function b(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } var y = function(e) { function t(e) { g(this, t); var r = _(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.state = { assetIssuerName: h.ChainStore.getAccountName(e.asset.get("issuer")) }, r._load(), r } return b(t, n.a.Component), f(t, [{ key: "shouldComponentUpdate", value: function(e, t) { return this.props.replace !== e.replace || this.props.asset !== e.asset || this.props.noPrefix !== e.noPrefix || this.props.noTip !== e.noTip || this.props.dataPlace !== e.dataPlace || this.state.assetIssuerName !== t.assetIssuerName } }, { key: "_load", value: function() { var e = this; this.state.assetIssuerName || Object(h.FetchChainObjects)(h.ChainStore.getAccountName, [this.props.asset.get("issuer")]).then(function(t) { console.log(t), e.setState({ assetIssuerName: t[0] }) }) } }, { key: "componentDidUpdate", value: function() { this._load() } }, { key: "render", value: function() { var e = this.props , t = e.replace , r = e.asset , a = e.noPrefix , s = e.customClass , l = e.noTip; if (!r) return null; var u = r.get("symbol") , d = this.state.assetIssuerName , h = r.has("bitasset") , m = h && r.getIn(["bitasset", "is_prediction_market"]) , f = i.a.replaceName(r) , g = f.name , _ = f.prefix , b = "bit" === _ , y = h && !m && b; if (t && g !== u || h) { var v = o.a.parseDescription(r.getIn(["options", "description"])) , w = u.split("."); (w = w.length > 1 ? w[0] : null) && (w += "."); var k = ""; try { k = w || y ? c.a.translate("gateway.assets." + (b ? "bit" : w.replace(".", "").toLowerCase()), { asset: u, backed: y ? v.main : g }) : "" } catch (e) {} h && "CNY" === u && (k = k + " " + c.a.translate("gateway.assets.bitcny")); var x = _ && "bit" === _ ? _ : _ ? _.toUpperCase() : _ , S = n.a.createElement("div", { className: "inline-block" + (this.props.noTip ? "" : " tooltip") + (s ? " " + s : "") }, n.a.createElement("span", { className: "asset-prefix-replaced" }, _), n.a.createElement("span", null, g)); if (l) return S; var A = (x || "") + g.toUpperCase() , E = n.a.createElement("div", { style: { maxWidth: "25rem" } }, v.short ? v.short : v.main || "", "" !== k && n.a.createElement("br", null), "" !== k && n.a.createElement("br", null), k, n.a.createElement("br", null), n.a.createElement("br", null), d && c.a.translate("explorer.assets.issuer") + ": " + d); return n.a.createElement(p.Popover, { placement: this.props.dataPlace, content: E, title: A, mouseEnterDelay: .5 }, S) } var T = n.a.createElement("span", { className: s || null }, n.a.createElement("span", { className: a ? "" : "asset-prefix-replaced" }, a ? null : _), n.a.createElement("span", null, g)); if (l) return T; var C = null; C = "BTS" == g ? { main: c.a.translate("assets.BTS") } : o.a.parseDescription(r.getIn(["options", "description"])); var z = (_ || "") + g.toUpperCase() , B = n.a.createElement("div", { style: { maxWidth: "25rem" } }, C.short ? C.short : C.main || "", n.a.createElement("br", null), n.a.createElement("br", null), d && c.a.translate("explorer.assets.issuer") + ": " + d); return n.a.createElement(p.Popover, { placement: this.props.dataPlace, content: B, title: z, mouseEnterDelay: .5 }, T) } }]), t }(); y.propTypes = { replace: d.a.bool.isRequired, dataPlace: d.a.string.isRequired }, y.defaultProps = { replace: !0, noPrefix: !1, noTip: !1, dataPlace: "bottom" }, y = Object(s.a)(y); var v = function(e) { function t() { return g(this, t), _(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return b(t, n.a.Component), f(t, [{ key: "render", value: function() { return n.a.createElement(y, m({}, this.props, { asset: this.props.name })) } }]), t }(); t.a = v } , , , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(94) , i = r(19) , o = r(5) , s = r(14) , l = r(67) , c = r(80) , u = r(11) , d = r.n(u) , p = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var h = {} , m = void 0 , f = {} , g = d.a.List() , _ = null , b = d.a.List() , y = null , v = null , w = ""; function k() { clearTimeout(_), clearTimeout(y), _ = null, y = null } var x = [] , S = !1 , A = 0 , E = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return p(e, [{ key: "changeBase", value: function(e) { return k(), e } }, { key: "changeBucketSize", value: function(e) { return e } }, { key: "getMarketStats", value: function(e, t) { var r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] , a = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null , n = l.a.getMarketName(e, t) , i = n.marketName , o = n.first , c = n.second; return function(n) { if (e !== t) { var l = new Date; if (f[i] && !r) { if (l - f[i].lastFetched < 6e4) return !1; r = !0 } if (!f[i] || r) { f[i] = { lastFetched: new Date }, s.Apis.instance().db_api() && x.push({ promise: s.Apis.instance().db_api().exec("get_ticker", [c.get("id"), o.get("id")]), market: i, base: c, quote: o }), S || (S = !0, setTimeout(function() { u() }, 1500)); var u = function e() { var t = x.slice(0, 500); return Promise.all(t.map(function(e) { return e.promise })).then(function(r) { return n({ tickers: r, markets: t.map(function(e) { return e.market }), bases: t.map(function(e) { return e.base }), quotes: t.map(function(e) { return e.quote }) }), x.splice(0, r.length), 0 === x.length ? void (S = !1) : e() }).catch(function(e) { console.log("getMarketStats error for " + i + ":", e), null != a && a(e) }) } } } } } }, { key: "switchMarket", value: function() { return !0 } }, { key: "subscribeMarket", value: function(e, t, r, a) { var n = this; void 0 === a ? a = A : A = a, k(); var i = t.get("id") + "_" + e.get("id"); v = e.get("id") + "_" + t.get("id"); var o = l.a.isMarketAsset(t, e) , c = o.isMarketAsset , u = o.marketAsset , d = o.inverted; return function(o) { var l = function(a, n) { a === v && (y ? b = b.concat(n) : (b = b.concat(n), y = setTimeout(function() { var a = !0 , n = !1; b.forEach(function(e) { e.forEach(function(e) { if ("string" == typeof e) { var t = e.split("."); t.length >= 2 && "7" === t[1] ? !0 : a = !1 } else a = !1, 2 === e.length && e[0] && 4 === e[0][0] && (n = !0) }) }); var l = null , p = null; c && (l = s.Apis.instance().db_api().exec("get_call_orders", [u.id, 300]), p = s.Apis.instance().db_api().exec("get_settle_orders", [u.id, 300])); var h = [] , m = []; 0 !== w && (h = s.Apis.instance().orders_api().exec("get_grouped_limit_orders", [e.get("id"), t.get("id"), w, null, 100]), m = s.Apis.instance().orders_api().exec("get_grouped_limit_orders", [t.get("id"), e.get("id"), w, null, 100])); var f = new Date , g = new Date , _ = new Date , v = new Date; f = new Date(f.getTime() - 200 * r * 1e3), g = new Date(g.getTime() - 200 * r * 2e3), _ = new Date(_.getTime() - 200 * r * 3e3), v.setDate(v.getDate() + 1), b = b.clear(), y = null, Promise.all([s.Apis.instance().db_api().exec("get_limit_orders", [e.get("id"), t.get("id"), 300]), a ? null : l, a ? null : p, n ? s.Apis.instance().history_api().exec("get_market_history", [e.get("id"), t.get("id"), r, f.toISOString().slice(0, -5), v.toISOString().slice(0, -5)]) : null, n ? s.Apis.instance().history_api().exec("get_fill_order_history", [e.get("id"), t.get("id"), 200]) : null, n ? s.Apis.instance().history_api().exec("get_market_history", [e.get("id"), t.get("id"), r, g.toISOString().slice(0, -5), f.toISOString().slice(0, -5)]) : null, n ? s.Apis.instance().history_api().exec("get_market_history", [e.get("id"), t.get("id"), r, _.toISOString().slice(0, -5), g.toISOString().slice(0, -5)]) : null, s.Apis.instance().db_api().exec("get_ticker", [e.get("id"), t.get("id")]), h, m]).then(function(r) { var s = r[5] || [] , l = r[6] || []; o({ limits: r[0], calls: !a && r[1], settles: !a && r[2], price: n && s.concat(l.concat(r[3])), history: n && r[4], market: i, base: e, quote: t, inverted: d, ticker: r[7], groupedOrdersBids: r[8], groupedOrdersAsks: r[9] }) }).catch(function(e) { console.log("Error in MarketsActions.subscribeMarket: ", e) }) }, 500))) }; if (!h[i] || m !== r || w !== a) { o({ switchMarket: !0 }), m = r, w = a; var p = null , f = null; c && (p = s.Apis.instance().db_api().exec("get_call_orders", [u.id, 300]), f = s.Apis.instance().db_api().exec("get_settle_orders", [u.id, 300])); var g = [] , _ = []; 0 !== w && (g = s.Apis.instance().orders_api().exec("get_grouped_limit_orders", [e.get("id"), t.get("id"), w, null, 100]), _ = s.Apis.instance().orders_api().exec("get_grouped_limit_orders", [t.get("id"), e.get("id"), w, null, 100])); var k = new Date , x = new Date , S = new Date , A = new Date; return k = new Date(k.getTime() - 200 * r * 1e3), x = new Date(x.getTime() - 200 * r * 2e3), S = new Date(S.getTime() - 200 * r * 3e3), A.setDate(A.getDate() + 1), new Promise(function(a, c) { Promise.all([s.Apis.instance().db_api().exec("subscribe_to_market", [l.bind(n, e.get("id") + "_" + t.get("id")), e.get("id"), t.get("id")]), s.Apis.instance().db_api().exec("get_limit_orders", [e.get("id"), t.get("id"), 300]), p, f, s.Apis.instance().history_api().exec("get_market_history", [e.get("id"), t.get("id"), r, k.toISOString().slice(0, -5), A.toISOString().slice(0, -5)]), s.Apis.instance().history_api().exec("get_market_history_buckets", []), s.Apis.instance().history_api().exec("get_fill_order_history", [e.get("id"), t.get("id"), 200]), s.Apis.instance().history_api().exec("get_market_history", [e.get("id"), t.get("id"), r, x.toISOString().slice(0, -5), k.toISOString().slice(0, -5)]), s.Apis.instance().history_api().exec("get_market_history", [e.get("id"), t.get("id"), r, S.toISOString().slice(0, -5), x.toISOString().slice(0, -5)]), s.Apis.instance().db_api().exec("get_ticker", [e.get("id"), t.get("id")]), g, _]).then(function(r) { var n = r[8] || [] , s = r[7] || []; h[i] = l, o({ limits: r[1], calls: r[2], settles: r[3], price: n.concat(s.concat(r[4])), buckets: r[5], history: r[6], market: i, base: e, quote: t, inverted: d, ticker: r[9], init: !0, resolve: a, groupedOrdersBids: r[10], groupedOrdersAsks: r[11] }) }).catch(function(e) { console.log("Error in MarketsActions.subscribeMarket: ", e), c(e) }) } ) } return Promise.resolve(!0) } } }, { key: "unSubscribeMarket", value: function(e, t) { var r = e + "_" + t; return k(), function(a) { return h[r] ? new Promise(function(n, i) { s.Apis.instance().db_api().exec("unsubscribe_from_market", [h[r], e, t]).then(function() { delete h[r], a({ unSub: !0, resolve: n }) }).catch(function(e) { h[r] = !0, console.log("Error in MarketsActions.unSubscribeMarket: ", e), a({ unSub: !1, market: r }), i(e) }) } ) : Promise.resolve(!0) } } }, { key: "createLimitOrder", value: function(e, t, r, a, s, l, c, u) { var d = n.a.new_transaction() , p = o.ChainStore.getAsset(u); return "1.3.0" === p.getIn(["options", "core_exchange_rate", "base", "asset_id"]) && "1.3.0" === p.getIn(["options", "core_exchange_rate", "quote", "asset_id"]) && (u = "1.3.0"), d.add_type_operation("limit_order_create", { fee: { amount: 0, asset_id: u }, seller: e, amount_to_sell: { amount: t, asset_id: r.get("id") }, min_to_receive: { amount: a, asset_id: s.get("id") }, expiration: l, fill_or_kill: c }), function(e) { return i.a.process_transaction(d, null, !0).then(function(t) { return e(!0), !0 }).catch(function(t) { return console.log("order error:", t), e({ error: t }), { error: t } }) } } }, { key: "createLimitOrder2", value: function(e) { var t = n.a.new_transaction() , r = []; return Array.isArray(e) ? r = e.map(function(e) { return e.toObject() }) : r.push(e.toObject()), r.forEach(function(e) { t.add_type_operation("limit_order_create", e) }), i.a.process_transaction(t, null, !0).then(function(e) { return !0 }).catch(function(e) { return console.log("order error:", e), { error: e } }) } }, { key: "createPredictionShort", value: function(e, t, r, a, o, s, l, u, d, p) { var h = arguments.length > 10 && void 0 !== arguments[10] && arguments[10] , m = n.a.new_transaction(); return h = c.a.getFinalFeeAsset(e.seller, "call_order_update", e.fee.asset_id), e.setExpiration(), m.add_type_operation("call_order_update", { fee: { amount: 0, asset_id: h }, funding_account: e.seller, delta_collateral: t.toObject(), delta_debt: e.amount_for_sale.toObject(), expiration: e.getExpiration() }), m.add_type_operation("limit_order_create", e.toObject()), i.a.process_transaction(m, null, !0).then(function(e) { return !0 }).catch(function(e) { return console.log("order error:", e), { error: e } }) } }, { key: "cancelLimitOrder", value: function(e, t) { var r = c.a.getFinalFeeAsset(e, "limit_order_cancel") , a = n.a.new_transaction(); return a.add_type_operation("limit_order_cancel", { fee: { amount: 0, asset_id: r }, fee_paying_account: e, order: t }), i.a.process_transaction(a, null, !0).catch(function(e) { console.log("cancel error:", e) }) } }, { key: "cancelLimitOrders", value: function(e, t) { var r = c.a.getFinalFeeAsset(e, "limit_order_cancel") , a = n.a.new_transaction(); return t.forEach(function(t) { a.add_type_operation("limit_order_cancel", { fee: { amount: 0, asset_id: r }, fee_paying_account: e, order: t }) }), i.a.process_transaction(a, null, !0).catch(function(e) { console.log("cancel error:", e) }) } }, { key: "cancelLimitOrderSuccess", value: function(e) { return function(t) { _ ? g = g.concat(e) : (g = g.concat(e), _ = setTimeout(function() { t(g.toJS()), _ = null, g = g.clear() }, 500)) } } }, { key: "closeCallOrderSuccess", value: function(e) { return e } }, { key: "callOrderUpdate", value: function(e) { return e } }, { key: "feedUpdate", value: function(e) { return e } }, { key: "settleOrderUpdate", value: function(e) { return function(t) { s.Apis.instance().db_api().exec("get_settle_orders", [e, 100]).then(function(e) { t({ settles: e }) }) } } }, { key: "toggleStars", value: function() { return !0 } }, { key: "getTrackedGroupsConfig", value: function() { return function(e) { s.Apis.instance().orders_api().exec("get_tracked_groups", []).then(function(t) { e({ trackedGroupsConfig: t }) }).catch(function(t) { console.log("current node api does not support grouped orders."), e({ trackedGroupsConfig: [] }) }) } } }, { key: "changeCurrentGroupLimit", value: function(e) { return e } }]), e }() , T = a.a.createActions(E) , C = {}; T.clearMarketStatsInInterval = function(e) { C[e] && (clearInterval(C[e]), delete C[e]) } , T.getMarketStatsInterval = function(e, t, r) { var a = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; T.getMarketStats(t, r, a); var n = l.a.getMarketName(t, r).marketName; return C[n] ? T.clearMarketStatsInInterval.bind(this, n) : (C[n] = setInterval(function() { T.getMarketStats(t, r, a, function() { T.clearMarketStatsInInterval(t, r) }) }, e), T.clearMarketStatsInInterval.bind(this, n)) } , t.a = T } , function(e, t, r) { "use strict"; var a = r(5) , n = r(233) , i = { new_transaction: function() { return new a.TransactionBuilder }, sign_and_broadcast: function(e) { var t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; return a.SerializerValidation.required(e, "transaction"), WalletDb.process_transaction(e, null, t) }, template: function(e) { var t = a.TransactionHelper.template(e, { use_default: !0, annotate: !0 }); return console.error(JSON.stringify(t, null, 4)), t = a.TransactionHelper.template(e, { use_default: !0, annotate: !1 }), console.error(JSON.stringify(t)), t }, transfer: function(e, t, r, a, i) { var o = !(arguments.length > 5 && void 0 !== arguments[5]) || arguments[5] , s = !(arguments.length > 6 && void 0 !== arguments[6]) || arguments[6] , l = arguments.length > 7 && void 0 !== arguments[7] ? arguments[7] : null; return console.error("deprecated, call application_api.transfer instead"), n.a.transfer({ from_account_id: e, to_account_id: t, amount: r, asset: a, memo_message: i, broadcast: o, encrypt_memo: s, optional_nonce: l }) } }; t.a = i } , , , function(e, t, r) { "use strict"; var a = void 0 , n = void 0; t.a = n = { set_graphene_db: function(e) { a = e }, trx_readwrite: function(e) { return a.transaction([e], "readwrite") }, on_request_end: function(e) { return new Promise(function(t, r) { e.onsuccess = new i(e.onsuccess,t,e).event, e.onerror = new i(e.onerror,r,e).event } ) }, on_transaction_end: function(e) { return new Promise(function(t, r) { e.oncomplete = new i(e.oncomplete,t).event, e.onabort = new i(e.onabort,r).event } ) }, add: function(e, t, r) { return function(t, r) { var a = e.add(t) , o = null; r && (a.onsuccess = new i(a.onsuccess,function(e) { o = r(e) } ).event); var s = n.on_request_end(a).then(function(e) { return void 0 != e.target.result && (t.id = e.target.result), [t, e] }); return o ? Promise.all([o, s]) : s }(t, r) }, cursor: function(e, t, r) { return new Promise(function(n, i) { r || ((r = a.transaction([e], "readonly")).onerror = function(e) { console.error("ERROR idb_helper.cursor transaction", e), i(e) } ); var o = r.objectStore(e).openCursor(); o.onsuccess = function(e) { var r = e.target.result , a = t(r, e); !1 === a && n(), r || n(a) } , o.onerror = function(e) { var t = { error: e.target.error.message, data: e }; console.log("ERROR idb_helper.cursor request", t), i(t) } } ).then() }, autoIncrement_unique: function(e, t, r) { return e.createObjectStore(t, { keyPath: "id", autoIncrement: !0 }).createIndex("by_" + r, r, { unique: !0 }) } }; var i = function e(t, r, a) { var n = this; !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e), this.existing_on_event = t, this.callback = r, this.event = function(e) { e.target.error && console.error("---- transaction error ----\x3e", e.target.error), n.callback(e), n.existing_on_event && n.existing_on_event(e) } } } , , function(e, t, r) { "use strict"; var a = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var n = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return a(e, [{ key: "_export", value: function() { for (var e = this, t = {}, r = arguments.length, a = Array(r), n = 0; n < r; n++) a[n] = arguments[n]; a.forEach(function(r) { if (!e[r]) throw new Error("BaseStore._export: method '" + r + "' not found in " + e.__proto__._storeName); e[r] = e[r].bind(e), t[r] = e[r] }), this.exportPublicMethods(t) } }]), e }(); t.a = n } , , function(e, t, r) { "use strict"; r.d(t, "b", function() { return S }); var a = r(14) , n = r(5) , i = r(564) , o = r.n(i) , s = r(50) , l = r(291) , c = r(83) , u = r(19) , d = r(26) , p = r(24) , h = r(55) , m = r(4) , f = r.n(m) , g = r(162) , _ = r(25) , b = r(7) , y = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e } , v = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function w(e) { return function() { var t = e.apply(this, arguments); return new Promise(function(e, r) { return function a(n, i) { try { var o = t[n](i) , s = o.value } catch (e) { return void r(e) } if (!o.done) return Promise.resolve(s).then(function(e) { a("next", e) }, function(e) { a("throw", e) }); e(s) }("next") } ) } } function k(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } var x = new h.a("__graphene__"); n.ChainStore.setDispatchFrequency(60); var S = new (function() { function e() { k(this, e), this._connectionManager, this._oldChain = null, this._autoSelection = null, this._connectInProgress = !1, this._connectionStart = null, this._willTransitionToInProgress = !1, this._transitionDone = this._transitionDone.bind(this), this._statusCallback = null } return v(e, [{ key: "willTransitionTo", value: function() { var e = this , t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0] , r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : function() {} ; return this.isTransitionInProgress() ? new Promise(function(e, t) { e() } ) : (this._statusCallback = r, this._willTransitionToInProgress = !0, new Promise(function(r, a) { var n = d.a.getState().apiLatencies , i = Object.keys(n).length > 0 , o = e._getLatencyChecks(1); o >= 8 ? (e._setLatencyChecks(0), i = !1) : t && e._setLatencyChecks(o + 1); var s = e._getNodesToConnectTo(!1, n); e._autoSelection = -1 !== e._getLastNode().indexOf("fake.automatic-selection"), e._initConnectionManager(s), i && 0 != Object.keys(n).length ? e._initiateConnection(t, r, a) : e.doLatencyUpdate().then(e._initiateConnection.bind(e, t, r, a)).catch(function(e) { console.log("catch doLatency", e) }) } )) } }, { key: "isAutoSelection", value: function() { return this._autoSelection } }, { key: "isTransitionInProgress", value: function() { return !!this._willTransitionToInProgress && "object" !== y(this._willTransitionToInProgress) } }, { key: "isBackgroundPingingInProgress", value: function() { return !!this._willTransitionToInProgress && "object" === y(this._willTransitionToInProgress) } }, { key: "getBackgroundPingingTarget", value: function() { return this.isBackgroundPingingInProgress() ? this._willTransitionToInProgress.key : null } }, { key: "getTransitionTarget", value: function() { return this.isTransitionInProgress() ? this._willTransitionToInProgress : null } }, { key: "updateTransitionTarget", value: function(e) { this._willTransitionToInProgress = e, null != this._statusCallback && this._statusCallback(e) } }, { key: "doQuickLatencyUpdate", value: function(e) { var t = this; return new Promise(function(r, a) { var n = t._connectionManager.url , i = t._connectionManager.urls; "string" == typeof e && (e = [e]), t._connectionManager.url = e[0], t._connectionManager.urls = e.slice(1, e.length), t._connectionManager.checkConnections().then(function(e) { console.log("Following nodes have been pinged:", e); var t = d.a.getState().apiLatencies; for (var r in e) t[r] = e[r]; _.a.updateLatencies(t) }).catch(function(e) { console.log("doLatencyUpdate error", e) }).finally(function() { t._connectionManager.url = n, t._connectionManager.urls = i, r() }) } ) } }, { key: "doLatencyUpdate", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] , t = this , r = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] , a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 5e3; this.updateTransitionTarget(f.a.translate("app_init.check_latency")); var n = this; return new Promise(function(i, o) { null == n._connectionManager && n._initConnectionManager(); var s = n._getNodesToConnectTo(!0, null, !0); e && t._clearLatencies(); var l = t._connectionManager.url; var c = new A(n._connectionManager,n._updateLatencies.bind(n),n.updateTransitionTarget.bind(n),r); new T(s,c,function() { var e = n._getNodesToConnectTo(!1, null, !0); n._connectionManager.urls = e.map(function(e) { return e.url }), n._setLatencyPreferences({ region: e[0].region, country: e[0].country }), n.isAutoSelection() && l !== n._connectionManager.urls[0] ? (n._connectionManager.url = n._connectionManager.urls[0], console.log("auto selecting to " + n._connectionManager.url + " after latency update")) : n._connectionManager.url = l, n._transitionDone(i), a > 0 && setTimeout(function e() { n._willTransitionToInProgress ? setTimeout(e, 2e3) : (c.enableBackgroundPinging(), c.pingNodes(function() { var e = n._getNodesToConnectTo(!1, null, !0); n._connectionManager.urls = e.map(function(e) { return e.url }), n._transitionDone() })) }, a) } ,n.getNodes.bind(n)).ping(t.isAutoSelection() ? null : t._getLastNode(), t._getLatencyPreferences()) } ) } }, { key: "_getLatencyPreferences", value: function() { return x.get("latency_preferences", {}) } }, { key: "_setLatencyPreferences", value: function(e) { x.set("latency_preferences", e) } }, { key: "_getLatencyChecks", value: function() { return x.has("latencyChecks") && x.remove("latencyChecks"), x.get("latency_checks", 0) } }, { key: "_setLatencyChecks", value: function(e) { x.set("latency_checks", e) } }, { key: "_clearLatencies", value: function() { _.a.updateLatencies({}) } }, { key: "_updateLatencies", value: function(e) { var t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1] , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null , a = d.a.getState().apiLatencies; for (var n in e) !t && n in a || (a[n] = e[n], null != r && (r[n] = e[n])); _.a.updateLatencies(a) } }, { key: "_transitionDone", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null; null != e && e(), this._willTransitionToInProgress = !1, this._statusCallback = null } }, { key: "_initConnectionManager", value: function() { var e = this , t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null; null == t && (t = this._getNodesToConnectTo(!0)); var r = this._getFirstToTry(t); this._willTransitionToInProgress = r, this._connectionManager = new a.Manager({ url: r, urls: t, closeCb: this._onConnectionClose.bind(this), optionalApis: { enableOrders: !0 }, urlChangeCallback: function(t) { console.log("fallback to new url:", t), t && e.updateTransitionTarget(f.a.translate("app_init.connecting", { server: t })), _.a.changeSetting({ setting: "activeNode", value: t }) } }) } }, { key: "_onConnectionClose", value: function() {} }, { key: "_apiUrlSecuritySuitable", value: function(e) { return "https:" !== window.location.protocol || -1 == e.indexOf("ws://") } }, { key: "_isTestNet", value: function(e) { return -1 !== e.indexOf("testnet") } }, { key: "getAllApiServers", value: function() { return d.a.getState().defaults.apiServer } }, { key: "getNodes", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null , t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1] , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] , a = this , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3] , i = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; null == e && (e = d.a.getState().apiLatencies), t && (t = Object.keys(e).length > 0); var o = this.getAllApiServers().filter(function(o) { return !(!r && o.hidden) && (!(!i && a._isTestNet(o.url)) && (-1 === o.url.indexOf("fake.automatic-selection") && (!(!n && !a._apiUrlSecuritySuitable(o.url)) && (!t || !!e[o.url])))) }); return (o = (o = o.map(function(t) { return t.hidden = !!t.hidden, t.name = t.location || "Unknown", null != e && t.url in e ? t.latency = e[t.url] : t.latency = null, t })).sort(function(e, t) { return null != e.latency && null != t.latency ? e.latency - t.latency : null == e.latency && null == t.latency ? a._isTestNet(e.url) ? -1 : 1 : null != e.latency && null == t.latency ? -1 : null != t.latency && null == e.latency ? 1 : 0 })).length ? o : (console.warn("No nodes length, returning all of them"), this.getAllApiServers()) } }, { key: "_getNodesToConnectTo", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] , a = this.getNodes(t, !e); return r ? a : a.map(function(e) { return e.url }) } }, { key: "_getLastNode", value: function() { return d.a.getSetting("apiServer") } }, { key: "_setLastNode", value: function(e) { d.a.getSetting("apiServer") !== e && _.a.changeSetting({ setting: "apiServer", value: e }) } }, { key: "_getFirstToTry", value: function(e) { var t = this._getLastNode(); return t || (t = e[0]), this.isAutoSelection() && (t = e[0], console.log("auto selecting to " + t)), this._apiUrlSecuritySuitable(t) || (t = e[0]), t } }, { key: "_getIndexDBImpl", value: function() { return window.openDatabase && shimIndexedDB || indexedDB } }, { key: "_initiateConnection", value: function(e, t, r) { var a = this; this._willTransitionToInProgress = this._connectionManager.url, this._connectionStart = (new Date).getTime(), console.log("Connecting to " + this._connectionManager.url), e ? (this.updateTransitionTarget(f.a.translate("app_init.connecting", { server: this._connectionManager.url })), this._connectionManager.connectWithFallback(!0).then(function() { a.isAutoSelection() || a._setLastNode(a._connectionManager.url), a._onConnect(t, r) }).catch(function(e) { console.error("----- App.willTransitionTo error -----\x3e", e, (new Error).stack), "InvalidStateError" === e.name ? alert("Can't access local storage.\nPlease make sure your browser is not in private/incognito mode.") : a._transitionDone(r) })) : (this.isAutoSelection() || this._setLastNode(""), this._attemptReconnect(t, r)) } }, { key: "_onResetError", value: function(e, t) { var r = this; console.error("onResetError:", t, e), this._willTransitionToInProgress = !1, this._statusCallback = !1, this._oldChain = "old", b.Notification.error({ message: f.a.translate("settings.connection_error", { url: e || "", error: t }) }); var n = d.a.getState().apiLatencies; return delete n[e], _.a.updateLatencies(n), a.Apis.close().then(function() { return r.willTransitionTo(!0) }) } }, { key: "_attemptReconnect", value: function(e, t) { var r = this; this._oldChain = "old", a.Apis.reset(this._connectionManager.url, !0, void 0, { enableOrders: !0 }).then(function(a) { a.init_promise.then(r._onConnect.bind(r, e, t)).catch(r._onResetError.bind(r, r._connectionManager.url)) }) } }, { key: "_onConnect", value: function(e, t) { var r = this; if (!this._connectInProgress) { if (this.updateTransitionTarget(f.a.translate("app_init.database")), this._connectInProgress = !0, a.Apis.instance()) { a.Apis.instance().orders_api() || console.log(a.Apis.instance().url + " does not support the orders api"); var i = a.Apis.instance().url; this.isAutoSelection() || this._setLastNode(i); var o = {}; o[i] = (new Date).getTime() - this._connectionStart, this._updateLatencies(o, !1) } var h = a.Apis.instance().chain_id , m = this._oldChain !== h; this._oldChain = h; var b = Promise.resolve(); try { m && (s.a.close(), b = s.a.init_instance(this._getIndexDBImpl()).init_promise) } catch (e) { return console.error("db init error:", e), this._connectInProgress = !1, this._transitionDone(t) } return Promise.all([b, d.a.init()]).then(function() { return (m ? n.ChainStore.resetCache(!1) : Promise.resolve()).then(function() { return Promise.all([g.a.loadDbData().then(function() { return l.a.loadDbData() }), u.a.loadDbData().then(function() { if (m) return p.a.reset(), p.a.loadDbData(h).catch(function(e) { console.error(e) }) }).catch(function(e) { console.error("----- WalletDb.willTransitionTo error -----\x3e", e), r._transitionDone(t) }), c.a.init()]).then(function() { r._connectInProgress = !1, _.a.changeSetting({ setting: "activeNode", value: r._connectionManager.url }), r._transitionDone(e) }) }).catch(function(e) { r._connectInProgress = !1, r._transitionDone(t.bind(r, e)) }) }).catch(function(e) { console.error(e), r._connectInProgress = !1, r._transitionDone(t) }) } console.error("MULTIPLE CONNECT IN PROGRESS") } }]), e }()); t.a = S.willTransitionTo.bind(S); var A = function() { function e(t, r, a) { var n = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3]; k(this, e), this._connectionManager = t, this._updateLatencies = r, this._updateTransitionTarget = a, this._beSatisfiedWith = n ? { instant: 0, low: 0, medium: 0 } : { instant: 500, low: 800, medium: 1500 } } return v(e, [{ key: "addNodes", value: function(e) { var t = this , r = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1] , a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null; this._translationKey = a, r || void 0 === this._nodeURLs ? (this._nodeURLs = e, this._current = 0, this._counter = { instant: 0, low: 0, medium: 0 }, this._localLatencyCache = {}, this._suitableNodeFound = !1, this._pingInBackGround = !1) : e.forEach(function(e) { -1 === t._nodeURLs.indexOf(e) && t._nodeURLs.push(e) }) } }, { key: "getLocalLatencyMap", value: function() { return this._localLatencyCache } }, { key: "enableBackgroundPinging", value: function() { this._beSatisfiedWith = { instant: 0, low: 0, medium: 0 }, this._counter = { instant: 0, low: 0, medium: 0 }, this._suitableNodeFound = !1, this._pingInBackGround = !0 } }, { key: "doCallbackAndEnableBackgroundPinging", value: function() { this._beSatisfiedWith = { instant: 0, low: 0, medium: 0 }, this._counter = { instant: 0, low: 0, medium: 0 }, this._suitableNodeFound = !0, this._pingInBackGround = !0 } }, { key: "pingNodes", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; null != t && this.addNodes(t, !0), this._callbackWasCalled = !1, this._callback = e, this._range = 3, this._pingNodesInBatches() } }, { key: "_continueToPing", value: function() { return this._current < this._nodeURLs.length && (!this._suitableNodeFound || this._pingInBackGround) } }, { key: "_notifyCallback", value: function() { return !this._callbackWasCalled && (this._suitableNodeFound || this._current == this._nodeURLs.length) } }, { key: "_pingNodesInBatches", value: function() { var e = this , t = this._continueToPing(); if (this._notifyCallback() && (this._callbackWasCalled = !0, this._continueToPing() && console.log("Node with sufficient latency found, continueing to ping the rest in background"), null != this._callback && this._callback()), t) { var r = this._nodeURLs.slice(this._current, this._current + this._range) , a = null == this._translationKey ? "app_init.check_latency_feedback" : this._translationKey; this._pingInBackGround ? this._updateTransitionTarget({ background: !0, key: f.a.translate(a, { pinged: this._current, totalToPing: this._nodeURLs.length }) }) : this._updateTransitionTarget(f.a.translate(a, { pinged: this._current, totalToPing: this._nodeURLs.length })); try { new E(2e3).check(r).then(this._handlePingResult.bind(this)).catch(function(e) { console.log("doLatencyUpdate error", e) }).finally(function() { e._current = e._current + r.length, setTimeout(e._pingNodesInBatches.bind(e), 500) }) } catch (e) { console.error(e) } } else this._updateTransitionTarget(!1) } }, { key: "_updateSuitabilityCounter", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null; for (var t in e) null != this._beSatisfiedWith && (e[t] < this._beSatisfiedWith.instant ? this._counter.instant = this._counter.instant + 1 : e[t] < this._beSatisfiedWith.low ? this._counter.low = this._counter.low + 1 : e[t] < this._beSatisfiedWith.medium && (this._counter.medium = this._counter.medium + 1)); this._checkIfSuitableFound() } }, { key: "_checkIfSuitableFound", value: function() { (this._counter.instant > 0 || this._counter.low >= 2 || this._counter.medium >= 3) && (this._suitableNodeFound = !0) } }, { key: "_handlePingResult", value: function(e) { e && Object.keys(e).length > 0 && (console.log("Latency result:", e), this._updateSuitabilityCounter(e), this._updateLatencies(e, !0, this._localLatencyCache)) } }]), e }() , E = function() { function e(t) { k(this, e), this.urls = [], this.timeout = t } return v(e, [{ key: "check", value: function() { var e = w(regeneratorRuntime.mark(function e(t) { var r, a = this; return regeneratorRuntime.wrap(function(e) { for (; ; ) switch (e.prev = e.next) { case 0: return t.forEach(function(e) { a.addURL(e) }), e.prev = 1, e.next = 4, this._runCheck(); case 4: e.next = 9; break; case 6: e.prev = 6, e.t0 = e.catch(1), console.error(e.t0); case 9: return r = {}, this._result.forEach(function(e) { r[e.url] = e.latency }), e.abrupt("return", r); case 12: case "end": return e.stop() } }, e, this, [[1, 6]]) })); return function(t) { return e.apply(this, arguments) } }() }, { key: "addURL", value: function(e) { this.urls.push({ url: e, latency: NaN }) } }, { key: "_checkURL", value: function(e) { var t = this; return new Promise(function(r) { setTimeout(function() { r(null) }, t.timeout); try { var a = new WebSocket(e); a.openTime = o()(), a.onerror = function(e) { r(null) } , a.onopen = function(e) { a.onmessage = function() { this.closeTime = a.openTime(o.a.MS), a.close(), r(this.closeTime) } , a.onmessage.bind(a), a.send('{"id":1,"method":"call","params":[1,"login",["",""]]}') } } catch (e) { r(null) } } ) } }, { key: "_runCheck", value: function() { var e = w(regeneratorRuntime.mark(function e() { var t, r, a = this; return regeneratorRuntime.wrap(function(e) { for (; ; ) switch (e.prev = e.next) { case 0: for (t = function(e) { a.urls[e].latency = a._checkURL(a.urls[e].url), a.urls[e].latency.then(function(t) { a.urls[e].latency = t }) } , r = 0; r < this.urls.length; r++) t(r); return e.next = 4, Promise.all(this.urls.map(function(e) { return e.latency })); case 4: this.urls.sort(function(e, t) { return Number(e.latency) - Number(t.latency) }), this._result = this.urls.slice(); case 6: case "end": return e.stop() } }, e, this) })); return function() { return e.apply(this, arguments) } }() }]), e }() , T = function() { function e(t, r, a, n) { k(this, e), this._nodesToPing = t, this._pinger = r, this._callback = a, this._getNodes = n, this._sortNodesToTree() } return v(e, [{ key: "ping", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; function r() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null; null == e && (e = this._getNodes(this._pinger.getLocalLatencyMap())[0].region); this._pinger.addNodes(this.getFromRegion(e).map(function(e) { return e.url }), !1, "app_init.check_latency_feedback_region"), this._pinger.pingNodes(function() { this._pinger.addNodes(this._nodesToPing.map(function(e) { return e.url }), !1, "app_init.check_latency_feedback_rest"), this._pinger.pingNodes(this._callback) } .bind(this)) } function a() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; if (null == e) { var a = this._getNodes(this._pinger.getLocalLatencyMap()); e = a[0].region, t = a[0].country } this._pinger.addNodes(this.getFromRegion(e, t).map(function(e) { return e.url }), !1, "app_init.check_latency_feedback_country"), this._pinger.pingNodes(r.bind(this)) } function n() { t.region && t.country ? a.bind(this)(t.region, t.country) : t.region ? r.bind(this)(t.region) : function() { this._pinger.addNodes(this.getFromEachRegion().map(function(e) { return e.url }), !1, "app_init.check_latency_feedback_world"), this._pinger.pingNodes(a.bind(this)) } .bind(this)() } e ? (this._pinger.addNodes([e], !1, "app_init.check_latency_feedback_last"), this._pinger.pingNodes(n.bind(this))) : n.bind(this)() } }, { key: "getFromEachRegion", value: function() { var e = this , t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 2 , r = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1] , a = []; return Object.keys(this._nodeTree).forEach(function(r) { var n = e._nodeTree[r].all , i = void 0; for (i = 1; i <= t; i++) n.length >= i && a.push(n[i - 1]) }), console.log("Node tree", a), r ? this._getShuffleArray(a) : a } }, { key: "getFromRegion", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null , r = this , a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 10 , n = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3] , i = []; return (t ? [t] : ["all"]).forEach(function(t) { var o = r._nodeTree[e][t] , s = n ? r._getShuffleArray(o) : o , l = void 0; for (l = 1; l <= a; l++) s.length >= l && i.push(s[l - 1]) }), i } }, { key: "_getShuffleArray", value: function(e) { for (var t = (e = e.slice(0)).length - 1; t > 0; t--) { var r = Math.floor(Math.random() * (t + 1)) , a = [e[r], e[t]]; e[t] = a[0], e[r] = a[1] } return e } }, { key: "_sortNodesToTree", value: function() { var e = {}; this._nodesToPing.forEach(function(t) { void 0 === e[t.region] && (e[t.region] = {}, e[t.region].all = []), void 0 === e[t.region][t.country] && (e[t.region][t.country] = []), e[t.region].all.push(t), e[t.region][t.country].push(t) }), this._nodeTree = e } }]), e }() } , , function(e, t, r) { "use strict"; var a = r(11) , n = r.n(a) , i = r(30) , o = r(99) , s = r(97) , l = r(19) , c = r(199) , u = r(162) , d = r(261) , p = r(215) , h = r(5) , m = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var f = function(e) { function t() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var e = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.state = e._getInitialState(), e.pending_operation_count = 0, e.bindListeners({ onLoadDbData: u.a.loadDbData, onAddKey: u.a.addKey }), e._export("hasKey", "getPubkeys", "getTcomb_byPubkey", "getPubkeys_having_PrivateKey", "addPrivateKeys_noindex", "decodeMemo", "setPasswordLoginKey"), e } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, o["a"]), m(t, [{ key: "_getInitialState", value: function() { return { keys: n.a.Map(), privateKeyStorage_error: !1, pending_operation_count: 0, privateKeyStorage_error_add_key: null, privateKeyStorage_error_loading: null } } }, { key: "setPasswordLoginKey", value: function(e) { var t = this.state.keys.set(e.pubkey, e); this.setState({ keys: t }) } }, { key: "onLoadDbData", value: function(e) { var t = this; this.pendingOperation(), this.setState(this._getInitialState()); var r = n.a.Map().asMutable(); e(s.a.cursor("private_keys", function(e) { if (e) { var a = Object(c.a)(e.value); r.set(a.pubkey, a), p.a.add(a.pubkey), e.continue() } else t.setState({ keys: r.asImmutable() }) }).then(function() { t.pendingOperationDone() }).catch(function(e) { throw t.setState(t._getInitialState()), t.privateKeyStorageError("loading", e), e })) } }, { key: "hasKey", value: function(e) { return this.state.keys.has(e) } }, { key: "getPubkeys", value: function() { return this.state.keys.keySeq().toArray() } }, { key: "getPubkeys_having_PrivateKey", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null , r = []; if (e) { var a = !0 , n = !1 , i = void 0; try { for (var o, s = e[Symbol.iterator](); !(a = (o = s.next()).done); a = !0) { var l = o.value; this.hasKey(l) && r.push(l) } } catch (e) { n = !0, i = e } finally { try { !a && s.return && s.return() } finally { if (n) throw i } } } if (t) { var c = p.a.getState().addresses , u = !0 , d = !1 , h = void 0; try { for (var m, f = t[Symbol.iterator](); !(u = (m = f.next()).done); u = !0) { var g = m.value , _ = c.get(g); r.push(_) } } catch (e) { d = !0, h = e } finally { try { !u && f.return && f.return() } finally { if (d) throw h } } } return r } }, { key: "getTcomb_byPubkey", value: function(e) { return e ? (e.Q && (e = e.toPublicKeyString()), this.state.keys.get(e)) : null } }, { key: "onAddKey", value: function(e) { var t = this , r = e.private_key_object , a = e.transaction , n = e.resolve; this.state.keys.has(r.pubkey) ? n({ result: "duplicate", id: null }) : (this.pendingOperation(), this.state.keys = this.state.keys.set(r.pubkey, Object(c.a)(r)), this.setState({ keys: this.state.keys }), p.a.add(r.pubkey), n(new Promise(function(e, n) { Object(c.a)(r); var i = !1 , o = s.a.add(a.objectStore("private_keys"), r); o.catch(function(e) { var r = e.target.error; if (console.log("... error", r, e), "ConstraintError" != r.name || -1 == r.message.indexOf("by_encrypted_key")) throw t.privateKeyStorageError("add_key", r), e; i = !0, e.preventDefault() }).then(function() { return t.pendingOperationDone(), i ? { result: "duplicate", id: null } : (null == r.brainkey_sequence && t.binaryBackupRecommended(), s.a.on_transaction_end(a).then(function() { t.setState({ keys: t.state.keys }) }), { result: "added", id: r.id }) }), e(o) } ))) } }, { key: "addPrivateKeys_noindex", value: function(e, t) { var r = this , a = t.objectStore("private_keys") , n = 0 , i = this.state.keys.withMutations(function(t) { var i = !0 , o = !1 , s = void 0; try { for (var l, u = e[Symbol.iterator](); !(i = (l = u.next()).done); i = !0) { var d = l.value; if (r.state.keys.has(d.pubkey)) n++; else { var p = Object(c.a)(d); a.add(d), t.set(d.pubkey, p), h.ChainStore.getAccountRefsOfKey(d.pubkey) } } } catch (e) { o = !0, s = e } finally { try { !i && u.return && u.return() } finally { if (o) throw s } } }); return this.setState({ keys: i }), this.binaryBackupRecommended(), n } }, { key: "binaryBackupRecommended", value: function() { d.a.set("backup_recommended", !0) } }, { key: "pendingOperation", value: function() { this.pending_operation_count++, this.setState({ pending_operation_count: this.pending_operation_count }) } }, { key: "pendingOperationDone", value: function() { if (0 == this.pending_operation_count) throw new Error("Pending operation done called too many times"); this.pending_operation_count--, this.setState({ pending_operation_count: this.pending_operation_count }) } }, { key: "privateKeyStorageError", value: function(e, t) { this.pendingOperationDone(); var r = { privateKeyStorage_error: !0 }; r["privateKeyStorage_error_" + e] = t, console.error("privateKeyStorage_error_" + e, t), this.setState(r) } }, { key: "decodeMemo", value: function(e) { var t = void 0 , r = !1 , a = this.state.keys.get(e.from) , n = this.state.keys.get(e.to) , i = a || n , o = a ? e.to : e.from; o = h.PublicKey.fromPublicKeyString(o); try { i = l.a.decryptTcomb_PrivateKey(i) } catch (e) { !0, i = null, r = !0 } if (i) { var s = !1; try { t = i ? h.Aes.decrypt_with_checksum(i, o, e.nonce, e.message).toString("utf-8") : null } catch (e) { console.log("transfer memo exception ...", e), t = "*", s = !0 } if (i && s) try { t = h.Aes.decrypt_with_checksum(i, o, e.nonce, e.message, !0).toString("utf-8") } catch (e) { console.log("transfer memo exception ...", e), t = "**" } } return { text: t, isMine: r } } }]), t }(); t.a = i.a.createStore(f, "PrivateKeyStore") } , , , , function(e, t, r) { "use strict"; var a = r(181) , n = r.n(a) , i = r(203) , o = r.n(i) , s = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var l = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return s(e, null, [{ key: "getFlagBooleans", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] , r = { charge_market_fee: !1, white_list: !1, override_authority: !1, transfer_restricted: !1, disable_force_settle: !1, global_settle: !1, disable_confidential: !1, witness_fed_asset: !1, committee_fed_asset: !1 }; if ("all" === e) { for (var a in r) t || -1 !== n.a.uia_permission_mask.indexOf(a) ? r[a] = !0 : delete r[a]; return r } for (var i in r) t || -1 !== n.a.uia_permission_mask.indexOf(i) ? e & n.a.permission_flags[i] && (r[i] = !0) : delete r[i]; return r } }, { key: "getFlags", value: function(e) { var t = 0; return Object.keys(n.a.permission_flags).forEach(function(r) { e[r] && "global_settle" !== r && (t += n.a.permission_flags[r]) }), t } }, { key: "getPermissions", value: function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] , r = 0; return (t ? Object.keys(n.a.permission_flags) : n.a.uia_permission_mask).forEach(function(t) { e[t] && "global_settle" !== t && (r += n.a.permission_flags[t]) }), t && e.global_settle && (r += n.a.permission_flags.global_settle), r } }, { key: "parseDescription", value: function(e) { var t = void 0; e = o()(e, { whiteList: [], stripIgnoreTag: !0 }); try { t = JSON.parse(e) } catch (e) {} for (var r in t) t[r] = o()(t[r], { whiteList: [], stripIgnoreTag: !0 }); return t || { main: e } } }, { key: "extractRawFeedPrice", value: function(e) { if (e.bitasset) return e.bitasset.current_feed.settlement_price; if (e.current_feed) return e.current_feed.settlement_price; if (e.settlement_price) return e.settlement_price; if (e.get("bitasset")) return e.getIn(["bitasset", "current_feed", "settlement_price"]); if (e.get("settlement_price")) return e.getIn(["settlement_price"]); if (e.get("current_feed")) return e.getIn(["current_feed", "settlement_price"]); throw "Feed price not found!" } }]), e }(); t.a = l } , , function(e, t, r) { "use strict"; var a = r(30) , n = r(44) , i = r(25) , o = r(19) , s = r(55) , l = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var c = new s.a("__graphene__") , u = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e), this.bindActions(n.a); var t = c.get("settings_v4", {}); void 0 === t.passwordLogin && (t.passwordLogin = !0); var r = t.passwordLogin; this.state = { locked: !0, passwordLogin: r, rememberMe: void 0 === t.rememberMe || t.rememberMe }, this.walletLockTimeout = this._getTimeout(), this.timeout = null, this.bindListeners({ onChangeSetting: i.a.changeSetting }) } return l(e, [{ key: "onUnlock", value: function(e) { var t = e.resolve , r = e.reject; if (this._setLockTimeout(), !o.a.isLocked()) return this.setState({ locked: !1 }), void t(); this.setState({ resolve: t, reject: r, locked: o.a.isLocked() }) } }, { key: "onLock", value: function(e) { var t = e.resolve; o.a.isLocked() ? t() : (o.a.onLock(), this.setState({ resolve: null, reject: null, locked: o.a.isLocked() }), this.state.rememberMe || Object(s.b)() || Object(s.c)("persistant"), t()) } }, { key: "onCancel", value: function() { "function" == typeof this.state.reject && this.state.reject({ isCanceled: !0 }), this.setState({ resolve: null, reject: null }) } }, { key: "onChange", value: function() { this.setState({ locked: o.a.isLocked() }) } }, { key: "onChangeSetting", value: function(e) { "walletLockTimeout" === e.setting ? (this.walletLockTimeout = e.value, this._clearLockTimeout(), this._setLockTimeout()) : "passwordLogin" === e.setting ? this.setState({ passwordLogin: e.value }) : "rememberMe" === e.setting && this.setState({ rememberMe: e.rememberMe }) } }, { key: "_setLockTimeout", value: function() { var e = this; this._clearLockTimeout(), this.walletLockTimeout && (this.timeout = setTimeout(function() { o.a.isLocked() || (console.log("auto locking after", e.walletLockTimeout, "s"), o.a.onLock(), e.setState({ locked: !0 })) }, 1e3 * this.walletLockTimeout)) } }, { key: "_clearLockTimeout", value: function() { this.timeout && (clearTimeout(this.timeout), this.timeout = null) } }, { key: "_getTimeout", value: function() { return parseInt(c.get("lockTimeout", 600), 10) } }, { key: "onCheckLock", value: function() { this.setState({ locked: o.a.isLocked() }) } }]), e }(); t.a = a.a.createStore(u, "WalletUnlockStore") } , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(2238) , o = r(43) , s = r(45) , l = r(1) , c = r.n(l) , u = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var d = function(e) { function t() { return function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t), function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), u(t, [{ key: "shouldComponentUpdate", value: function(e) { return e.account !== this.props.account } }, { key: "render", value: function() { var e = this.props.account; if (!e) return n.a.createElement("span", null, this.props.account.get("id")); var t = this.props.maxDisplayAccountNameLength > 0 ? 20 : 1 / 0; return this.props.noLink ? n.a.createElement("span", null, e.substr(0, t), e.length > t ? "..." : null) : n.a.createElement(i.a, { onClick: this.props.onClick ? this.props.onClick : function() {} , to: "/account/" + e + "/" + this.props.subpage + "/" }, e.substr(0, t), e.length > t ? "..." : null) } }]), t }(); d.propTypes = { account: o.a.ChainAccountName.isRequired, subpage: c.a.string.isRequired, maxDisplayAccountNameLength: c.a.number }, d.defaultProps = { subpage: "overview", autosubscribe: !1, maxDisplayAccountNameLength: 20 }, t.a = Object(s.a)(d, { autosubscribe: !1 }) } , , , , , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(108) , o = r(15) , s = r(140) , l = r(111) , c = r(26) , u = r(25) , d = r(843) , p = r.n(d) , h = r(2) , m = r.n(h) , f = r(88) , g = r(441) , _ = r(67) , b = r(37) , y = r(1) , v = r.n(y) , w = r(2259) , k = r(7) , x = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]) } return e } , S = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e } , A = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function E(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function T(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function C(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } var z = function(e) { function t(e) { E(this, t); var r = T(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)) , a = _.a.getMarketName(r.props.base_asset, r.props.quote_asset) , n = a.marketName , i = a.first , o = a.second; return r.state = { isPopoverOpen: !1, marketName: n, first: i, second: o }, r.togglePopover = r.togglePopover.bind(r), r.closePopover = r.closePopover.bind(r), r } return C(t, n.a.Component), A(t, [{ key: "componentWillReceiveProps", value: function(e) { if (e.base_asset !== this.props.base_asset || e.quote_asset !== this.props.quote_asset) { var t = _.a.getMarketName(e.base_asset, e.quote_asset) , r = t.marketName , a = t.first , n = t.second; this.setState({ marketName: r, first: a, second: n }) } } }, { key: "togglePopover", value: function(e) { e.preventDefault(), this.setState({ isPopoverOpen: !this.state.isPopoverOpen }) } }, { key: "closePopover", value: function() { this.setState({ isPopoverOpen: !1 }) } }, { key: "onFlip", value: function() { var e = {}; e[this.state.marketName] = !this.props.marketDirections.get(this.state.marketName), u.a.changeMarketDirection(e) } }, { key: "shouldComponentUpdate", value: function(e, t) { return e.marketDirections !== this.props.marketDirections || e.base_amount !== this.props.base_amount || e.quote_amount !== this.props.quote_amount || e.decimals !== this.props.decimals || !o.a.are_equal_shallow(e.pulsate, this.props.pulsate) || !o.a.are_equal_shallow(t, this.state) } }, { key: "goToMarket", value: function(e) { e.preventDefault(); var t = this.state , r = t.marketName , a = t.first , n = t.second , i = this.props.marketDirections.get(r); this.props.history.push("/market/" + (i ? n.get("symbol") : a.get("symbol")) + "_" + (i ? a.get("symbol") : n.get("symbol"))) } }, { key: "render", value: function() { var e = this.props , t = e.base_asset , r = e.base_amount , a = e.quote_amount , o = e.marketDirections , s = e.hide_symbols , l = e.noPopOver , c = e.pulsate , u = this.state , d = u.marketName , h = u.first , _ = u.second; if (!h || !_) return n.a.createElement("span", null, "--"); var y = o.get(d) || this.props.invert; this.props.force_direction && _.get("symbol") === this.props.force_direction && y ? y = !1 : this.props.force_direction && h.get("symbol") === this.props.force_direction && !y && (y = !0); var v = void 0 , w = void 0; if (y ? (v = _, w = h) : (v = h, w = _), v.get("id") !== t.get("id")) { var A = r; r = a, a = A } var E = void 0; try { E = new b.i({ quote: new b.a({ asset_id: v.get("id"), precision: v.get("precision"), amount: r }), base: new b.a({ asset_id: w.get("id"), precision: w.get("precision"), amount: a }) }) } catch (e) { return null } var T = ""; if (!this.props.hide_value) { var C = this.props.ignorePriceFeed ? a / r : E.toReal(); if (this.props.factor && (C = this.props.negative_invert ? y ? C * this.props.factor : C / this.props.factor : y ? C / this.props.factor : C * this.props.factor), isNaN(C) || !isFinite(C)) return n.a.createElement("span", null, "--"); var z = this.props.decimals ? this.props.decimals : E.base.precision; z = Math.min(8, z), T = n.a.createElement(i.b, { value: C, minimumFractionDigits: Math.max(2, z), maximumFractionDigits: Math.max(2, z) }), c && ("object" !== (void 0 === c ? "undefined" : S(c)) && (c = {}), T = n.a.createElement(g.a, x({ value: C }, c), T)) } var B = s ? "" : n.a.createElement(k.Tooltip, { placement: "bottom", title: l ? "Click to invert the price" : null }, n.a.createElement("span", { className: l ? "clickable inline-block" : "", onClick: l ? this.onFlip.bind(this) : null }, n.a.createElement(f.a, { name: w.get("symbol"), noTip: l }), "/", n.a.createElement(f.a, { name: v.get("symbol"), noTip: l }))) , O = l || s ? null : n.a.createElement("div", null, n.a.createElement("div", { className: "button", onClick: this.onFlip.bind(this) }, n.a.createElement(m.a, { content: "exchange.invert" })), n.a.createElement("div", { className: "button", onClick: this.goToMarket.bind(this) }, n.a.createElement(m.a, { content: "exchange.to_market" }))) , P = O ? n.a.createElement(p.a, { isOpen: this.state.isPopoverOpen, onOuterAction: this.closePopover, body: O }, n.a.createElement("span", { className: "currency click-for-help", onClick: this.togglePopover }, B)) : null; return n.a.createElement("span", { className: "formatted-price" }, T, " ", P || B) } }]), t }(); z.propTypes = { base_amount: v.a.any, quote_amount: v.a.any, decimals: v.a.number }, z = Object(s.a)(z, { propNames: ["base_asset", "quote_asset"] }), z = Object(w.a)(z); var B = function(e) { function t() { return E(this, t), T(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return C(t, n.a.Component), A(t, [{ key: "render", value: function() { return n.a.createElement(l.a, { stores: [c.a], inject: { marketDirections: function() { return c.a.getState().marketDirections } } }, n.a.createElement(z, this.props)) } }]), t }(); t.a = B } , , , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(4) , o = r.n(i) , s = r(839) , l = r.n(s) , c = r(22) , u = r(7); t.a = function(e) { var t = e.className , r = void 0 === t ? "button" : t , a = e.text , i = void 0 === a ? "" : a , s = e.tip , d = void 0 === s ? "tooltip.copy_tip" : s , p = e.dataPlace , h = void 0 === p ? "right" : p , m = e.buttonIcon , f = void 0 === m ? "clippy" : m , g = e.buttonText , _ = void 0 === g ? "" : g; return n.a.createElement(u.Tooltip, { placement: h, title: o.a.translate(d) }, n.a.createElement("div", null, n.a.createElement(l.a, { "data-clipboard-text": i, className: r }, _ || n.a.createElement(c.a, { name: f, title: "icons.clippy.copy" })))) } } , function(e, t, r) { "use strict"; r.d(t, "c", function() { return c }), r.d(t, "f", function() { return u }), r.d(t, "d", function() { return d }), r.d(t, "e", function() { return p }), r.d(t, "b", function() { return h }), r.d(t, "a", function() { return m }), r.d(t, "g", function() { return f }); var a = r(14) , n = r(231) , i = r(78) , o = r(4) , s = r.n(o) , l = function() { return function(e, t) { if (Array.isArray(e)) return e; if (Symbol.iterator in Object(e)) return function(e, t) { var r = [] , a = !0 , n = !1 , i = void 0; try { for (var o, s = e[Symbol.iterator](); !(a = (o = s.next()).done) && (r.push(o.value), !t || r.length !== t); a = !0) ; } catch (e) { n = !0, i = e } finally { try { !a && s.return && s.return() } finally { if (n) throw i } } return r }(e, t); throw new TypeError("Invalid attempt to destructure non-iterable instance") } }(); function c(e) { if ("1.2.0" === e.get("issuer")) return s.a.translate("exchange.native"); var t = "PPY" === e.get("symbol") ? "RUDEX" : e.get("symbol").split(".")[0]; return u("PPY" === e.get("symbol") ? "RUDEX.PPY" : e.get("symbol")) ? i.b[t].name : null } function u(e) { var t = ""; return t = "PPY" === e ? "RUDEX" : e.split(".")[0], -1 !== i.c.indexOf(t) } function d(e) { var t = this , r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "depositAllowed" , a = this.state.gatewayStatus , n = function(n) { a[n].options.enabled = !1, t.props.backedCoins.get(n.toUpperCase(), []).find(function(t) { var i = t.backingCoinType || t.backingCoin , o = void 0 === t.isAvailable || "boolean" == typeof t.isAvailable && t.isAvailable; if (-1 !== i.toUpperCase().indexOf("EOS.")) { var s = i.split(".") , c = l(s, 2); c[0]; i = c[1] } t[r] && o && e == i && (a[n].options.enabled = !0) }) }; for (var i in a) n(i); return a } function p(e, t) { var r = m(e).selectedGateway , a = h(e, t); return a ? "RUDEX" === r ? a.issuerId || a.issuer : a.intermediateAccount || a.issuer : void 0 } function h(e, t) { var r = m(e).selectedGateway; return t.get(r, []).find(function(t) { return t.symbol.toUpperCase() === e.toUpperCase() }) || {} } function m(e) { var t = e.split(".") , r = l(t, 2) , a = r[0] , n = r[1]; return "PPY" === e && (a = "RUDEX", n = "PPY"), { selectedGateway: a, selectedAsset: n } } function f() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "4018d784"; if (a.Apis.instance().chain_id && a.Apis.instance().chain_id.substr(0, 8) === e) for (var t in n.a.fetchPairs.defer(), i.b) i.b[t].isEnabled && (i.b[t].isSimple ? n.a.fetchCoinsSimple.defer({ backer: i.b[t].id, url: i.b[t].baseAPI.BASE + i.b[t].baseAPI.COINS_LIST }) : n.a.fetchCoins.defer({ backer: i.b[t].id, url: i.b[t].baseAPI.BASE + i.b[t].baseAPI.COINS_LIST, urlBridge: i.b[t].baseAPI.BASE + i.b[t].baseAPI.TRADING_PAIRS, urlWallets: i.b[t].baseAPI.BASE + i.b[t].baseAPI.ACTIVE_WALLETS })) } } , , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(69) , i = r(99) , o = r(5) , s = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var l = function(e) { function t() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var e = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.state = e._getInitialState(), e.bindListeners({ onIncommingFile: n.c.incommingWebFile, onIncommingBuffer: n.c.incommingBuffer, onReset: n.c.reset }), e._export("setWalletObjct"), e } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, i["a"]), s(t, [{ key: "_getInitialState", value: function() { return { name: null, contents: null, sha1: null, size: null, last_modified: null, public_key: null, wallet_object: null } } }, { key: "setWalletObjct", value: function(e) { this.setState({ wallet_object: e }) } }, { key: "onReset", value: function() { this.setState(this._getInitialState()) } }, { key: "onIncommingFile", value: function(e) { var t = e.name , r = e.contents , a = e.last_modified , n = o.hash.sha1(r).toString("hex") , i = r.length , s = u(r); this.setState({ name: t, contents: r, sha1: n, size: i, last_modified: a, public_key: s }) } }, { key: "onIncommingBuffer", value: function(e) { var t = e.name , r = e.contents , a = e.public_key; this.onReset(); var n = o.hash.sha1(r).toString("hex") , i = r.length; a || (a = u(r)), this.setState({ name: t, contents: r, sha1: n, size: i, public_key: a }) } }]), t }() , c = a.a.createStore(l, "BackupStore"); function u(e) { try { return o.PublicKey.fromBuffer(e.slice(0, 33)) } catch (e) { console.error(e, e.stack) } } t.a = c } , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(351) , o = r(43) , s = r(45) , l = r(11) , c = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]) } return e } , u = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function d(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function p(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function h(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } var m = function(e) { function t() { d(this, t); var e = p(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.getDynamicObject = e.getDynamicObject.bind(e), e } return h(t, n.a.Component), u(t, [{ key: "getDynamicObject", value: function(e) { return this.props.dos.find(function(t) { return t && t.get("id") === e }) } }, { key: "render", value: function() { return n.a.cloneElement(n.a.Children.only(this.props.children), c({}, this.props, { getDynamicObject: this.getDynamicObject })) } }]), t }(); m.propTypes = { dos: o.a.ChainObjectsList }, m.defaultProps = { dos: Object(l.List)() }, m = Object(s.a)(m), t.a = function(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; t.propNames = t.propNames || [t.asList ? "assets" : "asset"]; var r = t.propNames.reduce(function(e, r) { return e[r] = t.asList ? o.a.ChainAssetsList : o.a.ChainAsset.isRequired, e }, {}) , a = Object.keys(r).reduce(function(e, r) { var a = t.defaultProps && t.defaultProps[r]; return e[r] = t.asList ? Object(l.List)(a || []) : a || "1.3.0", e }, {}); t.defaultProps && t.defaultProps.tempComponent && (a.tempComponent = t.defaultProps.tempComponent); var f = function(e) { function r() { return d(this, r), p(this, (r.__proto__ || Object.getPrototypeOf(r)).apply(this, arguments)) } return h(r, n.a.Component), u(r, [{ key: "render", value: function() { var e = this , r = {} , a = {} , i = Object(l.List)(); Object.keys(this.props).forEach(function(n) { e.props[n] && -1 !== t.propNames.indexOf(n) ? (t.withDynamic && (t.asList ? e.props[n].forEach(function(e) { e && (i = i.push(e.get("dynamic_asset_data_id"))) }) : i = i.push(e.props[n].get("dynamic_asset_data_id"))), r[n] = t.asList ? e.props[n].filter(function(e) { return !!e }) : e.props[n]) : a[n] = e.props[n] }); var o = n.a.cloneElement(n.a.Children.only(this.props.children), c({}, a, r)); return t.withDynamic ? n.a.createElement(m, { dos: i }, o) : o } }]), r }(); f.propTypes = r, f.defaultProps = a, f = Object(s.a)(f); var g = function(t) { function r() { return d(this, r), p(this, (r.__proto__ || Object.getPrototypeOf(r)).apply(this, arguments)) } return h(r, n.a.Component), u(r, [{ key: "render", value: function() { return n.a.createElement(f, this.props, n.a.createElement(e, { ref: "bound_component" })) } }]), r }(); return g.displayName = "Wrapper(" + Object(i.a)(e) + ")", g } } , , , , , , , function(e, t, r) { "use strict"; var a = r(11) , n = r.n(a) , i = r(30) , o = r(258) , s = r(5) , l = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var c = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e), this.blocks = n.a.Map(), this.latestBlocks = n.a.List(), this.latestTransactions = n.a.List(), this.rpc_connection_status = null, this.no_ws_connection = !1, this.blockHeaders = new Map, this.bindListeners({ onGetBlock: o.a.getBlock, onGetLatest: o.a.getLatest, onGetHeader: o.a.getHeader, onUpdateRpcConnectionStatus: o.a.updateRpcConnectionStatus }), this.maxBlocks = 30 } return l(e, [{ key: "onGetHeader", value: function(e) { var t = e.header , r = e.height; if (!t || !r) return !1; /Z$/.test(t.timestamp) || (t.timestamp += "Z"), t.timestamp = new Date(t.timestamp), this.blockHeaders.set(r, t) } }, { key: "onGetBlock", value: function(e) { this.blocks.get(e.id) || (/Z$/.test(e.timestamp) || (e.timestamp += "Z"), e.timestamp = new Date(e.timestamp), this.blocks = this.blocks.set(e.id, e)) } }, { key: "onGetLatest", value: function(e) { var t = this , r = e.block , a = e.maxBlock; "string" == typeof r.timestamp && (/Z$/.test(r.timestamp) || (r.timestamp += "Z")), r.timestamp = new Date(r.timestamp), this.blocks = this.blocks.set(r.id, r), r.id > a - this.maxBlocks && (this.latestBlocks = this.latestBlocks.unshift(r), this.latestBlocks.size > this.maxBlocks && (this.latestBlocks = this.latestBlocks.pop()), r.transactions.length > 0 && r.transactions.forEach(function(e) { e.block_num = r.id, t.latestTransactions = t.latestTransactions.unshift(e) }), this.latestTransactions.size > this.maxBlocks && (this.latestTransactions = this.latestTransactions.pop())) } }, { key: "onUpdateRpcConnectionStatus", value: function(e) { var t = this.rpc_connection_status; "reconnect" === e ? s.ChainStore.resetCache(!1) : this.rpc_connection_status = e, null === t && "error" === e && (this.no_ws_connection = !0), this.no_ws_connection && "open" === e && (this.no_ws_connection = !1), "closed" === e && (this.no_ws_connection = !0) } }]), e }(); t.a = i.a.createStore(c, "BlockchainStore") } , , , , , function(e, t, r) { "use strict"; (function(e) { r.d(t, "c", function() { return _ }), r.d(t, "d", function() { return s }), r.d(t, "b", function() { return u }), r.d(t, "a", function() { return b }), r.d(t, "e", function() { return y }); var a = r(5) , n = r(37) , i = function() { return function(e, t) { if (Array.isArray(e)) return e; if (Symbol.iterator in Object(e)) return function(e, t) { var r = [] , a = !0 , n = !1 , i = void 0; try { for (var o, s = e[Symbol.iterator](); !(a = (o = s.next()).done) && (r.push(o.value), !t || r.length !== t); a = !0) ; } catch (e) { n = !0, i = e } finally { try { !a && s.return && s.return() } finally { if (n) throw i } } return r }(e, t); throw new TypeError("Invalid attempt to destructure non-iterable instance") } }() , o = a.ChainTypes.operations; function s(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; return new Promise(function(n, i) { Object(a.FetchChain)("getObject", "2.0.0").then(function(a) { n(_(e, t, a, r)) }).catch(i) } ) } var l = {} , c = 6e4; function u() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} , t = e.accountID , r = e.feeID , o = void 0 === r ? "1.3.0" : r , u = e.type , d = void 0 === u ? "transfer" : u , p = e.options , h = void 0 === p ? null : p , m = e.data , f = e.operationsCount , g = void 0 === f ? 1 : f , _ = t + "_" + o + "_" + d + "_" + JSON.stringify(h) + "_" + JSON.stringify(m) + "_" + g; return l[_] ? l[_].result ? Promise.resolve(l[_].result) : new Promise(function(e, t) { l[_].queue.push({ res: e, rej: t }) } ) : new Promise(function(e, r) { l[_] = { queue: [{ res: e, rej: r }], result: null }, Promise.all([s(d, h, m), function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} , t = e.assetID , r = e.type , n = void 0 === r ? "transfer" : r , o = e.options , l = void 0 === o ? null : o , c = e.data; return new Promise(function(e) { "1.3.0" === t ? e(!0) : Promise.all([s(n, l, c), Object(a.FetchChain)("getObject", t.replace(/^1\./, "2."))]).then(function(t) { var r = i(t, 2) , a = r[0] , n = r[1]; e(parseInt(n.get("fee_pool"), 10) >= a) }) } ) }({ assetID: o, type: d, options: h, data: m }), Object(a.FetchChain)("getAccount", t), Object(a.FetchChain)("getAsset", "1.3.0"), "1.3.0" !== o ? Object(a.FetchChain)("getAsset", o) : null]).then(function(e) { var t = i(e, 5) , r = t[0] , s = t[1] , u = t[2] , d = t[3] , p = t[4] , h = !1; "1.3.0" === o && (p = d); var m = u.getIn(["balances", "1.3.0"]) , f = u.getIn(["balances", o]); if ("1.3.0" === o && !m) return l[_].queue.forEach(function(e) { e.res({ fee: new n.a({ amount: r * g }), hasBalance: h, hasPoolBalance: s }) }), l[_] = { result: { fee: new n.a({ amount: r * g }), hasBalance: h, hasPoolBalance: s } }, void setTimeout(function() { delete l[_] }, c); Promise.all([m ? Object(a.FetchChain)("getObject", m) : null, f ? Object(a.FetchChain)("getObject", f) : null]).then(function(e) { var t = i(e, 2) , a = t[0] , u = t[1] , m = new n.a({ amount: r * g }) , f = !0; if ("1.3.0" !== o) { var b = p.getIn(["options", "core_exchange_rate"]) , y = b.get("base").toJS(); y.precision = y.asset_id === o ? p.get("precision") : d.get("precision"); var v = new n.a(y) , w = b.get("quote").toJS(); w.precision = w.asset_id === o ? p.get("precision") : d.get("precision"); var k = new n.a(w); try { var x = new n.i({ base: v, quote: k }); m = m.times(x, !0) } catch (e) { u = a, f = !1, s = !1 } } u && u.get("balance") >= m.getAmount() && (h = !0), l[_].queue.forEach(function(e) { e.res({ fee: m, hasBalance: h, hasPoolBalance: s, hasValidCER: f }) }), l[_] = { result: { fee: m, hasBalance: h, hasPoolBalance: s, hasValidCER: f } }, setTimeout(function() { delete l[_] }, c) }) }).catch(function() { l[_].queue.forEach(function(e) { e.rej() }) }) } ) } var d = "5KikQ23YhcM7jdfHbFBQg1G7Do5y6SgD9sdBZq7BqQWXmNH7gqo" , p = a.TransactionHelper.unique_nonce_uint64() , h = void 0 , m = void 0 , f = void 0 , g = {}; function _(t, r, n) { var i = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {}; if (i.content && (i.content = new Array(i.content.length + 1).join("a")), !n) return 0; var s = t + JSON.stringify(r) + JSON.stringify(i); if (g[s]) return g[s]; var l = o[t] , c = n.getIn(["parameters", "current_fees", "parameters", l, 1]); c || (c = n.getIn(["parameters", "current_fees", "parameters", 0, 1])); var u = 0; if ((c = c.toJS()).fee && (u += c.fee), r) { var _ = !0 , b = !1 , y = void 0; try { for (var v, w = r[Symbol.iterator](); !(_ = (v = w.next()).done); _ = !0) { var k = v.value , x = c[k]; if ("price_per_kbyte" === k) { if ("memo" === i.type && i.content) { var S = h || a.PrivateKey.fromWif(d); h && (h = S); var A = "BTS8eLeqSZZtB1YHdw7KjQxRSRmaKAseCxhUSqaLxUdqvdGpp6nck" , E = void 0; E = i.content === f && m ? m : m = a.Aes.encrypt_with_checksum(S, A, p, i.content); var T = { from: "BTS6B1taKXkDojuC1qECjvC7g186d8AdeGtz8wnqWAsoRGC6RY8Rp", to: A, nonce: p, message: E } , C = a.ops.memo_data.fromObject(T) , z = JSON.stringify(a.ops.memo_data.toHex(C)); u += x * e.byteLength(z, "hex") / 1024, f = i.content } } else x && (u += x) } } catch (e) { b = !0, y = e } finally { try { !_ && w.return && w.return() } finally { if (b) throw y } } } return u = u * n.getIn(["parameters", "current_fees", "scale"]) / 1e4, g[s] = u, setTimeout(function() { delete g[s] }, 3e5), u } function b(e, t, r, a) { if (!e) return null; if ("string" == typeof e && (e = parseFloat(String.prototype.replace.call(e, /,/g, ""))), !a || 0 === a.get("balance")) return !1; var i = new n.a({ asset_id: t.get("id"), precision: t.get("precision"), real: e }) , o = i.clone(a.get("balance")); return !o.lt(i) && (i.asset_id !== r.asset_id || (i.plus(r), !o.lt(i))) } function y(e, t) { if (e && t && "1.3.0" === t.asset_id) { var r = e.getIn(["balances", t.asset_id]); return Object(a.FetchChain)("getObject", r).then(function(e) { if (e.get("balance") <= t.amount) return !0 }) } return new Promise(function(e) { return e(!1) } ) } } ).call(this, r(126).Buffer) } , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(30) , n = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var i = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return n(e, [{ key: "addKey", value: function(e, t) { return function(r) { return new Promise(function(a) { r({ private_key_object: e, transaction: t, resolve: a }) } ) } } }, { key: "loadDbData", value: function() { return function(e) { return new Promise(function(t) { e(t) } ) } } }]), e }(); t.a = a.a.createActions(i) } , , function(e, t, r) { "use strict"; var a = r(30) , n = r(14) , i = r(4) , o = r.n(i) , s = r(141) , l = r.n(s) , c = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var u = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return c(e, [{ key: "confirm", value: function(e, t, r) { return { transaction: e, resolve: t, reject: r } } }, { key: "broadcast", value: function(e, t, r) { return function(a) { a({ broadcasting: !0, closed: !0 }); var i = setTimeout(function() { a({ broadcast: !1, broadcasting: !1, error: o.a.translate("trx_error.expire"), closed: !1 }), r && r() }, 2e3 * n.ChainConfig.expire_in_secs); e.broadcast(function() { a({ broadcasting: !1, broadcast: !0 }) }).then(function(e) { clearTimeout(i), a({ error: null, broadcasting: !1, broadcast: !0, included: !0, trx_id: e[0].id, trx_block_num: e[0].block_num, broadcasted_transaction: !0 }), t && t() }).catch(function(e) { console.error(e), clearTimeout(i); var t = e.message.split("\n")[0]; a({ broadcast: !1, broadcasting: !1, error: t, closed: !1 }), r && r() }) } } }, { key: "wasBroadcast", value: function(e) { return e } }, { key: "wasIncluded", value: function(e) { return e } }, { key: "close", value: function() { return l.a.publish("transaction_confirm_actions", "close"), !0 } }, { key: "error", value: function(e) { return { error: e } } }, { key: "togglePropose", value: function() { return !0 } }, { key: "proposeFeePayingAccount", value: function(e) { return e } }]), e }(); t.a = a.a.createActions(u) } , , , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(2238) , o = r(140) , s = r(88) , l = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var c = function(e) { function t() { return function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t), function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), l(t, [{ key: "render", value: function() { var e = this.props.asset.get("symbol") , t = n.a.createElement(s.a, { name: e, noTip: !0 }); return this.props.noLink ? t : n.a.createElement(i.a, { to: "/asset/" + e + "/" }, t) } }]), t }(); t.a = Object(o.a)(c) } , , , , function(e, t) { e.exports = { permission_flags: { charge_market_fee: 1, white_list: 2, override_authority: 4, transfer_restricted: 8, disable_force_settle: 16, global_settle: 32, disable_confidential: 64, witness_fed_asset: 128, committee_fed_asset: 256 }, uia_permission_mask: ["charge_market_fee", "white_list", "override_authority", "transfer_restricted", "disable_confidential"], GRAPHENE_100_PERCENT: 1e4, GRAPHENE_1_PERCENT: 100, GRAPHENE_MAX_SHARE_SUPPLY: "1000000000000000" } } , , function(e, t, r) { "use strict"; r.d(t, "d", function() { return g }), r.d(t, "b", function() { return m }), r.d(t, "c", function() { return f }), r.d(t, "a", function() { return h }); var a = r(0) , n = r.n(a) , i = r(2) , o = r.n(i) , s = r(4) , l = r.n(s) , c = r(134) , u = r(2238) , d = r(7) , p = r(15); function h() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "depositAllowed" , t = {}; return this.props.backedCoins.forEach(function(r, a) { r.forEach(function(n) { var i = n.symbol.split(".").pop(); t[i] || (t[i] = []), n[e] && ("OPEN" != r || n.isAvailable) && t[i].push(a) }) }), t } function m() { var e = this.state , t = e.gatewayStatus , r = e.selectedAsset , a = 0; for (var n in t) this.props.backedCoins.get(n.toUpperCase(), []).find(function(e) { ((r == e.backingCoinType || r == e.backingCoin) && e.depositAllowed || e.isAvailable) && a++ }); return a } function f(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "depositAllowed" , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null , a = this.props || {} , n = a.balances , i = a.assets , o = c.d.call(this, e, t) , s = this.state.selectedGateway || null , l = {}; n && i && n.forEach(function(e) { if (e && e.toJS) { var t = i.get(e.get("asset_type")); if (t) { var r = t.symbol.split("."); if (2 == r.length) { var a = r[1] , n = r[0]; l[a] || (l[a] = {}), l[a][n] = e.get("balance") } } } }); var u = this.state.coinToGatewayMapping; if (e != this.state.selectedAsset && u && u[e]) { var d = u[e]; if (d.length && !r) if (l[e]) { var p = null , h = null; for (var m in l[e]) { var f = l[e][m]; p || (p = f), h || (h = m) } s = d[d.indexOf(h)] || d[0] } else s = d[0]; else d.length && r && (s = r(u[e], l[e])) } return this.setState({ selectedAsset: e, selectedGateway: s, gatewayStatus: o }), { selectedAsset: e, selectedGateway: s } } function g(e) { var t = e.selectedGateway , r = e.gatewayStatus , a = e.nAvailableGateways , i = e.error , s = e.onGatewayChanged , c = e.selectedAsset , h = void 0 === c ? null : c , m = e.balances , f = void 0 === m ? null : m , g = e.assets , _ = void 0 === g ? null : g , b = {}; f && _ && f.forEach(function(e) { if (e && e.toJS) { var t = _.get(e.get("asset_type")); if (t) { var r = t.symbol.split("."); if (2 == r.length) { var a = r[1] , n = r[0]; b[a] || (b[a] = {}), b[a][n] = [e.get("balance"), t] } } } }); var y = t && r[t] ? "/help/gateways/" + r[t].name.toLowerCase().replace("-", "") : null , v = []; return Object.keys(r).map(function(e) { v.push(r[e]), r[e].id == t && (t = r[e].name) }), v.sort(function(e, t) { return e.name > t.name ? 1 : e.name < t.name ? -1 : 0 }), n.a.createElement("div", null, n.a.createElement("div", { className: "no-margin no-padding" }, n.a.createElement("section", { className: "block-list" }, n.a.createElement("label", { className: "left-label" }, n.a.createElement(o.a, { content: "modal.deposit_withdraw.gateway" }), t ? n.a.createElement(u.a, { to: y, style: { cursor: "pointer" } }, " ", n.a.createElement(d.Icon, { type: "question-circle" })) : null, n.a.createElement("span", { className: "floatRight error-msg" }, !i && t && r[t] && !r[t].options.enabled ? n.a.createElement(o.a, { content: "modal.deposit_withdraw.disabled", with: { gateway: r[t].name } }) : null, i ? n.a.createElement(o.a, { content: "modal.deposit_withdraw.wallet_error" }) : null, t || 0 != a ? null : n.a.createElement(o.a, { content: "modal.deposit_withdraw.no_gateway_available" }))), n.a.createElement("div", { className: "inline-label input-wrapper" }, n.a.createElement(d.Select, { optionLabelProp: "value", onChange: s, placeholder: l.a.translate("modal.deposit_withdraw.select_gateway"), value: t, style: { width: "100%" } }, v.map(function(e) { if (e.options.enabled) return n.a.createElement(d.Select.Option, { key: e.name, value: e.id }, e.name, b && b[h] && b[h][e.id] ? n.a.createElement("span", { style: { float: "right" } }, p.a.format_asset(b[h][e.id][0], b[h][e.id][1])) : null) })))))) } } , , function(e, t, r) { "use strict"; var a = r(11) , n = r.n(a) , i = r(30) , o = r(93) , s = r(67) , l = r(55) , c = r(5) , u = r(15) , d = r(37) , p = r(107) , h = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]) } return e } , m = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function f(e, t, r) { return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e } var g = { getPrice: function() { return 0 }, sellPrice: function() { return 0 } } , _ = new l.a("__graphene__") , b = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e), this.markets = n.a.Map(), this.asset_symbol_to_id = {}, this.pendingOrders = n.a.Map(), this.marketLimitOrders = n.a.Map(), this.marketCallOrders = n.a.Map(), this.allCallOrders = [], this.feedPrice = null, this.marketSettleOrders = n.a.OrderedSet(), this.activeMarketHistory = n.a.OrderedSet(), this.marketData = { bids: [], asks: [], calls: [], combinedBids: [], highestBid: g, combinedAsks: [], lowestAsk: g, flatBids: [], flatAsks: [], flatCalls: [], flatSettles: [], groupedBids: [], groupedAsks: [] }, this.totals = { bid: 0, ask: 0, call: 0 }, this.priceData = [], this.pendingCreateLimitOrders = [], this.activeMarket = null, this.quoteAsset = null, this.pendingCounter = 0, this.buckets = [15, 60, 300, 3600, 86400], this.bucketSize = this._getBucketSize(), this.priceHistory = [], this.lowestCallPrice = null, this.marketBase = "BTS", this.marketStats = n.a.Map({ change: 0, volumeBase: 0, volumeQuote: 0 }), this.marketReady = !1; var t = _.get("allMarketStats", {}); for (var r in t) t[r].price && (t[r].price = new d.i({ base: new d.a(h({}, t[r].price.base)), quote: new d.a(h({}, t[r].price.quote)) })); this.allMarketStats = n.a.Map(t), this.onlyStars = _.get("onlyStars", !1), this.baseAsset = { id: "1.3.0", symbol: "BTS", precision: 5 }, this.coreAsset = { id: "1.3.0", symbol: "CORE", precision: 5 }, this.trackedGroupsConfig = [], this.currentGroupLimit = 0, this.bindListeners({ onSubscribeMarket: o.a.subscribeMarket, onUnSubscribeMarket: o.a.unSubscribeMarket, onChangeBase: o.a.changeBase, onChangeBucketSize: o.a.changeBucketSize, onCancelLimitOrderSuccess: o.a.cancelLimitOrderSuccess, onCloseCallOrderSuccess: o.a.closeCallOrderSuccess, onCallOrderUpdate: o.a.callOrderUpdate, onGetMarketStats: o.a.getMarketStats, onSettleOrderUpdate: o.a.settleOrderUpdate, onSwitchMarket: o.a.switchMarket, onFeedUpdate: o.a.feedUpdate, onToggleStars: o.a.toggleStars, onGetTrackedGroupsConfig: o.a.getTrackedGroupsConfig, onChangeCurrentGroupLimit: o.a.changeCurrentGroupLimit }), this.subscribers = new Map, this.exportPublicMethods({ subscribe: this.subscribe.bind(this), unsubscribe: this.unsubscribe.bind(this), clearSubs: this.clearSubs.bind(this) }) } return m(e, [{ key: "subscribe", value: function(e, t) { if (this.subscribers.has(e) && this.subscribers.get(e) === t) return console.error("Subscribe callback already exists", t); this.subscribers.set(e, t) } }, { key: "unsubscribe", value: function(e) { this.subscribers.has(e) && this.subscribers.delete(e) } }, { key: "_notifySubscriber", value: function(e, t) { this.subscribers.has(e) && this.subscribers.get(e)(t) } }, { key: "clearSubs", value: function() { this.subscribers.clear() } }, { key: "onGetCollateralPositions", value: function(e) { this.borrowMarketState = { totalDebt: e.totalDebt, totalCollateral: e.totalCollateral } } }, { key: "_getBucketSize", value: function() { return parseInt(_.get("bucketSize", 14400)) } }, { key: "_setBucketSize", value: function(e) { this.bucketSize = e, _.set("bucketSize", e) } }, { key: "onChangeBase", value: function(e) { this.marketBase = e } }, { key: "onChangeBucketSize", value: function(e) { this._setBucketSize(e) } }, { key: "onToggleStars", value: function() { this.onlyStars = !this.onlyStars, _.set("onlyStars", this.onlyStars) } }, { key: "onUnSubscribeMarket", value: function(e) { e.unSub ? this.activeMarket = null : this.activeMarket = e.market, e.resolve && e.resolve() } }, { key: "onSwitchMarket", value: function() { this.marketReady = !1 } }, { key: "onClearMarket", value: function() { this.activeMarket = null, this.is_prediction_market = !1, this.marketLimitOrders = this.marketLimitOrders.clear(), this.marketCallOrders = this.marketCallOrders.clear(), this.allCallOrders = [], this.feedPrice = null, this.marketSettleOrders = this.marketSettleOrders.clear(), this.activeMarketHistory = this.activeMarketHistory.clear(), this.marketData = { bids: [], asks: [], calls: [], combinedBids: [], highestBid: g, combinedAsks: [], lowestAsk: g, flatBids: [], flatAsks: [], flatCalls: [], flatSettles: [], groupedBids: [], groupedAsks: [] }, this.totals = { bid: 0, ask: 0, call: 0 }, this.lowestCallPrice = null, this.pendingCreateLimitOrders = [], this.priceHistory = [], this.marketStats = n.a.Map({ change: 0, volumeBase: 0, volumeQuote: 0 }) } }, { key: "_marketHasCalls", value: function() { var e = this.quoteAsset , t = this.baseAsset; return !(!e.has("bitasset") || e.getIn(["bitasset", "options", "short_backing_asset"]) !== t.get("id")) || !(!t.has("bitasset") || t.getIn(["bitasset", "options", "short_backing_asset"]) !== e.get("id")) } }, { key: "onSubscribeMarket", value: function(e) { var t, r = this, a = !1; if (e.switchMarket) return this.marketReady = !1, this.emitChange(); var n = !1 , i = !1; this.invertedCalls = e.inverted, this.quoteAsset = c.ChainStore.getAsset(e.quote.get("id")), this.baseAsset = c.ChainStore.getAsset(e.base.get("id")); var o = (f(t = {}, this.quoteAsset.get("id"), { precision: this.quoteAsset.get("precision") }), f(t, this.baseAsset.get("id"), { precision: this.baseAsset.get("precision") }), t); if (e.market && e.market !== this.activeMarket && (this.onClearMarket(), this.activeMarket = e.market, a = !0, this.unsubscribe("subscribeBars")), this.feedPrice = this._getFeed(), e.buckets && (this.buckets = e.buckets, -1 === e.buckets.indexOf(this.bucketSize) && (this.bucketSize = e.buckets[e.buckets.length - 1])), e.buckets && (this.buckets = e.buckets), e.limits) { var s = this.marketLimitOrders; this.marketLimitOrders = this.marketLimitOrders.clear(), e.limits.forEach(function(e) { "number" != typeof e.for_sale && (e.for_sale = parseInt(e.for_sale, 10)), e.expiration = new Date(e.expiration), r.marketLimitOrders = r.marketLimitOrders.set(e.id, new d.g(e,o,r.quoteAsset.get("id"))) }), n = Object(d.k)(this.marketLimitOrders, s); for (var l = function(e) { var t = r.pendingCreateLimitOrders[e]; r.marketLimitOrders.find(function(e) { return t.seller === e.seller && t.expiration === e.expiration }) && r.pendingCreateLimitOrders.splice(e, 1) }, u = this.pendingCreateLimitOrders.length - 1; u >= 0; u--) l(u); 0 === this.pendingCreateLimitOrders.length && (this.pendingCounter = 0) } if (e.calls) { var p = this.marketCallOrders; this.allCallOrders = e.calls, this.marketCallOrders = this.marketCallOrders.clear(), e.calls.forEach(function(e) { try { var t = r[r.invertedCalls ? "baseAsset" : "quoteAsset"].getIn(["bitasset", "current_feed", "maintenance_collateral_ratio"]) , a = new d.b(e,o,r.quoteAsset.get("id"),r.feedPrice,t,r.is_prediction_market); a.isMarginCalled() && (r.marketCallOrders = r.marketCallOrders.set(e.id, a, t)) } catch (e) { console.error("Unable to construct calls array, invalid feed price or prediction market?") } }), i = Object(d.k)(this.marketCallOrders, p) } if (this.updateSettleOrders(e), e.history && (this.activeMarketHistory = this.activeMarketHistory.clear(), e.history.forEach(function(e) { e.op.is_maker || 0 == e.op.receives.amount || 0 == e.op.pays.amount || (r.activeMarketHistory = r.activeMarketHistory.add(new d.e(e,o,r.quoteAsset.get("id")))) })), e.fillOrders && e.fillOrders.forEach(function(e) { r.activeMarketHistory = r.activeMarketHistory.add(new d.e(e[0][1],o,r.quoteAsset.get("id"))) }), e.ticker) { var h = this.quoteAsset.get("symbol") + "_" + this.baseAsset.get("symbol") , m = this._calcMarketStats(this.baseAsset, this.quoteAsset, h, e.ticker); this.allMarketStats = this.allMarketStats.set(h, m); var g = this._invertMarketStats(m, h) , _ = g.invertedStats , b = g.invertedMarketName; this.allMarketStats = this.allMarketStats.set(b, _), this._saveMarketStats(), this.marketStats = this.marketStats.set("change", m.change), this.marketStats = this.marketStats.set("volumeBase", m.volumeBase), this.marketStats = this.marketStats.set("volumeQuote", m.volumeQuote) } if ((i || n) && (this._orderBook(n, i), this._depthChart()), e.price && (this.priceHistory = e.price, this._priceChart()), e.groupedOrdersBids.length > 0 || e.groupedOrdersAsks.length > 0) { var y = [] , v = []; e.groupedOrdersBids.forEach(function(e, t) { y.push(new d.f(e,o,!0)) }), e.groupedOrdersAsks.forEach(function(e, t) { v.push(new d.f(e,o,!1)) }), this._groupedOrderBook(y, v), this._depthChart() } this.marketReady = !0, this.emitChange(), a && this._notifySubscriber("market_change", this.quoteAsset.get("symbol") + "_" + this.baseAsset.get("symbol")), e.resolve && e.resolve() } }, { key: "onCancelLimitOrderSuccess", value: function(e) { var t = this; if (!e || !e.length) return !1; var r = !1; e.forEach(function(e) { e && t.marketLimitOrders.has(e) && (r = !0, t.marketLimitOrders = t.marketLimitOrders.delete(e)) }), 0 === this.marketLimitOrders.size && (this.marketData.bids = [], this.marketData.flatBids = [], this.marketData.asks = [], this.marketData.flatAsks = []), r && (this._orderBook(!0, !1), this._depthChart()) } }, { key: "onCloseCallOrderSuccess", value: function(e) { if (!e || !this.marketCallOrders.has(e)) return !1; this.marketCallOrders = this.marketCallOrders.delete(e), 0 === this.marketCallOrders.size && (this.marketData.calls = [], this.marketData.flatCalls = []), this._orderBook(!1, !0), this._depthChart() } }, { key: "onCallOrderUpdate", value: function(e) { if (!(e && this.quoteAsset && this.baseAsset && this.feedPrice)) return !1; if (e.call_price.quote.asset_id === this.quoteAsset.get("id") || e.call_price.quote.asset_id === this.baseAsset.get("id")) { var t, r = (f(t = {}, this.quoteAsset.get("id"), { precision: this.quoteAsset.get("precision") }), f(t, this.baseAsset.get("id"), { precision: this.baseAsset.get("precision") }), t); try { var a = this[this.invertedCalls ? "baseAsset" : "quoteAsset"].getIn(["bitasset", "current_feed", "maintenance_collateral_ratio"]) , n = new d.b(e,r,this.quoteAsset.get("id"),this.feedPrice,a); n.isMarginCalled() && (this.marketCallOrders = this.marketCallOrders.set(e.id, n, a), this._orderBook(!1, !0), this._depthChart()) } catch (t) { console.error("Unable to construct calls array, invalid feed price or prediction market?", e, this.quoteAsset && this.quoteAsset.get("id"), this.baseAsset && this.baseAsset.get("id")) } } } }, { key: "onFeedUpdate", value: function(e) { var t = this; if (!this.quoteAsset || !this.baseAsset) return !1; if (e.get("id") !== this[this.invertedCalls ? "baseAsset" : "quoteAsset"].get("id")) return !1; this[this.invertedCalls ? "baseAsset" : "quoteAsset"] = e; var r = !1 , a = this._getFeed(); if ((a && !this.feedPrice || this.feedPrice && this.feedPrice.ne(a)) && (r = !0), r) { var n; this.feedPrice = a; var i = (f(n = {}, this.quoteAsset.get("id"), { precision: this.quoteAsset.get("precision") }), f(n, this.baseAsset.get("id"), { precision: this.baseAsset.get("precision") }), n); this.marketCallOrders = this.marketCallOrders.clear(), this.allCallOrders.forEach(function(e) { try { var r = t[t.invertedCalls ? "baseAsset" : "quoteAsset"].getIn(["bitasset", "current_feed", "maintenance_collateral_ratio"]); new d.b(e,i,t.quoteAsset.get("id"),t.feedPrice,r,t.is_prediction_market).isMarginCalled() && (t.marketCallOrders = t.marketCallOrders.set(e.id, new d.b(e,i,t.quoteAsset.get("id"),t.feedPrice,r))) } catch (e) { console.error("Unable to construct calls array, invalid feed price or prediction market?") } }), this._orderBook(!0, !0), this._depthChart() } } }, { key: "_getFeed", value: function() { var e; if (!this._marketHasCalls()) return this.bitasset_options = null, this.is_prediction_market = !1, null; var t = (f(e = {}, this.quoteAsset.get("id"), { precision: this.quoteAsset.get("precision") }), f(e, this.baseAsset.get("id"), { precision: this.baseAsset.get("precision") }), e) , r = p.a.extractRawFeedPrice(this[this.invertedCalls ? "baseAsset" : "quoteAsset"]); try { var a = this[this.invertedCalls ? "baseAsset" : "quoteAsset"].getIn(["bitasset", "current_feed", "maximum_short_squeeze_ratio"]); if (this.is_prediction_market = this[this.invertedCalls ? "baseAsset" : "quoteAsset"].getIn(["bitasset", "is_prediction_market"], !1), this.bitasset_options = this[this.invertedCalls ? "baseAsset" : "quoteAsset"].getIn(["bitasset", "options"]).toJS(), this.is_prediction_market && r.getIn(["base", "asset_id"]) === r.getIn(["quote", "asset_id"])) { var n = this.bitasset_options.short_backing_asset; t[n] || (t[n] = { precision: this.quoteAsset.get("precision") }), r = (r = (r = (r = r.setIn(["base", "amount"], 1)).setIn(["base", "asset_id"], n)).setIn(["quote", "amount"], 1)).setIn(["quote", "asset_id"], this.quoteAsset.get("id")), a = 1e3 } return new d.d({ priceObject: r, market_base: this.quoteAsset.get("id"), sqr: a, assets: t }) } catch (e) { return console.error(this.activeMarket, "does not have a properly configured feed price"), null } } }, { key: "_priceChart", value: function() { for (var e = [], t = void 0, r = void 0, a = void 0, n = void 0, i = void 0, o = 0; o < this.priceHistory.length; o++) { var s = function(e, t) { return e !== 1 / 0 && t !== 1 / 0 ? Math.max(e, t) : e === 1 / 0 ? t : e } , l = function(e, t) { return 0 !== e && 0 !== t ? Math.min(e, t) : 0 === e ? t : e } , c = this.priceHistory[o]; /Z$/.test(c.key.open) || (c.key.open += "Z"); var d = new Date(c.key.open); this.quoteAsset.get("id") === c.key.quote ? (r = u.a.get_asset_price(c.high_base, this.baseAsset, c.high_quote, this.quoteAsset), a = u.a.get_asset_price(c.low_base, this.baseAsset, c.low_quote, this.quoteAsset), t = u.a.get_asset_price(c.open_base, this.baseAsset, c.open_quote, this.quoteAsset), n = u.a.get_asset_price(c.close_base, this.baseAsset, c.close_quote, this.quoteAsset), i = u.a.get_asset_amount(c.quote_volume, this.quoteAsset)) : (a = u.a.get_asset_price(c.high_quote, this.baseAsset, c.high_base, this.quoteAsset), r = u.a.get_asset_price(c.low_quote, this.baseAsset, c.low_base, this.quoteAsset), t = u.a.get_asset_price(c.open_quote, this.baseAsset, c.open_base, this.quoteAsset), n = u.a.get_asset_price(c.close_quote, this.baseAsset, c.close_base, this.quoteAsset), i = u.a.get_asset_amount(c.base_volume, this.quoteAsset)), 0 === a && (a = l(t, n)), (isNaN(r) || r === 1 / 0) && (r = s(t, n)), n !== 1 / 0 && 0 !== n || (n = t), t !== 1 / 0 && 0 !== t || (t = n), r > (t + n) / 2 * 1.3 && (r = s(t, n)), a < (t + n) / 2 * .7 && (a = l(t, n)), e.push({ time: d.getTime(), open: t, high: r, low: a, close: n, volume: i }) } this.priceData = e, this._notifySubscriber("subscribeBars") } }, { key: "_orderBook", value: function() { var e = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0] , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; e && (this.marketData.bids = function(e) { var t = e.filter(function(e) { return e.isBid() }).sort(function(e, t) { return e.getPrice() - t.getPrice() }).map(function(e) { return e }).toArray(); if (t.length > 1) for (var r = t.length - 2; r >= 0; r--) t[r].getPrice() === t[r + 1].getPrice() && (t[r] = t[r].sum(t[r + 1]), t.splice(r + 1, 1)); return t }(this.marketLimitOrders), this.marketData.asks = function(e) { var t = e.filter(function(e) { return !e.isBid() }).sort(function(e, t) { return e.getPrice() - t.getPrice() }).map(function(e) { return e }).toArray(); if (t.length > 1) for (var r = t.length - 2; r >= 0; r--) t[r].getPrice() === t[r + 1].getPrice() && (t[r] = t[r].sum(t[r + 1]), t.splice(r + 1, 1)); return t }(this.marketLimitOrders), t || this._combineOrders()), t && (this.marketData.calls = this.constructCalls(this.marketCallOrders), this._combineOrders()) } }, { key: "_groupedOrderBook", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; if (e && t) { 0; var r = new d.a({ asset_id: this.quoteAsset.get("id"), precision: this.quoteAsset.get("precision") }) , a = new d.a({ asset_id: this.baseAsset.get("id"), precision: this.baseAsset.get("precision") }); e.sort(function(e, t) { return t.getPrice() - e.getPrice() }).forEach(function(e) { a.plus(e.amountForSale()), r.plus(e.amountToReceive(!0)), e.setTotalForSale(a.clone()), e.setTotalToReceive(r.clone()) }), r = new d.a({ asset_id: this.baseAsset.get("id"), precision: this.baseAsset.get("precision") }), a = new d.a({ asset_id: this.quoteAsset.get("id"), precision: this.quoteAsset.get("precision") }), t.sort(function(e, t) { return e.getPrice() - t.getPrice() }).forEach(function(e) { a.plus(e.amountForSale()), r.plus(e.amountToReceive(!1)), e.setTotalForSale(a.clone()), e.setTotalToReceive(r.clone()) }), this.marketData.groupedBids = e, this.marketData.groupedAsks = t } } }, { key: "constructCalls", value: function(e) { var t = this , r = []; if (e.size) { if ((r = e.sort(function(e, t) { return e.getPrice() - t.getPrice() }).map(function(e) { return t.invertedCalls ? t.lowestCallPrice = t.lowestCallPrice ? Math.max(t.lowestCallPrice, e.getPrice(!1)) : e.getPrice(!1) : t.lowestCallPrice = t.lowestCallPrice ? Math.min(t.lowestCallPrice, e.getPrice(!1)) : e.getPrice(!1), e }).toArray()).length > 1) for (var a = r.length - 2; a >= 0; a--) r[a] = r[a].sum(r[a + 1]), r.splice(a + 1, 1) } else this.lowestCallPrice = null; return r } }, { key: "_saveMarketStats", value: function() { var e = this; this.saveStatsTimeout || (this.saveStatsTimeout = setTimeout(function() { _.set("allMarketStats", e.allMarketStats.toJS()), e.saveStatsTimeout = null }, 3e4)) } }, { key: "_combineOrders", value: function() { var e = void 0 , t = void 0; !!this.marketCallOrders.size && this.marketCallOrders.first().isBid() ? (e = this.marketData.bids.concat(this.marketData.calls), t = this.marketData.asks.concat([])) : (e = this.marketData.bids.concat([]), t = this.marketData.asks.concat(this.marketData.calls)); var r = new d.a({ asset_id: this.quoteAsset.get("id"), precision: this.quoteAsset.get("precision") }) , a = new d.a({ asset_id: this.baseAsset.get("id"), precision: this.baseAsset.get("precision") }); e.sort(function(e, t) { return t.getPrice() - e.getPrice() }).forEach(function(e) { r.plus(e.amountToReceive(!0)), a.plus(e.amountForSale()), e.setTotalForSale(a.clone()), e.setTotalToReceive(r.clone()) }), r = new d.a({ asset_id: this.baseAsset.get("id"), precision: this.baseAsset.get("precision") }), a = new d.a({ asset_id: this.quoteAsset.get("id"), precision: this.quoteAsset.get("precision") }), t.sort(function(e, t) { return e.getPrice() - t.getPrice() }).forEach(function(e) { a.plus(e.amountForSale()), r.plus(e.amountToReceive(!1)), e.setTotalForSale(a.clone()), e.setTotalToReceive(r.clone()) }), this.marketData.lowestAsk = t.length ? t[0] : g, this.marketData.highestBid = e.length ? e[0] : g, this.marketData.combinedBids = e, this.marketData.combinedAsks = t } }, { key: "_depthChart", value: function() { var e = this , t = [] , r = [] , a = [] , n = 0 , i = 0 , o = 0 , l = [] , c = [] , u = [] , d = []; if (this.marketLimitOrders.size && (this.marketData.bids.forEach(function(e) { t.push([e.getPrice(), e.amountToReceive().getAmount({ real: !0 })]), n += e.amountForSale().getAmount({ real: !0 }) }), this.marketData.asks.forEach(function(e) { r.push([e.getPrice(), e.amountForSale().getAmount({ real: !0 })]) }), r.sort(function(e, t) { return e[0] - t[0] }), t.sort(function(e, t) { return e[0] - t[0] }), (l = s.a.flatten_orderbookchart_highcharts(t, !0, !0, 1e3)).length && l.unshift([0, l[0][1]]), (c = s.a.flatten_orderbookchart_highcharts(r, !0, !1, 1e3)).length && (c.push([1.5 * c[c.length - 1][0], c[c.length - 1][1]]), i = c[c.length - 1][1])), this.marketData.calls.length) { var p = this.marketData.calls[0].isBid(); this.marketData.calls.forEach(function(e) { a.push([e.getSqueezePrice(), e[e.isBid() ? "amountToReceive" : "amountForSale"]().getAmount({ real: !0 })]) }), a.forEach(function(t) { e.invertedCalls ? o += t[1] : o += t[1] * t[0] }), p ? n += o : i += o, a.sort(function(e, t) { return e[0] - t[0] }), this.invertedCalls ? (u = s.a.flatten_orderbookchart_highcharts(a, !0, !1, 1e3), c.length && u[u.length - 1][0] < c[c.length - 1][0] && u.push([c[c.length - 1][0], u[u.length - 1][1]])) : (u = s.a.flatten_orderbookchart_highcharts(a, !0, !0, 1e3)).length > 0 && u.unshift([0, u[0][1]]) } this.marketSettleOrders.size && (d = this.marketSettleOrders.reduce(function(e, t) { return e ? (e[0][1] = e[0][1] + t[t.isBid() ? "amountToReceive" : "amountForSale"]().getAmount({ real: !0 }), e) : [[t.getPrice(), t[t.isBid() ? "amountToReceive" : "amountForSale"]().getAmount({ real: !0 })]] }, null), this.feedPrice.inverted ? d.push([c[c.length - 1][0], d[0][1]]) : d.unshift([0, d[0][1]])), this.marketData.groupedBids.length > 0 && this.marketData.groupedAsks.length > 0 && (t = [], r = [], n = 0, i = 0, this.marketData.groupedBids.forEach(function(e) { t.push([e.getPrice(), e.amountToReceive().getAmount({ real: !0 })]), n += e.amountForSale().getAmount({ real: !0 }) }), this.marketData.groupedAsks.forEach(function(e) { r.push([e.getPrice(), e.amountForSale().getAmount({ real: !0 })]) }), r.sort(function(e, t) { return e[0] - t[0] }), t.sort(function(e, t) { return e[0] - t[0] }), (l = s.a.flatten_orderbookchart_highcharts(t, !0, !0, 1e3)).length && l.unshift([0, l[0][1]]), (c = s.a.flatten_orderbookchart_highcharts(r, !0, !1, 1e3)).length && (c.push([1.5 * c[c.length - 1][0], c[c.length - 1][1]]), i = c[c.length - 1][1])), this.marketData.flatAsks = c, this.marketData.flatBids = l, this.marketData.flatCalls = u, this.marketData.flatSettles = d, this.totals = { bid: n, ask: i, call: o } } }, { key: "_calcMarketStats", value: function(e, t, r, a) { var n = new d.a({ real: parseFloat(a.base_volume), asset_id: e.get("id"), precision: e.get("precision") }) , i = new d.a({ real: parseFloat(a.quote_volume), asset_id: t.get("id"), precision: t.get("precision") }) , o = void 0; try { o = new d.i({ base: n, quote: i, real: parseFloat(a.latest) }) } catch (e) {} var s = o ? { base: o.base.toObject(), quote: o.quote.toObject() } : null; return o && isNaN(o.toReal()) && (o = void 0, s = null), { change: parseFloat(a.percent_change).toFixed(2), volumeBase: n.getAmount({ real: !0 }), volumeQuote: i.getAmount({ real: !0 }), price: o, close: s } } }, { key: "_invertMarketStats", value: function(e, t) { var r = t.split("_")[1] + "_" + t.split("_")[0]; return { invertedStats: { change: (100 * (1 / (1 + parseFloat(e.change) / 100) - 1)).toFixed(2), price: e.price ? e.price.invert() : e.price, volumeBase: e.volumeQuote, volumeQuote: e.volumeBase, close: e.close ? { base: e.close.quote, quote: e.close.base } : e.close }, invertedMarketName: r } } }, { key: "onGetMarketStats", value: function(e) { if (e && e.tickers) { for (var t = 0; t < e.tickers.length; t++) { var r = this._calcMarketStats(e.bases[t], e.quotes[t], e.markets[t], e.tickers[t]); this.allMarketStats = this.allMarketStats.set(e.markets[t], r); var a = this._invertMarketStats(r, e.markets[t]) , n = a.invertedStats , i = a.invertedMarketName; this.allMarketStats = this.allMarketStats.set(i, n) } return this._saveMarketStats(), !0 } return !1 } }, { key: "onSettleOrderUpdate", value: function(e) { this.updateSettleOrders(e) } }, { key: "updateSettleOrders", value: function(e) { var t = this; if (e.settles && e.settles.length) { var r, a = (f(r = {}, this.quoteAsset.get("id"), { precision: this.quoteAsset.get("precision") }), f(r, this.baseAsset.get("id"), { precision: this.baseAsset.get("precision") }), r); this.marketSettleOrders = this.marketSettleOrders.clear(), e.settles.forEach(function(e) { e.settlement_date = new Date(e.settlement_date + "Z"), t.marketSettleOrders = t.marketSettleOrders.add(new d.j(e,a,t.quoteAsset.get("id"),t.feedPrice,t.bitasset_options)) }) } } }, { key: "onGetTrackedGroupsConfig", value: function(e) { e.trackedGroupsConfig.length > 0 && (this.trackedGroupsConfig = e.trackedGroupsConfig) } }, { key: "onChangeCurrentGroupLimit", value: function(e) { this.currentGroupLimit = e } }]), e }(); t.a = i.a.createStore(b, "MarketsStore") } , , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(4) , o = r.n(i) , s = r(1) , l = r.n(s) , c = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var u = function(e) { function t(e) { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var r = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.state = { selected: null }, r.default_placeholder = o.a.translate("account.select_placeholder"), r } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), c(t, [{ key: "componentDidMount", value: function() {} }, { key: "shouldComponentUpdate", value: function(e) { return e.selected !== this.props.selected || e.list_size !== this.props.list_size || e.placeholder !== this.props.placeholder || e.account_names !== this.props.account_names } }, { key: "value", value: function() { return this.state.selected } }, { key: "reset", value: function() { this.setState({ selected: null }) } }, { key: "render", value: function() { var e = this.props.account_names , t = this.props.selected , r = this.props.placeholder || this.default_placeholder; r = this.props.list_size > 1 ? n.a.createElement("option", { value: "", disabled: !0 }, r) : n.a.createElement("option", { value: "" }, r); var a = 0; return n.a.createElement("select", { ref: "account-selector", key: t, defaultValue: t, className: "form-control account-select bts-select " + (this.props.className || ""), onChange: this._onAccountChange.bind(this), style: this.props.center ? { margin: "0 auto" } : null, tabIndex: this.props.tabIndex }, r, e.sort().map(function(e) { return e && "" !== e ? n.a.createElement("option", { key: a++, value: e }, e) : null })) } }, { key: "_onAccountChange", value: function(e) { e.preventDefault(); var t = e.target.value; this._selectAccount(t) } }, { key: "_selectAccount", value: function(e) { e === (this.props.placeholder || this.default_placeholder) && (e = null), this.setState({ selected: e }), this.props.onChange && this.props.onChange(e) } }]), t }(); u.propTypes = { account_names: l.a.array, list_size: l.a.number, onChange: l.a.func, placeholder: l.a.string, center: l.a.bool, tabIndex: l.a.number, className: l.a.string }, t.a = u } , , function(e, t, r) { "use strict"; var a = r(11) , n = r.n(a) , i = r(30) , o = r(231) , s = r(55) , l = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var c = new s.a("__graphene__") , u = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e), this.backedCoins = n.a.Map(c.get("backedCoins", {})), this.bridgeCoins = n.a.Map(n.a.fromJS(c.get("bridgeCoins", {}))), this.bridgeInputs = ["btc", "dash", "eth", "steem", "sbd", "doge", "bch", "ppy", "ltc"], this.down = n.a.Map({}), this.bindListeners({ onFetchCoins: o.a.fetchCoins, onFetchCoinsSimple: o.a.fetchCoinsSimple, onFetchPairs: o.a.fetchPairs }) } return l(e, [{ key: "onFetchCoins", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} , t = e.backer , r = e.coins , a = e.backedCoins , n = e.down; t && r && (this.backedCoins = this.backedCoins.set(t, a), c.set("backedCoins", this.backedCoins.toJS()), this.down = this.down.set(t, !1)), n && (this.down = this.down.set(n, !0)) } }, { key: "onFetchCoinsSimple", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} , t = e.backer , r = e.coins , a = e.down; t && r && (this.backedCoins = this.backedCoins.set(t, r), c.set("backedCoins", this.backedCoins.toJS()), this.down = this.down.set(t, !1)), a && (this.down = this.down.set(a, !0)) } }, { key: "onFetchPairs", value: function() { var e = this , t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} , r = t.coins , a = t.bridgeCoins , i = t.wallets , o = t.down; if (r && a && i) { var s = {}; r.forEach(function(e) { return s[e.coinType] = e }), a = a.filter(function(t) { return t && s[t.outputCoinType] && "bitshares2" === s[t.outputCoinType].walletType && -1 !== e.bridgeInputs.indexOf(t.inputCoinType) }).forEach(function(t) { t.isAvailable = -1 !== i.indexOf(s[t.outputCoinType].walletType), e.bridgeCoins = e.bridgeCoins.setIn([s[t.outputCoinType].walletSymbol, t.inputCoinType], n.a.fromJS(t)) }), c.set("bridgeCoins", this.bridgeCoins.toJS()) } o && (this.down = this.down.set(o, !0)) } }]), e }(); t.a = i.a.createStore(u, "GatewayStore") } , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(415) , i = r.n(n) , o = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var s = {}; i.a.forEach(function(e) { s[e] = r(1271)("./locale-" + e + ".json") }); var l = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return o(e, [{ key: "switchLocale", value: function(e) { return "en" === e ? { locale: e } : { locale: e, localeData: s[e] } } }, { key: "getLocale", value: function(e) { return e } }]), e }(); t.a = a.a.createActions(l) } , , , , function(e, t, r) { "use strict"; r.d(t, "b", function() { return n }), r.d(t, "a", function() { return i }); var a = r(70) , n = Object(a.struct)({ public_name: a.Str, created: a.Dat, last_modified: a.Dat, backup_date: Object(a.maybe)(a.Dat), password_pubkey: a.Str, encryption_key: a.Str, encrypted_brainkey: Object(a.maybe)(a.Str), brainkey_pubkey: a.Str, brainkey_sequence: a.Num, brainkey_backup_date: Object(a.maybe)(a.Dat), deposit_keys: Object(a.maybe)(a.Obj), chain_id: a.Str }, "WalletTcomb") , i = Object(a.struct)({ id: Object(a.maybe)(a.Num), pubkey: a.Str, label: Object(a.maybe)(a.Str), import_account_names: Object(a.maybe)(a.Arr), brainkey_sequence: Object(a.maybe)(a.Num), encrypted_key: a.Str }, "PrivateKeyTcomb") } , , , , , , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(50) , i = r(5) , o = r(14) , s = r(11) , l = r.n(s) , c = r(99) , u = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var d = void 0; d = r(1270); var p = function(e) { function t() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var e = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.state = { addresses: l.a.Map(), saving: !1 }, e.pubkeys = new Set, e._export("add", "addAll", "loadAddyMap"), e } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, c["a"]), u(t, [{ key: "saving", value: function() { this.state.saving || (this.state.saving = !0, this.setState({ saving: !0 })) } }, { key: "add", value: function(e) { var t = this; this.loadAddyMap().then(function() { var r = !1; if (!t.pubkeys.has(e)) { t.pubkeys.add(e), t.saving(); var a = i.key.addresses(e) , n = !0 , o = !1 , s = void 0; try { for (var l, c = a[Symbol.iterator](); !(n = (l = c.next()).done); n = !0) { var u = l.value; t.state.addresses = t.state.addresses.set(u, e), r = !0 } } catch (e) { o = !0, s = e } finally { try { !n && c.return && c.return() } finally { if (o) throw s } } r ? (t.setState({ addresses: t.state.addresses }), t.saveAddyMap()) : t.setState({ saving: !1 }) } }).catch(function(e) { throw e }) } }, { key: "addAll", value: function(e) { var t = this; return new Promise(function(r, a) { t.saving(), t.loadAddyMap().then(function() { var n = new d; n.postMessage({ pubkeys: e, address_prefix: o.ChainConfig.address_prefix }), n.onmessage = function(n) { try { var i = n.data , o = !1 , s = t.state.addresses.withMutations(function(r) { for (var a = 0; a < e.length; a++) { var n = e[a]; if (!t.pubkeys.has(n)) { t.pubkeys.add(n); var s = i[a] , l = !0 , c = !1 , u = void 0; try { for (var d, p = s[Symbol.iterator](); !(l = (d = p.next()).done); l = !0) { var h = d.value; r.set(h, n), o = !0 } } catch (e) { c = !0, u = e } finally { try { !l && p.return && p.return() } finally { if (c) throw u } } } } }); o ? (t.setState({ addresses: s }), t.saveAddyMap()) : t.setState({ saving: !1 }), r() } catch (e) { console.error("AddressIndex.addAll", e), a(e) } } }).catch(function(e) { throw e }) } ) } }, { key: "loadAddyMap", value: function() { var e = this; return this.loadAddyMapPromise ? this.loadAddyMapPromise : (this.loadAddyMapPromise = n.a.root.getProperty("AddressIndex").then(function(t) { e.state.addresses = t ? l.a.Map(t) : l.a.Map(), e.state.addresses.valueSeq().forEach(function(t) { return e.pubkeys.add(t) }), e.setState({ addresses: e.state.addresses }) }), this.loadAddyMapPromise) } }, { key: "saveAddyMap", value: function() { var e = this; clearTimeout(this.saveAddyMapTimeout), this.saveAddyMapTimeout = setTimeout(function() { return e.setState({ saving: !1 }), n.a.root.setProperty("AddressIndex", e.state.addresses.toObject()) }, 100) } }]), t }(); t.a = a.a.createStore(p, "AddressIndex") } , , , , , , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(82) , i = r(49) , o = function() { return function(e, t) { if (Array.isArray(e)) return e; if (Symbol.iterator in Object(e)) return function(e, t) { var r = [] , a = !0 , n = !1 , i = void 0; try { for (var o, s = e[Symbol.iterator](); !(a = (o = s.next()).done) && (r.push(o.value), !t || r.length !== t); a = !0) ; } catch (e) { n = !0, i = e } finally { try { !a && s.return && s.return() } finally { if (n) throw i } } return r }(e, t); throw new TypeError("Invalid attempt to destructure non-iterable instance") } }() , s = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var l = {} , c = function(e, t) { e({ down: t }) } , u = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return s(e, [{ key: "fetchCoins", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} , t = e.backer , r = void 0 === t ? "OPEN" : t , a = e.url , i = void 0 === a ? void 0 : a , s = e.urlBridge , u = void 0 === s ? void 0 : s , d = e.urlWallets , p = void 0 === d ? void 0 : d; return l["fetchCoins_" + r] ? {} : (l["fetchCoins_" + r] = !0, function(e) { var t = setTimeout(c.bind(null, e, r), 1e4); Promise.all([Object(n.d)(i), Object(n.f)(u), Object(n.g)(p)]).then(function(a) { clearTimeout(t), delete l["fetchCoins_" + r]; var i = o(a, 3) , s = i[0] , c = i[1] , u = i[2] , d = Object(n.h)({ allCoins: s, tradingPairs: c, backer: r }).filter(function(e) { return !!e.walletType }); d.forEach(function(e) { e.isAvailable = -1 !== u.indexOf(e.walletType) }), e({ coins: s, backedCoins: d, backer: r }) }).catch(function() { clearTimeout(t), delete l["fetchCoins_" + r], e({ coins: [], backedCoins: [], backer: r }) }) } ) } }, { key: "fetchCoinsSimple", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} , t = e.backer , r = void 0 === t ? "RUDEX" : t , a = e.url , i = void 0 === a ? void 0 : a; return l["fetchCoinsSimple_" + r] ? {} : (l["fetchCoinsSimple_" + r] = !0, function(e) { var t = setTimeout(c.bind(null, e, r), 1e4); Object(n.e)(i).then(function(a) { clearTimeout(t), delete l["fetchCoinsSimple_" + r], e({ coins: a, backer: r }) }).catch(function() { clearTimeout(t), delete l["fetchCoinsSimple_" + r], e({ coins: [], backer: r }) }) } ) } }, { key: "fetchPairs", value: function() { return l.fetchTradingPairs ? {} : (l.fetchTradingPairs = !0, function(e) { var t = setTimeout(c.bind(null, e, "TRADE"), 1e4); Promise.all([Object(n.d)(i.b.BASE + i.b.COINS_LIST), Object(n.f)(i.b.BASE + i.b.TRADING_PAIRS), Object(n.g)(i.b.BASE + i.b.ACTIVE_WALLETS)]).then(function(r) { clearTimeout(t), delete l.fetchTradingPairs; var a = o(r, 3) , n = a[0] , i = a[1] , s = a[2]; e({ coins: n, bridgeCoins: i, wallets: s }) }).catch(function() { delete l.fetchTradingPairs, e({ coins: [], bridgeCoins: [], wallets: [] }) }) } ) } }]), e }(); t.a = a.a.createActions(u) } , , function(e, t, r) { "use strict"; (function(e) { var a = r(44) , n = r(19) , i = r(5) , o = r(4) , s = r.n(o) , l = r(7) , c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e } , u = function() { return function(e, t) { if (Array.isArray(e)) return e; if (Symbol.iterator in Object(e)) return function(e, t) { var r = [] , a = !0 , n = !1 , i = void 0; try { for (var o, s = e[Symbol.iterator](); !(a = (o = s.next()).done) && (r.push(o.value), !t || r.length !== t); a = !0) ; } catch (e) { n = !0, i = e } finally { try { !a && s.return && s.return() } finally { if (n) throw i } } return r }(e, t); throw new TypeError("Invalid attempt to destructure non-iterable instance") } }(); function d(e) { return function() { var t = e.apply(this, arguments); return new Promise(function(e, r) { return function a(n, i) { try { var o = t[n](i) , s = o.value } catch (e) { return void r(e) } if (!o.done) return Promise.resolve(s).then(function(e) { a("next", e) }, function(e) { a("throw", e) }); e(s) }("next") } ) } } var p = { create_account: function(e, t, r, a, o, s, l) { var c = arguments.length > 7 && void 0 !== arguments[7] && arguments[7]; return i.ChainValidation.required(o, "registrar_id"), i.ChainValidation.required(s, "referrer_id"), new Promise(function(d, p) { return Promise.all([Object(i.FetchChain)("getAccount", o), Object(i.FetchChain)("getAccount", s)]).then(function(o) { var s = u(o, 2) , h = s[0] , m = s[1] , f = new i.TransactionBuilder; return f.add_type_operation("account_create", { fee: { amount: 0, asset_id: 0 }, registrar: h.get("id"), referrer: m.get("id"), referrer_percent: l, name: a, owner: { weight_threshold: 1, account_auths: [], key_auths: [[e, 1]], address_auths: [] }, active: { weight_threshold: 1, account_auths: [], key_auths: [[t, 1]], address_auths: [] }, options: { memo_key: r, voting_account: "1.2.5", num_witness: 0, num_committee: 0, votes: [] } }), n.a.process_transaction(f, null, c).then(function(e) { console.log("process_transaction then", e), d() }).catch(function(e) { console.log("process_transaction catch", e), p(e) }) }) } ) }, _get_memo_keys: function(e) { var t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1] , r = { public_key: null, private_key: null }; if (r.public_key = e.getIn(["options", "memo_key"]), /111111111111111111111/.test(r.public_key) && (r.public_key = null), t && (r.private_key = n.a.getPrivateKey(r.public_key), !r.private_key)) throw l.Notification.error({ message: s.a.translate("account.errors.memo_missing") }), new Error("Missing private memo key for sender: " + e.get("name")); return r }, _create_transfer_op: function(t) { var r = this , n = t.from_account , o = t.to_account , s = t.amount , l = t.asset , c = t.memo , d = t.propose_account , p = void 0 === d ? null : d , h = t.encrypt_memo , m = void 0 === h || h , f = t.optional_nonce , g = void 0 === f ? null : f , _ = t.fee_asset_id , b = void 0 === _ ? "1.3.0" : _ , y = t.transactionBuilder , v = void 0 === y ? null : y , w = a.a.unlock() , k = p || n; return Promise.all([Object(i.FetchChain)("getAccount", n), Object(i.FetchChain)("getAccount", o), Object(i.FetchChain)("getAccount", k), Object(i.FetchChain)("getAsset", l), Object(i.FetchChain)("getAsset", b), w]).then(function(t) { var a = u(t, 5) , n = a[0] , o = a[1] , l = a[2] , d = a[3] , h = a[4] , f = null; p && (f = l); var _ = void 0; if (c) { var y = r._get_memo_keys(l, m) , w = r._get_memo_keys(o, !1); if (y.public_key && w.public_key) { var k = null == g ? i.TransactionHelper.unique_nonce_uint64() : g; _ = { from: y.public_key, to: w.public_key, nonce: k, message: m ? i.Aes.encrypt_with_checksum(y.private_key, w.public_key, k, c) : e.isBuffer(c) ? c.toString("utf-8") : c } } } var x = h.toJS(); "1.3.0" === x.options.core_exchange_rate.base.asset_id && "1.3.0" === x.options.core_exchange_rate.quote.asset_id && (b = "1.3.0"); return { transfer_op: (null == v ? new i.TransactionBuilder : v).get_type_operation("transfer", { fee: { amount: 0, asset_id: b }, from: n.get("id"), to: o.get("id"), amount: { amount: s, asset_id: d.get("id") }, memo: _ }), chain_from: n, chain_to: o, chain_propose_account: f, chain_memo_sender: l, chain_asset: d, chain_fee_asset: h } }).catch(function(e) { console.error(e) }) }, transfer: function(e) { var t = e.from_account , r = e.to_account , a = e.amount , o = e.asset , s = e.memo , l = e.broadcast , c = void 0 === l || l , u = e.encrypt_memo , d = void 0 === u || u , p = e.optional_nonce , h = void 0 === p ? null : p , m = e.propose_account , f = void 0 === m ? null : m , g = e.fee_asset_id , _ = void 0 === g ? "1.3.0" : g , b = e.transactionBuilder , y = void 0 === b ? null : b; return null == y && (y = new i.TransactionBuilder), this._create_transfer_op({ from_account: t, to_account: r, amount: a, asset: o, memo: s, propose_account: f, encrypt_memo: d, optional_nonce: h, fee_asset_id: _, transactionBuilder: y }).then(function(e) { return y.update_head_block().then(function() { return f ? y.add_type_operation("proposal_create", { proposed_ops: [{ op: e.transfer_op }], fee_paying_account: e.chain_propose_account.get("id") }) : y.add_operation(e.transfer_op), n.a.process_transaction(y, null, c) }).catch(function(e) { console.error(e) }) }) }, transfer_list: function(e) { var t = this; return a.a.unlock().then(function() { var r = null , a = [] , o = new i.TransactionBuilder; return e.forEach(function(e) { e.transactionBuilder = o, a.push(t._create_transfer_op(e)) }), Promise.all(a).then(function(t) { return o.update_head_block().then(function() { var a = []; return t.forEach(function(t, n) { e[n].propose_account ? (null == r && (r = t.chain_propose_account), a.push({ op: t.transfer_op })) : o.add_operation(t.transfer_op) }), o.add_type_operation("proposal_create", { proposed_ops: a, fee_paying_account: r.get("id") }), n.a.process_transaction(o, null, !0) }) }).catch(function(e) { console.log(e) }) }) }, issue_asset: function(t, r, o, s, l) { var c = !(arguments.length > 5 && void 0 !== arguments[5]) || arguments[5] , d = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : null , p = a.a.unlock(); return Promise.all([Object(i.FetchChain)("getAccount", r), Object(i.FetchChain)("getAccount", t), p]).then(function(a) { var p = u(a, 2) , h = p[0] , m = p[1] , f = void 0 , g = void 0; l && c && (f = h.getIn(["options", "memo_key"]), /111111111111111111111/.test(f) && (f = null), g = m.getIn(["options", "memo_key"]), /111111111111111111111/.test(g) && (g = null)); var _ = void 0; if (c && l && !(_ = n.a.getPrivateKey(f))) throw new Error("Missing private memo key for sender: " + r); var b = void 0; if (l && g && f) { var y = null == d ? i.TransactionHelper.unique_nonce_uint64() : d; b = { from: f, to: g, nonce: y, message: c ? i.Aes.encrypt_with_checksum(_, g, y, l) : e.isBuffer(l) ? l.toString("utf-8") : l } } var v = new i.TransactionBuilder; return v.add_type_operation("asset_issue", { fee: { amount: 0, asset_id: 0 }, issuer: r, asset_to_issue: { amount: s, asset_id: o }, issue_to_account: t, memo: b }), n.a.process_transaction(v, null, !0) }) }, createWorker: function(e, t) { return new Promise(function(r, a) { var o = new i.TransactionBuilder , s = i.ChainStore.getAsset("1.3.0"); s || a(new Error("Can't find core asset, please try again")); var l = Math.pow(10, s.get("precision")) , c = i.ChainStore.getAccount(t).get("id"); c || a(new Error("Can't find the owner account, please try again")); try { o.add_type_operation("worker_create", { fee: { amount: 0, asset_id: 0 }, owner: c, work_begin_date: e.start, work_end_date: e.end, daily_pay: e.pay * l, name: e.title, url: e.url, initializer: [1, { pay_vesting_period_days: e.vesting }] }) } catch (e) { a(e) } n.a.process_transaction(o, null, !0).then(r).catch(a) } ) }, updateAccount: function(e) { var t = new i.TransactionBuilder; return t.add_type_operation("account_update", e), n.a.process_transaction(t, null, !0) }, _ensureAccount: function(e) { var t = this; return d(regeneratorRuntime.mark(function r() { return regeneratorRuntime.wrap(function(t) { for (; ; ) switch (t.prev = t.next) { case 0: if ("object" != (void 0 === e ? "undefined" : c(e)) || !e.get("id")) { t.next = 2; break } return t.abrupt("return", e); case 2: return t.next = 4, Object(i.FetchChain)("getAccount", e, !1); case 4: return t.abrupt("return", t.sent); case 5: case "end": return t.stop() } }, r, t) }))() }, _ensureAsset: function(e) { var t = this; return d(regeneratorRuntime.mark(function r() { return regeneratorRuntime.wrap(function(t) { for (; ; ) switch (t.prev = t.next) { case 0: if ("object" != (void 0 === e ? "undefined" : c(e)) || !e.get("id")) { t.next = 2; break } return t.abrupt("return", e); case 2: return t.next = 4, Object(i.FetchChain)("getAsset", e); case 4: return t.abrupt("return", t.sent); case 5: case "end": return t.stop() } }, r, t) }))() }, createWithdrawPermission: function(e, t, r, o, s, l) { var c = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : null , u = this , p = arguments.length > 7 && void 0 !== arguments[7] ? arguments[7] : "1.3.0" , h = !(arguments.length > 8 && void 0 !== arguments[8]) || arguments[8]; return d(regeneratorRuntime.mark(function d() { var m, f, g; return regeneratorRuntime.wrap(function(d) { for (; ; ) switch (d.prev = d.next) { case 0: return null == c && (c = new Date), "number" == typeof c && (c = new Date(c)), d.next = 4, a.a.unlock(); case 4: return d.next = 6, u._ensureAccount(e); case 6: return d.t0 = d.sent, d.next = 9, u._ensureAccount(t); case 9: return d.t1 = d.sent, d.next = 12, u._ensureAsset(r); case 12: return d.t2 = d.sent, d.next = 15, u._ensureAsset(p); case 15: return d.t3 = d.sent, m = { from: d.t0, to: d.t1, limitAsset: d.t2, feeAsset: d.t3 }, f = new i.TransactionBuilder, g = f.get_type_operation("withdraw_permission_create", { fee: { amount: 0, asset_id: m.feeAsset.get("id") }, withdraw_from_account: m.from.get("id"), authorized_account: m.to.get("id"), withdrawal_limit: { amount: o, asset_id: m.limitAsset.get("id") }, withdrawal_period_sec: s, periods_until_expiration: l, period_start_time: c }), f.add_operation(g), d.next = 22, n.a.process_transaction(f, null, h); case 22: if (f.tr_buffer) { d.next = 24; break } throw "Something went finalization the transaction, this should not happen"; case 24: case "end": return d.stop() } }, d, u) }))() }, updateWithdrawPermission: function(e, t, r, o, s, l, c) { var u = arguments.length > 7 && void 0 !== arguments[7] ? arguments[7] : null , p = this , h = arguments.length > 8 && void 0 !== arguments[8] ? arguments[8] : "1.3.0" , m = !(arguments.length > 9 && void 0 !== arguments[9]) || arguments[9]; return d(regeneratorRuntime.mark(function d() { var f, g, _; return regeneratorRuntime.wrap(function(d) { for (; ; ) switch (d.prev = d.next) { case 0: return null == u && (u = new Date), "number" == typeof u && (u = new Date(u)), d.next = 4, a.a.unlock(); case 4: return d.next = 6, p._ensureAccount(t); case 6: return d.t0 = d.sent, d.next = 9, p._ensureAccount(r); case 9: return d.t1 = d.sent, d.next = 12, p._ensureAsset(o); case 12: return d.t2 = d.sent, d.next = 15, p._ensureAsset(h); case 15: return d.t3 = d.sent, f = { from: d.t0, to: d.t1, limitAsset: d.t2, feeAsset: d.t3 }, g = new i.TransactionBuilder, _ = g.get_type_operation("withdraw_permission_update", { permission_to_update: e, fee: { amount: 0, asset_id: f.feeAsset.get("id") }, withdraw_from_account: f.from.get("id"), authorized_account: f.to.get("id"), withdrawal_limit: { amount: s, asset_id: f.limitAsset.get("id") }, withdrawal_period_sec: l, periods_until_expiration: c, period_start_time: u }), g.add_operation(_), d.next = 22, n.a.process_transaction(g, null, m); case 22: if (g.tr_buffer) { d.next = 24; break } throw "Something went finalization the transaction, this should not happen"; case 24: case "end": return d.stop() } }, d, p) }))() }, claimWithdrawPermission: function(t, r, o, s, l) { var c = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : null , u = this , p = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : "1.3.0" , h = !(arguments.length > 7 && void 0 !== arguments[7]) || arguments[7]; return d(regeneratorRuntime.mark(function d() { var m, f, g, _, b, y, v, w, k; return regeneratorRuntime.wrap(function(d) { for (; ; ) switch (d.prev = d.next) { case 0: return d.next = 2, a.a.unlock(); case 2: return d.next = 4, u._ensureAccount(r); case 4: return d.t0 = d.sent, d.next = 7, u._ensureAccount(o); case 7: return d.t1 = d.sent, d.next = 10, u._ensureAsset(s); case 10: return d.t2 = d.sent, d.next = 13, u._ensureAsset(p); case 13: return d.t3 = d.sent, m = { from: d.t0, to: d.t1, claimAsset: d.t2, feeAsset: d.t3 }, f = void 0, g = null, _ = !0, c && (b = u._get_memo_keys(m.to, !0), y = u._get_memo_keys(m.from, !1), b.public_key && y.public_key && (v = null == g ? i.TransactionHelper.unique_nonce_uint64() : g, f = { from: b.public_key, to: y.public_key, nonce: v, message: _ ? i.Aes.encrypt_with_checksum(b.private_key, y.public_key, v, c) : e.isBuffer(c) ? c.toString("utf-8") : c })), w = new i.TransactionBuilder, k = w.get_type_operation("withdraw_permission_claim", { fee: { amount: 0, asset_id: m.feeAsset.get("id") }, withdraw_permission: t, withdraw_from_account: m.from.get("id"), withdraw_to_account: m.to.get("id"), amount_to_withdraw: { amount: l, asset_id: m.claimAsset.get("id") }, memo: f || void 0 }), w.add_operation(k), d.next = 24, n.a.process_transaction(w, null, h); case 24: if (w.tr_buffer) { d.next = 26; break } throw "Something went finalization the transaction, this should not happen"; case 26: case "end": return d.stop() } }, d, u) }))() }, deleteWithdrawPermission: function(e, t, r) { var o = this , s = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : "1.3.0" , l = !(arguments.length > 4 && void 0 !== arguments[4]) || arguments[4]; return d(regeneratorRuntime.mark(function c() { var u, d, p; return regeneratorRuntime.wrap(function(c) { for (; ; ) switch (c.prev = c.next) { case 0: return c.next = 2, a.a.unlock(); case 2: return c.next = 4, o._ensureAccount(t); case 4: return c.t0 = c.sent, c.next = 7, o._ensureAccount(r); case 7: return c.t1 = c.sent, c.next = 10, o._ensureAsset(s); case 10: return c.t2 = c.sent, u = { from: c.t0, to: c.t1, feeAsset: c.t2 }, d = new i.TransactionBuilder, p = d.get_type_operation("withdraw_permission_delete", { fee: { amount: 0, asset_id: u.feeAsset.get("id") }, withdrawal_permission: e, withdraw_from_account: u.from.get("id"), authorized_account: u.to.get("id") }), d.add_operation(p), c.next = 17, n.a.process_transaction(d, null, l); case 17: if (d.tr_buffer) { c.next = 19; break } throw "Something went finalization the transaction, this should not happen"; case 19: case "end": return c.stop() } }, c, o) }))() } }; t.a = p } ).call(this, r(126).Buffer) } , , , , , , , , , , , , , , , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(14) , i = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var o = {} , s = {} , l = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return i(e, [{ key: "getHeader", value: function(e) { return s[e] ? {} : (s[e] = !0, function(t) { return n.Apis.instance().db_api().exec("get_block_header", [e]).then(function(r) { t({ header: { timestamp: r.timestamp, witness: r.witness }, height: e }) }) } ) } }, { key: "getLatest", value: function(e, t) { return function(r) { !o[e] && t && (o[e] = !0, n.Apis.instance().db_api().exec("get_block", [e]).then(function(a) { a && (a.id = e, r({ block: a, maxBlock: t })) }).catch(function(e) { console.log("Error in BlockchainActions.getLatest: ", e) })) } } }, { key: "getBlock", value: function(e) { return function(t) { n.Apis.instance().db_api().exec("get_block", [e]).then(function(r) { if (!r) return !1; r.id = e, t(r) }).catch(function(e) { console.log("Error in BlockchainActions.getBlock: ", e) }) } } }, { key: "updateRpcConnectionStatus", value: function(e) { return e } }]), e }() , c = a.a.createActions(l); n.Apis.setRpcConnectionStatusCallback(c.updateRpcConnectionStatus), t.a = c } , , , function(e, t, r) { "use strict"; var a = r(30) , n = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var i = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return n(e, [{ key: "set", value: function(e, t) { return { name: e, value: t } } }, { key: "get", value: function(e) { return { name: e } } }, { key: "reset", value: function() { return !0 } }]), e }() , o = a.a.createActions(i); t.a = o } , , , , , , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(15) , o = r(31) , s = r(361) , l = r(24) , c = r(39) , u = r(2) , d = r.n(u) , p = r(5) , h = r(43) , m = r(45) , f = r(4) , g = r.n(f) , _ = r(22) , b = r(80) , y = r(3) , v = r.n(y) , w = r(1) , k = r.n(w) , x = r(7) , S = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function A(e, t, r) { return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e } var E = function(e) { function t(e) { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var r = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.state = { inputChanged: !1, locked: null }, r } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), S(t, [{ key: "componentDidMount", value: function() { var e = this.props , t = e.account , r = e.accountName; void 0 === t && (t = p.ChainStore.getAccount(r)), this.props.onAccountChanged && t && this.props.onAccountChanged(t), !this.props.typeahead && r && this.onInputChanged(r) } }, { key: "componentDidUpdate", value: function() { this.props.focus && this.props.editable && !this.props.disabled && this.refs.user_input.focus() } }, { key: "componentWillReceiveProps", value: function(e) { e.account && e.account !== this.props.account && this.props.onAccountChanged && this.props.onAccountChanged(e.account) } }, { key: "getAccount", value: function() { return this.props.account } }, { key: "getError", value: function() { var e = this.props , t = e.account , r = e.error; return r || !t || this.getInputType(t.get("name")) || (r = g.a.translate("account.errors.invalid")), r } }, { key: "getInputType", value: function(e) { return e ? "#" === e[0] && i.a.is_object_id("1.2." + e.substring(1)) ? "id" : p.ChainValidation.is_account_name(e, !0) ? "name" : this.props.allowPubKey && p.PublicKey.fromPublicKeyString(e) ? "pubkey" : null : null } }, { key: "getVerifiedAccountName", value: function(e) { var t = this.props.allowUppercase , r = null; r = "string" == typeof e ? e : e && e.target ? e.target.value.trim() : "", t || (r = r.toLowerCase()); var a = r.replace("#", "").match(/(?:\/account\/)(.*)/); return a && (r = a[1]), r } }, { key: "_notifyOnChange", value: function(e) { var t = this.props , r = this.getVerifiedAccountName(e); t.onChange && (r || "" === r) && t.onChange(r), t.onAccountChanged && Object(p.FetchChain)("getAccount", r, void 0, A({}, r, !1)).then(function(e) { e && t.onAccountChanged(e) }).catch(function(e) { console.log(e) }) } }, { key: "onSelect", value: function(e) { this._notifyOnChange(e) } }, { key: "onInputChanged", value: function(e) { this.setState({ inputChanged: !0 }), this._notifyOnChange(e) } }, { key: "onKeyDown", value: function(e) { 13 !== e.keyCode && 9 !== e.keyCode || this.onAction(e) } }, { key: "_onAddContact", value: function() { c.a.addAccountContact(this.props.accountName) } }, { key: "_onRemoveContact", value: function() { c.a.removeAccountContact(this.props.accountName) } }, { key: "onAction", value: function(e) { var t = this.props , r = t.onAction , a = t.disableActionButton , n = t.account , i = t.accountName; e.preventDefault(), this.getError() || !r || a || (n ? r(n) : "pubkey" === this.getInputType(i) && r(i)) } }, { key: "render", value: function() { var e = this , t = this.props , r = t.accountName , a = t.account , i = t.allowPubKey , o = t.typeahead , l = t.disableActionButton , c = t.contacts , u = t.myActiveAccounts , h = (t.noPlaceHolder, t.useHR) , m = (t.labelClass, t.reserveErrorSpace, this.getInputType(r)) , f = [] , y = this.getError() , w = u; w = w.concat(c); var k = void 0; a && (a.isKnownScammer = b.a.isKnownScammer(a.get("name")), a.accountType = this.getInputType(a.get("name")), a.accountStatus = p.ChainStore.getAccountMemberStatus(a), a.statusText = a.isKnownScammer ? g.a.translate("account.member.suspected_scammer") : g.a.translate("account.member." + a.accountStatus), k = "name" === a.accountType ? "#" + a.get("id").substring(4) : "id" === a.accountType ? a.get("name") : null), o ? i && "pubkey" === m || y || !r || a || (y = g.a.translate("account.errors.unknown")) : !a && r && "pubkey" !== m && (y = g.a.translate("account.errors.unknown")), i && "pubkey" === m && (k = "Public Key"), a && w && (a.isFavorite = u.has(a.get("name")) || c.has(a.get("name"))), o && w && w.map(function(t) { if (-1 !== e.props.excludeAccounts.indexOf(t)) return null; var r = p.ChainStore.getAccount(t) , a = p.ChainStore.getAccountMemberStatus(r) , n = b.a.isKnownScammer(t) ? "account.member.suspected_scammer" : "account.member." + a; f.push({ id: t, label: t, status: g.a.translate(n), isOwn: u.has(t), isFavorite: c.has(t), isKnownScammer: b.a.isKnownScammer(t), className: b.a.isKnownScammer(t) ? "negative" : "positive" }) }).filter(function(e) { return !!e }); var S = !!r && f.reduce(function(e, t) { return e || t.label === r }, !1); if (r && !S && this.state.inputChanged) { var E = p.ChainStore.getAccount(r) , T = E ? p.ChainStore.getAccountMemberStatus(E) : null , C = E ? b.a.isKnownScammer(E.get("name")) ? g.a.translate("account.member.suspected_scammer") : g.a.translate("account.member." + T) : g.a.translate("account.errors.unknown"); f.push({ id: this.props.accountName, label: this.props.accountName, status: C, isOwn: u.has(r), isFavorite: c.has(r), isKnownScammer: b.a.isKnownScammer(r), className: b.a.isKnownScammer(r) || !E ? "negative" : null, disabled: !E }) } f.sort(function(e, t) { return e.disabled && !t.disabled && e.label > t.label ? 1 : -1 }); var z = void 0; z = this.props.account ? u.has(a.get("name")) ? n.a.createElement(x.Tooltip, { placement: "top", title: g.a.translate("tooltip.own_account") }, n.a.createElement("span", { className: "tooltip green" }, n.a.createElement(x.Icon, { type: "user" }))) : b.a.isKnownScammer(a.get("name")) ? n.a.createElement(x.Tooltip, { placement: "top", title: g.a.translate("tooltip.scam_account") }, n.a.createElement("span", { className: "tooltip red" }, n.a.createElement(x.Icon, { type: "warning", theme: "filled" }))) : c.has(a.get("name")) ? n.a.createElement(x.Tooltip, { placement: "top", title: g.a.translate("tooltip.follow_user"), onClick: this._onRemoveContact.bind(this) }, n.a.createElement("span", { className: "tooltip green" }, n.a.createElement(x.Icon, { type: "star", theme: "filled" }))) : n.a.createElement(x.Tooltip, { placement: "top", title: g.a.translate("tooltip.follow_user_add"), onClick: this._onAddContact.bind(this) }, n.a.createElement("span", { className: "tooltip" }, n.a.createElement(x.Icon, { type: "star" }))) : null; var B = !(a || "pubkey" === m) || y || l , O = null !== this.state.locked ? this.state.locked : this.props.locked , P = !O && (null != this.props.editable ? this.props.editable : void 0) , j = !!O || (null != this.props.disabled ? this.props.disabled : void 0); return n.a.createElement(x.Tooltip, { className: "input-area", title: this.props.tooltip, mouseEnterDelay: .5 }, n.a.createElement(x.Form, { className: "full-width", layout: "vertical", style: this.props.style }, n.a.createElement(x.Form.Item, { label: this.props.label ? g.a.translate(this.props.label) : "", validateStatus: y ? "error" : null, help: y || null }, this.props.label ? n.a.createElement("div", { className: "header-area" + (this.props.hideImage ? " no-margin" : "") }, n.a.createElement("label", { className: v()("right-label", a && (a.isFavorite || a.isOwn) ? "positive" : null, a && a.isKnownScammer ? "negative" : null), style: { marginTop: -30 } }, n.a.createElement("span", { style: { paddingRight: "0.5rem" } }, a && a.statusText, " ", !!k && k), z)) : null, h && n.a.createElement("hr", null), n.a.createElement("div", { className: "inline-label input-wrapper" }, a && "pubkey" === a.accountType ? n.a.createElement("div", { className: "account-image" }, n.a.createElement(_.a, { name: "key", title: "icons.key", size: "4x" })) : this.props.hideImage ? null : n.a.createElement(s.a, { size: { height: this.props.size || 80, width: this.props.size || 80 }, account: a ? a.get("name") : null, custom_image: null }), void 0 !== this.props.typeahead ? n.a.createElement(x.Select, { showSearch: !0, optionLabelProp: "value", onSelect: this.onSelect.bind(this), onChange: this.onInputChanged.bind(this), onSearch: this.onInputChanged.bind(this), placeholder: g.a.translate("account.search"), value: a ? r : null, disabled: j || void 0 }, f.map(function(e) { return n.a.createElement(x.Select.Option, { key: e.id, value: e.label, disabled: e.disabled }, e.isOwn ? n.a.createElement(x.Icon, { type: "user" }) : null, e.isFavorite ? n.a.createElement(x.Icon, { type: "star" }) : null, e.isKnownScammer ? n.a.createElement(x.Icon, { type: "warning" }) : null, " ", e.label, n.a.createElement("span", { style: { float: "right" } }, e.status)) })) : n.a.createElement(x.Input, A({ style: { textTransform: "pubkey" === this.getInputType(r) ? null : "lowercase", fontVariant: "initial" }, name: "username", id: "username", autoComplete: this.props.editable ? "username" : void 0, type: "text", value: this.props.accountName || "", placeholder: this.props.placeholder || g.a.translate("account.name"), disabled: this.props.disabled, ref: "user_input", onChange: this.onInputChanged.bind(this), onKeyDown: this.onKeyDown.bind(this), tabIndex: !this.props.editable || this.props.disabled ? -1 : this.props.tabIndex, editable: P ? P.toString() : void 0, readOnly: P ? (!P).toString() : void 0 }, "disabled", j ? j.toString() : void 0)), !!O && n.a.createElement(x.Tooltip, { title: g.a.translate("tooltip.unlock_account_name") }, n.a.createElement("div", { style: { lineHeight: "2rem", marginLeft: "10px", cursor: "pointer" }, onClick: function() { return e.setState({ locked: !1 }) } }, n.a.createElement(x.Icon, { style: { fontSize: "1rem" }, type: "edit" }))), this.props.children, this.props.onAction ? n.a.createElement(x.Tooltip, { title: g.a.translate("tooltip.required_input", { type: g.a.translate("global.field_type.account") }) }, n.a.createElement(x.Button, { type: "primary", disabled: B, onClick: this.onAction.bind(this) }, n.a.createElement(d.a, { content: this.props.action_label }))) : null)))) } }]), t }(); E.propTypes = { label: k.a.string, error: k.a.element, placeholder: k.a.string, onChange: k.a.func, onAccountChanged: k.a.func, onAction: k.a.func, accountName: k.a.string, account: h.a.ChainAccount, tabIndex: k.a.number, disableActionButton: k.a.bool, allowUppercase: k.a.bool, typeahead: k.a.bool, excludeAccounts: k.a.array, focus: k.a.bool, disabled: k.a.bool, editable: k.a.bool, locked: k.a.bool }, E.defaultProps = { autosubscribe: !1, excludeAccounts: [], disabled: null, editable: null, locked: !1 }, E = Object(m.a)(E), E = Object(o.a)(E, { listenTo: function() { return [l.a] }, getProps: function() { return { myActiveAccounts: l.a.getState().myActiveAccounts, contacts: l.a.getState().accountContacts } } }), t.a = E } , function(e, t, r) { "use strict"; r.d(t, "a", function() { return l }); var a = r(0) , n = r.n(a) , i = r(1) , o = r.n(i) , s = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var l = function(e) { function t() { return function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t), function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), s(t, [{ key: "getNumericEventValue", value: function(e) { return "" == e.target.value || null == e.target.value ? "" : parseFloat(e.target.value) == e.target.value ? e.target.value.trim() : parseFloat(e.target.value.trim().replace(/[^\d.-]/g, "")) || 0 } }, { key: "onPaste", value: function(e) { var t = this.props.allowNaN , r = e.clipboardData.getData("text") , a = r.match(/\./g); (a ? a.length : 0) > 1 && e.preventDefault(), t || parseFloat(r) == r || e.preventDefault() } }, { key: "onKeyPress", value: function(e) { if (!e.nativeEvent.ctrlKey) { "." === e.key && "" === e.target.value && (e.target.value = "0"); var t = e.target.value + e.key , r = t.match(/\./g) , a = r ? r.length : 0; "." === e.key && a > 1 && e.preventDefault(), parseFloat(t) != t && e.preventDefault(), this.props.onKeyPress && this.props.onKeyPress(e) } } }]), t }(); l.propTypes = { allowNaN: o.a.bool }, l.defaultProps = { allowNaN: !1 } } , , , , , , , , , , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(50) , i = r(11) , o = r.n(i) , s = r(99) , l = r(5) , c = r(14) , u = r(103) , d = r(162) , p = r(414) , h = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var m = function(e) { function t() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var e = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e._export("loadDbData", "getAccountRefs"), e.state = e._getInitialState(), e.bindListeners({ onAddPrivateKey: d.a.addKey }), e.no_account_refs = o.a.Set(), l.ChainStore.subscribe(e.chainStoreUpdate.bind(e)), e } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, s["a"]), h(t, [{ key: "_getInitialState", value: function() { this.chainstore_account_ids_by_key = null, this.chainstore_account_ids_by_account = null; var e = new o.a.Map; return { account_refs: e = e.set(this._getChainId(), o.a.Set()) } } }, { key: "getAccountRefs", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._getChainId(); return this.state.account_refs.get(e, o.a.Set()) } }, { key: "_getChainId", value: function() { return c.Apis.instance().chain_id || p.a.MAIN_NET } }, { key: "onAddPrivateKey", value: function(e) { var t = e.private_key_object; void 0 !== l.ChainStore.getAccountRefsOfKey(t.pubkey) && this.chainStoreUpdate() } }, { key: "loadDbData", value: function() { var e = this; this.chainstore_account_ids_by_key = null, this.chainstore_account_ids_by_account = null, this.no_account_refs = o.a.Set(); var t = new o.a.Map; return t = t.set(this._getChainId(), o.a.Set()), this.state = { account_refs: t }, function() { var e = c.Apis.instance().chain_id , t = "no_account_refs" + (e ? "_" + e.substr(0, 8) : ""); return n.a.root.getProperty(t, []).then(function(e) { return o.a.Set(e) }) }().then(function(t) { return e.no_account_refs = t }).then(function() { return e.chainStoreUpdate() }) } }, { key: "chainStoreUpdate", value: function() { this.chainstore_account_ids_by_key === l.ChainStore.account_ids_by_key && this.chainstore_account_ids_by_account === l.ChainStore.account_ids_by_account || (this.chainstore_account_ids_by_key = l.ChainStore.account_ids_by_key, this.chainstore_account_ids_by_account = l.ChainStore.account_ids_by_account, this.checkPrivateKeyStore()) } }, { key: "checkPrivateKeyStore", value: function() { var e = this.no_account_refs , t = o.a.Set(); u.a.getState().keys.keySeq().forEach(function(r) { if (!e.has(r)) { var a = l.ChainStore.getAccountRefsOfKey(r); if (void 0 !== a) if (a.size) t = t.add(a.valueSeq()); else { if ("number" == typeof u.a.getState().keys.get(r).brainkey_sequence) return; e = e.add(r) } } }), (t = t.flatten()).forEach(function(e) { var r = l.ChainStore.getAccountRefsOfAccount(e); void 0 !== r && r.size && (t = t.add(r.valueSeq())) }), t = t.flatten(), this.getAccountRefs().equals(t) || (this.state.account_refs = this.state.account_refs.set(this._getChainId(), t)), this.no_account_refs.equals(e) || (this.no_account_refs = e, function(e) { var t = [] , r = c.Apis.instance().chain_id , a = "no_account_refs" + (r ? "_" + r.substr(0, 8) : "") , i = !0 , o = !1 , s = void 0; try { for (var l, u = e[Symbol.iterator](); !(i = (l = u.next()).done); i = !0) { var d = l.value; t.push(d) } } catch (e) { o = !0, s = e } finally { try { !i && u.return && u.return() } finally { if (o) throw s } } n.a.root.setProperty(a, t) }(e)) } }]), t }(); t.a = a.a.createStore(m, "AccountRefsStore") } , , , , , , , , , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(1) , o = r.n(i) , s = r(3) , l = r.n(s) , c = r(39) , u = r(24) , d = r(5) , p = r(4) , h = r.n(p) , m = r(111) , f = r(53) , g = r.n(f) , _ = r(7) , b = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]) } return e } , y = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function v(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function w(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function k(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } var x = function(e) { function t() { v(this, t); var e = w(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.state = { value: null, error: null, existing_account: !1 }, e.handleChange = e.handleChange.bind(e), e.onKeyDown = e.onKeyDown.bind(e), e } return k(t, n.a.Component), y(t, [{ key: "shouldComponentUpdate", value: function(e, t) { return t.value !== this.state.value || t.error !== this.state.error || t.account_name !== this.state.account_name || t.existing_account !== this.state.existing_account || e.searchAccounts !== this.props.searchAccounts } }, { key: "componentDidUpdate", value: function() { g.a.rebuild(), this.props.onChange && this.props.onChange({ valid: !this.getError() }) } }, { key: "getValue", value: function() { return this.state.value } }, { key: "setValue", value: function(e) { this.setState({ value: e }) } }, { key: "clear", value: function() { this.setState({ account_name: null, error: null, warning: null }) } }, { key: "focus", value: function() { this.refs.input.focus() } }, { key: "valid", value: function() { return !this.getError() } }, { key: "getError", value: function() { var e = this; if (null === this.state.value) return null; var t = null; if (this.state.error) t = this.state.error; else if (this.props.accountShouldExist || this.props.accountShouldNotExist) { var r = this.props.searchAccounts.find(function(t) { return t === e.state.value }); this.props.accountShouldNotExist && r && (t = h.a.translate("account.name_input.name_is_taken")), this.props.accountShouldExist && !r && (t = h.a.translate("account.name_input.not_found")) } return t } }, { key: "validateAccountName", value: function(e) { this.state.error = "" === e ? "Please enter valid account name" : d.ChainValidation.is_account_name_error(e), this.state.warning = null, this.props.cheapNameOnly ? this.state.error || d.ChainValidation.is_cheap_name(e) || (this.state.error = h.a.translate("account.name_input.premium_name_faucet")) : this.state.error || d.ChainValidation.is_cheap_name(e) || (this.state.warning = h.a.translate("account.name_input.premium_name_warning")), this.setState({ value: e, error: this.state.error, warning: this.state.warning }), this.props.onChange && this.props.onChange({ value: e, valid: !this.getError() }), (this.props.accountShouldExist || this.props.accountShouldNotExist) && c.a.accountSearch(e) } }, { key: "handleChange", value: function(e) { e.preventDefault(), e.stopPropagation(); var t = e.target.value.toLowerCase(); t = (t = t.match(/[a-z0-9\.-]+/)) ? t[0] : "", this.setState({ account_name: t }), this.validateAccountName(t) } }, { key: "onKeyDown", value: function(e) { this.props.onEnter && 13 === event.keyCode && this.props.onEnter(e) } }, { key: "render", value: function() { var e = this.getError() || "" , t = (l()("form-group", "account-name", { "has-error": !1 }), this.state.warning); return n.a.createElement(_.Form.Item, { label: this.props.label, help: e || t || "", validateStatus: e ? "error" : t ? "warning" : "" }, n.a.createElement(_.Input, { name: "username", id: "username", type: "text", ref: "input", autoComplete: "username", placeholder: this.props.placeholder, onChange: this.handleChange, onKeyDown: this.onKeyDown, value: this.state.account_name || this.props.initial_value })) } }]), t }(); x.propTypes = { id: o.a.string, placeholder: o.a.oneOfType([o.a.string, o.a.object]), initial_value: o.a.string, onChange: o.a.func, onEnter: o.a.func, accountShouldExist: o.a.bool, accountShouldNotExist: o.a.bool, cheapNameOnly: o.a.bool, noLabel: o.a.bool }, x.defaultProps = { noLabel: !1 }; var S = function(e) { function t() { return v(this, t), w(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return k(t, n.a.Component), y(t, [{ key: "render", value: function() { return n.a.createElement(m.a, { stores: [u.a], inject: { searchAccounts: function() { return u.a.getState().searchAccounts } } }, n.a.createElement(x, b({ ref: "nameInput" }, this.props))) } }]), t }(); t.a = S } , , , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(55) , i = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var o = new n.a("__graphene__") , s = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return i(e, [{ key: "setLog", value: function() { var e = function(e) { return function() { var t = e.apply(this, arguments); return new Promise(function(e, r) { return function a(n, i) { try { var o = t[n](i) , s = o.value } catch (e) { return void r(e) } if (!o.done) return Promise.resolve(s).then(function(e) { a("next", e) }, function(e) { a("throw", e) }); e(s) }("next") } ) } }(regeneratorRuntime.mark(function e(t) { return regeneratorRuntime.wrap(function(e) { for (; ; ) switch (e.prev = e.next) { case 0: return e.next = 2, o.set("logs", JSON.stringify(t)); case 2: return e.abrupt("return", e.sent); case 3: case "end": return e.stop() } }, e, this) })); return function(t) { return e.apply(this, arguments) } }() }, { key: "getLogs", value: function() { return new Promise(function(e) { e(JSON.parse(o.get("logs", []))) } ) } }]), e }(); t.a = a.a.createActions(s) } , , , , , , , function(e, t, r) { "use strict"; r(15); var a = r(0) , n = r.n(a) , i = r(11) , o = r.n(i) , s = r(4) , l = r.n(s) , c = r(140) , u = r(1) , d = r.n(u) , p = r(271) , h = r(7) , m = r(755) , f = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var g = function(e) { function t() { return function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t), function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, p["a"]), f(t, [{ key: "componentDidMount", value: function() { this.onAssetChange(this.props.asset) } }, { key: "formatAmount", value: function(e) { return e || (e = ""), "number" == typeof e && (e = e.toString()), e.trim().replace(/,/g, "") } }, { key: "_onChange", value: function(e) { this.props.onChange && this.props.onChange({ amount: this.getNumericEventValue(e), asset: this.props.asset }) } }, { key: "onAssetChange", value: function(e) { this.props.onChange && this.props.onChange({ amount: this.props.amount, asset: e }) } }, { key: "render", value: function() { var e = this.props.error ? l.a.translate(this.props.error) : this.formatAmount(this.props.amount) , t = this.props.label ? n.a.createElement("div", { className: "amount-selector-field--label" }, l.a.translate(this.props.label), n.a.createElement("div", { className: "amount-selector-field--balance" }, this.props.display_balance)) : null , r = null; return this.props.isPrice && (r = n.a.createElement("div", null, this.props.asset.get("symbol"), "/", this.props.base)), n.a.createElement(h.Form.Item, { label: t, style: this.props.style, className: "amount-selector-field" }, n.a.createElement(h.Input.Group, { compact: !0 }, n.a.createElement(h.Input, { style: { width: this.props.isPrice ? "100%" : "calc(100% - 130px)" }, disabled: this.props.disabled, value: e || "", placeholder: this.props.placeholder, onChange: this._onChange.bind(this), tabIndex: this.props.tabIndex, onPaste: this.props.onPaste || this.onPaste.bind(this), onKeyPress: this.onKeyPress.bind(this), addonAfter: r }), this.props.isPrice ? null : n.a.createElement(m.a, { style: { width: "130px" }, selectStyle: { width: "100%" }, value: this.props.asset.get("symbol"), assets: o.a.List(this.props.assets), onChange: this.onAssetChange.bind(this), disabled: !!this.props.selectDisabled || void 0 }))) } }]), t }(); g.propTypes = { label: d.a.string, assets: d.a.array, amount: d.a.any, placeholder: d.a.string, onChange: d.a.func, tabIndex: d.a.number, error: d.a.string, scroll_length: d.a.number, selectDisabled: d.a.bool }, g.defaultProps = { disabled: !1, tabIndex: 0, selectDisabled: !1 }, g = Object(c.a)(g), t.a = g } , , , , , , , , , , , , , , , , , function(e, t, r) { "use strict"; r.d(t, "a", function() { return a }), r.d(t, "b", function() { return n }); var a = { HIGHER_THAN: "1", LOWER_THAN: "2" } , n = { BUY: "buy", SELL: "sell" } } , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(11) , i = r.n(n) , o = r(50) , s = r(99) , l = r(261) , c = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var u = function(e) { function t() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var e = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.state = e._getInitialState(), e.bindListeners({ onSet: l.a.set, onGet: l.a.get }), e._export("get", "reset"), e } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, s["a"]), c(t, [{ key: "_getInitialState", value: function() { return { props: i.a.Map() } } }, { key: "get", value: function(e) { return this.onGet({ name: e }) } }, { key: "onSet", value: function(e) { var t = this , r = e.name , a = e.value; if (this.state.props.get(r) !== a) { var n = this.state.props.set(r, a); this.state.props = n, o.a.setCachedProperty(r, a).then(function() { return t.setState({ props: n }) }) } } }, { key: "onGet", value: function(e) { var t = this , r = e.name , a = this.state.props.get(r); if (void 0 !== a) return a; try { o.a.getCachedProperty(r, null).then(function(e) { var a = t.state.props.set(r, e); t.state.props = a, t.setState({ props: a }) }) } catch (e) { console.error("getCachedProperty error:", e) } } }, { key: "reset", value: function() { this.state = this._getInitialState(), this.setState(this.state) } }]), t }() , d = a.a.createStore(u, "CachedPropertyStore"); t.a = d } , function(e, t, r) { "use strict"; function a(e) { return e.displayName || e.name || "Component" } r.d(t, "a", function() { return a }) } , , , function(e, t, r) { "use strict"; r.d(t, "a", function() { return n }); var a = r(14); function n(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Date , r = e , n = a.ChainConfig.address_prefix.toLowerCase(); 0 !== r.indexOf(n) && (r = n + "_" + r); var i = t.getMonth() + 1 , o = t.getDate(); return r = r + "_" + t.getFullYear() + (i >= 10 ? i : "0" + i) + (o >= 10 ? o : "0" + o) + ".bin" } } , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(33) , o = r(43) , s = r(45) , l = r(1) , c = r.n(l) , u = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var d = function(e) { function t() { return function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t), function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), u(t, [{ key: "render", value: function() { var e = this.props.balance.get("balance"); e = e || 0 == e ? Number(this.props.balance.get("balance")) : null; var t = this.props.balance.get("asset_type"); return n.a.createElement(i.a, { amount: e, asset: t, asPercentage: this.props.asPercentage, assetInfo: this.props.assetInfo, replace: this.props.replace, hide_asset: this.props.hide_asset }) } }]), t }(); d.propTypes = { balance: o.a.ChainObject.isRequired, assetInfo: c.a.node, hide_asset: c.a.bool }, d.defaultProps = { hide_asset: !1 }, t.a = Object(s.a)(d) } , , function(e, t, r) { "use strict"; r.d(t, "a", function() { return B }), r.d(t, "b", function() { return O }), r.d(t, "c", function() { return I }); var a = r(0) , n = r.n(a) , i = r(1) , o = r.n(i) , s = r(2238) , l = r(108) , c = r(31) , u = r(64) , d = r(83) , p = r(138) , h = r(19) , m = r(69) , f = r(360) , g = r(2) , _ = r.n(g) , b = r(5) , y = r(25) , v = r(354) , w = r(42) , k = r(7) , x = r(4) , S = r.n(x) , A = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function E(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function T(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function C(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } var z = { listenTo: function() { return [d.a, p.a] }, getProps: function() { return { wallet: d.a.getState(), backup: p.a.getState() } } } , B = function(e) { function t() { return E(this, t), T(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return C(t, a["Component"]), A(t, [{ key: "render", value: function() { return n.a.createElement("div", { style: { maxWidth: "40rem" } }, n.a.createElement(M, { noText: this.props.noText, newAccount: this.props.location && this.props.location.query ? this.props.location.query.newAccount : null }, n.a.createElement(q, null), this.props.noText ? null : n.a.createElement(L, null), n.a.createElement(I, { downloadCb: this.props.downloadCb }))) } }]), t }(); B = Object(c.a)(B, z); var O = function(e) { function t() { E(this, t); var e = T(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.state = { newWalletName: null }, e } return C(t, a["Component"]), A(t, [{ key: "componentWillMount", value: function() { m.c.reset() } }, { key: "render", value: function() { var e = this.props.wallet.new_wallet , t = (this.props.wallet.wallet_names.has(e), n.a.createElement(s.a, { to: "/help/introduction/wallets" }, S.a.translate("wallet.wallet_types"))) , r = n.a.createElement(s.a, { to: "/help/introduction/backups" }, S.a.translate("wallet.backup_types")); return n.a.createElement("div", null, n.a.createElement(_.a, { style: { textAlign: "left", maxWidth: "30rem" }, component: "p", content: "wallet.import_backup_choose" }), n.a.createElement(_.a, { className: "text-left", component: "p", wallet: t, backup: r, content: "wallet.read_more" }), (new FileReader).readAsBinaryString ? null : n.a.createElement("p", { className: "error" }, "Warning! You browser doesn't support some some file operations required to restore backup, we recommend you to use Chrome or Firefox browsers to restore your backup."), n.a.createElement(R, null, n.a.createElement(q, null), n.a.createElement(D, { saveWalletObject: !0 }, n.a.createElement(j, null, n.a.createElement(P, null)))), n.a.createElement("br", null), n.a.createElement(s.a, { to: "/" }, n.a.createElement(k.Button, null, n.a.createElement(_.a, { content: "wallet.back" })))) } }]), t }(); O = Object(c.a)(O, z); var P = function(e) { function t() { E(this, t); var e = T(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.state = {}, e } return C(t, a["Component"]), A(t, [{ key: "isRestored", value: function() { var e = this.props.wallet.new_wallet; return this.props.wallet.wallet_names.has(e) } }, { key: "render", value: function() { var e = this.props.wallet.new_wallet; return this.isRestored() ? n.a.createElement("span", null, n.a.createElement("h5", null, n.a.createElement(_.a, { content: "wallet.restore_success", name: e.toUpperCase() })), n.a.createElement(s.a, { to: "/" }, n.a.createElement(k.Button, { type: "primary" }, n.a.createElement(_.a, { component: "span", content: "header.dashboard" }))), n.a.createElement("div", null, this.props.children)) : n.a.createElement("span", null, n.a.createElement("h3", null, n.a.createElement(_.a, { content: "wallet.ready_to_restore" })), n.a.createElement(k.Button, { type: "primary", onClick: this.onRestore.bind(this) }, n.a.createElement(_.a, { content: "wallet.restore_wallet_of", name: e }))) } }, { key: "onRestore", value: function() { u.a.restore(this.props.wallet.new_wallet, this.props.backup.wallet_object), y.a.changeSetting({ setting: "passwordLogin", value: !1 }) } }]), t }(); P = Object(c.a)(P, z); var j = function(e) { function t() { E(this, t); var e = T(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.state = { new_wallet: null, accept: !1 }, e } return C(t, a["Component"]), A(t, [{ key: "componentWillMount", value: function() { var e = !!this.props.wallet.current_wallet; if (!e) { var t = "default"; this.props.backup.name && (t = this.props.backup.name.match(/[a-z0-9_-]*/)[0]), d.a.setNewWallet(t), this.setState({ accept: !0 }) } if (e && this.props.backup.name && !this.state.new_wallet) { var r = this.props.backup.name.toLowerCase().match(/[a-z0-9_-]*/)[0]; r && this.setState({ new_wallet: r }) } } }, { key: "render", value: function() { if (this.state.accept) return n.a.createElement("span", null, this.props.children); var e = !!this.state.new_wallet , t = !!e && this.props.wallet.wallet_names.has(this.state.new_wallet) , r = !t && e; return n.a.createElement("form", { onSubmit: this.onAccept.bind(this) }, n.a.createElement("h5", null, n.a.createElement(_.a, { content: "wallet.new_wallet_name" })), n.a.createElement(k.Input, { type: "text", id: "new_wallet", onChange: this.formChange.bind(this), value: this.state.new_wallet }), n.a.createElement("p", null, t ? n.a.createElement(_.a, { content: "wallet.wallet_exist" }) : null), n.a.createElement(k.Button, { onClick: this.onAccept.bind(this), type: "primary", disabled: !r }, n.a.createElement(_.a, { content: "wallet.accept" }))) } }, { key: "onAccept", value: function(e) { e && e.preventDefault(), this.setState({ accept: !0 }), d.a.setNewWallet(this.state.new_wallet) } }, { key: "formChange", value: function(e) { var t = e.target.id , r = e.target.value; if ("new_wallet" !== t || (r = r.toLowerCase(), !/[^a-z0-9_-]/.test(r))) { var a = {}; a[t] = r, this.setState(a) } } }]), t }(); j = Object(c.a)(j, z); var I = function(e) { function t() { return E(this, t), T(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return C(t, a["Component"]), A(t, [{ key: "componentWillMount", value: function() { try { this.isFileSaverSupported = !!new Blob } catch (e) {} } }, { key: "componentDidMount", value: function() { this.isFileSaverSupported || k.Notification.error({ message: S.a.translate("notifications.backup_file_save_unsupported") }), this.props.confirmation && this.createBackup() } }, { key: "getBackupName", value: function() { return Object(v.a)(this.props.wallet.current_wallet) } }, { key: "createBackup", value: function() { var e = this , t = h.a.getWallet().password_pubkey; Object(m.a)(t).then(function(t) { var r = e.getBackupName(); m.c.incommingBuffer({ name: r, contents: t }) }) } }, { key: "render", value: function() { var e = this , t = !0; return this.props.confirmation && (t = this.props.checkboxActive), n.a.createElement(k.Button, { type: "primary", disabled: !t, onClick: function() { e.onDownload() }, style: this.props.confirmation ? { height: "initial", padding: 0 } : {} }, this.props.confirmation ? n.a.createElement("div", { className: "download-block", style: { padding: "1.25rem" } }, n.a.createElement("img", { className: "bin-img", src: "/bin-file/default.svg", alt: "bin" }), n.a.createElement("span", { className: "text-left" }, n.a.createElement(_.a, { className: "download-text", content: "registration.downloadFile" }), n.a.createElement("p", { className: "file-name", style: { marginBottom: 0 } }, this.props.backup.name))) : n.a.createElement(_.a, { content: "wallet.download" })) } }, { key: "onDownload", value: function() { var e = new Blob([this.props.backup.contents],{ type: "application/octet-stream; charset=us-ascii" }); if (e.size !== this.props.backup.size) throw new Error("Invalid backup to download conversion"); Object(f.saveAs)(e, this.props.backup.name), u.a.setBackupDate(), this.props.downloadCb && this.props.downloadCb() } }]), t }(); I = Object(c.a)(I, z); var M = function(e) { function t() { return E(this, t), T(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return C(t, a["Component"]), A(t, [{ key: "getBackupName", value: function() { return Object(v.a)(this.props.wallet.current_wallet) } }, { key: "render", value: function() { if (!!this.props.backup.contents) return n.a.createElement("div", null, this.props.children); var e = null != h.a.getWallet(); return n.a.createElement("div", null, this.props.noText ? null : n.a.createElement("div", { style: { textAlign: "left" } }, this.props.newAccount ? n.a.createElement(_.a, { component: "p", content: "wallet.backup_new_account", wallet_name: Object(w.m)() }) : null, n.a.createElement(_.a, { component: "p", content: "wallet.backup_explain" })), n.a.createElement(k.Button, { type: "primary", onClick: this.onCreateBackup.bind(this), style: { marginBottom: 10 }, disabled: !e }, n.a.createElement(_.a, { content: "wallet.create_backup_of", name: this.props.wallet.current_wallet })), n.a.createElement(N, null)) } }, { key: "onCreateBackup", value: function() { var e = this , t = h.a.getWallet().password_pubkey; Object(m.a)(t).then(function(t) { var r = e.getBackupName(); m.c.incommingBuffer({ name: r, contents: t }) }) } }]), t }(); M = Object(c.a)(M, z); var N = function(e) { function t() { return E(this, t), T(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return C(t, a["Component"]), A(t, [{ key: "render", value: function() { if (!h.a.getWallet()) return null; var e = h.a.getWallet().backup_date , t = h.a.getWallet().last_modified , r = e ? n.a.createElement("h4", null, n.a.createElement(_.a, { content: "wallet.last_backup" }), " ", n.a.createElement(l.a, { value: e })) : n.a.createElement(_.a, { style: { paddingTop: 20 }, className: "facolor-error", component: "p", content: "wallet.never_backed_up" }) , a = null; return e && (a = t.getTime() > e.getTime() ? n.a.createElement("h4", { className: "facolor-error" }, n.a.createElement(_.a, { content: "wallet.need_backup" })) : n.a.createElement("h4", { className: "success" }, n.a.createElement(_.a, { content: "wallet.noneed_backup" }))), n.a.createElement("span", null, r, a) } }]), t }() , R = function(e) { function t() { return E(this, t), T(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return C(t, a["Component"]), A(t, [{ key: "reset", value: function() { m.c.reset() } }, { key: "render", value: function() { var e = n.a.createElement("div", { style: { paddingTop: 20 } }, n.a.createElement(k.Button, { disabled: !this.props.backup.contents, onClick: this.reset.bind(this) }, n.a.createElement(_.a, { content: "wallet.reset" }))); if (this.props.backup.contents && this.props.backup.public_key) return n.a.createElement("span", null, this.props.children, e); var t = this.props.backup.contents && !this.props.backup.public_key; return n.a.createElement("div", null, n.a.createElement("input", { ref: "file_input", accept: ".bin", type: "file", id: "backup_input_file", style: { border: "solid" }, onChange: this.onFileUpload.bind(this) }), t ? n.a.createElement("h5", null, n.a.createElement(_.a, { content: "wallet.invalid_format" })) : null, e) } }, { key: "onFileUpload", value: function(e) { var t = e.target.files[0]; m.c.incommingWebFile(t), this.forceUpdate() } }]), t }(); R = Object(c.a)(R, z); var q = function(e) { function t() { return E(this, t), T(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return C(t, a["Component"]), A(t, [{ key: "render", value: function() { return n.a.createElement("span", null, n.a.createElement("h5", null, n.a.createElement("b", null, this.props.backup.name), " (", this.props.backup.size, " ", "bytes)"), this.props.backup.last_modified ? n.a.createElement("div", null, this.props.backup.last_modified) : null, n.a.createElement("br", null)) } }]), t }(); q = Object(c.a)(q, z); var D = function(e) { function t() { E(this, t); var e = T(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.state = e._getInitialState(), e } return C(t, a["Component"]), A(t, [{ key: "_getInitialState", value: function() { return { backup_password: "", verified: !1 } } }, { key: "render", value: function() { return this.state.verified ? n.a.createElement("span", null, this.props.children) : n.a.createElement("form", { onSubmit: this.onPassword.bind(this) }, n.a.createElement("label", null, n.a.createElement(_.a, { content: "wallet.enter_password" })), n.a.createElement(k.Input, { type: "password", id: "backup_password", onChange: this.formChange.bind(this), value: this.state.backup_password }), n.a.createElement(L, null), n.a.createElement(k.Button, { type: "primary", htmlType: "submit", onClick: this.onPassword.bind(this) }, n.a.createElement(_.a, { content: "wallet.submit" }))) } }, { key: "onPassword", value: function(e) { var t = this; e && e.preventDefault(); var r = b.PrivateKey.fromSeed(this.state.backup_password || "") , a = this.props.backup.contents; Object(m.b)(r.toWif(), a).then(function(e) { t.setState({ verified: !0 }), t.props.saveWalletObject && p.a.setWalletObjct(e) }).catch(function(e) { console.error("Error verifying wallet " + t.props.backup.name, e, e.stack), "invalid_decryption_key" === e ? k.Notification.error({ message: S.a.translate("notifications.invalid_password") }) : k.Notification.error({ message: e }) }) } }, { key: "formChange", value: function(e) { var t = {}; t[e.target.id] = e.target.value, this.setState(t) } }]), t }(); D.propTypes = { saveWalletObject: o.a.bool }, D = Object(c.a)(D, z); var L = function(e) { function t() { return E(this, t), T(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return C(t, a["Component"]), A(t, [{ key: "render", value: function() { return n.a.createElement("div", { className: "padding no-overflow" }, n.a.createElement("pre", { className: "no-overflow", style: { lineHeight: "1.2" } }, this.props.backup.sha1, " * SHA1"), n.a.createElement("br", null)) } }]), t }(); L = Object(c.a)(L, z) } , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(1) , o = r.n(i) , s = r(836) , l = r.n(s) , c = r(837) , u = r.n(c) , d = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var p = 0 , h = function(e) { function t(e) { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var r = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.canvas_id = "identicon_" + (r.props.account || "") + ++p, r } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, a["Component"]), d(t, [{ key: "shouldComponentUpdate", value: function(e) { return e.size.height !== this.props.size.height || e.size.width !== this.props.size.width || e.account !== this.props.account } }, { key: "render", value: function() { var e = this.props.account , t = this.props.size , r = t.height , a = t.width , i = e ? l()(e) : null; return n.a.createElement("canvas", { id: this.canvas_id, ref: "canvas", style: { height: r, width: a }, width: 2 * a, height: 2 * r, "data-jdenticon-hash": i }) } }, { key: "repaint", value: function() { if (this.props.account) u.a.updateById(this.canvas_id); else { var e = this.refs.canvas.getContext("2d"); e.fillStyle = "rgba(100, 100, 100, 0.5)"; var t = e.canvas.width; e.clearRect(0, 0, t, t), e.fillRect(0, 0, t, t), e.clearRect(1, 1, t - 2, t - 2), e.font = t + "px sans-serif", e.fillText("?", t / 4, t - t / 6) } } }, { key: "componentDidMount", value: function() { this.repaint() } }, { key: "componentDidUpdate", value: function() { this.repaint() } }]), t }(); h.propTypes = { size: o.a.object.isRequired, account: o.a.string }; var m = h , f = r(15) , g = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var _ = function(e) { function t() { return function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t), function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, a["Component"]), g(t, [{ key: "shouldComponentUpdate", value: function(e) { return !f.a.are_equal_shallow(e, this.props) } }, { key: "render", value: function() { var e = this.props , t = e.account , r = e.image , a = e.style , i = this.props.size , o = i.height , s = i.width , l = r ? n.a.createElement("img", { src: r, height: o + "px", width: s + "px" }) : n.a.createElement(m, { id: t, account: t, size: this.props.size }); return n.a.createElement("div", { style: a, className: "account-image" }, l) } }]), t }(); _.defaultProps = { src: "", account: "", size: { height: 120, width: 120 }, style: {} }, _.propTypes = { src: o.a.string, account: o.a.string, size: o.a.object.isRequired, style: o.a.object }; t.a = _ } , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(30) , n = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var i = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return n(e, [{ key: "setPubkeys", value: function(e) { return e } }, { key: "setSelectedBalanceClaims", value: function(e) { return e } }, { key: "claimAccountChange", value: function(e) { return e } }]), e }() , o = a.a.createActions(i); t.a = o } , , function(e, t, r) { "use strict"; r.d(t, "a", function() { return A }); var a = r(0) , n = r.n(a) , i = r(33) , o = r(2238) , s = r(2) , l = r.n(s) , c = r(4) , u = r.n(c) , d = r(15) , p = r(119) , h = r(177) , m = r(5) , f = r(1) , g = r.n(f) , _ = r(445) , b = r(27) , y = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function v(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function w(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function k(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } var x = m.ChainTypes.operations; r(542); var S = Object.keys(x) , A = function(e) { var t = e.id , r = e.expiration , a = e.style , i = u.a.localize(new Date(r), { format: "short" }); return n.a.createElement("b", { style: a }, n.a.createElement("span", null, t, " | "), n.a.createElement("span", null, n.a.createElement(l.a, { content: "proposal.expires" }), ": ", i)) } , E = function(e) { function t(e) { v(this, t); var r = w(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.showDetails = r.showDetails.bind(r), r } return k(t, n.a.Component), y(t, [{ key: "showDetails", value: function(e) { e.preventDefault(), this.props.history.push("/block/" + this.props.block) } }, { key: "render", value: function() { var e = this.props , t = e.id , r = e.fee , a = e.hideFee , o = e.hideExpiration , s = e.expiration; return r.amount = parseInt(r.amount, 10), n.a.createElement("div", { style: { padding: "5px 0", textAlign: "left" } }, n.a.createElement("span", null, this.props.info, " ", a ? null : n.a.createElement("span", { className: "facolor-fee" }, "(", n.a.createElement(i.a, { amount: r.amount, asset: r.asset_id }), " ", "fee)")), !o && this.props.expiration && n.a.createElement(A, { id: t, expiration: s, style: { paddingTop: 5, fontSize: "0.85rem", paddingBottom: "0.5rem", display: "block" } })) } }]), t }() , T = function(e) { function t() { var e, r, a; v(this, t); for (var n = arguments.length, i = Array(n), o = 0; o < n; o++) i[o] = arguments[o]; return r = a = w(this, (e = t.__proto__ || Object.getPrototypeOf(t)).call.apply(e, [this].concat(i))), a.state = { label_color: "info" }, a.changeColor = function(e) { a.state.label_color !== e && a.setState({ label_color: e }) } , w(a, r) } return k(t, n.a.Component), y(t, [{ key: "linkToAccount", value: function(e) { return e ? d.a.is_object_id(e) ? n.a.createElement(p.a, { account: e }) : n.a.createElement(o.a, { to: "/account/" + e + "/overview" }, e) : n.a.createElement("span", null, "-") } }, { key: "linkToAsset", value: function(e) { return e ? d.a.is_object_id(e) ? n.a.createElement(h.a, { asset: e }) : n.a.createElement(o.a, { to: "/asset/" + e }, e) : n.a.createElement("span", null, "-") } }, { key: "render", value: function() { var e = this.props , t = e.op , r = e.proposer , a = e.block , o = e.hideExpiration , s = e.index , l = e.csvExportMode , c = this.state.label_color , u = null; if (u = Object(_.a)(S[t[0]], this.props, { fromComponent: "proposed_operation", linkToAccount: this.linkToAccount, linkToAsset: this.linkToAsset, changeColor: this.changeColor }), r && 0 == s && (u = n.a.createElement("div", { className: "inline-block" }, n.a.createElement("div", { style: { paddingBottom: "0.5rem" } }, n.a.createElement(b.a, { string: "operation.proposal_create", keys: [{ type: "account", value: r, arg: "account" }] }), ":"), n.a.createElement("div", { style: { marginLeft: "0.5rem" } }, u))), l) { var p = m.ChainStore.getObject("2.0.0") , h = m.ChainStore.getObject("2.1.0") , f = d.a.calc_block_time(a, p, h); return n.a.createElement("div", { key: this.props.key }, n.a.createElement("div", null, f ? f.toLocaleString() : ""), n.a.createElement("div", null, S[t[0]]), n.a.createElement("div", null, u), n.a.createElement("div", null, n.a.createElement(i.a, { amount: parseInt(t[1].fee.amount, 10), asset: t[1].fee.asset_id }))) } return (u ? n.a.createElement(E, { index: s, id: this.props.id, block: a, type: t[0], color: c, fee: t[1].fee, hideDate: this.props.hideDate, hideFee: this.props.hideFee, hideOpLabel: this.props.hideOpLabel, info: u, expiration: this.props.expiration, hideExpiration: o }) : null) || n.a.createElement("div", null) } }]), t }(); T.defaultProps = { op: [], current: "", block: null, hideDate: !1, hideFee: !1, hideOpLabel: !1, csvExportMode: !1, collapsed: !0 }, T.propTypes = { op: g.a.array.isRequired, current: g.a.string, block: g.a.number, hideDate: g.a.bool, hideFee: g.a.bool, csvExportMode: g.a.bool, collapsed: g.a.bool }, t.b = T } , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(2) , o = r.n(i) , s = r(25) , l = r(4) , c = r.n(l) , u = r(7) , d = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var p = "wss://" , h = function(e) { function t() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var e = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)) , r = window.location.protocol; return e.state = { protocol: r, ws: p, name: "My node", type: "remove", remove: {}, addError: null, existsError: null }, e.onRemoveSubmit = e.onRemoveSubmit.bind(e), e } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), d(t, [{ key: "onServerInput", value: function(e) { var t = { ws: e.target.value }; this.apiExists(t.ws) ? t.existsError = !0 : t.existsError = null, 0 !== t.ws.indexOf(p) && 0 !== t.ws.indexOf("ws://") ? t.addError = !0 : t.addError = null, this.setState(t) } }, { key: "apiExists", value: function(e) { return !!this.props.apis.find(function(t) { return t.url === e }) } }, { key: "onNameInput", value: function(e) { this.setState({ name: e.target.value }) } }, { key: "close", value: function() { this.setState({ isModalVisible: !1 }) } }, { key: "onAddSubmit", value: function(e) { e.preventDefault(), s.a.addWS({ location: this.state.name, url: this.state.ws }), this.setState({ ws: "https:" === this.state.protocol ? p : "ws://", name: "" }), this.props.onAddNodeClose() } }, { key: "onRemoveSubmit", value: function(e) { var t = this; e.preventDefault(); var r = void 0; this.props.apis.forEach(function(e, a) { e.url === t.props.removeNode.url && (r = a) }), this.props.api === this.props.apis[r].url && (s.a.changeSetting.defer({ setting: "apiServer", value: this.props.apis[0].url }), this.props.changeConnection(this.props.apis[0].url)), s.a.removeWS(r), this.props.onRemoveNodeClose() } }, { key: "_renderAddModal", value: function() { var e = "" , t = ""; return this.state.existsError && (t = "error", e = c.a.translate("settings.node_already_exists")), this.state.addError && (t = "error", e = c.a.translate("settings.valid_node_url")), n.a.createElement(u.Modal, { visible: this.props.isAddNodeModalVisible, id: "ws_modal_add", ref: "ws_modal_add", title: c.a.translate("settings.add_ws"), overlay: !0, onCancel: this.props.onAddNodeClose, overlayClose: !1, footer: [n.a.createElement(u.Button, { key: "confirm", type: "primary", disabled: this.state.addError || this.state.existsError, onClick: this.onAddSubmit.bind(this) }, c.a.translate("transfer.confirm")), n.a.createElement(u.Button, { key: "cancel", onClick: this.props.onAddNodeClose }, c.a.translate("account.perm.cancel"))] }, n.a.createElement("div", { className: "grid-content" }, n.a.createElement(u.Form, { layout: "vertical" }, n.a.createElement(u.Form.Item, { label: "Name" }, n.a.createElement(u.Input, { onChange: this.onNameInput.bind(this), value: this.state.name })), n.a.createElement(u.Form.Item, { label: "Address", validateStatus: t, help: e }, n.a.createElement(u.Input, { value: this.state.ws, onChange: this.onServerInput.bind(this) }))))) } }, { key: "_renderRemoveModal", value: function() { if (!this.props.api) return null; var e = [n.a.createElement(u.Button, { key: "submit", onClick: this.onRemoveSubmit }, c.a.translate("transfer.confirm")), n.a.createElement(u.Button, { key: "cancel", type: "primary", onClick: this.props.onRemoveNodeClose }, c.a.translate("modal.cancel"))]; return n.a.createElement(u.Modal, { onCancel: this.props.onRemoveNodeClose, title: c.a.translate("settings.remove_ws"), visible: this.props.isRemoveNodeModalVisible, footer: e }, n.a.createElement("div", { className: "grid-content no-overflow" }, n.a.createElement("section", { className: "block-list" }, n.a.createElement("p", null, n.a.createElement(o.a, { component: "span", content: "settings.confirm_remove", with: { name: this.props.removeNode && this.props.removeNode.name } }))))) } }, { key: "render", value: function() { return n.a.createElement("div", null, this._renderAddModal(), this._renderRemoveModal()) } }]), t }(); t.a = h } , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(103) , o = r(44) , s = r(4) , l = r.n(s) , c = r(22) , u = r(31) , d = r(109) , p = r(15) , h = r(53) , m = r.n(h) , f = r(7) , g = r(203) , _ = r.n(g) , b = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function y(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function v(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function w(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } var k = function(e) { function t() { return y(this, t), v(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return w(t, n.a.Component), b(t, [{ key: "shouldComponentUpdate", value: function(e) { return !p.a.are_equal_shallow(e.memo, this.props.memo) || e.wallet_locked !== this.props.wallet_locked } }, { key: "componentDidMount", value: function() { m.a.rebuild() } }, { key: "_toggleLock", value: function(e) { e.preventDefault(), o.a.unlock().then(function() { m.a.rebuild() }).catch(function() {}) } }, { key: "render", value: function() { var e = this.props , t = e.memo , r = e.fullLength; if (!t) return null; var a = i.a.decodeMemo(t) , o = a.text , s = a.isMine; if (!o && s) return n.a.createElement("div", { className: "memo" }, n.a.createElement("span", null, l.a.translate("transfer.memo_unlock"), " "), n.a.createElement("a", { onClick: this._toggleLock.bind(this) }, n.a.createElement(c.a, { name: "locked", title: "icons.locked.action" }))); var u = o = _()(o, { whiteList: [], stripIgnoreTag: !0 }); return o && !r && o.length > 35 && (o = o.substr(0, 35) + "..."), o ? n.a.createElement("div", { className: "memo", style: { paddingTop: 5, cursor: "help" } }, n.a.createElement(f.Tooltip, { placement: "bottom", title: u !== o ? u : null }, n.a.createElement("span", { className: "inline-block", "data-class": "memo-tip", "data-offset": "{'bottom': 10}" }, o))) : null } }]), t }(); k.defaultProps = { fullLength: !1 }; var x = function(e) { function t() { return y(this, t), v(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments)) } return w(t, n.a.Component), b(t, [{ key: "render", value: function() { return n.a.createElement(k, this.props) } }]), t }(); t.a = Object(u.a)(x, { listenTo: function() { return [d.a] }, getProps: function() { return { wallet_locked: d.a.getState().locked } } }) } , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(2) , o = r.n(i) , s = r(25) , l = r(26) , c = (r(49), r(101)) , u = r(31) , d = r(3) , p = r.n(d) , h = r(22) , m = r(40) , f = r(4) , g = r.n(f) , _ = r(13) , b = r(1) , y = r.n(b) , v = r(7) , w = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var k = function(e) { function t(e) { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var r = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.state = { loading: null != r.props.isLoading && r.props.isLoading, overrideMessage: null, loadingButtonWidth: null }, r.processingOnClick = !1, r } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), w(t, [{ key: "shouldComponentUpdate", value: function(e, t) { return e.isLoading !== this.props.isLoading || t.loading !== this.state.loading } }, { key: "_feedback", value: function() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; null == e ? (this.setState({ overrideMessage: null, loading: !1 }), this.processingOnClick = !1) : "string" == typeof e ? this.setState({ overrideMessage: e }) : "boolean" == typeof e && (e ? (this.setState({ loading: !1 }), this.processingOnClick = !1) : this.setState({ overrideMessage: t })) } }, { key: "_onClick", value: function(e) { return this.processingOnClick = !0, !!this.state.loading || (null != this.props.onClick ? (this.setState({ loadingButtonWidth: Object(_.findDOMNode)(this.loadingButton).getBoundingClientRect().width, loading: !0 }), e.persist(), this.props.onClick(e, this._feedback.bind(this)), !0) : void 0) } }, { key: "_isLoading", value: function() { return this.processingOnClick ? this.state.loading : null != this.props.isLoading && this.props.isLoading } }, { key: "render", value: function() { var e = this , t = this.props.caption || this.props.text || null; "string" == typeof t && t.indexOf(".") > 0 && (t = g.a.translate(t)), null != t && "" == t.trim() && (t = null); var r = this.props.loadingMessage || null; null != this.state.overrideMessage && "" != this.state.overrideMessage.trim() && (r = this.state.overrideMessage), "string" == typeof r && r.indexOf(".") > 0 && (r = g.a.translate(r)), null != r && "" == r.trim() && (r = null); var a = null , i = null , o = !1 , s = n.a.createElement("span", null, t) , l = this._isLoading(); switch (this.props.loadingType) { case "inside": l && (o = !0, s = n.a.createElement("span", { style: { margin: "auto", display: "inline-block" } }, n.a.createElement(m.a, { type: "circle-small" }))); break; case "inside-feedback": l && (o = !0, s = n.a.createElement("span", { style: { float: "left" } }, n.a.createElement("span", { style: { position: "absolute", whiteSpace: "nowrap", marginLeft: "12px" } }, r), n.a.createElement("span", null, n.a.createElement(m.a, { type: "circle-small" })))); break; case "overlay": l && (o = !0, i = n.a.createElement(m.a, { type: "loading-overlay" })); break; case "overlay-feedback": l && (o = !0, i = n.a.createElement(m.a, { loadingText: r, type: "loading-overlay" })); break; case "inside-feedback-resize": l && (s = n.a.createElement("span", null, n.a.createElement("span", null, r), n.a.createElement("span", { style: { float: "left" } }, n.a.createElement(m.a, { type: "circle-small" })))); break; case "right-feedback": l && (i = n.a.createElement("div", { style: { float: "left", marginLeft: "-9px", position: "relative" }, className: "disabled" }, n.a.createElement("span", null, n.a.createElement("span", { style: { float: "left", marginTop: "7px" } }, n.a.createElement(m.a, { type: "circle" })), n.a.createElement("span", { style: { float: "left", marginLeft: "6px", marginTop: "11px" } }, r)))); break; case "left-feedback": l && (a = n.a.createElement("div", { style: { float: "left", marginRight: "6px", position: "relative" }, className: "disabled" }, n.a.createElement("span", null, n.a.createElement("span", { style: { float: "right", marginTop: "7px" } }, n.a.createElement(m.a, { type: "circle" })), n.a.createElement("span", { style: { float: "right", marginRight: "6px", marginTop: "11px" } }, r)))) } var c = { overflow: "hidden", position: "relative" }; return o && null != this.state.loadingButtonWidth && (c.width = this.state.loadingButtonWidth), n.a.createElement("div", { style: this.props.style }, null != a && a, n.a.createElement("span", { style: { float: "left" } }, n.a.createElement(v.Button, { ref: function(t) { e.loadingButton = t }, disabled: l, type: this.props.type, className: this.props.className, id: this.props.id, onClick: this._onClick.bind(this), style: c }, s)), null != i && i, n.a.createElement("div", { style: { clear: "both" } })) } }]), t }(); k.propTypes = { id: y.a.string, className: y.a.string, type: y.a.string, style: y.a.object, caption: y.a.string.isRequired, onClick: y.a.func.isRequired, loadingType: y.a.string, loadingMessage: y.a.string, isLoading: y.a.bool }, k.defaultProps = { style: {}, isLoading: null, className: "button", type: "button", loadingType: "inside-feedback", loadingMessage: null }; var x = k , S = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e } , A = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); function E(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function T(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function C(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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } var z = "wss://fake.automatic-selection.com"; function B(e) { return -1 !== e.indexOf("testnet") } var O = function(e) { function t(e) { return E(this, t), T(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)) } return C(t, n.a.Component), A(t, [{ key: "activate", value: function(e) { s.a.changeSetting({ setting: "apiServer", value: e }), l.a.getSetting("activeNode") != l.a.getSetting("apiServer") && setTimeout(function() { Object(c.a)(!1) } .bind(this), 50) } }, { key: "render", value: function() { var e = this.props , t = e.isActive , r = e.connectedNode , a = e.totalNodes; return e.popup ? n.a.createElement("div", null, n.a.createElement(v.Switch, { style: { float: "right", position: "relative", top: "-15px" }, checked: t, onChange: null != r ? this.activate.bind(this, t ? r.url : z) : function() {} }), n.a.createElement("p", { style: { fontSize: "80%" } }, n.a.createElement(o.a, { content: "settings.automatic_short" }), ":")) : n.a.createElement("div", { className: "auto-node" }, n.a.createElement("div", null, n.a.createElement(v.Switch, { checked: t, onChange: null != r ? this.activate.bind(this, t ? r.url : z) : function() {} }), n.a.createElement(o.a, { component: "div", style: { paddingLeft: "1rem", paddingTop: "0.2rem" }, content: "settings.automatic", totalNodes: a }))) } }]), t }() , P = function(e) { function t(e) { return E(this, t), T(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)) } return C(t, n.a.Component), A(t, [{ key: "activate", value: function(e) { s.a.changeSetting({ setting: "apiServer", value: e }), l.a.getSetting("activeNode") != l.a.getSetting("apiServer") && setTimeout(function() { Object(c.a)(!1) } .bind(this), 50) } }, { key: "remove", value: function(e, t) { this.props.showRemoveNodeModal(e, t) } }, { key: "show", value: function(e) { s.a.showWS(e) } }, { key: "hide", value: function(e) { s.a.hideWS(e) } }, { key: "_getPing", value: function() { if (B(this.props.node.url)) return { toString: null, color: null, rating: null }; if (!this.props.node.ping) return { toString: null, color: "high", rating: "node_down" }; if (this.props.node.ping == 1 / 0) return { toString: null, color: "high", rating: "node_down" }; if (-1 == this.props.node.ping) return { toString: null, color: "high", rating: "skipped" }; var e = void 0 , t = void 0 , r = this.props.node.ping; return r < 400 ? (e = "low", t = "low_latency") : r >= 400 && r < 800 ? (e = "medium", t = "medium_latency") : (e = "high", t = "high_latency"), { toString: r >= 1e3 ? +(r / 1e3).toFixed(2) + "s" : r + "ms", color: e, rating: t } } }, { key: "render", value: function() { var e = this.props , t = e.node , r = e.isActive , a = e.popup , i = this._getPing() , s = t.url , l = !r , c = !t.default && !r , u = !!t.hidden , d = t.location && "object" === S(t.location) && "translate"in t.location ? n.a.createElement(o.a, { component: "span", content: t.location.translate }) : t.location , p = d || ""; return t.country && (p = t.country + (p ? " - " + p : "")), t.region && (p = t.region + (p ? " - " + p : "")), a ? n.a.createElement("div", { className: "api-status" }, n.a.createElement("a", null, n.a.createElement(h.a, { className: i.color + " default-icon", name: r ? "connected" : "disconnected", title: r ? "icons.connected" : "icons.disconnected", size: "1_5x", onClick: this.activate.bind(this, s) }), n.a.createElement(h.a, { className: i.color + " hover-icon", name: "connect", title: "icons.connect", size: "1_5x", onClick: this.activate.bind(this, s) })), p) : n.a.createElement("div", { className: "api-node" }, n.a.createElement("div", { className: "api-node-left" }, n.a.createElement("p", { className: "api-node-title" }, p), !!t.operator && n.a.createElement("p", { className: "api-node-operator" }, t.operator, " "), n.a.createElement("p", { className: "api-node-url", id: r ? "active_node" : null }, s)), n.a.createElement("div", null, n.a.createElement("div", { className: "api-status" }, n.a.createElement("span", { className: i.color }, !!i.rating && n.a.createElement(o.a, { content: "settings." + i.rating }), !!i.toString && n.a.createElement("p", null, i.toString)))), n.a.createElement("div", { style: { marginTop: "-5px" } }, l && n.a.createElement("a", { onClick: u ? this.show.bind(this, s) : this.hide.bind(this, s) }, n.a.createElement(h.a, { className: "shuffle", name: u ? "eye-striked" : "eye", title: u ? "icons.eye_striked" : "icons.eye", size: "1_5x" })), c && n.a.createElement("a", { onClick: this.remove.bind(this, s, p) }, n.a.createElement(h.a, { name: "times", title: "icons.times", size: "1_5x" })), n.a.createElement("div", { className: "api-status" }, r ? n.a.createElement(h.a, { className: i.color, name: "connected", title: "icons.connected", size: "2x" }) : n.a.createElement("a", { id: s, onClick: this.activate.bind(this, s) }, n.a.createElement(h.a, { className: i.color + " default-icon", name: "disconnected", title: "icons.connect", size: "1_5x" }), n.a.createElement(h.a, { className: i.color + " hover-icon", name: "connect", title: "icons.connect", size: "1_5x" }))))) } }]), t }(); P.defaultProps = { node: {} }; var j = function(e) { function t(e) { E(this, t); var r = T(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.state = { activeTab: "available_nodes" }, r } return C(t, n.a.Component), A(t, [{ key: "getNode", value: function(e) { var t = { ping: this.props.apiLatencies[e.url] }; return Object.keys(e).forEach(function(r) { t[r] = e[r] }), t } }, { key: "_getConnectedNode", value: function() { var e = this , t = null; return (t = this.props.connectedNode ? this.props.nodes.find(function(t) { return t.url == e.props.connectedNode }) : z) || (t = z), this.getNode(t) } }, { key: "_connectedNodeIsPersonal", value: function() { var e = this; if (!this.props.connectedNode) return !1; var t = this.props.nodes.find(function(t) { return t.url == e.props.connectedNode }); return t && this._nodeIsPersonal(t) } }, { key: "_nodeIsPersonal", value: function(e) { return !e.default && !e.hidden && !B(e.url) } }, { key: "_getMainNetNodes", value: function() { return this.props.nodes.filter(function(e) { return !B(e.url) }) } }, { key: "renderNode", value: function(e, t) { var r = this.props; return null == e ? null : n.a.createElement(P, { node: e, key: e.url, showRemoveNodeModal: r.showRemoveNodeModal, isActive: null !== t && e.url == t.url, popup: r.popup }) } }, { key: "renderAutoSelection", value: function(e) { var t = this.props; return n.a.createElement(O, { key: z, isActive: t.selectedNode === z, connectedNode: e, totalNodes: this._getMainNetNodes().length, popup: t.popup }) } }, { key: "_changeTab", value: function(e) { this.setState({ activeTab: e }) } }, { key: "_recalculateLatency", value: function(e, t) { var r = this; c.b.doLatencyUpdate(!0, !1, 1).finally(function() { r.forceUpdate(), t() }) } }, { key: "render", value: function() { var e = this , t = this.props , r = this.getNode.bind(this) , a = this.renderNode.bind(this) , i = this._getConnectedNode() , s = t.nodes.map(function(e) { return r(e) }).filter(function(e) { return (null == i || e.url !== i.url) && e.url !== z }).sort(function(e, t) { var r = B(e.url); return e.ping && t.ping ? e.ping - t.ping : e.ping || t.ping ? e.ping && !t.ping ? -1 : t.ping && !e.ping ? 1 : 0 : r ? -1 : 1 }) , l = null , u = !1; "my_nodes" === this.state.activeTab ? (l = s.filter(function(t) { return e._nodeIsPersonal(t) }), u = this._connectedNodeIsPersonal() && 0 === l.length) : l = "available_nodes" === this.state.activeTab ? s.filter(function(e) { return e.default && !e.hidden && !B(e.url) }) : "testnet_nodes" === this.state.activeTab ? s.filter(function(e) { return B(e.url) }) : s.filter(function(e) { return e.hidden && !B(e.url) }); var d = 0 , h = !!c.b && c.b.isBackgroundPingingInProgress(); return this.props.popup ? n.a.createElement("div", null, n.a.createElement("div", { style: { fontWeight: "bold", height: 40 } }, n.a.createElement(o.a, { content: "settings.switch" }), this.renderAutoSelection(i)), n.a.createElement("div", { className: "nodes-list", style: { display: t.selectedNode === z ? "none" : "" } }, l.map(function(e) { if (++d <= 5) return a(e, i) }))) : n.a.createElement("div", { style: { paddingTop: "1em" } }, this.renderAutoSelection(i), n.a.createElement("div", { className: "active-node" }, n.a.createElement(x, { style: { float: "right" }, isLoading: h, caption: "settings.ping", loadingType: "inside-feedback-resize", loadingMessage: "settings.pinging", onClick: this._recalculateLatency.bind(this) }), n.a.createElement(o.a, { component: "h4", style: { marginLeft: "1rem" }, content: "settings.active_node" }), a(i, i)), n.a.createElement("div", { className: "nodes", style: { position: "relative", marginBottom: "2em" } }, n.a.createElement("div", { className: "grid-block shrink", style: { marginLeft: 0 } }, ["available_nodes", "my_nodes", "hidden_nodes", "testnet_nodes"].map(function(t) { return n.a.createElement("div", { key: t, className: p()("nodes-header clickable", { inactive: e.state.activeTab !== t }), onClick: e._changeTab.bind(e, t) }, n.a.createElement(o.a, { content: "settings." + t })) })), "my_nodes" === this.state.activeTab && n.a.createElement("div", { style: { paddingLeft: "1rem", paddingBottom: "1rem" } }, n.a.createElement(v.Button, { type: "primary", onClick: t.showAddNodeModal }, n.a.createElement(o.a, { id: "add", component: "span", content: "settings.add_api" }))), "testnet_nodes" === this.state.activeTab && n.a.createElement(o.a, { component: "p", content: "settings.testnet_nodes_disclaimer" }), l.map(function(e) { return a(e, i) }), u ? n.a.createElement("div", { className: "api-node" }, n.a.createElement("p", { className: "api-node-title", style: { padding: "1rem" } }, n.a.createElement(o.a, { content: "settings.personal_active" }))) : null)) } }]), t }(); j = Object(u.a)(j, { listenTo: function() { return [l.a] }, getProps: function() { return { selectedNode: l.a.getState().settings.get("apiServer"), connectedNode: l.a.getState().settings.get("activeNode"), apiLatencies: l.a.getState().apiLatencies } } }); t.a = j } , , function(e, t, r) { "use strict"; t.a = { MAIN_NET: "4018d7844c78f6a6c41c6a552b898022310fc5dec06da467ee7905a8dad512c8", TEST_NET: "39f5e2ede1f8bc1a3a54a7914414e3779e33193f1f5693510e73cb7a87617447" } } , function(e, t) { e.exports = ["de", "es", "fr", "ko", "it", "tr", "ru", "zh", "ja"] } , , , , , , , , , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(31) , o = r(147) , s = r(26) , l = r(2) , c = r.n(l) , u = r(25) , d = r(14) , p = r(22) , h = r(408) , m = r(4) , f = r.n(m) , g = r(412) , _ = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e } , b = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var y = function(e) { function t(e) { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var r = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.state = { isAddNodeModalVisible: !1, isRemoveNodeModalVisible: !1, removeNode: { name: null, url: null } }, r.showAddNodeModal = r.showAddNodeModal.bind(r), r.hideAddNodeModal = r.hideAddNodeModal.bind(r), r.showRemoveNodeModal = r.showRemoveNodeModal.bind(r), r.hideRemoveNodeModal = r.hideRemoveNodeModal.bind(r), r } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), b(t, [{ key: "showAddNodeModal", value: function() { this.setState({ isAddNodeModalVisible: !0 }) } }, { key: "hideAddNodeModal", value: function() { this.setState({ isAddNodeModalVisible: !1 }) } }, { key: "showRemoveNodeModal", value: function(e, t) { this.setState({ isRemoveNodeModalVisible: !0, removeNode: { url: e, name: t } }) } }, { key: "hideRemoveNodeModal", value: function() { this.setState({ isRemoveNodeModalVisible: !1, removeNode: { url: null, name: null } }) } }, { key: "triggerModal", value: function(e) { this.refs.ws_modal.show(e) } }, { key: "onChangeWS", value: function(e) { var t = this; u.a.changeSetting({ setting: "apiServer", value: e.target.value }), d.Apis.reset(e.target.value, !0), setTimeout(function() { t.onReloadClick() }, 50) } }, { key: "onReloadClick", value: function(e) { e && e.preventDefault(), window.electron ? (window.location.hash = "", window.remote.getCurrentWindow().reload()) : window.location.href = "./" } }, { key: "triggerModal", value: function(e) { for (var t, r = arguments.length, a = Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++) a[n - 1] = arguments[n]; (t = this.refs.ws_modal).show.apply(t, [e].concat(a)) } }, { key: "render", value: function() { var e = this.props; e.apis.map(function(e) { var t = -1 !== e.url.indexOf("fake.automatic-selection") , r = e.location; return r && "object" === (void 0 === r ? "undefined" : _(r)) && "translate"in r && (r = f.a.translate(r.translate)), n.a.createElement("option", { key: e.url, value: e.url }, r || e.url, " ", !t && r ? "(" + e.url + ")" : null) }); return n.a.createElement("div", { className: "grid-frame vertical" }, n.a.createElement("div", { className: "grid-container text-center", style: { padding: "5rem 10% 0 10%", maxWidth: "100%", overflowY: "auto", margin: "0 !important" } }, n.a.createElement("h2", null, n.a.createElement(c.a, { content: "sync_fail.title" })), n.a.createElement("br", null), n.a.createElement("p", { style: { marginBottom: 0 } }, n.a.createElement(c.a, { content: "sync_fail.sub_text_1" })), n.a.createElement(p.a, { name: "clock", title: "icons.clock", size: "5x" }), n.a.createElement("p", null, n.a.createElement(c.a, { unsafe: !0, content: "sync_fail.sub_text_2" })), n.a.createElement("hr", null), n.a.createElement(g.a, { nodes: e.apis, onChange: this.onChangeWS.bind(this), showAddNodeModal: this.showAddNodeModal, showRemoveNodeModal: this.showRemoveNodeModal })), n.a.createElement(h.a, { removeNode: this.state.removeNode, isAddNodeModalVisible: this.state.isAddNodeModalVisible, isRemoveNodeModalVisible: this.state.isRemoveNodeModalVisible, onAddNodeClose: this.hideAddNodeModal, onRemoveNodeClose: this.hideRemoveNodeModal, apis: e.apis, api: e.apiServer })) } }]), t }(); y = Object(i.a)(y, { listenTo: function() { return [o.a, s.a] }, getProps: function() { return { rpc_connection_status: o.a.getState().rpc_connection_status, apis: s.a.getState().defaults.apiServer, apiServer: s.a.getState().settings.get("apiServer"), defaultConnection: s.a.getState().defaultSettings.get("apiServer"), apiLatencies: s.a.getState().apiLatencies } } }), t.a = y } , , , , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(13) , o = r(3) , s = r.n(o) , l = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var c = function(e) { function t() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var e = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.state = { value: null, pulse: "" }, e } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), l(t, [{ key: "componentWillReceiveProps", value: function(e) { this.update(e) } }, { key: "componentWillMount", value: function() { this.update(this.props) } }, { key: "compare", value: function(e, t) { return e === t ? null : t > e ? "green" : "red" } }, { key: "update", value: function(e) { var t = this , r = this.state.value , a = e.value , n = e.compareFunction || this.compare; if (null !== r && null !== a) { var o = n(r, a); null === o ? this.setState({ value: a }) : this.setState({ value: a, pulse: "" }, function() { Object(i.findDOMNode)(t).offsetHeight, t.setState({ pulse: o }) }) } else this.setState({ value: a, pulse: "" }) } }, { key: "render", value: function() { var e = this.state , t = e.pulse , r = e.value , a = this.props , i = a.children , o = a.reverse , l = a.fill; return i || (i = r), t ? (l = l || "none", n.a.createElement("span", { className: s()("pulsate", t, { reverse: o }), style: { animationFillMode: l } }, i)) : n.a.createElement("span", null, i) } }]), t }(); t.a = c } , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(31) , o = r(45) , s = r(192) , l = r(4) , c = r.n(l) , u = r(7) , d = function() { return function(e, t) { if (Array.isArray(e)) return e; if (Symbol.iterator in Object(e)) return function(e, t) { var r = [] , a = !0 , n = !1 , i = void 0; try { for (var o, s = e[Symbol.iterator](); !(a = (o = s.next()).done) && (r.push(o.value), !t || r.length !== t); a = !0) ; } catch (e) { n = !0, i = e } finally { try { !a && s.return && s.return() } finally { if (n) throw i } } return r }(e, t); throw new TypeError("Invalid attempt to destructure non-iterable instance") } }() , p = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var h = function(e) { function t(e) { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var r = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return r.state = { assets: [] }, r } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, n.a.Component), p(t, [{ key: "componentDidMount", value: function() { this.getAssets() } }, { key: "getAssets", value: function() { var e = this.props , t = e.backedCoins , r = e.include , a = e.includeBTS , n = this.state.assets , i = {}; t.forEach(function(e) { n = n.concat(e.map(function(e) { var t = e.symbol.split(".") , r = d(t, 2) , a = r[0] , n = r[1]; return !i[n] && n && a ? (i[n] = !0, { id: n, label: n, gateway: a, gateFee: e.gateFee, issuer: e.issuerId || "1.2.96397" }) : null })).filter(function(e) { return e }).filter(function(e) { return "BTS" == e.id || (!r || r.includes(e.id)) }) }), !1 !== a && n.push({ id: "BTS", label: "BTS", gateway: "" }), this.setState({ assets: n }) } }, { key: "getSelectedAssetArray", value: function(e) { var t = void 0; return this.state.assets.map(function(r) { r.id == e && (t = r) }), t } }, { key: "_onSelect", value: function(e) { var t = this.props.onSelect , r = this.getSelectedAssetArray(e); t && t(r) } }, { key: "_onInputChanged", value: function(e) { var t = this.props.onChange , r = this.getSelectedAssetArray(e); t && t(r.id) } }, { key: "render", value: function() { var e = this.props.usageContext , t = this.state.assets.sort(function(e, t) { if (e.id && t.id) return e.id.localeCompare(t.id) }); return n.a.createElement(u.Select, { onSelect: this._onSelect.bind(this), onChange: this._onInputChanged.bind(this), onSearch: this._onInputChanged.bind(this), placeholder: c.a.translate("withdraw" == e ? "gateway.asset_search_withdraw" : "gateway.asset_search_deposit"), value: this.props.defaultValue, optionLabelProp: "value", showSearch: !0, style: { width: "100%" } }, t.length > 0 ? t.map(function(e) { return n.a.createElement(u.Select.Option, { key: e.id, value: e.label }, e.label) }) : n.a.createElement(u.Select.Option, { disabled: !0, key: 0, value: 0 }, c.a.translate("withdraw" == e ? "modal.withdraw.no_assets" : "modal.deposit.no_assets"))) } }]), t }(); h = Object(o.a)(h), t.a = Object(i.a)(h, { listenTo: function() { return [s.a] }, getProps: function() { return { backedCoins: s.a.getState().backedCoins } } }) } , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(1) , o = r.n(i) , s = r(443) , l = r.n(s) , c = r(4) , u = r.n(c) , d = r(7) , p = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var h = function(e) { function t() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var e = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return e.onKeyDown = e.onKeyDown.bind(e), e.state = { password: "", confirmPassword: "", isPasswordInputActive: !1, isConfirmPasswordInputActive: !1 }, e.handlePasswordBlur = e.handlePasswordBlur.bind(e), e.handlePasswordFocus = e.handlePasswordFocus.bind(e), e.handlePasswordChange = e.handlePasswordChange.bind(e), e.handleValidationChange = e.handleValidationChange.bind(e), e.handleConfirmPasswordBlur = e.handleConfirmPasswordBlur.bind(e), e.handleConfirmPasswordFocus = e.handleConfirmPasswordFocus.bind(e), e.handleConfirmPasswordChange = e.handleConfirmPasswordChange.bind(e), e } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, a["Component"]), p(t, [{ key: "handleConfirmPasswordBlur", value: function() { this.setState({ isConfirmPasswordInputActive: !1 }) } }, { key: "handleConfirmPasswordFocus", value: function() { this.setState({ isConfirmPasswordInputActive: !0 }) } }, { key: "handlePasswordBlur", value: function() { this.setState({ isPasswordInputActive: !1 }) } }, { key: "handlePasswordFocus", value: function() { this.setState({ isPasswordInputActive: !0 }) } }, { key: "handlePasswordChange", value: function(e) { var t = this; this.setState({ password: e.target.value }, function() { t.props.onChange && t.props.onChange(t.state.password), t.calculatePasswordScore(t.state.password || ""), t.handleValidationChange() }) } }, { key: "handleConfirmPasswordChange", value: function(e) { var t = this; this.setState({ confirmPassword: e.target.value }, function() { t.handleValidationChange() }) } }, { key: "handleValidationChange", value: function() { var e = { errorMessage: this.getPasswordErrorMessage() || this.getConfirmPasswordErrorMessage() || " ", valid: !this.getPasswordErrorMessage() && !this.getConfirmPasswordErrorMessage() }; console.log(e), this.props.onValidationChange && this.props.onValidationChange(e) } }, { key: "calculatePasswordScore", value: function(e) { var t = this.props.passwordLength , r = l.a.load({ sync: !0 })(e || "") , a = Math.floor(e.length / (1.5 * t)) , n = Math.min(5, r.score + a); console.log(n, r.score, a, e), this.setState({ score: n }) } }, { key: "onKeyDown", value: function(e) { this.props.onEnter && 13 === e.keyCode && this.props.onEnter(e) } }, { key: "getPasswordErrorMessage", value: function() { return this.state.password.length < this.props.passwordLength ? u.a.translate("wallet.pass_length", { minLength: this.props.passwordLength }) : "" } }, { key: "getConfirmPasswordErrorMessage", value: function() { var e = this.state , t = e.password , r = e.confirmPassword; return console.log(t, r, t !== r), t !== r ? u.a.translate("wallet.confirm_error") : "" } }, { key: "render", value: function() { var e = this , t = this.state.score , r = this.props , a = r.readonly , i = r.visible , o = this.getPasswordErrorMessage() , s = this.getConfirmPasswordErrorMessage(); return [n.a.createElement(d.Form.Item, { label: this.props.label || u.a.translate("wallet.enter_password"), key: "password-field", help: e.state.isPasswordInputActive || !e.state.password ? "" : o || "", validateStatus: e.state.isPasswordInputActive || !e.state.password ? "" : o && o.length ? "error" : "" }, n.a.createElement(d.Input, { id: "current-password", onBlur: this.handlePasswordBlur, onFocus: this.handlePasswordFocus, type: i ? "text" : "password", name: "password", placeholder: u.a.translate("wallet.enter_password"), ref: "password", onChange: this.handlePasswordChange, onKeyDown: this.onKeyDown, value: this.state.password, readOnly: a }), n.a.createElement(d.Progress, { percent: 20 * t, showInfo: !1 })), n.a.createElement(d.Form.Item, { label: u.a.translate("wallet.confirm"), key: "confirm-password-field", help: e.state.confirmPassword && e.state.password && s || "", validateStatus: !e.state.isConfirmPasswordInputActive && e.state.confirmPassword && e.state.password && s && s.length ? "error" : "" }, n.a.createElement(d.Input, { id: "confirm-password", onBlur: this.handleConfirmPasswordBlur, onFocus: this.handleConfirmPasswordFocus, type: i ? "text" : "password", name: "confirmPassword", placeholder: u.a.translate("wallet.enter_password"), ref: "confirmPassword", onChange: this.handleConfirmPasswordChange, onKeyDown: this.onKeyDown, value: this.state.confirmPassword, readOnly: a }))] } }]), t }(); h.propTypes = { onChange: o.a.func, onEnter: o.a.func, confirmation: o.a.bool, wrongPassword: o.a.bool, noValidation: o.a.bool, noLabel: o.a.bool, passwordLength: o.a.number, checkStrength: o.a.bool, value: o.a.string, copy: o.a.bool, visible: o.a.bool, readonly: o.a.bool }, h.defaultProps = { confirmation: !1, wrongPassword: !1, noValidation: !1, noLabel: !1, passwordLength: 8, checkStrength: !1, value: "", copy: !1, visible: !1, readonly: !1 }, t.a = h } , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(27) , o = r(409) , s = function(e) { var t = e.op; e.proposer, e.index; (0, e.changeColor)("success"); var r = null; return t[1].memo && (r = n.a.createElement(o.a, { memo: t[1].memo })), t[1].amount.amount = parseFloat(t[1].amount.amount), n.a.createElement("span", { className: "right-td" }, n.a.createElement("div", { className: "inline-block" }, n.a.createElement("div", null, n.a.createElement(i.a, { string: "operation.transfer", keys: [{ type: "account", value: t[1].from, arg: "from" }, { type: "amount", value: t[1].amount, arg: "amount" }, { type: "account", value: t[1].to, arg: "to" }] }), r))) } , l = r(45) , c = r(67) , u = function(e) { var t = e.op , r = e.changeColor , a = e.fromComponent , o = e.marketDirections , s = e.result; if (r("warning"), "proposed_operation" === a) { var u = market_utils.isAskOp(t[1]); return n.a.createElement("span", null, n.a.createElement(i.a, { string: u ? "proposal.limit_order_sell" : "proposal.limit_order_buy", keys: [{ type: "account", value: t[1].seller, arg: "account" }, { type: "amount", value: u ? t[1].amount_to_sell : t[1].min_to_receive, arg: "amount" }, { type: "price", value: { base: u ? t[1].min_to_receive : t[1].amount_to_sell, quote: u ? t[1].amount_to_sell : t[1].min_to_receive }, arg: "price" }] })) } var d = t[1]; return n.a.createElement("span", null, n.a.createElement(l.a.Wrapper, { base: d.min_to_receive.asset_id, quote: d.amount_to_sell.asset_id }, function(e) { var r = e.base , a = e.quote , l = c.a.getMarketName(r, a) , u = l.marketName , p = l.first , h = l.second , m = o.get(u) , f = d.amount_to_sell.asset_id === (m ? p.get("id") : h.get("id")) , g = f ? d.amount_to_sell : d.min_to_receive , _ = f ? d.min_to_receive : d.amount_to_sell , b = f ? t[1].min_to_receive : t[1].amount_to_sell , y = s && "string" == typeof s[1] ? "#" + s[1].substring(4) : ""; return n.a.createElement(i.a, { string: f ? "operation.limit_order_buy" : "operation.limit_order_sell", keys: [{ type: "account", value: t[1].seller, arg: "account" }, { type: "amount", value: b, arg: "amount" }, { type: "price", value: { base: g, quote: _ }, arg: "price" }], params: { order: y } }) })) } , d = r(2) , p = r.n(d) , h = function(e) { var t = e.op , r = e.changeColor , a = e.fromComponent , o = e.linkToAccount; return r("cancel"), "proposed_operation" === a ? n.a.createElement("span", null, o(t[1].fee_paying_account), " ", n.a.createElement(p.a, { component: "span", content: "proposal.limit_order_cancel" }), " #", t[1].order.substring(4)) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.limit_order_cancel", keys: [{ type: "account", value: t[1].fee_paying_account, arg: "account" }], params: { order: t[1].order.substring(4) } })) } , m = function(e) { var t = e.op; return (0, e.changeColor)("cancel"), n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.short_order_cancel" }), " ", t[1].order) } , f = function(e) { var t = e.op , r = e.changeColor , a = e.fromComponent; return r("warning"), n.a.createElement("span", null, n.a.createElement(i.a, { string: "proposed_operation" === a ? "proposal.call_order_update" : "operation.call_order_update", keys: [{ type: "account", value: t[1].funding_account, arg: "account" }, { type: "asset", value: t[1].delta_debt.asset_id, arg: "debtSymbol" }, { type: "amount", value: t[1].delta_debt, arg: "debt" }, { type: "amount", value: t[1].delta_collateral, arg: "collateral" }] })) } , g = function() { return n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "transaction.create_key" })) } , _ = function(e) { var t = e.op , r = e.current , a = e.linkToAccount; return "proposed_operation" === e.fromComponent ? r === t[1].registrar ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.reg_account" }), " ", a(t[1].name)) : n.a.createElement("span", null, a(t[1].name), " ", n.a.createElement(p.a, { component: "span", content: "proposal.was_reg_account" }), " ", a(t[1].registrar)) : n.a.createElement(i.a, { string: "operation.reg_account", keys: [{ type: "account", value: t[1].registrar, arg: "registrar" }, { type: "account", value: t[1].name, arg: "new_account" }] }) } , b = r(5) , y = function(e, t) { return { minus: e.filter(function(e) { return !t.includes(e) }), plus: t.filter(function(t) { return !e.includes(t) }) } } , v = function(e) { if (e.id.startsWith("1.14")) { var t = b.ChainStore.getAccountName(e.worker_account); return "Worker " + e.name + (t ? " of " + t : " account " + e.worker_account) } if (e.id.startsWith("1.6.")) { var r = b.ChainStore.getAccountName(e.witness_account); return "Witness " + (r || " account " + e.witness_account) } var a = b.ChainStore.getAccountName(e.committee_member_account); return "Committee " + (a || " account " + e.committee_member_account) } , w = function(e) { var t = e.op , r = e.fromComponent , a = e.collapsed , o = t[1].account , s = t[1].new_options ? t[1].new_options.votes : void 0 , l = t[1].new_options ? t[1].new_options.memo_key : void 0 , c = t[1].owner ? t[1].owner : void 0 , u = t[1].active ? t[1].active : void 0 , d = {} , p = [] , h = []; if (void 0 == a && (a = !0), "proposed_operation" === r && !a) { var m = b.ChainStore.getAccount(o, !1) , f = m.get("options").get("votes").toArray(); if (s) { var g = y(f, s) , _ = b.ChainStore.getObjectsByVoteIds(g.plus) , w = b.ChainStore.getObjectsByVoteIds(g.minus); _ && w && (_.forEach(function(e) { if (e) { var t = v(e.toJS()); t && p.push(t) } }), w.forEach(function(e) { if (e) { var t = v(e.toJS()); t && h.push(t) } }), d.votes = { minus: h, plus: p }) } if (c) { d.owner = {}; var k = m.get("owner").get("key_auths").map(function(e) { return e.get(0) }).toArray(); d.owner.keys = y(k, c.key_auths.map(function(e) { return e[0] })); var x = m.get("owner").get("account_auths").map(function(e) { return e.get(0) }).toArray(); d.owner.accounts = y(x, c.account_auths.map(function(e) { return e[0] })), m.get("owner").get("weight_threshold") !== c.weight_threshold && (d.owner.weight_threshold = c.weight_threshold) } if (u) { d.active = {}; var S = m.get("active").get("key_auths").map(function(e) { return e.get(0) }).toArray(); d.active.keys = y(S, u.key_auths.map(function(e) { return e[0] })); var A = m.get("active").get("account_auths").map(function(e) { return e.get(0) }).toArray(); d.active.accounts = y(A, u.account_auths.map(function(e) { return e[0] })), m.get("active").get("weight_threshold") !== u.weight_threshold && (d.active.weight_threshold = c.weight_threshold) } if (l) { d.memo = {}; var E = m.get("options").get("memo_key"); d.memo.keys = y([E], [l]), 0 == d.memo.keys.minus.length && 0 == d.memo.keys.plus.length && (d.memo = void 0) } } return n.a.createElement("span", null, n.a.createElement(i.a, { string: "proposed_operation" === r ? "proposal.update_account" : "operation.update_account", keys: [{ type: "account", value: t[1].account, arg: "account" }, { type: "change", value: d, arg: "change" }] })) } , k = function(e) { var t = e.op , r = e.fromComponent , a = t[1].new_listing === listings.no_listing ? "unlisted_by" : t[1].new_listing === listings.white_listed ? "whitelisted_by" : "blacklisted_by"; return "proposed_operation" === r ? n.a.createElement("span", null, n.a.createElement(l.a.Wrapper, { lister: t[1].authorizing_account, listee: t[1].account_to_list }, function(e) { var t = e.lister , r = e.listee; return n.a.createElement(p.a, { component: "span", content: "transaction." + a, lister: t.get("name"), listee: r.get("name") }) })) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation." + a, keys: [{ type: "account", value: t[1].authorizing_account, arg: "lister" }, { type: "account", value: t[1].account_to_list, arg: "listee" }] })) } , x = function(e) { var t = e.op , r = e.linkToAccount; return "proposed_operation" === e.fromComponent ? t[1].upgrade_to_lifetime_member ? n.a.createElement("span", null, r(t[1].account_to_upgrade), " ", n.a.createElement(p.a, { component: "span", content: "proposal.lifetime_upgrade_account" })) : n.a.createElement("span", null, r(t[1].account_to_upgrade), " ", n.a.createElement(p.a, { component: "span", content: "proposal.annual_upgrade_account" })) : n.a.createElement("span", null, n.a.createElement(i.a, { string: t[1].upgrade_to_lifetime_member ? "operation.lifetime_upgrade_account" : "operation.annual_upgrade_account", keys: [{ type: "account", value: t[1].account_to_upgrade, arg: "account" }] })) } , S = function(e) { var t = e.op , r = e.linkToAccount; return "proposed_operation" === e.fromComponent ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.transfer_account" }), " ", r(t[1].account_id), n.a.createElement(p.a, { component: "span", content: "proposal.to" }), " ", r(t[1].new_owner)) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.account_transfer", keys: [{ type: "account", value: t[1].account_id, arg: "account" }, { type: "account", value: t[1].new_owner, arg: "to" }] })) } , A = function(e) { var t = e.op , r = e.changeColor , a = e.fromComponent; return r("warning"), "proposed_operation" === a ? n.a.createElement(i.a, { string: "proposal.asset_create", keys: [{ type: "account", value: t[1].issuer, arg: "account" }], params: { asset: t[1].symbol } }) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.asset_create", keys: [{ type: "account", value: t[1].issuer, arg: "account" }, { type: "asset", value: t[1].symbol, arg: "asset" }] })) } , E = function(e) { var t = e.op , r = e.changeColor , a = e.fromComponent; return r("warning"), n.a.createElement(i.a, { string: "proposed_operation" === a ? "proposal.asset_update" : "operation.asset_update", keys: [{ type: "account", value: t[1].issuer, arg: "account" }, { type: "asset", value: t[1].asset_to_update, arg: "asset" }] }) } , T = function(e) { var t = e.op , r = e.changeColor , a = e.fromComponent; return r("warning"), "proposed_operation" === a ? n.a.createElement(i.a, { string: "proposal.feed_producer", keys: [{ type: "account", value: t[1].issuer, arg: "account" }, { type: "asset", value: t[1].asset_to_update, arg: "asset" }] }) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.asset_update_feed_producers", keys: [{ type: "account", value: t[1].issuer, arg: "account" }, { type: "asset", value: t[1].asset_to_update, arg: "asset" }] })) } , C = function(e) { var t = e.op , r = e.changeColor , a = e.fromComponent; r("warning"); var s = void 0; return t[1].memo && (s = n.a.createElement(o.a, { memo: t[1].memo })), t[1].asset_to_issue.amount = parseInt(t[1].asset_to_issue.amount, 10), n.a.createElement("span", null, n.a.createElement(i.a, { string: "proposed_operation" === a ? "proposal.asset_issue" : "operation.asset_issue", keys: [{ type: "account", value: t[1].issuer, arg: "account" }, { type: "amount", value: t[1].asset_to_issue, arg: "amount" }, { type: "account", value: t[1].issue_to_account, arg: "to" }] }), s) } , z = function(e) { var t = e.op , r = e.fromComponent; return n.a.createElement("span", null, n.a.createElement(i.a, { string: "proposed_operation" === r ? "proposal.asset_reserve" : "operation.asset_reserve", keys: [{ type: "account", value: t[1].payer, arg: "account" }, { type: "amount", value: t[1].amount_to_reserve, arg: "amount" }] })) } , B = r(33) , O = function(e) { var t = e.op , r = e.changeColor , a = e.linkToAccount , o = e.fromComponent; if (r("warning"), "proposed_operation" === o) { var s = b.ChainStore.getAsset(t[1].asset_id); return s = s ? s.get("symbol") : t[1].asset_id, n.a.createElement("span", null, a(t[1].from_account), " ", n.a.createElement(p.a, { component: "span", content: "proposal.fund_pool", asset: s }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].amount, asset: "1.3.0" })) } return n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.asset_fund_fee_pool", keys: [{ type: "account", value: t[1].from_account, arg: "account" }, { type: "asset", value: t[1].asset_id, arg: "asset" }, { type: "amount", value: { amount: t[1].amount, asset_id: "1.3.0" }, arg: "amount" }] })) } , P = function(e) { var t = e.op , r = e.result , a = e.changeColor , o = e.fromComponent; if (a("warning"), "proposed_operation" === o) return n.a.createElement("span", null, n.a.createElement(i.a, { string: "proposal.asset_settle", keys: [{ type: "account", value: t[1].account, arg: "account" }, { type: "amount", value: t[1].amount, arg: "amount" }] })); var s = t[1].amount; if (r && 2 == r[0]) { var l = r[1]; return n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.asset_settle_instant", keys: [{ type: "account", value: t[1].account, arg: "account" }, { type: "amount", value: s, arg: "amount" }, { type: "price", value: { base: s, quote: l }, arg: "price" }] })) } return n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.asset_settle", keys: [{ type: "account", value: t[1].account, arg: "account" }, { type: "amount", value: t[1].amount, arg: "amount" }] })) } , j = function(e) { var t = e.op; return n.a.createElement(i.a, { string: "operation.asset_settle_cancel", keys: [{ type: "account", value: t[1].account, arg: "account" }, { type: "amount", value: t[1].amount, arg: "amount" }] }) } , I = r(127) , M = function(e) { var t = e.op , r = e.changeColor , a = e.linkToAsset , o = e.fromComponent; return r("warning"), "proposed_operation" === o ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.asset_global_settle" }), " ", a(t[1].asset_to_settle), " ", n.a.createElement(p.a, { component: "span", content: "proposal.at" }), " ", n.a.createElement(I.a, { style: { fontWeight: "bold" }, quote_amount: t[1].settle_price.quote.amount, quote_asset: t[1].settle_price.quote.asset_id, base_asset: t[1].settle_price.base.asset_id, base_amount: t[1].settle_price.base.amount })) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.asset_global_settle", keys: [{ type: "account", value: t[1].issuer, arg: "account" }, { type: "asset", value: t[1].asset_to_settle, arg: "asset" }, { type: "price", value: t[1].settle_price, arg: "price" }] })) } , N = function(e) { var t = e.op , r = e.changeColor , a = e.linkToAccount , o = e.fromComponent; return r("warning"), "proposed_operation" === o ? n.a.createElement("span", null, a(t[1].publisher), " ", n.a.createElement(p.a, { component: "span", content: "proposal.publish_feed" }), " ", n.a.createElement(I.a, { base_asset: t[1].feed.settlement_price.base.asset_id, quote_asset: t[1].feed.settlement_price.quote.asset_id, base_amount: t[1].feed.settlement_price.base.amount, quote_amount: t[1].feed.settlement_price.quote.amount })) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.publish_feed", keys: [{ type: "account", value: t[1].publisher, arg: "account" }, { type: "price", value: t[1].feed.settlement_price, arg: "price" }] })) } , R = function(e) { var t = e.op; return n.a.createElement(i.a, { string: "operation.asset_claim_pool", keys: [{ type: "account", value: t[1].issuer, arg: "account" }, { type: "asset", value: t[1].asset_id, arg: "asset" }, { type: "amount", value: t[1].amount_to_claim, arg: "amount" }] }) } , q = function(e) { var t = e.op; return n.a.createElement(i.a, { string: "operation.asset_update_issuer", keys: [{ type: "account", value: t[1].issuer, arg: "from_account" }, { type: "account", value: t[1].new_issuer, arg: "to_account" }, { type: "asset", value: t[1].asset_to_update, arg: "asset" }] }) } , D = function(e) { var t = e.op , r = e.linkToAccount; return "proposed_operation" === e.fromComponent ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.witness_create" }), " ", r(t[1].witness_account)) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.witness_create", keys: [{ type: "account", value: t[1].witness_account, arg: "account" }] })) } , L = function(e) { var t = e.op , r = e.linkToAccount; return "proposed_operation" === e.fromComponent ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.witness_update" }), " ", r(t[1].witness_account)) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.witness_update", keys: [{ type: "account", value: t[1].witness_account, arg: "account" }] })) } , F = function(e) { var t = e.op , r = e.current , a = e.linkToAccount; return "proposed_operation" === e.fromComponent ? r === t[1].witness_account ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.witness_pay" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].amount, asset: "1.3.0" }), n.a.createElement(p.a, { component: "span", content: "proposal.to" }), " ", a(t[1].witness_account)) : n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.received" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].amount, asset: "1.3.0" }), n.a.createElement(p.a, { component: "span", content: "proposal.from" }), " ", a(t[1].witness_account)) : r === t[1].witness_account ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "transaction.witness_pay" }), " ", n.a.createElement(B.a, { amount: t[1].amount, asset: "1.3.0" }), n.a.createElement(p.a, { component: "span", content: "transaction.to" }), " ", a(t[1].witness_account)) : n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "transaction.received" }), " ", n.a.createElement(B.a, { amount: t[1].amount, asset: "1.3.0" }), n.a.createElement(p.a, { component: "span", content: "transaction.from" }), " ", a(t[1].witness_account)) } , U = r(398) , W = function(e) { var t = e.objectId; if ("string" == typeof t) { var r = t.split(".") , a = r.length; if (a > 0) return "#" + r[a - 1] } return t } , H = function(e) { var t = e.op , r = e.result; return "proposed_operation" === e.fromComponent ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.proposal_create" })) : n.a.createElement("div", { className: "inline-block" }, n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.proposal_create", keys: [{ type: "account", value: t[1] && t[1].fee_paying_account, arg: "account" }, { value: r ? n.a.createElement(W, { objectId: r[1] }) : "", arg: "proposal" }] }), ":"), n.a.createElement("div", null, t[1] && t[1].proposed_ops.map(function(e, t) { return n.a.createElement(U.b, { op: e.op, key: t, index: t, inverted: !1, hideFee: !0, hideOpLabel: !0, hideDate: !0, proposal: !0 }) }))) } , K = function(e) { var t = e.objectId; if ("string" == typeof t) { var r = t.split(".") , a = r.length; if (a > 0) return "#" + r[a - 1] } return t } , V = function(e) { var t = e.op , r = e.linkToAccount; if ("proposed_operation" === e.fromComponent) return n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.proposal_update" })); return n.a.createElement("div", null, n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.proposal_update", keys: [{ type: "account", value: t[1].fee_paying_account, arg: "account" }, { value: n.a.createElement(K, { objectId: t[1].proposal }), arg: "proposal" }] })), n.a.createElement("div", { className: "proposal-update" }, ["active_approvals_to_add", "active_approvals_to_remove", "owner_approvals_to_add", "owner_approvals_to_remove", "key_approvals_to_add", "key_approvals_to_remove"].map(function(e) { return t[1][e].length ? n.a.createElement("div", { key: e }, n.a.createElement(p.a, { content: "proposal.updated." + e }), n.a.createElement("ul", null, t[1][e].map(function(t) { return n.a.createElement("li", { key: t }, e.startsWith("key") ? t : r(t)) }))) : null }))) } , G = function(e) { var t = e.objectId; if ("string" == typeof t) { var r = t.split(".") , a = r.length; if (a > 0) return "#" + r[a - 1] } return t } , Y = function(e) { var t = e.op; return "proposed_operation" === e.fromComponent ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.proposal_update" })) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.proposal_delete", keys: [{ type: "account", value: t[1].fee_paying_account, arg: "account" }, { value: n.a.createElement(G, { objectId: t[1].proposal }), arg: "proposal" }] })) } , J = function(e) { var t = e.op , r = e.linkToAccount; return "proposed_operation" === e.fromComponent ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.withdraw_permission_create" }), " ", r(t[1].withdraw_from_account), n.a.createElement(p.a, { component: "span", content: "proposal.to" }), " ", r(t[1].authorized_account)) : n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "transaction.withdraw_permission_create" }), " ", r(t[1].withdraw_from_account), n.a.createElement(p.a, { component: "span", content: "transaction.to" }), " ", r(t[1].authorized_account)) } , X = function(e) { var t = e.op , r = e.linkToAccount; return "proposed_operation" === e.fromComponent ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.withdraw_permission_update" }), " ", r(t[1].withdraw_from_account), n.a.createElement(p.a, { component: "span", content: "proposal.to" }), " ", r(t[1].authorized_account)) : n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "transaction.withdraw_permission_update" }), " ", r(t[1].withdraw_from_account), n.a.createElement(p.a, { component: "span", content: "transaction.to" }), " ", r(t[1].authorized_account)) } , Z = function(e) { var t = e.op , r = e.linkToAccount; return "proposed_operation" === e.fromComponent ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.withdraw_permission_claim" }), " ", r(t[1].withdraw_from_account), n.a.createElement(p.a, { component: "span", content: "proposal.to" }), " ", r(t[1].withdraw_to_account)) : n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "transaction.withdraw_permission_claim" }), " ", r(t[1].withdraw_from_account), n.a.createElement(p.a, { component: "span", content: "transaction.to" }), " ", r(t[1].withdraw_to_account)) } , Q = function(e) { var t = e.op , r = e.linkToAccount; return "proposed_operation" === e.fromComponent ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.withdraw_permission_delete" }), " ", r(t[1].withdraw_from_account), n.a.createElement(p.a, { component: "span", content: "proposal.to" }), " ", r(t[1].authorized_account)) : n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "transaction.withdraw_permission_delete" }), " ", r(t[1].withdraw_from_account), n.a.createElement(p.a, { component: "span", content: "transaction.to" }), " ", r(t[1].authorized_account)) } , $ = function(e) { var t = e.changeColor , r = e.op , a = e.linkToAccount , o = e.marketDirections , s = e.fromComponent; t("success"); var u = r[1]; return "proposed_operation" === s ? n.a.createElement("span", null, a(r.account_id), " ", n.a.createElement(p.a, { component: "span", content: "proposal.paid" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: r.pays.amount, asset: r.pays.asset_id }), " ", n.a.createElement(p.a, { component: "span", content: "proposal.obtain" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: r.receives.amount, asset: r.receives.asset_id }), " ", n.a.createElement(p.a, { component: "span", content: "proposal.at" }), " ", n.a.createElement(I.a, { base_asset: u.pays.asset_id, base_amount: u.pays.amount, quote_asset: u.receives.asset_id, quote_amount: u.receives.amount })) : n.a.createElement("span", null, n.a.createElement(l.a.Wrapper, { base: u.receives.asset_id, quote: u.pays.asset_id }, function(e) { var t = e.base , a = e.quote , s = c.a.getMarketName(t, a) , l = s.marketName , d = s.first , p = s.second , h = o.get(l) , m = u.pays.asset_id === (h ? d.get("id") : p.get("id")) , f = m ? u.receives : u.pays , g = m ? u.pays : u.receives , _ = m ? u.receives : u.pays , b = u.fee.asset_id === _.asset_id ? _.amount - u.fee.amount : _.amount; return n.a.createElement(i.a, { string: "operation.fill_order_" + (m ? "buy" : "sell"), keys: [{ type: "account", value: r[1].account_id, arg: "account" }, { type: "amount", value: { amount: b, asset_id: _.asset_id }, arg: "amount" }, { type: "price", value: { base: f, quote: g }, arg: "price" }], params: { order: u.order_id.substring(4) } }) })) } , ee = function(e) { var t = e.fromComponent; return n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposed_operation" === t ? "proposal.global_parameters_update" : "transaction.global_parameters_update" })) } , te = function() { return n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.file_write" })) } , re = function(e) { var t = e.op , r = e.linkToAccount; return "proposed_operation" === e.fromComponent ? n.a.createElement("span", null, " ", r(t[1].creator), n.a.createElement(p.a, { component: "span", content: "proposal.vesting_balance_create" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].amount.amount, asset: t[1].amount.asset_id }), " ", r(t[1].owner)) : n.a.createElement("span", null, " ", r(t[1].creator), n.a.createElement(p.a, { component: "span", content: "transaction.vesting_balance_create" }), " ", n.a.createElement(B.a, { amount: t[1].amount.amount, asset: t[1].amount.asset_id }), " ", r(t[1].owner)) } , ae = function(e) { var t = e.op , r = e.fromComponent; return n.a.createElement(i.a, { string: "proposed_operation" === r ? "proposal.vesting_balance_withdraw" : "operation.vesting_balance_withdraw", keys: [{ type: "account", value: t[1].owner, arg: "account" }, { type: "amount", value: t[1].amount, arg: "amount" }] }) } , ne = function(e) { var t = e.op; return n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.bond_create_offer" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].amount.amount, asset: t[1].amount.asset_id })) } , ie = function(e) { var t = e.op; return n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.bond_cancel_offer" }), " ", t[1].offer_id) } , oe = function(e) { var t = e.op , r = e.linkToAccount , a = e.current; return a === t[1].lender ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.bond_accept_offer" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].amount_borrowed.amount, asset: t[1].amount_borrowed.asset_id }), n.a.createElement(p.a, { component: "span", content: "proposal.to" }), " ", r(t[1].borrower)) : a === t[1].borrower ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.bond_accept_offer" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].amount_borrowed.amount, asset: t[1].amount_borrowed.asset_id }), n.a.createElement(p.a, { component: "span", content: "proposal.from" }), " ", r(t[1].lender)) : null } , se = function(e) { var t = e.op , r = e.linkToAccount , a = e.current; return a === t[1].lender ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.bond_pay_collateral" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].collateral_claimed.amount, asset: t[1].collateral_claimed.asset_id }), n.a.createElement(p.a, { component: "span", content: "proposal.to" }), " ", r(t[1].claimer)) : a === t[1].claimer ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.bond_claim_collateral" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].collateral_claimed.amount, asset: t[1].collateral_claimed.asset_id }), n.a.createElement(p.a, { component: "span", content: "proposal.from" }), " ", r(t[1].lender)) : null } , le = function(e) { var t = e.op; return "proposed_operation" === e.fromComponent ? n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposal.create_worker" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].daily_pay, asset: "1.3.0" })) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.worker_create", keys: [{ type: "account", value: t[1].owner, arg: "account" }, { type: "amount", value: { amount: t[1].daily_pay, asset_id: "1.3.0" }, arg: "pay" }], params: { name: t[1].name } })) } , ce = r(15) , ue = function(e) { var t = e.op , r = e.changeColor , a = e.linkToAccount , o = e.fromComponent; return r("success"), t[1].total_claimed.amount = parseInt(t[1].total_claimed.amount, 10), "proposed_operation" === o ? n.a.createElement("span", null, a(t[1].deposit_to_account), " ", n.a.createElement(l.a.Wrapper, { asset: t[1].total_claimed.asset_id }, function(e) { var r = e.asset; return n.a.createElement(p.a, { component: "span", content: "proposal.balance_claim", balance_amount: ce.a.format_asset(t[1].total_claimed.amount, r), balance_id: t[1].balance_to_claim.substring(5) }) })) : n.a.createElement("span", null, n.a.createElement(i.a, { string: "operation.balance_claim", keys: [{ type: "account", value: t[1].deposit_to_account, arg: "account" }, { type: "amount", value: t[1].total_claimed, arg: "amount" }] })) } , de = function(e) { var t = e.op , r = e.linkToAccount , a = e.fromComponent; return n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposed_operation" === a ? "proposal.committee_member_create" : "transaction.committee_member_create" }), " ", r(t[1].committee_member_account)) } , pe = function(e) { var t = e.op , r = e.linkToAccount , a = e.fromComponent; return n.a.createElement("span", null, r(t[1].from), " ", n.a.createElement(p.a, { component: "span", content: "proposed_operation" === a ? "proposal.sent" : "transaction.sent" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].amount.amount, asset: t[1].amount.asset_id })) } , he = function(e) { var t = e.op , r = e.linkToAccount , a = e.fromComponent; return n.a.createElement("span", null, r(t[1].to), " ", n.a.createElement(p.a, { component: "span", content: "proposed_operation" === a ? "proposal.received" : "transaction.received" }), " ", n.a.createElement(B.a, { style: { fontWeight: "bold" }, amount: t[1].amount.amount, asset: t[1].amount.asset_id })) } , me = function(e) { var t = e.op , r = e.changeColor , a = e.linkToAccount; return r("success"), t[1].amount_to_claim.amount = parseInt(t[1].amount_to_claim.amount, 10), n.a.createElement("span", null, a(t[1].issuer), " ", n.a.createElement(l.a.Wrapper, { asset: t[1].amount_to_claim.asset_id }, function(e) { var r = e.asset; return n.a.createElement(i.a, { string: "transaction.asset_claim_fees", keys: [{ type: "amount", value: t[1].amount_to_claim, arg: "balance_amount" }, { type: "asset", value: r.get("id"), arg: "asset" }] }) })) } , fe = function(e) { var t = e.fromComponent; return n.a.createElement("span", null, n.a.createElement(i.a, { string: "proposed_operation" === t ? "proposal.committee_member_update_global_parameters" : "operation.committee_member_update_global_parameters", keys: [{ type: "account", value: "1.2.0", arg: "account" }] })) } , ge = function(e) { var t = e.fromComponent; return n.a.createElement("span", null, n.a.createElement(p.a, { component: "span", content: "proposed_operation" === t ? "proposal.custom" : "transaction.custom" })) } , _e = function(e) { var t = e.op , r = e.fromComponent; return n.a.createElement(i.a, { string: "proposed_operation" === r ? "proposal.override_transfer" : "operation.override_transfer", keys: [{ type: "account", value: t[1].issuer, arg: "issuer" }, { type: "account", value: t[1].from, arg: "from" }, { type: "account", value: t[1].to, arg: "to" }, { type: "amount", value: t[1].amount, arg: "amount" }] }) } , be = r(2238) , ye = function(e) { var t = e.op , r = e.block; return console.log("unimplemented op:", t), n.a.createElement("span", null, n.a.createElement(be.a, { to: "/block/" + r }, "#", r)) } , ve = function(e) { var t = e.op; return n.a.createElement(i.a, { string: "operation.bid_collateral", keys: [{ type: "account", value: t[1].bidder, arg: "bid_account" }, { type: "amount", value: t[1].additional_collateral, arg: "collateral" }, { type: "amount", value: t[1].debt_covered, arg: "debt" }] }) } , we = r(7) , ke = r(4) , xe = r.n(ke) , Se = function(e) { var t = e.op , r = e.block , a = b.ChainStore.getObject("2.0.0") , o = b.ChainStore.getObject("2.1.0") , s = ce.a.calc_block_time(r, a, o) , l = !1; s || (s = ce.a.calc_block_time(r, a, o, !0), l = !0), t[1].amount.amount = parseFloat(t[1].amount.amount); var c = new Date; return c.setTime(s.getTime() + 1e3 * t[1].claim_period_seconds), n.a.createElement(n.a.Fragment, null, n.a.createElement("span", { className: "right-td" }, n.a.createElement(i.a, { string: "operation.htlc_create", keys: [{ type: "date", arg: "lock_period", value: c }, { type: "account", value: t[1].from, arg: "from" }, { type: "amount", value: t[1].amount, arg: "amount", decimalOffset: "1.3.0" === t[1].amount.asset_id ? 5 : null }, { type: "account", value: t[1].to, arg: "to" }] }), n.a.createElement(we.Tooltip, { title: "Estimated" }, l ? "*" : "")), n.a.createElement("div", { className: "memo", style: { paddingTop: 5, cursor: "help" } }, n.a.createElement(we.Tooltip, { placement: "bottom", title: xe.a.translate("htlc.preimage_hash_explanation") }, n.a.createElement("span", { className: "inline-block" }, xe.a.translate("htlc.preimage_hash") + " (" + t[1].preimage_size + ", " + t[1].preimage_hash[0] + "): " + t[1].preimage_hash[1])))) } , Ae = function(e) { var t = e.op; return n.a.createElement("span", { className: "right-td" }, n.a.createElement(i.a, { string: "operation.htlc_extend", keys: [{ type: "account", value: t[1].update_issuer, arg: "update_issuer" }, { type: "timespan", arg: "seconds_to_add", value: t[1].seconds_to_add }, { value: t[1].htlc_id, arg: "htlc_id" }] })) } , Ee = function(e) { var t = e.op; return (0, e.changeColor)("success"), n.a.createElement(n.a.Fragment, null, n.a.createElement("span", { className: "right-td" }, n.a.createElement(i.a, { string: "operation.htlc_redeem", keys: [{ type: "account", value: t[1].redeemer, arg: "redeemer" }, { value: t[1].htlc_id, arg: "htlc_id" }] })), n.a.createElement("div", { className: "memo", style: { paddingTop: 5, cursor: "help" } }, n.a.createElement(we.Tooltip, { placement: "bottom", title: xe.a.translate("htlc.preimage_explanation") }, n.a.createElement("span", { className: "inline-block" }, xe.a.translate("htlc.preimage") + ": " + t[1].preimage)))) } , Te = function(e) { var t = e.op; return n.a.createElement("span", { className: "right-td" }, n.a.createElement(i.a, { string: "operation.htlc_redeemed", keys: [{ type: "account", value: t[1].to, arg: "to" }, { type: "account", value: t[1].from, arg: "from" }, { type: "amount", value: t[1].amount, arg: "amount", decimalOffset: "1.3.0" === t[1].amount.asset_id ? 5 : null }, { value: t[1].htlc_id, arg: "htlc_id" }] })) } , Ce = function(e) { var t = e.op; return (0, e.changeColor)("warning"), n.a.createElement("span", { className: "right-td" }, n.a.createElement(i.a, { string: "operation.htlc_refund", keys: [{ value: t[1].htlc_id, arg: "htlc_id" }, { type: "account", value: t[1].to, arg: "to" }] })) }; r.d(t, "a", function() { return Be }); var ze = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]) } return e } ; function Be(e, t, r) { switch (e) { case "transfer": return n.a.createElement(s, ze({}, t, r)); case "limit_order_create": return n.a.createElement(u, ze({}, t, r)); case "limit_order_cancel": return n.a.createElement(h, ze({}, t, r)); case "short_order_cancel": return n.a.createElement(m, ze({}, t, r)); case "call_order_update": return n.a.createElement(f, ze({}, t, r)); case "key_create": return n.a.createElement(g, null); case "account_create": return n.a.createElement(_, ze({}, t, r)); case "account_update": return n.a.createElement(w, ze({}, t, r)); case "account_whitelist": return n.a.createElement(k, ze({}, t, r)); case "account_upgrade": return n.a.createElement(x, ze({}, t, r)); case "account_transfer": return n.a.createElement(S, ze({}, t, r)); case "asset_create": return n.a.createElement(A, ze({}, t, r)); case "asset_update": case "asset_update_bitasset": return n.a.createElement(E, ze({}, t, r)); case "asset_update_feed_producers": return n.a.createElement(T, ze({}, t, r)); case "asset_issue": return n.a.createElement(C, ze({}, t, r)); case "asset_reserve": return n.a.createElement(z, ze({}, t, r)); case "asset_fund_fee_pool": return n.a.createElement(O, ze({}, t, r)); case "asset_settle": return n.a.createElement(P, ze({}, t, r)); case "asset_settle_cancel": return n.a.createElement(j, t); case "asset_global_settle": return n.a.createElement(M, ze({}, t, r)); case "asset_publish_feed": return n.a.createElement(N, ze({}, t, r)); case "asset_claim_pool": return n.a.createElement(R, ze({}, t, r)); case "asset_update_issuer": return n.a.createElement(q, t); case "witness_create": return n.a.createElement(D, ze({}, t, r)); case "witness_update": return n.a.createElement(L, ze({}, t, r)); case "witness_withdraw_pay": return n.a.createElement(F, ze({}, t, r)); case "proposal_create": return n.a.createElement(H, ze({}, t, r)); case "proposal_update": return n.a.createElement(V, ze({}, t, r)); case "proposal_delete": return n.a.createElement(Y, ze({}, t, r)); case "withdraw_permission_create": return n.a.createElement(J, ze({}, t, r)); case "withdraw_permission_update": return n.a.createElement(X, ze({}, t, r)); case "withdraw_permission_claim": return n.a.createElement(Z, ze({}, t, r)); case "withdraw_permission_delete": return n.a.createElement(Q, ze({}, t, r)); case "fill_order": return n.a.createElement($, ze({}, t, r)); case "global_parameters_update": return n.a.createElement(ee, { fromComponent: r.fromComponent }); case "file_write": return n.a.createElement(te, null); case "vesting_balance_create": return n.a.createElement(re, ze({}, t, r)); case "vesting_balance_withdraw": return n.a.createElement(ae, ze({}, t, r)); case "bond_create_offer": return n.a.createElement(ne, t); case "bond_cancel_offer": return n.a.createElement(ie, t); case "bond_accept_offer": return n.a.createElement(oe, ze({}, t, r)); case "bond_claim_collateral": return n.a.createElement(se, ze({}, t, r)); case "worker_create": return n.a.createElement(le, ze({}, t, r)); case "balance_claim": return n.a.createElement(ue, ze({}, t, r)); case "committee_member_create": return n.a.createElement(de, ze({}, t, r)); case "transfer_to_blind": return n.a.createElement(pe, ze({}, t, r)); case "transfer_from_blind": return n.a.createElement(he, ze({}, t, r)); case "asset_claim_fees": return n.a.createElement(me, ze({}, t, r)); case "committee_member_update_global_parameters": return n.a.createElement(fe, { fromComponent: r.fromComponent }); case "custom": return n.a.createElement(ge, { fromComponent: r.fromComponent }); case "override_transfer": return n.a.createElement(_e, ze({}, t, r)); case "bid_collateral": return n.a.createElement(ve, t); case "htlc_create": return n.a.createElement(Se, ze({}, t, r)); case "htlc_redeem": return n.a.createElement(Ee, ze({}, t, r)); case "htlc_redeemed": return n.a.createElement(Te, ze({}, t, r)); case "htlc_extend": return n.a.createElement(Ae, ze({}, t, r)); case "htlc_refund": return n.a.createElement(Ce, ze({}, t, r)); default: return n.a.createElement(ye, t) } } } , , , function(e, t, r) { "use strict"; var a = function() { var e = navigator.userAgent.toLowerCase(); return e.indexOf("firefox") > -1 ? "firefox" : e.search("safari") >= 0 && e.search("chrome") < 0 ? "safari" : window.chrome ? "chrome" : e.indexOf("msie") > -1 || e.match(/trident.*rv\:11\./) ? "ie" : e.indexOf("opera") > -1 ? "opera" : e } , n = function(e) { navigator.userAgent.toLowerCase(); var t = a(); if ("firefox" === t) { var r = indexedDB.open("test"); r.onerror = function() { e(!0) } , r.onsuccess = function() { e(!1) } } else if ("safari" === t) { var n = window.sessionStorage; try { n.setItem("someKeyHere", "test"), n.removeItem("someKeyHere"), e(!1) } catch (t) { t.code === DOMException.QUOTA_EXCEEDED_ERR && 0 === n.length ? e(!0) : e(!1) } } else if ("chrome" === t || "opera" === t) { var i = window.RequestFileSystem || window.webkitRequestFileSystem; if (!i) return void e(!1); i(window.TEMPORARY, 100, function(t) { e(!1) }, function(t) { e(!0) }) } else "ie" === t && (window.indexedDB || !window.PointerEvent && !window.MSPointerEvent ? e(!1) : e(!0)) }; r.d(t, "a", function() { return n }), r.d(t, !1, function() { return a }) } , , , , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(14) , i = r(15) , o = r(94) , s = r(19) , l = r(5) , c = r(161) , u = r.n(c) , d = r(78) , p = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var h = {} , m = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e) } return p(e, [{ key: "publishFeed", value: function(e) { var t = e.publisher , r = e.asset_id , a = e.mcr , n = e.mssr , i = e.feedPrice , l = e.cer , c = o.a.new_transaction(); return c.add_type_operation("asset_publish_feed", { publisher: t, asset_id: r, feed: { settlement_price: i.toObject(), maintenance_collateral_ratio: a, maximum_short_squeeze_ratio: n, core_exchange_rate: l.toObject() } }), function(e) { return s.a.process_transaction(c, null, !0).then(function() { e(!0) }).catch(function(t) { console.log("----- fundPool error -----\x3e", t), e(!1) }) } } }, { key: "fundPool", value: function(e, t, r, a) { var n = o.a.new_transaction() , l = i.a.get_asset_precision(t.get("precision")); return n.add_type_operation("asset_fund_fee_pool", { fee: { amount: 0, asset_id: "1.3.0" }, from_account: e, asset_id: r.get("id"), amount: a * l }), function(e) { return s.a.process_transaction(n, null, !0).then(function() { e(!0) }).catch(function(t) { console.log("----- fundPool error -----\x3e", t), e(!1) }) } } }, { key: "claimPool", value: function(e, t) { var r = o.a.new_transaction(); return r.add_type_operation("asset_claim_pool", { fee: { amount: 0, asset_id: "1.3.0" }, issuer: e.get("issuer"), asset_id: e.get("id"), amount_to_claim: t.toObject() }), function(e) { return s.a.process_transaction(r, null, !0).then(function() { e(!0) }).catch(function(t) { console.log("----- claimPool error -----\x3e", t), e(!1) }) } } }, { key: "bidCollateral", value: function(e, t, r, a, n) { var l = i.a.get_asset_precision(t.get("precision")) , c = i.a.get_asset_precision(r.get("precision")) , u = o.a.new_transaction(); return u.add_type_operation("bid_collateral", { fee: { amount: 0, asset_id: "1.3.0" }, bidder: e, additional_collateral: { amount: a * l, asset_id: t.get("id") }, debt_covered: { amount: n * c, asset_id: r.get("id") }, extensions: [] }), function(e) { return s.a.process_transaction(u, null, !0).then(function() { e(!0) }).catch(function(t) { console.log("----- collateralBid error -----\x3e", t), e(!1) }) } } }, { key: "updateOwner", value: function(e, t) { var r = o.a.new_transaction(); return r.add_type_operation("asset_update_issuer", { fee: { amount: 0, asset_id: "1.3.0" }, issuer: e.issuer, asset_to_update: e.id, new_issuer: t }), function(e) { return s.a.process_transaction(r, null, !0).then(function() { e(!0) }).catch(function(t) { console.log("----- updateOwner error -----\x3e", t), e(!1) }) } } }, { key: "updateFeedProducers", value: function(e, t, r) { var a = o.a.new_transaction(); return a.add_type_operation("asset_update_feed_producers", { fee: { amount: 0, asset_id: "1.3.0" }, issuer: e, asset_to_update: t.get("id"), new_feed_producers: r }), function(e) { return s.a.process_transaction(a, null, !0).then(function() { e(!0) }).catch(function(t) { console.log("----- updateFeedProducers error -----\x3e", t), e(!1) }) } } }, { key: "claimPoolFees", value: function(e, t, r) { var a = o.a.new_transaction(); return a.add_type_operation("asset_claim_fees", { fee: { amount: 0, asset_id: 0 }, issuer: e, amount_to_claim: { asset_id: t.get("id"), amount: r.getAmount() } }), function(e) { return s.a.process_transaction(a, null, !0).then(function() { e(!0) }).catch(function(t) { console.log("----- claimFees error -----\x3e", t), e(!1) }) } } }, { key: "createAsset", value: function(e, t, r, a, n, c, d, p, h) { console.log("create asset:", t, "flags:", r, "isBitAsset:", c, "bitasset_opts:", p); var m = o.a.new_transaction() , f = i.a.get_asset_precision(t.precision); u.a.config({ DECIMAL_PLACES: t.precision }); var g = new u.a(t.max_supply).times(f).toString() , _ = new u.a(t.max_market_fee || 0).times(f).toString() , b = i.a.get_asset_precision(l.ChainStore.getAsset(n.base.asset_id).get("precision")) , y = { fee: { amount: 0, asset_id: 0 }, issuer: e, symbol: t.symbol, precision: parseInt(t.precision, 10), common_options: { max_supply: g, market_fee_percent: 100 * t.market_fee_percent || 0, max_market_fee: _, issuer_permissions: a, flags: r, core_exchange_rate: { base: { amount: n.base.amount * b, asset_id: n.base.asset_id }, quote: { amount: n.quote.amount * f, asset_id: "1.3.1" } }, whitelist_authorities: [], blacklist_authorities: [], whitelist_markets: [], blacklist_markets: [], description: h, extensions: { reward_percent: 100 * t.reward_percent || 0, whitelist_market_fee_sharing: [] } }, is_prediction_market: d, extensions: null }; return c && (y.bitasset_opts = p), m.add_type_operation("asset_create", y), function(e) { return s.a.process_transaction(m, null, !0).then(function(t) { e(!0) }).catch(function(t) { console.log("----- createAsset error -----\x3e", t), e(!1) }) } } }, { key: "updateAsset", value: function(e, t, r, a, n, c, d, p, h, m, f, g, _, b, y) { var v = o.a.new_transaction(); if (y) { var w = i.a.get_asset_precision(n.get("precision")); u.a.config({ DECIMAL_PLACES: n.get("precision") }); var k = new u.a(r.max_supply).times(w).toString() , x = new u.a(r.max_market_fee || 0).times(w).toString() , S = l.ChainStore.getAsset(a.quote.asset_id) , A = i.a.get_asset_precision(S.get("precision")) , E = l.ChainStore.getAsset(a.base.asset_id) , T = i.a.get_asset_precision(E.get("precision")) , C = new u.a(a.quote.amount).times(A).toString() , z = new u.a(a.base.amount).times(T).toString() , B = n.getIn(["options", "extensions"]).toJS(); void 0 !== r.reward_percent && (B.reward_percent = 100 * r.reward_percent), g.whitelist_market_fee_sharing && (B.whitelist_market_fee_sharing = g.whitelist_market_fee_sharing.toJS()); var O = { fee: { amount: 0, asset_id: 0 }, asset_to_update: n.get("id"), extensions: n.get("extensions"), issuer: e, new_issuer: t, new_options: { max_supply: k, max_market_fee: x, market_fee_percent: 100 * r.market_fee_percent, description: f, issuer_permissions: d, flags: c, whitelist_authorities: g.whitelist_authorities.toJS(), blacklist_authorities: g.blacklist_authorities.toJS(), whitelist_markets: g.whitelist_markets.toJS(), blacklist_markets: g.blacklist_markets.toJS(), extensions: B, core_exchange_rate: { quote: { amount: C, asset_id: a.quote.asset_id }, base: { amount: z, asset_id: a.base.asset_id } } } }; e !== t && t || delete O.new_issuer, v.add_type_operation("asset_update", O) } if (console.log("bitasset_opts:", h, "original_bitasset_opts:", m), p && (h.feed_lifetime_sec !== m.feed_lifetime_sec || h.minimum_feeds !== m.minimum_feeds || h.force_settlement_delay_sec !== m.force_settlement_delay_sec || h.force_settlement_offset_percent !== m.force_settlement_offset_percent || h.maximum_force_settlement_volume !== m.maximum_force_settlement_volume || h.short_backing_asset !== m.short_backing_asset)) { var P = { fee: { amount: 0, asset_id: 0 }, asset_to_update: n.get("id"), issuer: e, new_options: h }; v.add_type_operation("asset_update_bitasset", P) } return console.log("feedProducers:", _, "originalFeedProducers:", b), p && !i.a.are_equal_shallow(_, b) && v.add_type_operation("asset_update_feed_producers", { fee: { amount: 0, asset_id: "1.3.0" }, issuer: e, asset_to_update: n.get("id"), new_feed_producers: _ }), s.a.process_transaction(v, null, !0).then(function(e) { return console.log("asset create result:", e), !0 }).catch(function(e) { return console.log("----- updateAsset error -----\x3e", e), !1 }) } }, { key: "getAssetList", value: function(e, t) { var r = this , a = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] , i = e + "_" + t; return function(o) { if (!h[i]) { var s; return h[i] = !0, o({ loading: !0 }), s = n.Apis.instance().db_api().exec("list_assets", [e, t]).then(function(e) { var t = [] , r = []; e.forEach(function(e) { l.ChainStore._updateObject(e, !1), r.push(e.dynamic_asset_data_id), e.bitasset_data_id && t.push(e.bitasset_data_id) }); var a = n.Apis.instance().db_api().exec("get_objects", [r]) , s = t.length > 0 ? n.Apis.instance().db_api().exec("get_objects", [t]) : null; Promise.all([a, s]).then(function(t) { return delete h[i], o({ assets: e, dynamic: t[0], bitasset_data: t[1], loading: !1 }), e && e.length }) }).catch(function(e) { console.log("Error in AssetActions.getAssetList: ", e), o({ loading: !1 }), delete h[i] }), a && d.c.forEach(function(t) { r.getAssetList(t + "." + e, 10) }), s } } } }, { key: "lookupAsset", value: function(e, t) { var r = l.ChainStore.getAsset(e); return r ? { assets: [r], searchID: t, symbol: e } : function(r) { setTimeout(function() { var a = l.ChainStore.getAsset(e); a && r({ assets: [a], searchID: t, symbol: e }) }, 200) } } }, { key: "reserveAsset", value: function(e, t, r) { var a = o.a.new_transaction(); return a.add_type_operation("asset_reserve", { fee: { amount: 0, asset_id: 0 }, amount_to_reserve: { amount: e, asset_id: t }, payer: r, extensions: [] }), function(e) { return s.a.process_transaction(a, null, !0).then(function() { return e(!0), !0 }).catch(function(t) { return e(!1), console.log("----- reserveAsset error -----\x3e", t), !1 }) } } }]), e }(); t.a = a.a.createActions(m) } , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , function(e, t) { e.exports = { account_listing: { no_listing: 0, white_listed: 1, black_listed: 2, white_and_black_listed: 3 } } } , function(e, t, r) {} , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(30) , n = r(195) , i = r(25) , o = r(4) , s = r.n(o) , l = r(55) , c = r(108) , u = r(415) , d = r.n(u) , p = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var h = r(651) , m = new l.a("__graphene__"); s.a.registerTranslations("en", h), s.a.setFallbackLocale("en"); var f = !0 , g = !1 , _ = void 0; try { for (var b, y = d.a[Symbol.iterator](); !(f = (b = y.next()).done); f = !0) { var v = b.value; Object(c.e)(r(1953)("./" + v)) } } catch (e) { g = !0, _ = e } finally { try { !f && y.return && y.return() } finally { if (g) throw _ } } var w = function() { function e() { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, e); var t = m.get("settings_v4", {}); void 0 === t.locale && (t.locale = "en"), this.currentLocale = t.locale, this.locales = ["en"], this.localesObject = { en: h }, this.bindListeners({ onSwitchLocale: n.a.switchLocale, onGetLocale: n.a.getLocale, onClearSettings: i.a.clearSettings }) } return p(e, [{ key: "hasLocale", value: function(e) { return -1 !== this.locales.indexOf(e) } }, { key: "getCurrentLocale", value: function() { return this.currentLocale } }, { key: "onSwitchLocale", value: function(e) { var t = e.locale , r = e.localeData; switch (t) { case "en": s.a.registerTranslations("en", this.localesObject.en); break; default: s.a.registerTranslations(t, r) } s.a.setLocale(t), this.currentLocale = t } }, { key: "onGetLocale", value: function(e) { -1 === this.locales.indexOf(e) && this.locales.push(e) } }, { key: "onClearSettings", value: function() { this.onSwitchLocale({ locale: "en" }) } }]), e }(); t.a = a.a.createStore(w, "IntlStore") } , , , , function(e, t, r) { "use strict"; var a = r(0) , n = r.n(a) , i = r(7) , o = r(271) , s = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]) } return e } , l = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var c = function(e) { function t() { return function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t), function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)) } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, o["a"]), l(t, [{ key: "componentWillReceiveProps", value: function(e) { this.props.value && !e.value && (this.refs.input.value = "") } }, { key: "render", value: function() { var e = this.props , t = (e.allowNaN, function(e, t) { var r = {}; for (var a in e) t.indexOf(a) >= 0 || Object.prototype.hasOwnProperty.call(e, a) && (r[a] = e[a]); return r }(e, ["allowNaN"])); return n.a.createElement(i.Input, s({ ref: "input", type: "text" }, t, { onPaste: this.props.onPaste || this.onPaste.bind(this), onKeyPress: this.onKeyPress.bind(this) })) } }]), t }(); t.a = c } , , , , , , , , , , , function(e, t, r) { "use strict"; var a = r(857) , n = r(0) , i = r.n(n) , o = r(4) , s = r.n(o) , l = r(15) , c = r(2259) , u = r(1) , d = r.n(u) , p = r(203) , h = r.n(p) , m = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) { return typeof e } : function(e) { return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e } , f = function() { function e(e, t) { for (var r = 0; r < t.length; r++) { var a = t[r]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value"in a && (a.writable = !0), Object.defineProperty(e, a.key, a) } } return function(t, r, a) { return r && e(t.prototype, r), a && e(t, a), t } }(); var g = r(1656) , _ = {}; var b = function(e) { function t(e) { !function(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") }(this, t); var r = function(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t }(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e)); return window._onClickLink = r.onClickLink.bind(r), r } return 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 = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) }(t, i.a.Component), f(t, [{ key: "componentWillMount", value: function() { var e = this.props.locale || s.a.getLocale() || "en"; g.keys().filter(function(t) { return -1 !== t.indexOf("/" + e + "/") || -1 !== t.indexOf("/en/") }).forEach(function(e) { var t = e.match(/\/(.+?)\/(.+)\./) , r = t[1] , n = t[2] , i = _[r]; i || (_[r] = i = {}); var o = g(e); i[n] = function(e) { var t = e.split(/\[#\s?(.+?)\s?\]/); if (1 === t.length) return t[0]; t[0].length < 4 && t.splice(0, 1); for (var r = t.length - 1; r >= 1; r -= 2) t[r] = t[r].replace(/(^<\/p>|
" + M + ': | ' + N + " " + a.get("symbol") + " |
** no data | |
' + b.a.translate("account.total_estimate") + " |