diff --git a/js/tronweb.js b/js/tronweb.js new file mode 100644 index 0000000..f23fb85 --- /dev/null +++ b/js/tronweb.js @@ -0,0 +1,41689 @@ +/*! For license information please see TronWeb.js.LICENSE.txt */ +!function(e, t) { + "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define("TronWeb", [], t) : "object" == typeof exports ? exports.TronWeb = t() : e.TronWeb = t() +}(self, (()=>(()=>{ + var e = { + 5595: function(e, t, r) { + var n = "function" == typeof Object.defineProperties ? Object.defineProperty : function(e, t, r) { + e != Array.prototype && e != Object.prototype && (e[t] = r.value) + } + , o = "undefined" != typeof window && window === this ? this : void 0 !== r.g && null != r.g ? r.g : this; + function s() { + s = function() {} + , + o.Symbol || (o.Symbol = u) + } + function i(e, t) { + this.a = e, + n(this, "description", { + configurable: !0, + writable: !0, + value: t + }) + } + i.prototype.toString = function() { + return this.a + } + ; + var a, u = (a = 0, + function e(t) { + if (this instanceof e) + throw new TypeError("Symbol is not a constructor"); + return new i("jscomp_symbol_" + (t || "") + "_" + a++,t) + } + ); + function c() { + s(); + var e = o.Symbol.iterator; + e || (e = o.Symbol.iterator = o.Symbol("Symbol.iterator")), + "function" != typeof Array.prototype[e] && n(Array.prototype, e, { + configurable: !0, + writable: !0, + value: function() { + return function(e) { + return c(), + (e = { + next: e + })[o.Symbol.iterator] = function() { + return this + } + , + e + }(function(e) { + var t = 0; + return function() { + return t < e.length ? { + done: !1, + value: e[t++] + } : { + done: !0 + } + } + }(this)) + } + }), + c = function() {} + } + !function(e, t) { + if (t) { + var r = o; + e = e.split("."); + for (var s = 0; s < e.length - 1; s++) { + var i = e[s]; + i in r || (r[i] = {}), + r = r[i] + } + (t = t(s = r[e = e[e.length - 1]])) != s && null != t && n(r, e, { + configurable: !0, + writable: !0, + value: t + }) + } + }("Array.prototype.entries", (function(e) { + return e || function() { + return function(e, t) { + c(), + e instanceof String && (e += ""); + var r = 0 + , n = { + next: function() { + if (r < e.length) { + var o = r++; + return { + value: t(o, e[o]), + done: !1 + } + } + return n.next = function() { + return { + done: !0, + value: void 0 + } + } + , + n.next() + } + }; + return n[Symbol.iterator] = function() { + return n + } + , + n + }(this, (function(e, t) { + return [e, t] + } + )) + } + } + )); + var l = this || self; + function d(e, t, r) { + e = e.split("."), + r = r || l, + e[0]in r || void 0 === r.execScript || r.execScript("var " + e[0]); + for (var n; e.length && (n = e.shift()); ) + e.length || void 0 === t ? r = r[n] && r[n] !== Object.prototype[n] ? r[n] : r[n] = {} : r[n] = t + } + function h(e) { + var t = typeof e; + if ("object" == t) { + if (!e) + return "null"; + if (e instanceof Array) + return "array"; + if (e instanceof Object) + return t; + var r = Object.prototype.toString.call(e); + if ("[object Window]" == r) + return "object"; + if ("[object Array]" == r || "number" == typeof e.length && void 0 !== e.splice && void 0 !== e.propertyIsEnumerable && !e.propertyIsEnumerable("splice")) + return "array"; + if ("[object Function]" == r || void 0 !== e.call && void 0 !== e.propertyIsEnumerable && !e.propertyIsEnumerable("call")) + return "function" + } else if ("function" == t && void 0 === e.call) + return "object"; + return t + } + function p(e) { + var t = typeof e; + return "object" == t && null != e || "function" == t + } + var f = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ") + , g = Array.prototype.forEach ? function(e, t) { + Array.prototype.forEach.call(e, t, void 0) + } + : function(e, t) { + for (var r = e.length, n = "string" == typeof e ? e.split("") : e, o = 0; o < r; o++) + o in n && t.call(void 0, n[o], o, e) + } + , y = Array.prototype.map ? function(e, t) { + return Array.prototype.map.call(e, t, void 0) + } + : function(e, t) { + for (var r = e.length, n = Array(r), o = "string" == typeof e ? e.split("") : e, s = 0; s < r; s++) + s in o && (n[s] = t.call(void 0, o[s], s, e)); + return n + } + ; + function b(e, t, r) { + return 2 >= arguments.length ? Array.prototype.slice.call(e, t) : Array.prototype.slice.call(e, t, r) + } + function m(e, t, r, n) { + var o = "Assertion failed"; + if (r) { + o += ": " + r; + var s = n + } else + e && (o += ": " + e, + s = t); + throw Error(o, s || []) + } + function T(e, t, r) { + for (var n = [], o = 2; o < arguments.length; ++o) + n[o - 2] = arguments[o]; + return e || m("", null, t, n), + e + } + function v(e, t) { + for (var r = [], n = 1; n < arguments.length; ++n) + r[n - 1] = arguments[n]; + throw Error("Failure" + (e ? ": " + e : ""), r) + } + function w(e, t, r, n) { + for (var o = [], s = 3; s < arguments.length; ++s) + o[s - 3] = arguments[s]; + e instanceof t || m("Expected instanceof %s but got %s.", [A(t), A(e)], r, o) + } + function A(e) { + return e instanceof Function ? e.displayName || e.name || "unknown type name" : e instanceof Object ? e.constructor.displayName || e.constructor.name || Object.prototype.toString.call(e) : null === e ? "null" : typeof e + } + function P(e, t) { + if (this.c = e, + this.b = t, + this.a = {}, + this.arrClean = !0, + 0 < this.c.length) { + for (e = 0; e < this.c.length; e++) { + var r = (t = this.c[e])[0]; + this.a[r.toString()] = new E(r,t[1]) + } + this.arrClean = !0 + } + } + function W(e) { + this.a = 0, + this.b = e + } + function B(e, t) { + return e.b ? (t.a || (t.a = new e.b(t.value)), + t.a) : t.value + } + function C(e) { + e = e.a; + var t, r = []; + for (t in e) + Object.prototype.hasOwnProperty.call(e, t) && r.push(t); + return r + } + function E(e, t) { + this.key = e, + this.value = t, + this.a = void 0 + } + function M(e) { + if (8192 >= e.length) + return String.fromCharCode.apply(null, e); + for (var t = "", r = 0; r < e.length; r += 8192) + t += String.fromCharCode.apply(null, b(e, r, r + 8192)); + return t + } + d("jspb.Map", P, void 0), + P.prototype.g = function() { + if (this.arrClean) { + if (this.b) { + var e, t = this.a; + for (e in t) + if (Object.prototype.hasOwnProperty.call(t, e)) { + var r = t[e].a; + r && r.g() + } + } + } else { + for (this.c.length = 0, + (t = C(this)).sort(), + e = 0; e < t.length; e++) { + var n = this.a[t[e]]; + (r = n.a) && r.g(), + this.c.push([n.key, n.value]) + } + this.arrClean = !0 + } + return this.c + } + , + P.prototype.toArray = P.prototype.g, + P.prototype.Mc = function(e, t) { + for (var r = this.g(), n = [], o = 0; o < r.length; o++) { + var s = this.a[r[o][0].toString()]; + B(this, s); + var i = s.a; + i ? (T(t), + n.push([s.key, t(e, i)])) : n.push([s.key, s.value]) + } + return n + } + , + P.prototype.toObject = P.prototype.Mc, + P.fromObject = function(e, t, r) { + t = new P([],t); + for (var n = 0; n < e.length; n++) { + var o = e[n][0] + , s = r(e[n][1]); + t.set(o, s) + } + return t + } + , + W.prototype.next = function() { + return this.a < this.b.length ? { + done: !1, + value: this.b[this.a++] + } : { + done: !0, + value: void 0 + } + } + , + "undefined" != typeof Symbol && (W.prototype[Symbol.iterator] = function() { + return this + } + ), + P.prototype.Jb = function() { + return C(this).length + } + , + P.prototype.getLength = P.prototype.Jb, + P.prototype.clear = function() { + this.a = {}, + this.arrClean = !1 + } + , + P.prototype.clear = P.prototype.clear, + P.prototype.Cb = function(e) { + e = e.toString(); + var t = this.a.hasOwnProperty(e); + return delete this.a[e], + this.arrClean = !1, + t + } + , + P.prototype.del = P.prototype.Cb, + P.prototype.Eb = function() { + var e = [] + , t = C(this); + t.sort(); + for (var r = 0; r < t.length; r++) { + var n = this.a[t[r]]; + e.push([n.key, n.value]) + } + return e + } + , + P.prototype.getEntryList = P.prototype.Eb, + P.prototype.entries = function() { + var e = [] + , t = C(this); + t.sort(); + for (var r = 0; r < t.length; r++) { + var n = this.a[t[r]]; + e.push([n.key, B(this, n)]) + } + return new W(e) + } + , + P.prototype.entries = P.prototype.entries, + P.prototype.keys = function() { + var e = [] + , t = C(this); + t.sort(); + for (var r = 0; r < t.length; r++) + e.push(this.a[t[r]].key); + return new W(e) + } + , + P.prototype.keys = P.prototype.keys, + P.prototype.values = function() { + var e = [] + , t = C(this); + t.sort(); + for (var r = 0; r < t.length; r++) + e.push(B(this, this.a[t[r]])); + return new W(e) + } + , + P.prototype.values = P.prototype.values, + P.prototype.forEach = function(e, t) { + var r = C(this); + r.sort(); + for (var n = 0; n < r.length; n++) { + var o = this.a[r[n]]; + e.call(t, B(this, o), o.key, this) + } + } + , + P.prototype.forEach = P.prototype.forEach, + P.prototype.set = function(e, t) { + var r = new E(e); + return this.b ? (r.a = t, + r.value = t.g()) : r.value = t, + this.a[e.toString()] = r, + this.arrClean = !1, + this + } + , + P.prototype.set = P.prototype.set, + P.prototype.get = function(e) { + if (e = this.a[e.toString()]) + return B(this, e) + } + , + P.prototype.get = P.prototype.get, + P.prototype.has = function(e) { + return e.toString()in this.a + } + , + P.prototype.has = P.prototype.has, + P.prototype.Jc = function(e, t, r, n, o) { + var s = C(this); + s.sort(); + for (var i = 0; i < s.length; i++) { + var a = this.a[s[i]]; + t.Va(e), + r.call(t, 1, a.key), + this.b ? n.call(t, 2, B(this, a), o) : n.call(t, 2, a.value), + t.Ya() + } + } + , + P.prototype.serializeBinary = P.prototype.Jc, + P.deserializeBinary = function(e, t, r, n, o, s, i) { + for (; t.oa() && !t.bb(); ) { + var a = t.c; + 1 == a ? s = r.call(t) : 2 == a && (e.b ? (T(o), + i || (i = new e.b), + n.call(t, i, o)) : i = n.call(t)) + } + T(null != s), + T(null != i), + e.set(s, i) + } + ; + var I = { + "\0": "\\0", + "\b": "\\b", + "\f": "\\f", + "\n": "\\n", + "\r": "\\r", + "\t": "\\t", + "\v": "\\x0B", + '"': '\\"', + "\\": "\\\\", + "<": "\\u003C" + } + , F = { + "'": "\\'" + } + , O = {} + , S = null; + function _(e, t) { + void 0 === t && (t = 0), + R(), + t = O[t]; + for (var r = [], n = 0; n < e.length; n += 3) { + var o = e[n] + , s = n + 1 < e.length + , i = s ? e[n + 1] : 0 + , a = n + 2 < e.length + , u = a ? e[n + 2] : 0 + , c = o >> 2; + o = (3 & o) << 4 | i >> 4, + i = (15 & i) << 2 | u >> 6, + u &= 63, + a || (u = 64, + s || (i = 64)), + r.push(t[c], t[o], t[i] || "", t[u] || "") + } + return r.join("") + } + function x(e) { + var t = e.length + , r = 3 * t / 4; + r % 3 ? r = Math.floor(r) : -1 != "=.".indexOf(e[t - 1]) && (r = -1 != "=.".indexOf(e[t - 2]) ? r - 2 : r - 1); + var n = new Uint8Array(r) + , o = 0; + return function(e, t) { + function r(t) { + for (; n < e.length; ) { + var r = e.charAt(n++) + , o = S[r]; + if (null != o) + return o; + if (!/^[\s\xa0]*$/.test(r)) + throw Error("Unknown base64 encoding at char: " + r) + } + return t + } + R(); + for (var n = 0; ; ) { + var o = r(-1) + , s = r(0) + , i = r(64) + , a = r(64); + if (64 === a && -1 === o) + break; + t(o << 2 | s >> 4), + 64 != i && (t(s << 4 & 240 | i >> 2), + 64 != a && t(i << 6 & 192 | a)) + } + }(e, (function(e) { + n[o++] = e + } + )), + n.subarray(0, o) + } + function R() { + if (!S) { + S = {}; + for (var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), t = ["+/=", "+/", "-_=", "-_.", "-_"], r = 0; 5 > r; r++) { + var n = e.concat(t[r].split("")); + O[r] = n; + for (var o = 0; o < n.length; o++) { + var s = n[o]; + void 0 === S[s] && (S[s] = o) + } + } + } + } + d("jspb.ConstBinaryMessage", (function() {} + ), void 0), + d("jspb.BinaryMessage", (function() {} + ), void 0), + d("jspb.BinaryConstants.FieldType", { + yb: -1, + ee: 1, + FLOAT: 2, + ke: 3, + te: 4, + je: 5, + xb: 6, + wb: 7, + BOOL: 8, + re: 9, + ie: 10, + le: 11, + ce: 12, + se: 13, + ge: 14, + me: 15, + ne: 16, + oe: 17, + pe: 18, + he: 30, + ve: 31 + }, void 0), + d("jspb.BinaryConstants.WireType", { + yb: -1, + ue: 0, + xb: 1, + de: 2, + qe: 3, + fe: 4, + wb: 5 + }, void 0), + d("jspb.BinaryConstants.FieldTypeToWireType", (function(e) { + switch (e) { + case 5: + case 3: + case 13: + case 4: + case 17: + case 18: + case 8: + case 14: + case 31: + return 0; + case 1: + case 6: + case 16: + case 30: + return 1; + case 9: + case 11: + case 12: + return 2; + case 2: + case 7: + case 15: + return 5; + default: + return -1 + } + } + ), void 0), + d("jspb.BinaryConstants.INVALID_FIELD_NUMBER", -1, void 0), + d("jspb.BinaryConstants.FLOAT32_EPS", 1401298464324817e-60, void 0), + d("jspb.BinaryConstants.FLOAT32_MIN", 11754943508222875e-54, void 0), + d("jspb.BinaryConstants.FLOAT32_MAX", 34028234663852886e22, void 0), + d("jspb.BinaryConstants.FLOAT64_EPS", 5e-324, void 0), + d("jspb.BinaryConstants.FLOAT64_MIN", 22250738585072014e-324, void 0), + d("jspb.BinaryConstants.FLOAT64_MAX", 17976931348623157e292, void 0), + d("jspb.BinaryConstants.TWO_TO_20", 1048576, void 0), + d("jspb.BinaryConstants.TWO_TO_23", 8388608, void 0), + d("jspb.BinaryConstants.TWO_TO_31", 2147483648, void 0), + d("jspb.BinaryConstants.TWO_TO_32", 4294967296, void 0), + d("jspb.BinaryConstants.TWO_TO_52", 4503599627370496, void 0), + d("jspb.BinaryConstants.TWO_TO_63", 0x8000000000000000, void 0), + d("jspb.BinaryConstants.TWO_TO_64", 0x10000000000000000, void 0), + d("jspb.BinaryConstants.ZERO_HASH", "\0\0\0\0\0\0\0\0", void 0); + var N = 0 + , k = 0; + function U(e) { + var t = e >>> 0; + e = Math.floor((e - t) / 4294967296) >>> 0, + N = t, + k = e + } + function D(e) { + var t = 0 > e + , r = (e = Math.abs(e)) >>> 0; + e = Math.floor((e - r) / 4294967296), + e >>>= 0, + t && (e = ~e >>> 0, + 4294967295 < (r = 1 + (~r >>> 0)) && (r = 0, + 4294967295 < ++e && (e = 0))), + N = r, + k = e + } + function L(e) { + var t = 0 > e; + U(e = 2 * Math.abs(e)), + e = N; + var r = k; + t && (0 == e ? 0 == r ? r = e = 4294967295 : (r--, + e = 4294967295) : e--), + N = e, + k = r + } + function z(e) { + var t = 0 > e ? 1 : 0; + if (0 === (e = t ? -e : e)) + 0 < 1 / e ? N = k = 0 : (k = 0, + N = 2147483648); + else if (isNaN(e)) + k = 0, + N = 2147483647; + else if (34028234663852886e22 < e) + k = 0, + N = (t << 31 | 2139095040) >>> 0; + else if (11754943508222875e-54 > e) + e = Math.round(e / Math.pow(2, -149)), + k = 0, + N = (t << 31 | e) >>> 0; + else { + var r = Math.floor(Math.log(e) / Math.LN2); + e *= Math.pow(2, -r), + 16777216 <= (e = Math.round(8388608 * e)) && ++r, + k = 0, + N = (t << 31 | r + 127 << 23 | 8388607 & e) >>> 0 + } + } + function j(e) { + var t = 0 > e ? 1 : 0; + if (0 === (e = t ? -e : e)) + k = 0 < 1 / e ? 0 : 2147483648, + N = 0; + else if (isNaN(e)) + k = 2147483647, + N = 4294967295; + else if (17976931348623157e292 < e) + k = (t << 31 | 2146435072) >>> 0, + N = 0; + else if (22250738585072014e-324 > e) + e /= Math.pow(2, -1074), + k = (t << 31 | e / 4294967296) >>> 0, + N = e >>> 0; + else { + var r = e + , n = 0; + if (2 <= r) + for (; 2 <= r && 1023 > n; ) + n++, + r /= 2; + else + for (; 1 > r && -1022 < n; ) + r *= 2, + n--; + e *= Math.pow(2, -n), + k = (t << 31 | n + 1023 << 20 | 1048576 * e & 1048575) >>> 0, + N = 4503599627370496 * e >>> 0 + } + } + function $(e) { + var t = e.charCodeAt(4) + , r = e.charCodeAt(5) + , n = e.charCodeAt(6) + , o = e.charCodeAt(7); + N = e.charCodeAt(0) + (e.charCodeAt(1) << 8) + (e.charCodeAt(2) << 16) + (e.charCodeAt(3) << 24) >>> 0, + k = t + (r << 8) + (n << 16) + (o << 24) >>> 0 + } + function V(e, t) { + return 4294967296 * t + (e >>> 0) + } + function G(e, t) { + var r = 2147483648 & t; + return r && (t = ~t >>> 0, + 0 == (e = 1 + ~e >>> 0) && (t = t + 1 >>> 0)), + e = V(e, t), + r ? -e : e + } + function H(e, t, r) { + var n = t >> 31; + return r(e << 1 ^ n, (t << 1 | e >>> 31) ^ n) + } + function K(e, t) { + return Z(e, t, G) + } + function Z(e, t, r) { + var n = -(1 & e); + return r((e >>> 1 | t << 31) ^ n, t >>> 1 ^ n) + } + function q(e) { + var t = 2 * (e >> 31) + 1 + , r = e >>> 23 & 255; + return e &= 8388607, + 255 == r ? e ? NaN : 1 / 0 * t : 0 == r ? t * Math.pow(2, -149) * e : t * Math.pow(2, r - 150) * (e + Math.pow(2, 23)) + } + function J(e, t) { + var r = 2 * (t >> 31) + 1 + , n = t >>> 20 & 2047; + return e = 4294967296 * (1048575 & t) + e, + 2047 == n ? e ? NaN : 1 / 0 * r : 0 == n ? r * Math.pow(2, -1074) * e : r * Math.pow(2, n - 1075) * (e + 4503599627370496) + } + function Y(e, t) { + return String.fromCharCode(e >>> 0 & 255, e >>> 8 & 255, e >>> 16 & 255, e >>> 24 & 255, t >>> 0 & 255, t >>> 8 & 255, t >>> 16 & 255, t >>> 24 & 255) + } + function X(e, t) { + function r(e, t) { + return e = e ? String(e) : "", + t ? "0000000".slice(e.length) + e : e + } + if (2097151 >= t) + return "" + V(e, t); + var n = (e >>> 24 | t << 8) >>> 0 & 16777215; + return e = (16777215 & e) + 6777216 * n + 6710656 * (t = t >> 16 & 65535), + n += 8147497 * t, + t *= 2, + 1e7 <= e && (n += Math.floor(e / 1e7), + e %= 1e7), + 1e7 <= n && (t += Math.floor(n / 1e7), + n %= 1e7), + r(t, 0) + r(n, t) + r(e, 1) + } + function Q(e, t) { + var r = 2147483648 & t; + return r && (t = ~t + (0 == (e = 1 + ~e >>> 0) ? 1 : 0) >>> 0), + e = X(e, t), + r ? "-" + e : e + } + function ee(e, t) { + $(e), + e = N; + var r = k; + return t ? Q(e, r) : X(e, r) + } + function te(e) { + function t(e, t) { + for (var r = 0; 8 > r && (1 !== e || 0 < t); r++) + t = e * n[r] + t, + n[r] = 255 & t, + t >>>= 8 + } + T(0 < e.length); + var r = !1; + "-" === e[0] && (r = !0, + e = e.slice(1)); + for (var n = [0, 0, 0, 0, 0, 0, 0, 0], o = 0; o < e.length; o++) + t(10, e.charCodeAt(o) - 48); + return r && (function() { + for (var e = 0; 8 > e; e++) + n[e] = 255 & ~n[e] + }(), + t(1, 1)), + M(n) + } + function re(e) { + return String.fromCharCode(10 > e ? 48 + e : 87 + e) + } + function ne(e) { + return 97 <= e ? e - 97 + 10 : e - 48 + } + function oe(e, t, r, n, o) { + var s = 0; + if (128 > n) + for (; t < r && e[t++] == n; ) + s++, + t += o; + else + for (; t < r; ) { + for (var i = n; 128 < i; ) { + if (e[t++] != (127 & i | 128)) + return s; + i >>= 7 + } + if (e[t++] != i) + break; + s++, + t += o + } + return s + } + function se(e) { + return e.constructor === Uint8Array ? e : e.constructor === ArrayBuffer || e.constructor === Array ? new Uint8Array(e) : e.constructor === String ? x(e) : e instanceof Uint8Array ? new Uint8Array(e.buffer,e.byteOffset,e.byteLength) : (v("Type not convertible to Uint8Array."), + new Uint8Array(0)) + } + function ie(e, t, r) { + this.b = null, + this.a = this.c = this.h = 0, + this.v = !1, + e && this.H(e, t, r) + } + d("jspb.utils.getSplit64Low", (function() { + return N + } + ), void 0), + d("jspb.utils.getSplit64High", (function() { + return k + } + ), void 0), + d("jspb.utils.splitUint64", U, void 0), + d("jspb.utils.splitInt64", D, void 0), + d("jspb.utils.splitZigzag64", L, void 0), + d("jspb.utils.splitFloat32", z, void 0), + d("jspb.utils.splitFloat64", j, void 0), + d("jspb.utils.splitHash64", $, void 0), + d("jspb.utils.joinUint64", V, void 0), + d("jspb.utils.joinInt64", G, void 0), + d("jspb.utils.toZigzag64", H, void 0), + d("jspb.utils.joinZigzag64", K, void 0), + d("jspb.utils.fromZigzag64", Z, void 0), + d("jspb.utils.joinFloat32", q, void 0), + d("jspb.utils.joinFloat64", J, void 0), + d("jspb.utils.joinHash64", Y, void 0), + d("jspb.utils.DIGITS", "0123456789abcdef".split(""), void 0), + d("jspb.utils.joinUnsignedDecimalString", X, void 0), + d("jspb.utils.joinSignedDecimalString", Q, void 0), + d("jspb.utils.hash64ToDecimalString", ee, void 0), + d("jspb.utils.hash64ArrayToDecimalStrings", (function(e, t) { + for (var r = Array(e.length), n = 0; n < e.length; n++) + r[n] = ee(e[n], t); + return r + } + ), void 0), + d("jspb.utils.decimalStringToHash64", te, void 0), + d("jspb.utils.splitDecimalString", (function(e) { + $(te(e)) + } + ), void 0), + d("jspb.utils.hash64ToHexString", (function(e) { + var t = Array(18); + t[0] = "0", + t[1] = "x"; + for (var r = 0; 8 > r; r++) { + var n = e.charCodeAt(7 - r); + t[2 * r + 2] = re(n >> 4), + t[2 * r + 3] = re(15 & n) + } + return t.join("") + } + ), void 0), + d("jspb.utils.hexStringToHash64", (function(e) { + T(18 == (e = e.toLowerCase()).length), + T("0" == e[0]), + T("x" == e[1]); + for (var t = "", r = 0; 8 > r; r++) + t = String.fromCharCode(16 * ne(e.charCodeAt(2 * r + 2)) + ne(e.charCodeAt(2 * r + 3))) + t; + return t + } + ), void 0), + d("jspb.utils.hash64ToNumber", (function(e, t) { + $(e), + e = N; + var r = k; + return t ? G(e, r) : V(e, r) + } + ), void 0), + d("jspb.utils.numberToHash64", (function(e) { + return D(e), + Y(N, k) + } + ), void 0), + d("jspb.utils.countVarints", (function(e, t, r) { + for (var n = 0, o = t; o < r; o++) + n += e[o] >> 7; + return r - t - n + } + ), void 0), + d("jspb.utils.countVarintFields", (function(e, t, r, n) { + var o = 0; + if (128 > (n *= 8)) + for (; t < r && e[t++] == n; ) + for (o++; ; ) { + var s = e[t++]; + if (0 == (128 & s)) + break + } + else + for (; t < r; ) { + for (s = n; 128 < s; ) { + if (e[t] != (127 & s | 128)) + return o; + t++, + s >>= 7 + } + if (e[t++] != s) + break; + for (o++; 0 != (128 & (s = e[t++])); ) + ; + } + return o + } + ), void 0), + d("jspb.utils.countFixed32Fields", (function(e, t, r, n) { + return oe(e, t, r, 8 * n + 5, 4) + } + ), void 0), + d("jspb.utils.countFixed64Fields", (function(e, t, r, n) { + return oe(e, t, r, 8 * n + 1, 8) + } + ), void 0), + d("jspb.utils.countDelimitedFields", (function(e, t, r, n) { + var o = 0; + for (n = 8 * n + 2; t < r; ) { + for (var s = n; 128 < s; ) { + if (e[t++] != (127 & s | 128)) + return o; + s >>= 7 + } + if (e[t++] != s) + break; + o++; + for (var i = 0, a = 1; i += (127 & (s = e[t++])) * a, + a *= 128, + 0 != (128 & s); ) + ; + t += i + } + return o + } + ), void 0), + d("jspb.utils.debugBytesToTextFormat", (function(e) { + var t = '"'; + if (e) { + e = se(e); + for (var r = 0; r < e.length; r++) + t += "\\x", + 16 > e[r] && (t += "0"), + t += e[r].toString(16) + } + return t + '"' + } + ), void 0), + d("jspb.utils.debugScalarToTextFormat", (function(e) { + if ("string" == typeof e) { + e = String(e); + for (var t = ['"'], r = 0; r < e.length; r++) { + var n, o = e.charAt(r), s = o.charCodeAt(0), i = r + 1; + (n = I[o]) || (31 < s && 127 > s || ((s = o)in F ? o = F[s] : s in I ? o = F[s] = I[s] : (31 < (n = s.charCodeAt(0)) && 127 > n ? o = s : (256 > n ? (o = "\\x", + (16 > n || 256 < n) && (o += "0")) : (o = "\\u", + 4096 > n && (o += "0")), + o += n.toString(16).toUpperCase()), + o = F[s] = o)), + n = o), + t[i] = n + } + t.push('"'), + e = t.join("") + } else + e = e.toString(); + return e + } + ), void 0), + d("jspb.utils.stringToByteArray", (function(e) { + for (var t = new Uint8Array(e.length), r = 0; r < e.length; r++) { + var n = e.charCodeAt(r); + if (255 < n) + throw Error("Conversion error: string contains codepoint outside of byte range"); + t[r] = n + } + return t + } + ), void 0), + d("jspb.utils.byteSourceToUint8Array", se, void 0), + d("jspb.BinaryDecoder", ie, void 0); + var ae = []; + function ue(e, t, r) { + if (ae.length) { + var n = ae.pop(); + return e && n.H(e, t, r), + n + } + return new ie(e,t,r) + } + function ce(e, t, r) { + this.a = ue(e, t, r), + this.O = this.a.B(), + this.b = this.c = -1, + this.h = !1, + this.v = null + } + ie.getInstanceCacheLength = function() { + return ae.length + } + , + ie.alloc = ue, + ie.prototype.Ca = function() { + this.clear(), + 100 > ae.length && ae.push(this) + } + , + ie.prototype.free = ie.prototype.Ca, + ie.prototype.clone = function() { + return ue(this.b, this.h, this.c - this.h) + } + , + ie.prototype.clone = ie.prototype.clone, + ie.prototype.clear = function() { + this.b = null, + this.a = this.c = this.h = 0, + this.v = !1 + } + , + ie.prototype.clear = ie.prototype.clear, + ie.prototype.Y = function() { + return this.b + } + , + ie.prototype.getBuffer = ie.prototype.Y, + ie.prototype.H = function(e, t, r) { + this.b = se(e), + this.h = void 0 !== t ? t : 0, + this.c = void 0 !== r ? this.h + r : this.b.length, + this.a = this.h + } + , + ie.prototype.setBlock = ie.prototype.H, + ie.prototype.Db = function() { + return this.c + } + , + ie.prototype.getEnd = ie.prototype.Db, + ie.prototype.setEnd = function(e) { + this.c = e + } + , + ie.prototype.setEnd = ie.prototype.setEnd, + ie.prototype.reset = function() { + this.a = this.h + } + , + ie.prototype.reset = ie.prototype.reset, + ie.prototype.B = function() { + return this.a + } + , + ie.prototype.getCursor = ie.prototype.B, + ie.prototype.Ma = function(e) { + this.a = e + } + , + ie.prototype.setCursor = ie.prototype.Ma, + ie.prototype.advance = function(e) { + this.a += e, + T(this.a <= this.c) + } + , + ie.prototype.advance = ie.prototype.advance, + ie.prototype.ya = function() { + return this.a == this.c + } + , + ie.prototype.atEnd = ie.prototype.ya, + ie.prototype.Qb = function() { + return this.a > this.c + } + , + ie.prototype.pastEnd = ie.prototype.Qb, + ie.prototype.getError = function() { + return this.v || 0 > this.a || this.a > this.c + } + , + ie.prototype.getError = ie.prototype.getError, + ie.prototype.w = function(e) { + for (var t = 128, r = 0, n = 0, o = 0; 4 > o && 128 <= t; o++) + r |= (127 & (t = this.b[this.a++])) << 7 * o; + if (128 <= t && (r |= (127 & (t = this.b[this.a++])) << 28, + n |= (127 & t) >> 4), + 128 <= t) + for (o = 0; 5 > o && 128 <= t; o++) + n |= (127 & (t = this.b[this.a++])) << 7 * o + 3; + if (128 > t) + return e(r >>> 0, n >>> 0); + v("Failed to read varint, encoding is invalid."), + this.v = !0 + } + , + ie.prototype.readSplitVarint64 = ie.prototype.w, + ie.prototype.ea = function(e) { + return this.w((function(t, r) { + return Z(t, r, e) + } + )) + } + , + ie.prototype.readSplitZigzagVarint64 = ie.prototype.ea, + ie.prototype.ta = function(e) { + var t = this.b + , r = this.a; + this.a += 8; + for (var n = 0, o = 0, s = r + 7; s >= r; s--) + n = n << 8 | t[s], + o = o << 8 | t[s + 4]; + return e(n, o) + } + , + ie.prototype.readSplitFixed64 = ie.prototype.ta, + ie.prototype.kb = function() { + for (; 128 & this.b[this.a]; ) + this.a++; + this.a++ + } + , + ie.prototype.skipVarint = ie.prototype.kb, + ie.prototype.mb = function(e) { + for (; 128 < e; ) + this.a--, + e >>>= 7; + this.a-- + } + , + ie.prototype.unskipVarint = ie.prototype.mb, + ie.prototype.o = function() { + var e = this.b + , t = e[this.a] + , r = 127 & t; + return 128 > t ? (this.a += 1, + T(this.a <= this.c), + r) : (r |= (127 & (t = e[this.a + 1])) << 7, + 128 > t ? (this.a += 2, + T(this.a <= this.c), + r) : (r |= (127 & (t = e[this.a + 2])) << 14, + 128 > t ? (this.a += 3, + T(this.a <= this.c), + r) : (r |= (127 & (t = e[this.a + 3])) << 21, + 128 > t ? (this.a += 4, + T(this.a <= this.c), + r) : (r |= (15 & (t = e[this.a + 4])) << 28, + 128 > t ? (this.a += 5, + T(this.a <= this.c), + r >>> 0) : (this.a += 5, + 128 <= e[this.a++] && 128 <= e[this.a++] && 128 <= e[this.a++] && 128 <= e[this.a++] && 128 <= e[this.a++] && T(!1), + T(this.a <= this.c), + r))))) + } + , + ie.prototype.readUnsignedVarint32 = ie.prototype.o, + ie.prototype.da = function() { + return ~~this.o() + } + , + ie.prototype.readSignedVarint32 = ie.prototype.da, + ie.prototype.O = function() { + return this.o().toString() + } + , + ie.prototype.Ea = function() { + return this.da().toString() + } + , + ie.prototype.readSignedVarint32String = ie.prototype.Ea, + ie.prototype.Ia = function() { + var e = this.o(); + return e >>> 1 ^ -(1 & e) + } + , + ie.prototype.readZigzagVarint32 = ie.prototype.Ia, + ie.prototype.Ga = function() { + return this.w(V) + } + , + ie.prototype.readUnsignedVarint64 = ie.prototype.Ga, + ie.prototype.Ha = function() { + return this.w(X) + } + , + ie.prototype.readUnsignedVarint64String = ie.prototype.Ha, + ie.prototype.sa = function() { + return this.w(G) + } + , + ie.prototype.readSignedVarint64 = ie.prototype.sa, + ie.prototype.Fa = function() { + return this.w(Q) + } + , + ie.prototype.readSignedVarint64String = ie.prototype.Fa, + ie.prototype.Ja = function() { + return this.w(K) + } + , + ie.prototype.readZigzagVarint64 = ie.prototype.Ja, + ie.prototype.fb = function() { + return this.ea(Y) + } + , + ie.prototype.readZigzagVarintHash64 = ie.prototype.fb, + ie.prototype.Ka = function() { + return this.ea(Q) + } + , + ie.prototype.readZigzagVarint64String = ie.prototype.Ka, + ie.prototype.Gc = function() { + var e = this.b[this.a]; + return this.a += 1, + T(this.a <= this.c), + e + } + , + ie.prototype.readUint8 = ie.prototype.Gc, + ie.prototype.Ec = function() { + var e = this.b[this.a] + , t = this.b[this.a + 1]; + return this.a += 2, + T(this.a <= this.c), + e << 0 | t << 8 + } + , + ie.prototype.readUint16 = ie.prototype.Ec, + ie.prototype.m = function() { + var e = this.b[this.a] + , t = this.b[this.a + 1] + , r = this.b[this.a + 2] + , n = this.b[this.a + 3]; + return this.a += 4, + T(this.a <= this.c), + (e << 0 | t << 8 | r << 16 | n << 24) >>> 0 + } + , + ie.prototype.readUint32 = ie.prototype.m, + ie.prototype.ga = function() { + return V(this.m(), this.m()) + } + , + ie.prototype.readUint64 = ie.prototype.ga, + ie.prototype.ha = function() { + return X(this.m(), this.m()) + } + , + ie.prototype.readUint64String = ie.prototype.ha, + ie.prototype.Xb = function() { + var e = this.b[this.a]; + return this.a += 1, + T(this.a <= this.c), + e << 24 >> 24 + } + , + ie.prototype.readInt8 = ie.prototype.Xb, + ie.prototype.Vb = function() { + var e = this.b[this.a] + , t = this.b[this.a + 1]; + return this.a += 2, + T(this.a <= this.c), + (e << 0 | t << 8) << 16 >> 16 + } + , + ie.prototype.readInt16 = ie.prototype.Vb, + ie.prototype.P = function() { + var e = this.b[this.a] + , t = this.b[this.a + 1] + , r = this.b[this.a + 2] + , n = this.b[this.a + 3]; + return this.a += 4, + T(this.a <= this.c), + e << 0 | t << 8 | r << 16 | n << 24 + } + , + ie.prototype.readInt32 = ie.prototype.P, + ie.prototype.ba = function() { + return G(this.m(), this.m()) + } + , + ie.prototype.readInt64 = ie.prototype.ba, + ie.prototype.ca = function() { + return Q(this.m(), this.m()) + } + , + ie.prototype.readInt64String = ie.prototype.ca, + ie.prototype.aa = function() { + return q(this.m()) + } + , + ie.prototype.readFloat = ie.prototype.aa, + ie.prototype.Z = function() { + return J(this.m(), this.m()) + } + , + ie.prototype.readDouble = ie.prototype.Z, + ie.prototype.pa = function() { + return !!this.b[this.a++] + } + , + ie.prototype.readBool = ie.prototype.pa, + ie.prototype.ra = function() { + return this.da() + } + , + ie.prototype.readEnum = ie.prototype.ra, + ie.prototype.fa = function(e) { + var t = this.b + , r = this.a; + e = r + e; + for (var n = [], o = ""; r < e; ) { + var s = t[r++]; + if (128 > s) + n.push(s); + else { + if (192 > s) + continue; + if (224 > s) { + var i = t[r++]; + n.push((31 & s) << 6 | 63 & i) + } else if (240 > s) { + i = t[r++]; + var a = t[r++]; + n.push((15 & s) << 12 | (63 & i) << 6 | 63 & a) + } else + 248 > s && (s = (7 & s) << 18 | (63 & (i = t[r++])) << 12 | (63 & (a = t[r++])) << 6 | 63 & t[r++], + s -= 65536, + n.push(55296 + (s >> 10 & 1023), 56320 + (1023 & s))) + } + 8192 <= n.length && (o += String.fromCharCode.apply(null, n), + n.length = 0) + } + return o += M(n), + this.a = r, + o + } + , + ie.prototype.readString = ie.prototype.fa, + ie.prototype.Dc = function() { + var e = this.o(); + return this.fa(e) + } + , + ie.prototype.readStringWithLength = ie.prototype.Dc, + ie.prototype.qa = function(e) { + if (0 > e || this.a + e > this.b.length) + return this.v = !0, + v("Invalid byte length!"), + new Uint8Array(0); + var t = this.b.subarray(this.a, this.a + e); + return this.a += e, + T(this.a <= this.c), + t + } + , + ie.prototype.readBytes = ie.prototype.qa, + ie.prototype.ia = function() { + return this.w(Y) + } + , + ie.prototype.readVarintHash64 = ie.prototype.ia, + ie.prototype.$ = function() { + var e = this.b + , t = this.a + , r = e[t] + , n = e[t + 1] + , o = e[t + 2] + , s = e[t + 3] + , i = e[t + 4] + , a = e[t + 5] + , u = e[t + 6]; + return e = e[t + 7], + this.a += 8, + String.fromCharCode(r, n, o, s, i, a, u, e) + } + , + ie.prototype.readFixedHash64 = ie.prototype.$, + d("jspb.BinaryReader", ce, void 0); + var le = []; + function de(e, t, r) { + if (le.length) { + var n = le.pop(); + return e && n.a.H(e, t, r), + n + } + return new ce(e,t,r) + } + function he(e, t) { + T(2 == e.b); + var r = e.a.o(); + r = e.a.B() + r; + for (var n = []; e.a.B() < r; ) + n.push(t.call(e.a)); + return n + } + function pe(e, t, r, n, o) { + this.ma = e, + this.Ba = t, + this.la = r, + this.Na = n, + this.na = o + } + function fe(e, t, r, n, o, s) { + this.Za = e, + this.za = t, + this.Aa = r, + this.Wa = n, + this.Ab = o, + this.Nb = s + } + function ge() {} + ce.clearInstanceCache = function() { + le = [] + } + , + ce.getInstanceCacheLength = function() { + return le.length + } + , + ce.alloc = de, + ce.prototype.zb = de, + ce.prototype.alloc = ce.prototype.zb, + ce.prototype.Ca = function() { + this.a.clear(), + this.b = this.c = -1, + this.h = !1, + this.v = null, + 100 > le.length && le.push(this) + } + , + ce.prototype.free = ce.prototype.Ca, + ce.prototype.Fb = function() { + return this.O + } + , + ce.prototype.getFieldCursor = ce.prototype.Fb, + ce.prototype.B = function() { + return this.a.B() + } + , + ce.prototype.getCursor = ce.prototype.B, + ce.prototype.Y = function() { + return this.a.Y() + } + , + ce.prototype.getBuffer = ce.prototype.Y, + ce.prototype.Hb = function() { + return this.c + } + , + ce.prototype.getFieldNumber = ce.prototype.Hb, + ce.prototype.Lb = function() { + return this.b + } + , + ce.prototype.getWireType = ce.prototype.Lb, + ce.prototype.Mb = function() { + return 2 == this.b + } + , + ce.prototype.isDelimited = ce.prototype.Mb, + ce.prototype.bb = function() { + return 4 == this.b + } + , + ce.prototype.isEndGroup = ce.prototype.bb, + ce.prototype.getError = function() { + return this.h || this.a.getError() + } + , + ce.prototype.getError = ce.prototype.getError, + ce.prototype.H = function(e, t, r) { + this.a.H(e, t, r), + this.b = this.c = -1 + } + , + ce.prototype.setBlock = ce.prototype.H, + ce.prototype.reset = function() { + this.a.reset(), + this.b = this.c = -1 + } + , + ce.prototype.reset = ce.prototype.reset, + ce.prototype.advance = function(e) { + this.a.advance(e) + } + , + ce.prototype.advance = ce.prototype.advance, + ce.prototype.oa = function() { + if (this.a.ya()) + return !1; + if (this.getError()) + return v("Decoder hit an error"), + !1; + this.O = this.a.B(); + var e = this.a.o() + , t = e >>> 3; + return 0 != (e &= 7) && 5 != e && 1 != e && 2 != e && 3 != e && 4 != e ? (v("Invalid wire type: %s (at position %s)", e, this.O), + this.h = !0, + !1) : (this.c = t, + this.b = e, + !0) + } + , + ce.prototype.nextField = ce.prototype.oa, + ce.prototype.Oa = function() { + this.a.mb(this.c << 3 | this.b) + } + , + ce.prototype.unskipHeader = ce.prototype.Oa, + ce.prototype.Lc = function() { + var e = this.c; + for (this.Oa(); this.oa() && this.c == e; ) + this.C(); + this.a.ya() || this.Oa() + } + , + ce.prototype.skipMatchingFields = ce.prototype.Lc, + ce.prototype.lb = function() { + 0 != this.b ? (v("Invalid wire type for skipVarintField"), + this.C()) : this.a.kb() + } + , + ce.prototype.skipVarintField = ce.prototype.lb, + ce.prototype.gb = function() { + if (2 != this.b) + v("Invalid wire type for skipDelimitedField"), + this.C(); + else { + var e = this.a.o(); + this.a.advance(e) + } + } + , + ce.prototype.skipDelimitedField = ce.prototype.gb, + ce.prototype.hb = function() { + 5 != this.b ? (v("Invalid wire type for skipFixed32Field"), + this.C()) : this.a.advance(4) + } + , + ce.prototype.skipFixed32Field = ce.prototype.hb, + ce.prototype.ib = function() { + 1 != this.b ? (v("Invalid wire type for skipFixed64Field"), + this.C()) : this.a.advance(8) + } + , + ce.prototype.skipFixed64Field = ce.prototype.ib, + ce.prototype.jb = function() { + for (var e = this.c; ; ) { + if (!this.oa()) { + v("Unmatched start-group tag: stream EOF"), + this.h = !0; + break + } + if (4 == this.b) { + this.c != e && (v("Unmatched end-group tag"), + this.h = !0); + break + } + this.C() + } + } + , + ce.prototype.skipGroup = ce.prototype.jb, + ce.prototype.C = function() { + switch (this.b) { + case 0: + this.lb(); + break; + case 1: + this.ib(); + break; + case 2: + this.gb(); + break; + case 5: + this.hb(); + break; + case 3: + this.jb(); + break; + default: + v("Invalid wire encoding for field.") + } + } + , + ce.prototype.skipField = ce.prototype.C, + ce.prototype.Hc = function(e, t) { + null === this.v && (this.v = {}), + T(!this.v[e]), + this.v[e] = t + } + , + ce.prototype.registerReadCallback = ce.prototype.Hc, + ce.prototype.Ic = function(e) { + return T(null !== this.v), + T(e = this.v[e]), + e(this) + } + , + ce.prototype.runReadCallback = ce.prototype.Ic, + ce.prototype.Yb = function(e, t) { + T(2 == this.b); + var r = this.a.c + , n = this.a.o(); + n = this.a.B() + n, + this.a.setEnd(n), + t(e, this), + this.a.Ma(n), + this.a.setEnd(r) + } + , + ce.prototype.readMessage = ce.prototype.Yb, + ce.prototype.Ub = function(e, t, r) { + T(3 == this.b), + T(this.c == e), + r(t, this), + this.h || 4 == this.b || (v("Group submessage did not end with an END_GROUP tag"), + this.h = !0) + } + , + ce.prototype.readGroup = ce.prototype.Ub, + ce.prototype.Gb = function() { + T(2 == this.b); + var e = this.a.o() + , t = this.a.B() + , r = t + e; + return e = ue(this.a.Y(), t, e), + this.a.Ma(r), + e + } + , + ce.prototype.getFieldDecoder = ce.prototype.Gb, + ce.prototype.P = function() { + return T(0 == this.b), + this.a.da() + } + , + ce.prototype.readInt32 = ce.prototype.P, + ce.prototype.Wb = function() { + return T(0 == this.b), + this.a.Ea() + } + , + ce.prototype.readInt32String = ce.prototype.Wb, + ce.prototype.ba = function() { + return T(0 == this.b), + this.a.sa() + } + , + ce.prototype.readInt64 = ce.prototype.ba, + ce.prototype.ca = function() { + return T(0 == this.b), + this.a.Fa() + } + , + ce.prototype.readInt64String = ce.prototype.ca, + ce.prototype.m = function() { + return T(0 == this.b), + this.a.o() + } + , + ce.prototype.readUint32 = ce.prototype.m, + ce.prototype.Fc = function() { + return T(0 == this.b), + this.a.O() + } + , + ce.prototype.readUint32String = ce.prototype.Fc, + ce.prototype.ga = function() { + return T(0 == this.b), + this.a.Ga() + } + , + ce.prototype.readUint64 = ce.prototype.ga, + ce.prototype.ha = function() { + return T(0 == this.b), + this.a.Ha() + } + , + ce.prototype.readUint64String = ce.prototype.ha, + ce.prototype.zc = function() { + return T(0 == this.b), + this.a.Ia() + } + , + ce.prototype.readSint32 = ce.prototype.zc, + ce.prototype.Ac = function() { + return T(0 == this.b), + this.a.Ja() + } + , + ce.prototype.readSint64 = ce.prototype.Ac, + ce.prototype.Bc = function() { + return T(0 == this.b), + this.a.Ka() + } + , + ce.prototype.readSint64String = ce.prototype.Bc, + ce.prototype.Rb = function() { + return T(5 == this.b), + this.a.m() + } + , + ce.prototype.readFixed32 = ce.prototype.Rb, + ce.prototype.Sb = function() { + return T(1 == this.b), + this.a.ga() + } + , + ce.prototype.readFixed64 = ce.prototype.Sb, + ce.prototype.Tb = function() { + return T(1 == this.b), + this.a.ha() + } + , + ce.prototype.readFixed64String = ce.prototype.Tb, + ce.prototype.vc = function() { + return T(5 == this.b), + this.a.P() + } + , + ce.prototype.readSfixed32 = ce.prototype.vc, + ce.prototype.wc = function() { + return T(5 == this.b), + this.a.P().toString() + } + , + ce.prototype.readSfixed32String = ce.prototype.wc, + ce.prototype.xc = function() { + return T(1 == this.b), + this.a.ba() + } + , + ce.prototype.readSfixed64 = ce.prototype.xc, + ce.prototype.yc = function() { + return T(1 == this.b), + this.a.ca() + } + , + ce.prototype.readSfixed64String = ce.prototype.yc, + ce.prototype.aa = function() { + return T(5 == this.b), + this.a.aa() + } + , + ce.prototype.readFloat = ce.prototype.aa, + ce.prototype.Z = function() { + return T(1 == this.b), + this.a.Z() + } + , + ce.prototype.readDouble = ce.prototype.Z, + ce.prototype.pa = function() { + return T(0 == this.b), + !!this.a.o() + } + , + ce.prototype.readBool = ce.prototype.pa, + ce.prototype.ra = function() { + return T(0 == this.b), + this.a.sa() + } + , + ce.prototype.readEnum = ce.prototype.ra, + ce.prototype.fa = function() { + T(2 == this.b); + var e = this.a.o(); + return this.a.fa(e) + } + , + ce.prototype.readString = ce.prototype.fa, + ce.prototype.qa = function() { + T(2 == this.b); + var e = this.a.o(); + return this.a.qa(e) + } + , + ce.prototype.readBytes = ce.prototype.qa, + ce.prototype.ia = function() { + return T(0 == this.b), + this.a.ia() + } + , + ce.prototype.readVarintHash64 = ce.prototype.ia, + ce.prototype.Cc = function() { + return T(0 == this.b), + this.a.fb() + } + , + ce.prototype.readSintHash64 = ce.prototype.Cc, + ce.prototype.w = function(e) { + return T(0 == this.b), + this.a.w(e) + } + , + ce.prototype.readSplitVarint64 = ce.prototype.w, + ce.prototype.ea = function(e) { + return T(0 == this.b), + this.a.w((function(t, r) { + return Z(t, r, e) + } + )) + } + , + ce.prototype.readSplitZigzagVarint64 = ce.prototype.ea, + ce.prototype.$ = function() { + return T(1 == this.b), + this.a.$() + } + , + ce.prototype.readFixedHash64 = ce.prototype.$, + ce.prototype.ta = function(e) { + return T(1 == this.b), + this.a.ta(e) + } + , + ce.prototype.readSplitFixed64 = ce.prototype.ta, + ce.prototype.gc = function() { + return he(this, this.a.da) + } + , + ce.prototype.readPackedInt32 = ce.prototype.gc, + ce.prototype.hc = function() { + return he(this, this.a.Ea) + } + , + ce.prototype.readPackedInt32String = ce.prototype.hc, + ce.prototype.ic = function() { + return he(this, this.a.sa) + } + , + ce.prototype.readPackedInt64 = ce.prototype.ic, + ce.prototype.jc = function() { + return he(this, this.a.Fa) + } + , + ce.prototype.readPackedInt64String = ce.prototype.jc, + ce.prototype.qc = function() { + return he(this, this.a.o) + } + , + ce.prototype.readPackedUint32 = ce.prototype.qc, + ce.prototype.rc = function() { + return he(this, this.a.O) + } + , + ce.prototype.readPackedUint32String = ce.prototype.rc, + ce.prototype.sc = function() { + return he(this, this.a.Ga) + } + , + ce.prototype.readPackedUint64 = ce.prototype.sc, + ce.prototype.tc = function() { + return he(this, this.a.Ha) + } + , + ce.prototype.readPackedUint64String = ce.prototype.tc, + ce.prototype.nc = function() { + return he(this, this.a.Ia) + } + , + ce.prototype.readPackedSint32 = ce.prototype.nc, + ce.prototype.oc = function() { + return he(this, this.a.Ja) + } + , + ce.prototype.readPackedSint64 = ce.prototype.oc, + ce.prototype.pc = function() { + return he(this, this.a.Ka) + } + , + ce.prototype.readPackedSint64String = ce.prototype.pc, + ce.prototype.bc = function() { + return he(this, this.a.m) + } + , + ce.prototype.readPackedFixed32 = ce.prototype.bc, + ce.prototype.cc = function() { + return he(this, this.a.ga) + } + , + ce.prototype.readPackedFixed64 = ce.prototype.cc, + ce.prototype.dc = function() { + return he(this, this.a.ha) + } + , + ce.prototype.readPackedFixed64String = ce.prototype.dc, + ce.prototype.kc = function() { + return he(this, this.a.P) + } + , + ce.prototype.readPackedSfixed32 = ce.prototype.kc, + ce.prototype.lc = function() { + return he(this, this.a.ba) + } + , + ce.prototype.readPackedSfixed64 = ce.prototype.lc, + ce.prototype.mc = function() { + return he(this, this.a.ca) + } + , + ce.prototype.readPackedSfixed64String = ce.prototype.mc, + ce.prototype.fc = function() { + return he(this, this.a.aa) + } + , + ce.prototype.readPackedFloat = ce.prototype.fc, + ce.prototype.$b = function() { + return he(this, this.a.Z) + } + , + ce.prototype.readPackedDouble = ce.prototype.$b, + ce.prototype.Zb = function() { + return he(this, this.a.pa) + } + , + ce.prototype.readPackedBool = ce.prototype.Zb, + ce.prototype.ac = function() { + return he(this, this.a.ra) + } + , + ce.prototype.readPackedEnum = ce.prototype.ac, + ce.prototype.uc = function() { + return he(this, this.a.ia) + } + , + ce.prototype.readPackedVarintHash64 = ce.prototype.uc, + ce.prototype.ec = function() { + return he(this, this.a.$) + } + , + ce.prototype.readPackedFixedHash64 = ce.prototype.ec, + d("jspb.ExtensionFieldInfo", pe, void 0), + d("jspb.ExtensionFieldBinaryInfo", fe, void 0), + pe.prototype.F = function() { + return !!this.la + } + , + pe.prototype.isMessageType = pe.prototype.F, + d("jspb.Message", ge, void 0), + ge.GENERATE_TO_OBJECT = !0, + ge.GENERATE_FROM_OBJECT = !0; + var ye = "function" == typeof Uint8Array; + ge.prototype.Ib = function() { + return this.b + } + , + ge.prototype.getJsPbMessageId = ge.prototype.Ib, + ge.initialize = function(e, t, r, n, o, s) { + if (e.f = null, + t || (t = r ? [r] : []), + e.b = r ? String(r) : void 0, + e.D = 0 === r ? -1 : 0, + e.u = t, + t = -1, + !(r = e.u.length) || (t = r - 1, + null === (r = e.u[t]) || "object" != typeof r || Array.isArray(r) || ye && r instanceof Uint8Array) ? -1 < n ? (e.G = Math.max(n, t + 1 - e.D), + e.i = null) : e.G = Number.MAX_VALUE : (e.G = t - e.D, + e.i = r), + e.a = {}, + o) + for (n = 0; n < o.length; n++) + (t = o[n]) < e.G ? (t += e.D, + e.u[t] = e.u[t] || be) : (me(e), + e.i[t] = e.i[t] || be); + if (s && s.length) + for (n = 0; n < s.length; n++) + Fe(e, s[n]) + } + ; + var be = Object.freeze ? Object.freeze([]) : []; + function me(e) { + var t = e.G + e.D; + e.u[t] || (e.i = e.u[t] = {}) + } + function Te(e, t, r) { + for (var n = [], o = 0; o < e.length; o++) + n[o] = t.call(e[o], r, e[o]); + return n + } + function ve(e, t) { + if (t < e.G) { + t += e.D; + var r = e.u[t]; + return r === be ? e.u[t] = [] : r + } + if (e.i) + return (r = e.i[t]) === be ? e.i[t] = [] : r + } + function we(e, t) { + return null == (e = ve(e, t)) ? e : +e + } + function Ae(e, t) { + return null == (e = ve(e, t)) ? e : !!e + } + function Pe(e) { + return null == e || "string" == typeof e ? e : ye && e instanceof Uint8Array ? _(e) : (v("Cannot coerce to b64 string: " + h(e)), + null) + } + function We(e) { + return null == e || e instanceof Uint8Array ? e : "string" == typeof e ? x(e) : (v("Cannot coerce to Uint8Array: " + h(e)), + null) + } + function Be(e) { + if (e && 1 < e.length) { + var t = h(e[0]); + g(e, (function(e) { + h(e) != t && v("Inconsistent type in JSPB repeated field array. Got " + h(e) + " expected " + t) + } + )) + } + } + function Ce(e, t, r) { + return null == (e = ve(e, t)) ? r : e + } + function Ee(e, t, r) { + return w(e, ge), + t < e.G ? e.u[t + e.D] = r : (me(e), + e.i[t] = r), + e + } + function Me(e, t, r, n) { + return w(e, ge), + r !== n ? Ee(e, t, r) : t < e.G ? e.u[t + e.D] = null : (me(e), + delete e.i[t]), + e + } + function Ie(e, t, r, n) { + return w(e, ge), + (r = Fe(e, r)) && r !== t && void 0 !== n && (e.f && r in e.f && (e.f[r] = void 0), + Ee(e, r, void 0)), + Ee(e, t, n) + } + function Fe(e, t) { + for (var r, n, o = 0; o < t.length; o++) { + var s = t[o] + , i = ve(e, s); + null != i && (r = s, + n = i, + Ee(e, s, void 0)) + } + return r ? (Ee(e, r, n), + r) : 0 + } + function Oe(e, t, r) { + if (e.f || (e.f = {}), + !e.f[r]) { + for (var n = ve(e, r), o = [], s = 0; s < n.length; s++) + o[s] = new t(n[s]); + e.f[r] = o + } + } + function Se(e) { + if (e.f) + for (var t in e.f) { + var r = e.f[t]; + if (Array.isArray(r)) + for (var n = 0; n < r.length; n++) + r[n] && r[n].g(); + else + r && r.g() + } + } + function _e(e, t) { + e = e || {}, + t = t || {}; + var r, n = {}; + for (r in e) + n[r] = 0; + for (r in t) + n[r] = 0; + for (r in n) + if (!xe(e[r], t[r])) + return !1; + return !0 + } + function xe(e, t) { + if (e == t) + return !0; + if (!p(e) || !p(t)) + return !!("number" == typeof e && isNaN(e) || "number" == typeof t && isNaN(t)) && String(e) == String(t); + if (e.constructor != t.constructor) + return !1; + if (ye && e.constructor === Uint8Array) { + if (e.length != t.length) + return !1; + for (var r = 0; r < e.length; r++) + if (e[r] != t[r]) + return !1; + return !0 + } + if (e.constructor === Array) { + var n = void 0 + , o = void 0 + , s = Math.max(e.length, t.length); + for (r = 0; r < s; r++) { + var i = e[r] + , a = t[r]; + if (i && i.constructor == Object && (T(void 0 === n), + T(r === e.length - 1), + n = i, + i = void 0), + a && a.constructor == Object && (T(void 0 === o), + T(r === t.length - 1), + o = a, + a = void 0), + !xe(i, a)) + return !1 + } + return !n && !o || _e(n = n || {}, o = o || {}) + } + if (e.constructor === Object) + return _e(e, t); + throw Error("Invalid type in JSPB array") + } + function Re(e) { + return new e.constructor(Ne(e.g())) + } + function Ne(e) { + if (Array.isArray(e)) { + for (var t = Array(e.length), r = 0; r < e.length; r++) { + var n = e[r]; + null != n && (t[r] = "object" == typeof n ? Ne(T(n)) : n) + } + return t + } + if (ye && e instanceof Uint8Array) + return new Uint8Array(e); + for (r in t = {}, + e) + null != (n = e[r]) && (t[r] = "object" == typeof n ? Ne(T(n)) : n); + return t + } + ge.toObjectList = Te, + ge.toObjectExtension = function(e, t, r, n, o) { + for (var s in r) { + var i = r[s] + , a = n.call(e, i); + if (null != a) { + for (var u in i.Ba) + if (i.Ba.hasOwnProperty(u)) + break; + t[u] = i.Na ? i.na ? Te(a, i.Na, o) : i.Na(o, a) : a + } + } + } + , + ge.serializeBinaryExtensions = function(e, t, r, n) { + for (var o in r) { + var s = r[o] + , i = s.Za; + if (!s.Aa) + throw Error("Message extension present that was generated without binary serialization support"); + var a = n.call(e, i); + if (null != a) + if (i.F()) { + if (!s.Wa) + throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format"); + s.Aa.call(t, i.ma, a, s.Wa) + } else + s.Aa.call(t, i.ma, a) + } + } + , + ge.readBinaryExtension = function(e, t, r, n, o) { + var s = r[t.c]; + if (s) { + if (r = s.Za, + !s.za) + throw Error("Deserializing extension whose generated code does not support binary format"); + if (r.F()) { + var i = new r.la; + s.za.call(t, i, s.Ab) + } else + i = s.za.call(t); + r.na && !s.Nb ? (t = n.call(e, r)) ? t.push(i) : o.call(e, r, [i]) : o.call(e, r, i) + } else + t.C() + } + , + ge.getField = ve, + ge.getRepeatedField = function(e, t) { + return ve(e, t) + } + , + ge.getOptionalFloatingPointField = we, + ge.getBooleanField = Ae, + ge.getRepeatedFloatingPointField = function(e, t) { + var r = ve(e, t); + if (e.a || (e.a = {}), + !e.a[t]) { + for (var n = 0; n < r.length; n++) + r[n] = +r[n]; + e.a[t] = !0 + } + return r + } + , + ge.getRepeatedBooleanField = function(e, t) { + var r = ve(e, t); + if (e.a || (e.a = {}), + !e.a[t]) { + for (var n = 0; n < r.length; n++) + r[n] = !!r[n]; + e.a[t] = !0 + } + return r + } + , + ge.bytesAsB64 = Pe, + ge.bytesAsU8 = We, + ge.bytesListAsB64 = function(e) { + return Be(e), + e.length && "string" != typeof e[0] ? y(e, Pe) : e + } + , + ge.bytesListAsU8 = function(e) { + return Be(e), + !e.length || e[0]instanceof Uint8Array ? e : y(e, We) + } + , + ge.getFieldWithDefault = Ce, + ge.getBooleanFieldWithDefault = function(e, t, r) { + return null == (e = Ae(e, t)) ? r : e + } + , + ge.getFloatingPointFieldWithDefault = function(e, t, r) { + return null == (e = we(e, t)) ? r : e + } + , + ge.getFieldProto3 = Ce, + ge.getMapField = function(e, t, r, n) { + if (e.f || (e.f = {}), + t in e.f) + return e.f[t]; + var o = ve(e, t); + if (!o) { + if (r) + return; + Ee(e, t, o = []) + } + return e.f[t] = new P(o,n) + } + , + ge.setField = Ee, + ge.setProto3IntField = function(e, t, r) { + return Me(e, t, r, 0) + } + , + ge.setProto3FloatField = function(e, t, r) { + return Me(e, t, r, 0) + } + , + ge.setProto3BooleanField = function(e, t, r) { + return Me(e, t, r, !1) + } + , + ge.setProto3StringField = function(e, t, r) { + return Me(e, t, r, "") + } + , + ge.setProto3BytesField = function(e, t, r) { + return Me(e, t, r, "") + } + , + ge.setProto3EnumField = function(e, t, r) { + return Me(e, t, r, 0) + } + , + ge.setProto3StringIntField = function(e, t, r) { + return Me(e, t, r, "0") + } + , + ge.addToRepeatedField = function(e, t, r, n) { + return w(e, ge), + t = ve(e, t), + null != n ? t.splice(n, 0, r) : t.push(r), + e + } + , + ge.setOneofField = Ie, + ge.computeOneofCase = Fe, + ge.getWrapperField = function(e, t, r, n) { + if (e.f || (e.f = {}), + !e.f[r]) { + var o = ve(e, r); + (n || o) && (e.f[r] = new t(o)) + } + return e.f[r] + } + , + ge.getRepeatedWrapperField = function(e, t, r) { + return Oe(e, t, r), + (t = e.f[r]) == be && (t = e.f[r] = []), + t + } + , + ge.setWrapperField = function(e, t, r) { + w(e, ge), + e.f || (e.f = {}); + var n = r ? r.g() : r; + return e.f[t] = r, + Ee(e, t, n) + } + , + ge.setOneofWrapperField = function(e, t, r, n) { + w(e, ge), + e.f || (e.f = {}); + var o = n ? n.g() : n; + return e.f[t] = n, + Ie(e, t, r, o) + } + , + ge.setRepeatedWrapperField = function(e, t, r) { + w(e, ge), + e.f || (e.f = {}), + r = r || []; + for (var n = [], o = 0; o < r.length; o++) + n[o] = r[o].g(); + return e.f[t] = r, + Ee(e, t, n) + } + , + ge.addToRepeatedWrapperField = function(e, t, r, n, o) { + Oe(e, n, t); + var s = e.f[t]; + return s || (s = e.f[t] = []), + r = r || new n, + e = ve(e, t), + null != o ? (s.splice(o, 0, r), + e.splice(o, 0, r.g())) : (s.push(r), + e.push(r.g())), + r + } + , + ge.toMap = function(e, t, r, n) { + for (var o = {}, s = 0; s < e.length; s++) + o[t.call(e[s])] = r ? r.call(e[s], n, e[s]) : e[s]; + return o + } + , + ge.prototype.g = function() { + return Se(this), + this.u + } + , + ge.prototype.toArray = ge.prototype.g, + ge.prototype.toString = function() { + return Se(this), + this.u.toString() + } + , + ge.prototype.getExtension = function(e) { + if (this.i) { + this.f || (this.f = {}); + var t = e.ma; + if (e.na) { + if (e.F()) + return this.f[t] || (this.f[t] = y(this.i[t] || [], (function(t) { + return new e.la(t) + } + ))), + this.f[t] + } else if (e.F()) + return !this.f[t] && this.i[t] && (this.f[t] = new e.la(this.i[t])), + this.f[t]; + return this.i[t] + } + } + , + ge.prototype.getExtension = ge.prototype.getExtension, + ge.prototype.Kc = function(e, t) { + this.f || (this.f = {}), + me(this); + var r = e.ma; + return e.na ? (t = t || [], + e.F() ? (this.f[r] = t, + this.i[r] = y(t, (function(e) { + return e.g() + } + ))) : this.i[r] = t) : e.F() ? (this.f[r] = t, + this.i[r] = t ? t.g() : t) : this.i[r] = t, + this + } + , + ge.prototype.setExtension = ge.prototype.Kc, + ge.difference = function(e, t) { + if (!(e instanceof t.constructor)) + throw Error("Messages have different types."); + var r = e.g(); + t = t.g(); + var n = [] + , o = 0 + , s = r.length > t.length ? r.length : t.length; + for (e.b && (n[0] = e.b, + o = 1); o < s; o++) + xe(r[o], t[o]) || (n[o] = t[o]); + return new e.constructor(n) + } + , + ge.equals = function(e, t) { + return e == t || !(!e || !t) && e instanceof t.constructor && xe(e.g(), t.g()) + } + , + ge.compareExtensions = _e, + ge.compareFields = xe, + ge.prototype.Bb = function() { + return Re(this) + } + , + ge.prototype.cloneMessage = ge.prototype.Bb, + ge.prototype.clone = function() { + return Re(this) + } + , + ge.prototype.clone = ge.prototype.clone, + ge.clone = function(e) { + return Re(e) + } + , + ge.copyInto = function(e, t) { + w(e, ge), + w(t, ge), + T(e.constructor == t.constructor, "Copy source and target message should have the same type."), + e = Re(e); + for (var r = t.g(), n = e.g(), o = r.length = 0; o < n.length; o++) + r[o] = n[o]; + t.f = e.f, + t.i = e.i + } + , + ge.registerMessageType = function(e, t) { + t.we = e + } + ; + var ke = { + dump: function(e) { + return w(e, ge, "jspb.Message instance expected"), + T(e.getExtension, "Only unobfuscated and unoptimized compilation modes supported."), + ke.X(e) + } + }; + function Ue() { + this.a = [] + } + function De(e, t) { + this.lo = e, + this.hi = t + } + function Le(e, t) { + var r = 65535 & e + , n = 65535 & t + , o = t >>> 16; + for (t = r * n + 65536 * (r * o & 65535) + 65536 * ((e >>>= 16) * n & 65535), + r = e * o + (r * o >>> 16) + (e * n >>> 16); 4294967296 <= t; ) + t -= 4294967296, + r += 1; + return new De(t >>> 0,r >>> 0) + } + function ze(e) { + for (var t = new De(0,0), r = new De(0,0), n = 0; n < e.length; n++) { + if ("0" > e[n] || "9" < e[n]) + return null; + r.lo = parseInt(e[n], 10), + t = t.eb(10).add(r) + } + return t + } + function je(e, t) { + this.lo = e, + this.hi = t + } + function $e(e) { + var t = 0 < e.length && "-" == e[0]; + return t && (e = e.substring(1)), + null === (e = ze(e)) ? null : (t && (e = new De(0,0).sub(e)), + new je(e.lo,e.hi)) + } + function Ve() { + this.c = [], + this.b = 0, + this.a = new Ue, + this.h = [] + } + function Ge(e, t) { + var r = e.a.end(); + e.c.push(r), + e.c.push(t), + e.b += r.length + t.length + } + function He(e, t) { + return Ze(e, t, 2), + t = e.a.end(), + e.c.push(t), + e.b += t.length, + t.push(e.b), + t + } + function Ke(e, t) { + var r = t.pop(); + for (T(0 <= (r = e.b + e.a.length() - r)); 127 < r; ) + t.push(127 & r | 128), + r >>>= 7, + e.b++; + t.push(r), + e.b++ + } + function Ze(e, t, r) { + T(1 <= t && t == Math.floor(t)), + e.a.j(8 * t + r) + } + function qe(e, t, r) { + null != r && (Ze(e, t, 0), + e.a.j(r)) + } + function Je(e, t, r) { + null != r && (Ze(e, t, 0), + e.a.M(r)) + } + d("jspb.debug.dump", ke.dump, void 0), + ke.X = function(e) { + var t = h(e); + if ("number" == t || "string" == t || "boolean" == t || "null" == t || "undefined" == t || "undefined" != typeof Uint8Array && e instanceof Uint8Array) + return e; + if ("array" == t) + return function(e, t, r) { + for (var n = [], o = 2; o < arguments.length; ++o) + n[o - 2] = arguments[o]; + Array.isArray(e) || m("Expected array but got %s: %s.", [h(e), e], t, n) + }(e), + y(e, ke.X); + if (e instanceof P) { + for (var r = {}, n = (e = e.entries()).next(); !n.done; n = e.next()) + r[n.value[0]] = ke.X(n.value[1]); + return r + } + w(e, ge, "Only messages expected: " + e); + var o = { + $name: (t = e.constructor).name || t.displayName + }; + for (a in t.prototype) { + var s = /^get([A-Z]\w*)/.exec(a); + if (s && "getExtension" != a && "getJsPbMessageId" != a) { + var i = "has" + s[1]; + e[i] && !e[i]() || (i = e[a](), + o[ke.$a(s[1])] = ke.X(i)) + } + } + if (e.extensionObject_) + return o.$extensions = "Recursive dumping of extensions not supported in compiled code. Switch to uncompiled or dump extension object directly", + o; + for (n in t.extensions) + if (/^\d+$/.test(n)) { + i = t.extensions[n]; + var a = e.getExtension(i); + s = void 0, + i = i.Ba; + var u = [] + , c = 0; + for (s in i) + u[c++] = s; + s = u[0], + null != a && (r || (r = o.$extensions = {}), + r[ke.$a(s)] = ke.X(a)) + } + return o + } + , + ke.$a = function(e) { + return e.replace(/^[A-Z]/, (function(e) { + return e.toLowerCase() + } + )) + } + , + d("jspb.BinaryEncoder", Ue, void 0), + Ue.prototype.length = function() { + return this.a.length + } + , + Ue.prototype.length = Ue.prototype.length, + Ue.prototype.end = function() { + var e = this.a; + return this.a = [], + e + } + , + Ue.prototype.end = Ue.prototype.end, + Ue.prototype.l = function(e, t) { + for (T(e == Math.floor(e)), + T(t == Math.floor(t)), + T(0 <= e && 4294967296 > e), + T(0 <= t && 4294967296 > t); 0 < t || 127 < e; ) + this.a.push(127 & e | 128), + e = (e >>> 7 | t << 25) >>> 0, + t >>>= 7; + this.a.push(e) + } + , + Ue.prototype.writeSplitVarint64 = Ue.prototype.l, + Ue.prototype.A = function(e, t) { + T(e == Math.floor(e)), + T(t == Math.floor(t)), + T(0 <= e && 4294967296 > e), + T(0 <= t && 4294967296 > t), + this.s(e), + this.s(t) + } + , + Ue.prototype.writeSplitFixed64 = Ue.prototype.A, + Ue.prototype.j = function(e) { + for (T(e == Math.floor(e)), + T(0 <= e && 4294967296 > e); 127 < e; ) + this.a.push(127 & e | 128), + e >>>= 7; + this.a.push(e) + } + , + Ue.prototype.writeUnsignedVarint32 = Ue.prototype.j, + Ue.prototype.M = function(e) { + if (T(e == Math.floor(e)), + T(-2147483648 <= e && 2147483648 > e), + 0 <= e) + this.j(e); + else { + for (var t = 0; 9 > t; t++) + this.a.push(127 & e | 128), + e >>= 7; + this.a.push(1) + } + } + , + Ue.prototype.writeSignedVarint32 = Ue.prototype.M, + Ue.prototype.va = function(e) { + T(e == Math.floor(e)), + T(0 <= e && 0x10000000000000000 > e), + D(e), + this.l(N, k) + } + , + Ue.prototype.writeUnsignedVarint64 = Ue.prototype.va, + Ue.prototype.ua = function(e) { + T(e == Math.floor(e)), + T(-0x8000000000000000 <= e && 0x8000000000000000 > e), + D(e), + this.l(N, k) + } + , + Ue.prototype.writeSignedVarint64 = Ue.prototype.ua, + Ue.prototype.wa = function(e) { + T(e == Math.floor(e)), + T(-2147483648 <= e && 2147483648 > e), + this.j((e << 1 ^ e >> 31) >>> 0) + } + , + Ue.prototype.writeZigzagVarint32 = Ue.prototype.wa, + Ue.prototype.xa = function(e) { + T(e == Math.floor(e)), + T(-0x8000000000000000 <= e && 0x8000000000000000 > e), + L(e), + this.l(N, k) + } + , + Ue.prototype.writeZigzagVarint64 = Ue.prototype.xa, + Ue.prototype.Ta = function(e) { + this.W(te(e)) + } + , + Ue.prototype.writeZigzagVarint64String = Ue.prototype.Ta, + Ue.prototype.W = function(e) { + var t = this; + $(e), + H(N, k, (function(e, r) { + t.l(e >>> 0, r >>> 0) + } + )) + } + , + Ue.prototype.writeZigzagVarintHash64 = Ue.prototype.W, + Ue.prototype.be = function(e) { + T(e == Math.floor(e)), + T(0 <= e && 256 > e), + this.a.push(e >>> 0 & 255) + } + , + Ue.prototype.writeUint8 = Ue.prototype.be, + Ue.prototype.ae = function(e) { + T(e == Math.floor(e)), + T(0 <= e && 65536 > e), + this.a.push(e >>> 0 & 255), + this.a.push(e >>> 8 & 255) + } + , + Ue.prototype.writeUint16 = Ue.prototype.ae, + Ue.prototype.s = function(e) { + T(e == Math.floor(e)), + T(0 <= e && 4294967296 > e), + this.a.push(e >>> 0 & 255), + this.a.push(e >>> 8 & 255), + this.a.push(e >>> 16 & 255), + this.a.push(e >>> 24 & 255) + } + , + Ue.prototype.writeUint32 = Ue.prototype.s, + Ue.prototype.V = function(e) { + T(e == Math.floor(e)), + T(0 <= e && 0x10000000000000000 > e), + U(e), + this.s(N), + this.s(k) + } + , + Ue.prototype.writeUint64 = Ue.prototype.V, + Ue.prototype.Qc = function(e) { + T(e == Math.floor(e)), + T(-128 <= e && 128 > e), + this.a.push(e >>> 0 & 255) + } + , + Ue.prototype.writeInt8 = Ue.prototype.Qc, + Ue.prototype.Pc = function(e) { + T(e == Math.floor(e)), + T(-32768 <= e && 32768 > e), + this.a.push(e >>> 0 & 255), + this.a.push(e >>> 8 & 255) + } + , + Ue.prototype.writeInt16 = Ue.prototype.Pc, + Ue.prototype.S = function(e) { + T(e == Math.floor(e)), + T(-2147483648 <= e && 2147483648 > e), + this.a.push(e >>> 0 & 255), + this.a.push(e >>> 8 & 255), + this.a.push(e >>> 16 & 255), + this.a.push(e >>> 24 & 255) + } + , + Ue.prototype.writeInt32 = Ue.prototype.S, + Ue.prototype.T = function(e) { + T(e == Math.floor(e)), + T(-0x8000000000000000 <= e && 0x8000000000000000 > e), + D(e), + this.A(N, k) + } + , + Ue.prototype.writeInt64 = Ue.prototype.T, + Ue.prototype.ka = function(e) { + T(e == Math.floor(e)), + T(-0x8000000000000000 <= +e && 0x8000000000000000 > +e), + $(te(e)), + this.A(N, k) + } + , + Ue.prototype.writeInt64String = Ue.prototype.ka, + Ue.prototype.L = function(e) { + T(1 / 0 === e || -1 / 0 === e || isNaN(e) || -34028234663852886e22 <= e && 34028234663852886e22 >= e), + z(e), + this.s(N) + } + , + Ue.prototype.writeFloat = Ue.prototype.L, + Ue.prototype.J = function(e) { + T(1 / 0 === e || -1 / 0 === e || isNaN(e) || -17976931348623157e292 <= e && 17976931348623157e292 >= e), + j(e), + this.s(N), + this.s(k) + } + , + Ue.prototype.writeDouble = Ue.prototype.J, + Ue.prototype.I = function(e) { + T("boolean" == typeof e || "number" == typeof e), + this.a.push(e ? 1 : 0) + } + , + Ue.prototype.writeBool = Ue.prototype.I, + Ue.prototype.R = function(e) { + T(e == Math.floor(e)), + T(-2147483648 <= e && 2147483648 > e), + this.M(e) + } + , + Ue.prototype.writeEnum = Ue.prototype.R, + Ue.prototype.ja = function(e) { + this.a.push.apply(this.a, e) + } + , + Ue.prototype.writeBytes = Ue.prototype.ja, + Ue.prototype.N = function(e) { + $(e), + this.l(N, k) + } + , + Ue.prototype.writeVarintHash64 = Ue.prototype.N, + Ue.prototype.K = function(e) { + $(e), + this.s(N), + this.s(k) + } + , + Ue.prototype.writeFixedHash64 = Ue.prototype.K, + Ue.prototype.U = function(e) { + var t = this.a.length; + !function(e, t, r) { + for (var n = [], o = 2; o < arguments.length; ++o) + n[o - 2] = arguments[o]; + "string" != typeof e && m("Expected string but got %s: %s.", [h(e), e], t, n) + }(e); + for (var r = 0; r < e.length; r++) { + var n = e.charCodeAt(r); + if (128 > n) + this.a.push(n); + else if (2048 > n) + this.a.push(n >> 6 | 192), + this.a.push(63 & n | 128); + else if (65536 > n) + if (55296 <= n && 56319 >= n && r + 1 < e.length) { + var o = e.charCodeAt(r + 1); + 56320 <= o && 57343 >= o && (n = 1024 * (n - 55296) + o - 56320 + 65536, + this.a.push(n >> 18 | 240), + this.a.push(n >> 12 & 63 | 128), + this.a.push(n >> 6 & 63 | 128), + this.a.push(63 & n | 128), + r++) + } else + this.a.push(n >> 12 | 224), + this.a.push(n >> 6 & 63 | 128), + this.a.push(63 & n | 128) + } + return this.a.length - t + } + , + Ue.prototype.writeString = Ue.prototype.U, + d("jspb.arith.UInt64", De, void 0), + De.prototype.cmp = function(e) { + return this.hi < e.hi || this.hi == e.hi && this.lo < e.lo ? -1 : this.hi == e.hi && this.lo == e.lo ? 0 : 1 + } + , + De.prototype.cmp = De.prototype.cmp, + De.prototype.La = function() { + return new De((this.lo >>> 1 | (1 & this.hi) << 31) >>> 0,this.hi >>> 1 >>> 0) + } + , + De.prototype.rightShift = De.prototype.La, + De.prototype.Da = function() { + return new De(this.lo << 1 >>> 0,(this.hi << 1 | this.lo >>> 31) >>> 0) + } + , + De.prototype.leftShift = De.prototype.Da, + De.prototype.cb = function() { + return !!(2147483648 & this.hi) + } + , + De.prototype.msb = De.prototype.cb, + De.prototype.Ob = function() { + return !!(1 & this.lo) + } + , + De.prototype.lsb = De.prototype.Ob, + De.prototype.Ua = function() { + return 0 == this.lo && 0 == this.hi + } + , + De.prototype.zero = De.prototype.Ua, + De.prototype.add = function(e) { + return new De((this.lo + e.lo & 4294967295) >>> 0 >>> 0,((this.hi + e.hi & 4294967295) >>> 0) + (4294967296 <= this.lo + e.lo ? 1 : 0) >>> 0) + } + , + De.prototype.add = De.prototype.add, + De.prototype.sub = function(e) { + return new De((this.lo - e.lo & 4294967295) >>> 0 >>> 0,((this.hi - e.hi & 4294967295) >>> 0) - (0 > this.lo - e.lo ? 1 : 0) >>> 0) + } + , + De.prototype.sub = De.prototype.sub, + De.mul32x32 = Le, + De.prototype.eb = function(e) { + var t = Le(this.lo, e); + return (e = Le(this.hi, e)).hi = e.lo, + e.lo = 0, + t.add(e) + } + , + De.prototype.mul = De.prototype.eb, + De.prototype.Xa = function(e) { + if (0 == e) + return []; + var t = new De(0,0) + , r = new De(this.lo,this.hi); + e = new De(e,0); + for (var n = new De(1,0); !e.cb(); ) + e = e.Da(), + n = n.Da(); + for (; !n.Ua(); ) + 0 >= e.cmp(r) && (t = t.add(n), + r = r.sub(e)), + e = e.La(), + n = n.La(); + return [t, r] + } + , + De.prototype.div = De.prototype.Xa, + De.prototype.toString = function() { + for (var e = "", t = this; !t.Ua(); ) { + var r = (t = t.Xa(10))[0]; + e = t[1].lo + e, + t = r + } + return "" == e && (e = "0"), + e + } + , + De.prototype.toString = De.prototype.toString, + De.fromString = ze, + De.prototype.clone = function() { + return new De(this.lo,this.hi) + } + , + De.prototype.clone = De.prototype.clone, + d("jspb.arith.Int64", je, void 0), + je.prototype.add = function(e) { + return new je((this.lo + e.lo & 4294967295) >>> 0 >>> 0,((this.hi + e.hi & 4294967295) >>> 0) + (4294967296 <= this.lo + e.lo ? 1 : 0) >>> 0) + } + , + je.prototype.add = je.prototype.add, + je.prototype.sub = function(e) { + return new je((this.lo - e.lo & 4294967295) >>> 0 >>> 0,((this.hi - e.hi & 4294967295) >>> 0) - (0 > this.lo - e.lo ? 1 : 0) >>> 0) + } + , + je.prototype.sub = je.prototype.sub, + je.prototype.clone = function() { + return new je(this.lo,this.hi) + } + , + je.prototype.clone = je.prototype.clone, + je.prototype.toString = function() { + var e = 0 != (2147483648 & this.hi) + , t = new De(this.lo,this.hi); + return e && (t = new De(0,0).sub(t)), + (e ? "-" : "") + t.toString() + } + , + je.prototype.toString = je.prototype.toString, + je.fromString = $e, + d("jspb.BinaryWriter", Ve, void 0), + Ve.prototype.pb = function(e, t, r) { + Ge(this, e.subarray(t, r)) + } + , + Ve.prototype.writeSerializedMessage = Ve.prototype.pb, + Ve.prototype.Pb = function(e, t, r) { + null != e && null != t && null != r && this.pb(e, t, r) + } + , + Ve.prototype.maybeWriteSerializedMessage = Ve.prototype.Pb, + Ve.prototype.reset = function() { + this.c = [], + this.a.end(), + this.b = 0, + this.h = [] + } + , + Ve.prototype.reset = Ve.prototype.reset, + Ve.prototype.ab = function() { + T(0 == this.h.length); + for (var e = new Uint8Array(this.b + this.a.length()), t = this.c, r = t.length, n = 0, o = 0; o < r; o++) { + var s = t[o]; + e.set(s, n), + n += s.length + } + return t = this.a.end(), + e.set(t, n), + T((n += t.length) == e.length), + this.c = [e], + e + } + , + Ve.prototype.getResultBuffer = Ve.prototype.ab, + Ve.prototype.Kb = function(e) { + return _(this.ab(), e) + } + , + Ve.prototype.getResultBase64String = Ve.prototype.Kb, + Ve.prototype.Va = function(e) { + this.h.push(He(this, e)) + } + , + Ve.prototype.beginSubMessage = Ve.prototype.Va, + Ve.prototype.Ya = function() { + T(0 <= this.h.length), + Ke(this, this.h.pop()) + } + , + Ve.prototype.endSubMessage = Ve.prototype.Ya, + Ve.prototype.Nc = function(e, t, r) { + switch (e) { + case 1: + this.J(t, r); + break; + case 2: + this.L(t, r); + break; + case 3: + this.T(t, r); + break; + case 4: + this.V(t, r); + break; + case 5: + this.S(t, r); + break; + case 6: + this.Qa(t, r); + break; + case 7: + this.Pa(t, r); + break; + case 8: + this.I(t, r); + break; + case 9: + this.U(t, r); + break; + case 10: + v("Group field type not supported in writeAny()"); + break; + case 11: + v("Message field type not supported in writeAny()"); + break; + case 12: + this.ja(t, r); + break; + case 13: + this.s(t, r); + break; + case 14: + this.R(t, r); + break; + case 15: + this.Ra(t, r); + break; + case 16: + this.Sa(t, r); + break; + case 17: + this.rb(t, r); + break; + case 18: + this.sb(t, r); + break; + case 30: + this.K(t, r); + break; + case 31: + this.N(t, r); + break; + default: + v("Invalid field type in writeAny()") + } + } + , + Ve.prototype.writeAny = Ve.prototype.Nc, + Ve.prototype.S = function(e, t) { + null != t && (T(-2147483648 <= t && 2147483648 > t), + Je(this, e, t)) + } + , + Ve.prototype.writeInt32 = Ve.prototype.S, + Ve.prototype.ob = function(e, t) { + null != t && (T(-2147483648 <= (t = parseInt(t, 10)) && 2147483648 > t), + Je(this, e, t)) + } + , + Ve.prototype.writeInt32String = Ve.prototype.ob, + Ve.prototype.T = function(e, t) { + null != t && (T(-0x8000000000000000 <= t && 0x8000000000000000 > t), + null != t && (Ze(this, e, 0), + this.a.ua(t))) + } + , + Ve.prototype.writeInt64 = Ve.prototype.T, + Ve.prototype.ka = function(e, t) { + null != t && (t = $e(t), + Ze(this, e, 0), + this.a.l(t.lo, t.hi)) + } + , + Ve.prototype.writeInt64String = Ve.prototype.ka, + Ve.prototype.s = function(e, t) { + null != t && (T(0 <= t && 4294967296 > t), + qe(this, e, t)) + } + , + Ve.prototype.writeUint32 = Ve.prototype.s, + Ve.prototype.ub = function(e, t) { + null != t && (T(0 <= (t = parseInt(t, 10)) && 4294967296 > t), + qe(this, e, t)) + } + , + Ve.prototype.writeUint32String = Ve.prototype.ub, + Ve.prototype.V = function(e, t) { + null != t && (T(0 <= t && 0x10000000000000000 > t), + null != t && (Ze(this, e, 0), + this.a.va(t))) + } + , + Ve.prototype.writeUint64 = Ve.prototype.V, + Ve.prototype.vb = function(e, t) { + null != t && (t = ze(t), + Ze(this, e, 0), + this.a.l(t.lo, t.hi)) + } + , + Ve.prototype.writeUint64String = Ve.prototype.vb, + Ve.prototype.rb = function(e, t) { + null != t && (T(-2147483648 <= t && 2147483648 > t), + null != t && (Ze(this, e, 0), + this.a.wa(t))) + } + , + Ve.prototype.writeSint32 = Ve.prototype.rb, + Ve.prototype.sb = function(e, t) { + null != t && (T(-0x8000000000000000 <= t && 0x8000000000000000 > t), + null != t && (Ze(this, e, 0), + this.a.xa(t))) + } + , + Ve.prototype.writeSint64 = Ve.prototype.sb, + Ve.prototype.$d = function(e, t) { + null != t && null != t && (Ze(this, e, 0), + this.a.W(t)) + } + , + Ve.prototype.writeSintHash64 = Ve.prototype.$d, + Ve.prototype.Zd = function(e, t) { + null != t && null != t && (Ze(this, e, 0), + this.a.Ta(t)) + } + , + Ve.prototype.writeSint64String = Ve.prototype.Zd, + Ve.prototype.Pa = function(e, t) { + null != t && (T(0 <= t && 4294967296 > t), + Ze(this, e, 5), + this.a.s(t)) + } + , + Ve.prototype.writeFixed32 = Ve.prototype.Pa, + Ve.prototype.Qa = function(e, t) { + null != t && (T(0 <= t && 0x10000000000000000 > t), + Ze(this, e, 1), + this.a.V(t)) + } + , + Ve.prototype.writeFixed64 = Ve.prototype.Qa, + Ve.prototype.nb = function(e, t) { + null != t && (t = ze(t), + Ze(this, e, 1), + this.a.A(t.lo, t.hi)) + } + , + Ve.prototype.writeFixed64String = Ve.prototype.nb, + Ve.prototype.Ra = function(e, t) { + null != t && (T(-2147483648 <= t && 2147483648 > t), + Ze(this, e, 5), + this.a.S(t)) + } + , + Ve.prototype.writeSfixed32 = Ve.prototype.Ra, + Ve.prototype.Sa = function(e, t) { + null != t && (T(-0x8000000000000000 <= t && 0x8000000000000000 > t), + Ze(this, e, 1), + this.a.T(t)) + } + , + Ve.prototype.writeSfixed64 = Ve.prototype.Sa, + Ve.prototype.qb = function(e, t) { + null != t && (t = $e(t), + Ze(this, e, 1), + this.a.A(t.lo, t.hi)) + } + , + Ve.prototype.writeSfixed64String = Ve.prototype.qb, + Ve.prototype.L = function(e, t) { + null != t && (Ze(this, e, 5), + this.a.L(t)) + } + , + Ve.prototype.writeFloat = Ve.prototype.L, + Ve.prototype.J = function(e, t) { + null != t && (Ze(this, e, 1), + this.a.J(t)) + } + , + Ve.prototype.writeDouble = Ve.prototype.J, + Ve.prototype.I = function(e, t) { + null != t && (T("boolean" == typeof t || "number" == typeof t), + Ze(this, e, 0), + this.a.I(t)) + } + , + Ve.prototype.writeBool = Ve.prototype.I, + Ve.prototype.R = function(e, t) { + null != t && (T(-2147483648 <= t && 2147483648 > t), + Ze(this, e, 0), + this.a.M(t)) + } + , + Ve.prototype.writeEnum = Ve.prototype.R, + Ve.prototype.U = function(e, t) { + null != t && (e = He(this, e), + this.a.U(t), + Ke(this, e)) + } + , + Ve.prototype.writeString = Ve.prototype.U, + Ve.prototype.ja = function(e, t) { + null != t && (t = se(t), + Ze(this, e, 2), + this.a.j(t.length), + Ge(this, t)) + } + , + Ve.prototype.writeBytes = Ve.prototype.ja, + Ve.prototype.Rc = function(e, t, r) { + null != t && (e = He(this, e), + r(t, this), + Ke(this, e)) + } + , + Ve.prototype.writeMessage = Ve.prototype.Rc, + Ve.prototype.Sc = function(e, t, r) { + null != t && (Ze(this, 1, 3), + Ze(this, 2, 0), + this.a.M(e), + e = He(this, 3), + r(t, this), + Ke(this, e), + Ze(this, 1, 4)) + } + , + Ve.prototype.writeMessageSet = Ve.prototype.Sc, + Ve.prototype.Oc = function(e, t, r) { + null != t && (Ze(this, e, 3), + r(t, this), + Ze(this, e, 4)) + } + , + Ve.prototype.writeGroup = Ve.prototype.Oc, + Ve.prototype.K = function(e, t) { + null != t && (T(8 == t.length), + Ze(this, e, 1), + this.a.K(t)) + } + , + Ve.prototype.writeFixedHash64 = Ve.prototype.K, + Ve.prototype.N = function(e, t) { + null != t && (T(8 == t.length), + Ze(this, e, 0), + this.a.N(t)) + } + , + Ve.prototype.writeVarintHash64 = Ve.prototype.N, + Ve.prototype.A = function(e, t, r) { + Ze(this, e, 1), + this.a.A(t, r) + } + , + Ve.prototype.writeSplitFixed64 = Ve.prototype.A, + Ve.prototype.l = function(e, t, r) { + Ze(this, e, 0), + this.a.l(t, r) + } + , + Ve.prototype.writeSplitVarint64 = Ve.prototype.l, + Ve.prototype.tb = function(e, t, r) { + Ze(this, e, 0); + var n = this.a; + H(t, r, (function(e, t) { + n.l(e >>> 0, t >>> 0) + } + )) + } + , + Ve.prototype.writeSplitZigzagVarint64 = Ve.prototype.tb, + Ve.prototype.Ed = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + Je(this, e, t[r]) + } + , + Ve.prototype.writeRepeatedInt32 = Ve.prototype.Ed, + Ve.prototype.Fd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.ob(e, t[r]) + } + , + Ve.prototype.writeRepeatedInt32String = Ve.prototype.Fd, + Ve.prototype.Gd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) { + var n = t[r]; + null != n && (Ze(this, e, 0), + this.a.ua(n)) + } + } + , + Ve.prototype.writeRepeatedInt64 = Ve.prototype.Gd, + Ve.prototype.Qd = function(e, t, r, n) { + if (null != t) + for (var o = 0; o < t.length; o++) + this.A(e, r(t[o]), n(t[o])) + } + , + Ve.prototype.writeRepeatedSplitFixed64 = Ve.prototype.Qd, + Ve.prototype.Rd = function(e, t, r, n) { + if (null != t) + for (var o = 0; o < t.length; o++) + this.l(e, r(t[o]), n(t[o])) + } + , + Ve.prototype.writeRepeatedSplitVarint64 = Ve.prototype.Rd, + Ve.prototype.Sd = function(e, t, r, n) { + if (null != t) + for (var o = 0; o < t.length; o++) + this.tb(e, r(t[o]), n(t[o])) + } + , + Ve.prototype.writeRepeatedSplitZigzagVarint64 = Ve.prototype.Sd, + Ve.prototype.Hd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.ka(e, t[r]) + } + , + Ve.prototype.writeRepeatedInt64String = Ve.prototype.Hd, + Ve.prototype.Ud = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + qe(this, e, t[r]) + } + , + Ve.prototype.writeRepeatedUint32 = Ve.prototype.Ud, + Ve.prototype.Vd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.ub(e, t[r]) + } + , + Ve.prototype.writeRepeatedUint32String = Ve.prototype.Vd, + Ve.prototype.Wd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) { + var n = t[r]; + null != n && (Ze(this, e, 0), + this.a.va(n)) + } + } + , + Ve.prototype.writeRepeatedUint64 = Ve.prototype.Wd, + Ve.prototype.Xd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.vb(e, t[r]) + } + , + Ve.prototype.writeRepeatedUint64String = Ve.prototype.Xd, + Ve.prototype.Md = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) { + var n = t[r]; + null != n && (Ze(this, e, 0), + this.a.wa(n)) + } + } + , + Ve.prototype.writeRepeatedSint32 = Ve.prototype.Md, + Ve.prototype.Nd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) { + var n = t[r]; + null != n && (Ze(this, e, 0), + this.a.xa(n)) + } + } + , + Ve.prototype.writeRepeatedSint64 = Ve.prototype.Nd, + Ve.prototype.Od = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) { + var n = t[r]; + null != n && (Ze(this, e, 0), + this.a.Ta(n)) + } + } + , + Ve.prototype.writeRepeatedSint64String = Ve.prototype.Od, + Ve.prototype.Pd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) { + var n = t[r]; + null != n && (Ze(this, e, 0), + this.a.W(n)) + } + } + , + Ve.prototype.writeRepeatedSintHash64 = Ve.prototype.Pd, + Ve.prototype.yd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.Pa(e, t[r]) + } + , + Ve.prototype.writeRepeatedFixed32 = Ve.prototype.yd, + Ve.prototype.zd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.Qa(e, t[r]) + } + , + Ve.prototype.writeRepeatedFixed64 = Ve.prototype.zd, + Ve.prototype.Ad = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.nb(e, t[r]) + } + , + Ve.prototype.writeRepeatedFixed64String = Ve.prototype.Ad, + Ve.prototype.Jd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.Ra(e, t[r]) + } + , + Ve.prototype.writeRepeatedSfixed32 = Ve.prototype.Jd, + Ve.prototype.Kd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.Sa(e, t[r]) + } + , + Ve.prototype.writeRepeatedSfixed64 = Ve.prototype.Kd, + Ve.prototype.Ld = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.qb(e, t[r]) + } + , + Ve.prototype.writeRepeatedSfixed64String = Ve.prototype.Ld, + Ve.prototype.Cd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.L(e, t[r]) + } + , + Ve.prototype.writeRepeatedFloat = Ve.prototype.Cd, + Ve.prototype.wd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.J(e, t[r]) + } + , + Ve.prototype.writeRepeatedDouble = Ve.prototype.wd, + Ve.prototype.ud = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.I(e, t[r]) + } + , + Ve.prototype.writeRepeatedBool = Ve.prototype.ud, + Ve.prototype.xd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.R(e, t[r]) + } + , + Ve.prototype.writeRepeatedEnum = Ve.prototype.xd, + Ve.prototype.Td = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.U(e, t[r]) + } + , + Ve.prototype.writeRepeatedString = Ve.prototype.Td, + Ve.prototype.vd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.ja(e, t[r]) + } + , + Ve.prototype.writeRepeatedBytes = Ve.prototype.vd, + Ve.prototype.Id = function(e, t, r) { + if (null != t) + for (var n = 0; n < t.length; n++) { + var o = He(this, e); + r(t[n], this), + Ke(this, o) + } + } + , + Ve.prototype.writeRepeatedMessage = Ve.prototype.Id, + Ve.prototype.Dd = function(e, t, r) { + if (null != t) + for (var n = 0; n < t.length; n++) + Ze(this, e, 3), + r(t[n], this), + Ze(this, e, 4) + } + , + Ve.prototype.writeRepeatedGroup = Ve.prototype.Dd, + Ve.prototype.Bd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.K(e, t[r]) + } + , + Ve.prototype.writeRepeatedFixedHash64 = Ve.prototype.Bd, + Ve.prototype.Yd = function(e, t) { + if (null != t) + for (var r = 0; r < t.length; r++) + this.N(e, t[r]) + } + , + Ve.prototype.writeRepeatedVarintHash64 = Ve.prototype.Yd, + Ve.prototype.ad = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.M(t[r]); + Ke(this, e) + } + } + , + Ve.prototype.writePackedInt32 = Ve.prototype.ad, + Ve.prototype.bd = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.M(parseInt(t[r], 10)); + Ke(this, e) + } + } + , + Ve.prototype.writePackedInt32String = Ve.prototype.bd, + Ve.prototype.cd = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.ua(t[r]); + Ke(this, e) + } + } + , + Ve.prototype.writePackedInt64 = Ve.prototype.cd, + Ve.prototype.md = function(e, t, r, n) { + if (null != t) { + e = He(this, e); + for (var o = 0; o < t.length; o++) + this.a.A(r(t[o]), n(t[o])); + Ke(this, e) + } + } + , + Ve.prototype.writePackedSplitFixed64 = Ve.prototype.md, + Ve.prototype.nd = function(e, t, r, n) { + if (null != t) { + e = He(this, e); + for (var o = 0; o < t.length; o++) + this.a.l(r(t[o]), n(t[o])); + Ke(this, e) + } + } + , + Ve.prototype.writePackedSplitVarint64 = Ve.prototype.nd, + Ve.prototype.od = function(e, t, r, n) { + if (null != t) { + e = He(this, e); + for (var o = this.a, s = 0; s < t.length; s++) + H(r(t[s]), n(t[s]), (function(e, t) { + o.l(e >>> 0, t >>> 0) + } + )); + Ke(this, e) + } + } + , + Ve.prototype.writePackedSplitZigzagVarint64 = Ve.prototype.od, + Ve.prototype.dd = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) { + var n = $e(t[r]); + this.a.l(n.lo, n.hi) + } + Ke(this, e) + } + } + , + Ve.prototype.writePackedInt64String = Ve.prototype.dd, + Ve.prototype.pd = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.j(t[r]); + Ke(this, e) + } + } + , + Ve.prototype.writePackedUint32 = Ve.prototype.pd, + Ve.prototype.qd = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.j(parseInt(t[r], 10)); + Ke(this, e) + } + } + , + Ve.prototype.writePackedUint32String = Ve.prototype.qd, + Ve.prototype.rd = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.va(t[r]); + Ke(this, e) + } + } + , + Ve.prototype.writePackedUint64 = Ve.prototype.rd, + Ve.prototype.sd = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) { + var n = ze(t[r]); + this.a.l(n.lo, n.hi) + } + Ke(this, e) + } + } + , + Ve.prototype.writePackedUint64String = Ve.prototype.sd, + Ve.prototype.hd = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.wa(t[r]); + Ke(this, e) + } + } + , + Ve.prototype.writePackedSint32 = Ve.prototype.hd, + Ve.prototype.jd = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.xa(t[r]); + Ke(this, e) + } + } + , + Ve.prototype.writePackedSint64 = Ve.prototype.jd, + Ve.prototype.kd = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.W(te(t[r])); + Ke(this, e) + } + } + , + Ve.prototype.writePackedSint64String = Ve.prototype.kd, + Ve.prototype.ld = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.W(t[r]); + Ke(this, e) + } + } + , + Ve.prototype.writePackedSintHash64 = Ve.prototype.ld, + Ve.prototype.Wc = function(e, t) { + if (null != t && t.length) + for (Ze(this, e, 2), + this.a.j(4 * t.length), + e = 0; e < t.length; e++) + this.a.s(t[e]) + } + , + Ve.prototype.writePackedFixed32 = Ve.prototype.Wc, + Ve.prototype.Xc = function(e, t) { + if (null != t && t.length) + for (Ze(this, e, 2), + this.a.j(8 * t.length), + e = 0; e < t.length; e++) + this.a.V(t[e]) + } + , + Ve.prototype.writePackedFixed64 = Ve.prototype.Xc, + Ve.prototype.Yc = function(e, t) { + if (null != t && t.length) + for (Ze(this, e, 2), + this.a.j(8 * t.length), + e = 0; e < t.length; e++) { + var r = ze(t[e]); + this.a.A(r.lo, r.hi) + } + } + , + Ve.prototype.writePackedFixed64String = Ve.prototype.Yc, + Ve.prototype.ed = function(e, t) { + if (null != t && t.length) + for (Ze(this, e, 2), + this.a.j(4 * t.length), + e = 0; e < t.length; e++) + this.a.S(t[e]) + } + , + Ve.prototype.writePackedSfixed32 = Ve.prototype.ed, + Ve.prototype.fd = function(e, t) { + if (null != t && t.length) + for (Ze(this, e, 2), + this.a.j(8 * t.length), + e = 0; e < t.length; e++) + this.a.T(t[e]) + } + , + Ve.prototype.writePackedSfixed64 = Ve.prototype.fd, + Ve.prototype.gd = function(e, t) { + if (null != t && t.length) + for (Ze(this, e, 2), + this.a.j(8 * t.length), + e = 0; e < t.length; e++) + this.a.ka(t[e]) + } + , + Ve.prototype.writePackedSfixed64String = Ve.prototype.gd, + Ve.prototype.$c = function(e, t) { + if (null != t && t.length) + for (Ze(this, e, 2), + this.a.j(4 * t.length), + e = 0; e < t.length; e++) + this.a.L(t[e]) + } + , + Ve.prototype.writePackedFloat = Ve.prototype.$c, + Ve.prototype.Uc = function(e, t) { + if (null != t && t.length) + for (Ze(this, e, 2), + this.a.j(8 * t.length), + e = 0; e < t.length; e++) + this.a.J(t[e]) + } + , + Ve.prototype.writePackedDouble = Ve.prototype.Uc, + Ve.prototype.Tc = function(e, t) { + if (null != t && t.length) + for (Ze(this, e, 2), + this.a.j(t.length), + e = 0; e < t.length; e++) + this.a.I(t[e]) + } + , + Ve.prototype.writePackedBool = Ve.prototype.Tc, + Ve.prototype.Vc = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.R(t[r]); + Ke(this, e) + } + } + , + Ve.prototype.writePackedEnum = Ve.prototype.Vc, + Ve.prototype.Zc = function(e, t) { + if (null != t && t.length) + for (Ze(this, e, 2), + this.a.j(8 * t.length), + e = 0; e < t.length; e++) + this.a.K(t[e]) + } + , + Ve.prototype.writePackedFixedHash64 = Ve.prototype.Zc, + Ve.prototype.td = function(e, t) { + if (null != t && t.length) { + e = He(this, e); + for (var r = 0; r < t.length; r++) + this.a.N(t[r]); + Ke(this, e) + } + } + , + Ve.prototype.writePackedVarintHash64 = Ve.prototype.td, + t.debug = ke, + t.Map = P, + t.Message = ge, + t.BinaryReader = ce, + t.BinaryWriter = Ve, + t.ExtensionFieldInfo = pe, + t.ExtensionFieldBinaryInfo = fe, + t.exportSymbol = function(e, t, r) { + d(e, t, r) + } + , + t.inherits = function(e, t) { + function r() {} + r.prototype = t.prototype, + e.prototype = new r, + e.prototype.constructor = e + } + , + t.object = { + extend: function(e, t) { + for (var r, n, o = 1; o < arguments.length; o++) { + for (r in n = arguments[o]) + e[r] = n[r]; + for (var s = 0; s < f.length; s++) + r = f[s], + Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]) + } + } + }, + t.typeOf = h + }, + 6177: (e,t,r)=>{ + var n = r(5595) + , o = n + , s = "undefined" != typeof globalThis && globalThis || "undefined" != typeof window && window || void 0 !== s && s || "undefined" != typeof self && self || function() { + return this + } + .call(null) || Function("return this")(); + o.exportSymbol("proto.google.protobuf.Any", null, s), + proto.google.protobuf.Any = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(proto.google.protobuf.Any, n.Message), + o.DEBUG && !COMPILED && (proto.google.protobuf.Any.displayName = "proto.google.protobuf.Any"), + n.Message.GENERATE_TO_OBJECT && (proto.google.protobuf.Any.prototype.toObject = function(e) { + return proto.google.protobuf.Any.toObject(e, this) + } + , + proto.google.protobuf.Any.toObject = function(e, t) { + var r = { + typeUrl: n.Message.getFieldWithDefault(t, 1, ""), + value: t.getValue_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + proto.google.protobuf.Any.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new proto.google.protobuf.Any; + return proto.google.protobuf.Any.deserializeBinaryFromReader(r, t) + } + , + proto.google.protobuf.Any.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readString(); + e.setTypeUrl(r); + break; + case 2: + r = t.readBytes(), + e.setValue(r); + break; + default: + t.skipField() + } + return e + } + , + proto.google.protobuf.Any.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return proto.google.protobuf.Any.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + proto.google.protobuf.Any.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getTypeUrl()).length > 0 && t.writeString(1, r), + (r = e.getValue_asU8()).length > 0 && t.writeBytes(2, r) + } + , + proto.google.protobuf.Any.prototype.getTypeUrl = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + proto.google.protobuf.Any.prototype.setTypeUrl = function(e) { + return n.Message.setProto3StringField(this, 1, e) + } + , + proto.google.protobuf.Any.prototype.getValue = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + proto.google.protobuf.Any.prototype.getValue_asB64 = function() { + return n.Message.bytesAsB64(this.getValue()) + } + , + proto.google.protobuf.Any.prototype.getValue_asU8 = function() { + return n.Message.bytesAsU8(this.getValue()) + } + , + proto.google.protobuf.Any.prototype.setValue = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + o.object.extend(t, proto.google.protobuf), + proto.google.protobuf.Any.prototype.getTypeName = function() { + return this.getTypeUrl().split("/").pop() + } + , + proto.google.protobuf.Any.prototype.pack = function(e, t, r) { + r || (r = "type.googleapis.com/"), + "/" != r.substr(-1) ? this.setTypeUrl(r + "/" + t) : this.setTypeUrl(r + t), + this.setValue(e) + } + , + proto.google.protobuf.Any.prototype.unpack = function(e, t) { + return this.getTypeName() == t ? e(this.getValue_asU8()) : null + } + } + , + 9669: (e,t,r)=>{ + e.exports = r(1609) + } + , + 5448: (e,t,r)=>{ + "use strict"; + var n = r(4867) + , o = r(6026) + , s = r(4372) + , i = r(5327) + , a = r(4097) + , u = r(4109) + , c = r(7985) + , l = r(5061) + , d = r(7874) + , h = r(5263); + e.exports = function(e) { + return new Promise((function(t, r) { + var p, f = e.data, g = e.headers, y = e.responseType; + function b() { + e.cancelToken && e.cancelToken.unsubscribe(p), + e.signal && e.signal.removeEventListener("abort", p) + } + n.isFormData(f) && delete g["Content-Type"]; + var m = new XMLHttpRequest; + if (e.auth) { + var T = e.auth.username || "" + , v = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : ""; + g.Authorization = "Basic " + btoa(T + ":" + v) + } + var w = a(e.baseURL, e.url); + function A() { + if (m) { + var n = "getAllResponseHeaders"in m ? u(m.getAllResponseHeaders()) : null + , s = { + data: y && "text" !== y && "json" !== y ? m.response : m.responseText, + status: m.status, + statusText: m.statusText, + headers: n, + config: e, + request: m + }; + o((function(e) { + t(e), + b() + } + ), (function(e) { + r(e), + b() + } + ), s), + m = null + } + } + if (m.open(e.method.toUpperCase(), i(w, e.params, e.paramsSerializer), !0), + m.timeout = e.timeout, + "onloadend"in m ? m.onloadend = A : m.onreadystatechange = function() { + m && 4 === m.readyState && (0 !== m.status || m.responseURL && 0 === m.responseURL.indexOf("file:")) && setTimeout(A) + } + , + m.onabort = function() { + m && (r(l("Request aborted", e, "ECONNABORTED", m)), + m = null) + } + , + m.onerror = function() { + r(l("Network Error", e, null, m)), + m = null + } + , + m.ontimeout = function() { + var t = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded" + , n = e.transitional || d; + e.timeoutErrorMessage && (t = e.timeoutErrorMessage), + r(l(t, e, n.clarifyTimeoutError ? "ETIMEDOUT" : "ECONNABORTED", m)), + m = null + } + , + n.isStandardBrowserEnv()) { + var P = (e.withCredentials || c(w)) && e.xsrfCookieName ? s.read(e.xsrfCookieName) : void 0; + P && (g[e.xsrfHeaderName] = P) + } + "setRequestHeader"in m && n.forEach(g, (function(e, t) { + void 0 === f && "content-type" === t.toLowerCase() ? delete g[t] : m.setRequestHeader(t, e) + } + )), + n.isUndefined(e.withCredentials) || (m.withCredentials = !!e.withCredentials), + y && "json" !== y && (m.responseType = e.responseType), + "function" == typeof e.onDownloadProgress && m.addEventListener("progress", e.onDownloadProgress), + "function" == typeof e.onUploadProgress && m.upload && m.upload.addEventListener("progress", e.onUploadProgress), + (e.cancelToken || e.signal) && (p = function(e) { + m && (r(!e || e && e.type ? new h("canceled") : e), + m.abort(), + m = null) + } + , + e.cancelToken && e.cancelToken.subscribe(p), + e.signal && (e.signal.aborted ? p() : e.signal.addEventListener("abort", p))), + f || (f = null), + m.send(f) + } + )) + } + } + , + 1609: (e,t,r)=>{ + "use strict"; + var n = r(4867) + , o = r(1849) + , s = r(321) + , i = r(7185) + , a = function e(t) { + var r = new s(t) + , a = o(s.prototype.request, r); + return n.extend(a, s.prototype, r), + n.extend(a, r), + a.create = function(r) { + return e(i(t, r)) + } + , + a + }(r(5546)); + a.Axios = s, + a.Cancel = r(5263), + a.CancelToken = r(4972), + a.isCancel = r(6502), + a.VERSION = r(7288).version, + a.all = function(e) { + return Promise.all(e) + } + , + a.spread = r(8713), + a.isAxiosError = r(6268), + e.exports = a, + e.exports.default = a + } + , + 5263: e=>{ + "use strict"; + function t(e) { + this.message = e + } + t.prototype.toString = function() { + return "Cancel" + (this.message ? ": " + this.message : "") + } + , + t.prototype.__CANCEL__ = !0, + e.exports = t + } + , + 4972: (e,t,r)=>{ + "use strict"; + var n = r(5263); + function o(e) { + if ("function" != typeof e) + throw new TypeError("executor must be a function."); + var t; + this.promise = new Promise((function(e) { + t = e + } + )); + var r = this; + this.promise.then((function(e) { + if (r._listeners) { + var t, n = r._listeners.length; + for (t = 0; t < n; t++) + r._listeners[t](e); + r._listeners = null + } + } + )), + this.promise.then = function(e) { + var t, n = new Promise((function(e) { + r.subscribe(e), + t = e + } + )).then(e); + return n.cancel = function() { + r.unsubscribe(t) + } + , + n + } + , + e((function(e) { + r.reason || (r.reason = new n(e), + t(r.reason)) + } + )) + } + o.prototype.throwIfRequested = function() { + if (this.reason) + throw this.reason + } + , + o.prototype.subscribe = function(e) { + this.reason ? e(this.reason) : this._listeners ? this._listeners.push(e) : this._listeners = [e] + } + , + o.prototype.unsubscribe = function(e) { + if (this._listeners) { + var t = this._listeners.indexOf(e); + -1 !== t && this._listeners.splice(t, 1) + } + } + , + o.source = function() { + var e; + return { + token: new o((function(t) { + e = t + } + )), + cancel: e + } + } + , + e.exports = o + } + , + 6502: e=>{ + "use strict"; + e.exports = function(e) { + return !(!e || !e.__CANCEL__) + } + } + , + 321: (e,t,r)=>{ + "use strict"; + var n = r(4867) + , o = r(5327) + , s = r(782) + , i = r(3572) + , a = r(7185) + , u = r(4875) + , c = u.validators; + function l(e) { + this.defaults = e, + this.interceptors = { + request: new s, + response: new s + } + } + l.prototype.request = function(e, t) { + "string" == typeof e ? (t = t || {}).url = e : t = e || {}, + (t = a(this.defaults, t)).method ? t.method = t.method.toLowerCase() : this.defaults.method ? t.method = this.defaults.method.toLowerCase() : t.method = "get"; + var r = t.transitional; + void 0 !== r && u.assertOptions(r, { + silentJSONParsing: c.transitional(c.boolean), + forcedJSONParsing: c.transitional(c.boolean), + clarifyTimeoutError: c.transitional(c.boolean) + }, !1); + var n = [] + , o = !0; + this.interceptors.request.forEach((function(e) { + "function" == typeof e.runWhen && !1 === e.runWhen(t) || (o = o && e.synchronous, + n.unshift(e.fulfilled, e.rejected)) + } + )); + var s, l = []; + if (this.interceptors.response.forEach((function(e) { + l.push(e.fulfilled, e.rejected) + } + )), + !o) { + var d = [i, void 0]; + for (Array.prototype.unshift.apply(d, n), + d = d.concat(l), + s = Promise.resolve(t); d.length; ) + s = s.then(d.shift(), d.shift()); + return s + } + for (var h = t; n.length; ) { + var p = n.shift() + , f = n.shift(); + try { + h = p(h) + } catch (e) { + f(e); + break + } + } + try { + s = i(h) + } catch (e) { + return Promise.reject(e) + } + for (; l.length; ) + s = s.then(l.shift(), l.shift()); + return s + } + , + l.prototype.getUri = function(e) { + return e = a(this.defaults, e), + o(e.url, e.params, e.paramsSerializer).replace(/^\?/, "") + } + , + n.forEach(["delete", "get", "head", "options"], (function(e) { + l.prototype[e] = function(t, r) { + return this.request(a(r || {}, { + method: e, + url: t, + data: (r || {}).data + })) + } + } + )), + n.forEach(["post", "put", "patch"], (function(e) { + l.prototype[e] = function(t, r, n) { + return this.request(a(n || {}, { + method: e, + url: t, + data: r + })) + } + } + )), + e.exports = l + } + , + 782: (e,t,r)=>{ + "use strict"; + var n = r(4867); + function o() { + this.handlers = [] + } + o.prototype.use = function(e, t, r) { + return this.handlers.push({ + fulfilled: e, + rejected: t, + synchronous: !!r && r.synchronous, + runWhen: r ? r.runWhen : null + }), + this.handlers.length - 1 + } + , + o.prototype.eject = function(e) { + this.handlers[e] && (this.handlers[e] = null) + } + , + o.prototype.forEach = function(e) { + n.forEach(this.handlers, (function(t) { + null !== t && e(t) + } + )) + } + , + e.exports = o + } + , + 4097: (e,t,r)=>{ + "use strict"; + var n = r(1793) + , o = r(7303); + e.exports = function(e, t) { + return e && !n(t) ? o(e, t) : t + } + } + , + 5061: (e,t,r)=>{ + "use strict"; + var n = r(481); + e.exports = function(e, t, r, o, s) { + var i = new Error(e); + return n(i, t, r, o, s) + } + } + , + 3572: (e,t,r)=>{ + "use strict"; + var n = r(4867) + , o = r(8527) + , s = r(6502) + , i = r(5546) + , a = r(5263); + function u(e) { + if (e.cancelToken && e.cancelToken.throwIfRequested(), + e.signal && e.signal.aborted) + throw new a("canceled") + } + e.exports = function(e) { + return u(e), + e.headers = e.headers || {}, + e.data = o.call(e, e.data, e.headers, e.transformRequest), + e.headers = n.merge(e.headers.common || {}, e.headers[e.method] || {}, e.headers), + n.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (function(t) { + delete e.headers[t] + } + )), + (e.adapter || i.adapter)(e).then((function(t) { + return u(e), + t.data = o.call(e, t.data, t.headers, e.transformResponse), + t + } + ), (function(t) { + return s(t) || (u(e), + t && t.response && (t.response.data = o.call(e, t.response.data, t.response.headers, e.transformResponse))), + Promise.reject(t) + } + )) + } + } + , + 481: e=>{ + "use strict"; + e.exports = function(e, t, r, n, o) { + return e.config = t, + r && (e.code = r), + e.request = n, + e.response = o, + e.isAxiosError = !0, + e.toJSON = function() { + return { + message: this.message, + name: this.name, + description: this.description, + number: this.number, + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + config: this.config, + code: this.code, + status: this.response && this.response.status ? this.response.status : null + } + } + , + e + } + } + , + 7185: (e,t,r)=>{ + "use strict"; + var n = r(4867); + e.exports = function(e, t) { + t = t || {}; + var r = {}; + function o(e, t) { + return n.isPlainObject(e) && n.isPlainObject(t) ? n.merge(e, t) : n.isPlainObject(t) ? n.merge({}, t) : n.isArray(t) ? t.slice() : t + } + function s(r) { + return n.isUndefined(t[r]) ? n.isUndefined(e[r]) ? void 0 : o(void 0, e[r]) : o(e[r], t[r]) + } + function i(e) { + if (!n.isUndefined(t[e])) + return o(void 0, t[e]) + } + function a(r) { + return n.isUndefined(t[r]) ? n.isUndefined(e[r]) ? void 0 : o(void 0, e[r]) : o(void 0, t[r]) + } + function u(r) { + return r in t ? o(e[r], t[r]) : r in e ? o(void 0, e[r]) : void 0 + } + var c = { + url: i, + method: i, + data: i, + baseURL: a, + transformRequest: a, + transformResponse: a, + paramsSerializer: a, + timeout: a, + timeoutMessage: a, + withCredentials: a, + adapter: a, + responseType: a, + xsrfCookieName: a, + xsrfHeaderName: a, + onUploadProgress: a, + onDownloadProgress: a, + decompress: a, + maxContentLength: a, + maxBodyLength: a, + transport: a, + httpAgent: a, + httpsAgent: a, + cancelToken: a, + socketPath: a, + responseEncoding: a, + validateStatus: u + }; + return n.forEach(Object.keys(e).concat(Object.keys(t)), (function(e) { + var t = c[e] || s + , o = t(e); + n.isUndefined(o) && t !== u || (r[e] = o) + } + )), + r + } + } + , + 6026: (e,t,r)=>{ + "use strict"; + var n = r(5061); + e.exports = function(e, t, r) { + var o = r.config.validateStatus; + r.status && o && !o(r.status) ? t(n("Request failed with status code " + r.status, r.config, null, r.request, r)) : e(r) + } + } + , + 8527: (e,t,r)=>{ + "use strict"; + var n = r(4867) + , o = r(5546); + e.exports = function(e, t, r) { + var s = this || o; + return n.forEach(r, (function(r) { + e = r.call(s, e, t) + } + )), + e + } + } + , + 5546: (e,t,r)=>{ + "use strict"; + var n = r(4867) + , o = r(6016) + , s = r(481) + , i = r(7874) + , a = { + "Content-Type": "application/x-www-form-urlencoded" + }; + function u(e, t) { + !n.isUndefined(e) && n.isUndefined(e["Content-Type"]) && (e["Content-Type"] = t) + } + var c, l = { + transitional: i, + adapter: (("undefined" != typeof XMLHttpRequest || "undefined" != typeof process && "[object process]" === Object.prototype.toString.call(process)) && (c = r(5448)), + c), + transformRequest: [function(e, t) { + return o(t, "Accept"), + o(t, "Content-Type"), + n.isFormData(e) || n.isArrayBuffer(e) || n.isBuffer(e) || n.isStream(e) || n.isFile(e) || n.isBlob(e) ? e : n.isArrayBufferView(e) ? e.buffer : n.isURLSearchParams(e) ? (u(t, "application/x-www-form-urlencoded;charset=utf-8"), + e.toString()) : n.isObject(e) || t && "application/json" === t["Content-Type"] ? (u(t, "application/json"), + function(e, t, r) { + if (n.isString(e)) + try { + return (0, + JSON.parse)(e), + n.trim(e) + } catch (e) { + if ("SyntaxError" !== e.name) + throw e + } + return (0, + JSON.stringify)(e) + }(e)) : e + } + ], + transformResponse: [function(e) { + var t = this.transitional || l.transitional + , r = t && t.silentJSONParsing + , o = t && t.forcedJSONParsing + , i = !r && "json" === this.responseType; + if (i || o && n.isString(e) && e.length) + try { + return JSON.parse(e) + } catch (e) { + if (i) { + if ("SyntaxError" === e.name) + throw s(e, this, "E_JSON_PARSE"); + throw e + } + } + return e + } + ], + timeout: 0, + xsrfCookieName: "XSRF-TOKEN", + xsrfHeaderName: "X-XSRF-TOKEN", + maxContentLength: -1, + maxBodyLength: -1, + validateStatus: function(e) { + return e >= 200 && e < 300 + }, + headers: { + common: { + Accept: "application/json, text/plain, */*" + } + } + }; + n.forEach(["delete", "get", "head"], (function(e) { + l.headers[e] = {} + } + )), + n.forEach(["post", "put", "patch"], (function(e) { + l.headers[e] = n.merge(a) + } + )), + e.exports = l + } + , + 7874: e=>{ + "use strict"; + e.exports = { + silentJSONParsing: !0, + forcedJSONParsing: !0, + clarifyTimeoutError: !1 + } + } + , + 7288: e=>{ + e.exports = { + version: "0.26.1" + } + } + , + 1849: e=>{ + "use strict"; + e.exports = function(e, t) { + return function() { + for (var r = new Array(arguments.length), n = 0; n < r.length; n++) + r[n] = arguments[n]; + return e.apply(t, r) + } + } + } + , + 5327: (e,t,r)=>{ + "use strict"; + var n = r(4867); + function o(e) { + return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]") + } + e.exports = function(e, t, r) { + if (!t) + return e; + var s; + if (r) + s = r(t); + else if (n.isURLSearchParams(t)) + s = t.toString(); + else { + var i = []; + n.forEach(t, (function(e, t) { + null != e && (n.isArray(e) ? t += "[]" : e = [e], + n.forEach(e, (function(e) { + n.isDate(e) ? e = e.toISOString() : n.isObject(e) && (e = JSON.stringify(e)), + i.push(o(t) + "=" + o(e)) + } + ))) + } + )), + s = i.join("&") + } + if (s) { + var a = e.indexOf("#"); + -1 !== a && (e = e.slice(0, a)), + e += (-1 === e.indexOf("?") ? "?" : "&") + s + } + return e + } + } + , + 7303: e=>{ + "use strict"; + e.exports = function(e, t) { + return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e + } + } + , + 4372: (e,t,r)=>{ + "use strict"; + var n = r(4867); + e.exports = n.isStandardBrowserEnv() ? { + write: function(e, t, r, o, s, i) { + var a = []; + a.push(e + "=" + encodeURIComponent(t)), + n.isNumber(r) && a.push("expires=" + new Date(r).toGMTString()), + n.isString(o) && a.push("path=" + o), + n.isString(s) && a.push("domain=" + s), + !0 === i && a.push("secure"), + document.cookie = a.join("; ") + }, + read: function(e) { + var t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); + return t ? decodeURIComponent(t[3]) : null + }, + remove: function(e) { + this.write(e, "", Date.now() - 864e5) + } + } : { + write: function() {}, + read: function() { + return null + }, + remove: function() {} + } + } + , + 1793: e=>{ + "use strict"; + e.exports = function(e) { + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e) + } + } + , + 6268: (e,t,r)=>{ + "use strict"; + var n = r(4867); + e.exports = function(e) { + return n.isObject(e) && !0 === e.isAxiosError + } + } + , + 7985: (e,t,r)=>{ + "use strict"; + var n = r(4867); + e.exports = n.isStandardBrowserEnv() ? function() { + var e, t = /(msie|trident)/i.test(navigator.userAgent), r = document.createElement("a"); + function o(e) { + var n = e; + return t && (r.setAttribute("href", n), + n = r.href), + r.setAttribute("href", n), + { + href: r.href, + protocol: r.protocol ? r.protocol.replace(/:$/, "") : "", + host: r.host, + search: r.search ? r.search.replace(/^\?/, "") : "", + hash: r.hash ? r.hash.replace(/^#/, "") : "", + hostname: r.hostname, + port: r.port, + pathname: "/" === r.pathname.charAt(0) ? r.pathname : "/" + r.pathname + } + } + return e = o(window.location.href), + function(t) { + var r = n.isString(t) ? o(t) : t; + return r.protocol === e.protocol && r.host === e.host + } + }() : function() { + return !0 + } + } + , + 6016: (e,t,r)=>{ + "use strict"; + var n = r(4867); + e.exports = function(e, t) { + n.forEach(e, (function(r, n) { + n !== t && n.toUpperCase() === t.toUpperCase() && (e[t] = r, + delete e[n]) + } + )) + } + } + , + 4109: (e,t,r)=>{ + "use strict"; + var n = r(4867) + , o = ["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]; + e.exports = function(e) { + var t, r, s, i = {}; + return e ? (n.forEach(e.split("\n"), (function(e) { + if (s = e.indexOf(":"), + t = n.trim(e.substr(0, s)).toLowerCase(), + r = n.trim(e.substr(s + 1)), + t) { + if (i[t] && o.indexOf(t) >= 0) + return; + i[t] = "set-cookie" === t ? (i[t] ? i[t] : []).concat([r]) : i[t] ? i[t] + ", " + r : r + } + } + )), + i) : i + } + } + , + 8713: e=>{ + "use strict"; + e.exports = function(e) { + return function(t) { + return e.apply(null, t) + } + } + } + , + 4875: (e,t,r)=>{ + "use strict"; + var n = r(7288).version + , o = {}; + ["object", "boolean", "number", "function", "string", "symbol"].forEach((function(e, t) { + o[e] = function(r) { + return typeof r === e || "a" + (t < 1 ? "n " : " ") + e + } + } + )); + var s = {}; + o.transitional = function(e, t, r) { + function o(e, t) { + return "[Axios v" + n + "] Transitional option '" + e + "'" + t + (r ? ". " + r : "") + } + return function(r, n, i) { + if (!1 === e) + throw new Error(o(n, " has been removed" + (t ? " in " + t : ""))); + return t && !s[n] && (s[n] = !0, + console.warn(o(n, " has been deprecated since v" + t + " and will be removed in the near future"))), + !e || e(r, n, i) + } + } + , + e.exports = { + assertOptions: function(e, t, r) { + if ("object" != typeof e) + throw new TypeError("options must be an object"); + for (var n = Object.keys(e), o = n.length; o-- > 0; ) { + var s = n[o] + , i = t[s]; + if (i) { + var a = e[s] + , u = void 0 === a || i(a, s, e); + if (!0 !== u) + throw new TypeError("option " + s + " must be " + u) + } else if (!0 !== r) + throw Error("Unknown option " + s) + } + }, + validators: o + } + } + , + 4867: (e,t,r)=>{ + "use strict"; + var n = r(1849) + , o = Object.prototype.toString; + function s(e) { + return Array.isArray(e) + } + function i(e) { + return void 0 === e + } + function a(e) { + return "[object ArrayBuffer]" === o.call(e) + } + function u(e) { + return null !== e && "object" == typeof e + } + function c(e) { + if ("[object Object]" !== o.call(e)) + return !1; + var t = Object.getPrototypeOf(e); + return null === t || t === Object.prototype + } + function l(e) { + return "[object Function]" === o.call(e) + } + function d(e, t) { + if (null != e) + if ("object" != typeof e && (e = [e]), + s(e)) + for (var r = 0, n = e.length; r < n; r++) + t.call(null, e[r], r, e); + else + for (var o in e) + Object.prototype.hasOwnProperty.call(e, o) && t.call(null, e[o], o, e) + } + e.exports = { + isArray: s, + isArrayBuffer: a, + isBuffer: function(e) { + return null !== e && !i(e) && null !== e.constructor && !i(e.constructor) && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e) + }, + isFormData: function(e) { + return "[object FormData]" === o.call(e) + }, + isArrayBufferView: function(e) { + return "undefined" != typeof ArrayBuffer && ArrayBuffer.isView ? ArrayBuffer.isView(e) : e && e.buffer && a(e.buffer) + }, + isString: function(e) { + return "string" == typeof e + }, + isNumber: function(e) { + return "number" == typeof e + }, + isObject: u, + isPlainObject: c, + isUndefined: i, + isDate: function(e) { + return "[object Date]" === o.call(e) + }, + isFile: function(e) { + return "[object File]" === o.call(e) + }, + isBlob: function(e) { + return "[object Blob]" === o.call(e) + }, + isFunction: l, + isStream: function(e) { + return u(e) && l(e.pipe) + }, + isURLSearchParams: function(e) { + return "[object URLSearchParams]" === o.call(e) + }, + isStandardBrowserEnv: function() { + return ("undefined" == typeof navigator || "ReactNative" !== navigator.product && "NativeScript" !== navigator.product && "NS" !== navigator.product) && "undefined" != typeof window && "undefined" != typeof document + }, + forEach: d, + merge: function e() { + var t = {}; + function r(r, n) { + c(t[n]) && c(r) ? t[n] = e(t[n], r) : c(r) ? t[n] = e({}, r) : s(r) ? t[n] = r.slice() : t[n] = r + } + for (var n = 0, o = arguments.length; n < o; n++) + d(arguments[n], r); + return t + }, + extend: function(e, t, r) { + return d(t, (function(t, o) { + e[o] = r && "function" == typeof t ? n(t, r) : t + } + )), + e + }, + trim: function(e) { + return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "") + }, + stripBOM: function(e) { + return 65279 === e.charCodeAt(0) && (e = e.slice(1)), + e + } + } + } + , + 8020: (e,t,r)=>{ + var n = r(5595) + , o = n + , s = "undefined" != typeof globalThis && globalThis || "undefined" != typeof window && window || void 0 !== s && s || "undefined" != typeof self && self || function() { + return this + } + .call(null) || Function("return this")() + , i = r(6177); + o.object.extend(proto, i), + o.exportSymbol("TronWebProto.Account", null, s), + o.exportSymbol("TronWebProto.Account.AccountResource", null, s), + o.exportSymbol("TronWebProto.Account.Frozen", null, s), + o.exportSymbol("TronWebProto.AccountId", null, s), + o.exportSymbol("TronWebProto.AccountType", null, s), + o.exportSymbol("TronWebProto.DelegatedResource", null, s), + o.exportSymbol("TronWebProto.Exchange", null, s), + o.exportSymbol("TronWebProto.Key", null, s), + o.exportSymbol("TronWebProto.MarketOrderDetail", null, s), + o.exportSymbol("TronWebProto.Permission", null, s), + o.exportSymbol("TronWebProto.Permission.PermissionType", null, s), + o.exportSymbol("TronWebProto.Proposal", null, s), + o.exportSymbol("TronWebProto.Proposal.State", null, s), + o.exportSymbol("TronWebProto.Transaction", null, s), + o.exportSymbol("TronWebProto.Transaction.Contract", null, s), + o.exportSymbol("TronWebProto.Transaction.Contract.ContractType", null, s), + o.exportSymbol("TronWebProto.Transaction.Result", null, s), + o.exportSymbol("TronWebProto.Transaction.Result.code", null, s), + o.exportSymbol("TronWebProto.Transaction.Result.contractResult", null, s), + o.exportSymbol("TronWebProto.Transaction.raw", null, s), + o.exportSymbol("TronWebProto.Vote", null, s), + o.exportSymbol("TronWebProto.Votes", null, s), + o.exportSymbol("TronWebProto.Witness", null, s), + o.exportSymbol("TronWebProto.authority", null, s), + TronWebProto.AccountId = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.AccountId, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.AccountId.displayName = "TronWebProto.AccountId"), + TronWebProto.Vote = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.Vote, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Vote.displayName = "TronWebProto.Vote"), + TronWebProto.Proposal = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.Proposal.repeatedFields_, null) + } + , + o.inherits(TronWebProto.Proposal, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Proposal.displayName = "TronWebProto.Proposal"), + TronWebProto.Exchange = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.Exchange, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Exchange.displayName = "TronWebProto.Exchange"), + TronWebProto.Account = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.Account.repeatedFields_, null) + } + , + o.inherits(TronWebProto.Account, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Account.displayName = "TronWebProto.Account"), + TronWebProto.Account.Frozen = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.Account.Frozen, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Account.Frozen.displayName = "TronWebProto.Account.Frozen"), + TronWebProto.Account.AccountResource = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.Account.AccountResource, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Account.AccountResource.displayName = "TronWebProto.Account.AccountResource"), + TronWebProto.Key = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.Key, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Key.displayName = "TronWebProto.Key"), + TronWebProto.DelegatedResource = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.DelegatedResource, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.DelegatedResource.displayName = "TronWebProto.DelegatedResource"), + TronWebProto.authority = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.authority, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.authority.displayName = "TronWebProto.authority"), + TronWebProto.Permission = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.Permission.repeatedFields_, null) + } + , + o.inherits(TronWebProto.Permission, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Permission.displayName = "TronWebProto.Permission"), + TronWebProto.Witness = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.Witness, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Witness.displayName = "TronWebProto.Witness"), + TronWebProto.Votes = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.Votes.repeatedFields_, null) + } + , + o.inherits(TronWebProto.Votes, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Votes.displayName = "TronWebProto.Votes"), + TronWebProto.MarketOrderDetail = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.MarketOrderDetail, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.MarketOrderDetail.displayName = "TronWebProto.MarketOrderDetail"), + TronWebProto.Transaction = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.Transaction.repeatedFields_, null) + } + , + o.inherits(TronWebProto.Transaction, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Transaction.displayName = "TronWebProto.Transaction"), + TronWebProto.Transaction.Contract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.Transaction.Contract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Transaction.Contract.displayName = "TronWebProto.Transaction.Contract"), + TronWebProto.Transaction.Result = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.Transaction.Result.repeatedFields_, null) + } + , + o.inherits(TronWebProto.Transaction.Result, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Transaction.Result.displayName = "TronWebProto.Transaction.Result"), + TronWebProto.Transaction.raw = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.Transaction.raw.repeatedFields_, null) + } + , + o.inherits(TronWebProto.Transaction.raw, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.Transaction.raw.displayName = "TronWebProto.Transaction.raw"), + n.Message.GENERATE_TO_OBJECT && (TronWebProto.AccountId.prototype.toObject = function(e) { + return TronWebProto.AccountId.toObject(e, this) + } + , + TronWebProto.AccountId.toObject = function(e, t) { + var r = { + name: t.getName_asB64(), + address: t.getAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.AccountId.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.AccountId; + return TronWebProto.AccountId.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.AccountId.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setName(r); + break; + case 2: + r = t.readBytes(), + e.setAddress(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.AccountId.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.AccountId.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.AccountId.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getName_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getAddress_asU8()).length > 0 && t.writeBytes(2, r) + } + , + TronWebProto.AccountId.prototype.getName = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.AccountId.prototype.getName_asB64 = function() { + return n.Message.bytesAsB64(this.getName()) + } + , + TronWebProto.AccountId.prototype.getName_asU8 = function() { + return n.Message.bytesAsU8(this.getName()) + } + , + TronWebProto.AccountId.prototype.setName = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.AccountId.prototype.getAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.AccountId.prototype.getAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getAddress()) + } + , + TronWebProto.AccountId.prototype.getAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getAddress()) + } + , + TronWebProto.AccountId.prototype.setAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Vote.prototype.toObject = function(e) { + return TronWebProto.Vote.toObject(e, this) + } + , + TronWebProto.Vote.toObject = function(e, t) { + var r = { + voteAddress: t.getVoteAddress_asB64(), + voteCount: n.Message.getFieldWithDefault(t, 2, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.Vote.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Vote; + return TronWebProto.Vote.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Vote.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setVoteAddress(r); + break; + case 2: + r = t.readInt64(), + e.setVoteCount(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Vote.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Vote.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Vote.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getVoteAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getVoteCount()) && t.writeInt64(2, r) + } + , + TronWebProto.Vote.prototype.getVoteAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.Vote.prototype.getVoteAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getVoteAddress()) + } + , + TronWebProto.Vote.prototype.getVoteAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getVoteAddress()) + } + , + TronWebProto.Vote.prototype.setVoteAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.Vote.prototype.getVoteCount = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.Vote.prototype.setVoteCount = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.Proposal.repeatedFields_ = [6], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Proposal.prototype.toObject = function(e) { + return TronWebProto.Proposal.toObject(e, this) + } + , + TronWebProto.Proposal.toObject = function(e, t) { + var r, o = { + proposalId: n.Message.getFieldWithDefault(t, 1, 0), + proposerAddress: t.getProposerAddress_asB64(), + parametersMap: (r = t.getParametersMap()) ? r.toObject(e, void 0) : [], + expirationTime: n.Message.getFieldWithDefault(t, 4, 0), + createTime: n.Message.getFieldWithDefault(t, 5, 0), + approvalsList: t.getApprovalsList_asB64(), + state: n.Message.getFieldWithDefault(t, 7, 0) + }; + return e && (o.$jspbMessageInstance = t), + o + } + ), + TronWebProto.Proposal.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Proposal; + return TronWebProto.Proposal.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Proposal.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readInt64(); + e.setProposalId(r); + break; + case 2: + r = t.readBytes(), + e.setProposerAddress(r); + break; + case 3: + r = e.getParametersMap(), + t.readMessage(r, (function(e, t) { + n.Map.deserializeBinary(e, t, n.BinaryReader.prototype.readInt64, n.BinaryReader.prototype.readInt64, null, 0, 0) + } + )); + break; + case 4: + r = t.readInt64(), + e.setExpirationTime(r); + break; + case 5: + r = t.readInt64(), + e.setCreateTime(r); + break; + case 6: + r = t.readBytes(), + e.addApprovals(r); + break; + case 7: + r = t.readEnum(), + e.setState(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Proposal.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Proposal.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Proposal.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getProposalId()) && t.writeInt64(1, r), + (r = e.getProposerAddress_asU8()).length > 0 && t.writeBytes(2, r), + (r = e.getParametersMap(!0)) && r.getLength() > 0 && r.serializeBinary(3, t, n.BinaryWriter.prototype.writeInt64, n.BinaryWriter.prototype.writeInt64), + 0 !== (r = e.getExpirationTime()) && t.writeInt64(4, r), + 0 !== (r = e.getCreateTime()) && t.writeInt64(5, r), + (r = e.getApprovalsList_asU8()).length > 0 && t.writeRepeatedBytes(6, r), + 0 !== (r = e.getState()) && t.writeEnum(7, r) + } + , + TronWebProto.Proposal.State = { + PENDING: 0, + DISAPPROVED: 1, + APPROVED: 2, + CANCELED: 3 + }, + TronWebProto.Proposal.prototype.getProposalId = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.Proposal.prototype.setProposalId = function(e) { + return n.Message.setProto3IntField(this, 1, e) + } + , + TronWebProto.Proposal.prototype.getProposerAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.Proposal.prototype.getProposerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getProposerAddress()) + } + , + TronWebProto.Proposal.prototype.getProposerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getProposerAddress()) + } + , + TronWebProto.Proposal.prototype.setProposerAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.Proposal.prototype.getParametersMap = function(e) { + return n.Message.getMapField(this, 3, e, null) + } + , + TronWebProto.Proposal.prototype.clearParametersMap = function() { + return this.getParametersMap().clear(), + this + } + , + TronWebProto.Proposal.prototype.getExpirationTime = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.Proposal.prototype.setExpirationTime = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + TronWebProto.Proposal.prototype.getCreateTime = function() { + return n.Message.getFieldWithDefault(this, 5, 0) + } + , + TronWebProto.Proposal.prototype.setCreateTime = function(e) { + return n.Message.setProto3IntField(this, 5, e) + } + , + TronWebProto.Proposal.prototype.getApprovalsList = function() { + return n.Message.getRepeatedField(this, 6) + } + , + TronWebProto.Proposal.prototype.getApprovalsList_asB64 = function() { + return n.Message.bytesListAsB64(this.getApprovalsList()) + } + , + TronWebProto.Proposal.prototype.getApprovalsList_asU8 = function() { + return n.Message.bytesListAsU8(this.getApprovalsList()) + } + , + TronWebProto.Proposal.prototype.setApprovalsList = function(e) { + return n.Message.setField(this, 6, e || []) + } + , + TronWebProto.Proposal.prototype.addApprovals = function(e, t) { + return n.Message.addToRepeatedField(this, 6, e, t) + } + , + TronWebProto.Proposal.prototype.clearApprovalsList = function() { + return this.setApprovalsList([]) + } + , + TronWebProto.Proposal.prototype.getState = function() { + return n.Message.getFieldWithDefault(this, 7, 0) + } + , + TronWebProto.Proposal.prototype.setState = function(e) { + return n.Message.setProto3EnumField(this, 7, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Exchange.prototype.toObject = function(e) { + return TronWebProto.Exchange.toObject(e, this) + } + , + TronWebProto.Exchange.toObject = function(e, t) { + var r = { + exchangeId: n.Message.getFieldWithDefault(t, 1, 0), + creatorAddress: t.getCreatorAddress_asB64(), + createTime: n.Message.getFieldWithDefault(t, 3, 0), + firstTokenId: t.getFirstTokenId_asB64(), + firstTokenBalance: n.Message.getFieldWithDefault(t, 7, 0), + secondTokenId: t.getSecondTokenId_asB64(), + secondTokenBalance: n.Message.getFieldWithDefault(t, 9, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.Exchange.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Exchange; + return TronWebProto.Exchange.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Exchange.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readInt64(); + e.setExchangeId(r); + break; + case 2: + r = t.readBytes(), + e.setCreatorAddress(r); + break; + case 3: + r = t.readInt64(), + e.setCreateTime(r); + break; + case 6: + r = t.readBytes(), + e.setFirstTokenId(r); + break; + case 7: + r = t.readInt64(), + e.setFirstTokenBalance(r); + break; + case 8: + r = t.readBytes(), + e.setSecondTokenId(r); + break; + case 9: + r = t.readInt64(), + e.setSecondTokenBalance(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Exchange.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Exchange.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Exchange.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getExchangeId()) && t.writeInt64(1, r), + (r = e.getCreatorAddress_asU8()).length > 0 && t.writeBytes(2, r), + 0 !== (r = e.getCreateTime()) && t.writeInt64(3, r), + (r = e.getFirstTokenId_asU8()).length > 0 && t.writeBytes(6, r), + 0 !== (r = e.getFirstTokenBalance()) && t.writeInt64(7, r), + (r = e.getSecondTokenId_asU8()).length > 0 && t.writeBytes(8, r), + 0 !== (r = e.getSecondTokenBalance()) && t.writeInt64(9, r) + } + , + TronWebProto.Exchange.prototype.getExchangeId = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.Exchange.prototype.setExchangeId = function(e) { + return n.Message.setProto3IntField(this, 1, e) + } + , + TronWebProto.Exchange.prototype.getCreatorAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.Exchange.prototype.getCreatorAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getCreatorAddress()) + } + , + TronWebProto.Exchange.prototype.getCreatorAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getCreatorAddress()) + } + , + TronWebProto.Exchange.prototype.setCreatorAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.Exchange.prototype.getCreateTime = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.Exchange.prototype.setCreateTime = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.Exchange.prototype.getFirstTokenId = function() { + return n.Message.getFieldWithDefault(this, 6, "") + } + , + TronWebProto.Exchange.prototype.getFirstTokenId_asB64 = function() { + return n.Message.bytesAsB64(this.getFirstTokenId()) + } + , + TronWebProto.Exchange.prototype.getFirstTokenId_asU8 = function() { + return n.Message.bytesAsU8(this.getFirstTokenId()) + } + , + TronWebProto.Exchange.prototype.setFirstTokenId = function(e) { + return n.Message.setProto3BytesField(this, 6, e) + } + , + TronWebProto.Exchange.prototype.getFirstTokenBalance = function() { + return n.Message.getFieldWithDefault(this, 7, 0) + } + , + TronWebProto.Exchange.prototype.setFirstTokenBalance = function(e) { + return n.Message.setProto3IntField(this, 7, e) + } + , + TronWebProto.Exchange.prototype.getSecondTokenId = function() { + return n.Message.getFieldWithDefault(this, 8, "") + } + , + TronWebProto.Exchange.prototype.getSecondTokenId_asB64 = function() { + return n.Message.bytesAsB64(this.getSecondTokenId()) + } + , + TronWebProto.Exchange.prototype.getSecondTokenId_asU8 = function() { + return n.Message.bytesAsU8(this.getSecondTokenId()) + } + , + TronWebProto.Exchange.prototype.setSecondTokenId = function(e) { + return n.Message.setProto3BytesField(this, 8, e) + } + , + TronWebProto.Exchange.prototype.getSecondTokenBalance = function() { + return n.Message.getFieldWithDefault(this, 9, 0) + } + , + TronWebProto.Exchange.prototype.setSecondTokenBalance = function(e) { + return n.Message.setProto3IntField(this, 9, e) + } + , + TronWebProto.Account.repeatedFields_ = [5, 7, 16, 33], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Account.prototype.toObject = function(e) { + return TronWebProto.Account.toObject(e, this) + } + , + TronWebProto.Account.toObject = function(e, t) { + var r, o = { + accountName: t.getAccountName_asB64(), + type: n.Message.getFieldWithDefault(t, 2, 0), + address: t.getAddress_asB64(), + balance: n.Message.getFieldWithDefault(t, 4, 0), + votesList: n.Message.toObjectList(t.getVotesList(), TronWebProto.Vote.toObject, e), + assetMap: (r = t.getAssetMap()) ? r.toObject(e, void 0) : [], + assetv2Map: (r = t.getAssetv2Map()) ? r.toObject(e, void 0) : [], + frozenList: n.Message.toObjectList(t.getFrozenList(), TronWebProto.Account.Frozen.toObject, e), + netUsage: n.Message.getFieldWithDefault(t, 8, 0), + acquiredDelegatedFrozenBalanceForBandwidth: n.Message.getFieldWithDefault(t, 41, 0), + delegatedFrozenBalanceForBandwidth: n.Message.getFieldWithDefault(t, 42, 0), + oldTronPower: n.Message.getFieldWithDefault(t, 46, 0), + tronPower: (r = t.getTronPower()) && TronWebProto.Account.Frozen.toObject(e, r), + assetOptimized: n.Message.getBooleanFieldWithDefault(t, 60, !1), + createTime: n.Message.getFieldWithDefault(t, 9, 0), + latestOprationTime: n.Message.getFieldWithDefault(t, 10, 0), + allowance: n.Message.getFieldWithDefault(t, 11, 0), + latestWithdrawTime: n.Message.getFieldWithDefault(t, 12, 0), + code: t.getCode_asB64(), + isWitness: n.Message.getBooleanFieldWithDefault(t, 14, !1), + isCommittee: n.Message.getBooleanFieldWithDefault(t, 15, !1), + frozenSupplyList: n.Message.toObjectList(t.getFrozenSupplyList(), TronWebProto.Account.Frozen.toObject, e), + assetIssuedName: t.getAssetIssuedName_asB64(), + assetIssuedId: t.getAssetIssuedId_asB64(), + latestAssetOperationTimeMap: (r = t.getLatestAssetOperationTimeMap()) ? r.toObject(e, void 0) : [], + latestAssetOperationTimev2Map: (r = t.getLatestAssetOperationTimev2Map()) ? r.toObject(e, void 0) : [], + freeNetUsage: n.Message.getFieldWithDefault(t, 19, 0), + freeAssetNetUsageMap: (r = t.getFreeAssetNetUsageMap()) ? r.toObject(e, void 0) : [], + freeAssetNetUsagev2Map: (r = t.getFreeAssetNetUsagev2Map()) ? r.toObject(e, void 0) : [], + latestConsumeTime: n.Message.getFieldWithDefault(t, 21, 0), + latestConsumeFreeTime: n.Message.getFieldWithDefault(t, 22, 0), + accountId: t.getAccountId_asB64(), + accountResource: (r = t.getAccountResource()) && TronWebProto.Account.AccountResource.toObject(e, r), + codehash: t.getCodehash_asB64(), + ownerPermission: (r = t.getOwnerPermission()) && TronWebProto.Permission.toObject(e, r), + witnessPermission: (r = t.getWitnessPermission()) && TronWebProto.Permission.toObject(e, r), + activePermissionList: n.Message.toObjectList(t.getActivePermissionList(), TronWebProto.Permission.toObject, e) + }; + return e && (o.$jspbMessageInstance = t), + o + } + ), + TronWebProto.Account.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Account; + return TronWebProto.Account.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Account.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setAccountName(r); + break; + case 2: + r = t.readEnum(), + e.setType(r); + break; + case 3: + r = t.readBytes(), + e.setAddress(r); + break; + case 4: + r = t.readInt64(), + e.setBalance(r); + break; + case 5: + r = new TronWebProto.Vote, + t.readMessage(r, TronWebProto.Vote.deserializeBinaryFromReader), + e.addVotes(r); + break; + case 6: + r = e.getAssetMap(), + t.readMessage(r, (function(e, t) { + n.Map.deserializeBinary(e, t, n.BinaryReader.prototype.readString, n.BinaryReader.prototype.readInt64, null, "", 0) + } + )); + break; + case 56: + r = e.getAssetv2Map(), + t.readMessage(r, (function(e, t) { + n.Map.deserializeBinary(e, t, n.BinaryReader.prototype.readString, n.BinaryReader.prototype.readInt64, null, "", 0) + } + )); + break; + case 7: + r = new TronWebProto.Account.Frozen, + t.readMessage(r, TronWebProto.Account.Frozen.deserializeBinaryFromReader), + e.addFrozen(r); + break; + case 8: + r = t.readInt64(), + e.setNetUsage(r); + break; + case 41: + r = t.readInt64(), + e.setAcquiredDelegatedFrozenBalanceForBandwidth(r); + break; + case 42: + r = t.readInt64(), + e.setDelegatedFrozenBalanceForBandwidth(r); + break; + case 46: + r = t.readInt64(), + e.setOldTronPower(r); + break; + case 47: + r = new TronWebProto.Account.Frozen, + t.readMessage(r, TronWebProto.Account.Frozen.deserializeBinaryFromReader), + e.setTronPower(r); + break; + case 60: + r = t.readBool(), + e.setAssetOptimized(r); + break; + case 9: + r = t.readInt64(), + e.setCreateTime(r); + break; + case 10: + r = t.readInt64(), + e.setLatestOprationTime(r); + break; + case 11: + r = t.readInt64(), + e.setAllowance(r); + break; + case 12: + r = t.readInt64(), + e.setLatestWithdrawTime(r); + break; + case 13: + r = t.readBytes(), + e.setCode(r); + break; + case 14: + r = t.readBool(), + e.setIsWitness(r); + break; + case 15: + r = t.readBool(), + e.setIsCommittee(r); + break; + case 16: + r = new TronWebProto.Account.Frozen, + t.readMessage(r, TronWebProto.Account.Frozen.deserializeBinaryFromReader), + e.addFrozenSupply(r); + break; + case 17: + r = t.readBytes(), + e.setAssetIssuedName(r); + break; + case 57: + r = t.readBytes(), + e.setAssetIssuedId(r); + break; + case 18: + r = e.getLatestAssetOperationTimeMap(), + t.readMessage(r, (function(e, t) { + n.Map.deserializeBinary(e, t, n.BinaryReader.prototype.readString, n.BinaryReader.prototype.readInt64, null, "", 0) + } + )); + break; + case 58: + r = e.getLatestAssetOperationTimev2Map(), + t.readMessage(r, (function(e, t) { + n.Map.deserializeBinary(e, t, n.BinaryReader.prototype.readString, n.BinaryReader.prototype.readInt64, null, "", 0) + } + )); + break; + case 19: + r = t.readInt64(), + e.setFreeNetUsage(r); + break; + case 20: + r = e.getFreeAssetNetUsageMap(), + t.readMessage(r, (function(e, t) { + n.Map.deserializeBinary(e, t, n.BinaryReader.prototype.readString, n.BinaryReader.prototype.readInt64, null, "", 0) + } + )); + break; + case 59: + r = e.getFreeAssetNetUsagev2Map(), + t.readMessage(r, (function(e, t) { + n.Map.deserializeBinary(e, t, n.BinaryReader.prototype.readString, n.BinaryReader.prototype.readInt64, null, "", 0) + } + )); + break; + case 21: + r = t.readInt64(), + e.setLatestConsumeTime(r); + break; + case 22: + r = t.readInt64(), + e.setLatestConsumeFreeTime(r); + break; + case 23: + r = t.readBytes(), + e.setAccountId(r); + break; + case 26: + r = new TronWebProto.Account.AccountResource, + t.readMessage(r, TronWebProto.Account.AccountResource.deserializeBinaryFromReader), + e.setAccountResource(r); + break; + case 30: + r = t.readBytes(), + e.setCodehash(r); + break; + case 31: + r = new TronWebProto.Permission, + t.readMessage(r, TronWebProto.Permission.deserializeBinaryFromReader), + e.setOwnerPermission(r); + break; + case 32: + r = new TronWebProto.Permission, + t.readMessage(r, TronWebProto.Permission.deserializeBinaryFromReader), + e.setWitnessPermission(r); + break; + case 33: + r = new TronWebProto.Permission, + t.readMessage(r, TronWebProto.Permission.deserializeBinaryFromReader), + e.addActivePermission(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Account.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Account.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Account.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getAccountName_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getType()) && t.writeEnum(2, r), + (r = e.getAddress_asU8()).length > 0 && t.writeBytes(3, r), + 0 !== (r = e.getBalance()) && t.writeInt64(4, r), + (r = e.getVotesList()).length > 0 && t.writeRepeatedMessage(5, r, TronWebProto.Vote.serializeBinaryToWriter), + (r = e.getAssetMap(!0)) && r.getLength() > 0 && r.serializeBinary(6, t, n.BinaryWriter.prototype.writeString, n.BinaryWriter.prototype.writeInt64), + (r = e.getAssetv2Map(!0)) && r.getLength() > 0 && r.serializeBinary(56, t, n.BinaryWriter.prototype.writeString, n.BinaryWriter.prototype.writeInt64), + (r = e.getFrozenList()).length > 0 && t.writeRepeatedMessage(7, r, TronWebProto.Account.Frozen.serializeBinaryToWriter), + 0 !== (r = e.getNetUsage()) && t.writeInt64(8, r), + 0 !== (r = e.getAcquiredDelegatedFrozenBalanceForBandwidth()) && t.writeInt64(41, r), + 0 !== (r = e.getDelegatedFrozenBalanceForBandwidth()) && t.writeInt64(42, r), + 0 !== (r = e.getOldTronPower()) && t.writeInt64(46, r), + null != (r = e.getTronPower()) && t.writeMessage(47, r, TronWebProto.Account.Frozen.serializeBinaryToWriter), + (r = e.getAssetOptimized()) && t.writeBool(60, r), + 0 !== (r = e.getCreateTime()) && t.writeInt64(9, r), + 0 !== (r = e.getLatestOprationTime()) && t.writeInt64(10, r), + 0 !== (r = e.getAllowance()) && t.writeInt64(11, r), + 0 !== (r = e.getLatestWithdrawTime()) && t.writeInt64(12, r), + (r = e.getCode_asU8()).length > 0 && t.writeBytes(13, r), + (r = e.getIsWitness()) && t.writeBool(14, r), + (r = e.getIsCommittee()) && t.writeBool(15, r), + (r = e.getFrozenSupplyList()).length > 0 && t.writeRepeatedMessage(16, r, TronWebProto.Account.Frozen.serializeBinaryToWriter), + (r = e.getAssetIssuedName_asU8()).length > 0 && t.writeBytes(17, r), + (r = e.getAssetIssuedId_asU8()).length > 0 && t.writeBytes(57, r), + (r = e.getLatestAssetOperationTimeMap(!0)) && r.getLength() > 0 && r.serializeBinary(18, t, n.BinaryWriter.prototype.writeString, n.BinaryWriter.prototype.writeInt64), + (r = e.getLatestAssetOperationTimev2Map(!0)) && r.getLength() > 0 && r.serializeBinary(58, t, n.BinaryWriter.prototype.writeString, n.BinaryWriter.prototype.writeInt64), + 0 !== (r = e.getFreeNetUsage()) && t.writeInt64(19, r), + (r = e.getFreeAssetNetUsageMap(!0)) && r.getLength() > 0 && r.serializeBinary(20, t, n.BinaryWriter.prototype.writeString, n.BinaryWriter.prototype.writeInt64), + (r = e.getFreeAssetNetUsagev2Map(!0)) && r.getLength() > 0 && r.serializeBinary(59, t, n.BinaryWriter.prototype.writeString, n.BinaryWriter.prototype.writeInt64), + 0 !== (r = e.getLatestConsumeTime()) && t.writeInt64(21, r), + 0 !== (r = e.getLatestConsumeFreeTime()) && t.writeInt64(22, r), + (r = e.getAccountId_asU8()).length > 0 && t.writeBytes(23, r), + null != (r = e.getAccountResource()) && t.writeMessage(26, r, TronWebProto.Account.AccountResource.serializeBinaryToWriter), + (r = e.getCodehash_asU8()).length > 0 && t.writeBytes(30, r), + null != (r = e.getOwnerPermission()) && t.writeMessage(31, r, TronWebProto.Permission.serializeBinaryToWriter), + null != (r = e.getWitnessPermission()) && t.writeMessage(32, r, TronWebProto.Permission.serializeBinaryToWriter), + (r = e.getActivePermissionList()).length > 0 && t.writeRepeatedMessage(33, r, TronWebProto.Permission.serializeBinaryToWriter) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Account.Frozen.prototype.toObject = function(e) { + return TronWebProto.Account.Frozen.toObject(e, this) + } + , + TronWebProto.Account.Frozen.toObject = function(e, t) { + var r = { + frozenBalance: n.Message.getFieldWithDefault(t, 1, 0), + expireTime: n.Message.getFieldWithDefault(t, 2, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.Account.Frozen.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Account.Frozen; + return TronWebProto.Account.Frozen.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Account.Frozen.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readInt64(); + e.setFrozenBalance(r); + break; + case 2: + r = t.readInt64(), + e.setExpireTime(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Account.Frozen.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Account.Frozen.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Account.Frozen.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getFrozenBalance()) && t.writeInt64(1, r), + 0 !== (r = e.getExpireTime()) && t.writeInt64(2, r) + } + , + TronWebProto.Account.Frozen.prototype.getFrozenBalance = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.Account.Frozen.prototype.setFrozenBalance = function(e) { + return n.Message.setProto3IntField(this, 1, e) + } + , + TronWebProto.Account.Frozen.prototype.getExpireTime = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.Account.Frozen.prototype.setExpireTime = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Account.AccountResource.prototype.toObject = function(e) { + return TronWebProto.Account.AccountResource.toObject(e, this) + } + , + TronWebProto.Account.AccountResource.toObject = function(e, t) { + var r, o = { + energyUsage: n.Message.getFieldWithDefault(t, 1, 0), + frozenBalanceForEnergy: (r = t.getFrozenBalanceForEnergy()) && TronWebProto.Account.Frozen.toObject(e, r), + latestConsumeTimeForEnergy: n.Message.getFieldWithDefault(t, 3, 0), + acquiredDelegatedFrozenBalanceForEnergy: n.Message.getFieldWithDefault(t, 4, 0), + delegatedFrozenBalanceForEnergy: n.Message.getFieldWithDefault(t, 5, 0), + storageLimit: n.Message.getFieldWithDefault(t, 6, 0), + storageUsage: n.Message.getFieldWithDefault(t, 7, 0), + latestExchangeStorageTime: n.Message.getFieldWithDefault(t, 8, 0) + }; + return e && (o.$jspbMessageInstance = t), + o + } + ), + TronWebProto.Account.AccountResource.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Account.AccountResource; + return TronWebProto.Account.AccountResource.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Account.AccountResource.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readInt64(); + e.setEnergyUsage(r); + break; + case 2: + r = new TronWebProto.Account.Frozen, + t.readMessage(r, TronWebProto.Account.Frozen.deserializeBinaryFromReader), + e.setFrozenBalanceForEnergy(r); + break; + case 3: + r = t.readInt64(), + e.setLatestConsumeTimeForEnergy(r); + break; + case 4: + r = t.readInt64(), + e.setAcquiredDelegatedFrozenBalanceForEnergy(r); + break; + case 5: + r = t.readInt64(), + e.setDelegatedFrozenBalanceForEnergy(r); + break; + case 6: + r = t.readInt64(), + e.setStorageLimit(r); + break; + case 7: + r = t.readInt64(), + e.setStorageUsage(r); + break; + case 8: + r = t.readInt64(), + e.setLatestExchangeStorageTime(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Account.AccountResource.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Account.AccountResource.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Account.AccountResource.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getEnergyUsage()) && t.writeInt64(1, r), + null != (r = e.getFrozenBalanceForEnergy()) && t.writeMessage(2, r, TronWebProto.Account.Frozen.serializeBinaryToWriter), + 0 !== (r = e.getLatestConsumeTimeForEnergy()) && t.writeInt64(3, r), + 0 !== (r = e.getAcquiredDelegatedFrozenBalanceForEnergy()) && t.writeInt64(4, r), + 0 !== (r = e.getDelegatedFrozenBalanceForEnergy()) && t.writeInt64(5, r), + 0 !== (r = e.getStorageLimit()) && t.writeInt64(6, r), + 0 !== (r = e.getStorageUsage()) && t.writeInt64(7, r), + 0 !== (r = e.getLatestExchangeStorageTime()) && t.writeInt64(8, r) + } + , + TronWebProto.Account.AccountResource.prototype.getEnergyUsage = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.Account.AccountResource.prototype.setEnergyUsage = function(e) { + return n.Message.setProto3IntField(this, 1, e) + } + , + TronWebProto.Account.AccountResource.prototype.getFrozenBalanceForEnergy = function() { + return n.Message.getWrapperField(this, TronWebProto.Account.Frozen, 2) + } + , + TronWebProto.Account.AccountResource.prototype.setFrozenBalanceForEnergy = function(e) { + return n.Message.setWrapperField(this, 2, e) + } + , + TronWebProto.Account.AccountResource.prototype.clearFrozenBalanceForEnergy = function() { + return this.setFrozenBalanceForEnergy(void 0) + } + , + TronWebProto.Account.AccountResource.prototype.hasFrozenBalanceForEnergy = function() { + return null != n.Message.getField(this, 2) + } + , + TronWebProto.Account.AccountResource.prototype.getLatestConsumeTimeForEnergy = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.Account.AccountResource.prototype.getAcquiredDelegatedFrozenBalanceForEnergy = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + TronWebProto.Account.AccountResource.prototype.getDelegatedFrozenBalanceForEnergy = function() { + return n.Message.getFieldWithDefault(this, 5, 0) + } + , + TronWebProto.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy = function(e) { + return n.Message.setProto3IntField(this, 5, e) + } + , + TronWebProto.Account.AccountResource.prototype.getStorageLimit = function() { + return n.Message.getFieldWithDefault(this, 6, 0) + } + , + TronWebProto.Account.AccountResource.prototype.setStorageLimit = function(e) { + return n.Message.setProto3IntField(this, 6, e) + } + , + TronWebProto.Account.AccountResource.prototype.getStorageUsage = function() { + return n.Message.getFieldWithDefault(this, 7, 0) + } + , + TronWebProto.Account.AccountResource.prototype.setStorageUsage = function(e) { + return n.Message.setProto3IntField(this, 7, e) + } + , + TronWebProto.Account.AccountResource.prototype.getLatestExchangeStorageTime = function() { + return n.Message.getFieldWithDefault(this, 8, 0) + } + , + TronWebProto.Account.AccountResource.prototype.setLatestExchangeStorageTime = function(e) { + return n.Message.setProto3IntField(this, 8, e) + } + , + TronWebProto.Account.prototype.getAccountName = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.Account.prototype.getAccountName_asB64 = function() { + return n.Message.bytesAsB64(this.getAccountName()) + } + , + TronWebProto.Account.prototype.getAccountName_asU8 = function() { + return n.Message.bytesAsU8(this.getAccountName()) + } + , + TronWebProto.Account.prototype.setAccountName = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.Account.prototype.getType = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.Account.prototype.setType = function(e) { + return n.Message.setProto3EnumField(this, 2, e) + } + , + TronWebProto.Account.prototype.getAddress = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.Account.prototype.getAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getAddress()) + } + , + TronWebProto.Account.prototype.getAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getAddress()) + } + , + TronWebProto.Account.prototype.setAddress = function(e) { + return n.Message.setProto3BytesField(this, 3, e) + } + , + TronWebProto.Account.prototype.getBalance = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.Account.prototype.setBalance = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + TronWebProto.Account.prototype.getVotesList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.Vote, 5) + } + , + TronWebProto.Account.prototype.setVotesList = function(e) { + return n.Message.setRepeatedWrapperField(this, 5, e) + } + , + TronWebProto.Account.prototype.addVotes = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 5, e, TronWebProto.Vote, t) + } + , + TronWebProto.Account.prototype.clearVotesList = function() { + return this.setVotesList([]) + } + , + TronWebProto.Account.prototype.getAssetMap = function(e) { + return n.Message.getMapField(this, 6, e, null) + } + , + TronWebProto.Account.prototype.clearAssetMap = function() { + return this.getAssetMap().clear(), + this + } + , + TronWebProto.Account.prototype.getAssetv2Map = function(e) { + return n.Message.getMapField(this, 56, e, null) + } + , + TronWebProto.Account.prototype.clearAssetv2Map = function() { + return this.getAssetv2Map().clear(), + this + } + , + TronWebProto.Account.prototype.getFrozenList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.Account.Frozen, 7) + } + , + TronWebProto.Account.prototype.setFrozenList = function(e) { + return n.Message.setRepeatedWrapperField(this, 7, e) + } + , + TronWebProto.Account.prototype.addFrozen = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 7, e, TronWebProto.Account.Frozen, t) + } + , + TronWebProto.Account.prototype.clearFrozenList = function() { + return this.setFrozenList([]) + } + , + TronWebProto.Account.prototype.getNetUsage = function() { + return n.Message.getFieldWithDefault(this, 8, 0) + } + , + TronWebProto.Account.prototype.setNetUsage = function(e) { + return n.Message.setProto3IntField(this, 8, e) + } + , + TronWebProto.Account.prototype.getAcquiredDelegatedFrozenBalanceForBandwidth = function() { + return n.Message.getFieldWithDefault(this, 41, 0) + } + , + TronWebProto.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth = function(e) { + return n.Message.setProto3IntField(this, 41, e) + } + , + TronWebProto.Account.prototype.getDelegatedFrozenBalanceForBandwidth = function() { + return n.Message.getFieldWithDefault(this, 42, 0) + } + , + TronWebProto.Account.prototype.setDelegatedFrozenBalanceForBandwidth = function(e) { + return n.Message.setProto3IntField(this, 42, e) + } + , + TronWebProto.Account.prototype.getOldTronPower = function() { + return n.Message.getFieldWithDefault(this, 46, 0) + } + , + TronWebProto.Account.prototype.setOldTronPower = function(e) { + return n.Message.setProto3IntField(this, 46, e) + } + , + TronWebProto.Account.prototype.getTronPower = function() { + return n.Message.getWrapperField(this, TronWebProto.Account.Frozen, 47) + } + , + TronWebProto.Account.prototype.setTronPower = function(e) { + return n.Message.setWrapperField(this, 47, e) + } + , + TronWebProto.Account.prototype.clearTronPower = function() { + return this.setTronPower(void 0) + } + , + TronWebProto.Account.prototype.hasTronPower = function() { + return null != n.Message.getField(this, 47) + } + , + TronWebProto.Account.prototype.getAssetOptimized = function() { + return n.Message.getBooleanFieldWithDefault(this, 60, !1) + } + , + TronWebProto.Account.prototype.setAssetOptimized = function(e) { + return n.Message.setProto3BooleanField(this, 60, e) + } + , + TronWebProto.Account.prototype.getCreateTime = function() { + return n.Message.getFieldWithDefault(this, 9, 0) + } + , + TronWebProto.Account.prototype.setCreateTime = function(e) { + return n.Message.setProto3IntField(this, 9, e) + } + , + TronWebProto.Account.prototype.getLatestOprationTime = function() { + return n.Message.getFieldWithDefault(this, 10, 0) + } + , + TronWebProto.Account.prototype.setLatestOprationTime = function(e) { + return n.Message.setProto3IntField(this, 10, e) + } + , + TronWebProto.Account.prototype.getAllowance = function() { + return n.Message.getFieldWithDefault(this, 11, 0) + } + , + TronWebProto.Account.prototype.setAllowance = function(e) { + return n.Message.setProto3IntField(this, 11, e) + } + , + TronWebProto.Account.prototype.getLatestWithdrawTime = function() { + return n.Message.getFieldWithDefault(this, 12, 0) + } + , + TronWebProto.Account.prototype.setLatestWithdrawTime = function(e) { + return n.Message.setProto3IntField(this, 12, e) + } + , + TronWebProto.Account.prototype.getCode = function() { + return n.Message.getFieldWithDefault(this, 13, "") + } + , + TronWebProto.Account.prototype.getCode_asB64 = function() { + return n.Message.bytesAsB64(this.getCode()) + } + , + TronWebProto.Account.prototype.getCode_asU8 = function() { + return n.Message.bytesAsU8(this.getCode()) + } + , + TronWebProto.Account.prototype.setCode = function(e) { + return n.Message.setProto3BytesField(this, 13, e) + } + , + TronWebProto.Account.prototype.getIsWitness = function() { + return n.Message.getBooleanFieldWithDefault(this, 14, !1) + } + , + TronWebProto.Account.prototype.setIsWitness = function(e) { + return n.Message.setProto3BooleanField(this, 14, e) + } + , + TronWebProto.Account.prototype.getIsCommittee = function() { + return n.Message.getBooleanFieldWithDefault(this, 15, !1) + } + , + TronWebProto.Account.prototype.setIsCommittee = function(e) { + return n.Message.setProto3BooleanField(this, 15, e) + } + , + TronWebProto.Account.prototype.getFrozenSupplyList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.Account.Frozen, 16) + } + , + TronWebProto.Account.prototype.setFrozenSupplyList = function(e) { + return n.Message.setRepeatedWrapperField(this, 16, e) + } + , + TronWebProto.Account.prototype.addFrozenSupply = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 16, e, TronWebProto.Account.Frozen, t) + } + , + TronWebProto.Account.prototype.clearFrozenSupplyList = function() { + return this.setFrozenSupplyList([]) + } + , + TronWebProto.Account.prototype.getAssetIssuedName = function() { + return n.Message.getFieldWithDefault(this, 17, "") + } + , + TronWebProto.Account.prototype.getAssetIssuedName_asB64 = function() { + return n.Message.bytesAsB64(this.getAssetIssuedName()) + } + , + TronWebProto.Account.prototype.getAssetIssuedName_asU8 = function() { + return n.Message.bytesAsU8(this.getAssetIssuedName()) + } + , + TronWebProto.Account.prototype.setAssetIssuedName = function(e) { + return n.Message.setProto3BytesField(this, 17, e) + } + , + TronWebProto.Account.prototype.getAssetIssuedId = function() { + return n.Message.getFieldWithDefault(this, 57, "") + } + , + TronWebProto.Account.prototype.getAssetIssuedId_asB64 = function() { + return n.Message.bytesAsB64(this.getAssetIssuedId()) + } + , + TronWebProto.Account.prototype.getAssetIssuedId_asU8 = function() { + return n.Message.bytesAsU8(this.getAssetIssuedId()) + } + , + TronWebProto.Account.prototype.setAssetIssuedId = function(e) { + return n.Message.setProto3BytesField(this, 57, e) + } + , + TronWebProto.Account.prototype.getLatestAssetOperationTimeMap = function(e) { + return n.Message.getMapField(this, 18, e, null) + } + , + TronWebProto.Account.prototype.clearLatestAssetOperationTimeMap = function() { + return this.getLatestAssetOperationTimeMap().clear(), + this + } + , + TronWebProto.Account.prototype.getLatestAssetOperationTimev2Map = function(e) { + return n.Message.getMapField(this, 58, e, null) + } + , + TronWebProto.Account.prototype.clearLatestAssetOperationTimev2Map = function() { + return this.getLatestAssetOperationTimev2Map().clear(), + this + } + , + TronWebProto.Account.prototype.getFreeNetUsage = function() { + return n.Message.getFieldWithDefault(this, 19, 0) + } + , + TronWebProto.Account.prototype.setFreeNetUsage = function(e) { + return n.Message.setProto3IntField(this, 19, e) + } + , + TronWebProto.Account.prototype.getFreeAssetNetUsageMap = function(e) { + return n.Message.getMapField(this, 20, e, null) + } + , + TronWebProto.Account.prototype.clearFreeAssetNetUsageMap = function() { + return this.getFreeAssetNetUsageMap().clear(), + this + } + , + TronWebProto.Account.prototype.getFreeAssetNetUsagev2Map = function(e) { + return n.Message.getMapField(this, 59, e, null) + } + , + TronWebProto.Account.prototype.clearFreeAssetNetUsagev2Map = function() { + return this.getFreeAssetNetUsagev2Map().clear(), + this + } + , + TronWebProto.Account.prototype.getLatestConsumeTime = function() { + return n.Message.getFieldWithDefault(this, 21, 0) + } + , + TronWebProto.Account.prototype.setLatestConsumeTime = function(e) { + return n.Message.setProto3IntField(this, 21, e) + } + , + TronWebProto.Account.prototype.getLatestConsumeFreeTime = function() { + return n.Message.getFieldWithDefault(this, 22, 0) + } + , + TronWebProto.Account.prototype.setLatestConsumeFreeTime = function(e) { + return n.Message.setProto3IntField(this, 22, e) + } + , + TronWebProto.Account.prototype.getAccountId = function() { + return n.Message.getFieldWithDefault(this, 23, "") + } + , + TronWebProto.Account.prototype.getAccountId_asB64 = function() { + return n.Message.bytesAsB64(this.getAccountId()) + } + , + TronWebProto.Account.prototype.getAccountId_asU8 = function() { + return n.Message.bytesAsU8(this.getAccountId()) + } + , + TronWebProto.Account.prototype.setAccountId = function(e) { + return n.Message.setProto3BytesField(this, 23, e) + } + , + TronWebProto.Account.prototype.getAccountResource = function() { + return n.Message.getWrapperField(this, TronWebProto.Account.AccountResource, 26) + } + , + TronWebProto.Account.prototype.setAccountResource = function(e) { + return n.Message.setWrapperField(this, 26, e) + } + , + TronWebProto.Account.prototype.clearAccountResource = function() { + return this.setAccountResource(void 0) + } + , + TronWebProto.Account.prototype.hasAccountResource = function() { + return null != n.Message.getField(this, 26) + } + , + TronWebProto.Account.prototype.getCodehash = function() { + return n.Message.getFieldWithDefault(this, 30, "") + } + , + TronWebProto.Account.prototype.getCodehash_asB64 = function() { + return n.Message.bytesAsB64(this.getCodehash()) + } + , + TronWebProto.Account.prototype.getCodehash_asU8 = function() { + return n.Message.bytesAsU8(this.getCodehash()) + } + , + TronWebProto.Account.prototype.setCodehash = function(e) { + return n.Message.setProto3BytesField(this, 30, e) + } + , + TronWebProto.Account.prototype.getOwnerPermission = function() { + return n.Message.getWrapperField(this, TronWebProto.Permission, 31) + } + , + TronWebProto.Account.prototype.setOwnerPermission = function(e) { + return n.Message.setWrapperField(this, 31, e) + } + , + TronWebProto.Account.prototype.clearOwnerPermission = function() { + return this.setOwnerPermission(void 0) + } + , + TronWebProto.Account.prototype.hasOwnerPermission = function() { + return null != n.Message.getField(this, 31) + } + , + TronWebProto.Account.prototype.getWitnessPermission = function() { + return n.Message.getWrapperField(this, TronWebProto.Permission, 32) + } + , + TronWebProto.Account.prototype.setWitnessPermission = function(e) { + return n.Message.setWrapperField(this, 32, e) + } + , + TronWebProto.Account.prototype.clearWitnessPermission = function() { + return this.setWitnessPermission(void 0) + } + , + TronWebProto.Account.prototype.hasWitnessPermission = function() { + return null != n.Message.getField(this, 32) + } + , + TronWebProto.Account.prototype.getActivePermissionList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.Permission, 33) + } + , + TronWebProto.Account.prototype.setActivePermissionList = function(e) { + return n.Message.setRepeatedWrapperField(this, 33, e) + } + , + TronWebProto.Account.prototype.addActivePermission = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 33, e, TronWebProto.Permission, t) + } + , + TronWebProto.Account.prototype.clearActivePermissionList = function() { + return this.setActivePermissionList([]) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Key.prototype.toObject = function(e) { + return TronWebProto.Key.toObject(e, this) + } + , + TronWebProto.Key.toObject = function(e, t) { + var r = { + address: t.getAddress_asB64(), + weight: n.Message.getFieldWithDefault(t, 2, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.Key.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Key; + return TronWebProto.Key.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Key.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setAddress(r); + break; + case 2: + r = t.readInt64(), + e.setWeight(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Key.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Key.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Key.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getWeight()) && t.writeInt64(2, r) + } + , + TronWebProto.Key.prototype.getAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.Key.prototype.getAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getAddress()) + } + , + TronWebProto.Key.prototype.getAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getAddress()) + } + , + TronWebProto.Key.prototype.setAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.Key.prototype.getWeight = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.Key.prototype.setWeight = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.DelegatedResource.prototype.toObject = function(e) { + return TronWebProto.DelegatedResource.toObject(e, this) + } + , + TronWebProto.DelegatedResource.toObject = function(e, t) { + var r = { + from: t.getFrom_asB64(), + to: t.getTo_asB64(), + frozenBalanceForBandwidth: n.Message.getFieldWithDefault(t, 3, 0), + frozenBalanceForEnergy: n.Message.getFieldWithDefault(t, 4, 0), + expireTimeForBandwidth: n.Message.getFieldWithDefault(t, 5, 0), + expireTimeForEnergy: n.Message.getFieldWithDefault(t, 6, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.DelegatedResource.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.DelegatedResource; + return TronWebProto.DelegatedResource.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.DelegatedResource.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setFrom(r); + break; + case 2: + r = t.readBytes(), + e.setTo(r); + break; + case 3: + r = t.readInt64(), + e.setFrozenBalanceForBandwidth(r); + break; + case 4: + r = t.readInt64(), + e.setFrozenBalanceForEnergy(r); + break; + case 5: + r = t.readInt64(), + e.setExpireTimeForBandwidth(r); + break; + case 6: + r = t.readInt64(), + e.setExpireTimeForEnergy(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.DelegatedResource.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.DelegatedResource.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.DelegatedResource.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getFrom_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getTo_asU8()).length > 0 && t.writeBytes(2, r), + 0 !== (r = e.getFrozenBalanceForBandwidth()) && t.writeInt64(3, r), + 0 !== (r = e.getFrozenBalanceForEnergy()) && t.writeInt64(4, r), + 0 !== (r = e.getExpireTimeForBandwidth()) && t.writeInt64(5, r), + 0 !== (r = e.getExpireTimeForEnergy()) && t.writeInt64(6, r) + } + , + TronWebProto.DelegatedResource.prototype.getFrom = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.DelegatedResource.prototype.getFrom_asB64 = function() { + return n.Message.bytesAsB64(this.getFrom()) + } + , + TronWebProto.DelegatedResource.prototype.getFrom_asU8 = function() { + return n.Message.bytesAsU8(this.getFrom()) + } + , + TronWebProto.DelegatedResource.prototype.setFrom = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.DelegatedResource.prototype.getTo = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.DelegatedResource.prototype.getTo_asB64 = function() { + return n.Message.bytesAsB64(this.getTo()) + } + , + TronWebProto.DelegatedResource.prototype.getTo_asU8 = function() { + return n.Message.bytesAsU8(this.getTo()) + } + , + TronWebProto.DelegatedResource.prototype.setTo = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.DelegatedResource.prototype.getFrozenBalanceForBandwidth = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.DelegatedResource.prototype.setFrozenBalanceForBandwidth = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.DelegatedResource.prototype.getFrozenBalanceForEnergy = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.DelegatedResource.prototype.setFrozenBalanceForEnergy = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + TronWebProto.DelegatedResource.prototype.getExpireTimeForBandwidth = function() { + return n.Message.getFieldWithDefault(this, 5, 0) + } + , + TronWebProto.DelegatedResource.prototype.setExpireTimeForBandwidth = function(e) { + return n.Message.setProto3IntField(this, 5, e) + } + , + TronWebProto.DelegatedResource.prototype.getExpireTimeForEnergy = function() { + return n.Message.getFieldWithDefault(this, 6, 0) + } + , + TronWebProto.DelegatedResource.prototype.setExpireTimeForEnergy = function(e) { + return n.Message.setProto3IntField(this, 6, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.authority.prototype.toObject = function(e) { + return TronWebProto.authority.toObject(e, this) + } + , + TronWebProto.authority.toObject = function(e, t) { + var r, n = { + account: (r = t.getAccount()) && TronWebProto.AccountId.toObject(e, r), + permissionName: t.getPermissionName_asB64() + }; + return e && (n.$jspbMessageInstance = t), + n + } + ), + TronWebProto.authority.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.authority; + return TronWebProto.authority.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.authority.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = new TronWebProto.AccountId; + t.readMessage(r, TronWebProto.AccountId.deserializeBinaryFromReader), + e.setAccount(r); + break; + case 2: + r = t.readBytes(), + e.setPermissionName(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.authority.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.authority.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.authority.serializeBinaryToWriter = function(e, t) { + var r = void 0; + null != (r = e.getAccount()) && t.writeMessage(1, r, TronWebProto.AccountId.serializeBinaryToWriter), + (r = e.getPermissionName_asU8()).length > 0 && t.writeBytes(2, r) + } + , + TronWebProto.authority.prototype.getAccount = function() { + return n.Message.getWrapperField(this, TronWebProto.AccountId, 1) + } + , + TronWebProto.authority.prototype.setAccount = function(e) { + return n.Message.setWrapperField(this, 1, e) + } + , + TronWebProto.authority.prototype.clearAccount = function() { + return this.setAccount(void 0) + } + , + TronWebProto.authority.prototype.hasAccount = function() { + return null != n.Message.getField(this, 1) + } + , + TronWebProto.authority.prototype.getPermissionName = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.authority.prototype.getPermissionName_asB64 = function() { + return n.Message.bytesAsB64(this.getPermissionName()) + } + , + TronWebProto.authority.prototype.getPermissionName_asU8 = function() { + return n.Message.bytesAsU8(this.getPermissionName()) + } + , + TronWebProto.authority.prototype.setPermissionName = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.Permission.repeatedFields_ = [7], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Permission.prototype.toObject = function(e) { + return TronWebProto.Permission.toObject(e, this) + } + , + TronWebProto.Permission.toObject = function(e, t) { + var r = { + type: n.Message.getFieldWithDefault(t, 1, 0), + id: n.Message.getFieldWithDefault(t, 2, 0), + permissionName: n.Message.getFieldWithDefault(t, 3, ""), + threshold: n.Message.getFieldWithDefault(t, 4, 0), + parentId: n.Message.getFieldWithDefault(t, 5, 0), + operations: t.getOperations_asB64(), + keysList: n.Message.toObjectList(t.getKeysList(), TronWebProto.Key.toObject, e) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.Permission.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Permission; + return TronWebProto.Permission.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Permission.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readEnum(); + e.setType(r); + break; + case 2: + r = t.readInt32(), + e.setId(r); + break; + case 3: + r = t.readString(), + e.setPermissionName(r); + break; + case 4: + r = t.readInt64(), + e.setThreshold(r); + break; + case 5: + r = t.readInt32(), + e.setParentId(r); + break; + case 6: + r = t.readBytes(), + e.setOperations(r); + break; + case 7: + r = new TronWebProto.Key, + t.readMessage(r, TronWebProto.Key.deserializeBinaryFromReader), + e.addKeys(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Permission.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Permission.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Permission.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getType()) && t.writeEnum(1, r), + 0 !== (r = e.getId()) && t.writeInt32(2, r), + (r = e.getPermissionName()).length > 0 && t.writeString(3, r), + 0 !== (r = e.getThreshold()) && t.writeInt64(4, r), + 0 !== (r = e.getParentId()) && t.writeInt32(5, r), + (r = e.getOperations_asU8()).length > 0 && t.writeBytes(6, r), + (r = e.getKeysList()).length > 0 && t.writeRepeatedMessage(7, r, TronWebProto.Key.serializeBinaryToWriter) + } + , + TronWebProto.Permission.PermissionType = { + OWNER: 0, + WITNESS: 1, + ACTIVE: 2 + }, + TronWebProto.Permission.prototype.getType = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.Permission.prototype.setType = function(e) { + return n.Message.setProto3EnumField(this, 1, e) + } + , + TronWebProto.Permission.prototype.getId = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.Permission.prototype.setId = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.Permission.prototype.getPermissionName = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.Permission.prototype.setPermissionName = function(e) { + return n.Message.setProto3StringField(this, 3, e) + } + , + TronWebProto.Permission.prototype.getThreshold = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.Permission.prototype.setThreshold = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + TronWebProto.Permission.prototype.getParentId = function() { + return n.Message.getFieldWithDefault(this, 5, 0) + } + , + TronWebProto.Permission.prototype.setParentId = function(e) { + return n.Message.setProto3IntField(this, 5, e) + } + , + TronWebProto.Permission.prototype.getOperations = function() { + return n.Message.getFieldWithDefault(this, 6, "") + } + , + TronWebProto.Permission.prototype.getOperations_asB64 = function() { + return n.Message.bytesAsB64(this.getOperations()) + } + , + TronWebProto.Permission.prototype.getOperations_asU8 = function() { + return n.Message.bytesAsU8(this.getOperations()) + } + , + TronWebProto.Permission.prototype.setOperations = function(e) { + return n.Message.setProto3BytesField(this, 6, e) + } + , + TronWebProto.Permission.prototype.getKeysList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.Key, 7) + } + , + TronWebProto.Permission.prototype.setKeysList = function(e) { + return n.Message.setRepeatedWrapperField(this, 7, e) + } + , + TronWebProto.Permission.prototype.addKeys = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 7, e, TronWebProto.Key, t) + } + , + TronWebProto.Permission.prototype.clearKeysList = function() { + return this.setKeysList([]) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Witness.prototype.toObject = function(e) { + return TronWebProto.Witness.toObject(e, this) + } + , + TronWebProto.Witness.toObject = function(e, t) { + var r = { + address: t.getAddress_asB64(), + votecount: n.Message.getFieldWithDefault(t, 2, 0), + pubkey: t.getPubkey_asB64(), + url: n.Message.getFieldWithDefault(t, 4, ""), + totalproduced: n.Message.getFieldWithDefault(t, 5, 0), + totalmissed: n.Message.getFieldWithDefault(t, 6, 0), + latestblocknum: n.Message.getFieldWithDefault(t, 7, 0), + latestslotnum: n.Message.getFieldWithDefault(t, 8, 0), + isjobs: n.Message.getBooleanFieldWithDefault(t, 9, !1) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.Witness.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Witness; + return TronWebProto.Witness.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Witness.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setAddress(r); + break; + case 2: + r = t.readInt64(), + e.setVotecount(r); + break; + case 3: + r = t.readBytes(), + e.setPubkey(r); + break; + case 4: + r = t.readString(), + e.setUrl(r); + break; + case 5: + r = t.readInt64(), + e.setTotalproduced(r); + break; + case 6: + r = t.readInt64(), + e.setTotalmissed(r); + break; + case 7: + r = t.readInt64(), + e.setLatestblocknum(r); + break; + case 8: + r = t.readInt64(), + e.setLatestslotnum(r); + break; + case 9: + r = t.readBool(), + e.setIsjobs(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Witness.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Witness.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Witness.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getVotecount()) && t.writeInt64(2, r), + (r = e.getPubkey_asU8()).length > 0 && t.writeBytes(3, r), + (r = e.getUrl()).length > 0 && t.writeString(4, r), + 0 !== (r = e.getTotalproduced()) && t.writeInt64(5, r), + 0 !== (r = e.getTotalmissed()) && t.writeInt64(6, r), + 0 !== (r = e.getLatestblocknum()) && t.writeInt64(7, r), + 0 !== (r = e.getLatestslotnum()) && t.writeInt64(8, r), + (r = e.getIsjobs()) && t.writeBool(9, r) + } + , + TronWebProto.Witness.prototype.getAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.Witness.prototype.getAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getAddress()) + } + , + TronWebProto.Witness.prototype.getAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getAddress()) + } + , + TronWebProto.Witness.prototype.setAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.Witness.prototype.getVotecount = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.Witness.prototype.setVotecount = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.Witness.prototype.getPubkey = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.Witness.prototype.getPubkey_asB64 = function() { + return n.Message.bytesAsB64(this.getPubkey()) + } + , + TronWebProto.Witness.prototype.getPubkey_asU8 = function() { + return n.Message.bytesAsU8(this.getPubkey()) + } + , + TronWebProto.Witness.prototype.setPubkey = function(e) { + return n.Message.setProto3BytesField(this, 3, e) + } + , + TronWebProto.Witness.prototype.getUrl = function() { + return n.Message.getFieldWithDefault(this, 4, "") + } + , + TronWebProto.Witness.prototype.setUrl = function(e) { + return n.Message.setProto3StringField(this, 4, e) + } + , + TronWebProto.Witness.prototype.getTotalproduced = function() { + return n.Message.getFieldWithDefault(this, 5, 0) + } + , + TronWebProto.Witness.prototype.setTotalproduced = function(e) { + return n.Message.setProto3IntField(this, 5, e) + } + , + TronWebProto.Witness.prototype.getTotalmissed = function() { + return n.Message.getFieldWithDefault(this, 6, 0) + } + , + TronWebProto.Witness.prototype.setTotalmissed = function(e) { + return n.Message.setProto3IntField(this, 6, e) + } + , + TronWebProto.Witness.prototype.getLatestblocknum = function() { + return n.Message.getFieldWithDefault(this, 7, 0) + } + , + TronWebProto.Witness.prototype.setLatestblocknum = function(e) { + return n.Message.setProto3IntField(this, 7, e) + } + , + TronWebProto.Witness.prototype.getLatestslotnum = function() { + return n.Message.getFieldWithDefault(this, 8, 0) + } + , + TronWebProto.Witness.prototype.setLatestslotnum = function(e) { + return n.Message.setProto3IntField(this, 8, e) + } + , + TronWebProto.Witness.prototype.getIsjobs = function() { + return n.Message.getBooleanFieldWithDefault(this, 9, !1) + } + , + TronWebProto.Witness.prototype.setIsjobs = function(e) { + return n.Message.setProto3BooleanField(this, 9, e) + } + , + TronWebProto.Votes.repeatedFields_ = [2, 3], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Votes.prototype.toObject = function(e) { + return TronWebProto.Votes.toObject(e, this) + } + , + TronWebProto.Votes.toObject = function(e, t) { + var r = { + address: t.getAddress_asB64(), + oldVotesList: n.Message.toObjectList(t.getOldVotesList(), TronWebProto.Vote.toObject, e), + newVotesList: n.Message.toObjectList(t.getNewVotesList(), TronWebProto.Vote.toObject, e) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.Votes.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Votes; + return TronWebProto.Votes.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Votes.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setAddress(r); + break; + case 2: + r = new TronWebProto.Vote, + t.readMessage(r, TronWebProto.Vote.deserializeBinaryFromReader), + e.addOldVotes(r); + break; + case 3: + r = new TronWebProto.Vote, + t.readMessage(r, TronWebProto.Vote.deserializeBinaryFromReader), + e.addNewVotes(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Votes.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Votes.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Votes.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getOldVotesList()).length > 0 && t.writeRepeatedMessage(2, r, TronWebProto.Vote.serializeBinaryToWriter), + (r = e.getNewVotesList()).length > 0 && t.writeRepeatedMessage(3, r, TronWebProto.Vote.serializeBinaryToWriter) + } + , + TronWebProto.Votes.prototype.getAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.Votes.prototype.getAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getAddress()) + } + , + TronWebProto.Votes.prototype.getAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getAddress()) + } + , + TronWebProto.Votes.prototype.setAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.Votes.prototype.getOldVotesList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.Vote, 2) + } + , + TronWebProto.Votes.prototype.setOldVotesList = function(e) { + return n.Message.setRepeatedWrapperField(this, 2, e) + } + , + TronWebProto.Votes.prototype.addOldVotes = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 2, e, TronWebProto.Vote, t) + } + , + TronWebProto.Votes.prototype.clearOldVotesList = function() { + return this.setOldVotesList([]) + } + , + TronWebProto.Votes.prototype.getNewVotesList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.Vote, 3) + } + , + TronWebProto.Votes.prototype.setNewVotesList = function(e) { + return n.Message.setRepeatedWrapperField(this, 3, e) + } + , + TronWebProto.Votes.prototype.addNewVotes = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 3, e, TronWebProto.Vote, t) + } + , + TronWebProto.Votes.prototype.clearNewVotesList = function() { + return this.setNewVotesList([]) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.MarketOrderDetail.prototype.toObject = function(e) { + return TronWebProto.MarketOrderDetail.toObject(e, this) + } + , + TronWebProto.MarketOrderDetail.toObject = function(e, t) { + var r = { + makerorderid: t.getMakerorderid_asB64(), + takerorderid: t.getTakerorderid_asB64(), + fillsellquantity: n.Message.getFieldWithDefault(t, 3, 0), + fillbuyquantity: n.Message.getFieldWithDefault(t, 4, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.MarketOrderDetail.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.MarketOrderDetail; + return TronWebProto.MarketOrderDetail.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.MarketOrderDetail.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setMakerorderid(r); + break; + case 2: + r = t.readBytes(), + e.setTakerorderid(r); + break; + case 3: + r = t.readInt64(), + e.setFillsellquantity(r); + break; + case 4: + r = t.readInt64(), + e.setFillbuyquantity(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.MarketOrderDetail.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.MarketOrderDetail.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.MarketOrderDetail.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getMakerorderid_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getTakerorderid_asU8()).length > 0 && t.writeBytes(2, r), + 0 !== (r = e.getFillsellquantity()) && t.writeInt64(3, r), + 0 !== (r = e.getFillbuyquantity()) && t.writeInt64(4, r) + } + , + TronWebProto.MarketOrderDetail.prototype.getMakerorderid = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asB64 = function() { + return n.Message.bytesAsB64(this.getMakerorderid()) + } + , + TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asU8 = function() { + return n.Message.bytesAsU8(this.getMakerorderid()) + } + , + TronWebProto.MarketOrderDetail.prototype.setMakerorderid = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.MarketOrderDetail.prototype.getTakerorderid = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asB64 = function() { + return n.Message.bytesAsB64(this.getTakerorderid()) + } + , + TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asU8 = function() { + return n.Message.bytesAsU8(this.getTakerorderid()) + } + , + TronWebProto.MarketOrderDetail.prototype.setTakerorderid = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.MarketOrderDetail.prototype.getFillsellquantity = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.MarketOrderDetail.prototype.setFillsellquantity = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.MarketOrderDetail.prototype.getFillbuyquantity = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.MarketOrderDetail.prototype.setFillbuyquantity = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + TronWebProto.Transaction.repeatedFields_ = [2, 5], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Transaction.prototype.toObject = function(e) { + return TronWebProto.Transaction.toObject(e, this) + } + , + TronWebProto.Transaction.toObject = function(e, t) { + var r, o = { + rawData: (r = t.getRawData()) && TronWebProto.Transaction.raw.toObject(e, r), + signatureList: t.getSignatureList_asB64(), + retList: n.Message.toObjectList(t.getRetList(), TronWebProto.Transaction.Result.toObject, e) + }; + return e && (o.$jspbMessageInstance = t), + o + } + ), + TronWebProto.Transaction.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Transaction; + return TronWebProto.Transaction.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Transaction.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = new TronWebProto.Transaction.raw; + t.readMessage(r, TronWebProto.Transaction.raw.deserializeBinaryFromReader), + e.setRawData(r); + break; + case 2: + r = t.readBytes(), + e.addSignature(r); + break; + case 5: + r = new TronWebProto.Transaction.Result, + t.readMessage(r, TronWebProto.Transaction.Result.deserializeBinaryFromReader), + e.addRet(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Transaction.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Transaction.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Transaction.serializeBinaryToWriter = function(e, t) { + var r = void 0; + null != (r = e.getRawData()) && t.writeMessage(1, r, TronWebProto.Transaction.raw.serializeBinaryToWriter), + (r = e.getSignatureList_asU8()).length > 0 && t.writeRepeatedBytes(2, r), + (r = e.getRetList()).length > 0 && t.writeRepeatedMessage(5, r, TronWebProto.Transaction.Result.serializeBinaryToWriter) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Transaction.Contract.prototype.toObject = function(e) { + return TronWebProto.Transaction.Contract.toObject(e, this) + } + , + TronWebProto.Transaction.Contract.toObject = function(e, t) { + var r, o = { + type: n.Message.getFieldWithDefault(t, 1, 0), + parameter: (r = t.getParameter()) && i.Any.toObject(e, r), + provider: t.getProvider_asB64(), + contractname: t.getContractname_asB64(), + permissionId: n.Message.getFieldWithDefault(t, 5, 0) + }; + return e && (o.$jspbMessageInstance = t), + o + } + ), + TronWebProto.Transaction.Contract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Transaction.Contract; + return TronWebProto.Transaction.Contract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Transaction.Contract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readEnum(); + e.setType(r); + break; + case 2: + r = new i.Any, + t.readMessage(r, i.Any.deserializeBinaryFromReader), + e.setParameter(r); + break; + case 3: + r = t.readBytes(), + e.setProvider(r); + break; + case 4: + r = t.readBytes(), + e.setContractname(r); + break; + case 5: + r = t.readInt32(), + e.setPermissionId(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Transaction.Contract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Transaction.Contract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Transaction.Contract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getType()) && t.writeEnum(1, r), + null != (r = e.getParameter()) && t.writeMessage(2, r, i.Any.serializeBinaryToWriter), + (r = e.getProvider_asU8()).length > 0 && t.writeBytes(3, r), + (r = e.getContractname_asU8()).length > 0 && t.writeBytes(4, r), + 0 !== (r = e.getPermissionId()) && t.writeInt32(5, r) + } + , + TronWebProto.Transaction.Contract.ContractType = { + ACCOUNTCREATECONTRACT: 0, + TRANSFERCONTRACT: 1, + TRANSFERASSETCONTRACT: 2, + VOTEASSETCONTRACT: 3, + VOTEWITNESSCONTRACT: 4, + WITNESSCREATECONTRACT: 5, + ASSETISSUECONTRACT: 6, + WITNESSUPDATECONTRACT: 8, + PARTICIPATEASSETISSUECONTRACT: 9, + ACCOUNTUPDATECONTRACT: 10, + FREEZEBALANCECONTRACT: 11, + UNFREEZEBALANCECONTRACT: 12, + WITHDRAWBALANCECONTRACT: 13, + UNFREEZEASSETCONTRACT: 14, + UPDATEASSETCONTRACT: 15, + PROPOSALCREATECONTRACT: 16, + PROPOSALAPPROVECONTRACT: 17, + PROPOSALDELETECONTRACT: 18, + SETACCOUNTIDCONTRACT: 19, + CUSTOMCONTRACT: 20, + CREATESMARTCONTRACT: 30, + TRIGGERSMARTCONTRACT: 31, + GETCONTRACT: 32, + UPDATESETTINGCONTRACT: 33, + EXCHANGECREATECONTRACT: 41, + EXCHANGEINJECTCONTRACT: 42, + EXCHANGEWITHDRAWCONTRACT: 43, + EXCHANGETRANSACTIONCONTRACT: 44, + UPDATEENERGYLIMITCONTRACT: 45, + ACCOUNTPERMISSIONUPDATECONTRACT: 46, + CLEARABICONTRACT: 48, + UPDATEBROKERAGECONTRACT: 49, + SHIELDEDTRANSFERCONTRACT: 51, + MARKETSELLASSETCONTRACT: 52, + MARKETCANCELORDERCONTRACT: 53, + FREEZEBALANCEV2CONTRACT: 54, + UNFREEZEBALANCEV2CONTRACT: 55, + WITHDRAWEXPIREUNFREEZECONTRACT: 56, + DELEGATERESOURCECONTRACT: 57, + UNDELEGATERESOURCECONTRACT: 58, + CANCELALLUNFREEZEV2CONTRACT: 59 + }, + TronWebProto.Transaction.Contract.prototype.getType = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.Transaction.Contract.prototype.setType = function(e) { + return n.Message.setProto3EnumField(this, 1, e) + } + , + TronWebProto.Transaction.Contract.prototype.getParameter = function() { + return n.Message.getWrapperField(this, i.Any, 2) + } + , + TronWebProto.Transaction.Contract.prototype.setParameter = function(e) { + return n.Message.setWrapperField(this, 2, e) + } + , + TronWebProto.Transaction.Contract.prototype.clearParameter = function() { + return this.setParameter(void 0) + } + , + TronWebProto.Transaction.Contract.prototype.hasParameter = function() { + return null != n.Message.getField(this, 2) + } + , + TronWebProto.Transaction.Contract.prototype.getProvider = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.Transaction.Contract.prototype.getProvider_asB64 = function() { + return n.Message.bytesAsB64(this.getProvider()) + } + , + TronWebProto.Transaction.Contract.prototype.getProvider_asU8 = function() { + return n.Message.bytesAsU8(this.getProvider()) + } + , + TronWebProto.Transaction.Contract.prototype.setProvider = function(e) { + return n.Message.setProto3BytesField(this, 3, e) + } + , + TronWebProto.Transaction.Contract.prototype.getContractname = function() { + return n.Message.getFieldWithDefault(this, 4, "") + } + , + TronWebProto.Transaction.Contract.prototype.getContractname_asB64 = function() { + return n.Message.bytesAsB64(this.getContractname()) + } + , + TronWebProto.Transaction.Contract.prototype.getContractname_asU8 = function() { + return n.Message.bytesAsU8(this.getContractname()) + } + , + TronWebProto.Transaction.Contract.prototype.setContractname = function(e) { + return n.Message.setProto3BytesField(this, 4, e) + } + , + TronWebProto.Transaction.Contract.prototype.getPermissionId = function() { + return n.Message.getFieldWithDefault(this, 5, 0) + } + , + TronWebProto.Transaction.Contract.prototype.setPermissionId = function(e) { + return n.Message.setProto3IntField(this, 5, e) + } + , + TronWebProto.Transaction.Result.repeatedFields_ = [26], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Transaction.Result.prototype.toObject = function(e) { + return TronWebProto.Transaction.Result.toObject(e, this) + } + , + TronWebProto.Transaction.Result.toObject = function(e, t) { + var r = { + fee: n.Message.getFieldWithDefault(t, 1, 0), + ret: n.Message.getFieldWithDefault(t, 2, 0), + contractret: n.Message.getFieldWithDefault(t, 3, 0), + assetissueid: n.Message.getFieldWithDefault(t, 14, ""), + withdrawAmount: n.Message.getFieldWithDefault(t, 15, 0), + unfreezeAmount: n.Message.getFieldWithDefault(t, 16, 0), + exchangeReceivedAmount: n.Message.getFieldWithDefault(t, 18, 0), + exchangeInjectAnotherAmount: n.Message.getFieldWithDefault(t, 19, 0), + exchangeWithdrawAnotherAmount: n.Message.getFieldWithDefault(t, 20, 0), + exchangeId: n.Message.getFieldWithDefault(t, 21, 0), + shieldedTransactionFee: n.Message.getFieldWithDefault(t, 22, 0), + orderid: t.getOrderid_asB64(), + orderdetailsList: n.Message.toObjectList(t.getOrderdetailsList(), TronWebProto.MarketOrderDetail.toObject, e) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.Transaction.Result.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Transaction.Result; + return TronWebProto.Transaction.Result.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Transaction.Result.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readInt64(); + e.setFee(r); + break; + case 2: + r = t.readEnum(), + e.setRet(r); + break; + case 3: + r = t.readEnum(), + e.setContractret(r); + break; + case 14: + r = t.readString(), + e.setAssetissueid(r); + break; + case 15: + r = t.readInt64(), + e.setWithdrawAmount(r); + break; + case 16: + r = t.readInt64(), + e.setUnfreezeAmount(r); + break; + case 18: + r = t.readInt64(), + e.setExchangeReceivedAmount(r); + break; + case 19: + r = t.readInt64(), + e.setExchangeInjectAnotherAmount(r); + break; + case 20: + r = t.readInt64(), + e.setExchangeWithdrawAnotherAmount(r); + break; + case 21: + r = t.readInt64(), + e.setExchangeId(r); + break; + case 22: + r = t.readInt64(), + e.setShieldedTransactionFee(r); + break; + case 25: + r = t.readBytes(), + e.setOrderid(r); + break; + case 26: + r = new TronWebProto.MarketOrderDetail, + t.readMessage(r, TronWebProto.MarketOrderDetail.deserializeBinaryFromReader), + e.addOrderdetails(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Transaction.Result.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Transaction.Result.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Transaction.Result.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getFee()) && t.writeInt64(1, r), + 0 !== (r = e.getRet()) && t.writeEnum(2, r), + 0 !== (r = e.getContractret()) && t.writeEnum(3, r), + (r = e.getAssetissueid()).length > 0 && t.writeString(14, r), + 0 !== (r = e.getWithdrawAmount()) && t.writeInt64(15, r), + 0 !== (r = e.getUnfreezeAmount()) && t.writeInt64(16, r), + 0 !== (r = e.getExchangeReceivedAmount()) && t.writeInt64(18, r), + 0 !== (r = e.getExchangeInjectAnotherAmount()) && t.writeInt64(19, r), + 0 !== (r = e.getExchangeWithdrawAnotherAmount()) && t.writeInt64(20, r), + 0 !== (r = e.getExchangeId()) && t.writeInt64(21, r), + 0 !== (r = e.getShieldedTransactionFee()) && t.writeInt64(22, r), + (r = e.getOrderid_asU8()).length > 0 && t.writeBytes(25, r), + (r = e.getOrderdetailsList()).length > 0 && t.writeRepeatedMessage(26, r, TronWebProto.MarketOrderDetail.serializeBinaryToWriter) + } + , + TronWebProto.Transaction.Result.code = { + SUCESS: 0, + FAILED: 1 + }, + TronWebProto.Transaction.Result.contractResult = { + DEFAULT: 0, + SUCCESS: 1, + REVERT: 2, + BAD_JUMP_DESTINATION: 3, + OUT_OF_MEMORY: 4, + PRECOMPILED_CONTRACT: 5, + STACK_TOO_SMALL: 6, + STACK_TOO_LARGE: 7, + ILLEGAL_OPERATION: 8, + STACK_OVERFLOW: 9, + OUT_OF_ENERGY: 10, + OUT_OF_TIME: 11, + JVM_STACK_OVER_FLOW: 12, + UNKNOWN: 13, + TRANSFER_FAILED: 14, + INVALID_CODE: 15 + }, + TronWebProto.Transaction.Result.prototype.getFee = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.Transaction.Result.prototype.setFee = function(e) { + return n.Message.setProto3IntField(this, 1, e) + } + , + TronWebProto.Transaction.Result.prototype.getRet = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.Transaction.Result.prototype.setRet = function(e) { + return n.Message.setProto3EnumField(this, 2, e) + } + , + TronWebProto.Transaction.Result.prototype.getContractret = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.Transaction.Result.prototype.setContractret = function(e) { + return n.Message.setProto3EnumField(this, 3, e) + } + , + TronWebProto.Transaction.Result.prototype.getAssetissueid = function() { + return n.Message.getFieldWithDefault(this, 14, "") + } + , + TronWebProto.Transaction.Result.prototype.setAssetissueid = function(e) { + return n.Message.setProto3StringField(this, 14, e) + } + , + TronWebProto.Transaction.Result.prototype.getWithdrawAmount = function() { + return n.Message.getFieldWithDefault(this, 15, 0) + } + , + TronWebProto.Transaction.Result.prototype.setWithdrawAmount = function(e) { + return n.Message.setProto3IntField(this, 15, e) + } + , + TronWebProto.Transaction.Result.prototype.getUnfreezeAmount = function() { + return n.Message.getFieldWithDefault(this, 16, 0) + } + , + TronWebProto.Transaction.Result.prototype.setUnfreezeAmount = function(e) { + return n.Message.setProto3IntField(this, 16, e) + } + , + TronWebProto.Transaction.Result.prototype.getExchangeReceivedAmount = function() { + return n.Message.getFieldWithDefault(this, 18, 0) + } + , + TronWebProto.Transaction.Result.prototype.setExchangeReceivedAmount = function(e) { + return n.Message.setProto3IntField(this, 18, e) + } + , + TronWebProto.Transaction.Result.prototype.getExchangeInjectAnotherAmount = function() { + return n.Message.getFieldWithDefault(this, 19, 0) + } + , + TronWebProto.Transaction.Result.prototype.setExchangeInjectAnotherAmount = function(e) { + return n.Message.setProto3IntField(this, 19, e) + } + , + TronWebProto.Transaction.Result.prototype.getExchangeWithdrawAnotherAmount = function() { + return n.Message.getFieldWithDefault(this, 20, 0) + } + , + TronWebProto.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount = function(e) { + return n.Message.setProto3IntField(this, 20, e) + } + , + TronWebProto.Transaction.Result.prototype.getExchangeId = function() { + return n.Message.getFieldWithDefault(this, 21, 0) + } + , + TronWebProto.Transaction.Result.prototype.setExchangeId = function(e) { + return n.Message.setProto3IntField(this, 21, e) + } + , + TronWebProto.Transaction.Result.prototype.getShieldedTransactionFee = function() { + return n.Message.getFieldWithDefault(this, 22, 0) + } + , + TronWebProto.Transaction.Result.prototype.setShieldedTransactionFee = function(e) { + return n.Message.setProto3IntField(this, 22, e) + } + , + TronWebProto.Transaction.Result.prototype.getOrderid = function() { + return n.Message.getFieldWithDefault(this, 25, "") + } + , + TronWebProto.Transaction.Result.prototype.getOrderid_asB64 = function() { + return n.Message.bytesAsB64(this.getOrderid()) + } + , + TronWebProto.Transaction.Result.prototype.getOrderid_asU8 = function() { + return n.Message.bytesAsU8(this.getOrderid()) + } + , + TronWebProto.Transaction.Result.prototype.setOrderid = function(e) { + return n.Message.setProto3BytesField(this, 25, e) + } + , + TronWebProto.Transaction.Result.prototype.getOrderdetailsList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.MarketOrderDetail, 26) + } + , + TronWebProto.Transaction.Result.prototype.setOrderdetailsList = function(e) { + return n.Message.setRepeatedWrapperField(this, 26, e) + } + , + TronWebProto.Transaction.Result.prototype.addOrderdetails = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 26, e, TronWebProto.MarketOrderDetail, t) + } + , + TronWebProto.Transaction.Result.prototype.clearOrderdetailsList = function() { + return this.setOrderdetailsList([]) + } + , + TronWebProto.Transaction.raw.repeatedFields_ = [9, 11], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.Transaction.raw.prototype.toObject = function(e) { + return TronWebProto.Transaction.raw.toObject(e, this) + } + , + TronWebProto.Transaction.raw.toObject = function(e, t) { + var r = { + refBlockBytes: t.getRefBlockBytes_asB64(), + refBlockNum: n.Message.getFieldWithDefault(t, 3, 0), + refBlockHash: t.getRefBlockHash_asB64(), + expiration: n.Message.getFieldWithDefault(t, 8, 0), + authsList: n.Message.toObjectList(t.getAuthsList(), TronWebProto.authority.toObject, e), + data: t.getData_asB64(), + contractList: n.Message.toObjectList(t.getContractList(), TronWebProto.Transaction.Contract.toObject, e), + scripts: t.getScripts_asB64(), + timestamp: n.Message.getFieldWithDefault(t, 14, 0), + feeLimit: n.Message.getFieldWithDefault(t, 18, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.Transaction.raw.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.Transaction.raw; + return TronWebProto.Transaction.raw.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.Transaction.raw.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setRefBlockBytes(r); + break; + case 3: + r = t.readInt64(), + e.setRefBlockNum(r); + break; + case 4: + r = t.readBytes(), + e.setRefBlockHash(r); + break; + case 8: + r = t.readInt64(), + e.setExpiration(r); + break; + case 9: + r = new TronWebProto.authority, + t.readMessage(r, TronWebProto.authority.deserializeBinaryFromReader), + e.addAuths(r); + break; + case 10: + r = t.readBytes(), + e.setData(r); + break; + case 11: + r = new TronWebProto.Transaction.Contract, + t.readMessage(r, TronWebProto.Transaction.Contract.deserializeBinaryFromReader), + e.addContract(r); + break; + case 12: + r = t.readBytes(), + e.setScripts(r); + break; + case 14: + r = t.readInt64(), + e.setTimestamp(r); + break; + case 18: + r = t.readInt64(), + e.setFeeLimit(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.Transaction.raw.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.Transaction.raw.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.Transaction.raw.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getRefBlockBytes_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getRefBlockNum()) && t.writeInt64(3, r), + (r = e.getRefBlockHash_asU8()).length > 0 && t.writeBytes(4, r), + 0 !== (r = e.getExpiration()) && t.writeInt64(8, r), + (r = e.getAuthsList()).length > 0 && t.writeRepeatedMessage(9, r, TronWebProto.authority.serializeBinaryToWriter), + (r = e.getData_asU8()).length > 0 && t.writeBytes(10, r), + (r = e.getContractList()).length > 0 && t.writeRepeatedMessage(11, r, TronWebProto.Transaction.Contract.serializeBinaryToWriter), + (r = e.getScripts_asU8()).length > 0 && t.writeBytes(12, r), + 0 !== (r = e.getTimestamp()) && t.writeInt64(14, r), + 0 !== (r = e.getFeeLimit()) && t.writeInt64(18, r) + } + , + TronWebProto.Transaction.raw.prototype.getRefBlockBytes = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asB64 = function() { + return n.Message.bytesAsB64(this.getRefBlockBytes()) + } + , + TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asU8 = function() { + return n.Message.bytesAsU8(this.getRefBlockBytes()) + } + , + TronWebProto.Transaction.raw.prototype.setRefBlockBytes = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.Transaction.raw.prototype.getRefBlockNum = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.Transaction.raw.prototype.setRefBlockNum = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.Transaction.raw.prototype.getRefBlockHash = function() { + return n.Message.getFieldWithDefault(this, 4, "") + } + , + TronWebProto.Transaction.raw.prototype.getRefBlockHash_asB64 = function() { + return n.Message.bytesAsB64(this.getRefBlockHash()) + } + , + TronWebProto.Transaction.raw.prototype.getRefBlockHash_asU8 = function() { + return n.Message.bytesAsU8(this.getRefBlockHash()) + } + , + TronWebProto.Transaction.raw.prototype.setRefBlockHash = function(e) { + return n.Message.setProto3BytesField(this, 4, e) + } + , + TronWebProto.Transaction.raw.prototype.getExpiration = function() { + return n.Message.getFieldWithDefault(this, 8, 0) + } + , + TronWebProto.Transaction.raw.prototype.setExpiration = function(e) { + return n.Message.setProto3IntField(this, 8, e) + } + , + TronWebProto.Transaction.raw.prototype.getAuthsList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.authority, 9) + } + , + TronWebProto.Transaction.raw.prototype.setAuthsList = function(e) { + return n.Message.setRepeatedWrapperField(this, 9, e) + } + , + TronWebProto.Transaction.raw.prototype.addAuths = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 9, e, TronWebProto.authority, t) + } + , + TronWebProto.Transaction.raw.prototype.clearAuthsList = function() { + return this.setAuthsList([]) + } + , + TronWebProto.Transaction.raw.prototype.getData = function() { + return n.Message.getFieldWithDefault(this, 10, "") + } + , + TronWebProto.Transaction.raw.prototype.getData_asB64 = function() { + return n.Message.bytesAsB64(this.getData()) + } + , + TronWebProto.Transaction.raw.prototype.getData_asU8 = function() { + return n.Message.bytesAsU8(this.getData()) + } + , + TronWebProto.Transaction.raw.prototype.setData = function(e) { + return n.Message.setProto3BytesField(this, 10, e) + } + , + TronWebProto.Transaction.raw.prototype.getContractList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.Transaction.Contract, 11) + } + , + TronWebProto.Transaction.raw.prototype.setContractList = function(e) { + return n.Message.setRepeatedWrapperField(this, 11, e) + } + , + TronWebProto.Transaction.raw.prototype.addContract = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 11, e, TronWebProto.Transaction.Contract, t) + } + , + TronWebProto.Transaction.raw.prototype.clearContractList = function() { + return this.setContractList([]) + } + , + TronWebProto.Transaction.raw.prototype.getScripts = function() { + return n.Message.getFieldWithDefault(this, 12, "") + } + , + TronWebProto.Transaction.raw.prototype.getScripts_asB64 = function() { + return n.Message.bytesAsB64(this.getScripts()) + } + , + TronWebProto.Transaction.raw.prototype.getScripts_asU8 = function() { + return n.Message.bytesAsU8(this.getScripts()) + } + , + TronWebProto.Transaction.raw.prototype.setScripts = function(e) { + return n.Message.setProto3BytesField(this, 12, e) + } + , + TronWebProto.Transaction.raw.prototype.getTimestamp = function() { + return n.Message.getFieldWithDefault(this, 14, 0) + } + , + TronWebProto.Transaction.raw.prototype.setTimestamp = function(e) { + return n.Message.setProto3IntField(this, 14, e) + } + , + TronWebProto.Transaction.raw.prototype.getFeeLimit = function() { + return n.Message.getFieldWithDefault(this, 18, 0) + } + , + TronWebProto.Transaction.raw.prototype.setFeeLimit = function(e) { + return n.Message.setProto3IntField(this, 18, e) + } + , + TronWebProto.Transaction.prototype.getRawData = function() { + return n.Message.getWrapperField(this, TronWebProto.Transaction.raw, 1) + } + , + TronWebProto.Transaction.prototype.setRawData = function(e) { + return n.Message.setWrapperField(this, 1, e) + } + , + TronWebProto.Transaction.prototype.clearRawData = function() { + return this.setRawData(void 0) + } + , + TronWebProto.Transaction.prototype.hasRawData = function() { + return null != n.Message.getField(this, 1) + } + , + TronWebProto.Transaction.prototype.getSignatureList = function() { + return n.Message.getRepeatedField(this, 2) + } + , + TronWebProto.Transaction.prototype.getSignatureList_asB64 = function() { + return n.Message.bytesListAsB64(this.getSignatureList()) + } + , + TronWebProto.Transaction.prototype.getSignatureList_asU8 = function() { + return n.Message.bytesListAsU8(this.getSignatureList()) + } + , + TronWebProto.Transaction.prototype.setSignatureList = function(e) { + return n.Message.setField(this, 2, e || []) + } + , + TronWebProto.Transaction.prototype.addSignature = function(e, t) { + return n.Message.addToRepeatedField(this, 2, e, t) + } + , + TronWebProto.Transaction.prototype.clearSignatureList = function() { + return this.setSignatureList([]) + } + , + TronWebProto.Transaction.prototype.getRetList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.Transaction.Result, 5) + } + , + TronWebProto.Transaction.prototype.setRetList = function(e) { + return n.Message.setRepeatedWrapperField(this, 5, e) + } + , + TronWebProto.Transaction.prototype.addRet = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 5, e, TronWebProto.Transaction.Result, t) + } + , + TronWebProto.Transaction.prototype.clearRetList = function() { + return this.setRetList([]) + } + , + TronWebProto.AccountType = { + NORMAL: 0, + ASSETISSUE: 1, + CONTRACT: 2 + }, + o.object.extend(t, TronWebProto) + } + , + 956: (e,t,r)=>{ + var n = r(5595) + , o = n + , s = "undefined" != typeof globalThis && globalThis || "undefined" != typeof window && window || void 0 !== s && s || "undefined" != typeof self && self || function() { + return this + } + .call(null) || Function("return this")() + , i = r(8020); + o.object.extend(proto, i), + o.exportSymbol("TronWebProto.AccountCreateContract", null, s), + o.exportSymbol("TronWebProto.AccountPermissionUpdateContract", null, s), + o.exportSymbol("TronWebProto.AccountUpdateContract", null, s), + o.exportSymbol("TronWebProto.SetAccountIdContract", null, s), + TronWebProto.AccountCreateContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.AccountCreateContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.AccountCreateContract.displayName = "TronWebProto.AccountCreateContract"), + TronWebProto.AccountUpdateContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.AccountUpdateContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.AccountUpdateContract.displayName = "TronWebProto.AccountUpdateContract"), + TronWebProto.SetAccountIdContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.SetAccountIdContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.SetAccountIdContract.displayName = "TronWebProto.SetAccountIdContract"), + TronWebProto.AccountPermissionUpdateContract = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.AccountPermissionUpdateContract.repeatedFields_, null) + } + , + o.inherits(TronWebProto.AccountPermissionUpdateContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.AccountPermissionUpdateContract.displayName = "TronWebProto.AccountPermissionUpdateContract"), + n.Message.GENERATE_TO_OBJECT && (TronWebProto.AccountCreateContract.prototype.toObject = function(e) { + return TronWebProto.AccountCreateContract.toObject(e, this) + } + , + TronWebProto.AccountCreateContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + accountAddress: t.getAccountAddress_asB64(), + type: n.Message.getFieldWithDefault(t, 3, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.AccountCreateContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.AccountCreateContract; + return TronWebProto.AccountCreateContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.AccountCreateContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readBytes(), + e.setAccountAddress(r); + break; + case 3: + r = t.readEnum(), + e.setType(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.AccountCreateContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.AccountCreateContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.AccountCreateContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getAccountAddress_asU8()).length > 0 && t.writeBytes(2, r), + 0 !== (r = e.getType()) && t.writeEnum(3, r) + } + , + TronWebProto.AccountCreateContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.AccountCreateContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.AccountCreateContract.prototype.getAccountAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.AccountCreateContract.prototype.getAccountAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getAccountAddress()) + } + , + TronWebProto.AccountCreateContract.prototype.getAccountAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getAccountAddress()) + } + , + TronWebProto.AccountCreateContract.prototype.setAccountAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.AccountCreateContract.prototype.getType = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.AccountCreateContract.prototype.setType = function(e) { + return n.Message.setProto3EnumField(this, 3, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.AccountUpdateContract.prototype.toObject = function(e) { + return TronWebProto.AccountUpdateContract.toObject(e, this) + } + , + TronWebProto.AccountUpdateContract.toObject = function(e, t) { + var r = { + accountName: t.getAccountName_asB64(), + ownerAddress: t.getOwnerAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.AccountUpdateContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.AccountUpdateContract; + return TronWebProto.AccountUpdateContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.AccountUpdateContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setAccountName(r); + break; + case 2: + r = t.readBytes(), + e.setOwnerAddress(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.AccountUpdateContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.AccountUpdateContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.AccountUpdateContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getAccountName_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(2, r) + } + , + TronWebProto.AccountUpdateContract.prototype.getAccountName = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.AccountUpdateContract.prototype.getAccountName_asB64 = function() { + return n.Message.bytesAsB64(this.getAccountName()) + } + , + TronWebProto.AccountUpdateContract.prototype.getAccountName_asU8 = function() { + return n.Message.bytesAsU8(this.getAccountName()) + } + , + TronWebProto.AccountUpdateContract.prototype.setAccountName = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.AccountUpdateContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.AccountUpdateContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.SetAccountIdContract.prototype.toObject = function(e) { + return TronWebProto.SetAccountIdContract.toObject(e, this) + } + , + TronWebProto.SetAccountIdContract.toObject = function(e, t) { + var r = { + accountId: t.getAccountId_asB64(), + ownerAddress: t.getOwnerAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.SetAccountIdContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.SetAccountIdContract; + return TronWebProto.SetAccountIdContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.SetAccountIdContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setAccountId(r); + break; + case 2: + r = t.readBytes(), + e.setOwnerAddress(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.SetAccountIdContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.SetAccountIdContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.SetAccountIdContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getAccountId_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(2, r) + } + , + TronWebProto.SetAccountIdContract.prototype.getAccountId = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.SetAccountIdContract.prototype.getAccountId_asB64 = function() { + return n.Message.bytesAsB64(this.getAccountId()) + } + , + TronWebProto.SetAccountIdContract.prototype.getAccountId_asU8 = function() { + return n.Message.bytesAsU8(this.getAccountId()) + } + , + TronWebProto.SetAccountIdContract.prototype.setAccountId = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.SetAccountIdContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.SetAccountIdContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.AccountPermissionUpdateContract.repeatedFields_ = [4], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.AccountPermissionUpdateContract.prototype.toObject = function(e) { + return TronWebProto.AccountPermissionUpdateContract.toObject(e, this) + } + , + TronWebProto.AccountPermissionUpdateContract.toObject = function(e, t) { + var r, o = { + ownerAddress: t.getOwnerAddress_asB64(), + owner: (r = t.getOwner()) && i.Permission.toObject(e, r), + witness: (r = t.getWitness()) && i.Permission.toObject(e, r), + activesList: n.Message.toObjectList(t.getActivesList(), i.Permission.toObject, e) + }; + return e && (o.$jspbMessageInstance = t), + o + } + ), + TronWebProto.AccountPermissionUpdateContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.AccountPermissionUpdateContract; + return TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = new i.Permission, + t.readMessage(r, i.Permission.deserializeBinaryFromReader), + e.setOwner(r); + break; + case 3: + r = new i.Permission, + t.readMessage(r, i.Permission.deserializeBinaryFromReader), + e.setWitness(r); + break; + case 4: + r = new i.Permission, + t.readMessage(r, i.Permission.deserializeBinaryFromReader), + e.addActives(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + null != (r = e.getOwner()) && t.writeMessage(2, r, i.Permission.serializeBinaryToWriter), + null != (r = e.getWitness()) && t.writeMessage(3, r, i.Permission.serializeBinaryToWriter), + (r = e.getActivesList()).length > 0 && t.writeRepeatedMessage(4, r, i.Permission.serializeBinaryToWriter) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.getOwner = function() { + return n.Message.getWrapperField(this, i.Permission, 2) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.setOwner = function(e) { + return n.Message.setWrapperField(this, 2, e) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.clearOwner = function() { + return this.setOwner(void 0) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.hasOwner = function() { + return null != n.Message.getField(this, 2) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.getWitness = function() { + return n.Message.getWrapperField(this, i.Permission, 3) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.setWitness = function(e) { + return n.Message.setWrapperField(this, 3, e) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.clearWitness = function() { + return this.setWitness(void 0) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.hasWitness = function() { + return null != n.Message.getField(this, 3) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.getActivesList = function() { + return n.Message.getRepeatedWrapperField(this, i.Permission, 4) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.setActivesList = function(e) { + return n.Message.setRepeatedWrapperField(this, 4, e) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.addActives = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 4, e, TronWebProto.Permission, t) + } + , + TronWebProto.AccountPermissionUpdateContract.prototype.clearActivesList = function() { + return this.setActivesList([]) + } + , + o.object.extend(t, TronWebProto) + } + , + 6439: (e,t,r)=>{ + var n = r(5595) + , o = n + , s = "undefined" != typeof globalThis && globalThis || "undefined" != typeof window && window || void 0 !== s && s || "undefined" != typeof self && self || function() { + return this + } + .call(null) || Function("return this")(); + o.exportSymbol("TronWebProto.AssetIssueContract", null, s), + o.exportSymbol("TronWebProto.AssetIssueContract.FrozenSupply", null, s), + o.exportSymbol("TronWebProto.ParticipateAssetIssueContract", null, s), + o.exportSymbol("TronWebProto.TransferAssetContract", null, s), + o.exportSymbol("TronWebProto.UnfreezeAssetContract", null, s), + o.exportSymbol("TronWebProto.UpdateAssetContract", null, s), + TronWebProto.AssetIssueContract = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.AssetIssueContract.repeatedFields_, null) + } + , + o.inherits(TronWebProto.AssetIssueContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.AssetIssueContract.displayName = "TronWebProto.AssetIssueContract"), + TronWebProto.AssetIssueContract.FrozenSupply = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.AssetIssueContract.FrozenSupply, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.AssetIssueContract.FrozenSupply.displayName = "TronWebProto.AssetIssueContract.FrozenSupply"), + TronWebProto.TransferAssetContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.TransferAssetContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.TransferAssetContract.displayName = "TronWebProto.TransferAssetContract"), + TronWebProto.UnfreezeAssetContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.UnfreezeAssetContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.UnfreezeAssetContract.displayName = "TronWebProto.UnfreezeAssetContract"), + TronWebProto.UpdateAssetContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.UpdateAssetContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.UpdateAssetContract.displayName = "TronWebProto.UpdateAssetContract"), + TronWebProto.ParticipateAssetIssueContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.ParticipateAssetIssueContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.ParticipateAssetIssueContract.displayName = "TronWebProto.ParticipateAssetIssueContract"), + TronWebProto.AssetIssueContract.repeatedFields_ = [5], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.AssetIssueContract.prototype.toObject = function(e) { + return TronWebProto.AssetIssueContract.toObject(e, this) + } + , + TronWebProto.AssetIssueContract.toObject = function(e, t) { + var r = { + id: n.Message.getFieldWithDefault(t, 41, ""), + ownerAddress: t.getOwnerAddress_asB64(), + name: t.getName_asB64(), + abbr: t.getAbbr_asB64(), + totalSupply: n.Message.getFieldWithDefault(t, 4, 0), + frozenSupplyList: n.Message.toObjectList(t.getFrozenSupplyList(), TronWebProto.AssetIssueContract.FrozenSupply.toObject, e), + trxNum: n.Message.getFieldWithDefault(t, 6, 0), + precision: n.Message.getFieldWithDefault(t, 7, 0), + num: n.Message.getFieldWithDefault(t, 8, 0), + startTime: n.Message.getFieldWithDefault(t, 9, 0), + endTime: n.Message.getFieldWithDefault(t, 10, 0), + order: n.Message.getFieldWithDefault(t, 11, 0), + voteScore: n.Message.getFieldWithDefault(t, 16, 0), + description: t.getDescription_asB64(), + url: t.getUrl_asB64(), + freeAssetNetLimit: n.Message.getFieldWithDefault(t, 22, 0), + publicFreeAssetNetLimit: n.Message.getFieldWithDefault(t, 23, 0), + publicFreeAssetNetUsage: n.Message.getFieldWithDefault(t, 24, 0), + publicLatestFreeNetTime: n.Message.getFieldWithDefault(t, 25, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.AssetIssueContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.AssetIssueContract; + return TronWebProto.AssetIssueContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.AssetIssueContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 41: + var r = t.readString(); + e.setId(r); + break; + case 1: + r = t.readBytes(), + e.setOwnerAddress(r); + break; + case 2: + r = t.readBytes(), + e.setName(r); + break; + case 3: + r = t.readBytes(), + e.setAbbr(r); + break; + case 4: + r = t.readInt64(), + e.setTotalSupply(r); + break; + case 5: + r = new TronWebProto.AssetIssueContract.FrozenSupply, + t.readMessage(r, TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader), + e.addFrozenSupply(r); + break; + case 6: + r = t.readInt32(), + e.setTrxNum(r); + break; + case 7: + r = t.readInt32(), + e.setPrecision(r); + break; + case 8: + r = t.readInt32(), + e.setNum(r); + break; + case 9: + r = t.readInt64(), + e.setStartTime(r); + break; + case 10: + r = t.readInt64(), + e.setEndTime(r); + break; + case 11: + r = t.readInt64(), + e.setOrder(r); + break; + case 16: + r = t.readInt32(), + e.setVoteScore(r); + break; + case 20: + r = t.readBytes(), + e.setDescription(r); + break; + case 21: + r = t.readBytes(), + e.setUrl(r); + break; + case 22: + r = t.readInt64(), + e.setFreeAssetNetLimit(r); + break; + case 23: + r = t.readInt64(), + e.setPublicFreeAssetNetLimit(r); + break; + case 24: + r = t.readInt64(), + e.setPublicFreeAssetNetUsage(r); + break; + case 25: + r = t.readInt64(), + e.setPublicLatestFreeNetTime(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.AssetIssueContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.AssetIssueContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.AssetIssueContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getId()).length > 0 && t.writeString(41, r), + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getName_asU8()).length > 0 && t.writeBytes(2, r), + (r = e.getAbbr_asU8()).length > 0 && t.writeBytes(3, r), + 0 !== (r = e.getTotalSupply()) && t.writeInt64(4, r), + (r = e.getFrozenSupplyList()).length > 0 && t.writeRepeatedMessage(5, r, TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter), + 0 !== (r = e.getTrxNum()) && t.writeInt32(6, r), + 0 !== (r = e.getPrecision()) && t.writeInt32(7, r), + 0 !== (r = e.getNum()) && t.writeInt32(8, r), + 0 !== (r = e.getStartTime()) && t.writeInt64(9, r), + 0 !== (r = e.getEndTime()) && t.writeInt64(10, r), + 0 !== (r = e.getOrder()) && t.writeInt64(11, r), + 0 !== (r = e.getVoteScore()) && t.writeInt32(16, r), + (r = e.getDescription_asU8()).length > 0 && t.writeBytes(20, r), + (r = e.getUrl_asU8()).length > 0 && t.writeBytes(21, r), + 0 !== (r = e.getFreeAssetNetLimit()) && t.writeInt64(22, r), + 0 !== (r = e.getPublicFreeAssetNetLimit()) && t.writeInt64(23, r), + 0 !== (r = e.getPublicFreeAssetNetUsage()) && t.writeInt64(24, r), + 0 !== (r = e.getPublicLatestFreeNetTime()) && t.writeInt64(25, r) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.AssetIssueContract.FrozenSupply.prototype.toObject = function(e) { + return TronWebProto.AssetIssueContract.FrozenSupply.toObject(e, this) + } + , + TronWebProto.AssetIssueContract.FrozenSupply.toObject = function(e, t) { + var r = { + frozenAmount: n.Message.getFieldWithDefault(t, 1, 0), + frozenDays: n.Message.getFieldWithDefault(t, 2, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.AssetIssueContract.FrozenSupply; + return TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readInt64(); + e.setFrozenAmount(r); + break; + case 2: + r = t.readInt64(), + e.setFrozenDays(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.AssetIssueContract.FrozenSupply.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getFrozenAmount()) && t.writeInt64(1, r), + 0 !== (r = e.getFrozenDays()) && t.writeInt64(2, r) + } + , + TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenAmount = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenAmount = function(e) { + return n.Message.setProto3IntField(this, 1, e) + } + , + TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenDays = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenDays = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.AssetIssueContract.prototype.getId = function() { + return n.Message.getFieldWithDefault(this, 41, "") + } + , + TronWebProto.AssetIssueContract.prototype.setId = function(e) { + return n.Message.setProto3StringField(this, 41, e) + } + , + TronWebProto.AssetIssueContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.AssetIssueContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.AssetIssueContract.prototype.getName = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.AssetIssueContract.prototype.getName_asB64 = function() { + return n.Message.bytesAsB64(this.getName()) + } + , + TronWebProto.AssetIssueContract.prototype.getName_asU8 = function() { + return n.Message.bytesAsU8(this.getName()) + } + , + TronWebProto.AssetIssueContract.prototype.setName = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.AssetIssueContract.prototype.getAbbr = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.AssetIssueContract.prototype.getAbbr_asB64 = function() { + return n.Message.bytesAsB64(this.getAbbr()) + } + , + TronWebProto.AssetIssueContract.prototype.getAbbr_asU8 = function() { + return n.Message.bytesAsU8(this.getAbbr()) + } + , + TronWebProto.AssetIssueContract.prototype.setAbbr = function(e) { + return n.Message.setProto3BytesField(this, 3, e) + } + , + TronWebProto.AssetIssueContract.prototype.getTotalSupply = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setTotalSupply = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + TronWebProto.AssetIssueContract.prototype.getFrozenSupplyList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.AssetIssueContract.FrozenSupply, 5) + } + , + TronWebProto.AssetIssueContract.prototype.setFrozenSupplyList = function(e) { + return n.Message.setRepeatedWrapperField(this, 5, e) + } + , + TronWebProto.AssetIssueContract.prototype.addFrozenSupply = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 5, e, TronWebProto.AssetIssueContract.FrozenSupply, t) + } + , + TronWebProto.AssetIssueContract.prototype.clearFrozenSupplyList = function() { + return this.setFrozenSupplyList([]) + } + , + TronWebProto.AssetIssueContract.prototype.getTrxNum = function() { + return n.Message.getFieldWithDefault(this, 6, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setTrxNum = function(e) { + return n.Message.setProto3IntField(this, 6, e) + } + , + TronWebProto.AssetIssueContract.prototype.getPrecision = function() { + return n.Message.getFieldWithDefault(this, 7, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setPrecision = function(e) { + return n.Message.setProto3IntField(this, 7, e) + } + , + TronWebProto.AssetIssueContract.prototype.getNum = function() { + return n.Message.getFieldWithDefault(this, 8, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setNum = function(e) { + return n.Message.setProto3IntField(this, 8, e) + } + , + TronWebProto.AssetIssueContract.prototype.getStartTime = function() { + return n.Message.getFieldWithDefault(this, 9, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setStartTime = function(e) { + return n.Message.setProto3IntField(this, 9, e) + } + , + TronWebProto.AssetIssueContract.prototype.getEndTime = function() { + return n.Message.getFieldWithDefault(this, 10, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setEndTime = function(e) { + return n.Message.setProto3IntField(this, 10, e) + } + , + TronWebProto.AssetIssueContract.prototype.getOrder = function() { + return n.Message.getFieldWithDefault(this, 11, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setOrder = function(e) { + return n.Message.setProto3IntField(this, 11, e) + } + , + TronWebProto.AssetIssueContract.prototype.getVoteScore = function() { + return n.Message.getFieldWithDefault(this, 16, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setVoteScore = function(e) { + return n.Message.setProto3IntField(this, 16, e) + } + , + TronWebProto.AssetIssueContract.prototype.getDescription = function() { + return n.Message.getFieldWithDefault(this, 20, "") + } + , + TronWebProto.AssetIssueContract.prototype.getDescription_asB64 = function() { + return n.Message.bytesAsB64(this.getDescription()) + } + , + TronWebProto.AssetIssueContract.prototype.getDescription_asU8 = function() { + return n.Message.bytesAsU8(this.getDescription()) + } + , + TronWebProto.AssetIssueContract.prototype.setDescription = function(e) { + return n.Message.setProto3BytesField(this, 20, e) + } + , + TronWebProto.AssetIssueContract.prototype.getUrl = function() { + return n.Message.getFieldWithDefault(this, 21, "") + } + , + TronWebProto.AssetIssueContract.prototype.getUrl_asB64 = function() { + return n.Message.bytesAsB64(this.getUrl()) + } + , + TronWebProto.AssetIssueContract.prototype.getUrl_asU8 = function() { + return n.Message.bytesAsU8(this.getUrl()) + } + , + TronWebProto.AssetIssueContract.prototype.setUrl = function(e) { + return n.Message.setProto3BytesField(this, 21, e) + } + , + TronWebProto.AssetIssueContract.prototype.getFreeAssetNetLimit = function() { + return n.Message.getFieldWithDefault(this, 22, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setFreeAssetNetLimit = function(e) { + return n.Message.setProto3IntField(this, 22, e) + } + , + TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetLimit = function() { + return n.Message.getFieldWithDefault(this, 23, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetLimit = function(e) { + return n.Message.setProto3IntField(this, 23, e) + } + , + TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetUsage = function() { + return n.Message.getFieldWithDefault(this, 24, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetUsage = function(e) { + return n.Message.setProto3IntField(this, 24, e) + } + , + TronWebProto.AssetIssueContract.prototype.getPublicLatestFreeNetTime = function() { + return n.Message.getFieldWithDefault(this, 25, 0) + } + , + TronWebProto.AssetIssueContract.prototype.setPublicLatestFreeNetTime = function(e) { + return n.Message.setProto3IntField(this, 25, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.TransferAssetContract.prototype.toObject = function(e) { + return TronWebProto.TransferAssetContract.toObject(e, this) + } + , + TronWebProto.TransferAssetContract.toObject = function(e, t) { + var r = { + assetName: t.getAssetName_asB64(), + ownerAddress: t.getOwnerAddress_asB64(), + toAddress: t.getToAddress_asB64(), + amount: n.Message.getFieldWithDefault(t, 4, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.TransferAssetContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.TransferAssetContract; + return TronWebProto.TransferAssetContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.TransferAssetContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setAssetName(r); + break; + case 2: + r = t.readBytes(), + e.setOwnerAddress(r); + break; + case 3: + r = t.readBytes(), + e.setToAddress(r); + break; + case 4: + r = t.readInt64(), + e.setAmount(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.TransferAssetContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.TransferAssetContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.TransferAssetContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getAssetName_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(2, r), + (r = e.getToAddress_asU8()).length > 0 && t.writeBytes(3, r), + 0 !== (r = e.getAmount()) && t.writeInt64(4, r) + } + , + TronWebProto.TransferAssetContract.prototype.getAssetName = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.TransferAssetContract.prototype.getAssetName_asB64 = function() { + return n.Message.bytesAsB64(this.getAssetName()) + } + , + TronWebProto.TransferAssetContract.prototype.getAssetName_asU8 = function() { + return n.Message.bytesAsU8(this.getAssetName()) + } + , + TronWebProto.TransferAssetContract.prototype.setAssetName = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.TransferAssetContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.TransferAssetContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.TransferAssetContract.prototype.getToAddress = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.TransferAssetContract.prototype.getToAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getToAddress()) + } + , + TronWebProto.TransferAssetContract.prototype.getToAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getToAddress()) + } + , + TronWebProto.TransferAssetContract.prototype.setToAddress = function(e) { + return n.Message.setProto3BytesField(this, 3, e) + } + , + TronWebProto.TransferAssetContract.prototype.getAmount = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.TransferAssetContract.prototype.setAmount = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.UnfreezeAssetContract.prototype.toObject = function(e) { + return TronWebProto.UnfreezeAssetContract.toObject(e, this) + } + , + TronWebProto.UnfreezeAssetContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.UnfreezeAssetContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.UnfreezeAssetContract; + return TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + if (1 === t.getFieldNumber()) { + var r = t.readBytes(); + e.setOwnerAddress(r) + } else + t.skipField(); + return e + } + , + TronWebProto.UnfreezeAssetContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter = function(e, t) { + var r; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r) + } + , + TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.UnfreezeAssetContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.UpdateAssetContract.prototype.toObject = function(e) { + return TronWebProto.UpdateAssetContract.toObject(e, this) + } + , + TronWebProto.UpdateAssetContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + description: t.getDescription_asB64(), + url: t.getUrl_asB64(), + newLimit: n.Message.getFieldWithDefault(t, 4, 0), + newPublicLimit: n.Message.getFieldWithDefault(t, 5, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.UpdateAssetContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.UpdateAssetContract; + return TronWebProto.UpdateAssetContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.UpdateAssetContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readBytes(), + e.setDescription(r); + break; + case 3: + r = t.readBytes(), + e.setUrl(r); + break; + case 4: + r = t.readInt64(), + e.setNewLimit(r); + break; + case 5: + r = t.readInt64(), + e.setNewPublicLimit(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.UpdateAssetContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.UpdateAssetContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.UpdateAssetContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getDescription_asU8()).length > 0 && t.writeBytes(2, r), + (r = e.getUrl_asU8()).length > 0 && t.writeBytes(3, r), + 0 !== (r = e.getNewLimit()) && t.writeInt64(4, r), + 0 !== (r = e.getNewPublicLimit()) && t.writeInt64(5, r) + } + , + TronWebProto.UpdateAssetContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.UpdateAssetContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.UpdateAssetContract.prototype.getDescription = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.UpdateAssetContract.prototype.getDescription_asB64 = function() { + return n.Message.bytesAsB64(this.getDescription()) + } + , + TronWebProto.UpdateAssetContract.prototype.getDescription_asU8 = function() { + return n.Message.bytesAsU8(this.getDescription()) + } + , + TronWebProto.UpdateAssetContract.prototype.setDescription = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.UpdateAssetContract.prototype.getUrl = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.UpdateAssetContract.prototype.getUrl_asB64 = function() { + return n.Message.bytesAsB64(this.getUrl()) + } + , + TronWebProto.UpdateAssetContract.prototype.getUrl_asU8 = function() { + return n.Message.bytesAsU8(this.getUrl()) + } + , + TronWebProto.UpdateAssetContract.prototype.setUrl = function(e) { + return n.Message.setProto3BytesField(this, 3, e) + } + , + TronWebProto.UpdateAssetContract.prototype.getNewLimit = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.UpdateAssetContract.prototype.setNewLimit = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + TronWebProto.UpdateAssetContract.prototype.getNewPublicLimit = function() { + return n.Message.getFieldWithDefault(this, 5, 0) + } + , + TronWebProto.UpdateAssetContract.prototype.setNewPublicLimit = function(e) { + return n.Message.setProto3IntField(this, 5, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.ParticipateAssetIssueContract.prototype.toObject = function(e) { + return TronWebProto.ParticipateAssetIssueContract.toObject(e, this) + } + , + TronWebProto.ParticipateAssetIssueContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + toAddress: t.getToAddress_asB64(), + assetName: t.getAssetName_asB64(), + amount: n.Message.getFieldWithDefault(t, 4, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.ParticipateAssetIssueContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.ParticipateAssetIssueContract; + return TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readBytes(), + e.setToAddress(r); + break; + case 3: + r = t.readBytes(), + e.setAssetName(r); + break; + case 4: + r = t.readInt64(), + e.setAmount(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getToAddress_asU8()).length > 0 && t.writeBytes(2, r), + (r = e.getAssetName_asU8()).length > 0 && t.writeBytes(3, r), + 0 !== (r = e.getAmount()) && t.writeInt64(4, r) + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getToAddress()) + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getToAddress()) + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.setToAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asB64 = function() { + return n.Message.bytesAsB64(this.getAssetName()) + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asU8 = function() { + return n.Message.bytesAsU8(this.getAssetName()) + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.setAssetName = function(e) { + return n.Message.setProto3BytesField(this, 3, e) + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.getAmount = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.ParticipateAssetIssueContract.prototype.setAmount = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + o.object.extend(t, TronWebProto) + } + , + 1791: (e,t,r)=>{ + var n = r(5595) + , o = n + , s = "undefined" != typeof globalThis && globalThis || "undefined" != typeof window && window || void 0 !== s && s || "undefined" != typeof self && self || function() { + return this + } + .call(null) || Function("return this")() + , i = r(7764); + o.object.extend(proto, i), + o.exportSymbol("TronWebProto.AccountBalanceRequest", null, s), + o.exportSymbol("TronWebProto.AccountBalanceResponse", null, s), + o.exportSymbol("TronWebProto.AccountIdentifier", null, s), + o.exportSymbol("TronWebProto.AccountTrace", null, s), + o.exportSymbol("TronWebProto.BlockBalanceTrace", null, s), + o.exportSymbol("TronWebProto.BlockBalanceTrace.BlockIdentifier", null, s), + o.exportSymbol("TronWebProto.CancelAllUnfreezeV2Contract", null, s), + o.exportSymbol("TronWebProto.DelegateResourceContract", null, s), + o.exportSymbol("TronWebProto.FreezeBalanceContract", null, s), + o.exportSymbol("TronWebProto.FreezeBalanceV2Contract", null, s), + o.exportSymbol("TronWebProto.TransactionBalanceTrace", null, s), + o.exportSymbol("TronWebProto.TransactionBalanceTrace.Operation", null, s), + o.exportSymbol("TronWebProto.TransferContract", null, s), + o.exportSymbol("TronWebProto.UnDelegateResourceContract", null, s), + o.exportSymbol("TronWebProto.UnfreezeBalanceContract", null, s), + o.exportSymbol("TronWebProto.UnfreezeBalanceV2Contract", null, s), + o.exportSymbol("TronWebProto.WithdrawBalanceContract", null, s), + o.exportSymbol("TronWebProto.WithdrawExpireUnfreezeContract", null, s), + TronWebProto.FreezeBalanceContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.FreezeBalanceContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.FreezeBalanceContract.displayName = "TronWebProto.FreezeBalanceContract"), + TronWebProto.UnfreezeBalanceContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.UnfreezeBalanceContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.UnfreezeBalanceContract.displayName = "TronWebProto.UnfreezeBalanceContract"), + TronWebProto.WithdrawBalanceContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.WithdrawBalanceContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.WithdrawBalanceContract.displayName = "TronWebProto.WithdrawBalanceContract"), + TronWebProto.TransferContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.TransferContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.TransferContract.displayName = "TronWebProto.TransferContract"), + TronWebProto.TransactionBalanceTrace = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.TransactionBalanceTrace.repeatedFields_, null) + } + , + o.inherits(TronWebProto.TransactionBalanceTrace, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.TransactionBalanceTrace.displayName = "TronWebProto.TransactionBalanceTrace"), + TronWebProto.TransactionBalanceTrace.Operation = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.TransactionBalanceTrace.Operation, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.TransactionBalanceTrace.Operation.displayName = "TronWebProto.TransactionBalanceTrace.Operation"), + TronWebProto.BlockBalanceTrace = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.BlockBalanceTrace.repeatedFields_, null) + } + , + o.inherits(TronWebProto.BlockBalanceTrace, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.BlockBalanceTrace.displayName = "TronWebProto.BlockBalanceTrace"), + TronWebProto.BlockBalanceTrace.BlockIdentifier = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.BlockBalanceTrace.BlockIdentifier, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.BlockBalanceTrace.BlockIdentifier.displayName = "TronWebProto.BlockBalanceTrace.BlockIdentifier"), + TronWebProto.AccountTrace = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.AccountTrace, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.AccountTrace.displayName = "TronWebProto.AccountTrace"), + TronWebProto.AccountIdentifier = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.AccountIdentifier, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.AccountIdentifier.displayName = "TronWebProto.AccountIdentifier"), + TronWebProto.AccountBalanceRequest = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.AccountBalanceRequest, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.AccountBalanceRequest.displayName = "TronWebProto.AccountBalanceRequest"), + TronWebProto.AccountBalanceResponse = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.AccountBalanceResponse, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.AccountBalanceResponse.displayName = "TronWebProto.AccountBalanceResponse"), + TronWebProto.FreezeBalanceV2Contract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.FreezeBalanceV2Contract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.FreezeBalanceV2Contract.displayName = "TronWebProto.FreezeBalanceV2Contract"), + TronWebProto.UnfreezeBalanceV2Contract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.UnfreezeBalanceV2Contract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.UnfreezeBalanceV2Contract.displayName = "TronWebProto.UnfreezeBalanceV2Contract"), + TronWebProto.WithdrawExpireUnfreezeContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.WithdrawExpireUnfreezeContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.WithdrawExpireUnfreezeContract.displayName = "TronWebProto.WithdrawExpireUnfreezeContract"), + TronWebProto.DelegateResourceContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.DelegateResourceContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.DelegateResourceContract.displayName = "TronWebProto.DelegateResourceContract"), + TronWebProto.UnDelegateResourceContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.UnDelegateResourceContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.UnDelegateResourceContract.displayName = "TronWebProto.UnDelegateResourceContract"), + TronWebProto.CancelAllUnfreezeV2Contract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.CancelAllUnfreezeV2Contract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.CancelAllUnfreezeV2Contract.displayName = "TronWebProto.CancelAllUnfreezeV2Contract"), + n.Message.GENERATE_TO_OBJECT && (TronWebProto.FreezeBalanceContract.prototype.toObject = function(e) { + return TronWebProto.FreezeBalanceContract.toObject(e, this) + } + , + TronWebProto.FreezeBalanceContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + frozenBalance: n.Message.getFieldWithDefault(t, 2, 0), + frozenDuration: n.Message.getFieldWithDefault(t, 3, 0), + resource: n.Message.getFieldWithDefault(t, 10, 0), + receiverAddress: t.getReceiverAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.FreezeBalanceContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.FreezeBalanceContract; + return TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt64(), + e.setFrozenBalance(r); + break; + case 3: + r = t.readInt64(), + e.setFrozenDuration(r); + break; + case 10: + r = t.readEnum(), + e.setResource(r); + break; + case 15: + r = t.readBytes(), + e.setReceiverAddress(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.FreezeBalanceContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.FreezeBalanceContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.FreezeBalanceContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getFrozenBalance()) && t.writeInt64(2, r), + 0 !== (r = e.getFrozenDuration()) && t.writeInt64(3, r), + 0 !== (r = e.getResource()) && t.writeEnum(10, r), + (r = e.getReceiverAddress_asU8()).length > 0 && t.writeBytes(15, r) + } + , + TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.FreezeBalanceContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.FreezeBalanceContract.prototype.getFrozenBalance = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.FreezeBalanceContract.prototype.setFrozenBalance = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.FreezeBalanceContract.prototype.getFrozenDuration = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.FreezeBalanceContract.prototype.setFrozenDuration = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.FreezeBalanceContract.prototype.getResource = function() { + return n.Message.getFieldWithDefault(this, 10, 0) + } + , + TronWebProto.FreezeBalanceContract.prototype.setResource = function(e) { + return n.Message.setProto3EnumField(this, 10, e) + } + , + TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress = function() { + return n.Message.getFieldWithDefault(this, 15, "") + } + , + TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getReceiverAddress()) + } + , + TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getReceiverAddress()) + } + , + TronWebProto.FreezeBalanceContract.prototype.setReceiverAddress = function(e) { + return n.Message.setProto3BytesField(this, 15, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.UnfreezeBalanceContract.prototype.toObject = function(e) { + return TronWebProto.UnfreezeBalanceContract.toObject(e, this) + } + , + TronWebProto.UnfreezeBalanceContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + resource: n.Message.getFieldWithDefault(t, 10, 0), + receiverAddress: t.getReceiverAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.UnfreezeBalanceContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.UnfreezeBalanceContract; + return TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 10: + r = t.readEnum(), + e.setResource(r); + break; + case 15: + r = t.readBytes(), + e.setReceiverAddress(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.UnfreezeBalanceContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getResource()) && t.writeEnum(10, r), + (r = e.getReceiverAddress_asU8()).length > 0 && t.writeBytes(15, r) + } + , + TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.UnfreezeBalanceContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.UnfreezeBalanceContract.prototype.getResource = function() { + return n.Message.getFieldWithDefault(this, 10, 0) + } + , + TronWebProto.UnfreezeBalanceContract.prototype.setResource = function(e) { + return n.Message.setProto3EnumField(this, 10, e) + } + , + TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress = function() { + return n.Message.getFieldWithDefault(this, 15, "") + } + , + TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getReceiverAddress()) + } + , + TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getReceiverAddress()) + } + , + TronWebProto.UnfreezeBalanceContract.prototype.setReceiverAddress = function(e) { + return n.Message.setProto3BytesField(this, 15, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.WithdrawBalanceContract.prototype.toObject = function(e) { + return TronWebProto.WithdrawBalanceContract.toObject(e, this) + } + , + TronWebProto.WithdrawBalanceContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.WithdrawBalanceContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.WithdrawBalanceContract; + return TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + if (1 === t.getFieldNumber()) { + var r = t.readBytes(); + e.setOwnerAddress(r) + } else + t.skipField(); + return e + } + , + TronWebProto.WithdrawBalanceContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter = function(e, t) { + var r; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r) + } + , + TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.WithdrawBalanceContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.TransferContract.prototype.toObject = function(e) { + return TronWebProto.TransferContract.toObject(e, this) + } + , + TronWebProto.TransferContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + toAddress: t.getToAddress_asB64(), + amount: n.Message.getFieldWithDefault(t, 3, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.TransferContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.TransferContract; + return TronWebProto.TransferContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.TransferContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readBytes(), + e.setToAddress(r); + break; + case 3: + r = t.readInt64(), + e.setAmount(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.TransferContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.TransferContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.TransferContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getToAddress_asU8()).length > 0 && t.writeBytes(2, r), + 0 !== (r = e.getAmount()) && t.writeInt64(3, r) + } + , + TronWebProto.TransferContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.TransferContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.TransferContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.TransferContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.TransferContract.prototype.getToAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.TransferContract.prototype.getToAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getToAddress()) + } + , + TronWebProto.TransferContract.prototype.getToAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getToAddress()) + } + , + TronWebProto.TransferContract.prototype.setToAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.TransferContract.prototype.getAmount = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.TransferContract.prototype.setAmount = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.TransactionBalanceTrace.repeatedFields_ = [2], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.TransactionBalanceTrace.prototype.toObject = function(e) { + return TronWebProto.TransactionBalanceTrace.toObject(e, this) + } + , + TronWebProto.TransactionBalanceTrace.toObject = function(e, t) { + var r = { + transactionIdentifier: t.getTransactionIdentifier_asB64(), + operationList: n.Message.toObjectList(t.getOperationList(), TronWebProto.TransactionBalanceTrace.Operation.toObject, e), + type: n.Message.getFieldWithDefault(t, 3, ""), + status: n.Message.getFieldWithDefault(t, 4, "") + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.TransactionBalanceTrace.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.TransactionBalanceTrace; + return TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setTransactionIdentifier(r); + break; + case 2: + r = new TronWebProto.TransactionBalanceTrace.Operation, + t.readMessage(r, TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader), + e.addOperation(r); + break; + case 3: + r = t.readString(), + e.setType(r); + break; + case 4: + r = t.readString(), + e.setStatus(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.TransactionBalanceTrace.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getTransactionIdentifier_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getOperationList()).length > 0 && t.writeRepeatedMessage(2, r, TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter), + (r = e.getType()).length > 0 && t.writeString(3, r), + (r = e.getStatus()).length > 0 && t.writeString(4, r) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.TransactionBalanceTrace.Operation.prototype.toObject = function(e) { + return TronWebProto.TransactionBalanceTrace.Operation.toObject(e, this) + } + , + TronWebProto.TransactionBalanceTrace.Operation.toObject = function(e, t) { + var r = { + operationIdentifier: n.Message.getFieldWithDefault(t, 1, 0), + address: t.getAddress_asB64(), + amount: n.Message.getFieldWithDefault(t, 3, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.TransactionBalanceTrace.Operation.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.TransactionBalanceTrace.Operation; + return TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readInt64(); + e.setOperationIdentifier(r); + break; + case 2: + r = t.readBytes(), + e.setAddress(r); + break; + case 3: + r = t.readInt64(), + e.setAmount(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.TransactionBalanceTrace.Operation.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getOperationIdentifier()) && t.writeInt64(1, r), + (r = e.getAddress_asU8()).length > 0 && t.writeBytes(2, r), + 0 !== (r = e.getAmount()) && t.writeInt64(3, r) + } + , + TronWebProto.TransactionBalanceTrace.Operation.prototype.getOperationIdentifier = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.TransactionBalanceTrace.Operation.prototype.setOperationIdentifier = function(e) { + return n.Message.setProto3IntField(this, 1, e) + } + , + TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getAddress()) + } + , + TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getAddress()) + } + , + TronWebProto.TransactionBalanceTrace.Operation.prototype.setAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.TransactionBalanceTrace.Operation.prototype.getAmount = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.TransactionBalanceTrace.Operation.prototype.setAmount = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asB64 = function() { + return n.Message.bytesAsB64(this.getTransactionIdentifier()) + } + , + TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asU8 = function() { + return n.Message.bytesAsU8(this.getTransactionIdentifier()) + } + , + TronWebProto.TransactionBalanceTrace.prototype.setTransactionIdentifier = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.TransactionBalanceTrace.prototype.getOperationList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.TransactionBalanceTrace.Operation, 2) + } + , + TronWebProto.TransactionBalanceTrace.prototype.setOperationList = function(e) { + return n.Message.setRepeatedWrapperField(this, 2, e) + } + , + TronWebProto.TransactionBalanceTrace.prototype.addOperation = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 2, e, TronWebProto.TransactionBalanceTrace.Operation, t) + } + , + TronWebProto.TransactionBalanceTrace.prototype.clearOperationList = function() { + return this.setOperationList([]) + } + , + TronWebProto.TransactionBalanceTrace.prototype.getType = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.TransactionBalanceTrace.prototype.setType = function(e) { + return n.Message.setProto3StringField(this, 3, e) + } + , + TronWebProto.TransactionBalanceTrace.prototype.getStatus = function() { + return n.Message.getFieldWithDefault(this, 4, "") + } + , + TronWebProto.TransactionBalanceTrace.prototype.setStatus = function(e) { + return n.Message.setProto3StringField(this, 4, e) + } + , + TronWebProto.BlockBalanceTrace.repeatedFields_ = [3], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.BlockBalanceTrace.prototype.toObject = function(e) { + return TronWebProto.BlockBalanceTrace.toObject(e, this) + } + , + TronWebProto.BlockBalanceTrace.toObject = function(e, t) { + var r, o = { + blockIdentifier: (r = t.getBlockIdentifier()) && TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e, r), + timestamp: n.Message.getFieldWithDefault(t, 2, 0), + transactionBalanceTraceList: n.Message.toObjectList(t.getTransactionBalanceTraceList(), TronWebProto.TransactionBalanceTrace.toObject, e) + }; + return e && (o.$jspbMessageInstance = t), + o + } + ), + TronWebProto.BlockBalanceTrace.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.BlockBalanceTrace; + return TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = new TronWebProto.BlockBalanceTrace.BlockIdentifier; + t.readMessage(r, TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader), + e.setBlockIdentifier(r); + break; + case 2: + r = t.readInt64(), + e.setTimestamp(r); + break; + case 3: + r = new TronWebProto.TransactionBalanceTrace, + t.readMessage(r, TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader), + e.addTransactionBalanceTrace(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.BlockBalanceTrace.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.BlockBalanceTrace.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.BlockBalanceTrace.serializeBinaryToWriter = function(e, t) { + var r = void 0; + null != (r = e.getBlockIdentifier()) && t.writeMessage(1, r, TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter), + 0 !== (r = e.getTimestamp()) && t.writeInt64(2, r), + (r = e.getTransactionBalanceTraceList()).length > 0 && t.writeRepeatedMessage(3, r, TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.toObject = function(e) { + return TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e, this) + } + , + TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject = function(e, t) { + var r = { + hash: t.getHash_asB64(), + number: n.Message.getFieldWithDefault(t, 2, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.BlockBalanceTrace.BlockIdentifier; + return TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setHash(r); + break; + case 2: + r = t.readInt64(), + e.setNumber(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getHash_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getNumber()) && t.writeInt64(2, r) + } + , + TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asB64 = function() { + return n.Message.bytesAsB64(this.getHash()) + } + , + TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asU8 = function() { + return n.Message.bytesAsU8(this.getHash()) + } + , + TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setHash = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getNumber = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setNumber = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.BlockBalanceTrace.prototype.getBlockIdentifier = function() { + return n.Message.getWrapperField(this, TronWebProto.BlockBalanceTrace.BlockIdentifier, 1) + } + , + TronWebProto.BlockBalanceTrace.prototype.setBlockIdentifier = function(e) { + return n.Message.setWrapperField(this, 1, e) + } + , + TronWebProto.BlockBalanceTrace.prototype.clearBlockIdentifier = function() { + return this.setBlockIdentifier(void 0) + } + , + TronWebProto.BlockBalanceTrace.prototype.hasBlockIdentifier = function() { + return null != n.Message.getField(this, 1) + } + , + TronWebProto.BlockBalanceTrace.prototype.getTimestamp = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.BlockBalanceTrace.prototype.setTimestamp = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.BlockBalanceTrace.prototype.getTransactionBalanceTraceList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.TransactionBalanceTrace, 3) + } + , + TronWebProto.BlockBalanceTrace.prototype.setTransactionBalanceTraceList = function(e) { + return n.Message.setRepeatedWrapperField(this, 3, e) + } + , + TronWebProto.BlockBalanceTrace.prototype.addTransactionBalanceTrace = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 3, e, TronWebProto.TransactionBalanceTrace, t) + } + , + TronWebProto.BlockBalanceTrace.prototype.clearTransactionBalanceTraceList = function() { + return this.setTransactionBalanceTraceList([]) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.AccountTrace.prototype.toObject = function(e) { + return TronWebProto.AccountTrace.toObject(e, this) + } + , + TronWebProto.AccountTrace.toObject = function(e, t) { + var r = { + balance: n.Message.getFieldWithDefault(t, 1, 0), + placeholder: n.Message.getFieldWithDefault(t, 99, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.AccountTrace.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.AccountTrace; + return TronWebProto.AccountTrace.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.AccountTrace.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readInt64(); + e.setBalance(r); + break; + case 99: + r = t.readInt64(), + e.setPlaceholder(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.AccountTrace.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.AccountTrace.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.AccountTrace.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getBalance()) && t.writeInt64(1, r), + 0 !== (r = e.getPlaceholder()) && t.writeInt64(99, r) + } + , + TronWebProto.AccountTrace.prototype.getBalance = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.AccountTrace.prototype.setBalance = function(e) { + return n.Message.setProto3IntField(this, 1, e) + } + , + TronWebProto.AccountTrace.prototype.getPlaceholder = function() { + return n.Message.getFieldWithDefault(this, 99, 0) + } + , + TronWebProto.AccountTrace.prototype.setPlaceholder = function(e) { + return n.Message.setProto3IntField(this, 99, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.AccountIdentifier.prototype.toObject = function(e) { + return TronWebProto.AccountIdentifier.toObject(e, this) + } + , + TronWebProto.AccountIdentifier.toObject = function(e, t) { + var r = { + address: t.getAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.AccountIdentifier.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.AccountIdentifier; + return TronWebProto.AccountIdentifier.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.AccountIdentifier.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + if (1 === t.getFieldNumber()) { + var r = t.readBytes(); + e.setAddress(r) + } else + t.skipField(); + return e + } + , + TronWebProto.AccountIdentifier.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.AccountIdentifier.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.AccountIdentifier.serializeBinaryToWriter = function(e, t) { + var r; + (r = e.getAddress_asU8()).length > 0 && t.writeBytes(1, r) + } + , + TronWebProto.AccountIdentifier.prototype.getAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.AccountIdentifier.prototype.getAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getAddress()) + } + , + TronWebProto.AccountIdentifier.prototype.getAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getAddress()) + } + , + TronWebProto.AccountIdentifier.prototype.setAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.AccountBalanceRequest.prototype.toObject = function(e) { + return TronWebProto.AccountBalanceRequest.toObject(e, this) + } + , + TronWebProto.AccountBalanceRequest.toObject = function(e, t) { + var r, n = { + accountIdentifier: (r = t.getAccountIdentifier()) && TronWebProto.AccountIdentifier.toObject(e, r), + blockIdentifier: (r = t.getBlockIdentifier()) && TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e, r) + }; + return e && (n.$jspbMessageInstance = t), + n + } + ), + TronWebProto.AccountBalanceRequest.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.AccountBalanceRequest; + return TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = new TronWebProto.AccountIdentifier; + t.readMessage(r, TronWebProto.AccountIdentifier.deserializeBinaryFromReader), + e.setAccountIdentifier(r); + break; + case 2: + r = new TronWebProto.BlockBalanceTrace.BlockIdentifier, + t.readMessage(r, TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader), + e.setBlockIdentifier(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.AccountBalanceRequest.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.AccountBalanceRequest.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.AccountBalanceRequest.serializeBinaryToWriter = function(e, t) { + var r = void 0; + null != (r = e.getAccountIdentifier()) && t.writeMessage(1, r, TronWebProto.AccountIdentifier.serializeBinaryToWriter), + null != (r = e.getBlockIdentifier()) && t.writeMessage(2, r, TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter) + } + , + TronWebProto.AccountBalanceRequest.prototype.getAccountIdentifier = function() { + return n.Message.getWrapperField(this, TronWebProto.AccountIdentifier, 1) + } + , + TronWebProto.AccountBalanceRequest.prototype.setAccountIdentifier = function(e) { + return n.Message.setWrapperField(this, 1, e) + } + , + TronWebProto.AccountBalanceRequest.prototype.clearAccountIdentifier = function() { + return this.setAccountIdentifier(void 0) + } + , + TronWebProto.AccountBalanceRequest.prototype.hasAccountIdentifier = function() { + return null != n.Message.getField(this, 1) + } + , + TronWebProto.AccountBalanceRequest.prototype.getBlockIdentifier = function() { + return n.Message.getWrapperField(this, TronWebProto.BlockBalanceTrace.BlockIdentifier, 2) + } + , + TronWebProto.AccountBalanceRequest.prototype.setBlockIdentifier = function(e) { + return n.Message.setWrapperField(this, 2, e) + } + , + TronWebProto.AccountBalanceRequest.prototype.clearBlockIdentifier = function() { + return this.setBlockIdentifier(void 0) + } + , + TronWebProto.AccountBalanceRequest.prototype.hasBlockIdentifier = function() { + return null != n.Message.getField(this, 2) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.AccountBalanceResponse.prototype.toObject = function(e) { + return TronWebProto.AccountBalanceResponse.toObject(e, this) + } + , + TronWebProto.AccountBalanceResponse.toObject = function(e, t) { + var r, o = { + balance: n.Message.getFieldWithDefault(t, 1, 0), + blockIdentifier: (r = t.getBlockIdentifier()) && TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e, r) + }; + return e && (o.$jspbMessageInstance = t), + o + } + ), + TronWebProto.AccountBalanceResponse.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.AccountBalanceResponse; + return TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readInt64(); + e.setBalance(r); + break; + case 2: + r = new TronWebProto.BlockBalanceTrace.BlockIdentifier, + t.readMessage(r, TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader), + e.setBlockIdentifier(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.AccountBalanceResponse.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.AccountBalanceResponse.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.AccountBalanceResponse.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getBalance()) && t.writeInt64(1, r), + null != (r = e.getBlockIdentifier()) && t.writeMessage(2, r, TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter) + } + , + TronWebProto.AccountBalanceResponse.prototype.getBalance = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.AccountBalanceResponse.prototype.setBalance = function(e) { + return n.Message.setProto3IntField(this, 1, e) + } + , + TronWebProto.AccountBalanceResponse.prototype.getBlockIdentifier = function() { + return n.Message.getWrapperField(this, TronWebProto.BlockBalanceTrace.BlockIdentifier, 2) + } + , + TronWebProto.AccountBalanceResponse.prototype.setBlockIdentifier = function(e) { + return n.Message.setWrapperField(this, 2, e) + } + , + TronWebProto.AccountBalanceResponse.prototype.clearBlockIdentifier = function() { + return this.setBlockIdentifier(void 0) + } + , + TronWebProto.AccountBalanceResponse.prototype.hasBlockIdentifier = function() { + return null != n.Message.getField(this, 2) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.FreezeBalanceV2Contract.prototype.toObject = function(e) { + return TronWebProto.FreezeBalanceV2Contract.toObject(e, this) + } + , + TronWebProto.FreezeBalanceV2Contract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + frozenBalance: n.Message.getFieldWithDefault(t, 2, 0), + resource: n.Message.getFieldWithDefault(t, 3, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.FreezeBalanceV2Contract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.FreezeBalanceV2Contract; + return TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt64(), + e.setFrozenBalance(r); + break; + case 3: + r = t.readEnum(), + e.setResource(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.FreezeBalanceV2Contract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getFrozenBalance()) && t.writeInt64(2, r), + 0 !== (r = e.getResource()) && t.writeEnum(3, r) + } + , + TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.FreezeBalanceV2Contract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.FreezeBalanceV2Contract.prototype.getFrozenBalance = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.FreezeBalanceV2Contract.prototype.setFrozenBalance = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.FreezeBalanceV2Contract.prototype.getResource = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.FreezeBalanceV2Contract.prototype.setResource = function(e) { + return n.Message.setProto3EnumField(this, 3, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.UnfreezeBalanceV2Contract.prototype.toObject = function(e) { + return TronWebProto.UnfreezeBalanceV2Contract.toObject(e, this) + } + , + TronWebProto.UnfreezeBalanceV2Contract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + unfreezeBalance: n.Message.getFieldWithDefault(t, 2, 0), + resource: n.Message.getFieldWithDefault(t, 3, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.UnfreezeBalanceV2Contract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.UnfreezeBalanceV2Contract; + return TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt64(), + e.setUnfreezeBalance(r); + break; + case 3: + r = t.readEnum(), + e.setResource(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.UnfreezeBalanceV2Contract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getUnfreezeBalance()) && t.writeInt64(2, r), + 0 !== (r = e.getResource()) && t.writeEnum(3, r) + } + , + TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.UnfreezeBalanceV2Contract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.UnfreezeBalanceV2Contract.prototype.getUnfreezeBalance = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.UnfreezeBalanceV2Contract.prototype.setUnfreezeBalance = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.UnfreezeBalanceV2Contract.prototype.getResource = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.UnfreezeBalanceV2Contract.prototype.setResource = function(e) { + return n.Message.setProto3EnumField(this, 3, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.WithdrawExpireUnfreezeContract.prototype.toObject = function(e) { + return TronWebProto.WithdrawExpireUnfreezeContract.toObject(e, this) + } + , + TronWebProto.WithdrawExpireUnfreezeContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.WithdrawExpireUnfreezeContract; + return TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + if (1 === t.getFieldNumber()) { + var r = t.readBytes(); + e.setOwnerAddress(r) + } else + t.skipField(); + return e + } + , + TronWebProto.WithdrawExpireUnfreezeContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter = function(e, t) { + var r; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r) + } + , + TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.WithdrawExpireUnfreezeContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.DelegateResourceContract.prototype.toObject = function(e) { + return TronWebProto.DelegateResourceContract.toObject(e, this) + } + , + TronWebProto.DelegateResourceContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + resource: n.Message.getFieldWithDefault(t, 2, 0), + balance: n.Message.getFieldWithDefault(t, 3, 0), + receiverAddress: t.getReceiverAddress_asB64(), + lock: n.Message.getBooleanFieldWithDefault(t, 5, !1), + lockPeriod: n.Message.getFieldWithDefault(t, 6, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.DelegateResourceContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.DelegateResourceContract; + return TronWebProto.DelegateResourceContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.DelegateResourceContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readEnum(), + e.setResource(r); + break; + case 3: + r = t.readInt64(), + e.setBalance(r); + break; + case 4: + r = t.readBytes(), + e.setReceiverAddress(r); + break; + case 5: + r = t.readBool(), + e.setLock(r); + break; + case 6: + r = t.readInt64(), + e.setLockPeriod(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.DelegateResourceContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.DelegateResourceContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.DelegateResourceContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getResource()) && t.writeEnum(2, r), + 0 !== (r = e.getBalance()) && t.writeInt64(3, r), + (r = e.getReceiverAddress_asU8()).length > 0 && t.writeBytes(4, r), + (r = e.getLock()) && t.writeBool(5, r), + 0 !== (r = e.getLockPeriod()) && t.writeInt64(6, r) + } + , + TronWebProto.DelegateResourceContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.DelegateResourceContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.DelegateResourceContract.prototype.getResource = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.DelegateResourceContract.prototype.setResource = function(e) { + return n.Message.setProto3EnumField(this, 2, e) + } + , + TronWebProto.DelegateResourceContract.prototype.getBalance = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.DelegateResourceContract.prototype.setBalance = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.DelegateResourceContract.prototype.getReceiverAddress = function() { + return n.Message.getFieldWithDefault(this, 4, "") + } + , + TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getReceiverAddress()) + } + , + TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getReceiverAddress()) + } + , + TronWebProto.DelegateResourceContract.prototype.setReceiverAddress = function(e) { + return n.Message.setProto3BytesField(this, 4, e) + } + , + TronWebProto.DelegateResourceContract.prototype.getLock = function() { + return n.Message.getBooleanFieldWithDefault(this, 5, !1) + } + , + TronWebProto.DelegateResourceContract.prototype.setLock = function(e) { + return n.Message.setProto3BooleanField(this, 5, e) + } + , + TronWebProto.DelegateResourceContract.prototype.getLockPeriod = function() { + return n.Message.getFieldWithDefault(this, 6, 0) + } + , + TronWebProto.DelegateResourceContract.prototype.setLockPeriod = function(e) { + return n.Message.setProto3IntField(this, 6, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.UnDelegateResourceContract.prototype.toObject = function(e) { + return TronWebProto.UnDelegateResourceContract.toObject(e, this) + } + , + TronWebProto.UnDelegateResourceContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + resource: n.Message.getFieldWithDefault(t, 2, 0), + balance: n.Message.getFieldWithDefault(t, 3, 0), + receiverAddress: t.getReceiverAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.UnDelegateResourceContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.UnDelegateResourceContract; + return TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readEnum(), + e.setResource(r); + break; + case 3: + r = t.readInt64(), + e.setBalance(r); + break; + case 4: + r = t.readBytes(), + e.setReceiverAddress(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.UnDelegateResourceContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getResource()) && t.writeEnum(2, r), + 0 !== (r = e.getBalance()) && t.writeInt64(3, r), + (r = e.getReceiverAddress_asU8()).length > 0 && t.writeBytes(4, r) + } + , + TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.UnDelegateResourceContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.UnDelegateResourceContract.prototype.getResource = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.UnDelegateResourceContract.prototype.setResource = function(e) { + return n.Message.setProto3EnumField(this, 2, e) + } + , + TronWebProto.UnDelegateResourceContract.prototype.getBalance = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.UnDelegateResourceContract.prototype.setBalance = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress = function() { + return n.Message.getFieldWithDefault(this, 4, "") + } + , + TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getReceiverAddress()) + } + , + TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getReceiverAddress()) + } + , + TronWebProto.UnDelegateResourceContract.prototype.setReceiverAddress = function(e) { + return n.Message.setProto3BytesField(this, 4, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.CancelAllUnfreezeV2Contract.prototype.toObject = function(e) { + return TronWebProto.CancelAllUnfreezeV2Contract.toObject(e, this) + } + , + TronWebProto.CancelAllUnfreezeV2Contract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.CancelAllUnfreezeV2Contract; + return TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + if (1 === t.getFieldNumber()) { + var r = t.readBytes(); + e.setOwnerAddress(r) + } else + t.skipField(); + return e + } + , + TronWebProto.CancelAllUnfreezeV2Contract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter = function(e, t) { + var r; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r) + } + , + TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.CancelAllUnfreezeV2Contract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + o.object.extend(t, TronWebProto) + } + , + 7764: (e,t,r)=>{ + var n = r(5595) + , o = "undefined" != typeof globalThis && globalThis || "undefined" != typeof window && window || void 0 !== o && o || "undefined" != typeof self && self || function() { + return this + } + .call(null) || Function("return this")(); + n.exportSymbol("TronWebProto.ResourceCode", null, o), + TronWebProto.ResourceCode = { + BANDWIDTH: 0, + ENERGY: 1, + TRON_POWER: 2 + }, + n.object.extend(t, TronWebProto) + } + , + 9520: (e,t,r)=>{ + var n = r(5595) + , o = n + , s = "undefined" != typeof globalThis && globalThis || "undefined" != typeof window && window || void 0 !== s && s || "undefined" != typeof self && self || function() { + return this + } + .call(null) || Function("return this")(); + o.exportSymbol("TronWebProto.ExchangeCreateContract", null, s), + o.exportSymbol("TronWebProto.ExchangeInjectContract", null, s), + o.exportSymbol("TronWebProto.ExchangeTransactionContract", null, s), + o.exportSymbol("TronWebProto.ExchangeWithdrawContract", null, s), + TronWebProto.ExchangeCreateContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.ExchangeCreateContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.ExchangeCreateContract.displayName = "TronWebProto.ExchangeCreateContract"), + TronWebProto.ExchangeInjectContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.ExchangeInjectContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.ExchangeInjectContract.displayName = "TronWebProto.ExchangeInjectContract"), + TronWebProto.ExchangeWithdrawContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.ExchangeWithdrawContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.ExchangeWithdrawContract.displayName = "TronWebProto.ExchangeWithdrawContract"), + TronWebProto.ExchangeTransactionContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.ExchangeTransactionContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.ExchangeTransactionContract.displayName = "TronWebProto.ExchangeTransactionContract"), + n.Message.GENERATE_TO_OBJECT && (TronWebProto.ExchangeCreateContract.prototype.toObject = function(e) { + return TronWebProto.ExchangeCreateContract.toObject(e, this) + } + , + TronWebProto.ExchangeCreateContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + firstTokenId: t.getFirstTokenId_asB64(), + firstTokenBalance: n.Message.getFieldWithDefault(t, 3, 0), + secondTokenId: t.getSecondTokenId_asB64(), + secondTokenBalance: n.Message.getFieldWithDefault(t, 5, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.ExchangeCreateContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.ExchangeCreateContract; + return TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readBytes(), + e.setFirstTokenId(r); + break; + case 3: + r = t.readInt64(), + e.setFirstTokenBalance(r); + break; + case 4: + r = t.readBytes(), + e.setSecondTokenId(r); + break; + case 5: + r = t.readInt64(), + e.setSecondTokenBalance(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.ExchangeCreateContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.ExchangeCreateContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.ExchangeCreateContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getFirstTokenId_asU8()).length > 0 && t.writeBytes(2, r), + 0 !== (r = e.getFirstTokenBalance()) && t.writeInt64(3, r), + (r = e.getSecondTokenId_asU8()).length > 0 && t.writeBytes(4, r), + 0 !== (r = e.getSecondTokenBalance()) && t.writeInt64(5, r) + } + , + TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.ExchangeCreateContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asB64 = function() { + return n.Message.bytesAsB64(this.getFirstTokenId()) + } + , + TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asU8 = function() { + return n.Message.bytesAsU8(this.getFirstTokenId()) + } + , + TronWebProto.ExchangeCreateContract.prototype.setFirstTokenId = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.ExchangeCreateContract.prototype.getFirstTokenBalance = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.ExchangeCreateContract.prototype.setFirstTokenBalance = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId = function() { + return n.Message.getFieldWithDefault(this, 4, "") + } + , + TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asB64 = function() { + return n.Message.bytesAsB64(this.getSecondTokenId()) + } + , + TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asU8 = function() { + return n.Message.bytesAsU8(this.getSecondTokenId()) + } + , + TronWebProto.ExchangeCreateContract.prototype.setSecondTokenId = function(e) { + return n.Message.setProto3BytesField(this, 4, e) + } + , + TronWebProto.ExchangeCreateContract.prototype.getSecondTokenBalance = function() { + return n.Message.getFieldWithDefault(this, 5, 0) + } + , + TronWebProto.ExchangeCreateContract.prototype.setSecondTokenBalance = function(e) { + return n.Message.setProto3IntField(this, 5, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.ExchangeInjectContract.prototype.toObject = function(e) { + return TronWebProto.ExchangeInjectContract.toObject(e, this) + } + , + TronWebProto.ExchangeInjectContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + exchangeId: n.Message.getFieldWithDefault(t, 2, 0), + tokenId: t.getTokenId_asB64(), + quant: n.Message.getFieldWithDefault(t, 4, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.ExchangeInjectContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.ExchangeInjectContract; + return TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt64(), + e.setExchangeId(r); + break; + case 3: + r = t.readBytes(), + e.setTokenId(r); + break; + case 4: + r = t.readInt64(), + e.setQuant(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.ExchangeInjectContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.ExchangeInjectContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.ExchangeInjectContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getExchangeId()) && t.writeInt64(2, r), + (r = e.getTokenId_asU8()).length > 0 && t.writeBytes(3, r), + 0 !== (r = e.getQuant()) && t.writeInt64(4, r) + } + , + TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.ExchangeInjectContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.ExchangeInjectContract.prototype.getExchangeId = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.ExchangeInjectContract.prototype.setExchangeId = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.ExchangeInjectContract.prototype.getTokenId = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.ExchangeInjectContract.prototype.getTokenId_asB64 = function() { + return n.Message.bytesAsB64(this.getTokenId()) + } + , + TronWebProto.ExchangeInjectContract.prototype.getTokenId_asU8 = function() { + return n.Message.bytesAsU8(this.getTokenId()) + } + , + TronWebProto.ExchangeInjectContract.prototype.setTokenId = function(e) { + return n.Message.setProto3BytesField(this, 3, e) + } + , + TronWebProto.ExchangeInjectContract.prototype.getQuant = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.ExchangeInjectContract.prototype.setQuant = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.ExchangeWithdrawContract.prototype.toObject = function(e) { + return TronWebProto.ExchangeWithdrawContract.toObject(e, this) + } + , + TronWebProto.ExchangeWithdrawContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + exchangeId: n.Message.getFieldWithDefault(t, 2, 0), + tokenId: t.getTokenId_asB64(), + quant: n.Message.getFieldWithDefault(t, 4, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.ExchangeWithdrawContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.ExchangeWithdrawContract; + return TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt64(), + e.setExchangeId(r); + break; + case 3: + r = t.readBytes(), + e.setTokenId(r); + break; + case 4: + r = t.readInt64(), + e.setQuant(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.ExchangeWithdrawContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getExchangeId()) && t.writeInt64(2, r), + (r = e.getTokenId_asU8()).length > 0 && t.writeBytes(3, r), + 0 !== (r = e.getQuant()) && t.writeInt64(4, r) + } + , + TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.ExchangeWithdrawContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.ExchangeWithdrawContract.prototype.getExchangeId = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.ExchangeWithdrawContract.prototype.setExchangeId = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.ExchangeWithdrawContract.prototype.getTokenId = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asB64 = function() { + return n.Message.bytesAsB64(this.getTokenId()) + } + , + TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asU8 = function() { + return n.Message.bytesAsU8(this.getTokenId()) + } + , + TronWebProto.ExchangeWithdrawContract.prototype.setTokenId = function(e) { + return n.Message.setProto3BytesField(this, 3, e) + } + , + TronWebProto.ExchangeWithdrawContract.prototype.getQuant = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.ExchangeWithdrawContract.prototype.setQuant = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.ExchangeTransactionContract.prototype.toObject = function(e) { + return TronWebProto.ExchangeTransactionContract.toObject(e, this) + } + , + TronWebProto.ExchangeTransactionContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + exchangeId: n.Message.getFieldWithDefault(t, 2, 0), + tokenId: t.getTokenId_asB64(), + quant: n.Message.getFieldWithDefault(t, 4, 0), + expected: n.Message.getFieldWithDefault(t, 5, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.ExchangeTransactionContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.ExchangeTransactionContract; + return TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt64(), + e.setExchangeId(r); + break; + case 3: + r = t.readBytes(), + e.setTokenId(r); + break; + case 4: + r = t.readInt64(), + e.setQuant(r); + break; + case 5: + r = t.readInt64(), + e.setExpected(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.ExchangeTransactionContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getExchangeId()) && t.writeInt64(2, r), + (r = e.getTokenId_asU8()).length > 0 && t.writeBytes(3, r), + 0 !== (r = e.getQuant()) && t.writeInt64(4, r), + 0 !== (r = e.getExpected()) && t.writeInt64(5, r) + } + , + TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.ExchangeTransactionContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.ExchangeTransactionContract.prototype.getExchangeId = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.ExchangeTransactionContract.prototype.setExchangeId = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.ExchangeTransactionContract.prototype.getTokenId = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asB64 = function() { + return n.Message.bytesAsB64(this.getTokenId()) + } + , + TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asU8 = function() { + return n.Message.bytesAsU8(this.getTokenId()) + } + , + TronWebProto.ExchangeTransactionContract.prototype.setTokenId = function(e) { + return n.Message.setProto3BytesField(this, 3, e) + } + , + TronWebProto.ExchangeTransactionContract.prototype.getQuant = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.ExchangeTransactionContract.prototype.setQuant = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + TronWebProto.ExchangeTransactionContract.prototype.getExpected = function() { + return n.Message.getFieldWithDefault(this, 5, 0) + } + , + TronWebProto.ExchangeTransactionContract.prototype.setExpected = function(e) { + return n.Message.setProto3IntField(this, 5, e) + } + , + o.object.extend(t, TronWebProto) + } + , + 3544: (e,t,r)=>{ + var n = r(5595) + , o = n + , s = "undefined" != typeof globalThis && globalThis || "undefined" != typeof window && window || void 0 !== s && s || "undefined" != typeof self && self || function() { + return this + } + .call(null) || Function("return this")(); + o.exportSymbol("TronWebProto.ProposalApproveContract", null, s), + o.exportSymbol("TronWebProto.ProposalCreateContract", null, s), + o.exportSymbol("TronWebProto.ProposalDeleteContract", null, s), + TronWebProto.ProposalApproveContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.ProposalApproveContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.ProposalApproveContract.displayName = "TronWebProto.ProposalApproveContract"), + TronWebProto.ProposalCreateContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.ProposalCreateContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.ProposalCreateContract.displayName = "TronWebProto.ProposalCreateContract"), + TronWebProto.ProposalDeleteContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.ProposalDeleteContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.ProposalDeleteContract.displayName = "TronWebProto.ProposalDeleteContract"), + n.Message.GENERATE_TO_OBJECT && (TronWebProto.ProposalApproveContract.prototype.toObject = function(e) { + return TronWebProto.ProposalApproveContract.toObject(e, this) + } + , + TronWebProto.ProposalApproveContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + proposalId: n.Message.getFieldWithDefault(t, 2, 0), + isAddApproval: n.Message.getBooleanFieldWithDefault(t, 3, !1) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.ProposalApproveContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.ProposalApproveContract; + return TronWebProto.ProposalApproveContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.ProposalApproveContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt64(), + e.setProposalId(r); + break; + case 3: + r = t.readBool(), + e.setIsAddApproval(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.ProposalApproveContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.ProposalApproveContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.ProposalApproveContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getProposalId()) && t.writeInt64(2, r), + (r = e.getIsAddApproval()) && t.writeBool(3, r) + } + , + TronWebProto.ProposalApproveContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.ProposalApproveContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.ProposalApproveContract.prototype.getProposalId = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.ProposalApproveContract.prototype.setProposalId = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.ProposalApproveContract.prototype.getIsAddApproval = function() { + return n.Message.getBooleanFieldWithDefault(this, 3, !1) + } + , + TronWebProto.ProposalApproveContract.prototype.setIsAddApproval = function(e) { + return n.Message.setProto3BooleanField(this, 3, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.ProposalCreateContract.prototype.toObject = function(e) { + return TronWebProto.ProposalCreateContract.toObject(e, this) + } + , + TronWebProto.ProposalCreateContract.toObject = function(e, t) { + var r, n = { + ownerAddress: t.getOwnerAddress_asB64(), + parametersMap: (r = t.getParametersMap()) ? r.toObject(e, void 0) : [] + }; + return e && (n.$jspbMessageInstance = t), + n + } + ), + TronWebProto.ProposalCreateContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.ProposalCreateContract; + return TronWebProto.ProposalCreateContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.ProposalCreateContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = e.getParametersMap(), + t.readMessage(r, (function(e, t) { + n.Map.deserializeBinary(e, t, n.BinaryReader.prototype.readInt64, n.BinaryReader.prototype.readInt64, null, 0, 0) + } + )); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.ProposalCreateContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.ProposalCreateContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.ProposalCreateContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getParametersMap(!0)) && r.getLength() > 0 && r.serializeBinary(2, t, n.BinaryWriter.prototype.writeInt64, n.BinaryWriter.prototype.writeInt64) + } + , + TronWebProto.ProposalCreateContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.ProposalCreateContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.ProposalCreateContract.prototype.getParametersMap = function(e) { + return n.Message.getMapField(this, 2, e, null) + } + , + TronWebProto.ProposalCreateContract.prototype.clearParametersMap = function() { + return this.getParametersMap().clear(), + this + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.ProposalDeleteContract.prototype.toObject = function(e) { + return TronWebProto.ProposalDeleteContract.toObject(e, this) + } + , + TronWebProto.ProposalDeleteContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + proposalId: n.Message.getFieldWithDefault(t, 2, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.ProposalDeleteContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.ProposalDeleteContract; + return TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt64(), + e.setProposalId(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.ProposalDeleteContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.ProposalDeleteContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.ProposalDeleteContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getProposalId()) && t.writeInt64(2, r) + } + , + TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.ProposalDeleteContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.ProposalDeleteContract.prototype.getProposalId = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.ProposalDeleteContract.prototype.setProposalId = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + o.object.extend(t, TronWebProto) + } + , + 5171: (e,t,r)=>{ + var n = r(5595) + , o = n + , s = "undefined" != typeof globalThis && globalThis || "undefined" != typeof window && window || void 0 !== s && s || "undefined" != typeof self && self || function() { + return this + } + .call(null) || Function("return this")() + , i = r(8020); + o.object.extend(proto, i), + o.exportSymbol("TronWebProto.ClearABIContract", null, s), + o.exportSymbol("TronWebProto.ContractState", null, s), + o.exportSymbol("TronWebProto.CreateSmartContract", null, s), + o.exportSymbol("TronWebProto.SmartContract", null, s), + o.exportSymbol("TronWebProto.SmartContract.ABI", null, s), + o.exportSymbol("TronWebProto.SmartContract.ABI.Entry", null, s), + o.exportSymbol("TronWebProto.SmartContract.ABI.Entry.EntryType", null, s), + o.exportSymbol("TronWebProto.SmartContract.ABI.Entry.Param", null, s), + o.exportSymbol("TronWebProto.SmartContract.ABI.Entry.StateMutabilityType", null, s), + o.exportSymbol("TronWebProto.SmartContractDataWrapper", null, s), + o.exportSymbol("TronWebProto.TriggerSmartContract", null, s), + o.exportSymbol("TronWebProto.UpdateEnergyLimitContract", null, s), + o.exportSymbol("TronWebProto.UpdateSettingContract", null, s), + TronWebProto.SmartContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.SmartContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.SmartContract.displayName = "TronWebProto.SmartContract"), + TronWebProto.SmartContract.ABI = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.SmartContract.ABI.repeatedFields_, null) + } + , + o.inherits(TronWebProto.SmartContract.ABI, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.SmartContract.ABI.displayName = "TronWebProto.SmartContract.ABI"), + TronWebProto.SmartContract.ABI.Entry = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.SmartContract.ABI.Entry.repeatedFields_, null) + } + , + o.inherits(TronWebProto.SmartContract.ABI.Entry, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.SmartContract.ABI.Entry.displayName = "TronWebProto.SmartContract.ABI.Entry"), + TronWebProto.SmartContract.ABI.Entry.Param = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.SmartContract.ABI.Entry.Param, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.SmartContract.ABI.Entry.Param.displayName = "TronWebProto.SmartContract.ABI.Entry.Param"), + TronWebProto.ContractState = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.ContractState, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.ContractState.displayName = "TronWebProto.ContractState"), + TronWebProto.CreateSmartContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.CreateSmartContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.CreateSmartContract.displayName = "TronWebProto.CreateSmartContract"), + TronWebProto.TriggerSmartContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.TriggerSmartContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.TriggerSmartContract.displayName = "TronWebProto.TriggerSmartContract"), + TronWebProto.ClearABIContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.ClearABIContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.ClearABIContract.displayName = "TronWebProto.ClearABIContract"), + TronWebProto.UpdateSettingContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.UpdateSettingContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.UpdateSettingContract.displayName = "TronWebProto.UpdateSettingContract"), + TronWebProto.UpdateEnergyLimitContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.UpdateEnergyLimitContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.UpdateEnergyLimitContract.displayName = "TronWebProto.UpdateEnergyLimitContract"), + TronWebProto.SmartContractDataWrapper = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.SmartContractDataWrapper, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.SmartContractDataWrapper.displayName = "TronWebProto.SmartContractDataWrapper"), + n.Message.GENERATE_TO_OBJECT && (TronWebProto.SmartContract.prototype.toObject = function(e) { + return TronWebProto.SmartContract.toObject(e, this) + } + , + TronWebProto.SmartContract.toObject = function(e, t) { + var r, o = { + originAddress: t.getOriginAddress_asB64(), + contractAddress: t.getContractAddress_asB64(), + abi: (r = t.getAbi()) && TronWebProto.SmartContract.ABI.toObject(e, r), + bytecode: t.getBytecode_asB64(), + callValue: n.Message.getFieldWithDefault(t, 5, 0), + consumeUserResourcePercent: n.Message.getFieldWithDefault(t, 6, 0), + name: n.Message.getFieldWithDefault(t, 7, ""), + originEnergyLimit: n.Message.getFieldWithDefault(t, 8, 0), + codeHash: t.getCodeHash_asB64(), + trxHash: t.getTrxHash_asB64(), + version: n.Message.getFieldWithDefault(t, 11, 0) + }; + return e && (o.$jspbMessageInstance = t), + o + } + ), + TronWebProto.SmartContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.SmartContract; + return TronWebProto.SmartContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.SmartContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOriginAddress(r); + break; + case 2: + r = t.readBytes(), + e.setContractAddress(r); + break; + case 3: + r = new TronWebProto.SmartContract.ABI, + t.readMessage(r, TronWebProto.SmartContract.ABI.deserializeBinaryFromReader), + e.setAbi(r); + break; + case 4: + r = t.readBytes(), + e.setBytecode(r); + break; + case 5: + r = t.readInt64(), + e.setCallValue(r); + break; + case 6: + r = t.readInt64(), + e.setConsumeUserResourcePercent(r); + break; + case 7: + r = t.readString(), + e.setName(r); + break; + case 8: + r = t.readInt64(), + e.setOriginEnergyLimit(r); + break; + case 9: + r = t.readBytes(), + e.setCodeHash(r); + break; + case 10: + r = t.readBytes(), + e.setTrxHash(r); + break; + case 11: + r = t.readInt32(), + e.setVersion(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.SmartContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.SmartContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.SmartContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOriginAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getContractAddress_asU8()).length > 0 && t.writeBytes(2, r), + null != (r = e.getAbi()) && t.writeMessage(3, r, TronWebProto.SmartContract.ABI.serializeBinaryToWriter), + (r = e.getBytecode_asU8()).length > 0 && t.writeBytes(4, r), + 0 !== (r = e.getCallValue()) && t.writeInt64(5, r), + 0 !== (r = e.getConsumeUserResourcePercent()) && t.writeInt64(6, r), + (r = e.getName()).length > 0 && t.writeString(7, r), + 0 !== (r = e.getOriginEnergyLimit()) && t.writeInt64(8, r), + (r = e.getCodeHash_asU8()).length > 0 && t.writeBytes(9, r), + (r = e.getTrxHash_asU8()).length > 0 && t.writeBytes(10, r), + 0 !== (r = e.getVersion()) && t.writeInt32(11, r) + } + , + TronWebProto.SmartContract.ABI.repeatedFields_ = [1], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.SmartContract.ABI.prototype.toObject = function(e) { + return TronWebProto.SmartContract.ABI.toObject(e, this) + } + , + TronWebProto.SmartContract.ABI.toObject = function(e, t) { + var r = { + entrysList: n.Message.toObjectList(t.getEntrysList(), TronWebProto.SmartContract.ABI.Entry.toObject, e) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.SmartContract.ABI.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.SmartContract.ABI; + return TronWebProto.SmartContract.ABI.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.SmartContract.ABI.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + if (1 === t.getFieldNumber()) { + var r = new TronWebProto.SmartContract.ABI.Entry; + t.readMessage(r, TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader), + e.addEntrys(r) + } else + t.skipField(); + return e + } + , + TronWebProto.SmartContract.ABI.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.SmartContract.ABI.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.SmartContract.ABI.serializeBinaryToWriter = function(e, t) { + var r; + (r = e.getEntrysList()).length > 0 && t.writeRepeatedMessage(1, r, TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter) + } + , + TronWebProto.SmartContract.ABI.Entry.repeatedFields_ = [4, 5], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.SmartContract.ABI.Entry.prototype.toObject = function(e) { + return TronWebProto.SmartContract.ABI.Entry.toObject(e, this) + } + , + TronWebProto.SmartContract.ABI.Entry.toObject = function(e, t) { + var r = { + anonymous: n.Message.getBooleanFieldWithDefault(t, 1, !1), + constant: n.Message.getBooleanFieldWithDefault(t, 2, !1), + name: n.Message.getFieldWithDefault(t, 3, ""), + inputsList: n.Message.toObjectList(t.getInputsList(), TronWebProto.SmartContract.ABI.Entry.Param.toObject, e), + outputsList: n.Message.toObjectList(t.getOutputsList(), TronWebProto.SmartContract.ABI.Entry.Param.toObject, e), + type: n.Message.getFieldWithDefault(t, 6, 0), + payable: n.Message.getBooleanFieldWithDefault(t, 7, !1), + statemutability: n.Message.getFieldWithDefault(t, 8, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.SmartContract.ABI.Entry.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.SmartContract.ABI.Entry; + return TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBool(); + e.setAnonymous(r); + break; + case 2: + r = t.readBool(), + e.setConstant(r); + break; + case 3: + r = t.readString(), + e.setName(r); + break; + case 4: + r = new TronWebProto.SmartContract.ABI.Entry.Param, + t.readMessage(r, TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader), + e.addInputs(r); + break; + case 5: + r = new TronWebProto.SmartContract.ABI.Entry.Param, + t.readMessage(r, TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader), + e.addOutputs(r); + break; + case 6: + r = t.readEnum(), + e.setType(r); + break; + case 7: + r = t.readBool(), + e.setPayable(r); + break; + case 8: + r = t.readEnum(), + e.setStatemutability(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getAnonymous()) && t.writeBool(1, r), + (r = e.getConstant()) && t.writeBool(2, r), + (r = e.getName()).length > 0 && t.writeString(3, r), + (r = e.getInputsList()).length > 0 && t.writeRepeatedMessage(4, r, TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter), + (r = e.getOutputsList()).length > 0 && t.writeRepeatedMessage(5, r, TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter), + 0 !== (r = e.getType()) && t.writeEnum(6, r), + (r = e.getPayable()) && t.writeBool(7, r), + 0 !== (r = e.getStatemutability()) && t.writeEnum(8, r) + } + , + TronWebProto.SmartContract.ABI.Entry.EntryType = { + UNKNOWNENTRYTYPE: 0, + CONSTRUCTOR: 1, + FUNCTION: 2, + EVENT: 3, + FALLBACK: 4, + RECEIVE: 5, + ERROR: 6 + }, + TronWebProto.SmartContract.ABI.Entry.StateMutabilityType = { + UNKNOWNMUTABILITYTYPE: 0, + PURE: 1, + VIEW: 2, + NONPAYABLE: 3, + PAYABLE: 4 + }, + n.Message.GENERATE_TO_OBJECT && (TronWebProto.SmartContract.ABI.Entry.Param.prototype.toObject = function(e) { + return TronWebProto.SmartContract.ABI.Entry.Param.toObject(e, this) + } + , + TronWebProto.SmartContract.ABI.Entry.Param.toObject = function(e, t) { + var r = { + indexed: n.Message.getBooleanFieldWithDefault(t, 1, !1), + name: n.Message.getFieldWithDefault(t, 2, ""), + type: n.Message.getFieldWithDefault(t, 3, "") + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.SmartContract.ABI.Entry.Param; + return TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBool(); + e.setIndexed(r); + break; + case 2: + r = t.readString(), + e.setName(r); + break; + case 3: + r = t.readString(), + e.setType(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.SmartContract.ABI.Entry.Param.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getIndexed()) && t.writeBool(1, r), + (r = e.getName()).length > 0 && t.writeString(2, r), + (r = e.getType()).length > 0 && t.writeString(3, r) + } + , + TronWebProto.SmartContract.ABI.Entry.Param.prototype.getIndexed = function() { + return n.Message.getBooleanFieldWithDefault(this, 1, !1) + } + , + TronWebProto.SmartContract.ABI.Entry.Param.prototype.setIndexed = function(e) { + return n.Message.setProto3BooleanField(this, 1, e) + } + , + TronWebProto.SmartContract.ABI.Entry.Param.prototype.getName = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.SmartContract.ABI.Entry.Param.prototype.setName = function(e) { + return n.Message.setProto3StringField(this, 2, e) + } + , + TronWebProto.SmartContract.ABI.Entry.Param.prototype.getType = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.SmartContract.ABI.Entry.Param.prototype.setType = function(e) { + return n.Message.setProto3StringField(this, 3, e) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.getAnonymous = function() { + return n.Message.getBooleanFieldWithDefault(this, 1, !1) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.setAnonymous = function(e) { + return n.Message.setProto3BooleanField(this, 1, e) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.getConstant = function() { + return n.Message.getBooleanFieldWithDefault(this, 2, !1) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.setConstant = function(e) { + return n.Message.setProto3BooleanField(this, 2, e) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.getName = function() { + return n.Message.getFieldWithDefault(this, 3, "") + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.setName = function(e) { + return n.Message.setProto3StringField(this, 3, e) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.getInputsList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.SmartContract.ABI.Entry.Param, 4) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.setInputsList = function(e) { + return n.Message.setRepeatedWrapperField(this, 4, e) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.addInputs = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 4, e, TronWebProto.SmartContract.ABI.Entry.Param, t) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.clearInputsList = function() { + return this.setInputsList([]) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.getOutputsList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.SmartContract.ABI.Entry.Param, 5) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.setOutputsList = function(e) { + return n.Message.setRepeatedWrapperField(this, 5, e) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.addOutputs = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 5, e, TronWebProto.SmartContract.ABI.Entry.Param, t) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.clearOutputsList = function() { + return this.setOutputsList([]) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.getType = function() { + return n.Message.getFieldWithDefault(this, 6, 0) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.setType = function(e) { + return n.Message.setProto3EnumField(this, 6, e) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.getPayable = function() { + return n.Message.getBooleanFieldWithDefault(this, 7, !1) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.setPayable = function(e) { + return n.Message.setProto3BooleanField(this, 7, e) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.getStatemutability = function() { + return n.Message.getFieldWithDefault(this, 8, 0) + } + , + TronWebProto.SmartContract.ABI.Entry.prototype.setStatemutability = function(e) { + return n.Message.setProto3EnumField(this, 8, e) + } + , + TronWebProto.SmartContract.ABI.prototype.getEntrysList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.SmartContract.ABI.Entry, 1) + } + , + TronWebProto.SmartContract.ABI.prototype.setEntrysList = function(e) { + return n.Message.setRepeatedWrapperField(this, 1, e) + } + , + TronWebProto.SmartContract.ABI.prototype.addEntrys = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 1, e, TronWebProto.SmartContract.ABI.Entry, t) + } + , + TronWebProto.SmartContract.ABI.prototype.clearEntrysList = function() { + return this.setEntrysList([]) + } + , + TronWebProto.SmartContract.prototype.getOriginAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.SmartContract.prototype.getOriginAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOriginAddress()) + } + , + TronWebProto.SmartContract.prototype.getOriginAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOriginAddress()) + } + , + TronWebProto.SmartContract.prototype.setOriginAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.SmartContract.prototype.getContractAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.SmartContract.prototype.getContractAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getContractAddress()) + } + , + TronWebProto.SmartContract.prototype.getContractAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getContractAddress()) + } + , + TronWebProto.SmartContract.prototype.setContractAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.SmartContract.prototype.getAbi = function() { + return n.Message.getWrapperField(this, TronWebProto.SmartContract.ABI, 3) + } + , + TronWebProto.SmartContract.prototype.setAbi = function(e) { + return n.Message.setWrapperField(this, 3, e) + } + , + TronWebProto.SmartContract.prototype.clearAbi = function() { + return this.setAbi(void 0) + } + , + TronWebProto.SmartContract.prototype.hasAbi = function() { + return null != n.Message.getField(this, 3) + } + , + TronWebProto.SmartContract.prototype.getBytecode = function() { + return n.Message.getFieldWithDefault(this, 4, "") + } + , + TronWebProto.SmartContract.prototype.getBytecode_asB64 = function() { + return n.Message.bytesAsB64(this.getBytecode()) + } + , + TronWebProto.SmartContract.prototype.getBytecode_asU8 = function() { + return n.Message.bytesAsU8(this.getBytecode()) + } + , + TronWebProto.SmartContract.prototype.setBytecode = function(e) { + return n.Message.setProto3BytesField(this, 4, e) + } + , + TronWebProto.SmartContract.prototype.getCallValue = function() { + return n.Message.getFieldWithDefault(this, 5, 0) + } + , + TronWebProto.SmartContract.prototype.setCallValue = function(e) { + return n.Message.setProto3IntField(this, 5, e) + } + , + TronWebProto.SmartContract.prototype.getConsumeUserResourcePercent = function() { + return n.Message.getFieldWithDefault(this, 6, 0) + } + , + TronWebProto.SmartContract.prototype.setConsumeUserResourcePercent = function(e) { + return n.Message.setProto3IntField(this, 6, e) + } + , + TronWebProto.SmartContract.prototype.getName = function() { + return n.Message.getFieldWithDefault(this, 7, "") + } + , + TronWebProto.SmartContract.prototype.setName = function(e) { + return n.Message.setProto3StringField(this, 7, e) + } + , + TronWebProto.SmartContract.prototype.getOriginEnergyLimit = function() { + return n.Message.getFieldWithDefault(this, 8, 0) + } + , + TronWebProto.SmartContract.prototype.setOriginEnergyLimit = function(e) { + return n.Message.setProto3IntField(this, 8, e) + } + , + TronWebProto.SmartContract.prototype.getCodeHash = function() { + return n.Message.getFieldWithDefault(this, 9, "") + } + , + TronWebProto.SmartContract.prototype.getCodeHash_asB64 = function() { + return n.Message.bytesAsB64(this.getCodeHash()) + } + , + TronWebProto.SmartContract.prototype.getCodeHash_asU8 = function() { + return n.Message.bytesAsU8(this.getCodeHash()) + } + , + TronWebProto.SmartContract.prototype.setCodeHash = function(e) { + return n.Message.setProto3BytesField(this, 9, e) + } + , + TronWebProto.SmartContract.prototype.getTrxHash = function() { + return n.Message.getFieldWithDefault(this, 10, "") + } + , + TronWebProto.SmartContract.prototype.getTrxHash_asB64 = function() { + return n.Message.bytesAsB64(this.getTrxHash()) + } + , + TronWebProto.SmartContract.prototype.getTrxHash_asU8 = function() { + return n.Message.bytesAsU8(this.getTrxHash()) + } + , + TronWebProto.SmartContract.prototype.setTrxHash = function(e) { + return n.Message.setProto3BytesField(this, 10, e) + } + , + TronWebProto.SmartContract.prototype.getVersion = function() { + return n.Message.getFieldWithDefault(this, 11, 0) + } + , + TronWebProto.SmartContract.prototype.setVersion = function(e) { + return n.Message.setProto3IntField(this, 11, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.ContractState.prototype.toObject = function(e) { + return TronWebProto.ContractState.toObject(e, this) + } + , + TronWebProto.ContractState.toObject = function(e, t) { + var r = { + energyUsage: n.Message.getFieldWithDefault(t, 1, 0), + energyFactor: n.Message.getFieldWithDefault(t, 2, 0), + updateCycle: n.Message.getFieldWithDefault(t, 3, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.ContractState.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.ContractState; + return TronWebProto.ContractState.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.ContractState.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readInt64(); + e.setEnergyUsage(r); + break; + case 2: + r = t.readInt64(), + e.setEnergyFactor(r); + break; + case 3: + r = t.readInt64(), + e.setUpdateCycle(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.ContractState.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.ContractState.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.ContractState.serializeBinaryToWriter = function(e, t) { + var r = void 0; + 0 !== (r = e.getEnergyUsage()) && t.writeInt64(1, r), + 0 !== (r = e.getEnergyFactor()) && t.writeInt64(2, r), + 0 !== (r = e.getUpdateCycle()) && t.writeInt64(3, r) + } + , + TronWebProto.ContractState.prototype.getEnergyUsage = function() { + return n.Message.getFieldWithDefault(this, 1, 0) + } + , + TronWebProto.ContractState.prototype.setEnergyUsage = function(e) { + return n.Message.setProto3IntField(this, 1, e) + } + , + TronWebProto.ContractState.prototype.getEnergyFactor = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.ContractState.prototype.setEnergyFactor = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.ContractState.prototype.getUpdateCycle = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.ContractState.prototype.setUpdateCycle = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.CreateSmartContract.prototype.toObject = function(e) { + return TronWebProto.CreateSmartContract.toObject(e, this) + } + , + TronWebProto.CreateSmartContract.toObject = function(e, t) { + var r, o = { + ownerAddress: t.getOwnerAddress_asB64(), + newContract: (r = t.getNewContract()) && TronWebProto.SmartContract.toObject(e, r), + callTokenValue: n.Message.getFieldWithDefault(t, 3, 0), + tokenId: n.Message.getFieldWithDefault(t, 4, 0) + }; + return e && (o.$jspbMessageInstance = t), + o + } + ), + TronWebProto.CreateSmartContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.CreateSmartContract; + return TronWebProto.CreateSmartContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.CreateSmartContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = new TronWebProto.SmartContract, + t.readMessage(r, TronWebProto.SmartContract.deserializeBinaryFromReader), + e.setNewContract(r); + break; + case 3: + r = t.readInt64(), + e.setCallTokenValue(r); + break; + case 4: + r = t.readInt64(), + e.setTokenId(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.CreateSmartContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.CreateSmartContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.CreateSmartContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + null != (r = e.getNewContract()) && t.writeMessage(2, r, TronWebProto.SmartContract.serializeBinaryToWriter), + 0 !== (r = e.getCallTokenValue()) && t.writeInt64(3, r), + 0 !== (r = e.getTokenId()) && t.writeInt64(4, r) + } + , + TronWebProto.CreateSmartContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.CreateSmartContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.CreateSmartContract.prototype.getNewContract = function() { + return n.Message.getWrapperField(this, TronWebProto.SmartContract, 2) + } + , + TronWebProto.CreateSmartContract.prototype.setNewContract = function(e) { + return n.Message.setWrapperField(this, 2, e) + } + , + TronWebProto.CreateSmartContract.prototype.clearNewContract = function() { + return this.setNewContract(void 0) + } + , + TronWebProto.CreateSmartContract.prototype.hasNewContract = function() { + return null != n.Message.getField(this, 2) + } + , + TronWebProto.CreateSmartContract.prototype.getCallTokenValue = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.CreateSmartContract.prototype.setCallTokenValue = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.CreateSmartContract.prototype.getTokenId = function() { + return n.Message.getFieldWithDefault(this, 4, 0) + } + , + TronWebProto.CreateSmartContract.prototype.setTokenId = function(e) { + return n.Message.setProto3IntField(this, 4, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.TriggerSmartContract.prototype.toObject = function(e) { + return TronWebProto.TriggerSmartContract.toObject(e, this) + } + , + TronWebProto.TriggerSmartContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + contractAddress: t.getContractAddress_asB64(), + callValue: n.Message.getFieldWithDefault(t, 3, 0), + data: t.getData_asB64(), + callTokenValue: n.Message.getFieldWithDefault(t, 5, 0), + tokenId: n.Message.getFieldWithDefault(t, 6, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.TriggerSmartContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.TriggerSmartContract; + return TronWebProto.TriggerSmartContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.TriggerSmartContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readBytes(), + e.setContractAddress(r); + break; + case 3: + r = t.readInt64(), + e.setCallValue(r); + break; + case 4: + r = t.readBytes(), + e.setData(r); + break; + case 5: + r = t.readInt64(), + e.setCallTokenValue(r); + break; + case 6: + r = t.readInt64(), + e.setTokenId(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.TriggerSmartContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.TriggerSmartContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.TriggerSmartContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getContractAddress_asU8()).length > 0 && t.writeBytes(2, r), + 0 !== (r = e.getCallValue()) && t.writeInt64(3, r), + (r = e.getData_asU8()).length > 0 && t.writeBytes(4, r), + 0 !== (r = e.getCallTokenValue()) && t.writeInt64(5, r), + 0 !== (r = e.getTokenId()) && t.writeInt64(6, r) + } + , + TronWebProto.TriggerSmartContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.TriggerSmartContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.TriggerSmartContract.prototype.getContractAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.TriggerSmartContract.prototype.getContractAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getContractAddress()) + } + , + TronWebProto.TriggerSmartContract.prototype.getContractAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getContractAddress()) + } + , + TronWebProto.TriggerSmartContract.prototype.setContractAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.TriggerSmartContract.prototype.getCallValue = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.TriggerSmartContract.prototype.setCallValue = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + TronWebProto.TriggerSmartContract.prototype.getData = function() { + return n.Message.getFieldWithDefault(this, 4, "") + } + , + TronWebProto.TriggerSmartContract.prototype.getData_asB64 = function() { + return n.Message.bytesAsB64(this.getData()) + } + , + TronWebProto.TriggerSmartContract.prototype.getData_asU8 = function() { + return n.Message.bytesAsU8(this.getData()) + } + , + TronWebProto.TriggerSmartContract.prototype.setData = function(e) { + return n.Message.setProto3BytesField(this, 4, e) + } + , + TronWebProto.TriggerSmartContract.prototype.getCallTokenValue = function() { + return n.Message.getFieldWithDefault(this, 5, 0) + } + , + TronWebProto.TriggerSmartContract.prototype.setCallTokenValue = function(e) { + return n.Message.setProto3IntField(this, 5, e) + } + , + TronWebProto.TriggerSmartContract.prototype.getTokenId = function() { + return n.Message.getFieldWithDefault(this, 6, 0) + } + , + TronWebProto.TriggerSmartContract.prototype.setTokenId = function(e) { + return n.Message.setProto3IntField(this, 6, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.ClearABIContract.prototype.toObject = function(e) { + return TronWebProto.ClearABIContract.toObject(e, this) + } + , + TronWebProto.ClearABIContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + contractAddress: t.getContractAddress_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.ClearABIContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.ClearABIContract; + return TronWebProto.ClearABIContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.ClearABIContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readBytes(), + e.setContractAddress(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.ClearABIContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.ClearABIContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.ClearABIContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getContractAddress_asU8()).length > 0 && t.writeBytes(2, r) + } + , + TronWebProto.ClearABIContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.ClearABIContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.ClearABIContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.ClearABIContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.ClearABIContract.prototype.getContractAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.ClearABIContract.prototype.getContractAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getContractAddress()) + } + , + TronWebProto.ClearABIContract.prototype.getContractAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getContractAddress()) + } + , + TronWebProto.ClearABIContract.prototype.setContractAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.UpdateSettingContract.prototype.toObject = function(e) { + return TronWebProto.UpdateSettingContract.toObject(e, this) + } + , + TronWebProto.UpdateSettingContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + contractAddress: t.getContractAddress_asB64(), + consumeUserResourcePercent: n.Message.getFieldWithDefault(t, 3, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.UpdateSettingContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.UpdateSettingContract; + return TronWebProto.UpdateSettingContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.UpdateSettingContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readBytes(), + e.setContractAddress(r); + break; + case 3: + r = t.readInt64(), + e.setConsumeUserResourcePercent(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.UpdateSettingContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.UpdateSettingContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.UpdateSettingContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getContractAddress_asU8()).length > 0 && t.writeBytes(2, r), + 0 !== (r = e.getConsumeUserResourcePercent()) && t.writeInt64(3, r) + } + , + TronWebProto.UpdateSettingContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.UpdateSettingContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.UpdateSettingContract.prototype.getContractAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.UpdateSettingContract.prototype.getContractAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getContractAddress()) + } + , + TronWebProto.UpdateSettingContract.prototype.getContractAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getContractAddress()) + } + , + TronWebProto.UpdateSettingContract.prototype.setContractAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.UpdateSettingContract.prototype.getConsumeUserResourcePercent = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.UpdateSettingContract.prototype.setConsumeUserResourcePercent = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.UpdateEnergyLimitContract.prototype.toObject = function(e) { + return TronWebProto.UpdateEnergyLimitContract.toObject(e, this) + } + , + TronWebProto.UpdateEnergyLimitContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + contractAddress: t.getContractAddress_asB64(), + originEnergyLimit: n.Message.getFieldWithDefault(t, 3, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.UpdateEnergyLimitContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.UpdateEnergyLimitContract; + return TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readBytes(), + e.setContractAddress(r); + break; + case 3: + r = t.readInt64(), + e.setOriginEnergyLimit(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.UpdateEnergyLimitContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getContractAddress_asU8()).length > 0 && t.writeBytes(2, r), + 0 !== (r = e.getOriginEnergyLimit()) && t.writeInt64(3, r) + } + , + TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.UpdateEnergyLimitContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getContractAddress()) + } + , + TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getContractAddress()) + } + , + TronWebProto.UpdateEnergyLimitContract.prototype.setContractAddress = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit = function() { + return n.Message.getFieldWithDefault(this, 3, 0) + } + , + TronWebProto.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit = function(e) { + return n.Message.setProto3IntField(this, 3, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.SmartContractDataWrapper.prototype.toObject = function(e) { + return TronWebProto.SmartContractDataWrapper.toObject(e, this) + } + , + TronWebProto.SmartContractDataWrapper.toObject = function(e, t) { + var r, n = { + smartContract: (r = t.getSmartContract()) && TronWebProto.SmartContract.toObject(e, r), + runtimecode: t.getRuntimecode_asB64(), + contractState: (r = t.getContractState()) && TronWebProto.ContractState.toObject(e, r) + }; + return e && (n.$jspbMessageInstance = t), + n + } + ), + TronWebProto.SmartContractDataWrapper.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.SmartContractDataWrapper; + return TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = new TronWebProto.SmartContract; + t.readMessage(r, TronWebProto.SmartContract.deserializeBinaryFromReader), + e.setSmartContract(r); + break; + case 2: + r = t.readBytes(), + e.setRuntimecode(r); + break; + case 3: + r = new TronWebProto.ContractState, + t.readMessage(r, TronWebProto.ContractState.deserializeBinaryFromReader), + e.setContractState(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.SmartContractDataWrapper.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter = function(e, t) { + var r = void 0; + null != (r = e.getSmartContract()) && t.writeMessage(1, r, TronWebProto.SmartContract.serializeBinaryToWriter), + (r = e.getRuntimecode_asU8()).length > 0 && t.writeBytes(2, r), + null != (r = e.getContractState()) && t.writeMessage(3, r, TronWebProto.ContractState.serializeBinaryToWriter) + } + , + TronWebProto.SmartContractDataWrapper.prototype.getSmartContract = function() { + return n.Message.getWrapperField(this, TronWebProto.SmartContract, 1) + } + , + TronWebProto.SmartContractDataWrapper.prototype.setSmartContract = function(e) { + return n.Message.setWrapperField(this, 1, e) + } + , + TronWebProto.SmartContractDataWrapper.prototype.clearSmartContract = function() { + return this.setSmartContract(void 0) + } + , + TronWebProto.SmartContractDataWrapper.prototype.hasSmartContract = function() { + return null != n.Message.getField(this, 1) + } + , + TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asB64 = function() { + return n.Message.bytesAsB64(this.getRuntimecode()) + } + , + TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asU8 = function() { + return n.Message.bytesAsU8(this.getRuntimecode()) + } + , + TronWebProto.SmartContractDataWrapper.prototype.setRuntimecode = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + TronWebProto.SmartContractDataWrapper.prototype.getContractState = function() { + return n.Message.getWrapperField(this, TronWebProto.ContractState, 3) + } + , + TronWebProto.SmartContractDataWrapper.prototype.setContractState = function(e) { + return n.Message.setWrapperField(this, 3, e) + } + , + TronWebProto.SmartContractDataWrapper.prototype.clearContractState = function() { + return this.setContractState(void 0) + } + , + TronWebProto.SmartContractDataWrapper.prototype.hasContractState = function() { + return null != n.Message.getField(this, 3) + } + , + o.object.extend(t, TronWebProto) + } + , + 672: (e,t,r)=>{ + var n = r(5595) + , o = n + , s = "undefined" != typeof globalThis && globalThis || "undefined" != typeof window && window || void 0 !== s && s || "undefined" != typeof self && self || function() { + return this + } + .call(null) || Function("return this")(); + o.exportSymbol("TronWebProto.BuyStorageBytesContract", null, s), + o.exportSymbol("TronWebProto.BuyStorageContract", null, s), + o.exportSymbol("TronWebProto.SellStorageContract", null, s), + o.exportSymbol("TronWebProto.UpdateBrokerageContract", null, s), + TronWebProto.BuyStorageBytesContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.BuyStorageBytesContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.BuyStorageBytesContract.displayName = "TronWebProto.BuyStorageBytesContract"), + TronWebProto.BuyStorageContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.BuyStorageContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.BuyStorageContract.displayName = "TronWebProto.BuyStorageContract"), + TronWebProto.SellStorageContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.SellStorageContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.SellStorageContract.displayName = "TronWebProto.SellStorageContract"), + TronWebProto.UpdateBrokerageContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.UpdateBrokerageContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.UpdateBrokerageContract.displayName = "TronWebProto.UpdateBrokerageContract"), + n.Message.GENERATE_TO_OBJECT && (TronWebProto.BuyStorageBytesContract.prototype.toObject = function(e) { + return TronWebProto.BuyStorageBytesContract.toObject(e, this) + } + , + TronWebProto.BuyStorageBytesContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + bytes: n.Message.getFieldWithDefault(t, 2, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.BuyStorageBytesContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.BuyStorageBytesContract; + return TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt64(), + e.setBytes(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.BuyStorageBytesContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getBytes()) && t.writeInt64(2, r) + } + , + TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.BuyStorageBytesContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.BuyStorageBytesContract.prototype.getBytes = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.BuyStorageBytesContract.prototype.setBytes = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.BuyStorageContract.prototype.toObject = function(e) { + return TronWebProto.BuyStorageContract.toObject(e, this) + } + , + TronWebProto.BuyStorageContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + quant: n.Message.getFieldWithDefault(t, 2, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.BuyStorageContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.BuyStorageContract; + return TronWebProto.BuyStorageContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.BuyStorageContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt64(), + e.setQuant(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.BuyStorageContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.BuyStorageContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.BuyStorageContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getQuant()) && t.writeInt64(2, r) + } + , + TronWebProto.BuyStorageContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.BuyStorageContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.BuyStorageContract.prototype.getQuant = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.BuyStorageContract.prototype.setQuant = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.SellStorageContract.prototype.toObject = function(e) { + return TronWebProto.SellStorageContract.toObject(e, this) + } + , + TronWebProto.SellStorageContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + storageBytes: n.Message.getFieldWithDefault(t, 2, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.SellStorageContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.SellStorageContract; + return TronWebProto.SellStorageContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.SellStorageContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt64(), + e.setStorageBytes(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.SellStorageContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.SellStorageContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.SellStorageContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getStorageBytes()) && t.writeInt64(2, r) + } + , + TronWebProto.SellStorageContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.SellStorageContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.SellStorageContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.SellStorageContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.SellStorageContract.prototype.getStorageBytes = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.SellStorageContract.prototype.setStorageBytes = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.UpdateBrokerageContract.prototype.toObject = function(e) { + return TronWebProto.UpdateBrokerageContract.toObject(e, this) + } + , + TronWebProto.UpdateBrokerageContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + brokerage: n.Message.getFieldWithDefault(t, 2, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.UpdateBrokerageContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.UpdateBrokerageContract; + return TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readInt32(), + e.setBrokerage(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.UpdateBrokerageContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getBrokerage()) && t.writeInt32(2, r) + } + , + TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.UpdateBrokerageContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.UpdateBrokerageContract.prototype.getBrokerage = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.UpdateBrokerageContract.prototype.setBrokerage = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + o.object.extend(t, TronWebProto) + } + , + 7084: (e,t,r)=>{ + var n = r(5595) + , o = n + , s = "undefined" != typeof globalThis && globalThis || "undefined" != typeof window && window || void 0 !== s && s || "undefined" != typeof self && self || function() { + return this + } + .call(null) || Function("return this")(); + o.exportSymbol("TronWebProto.VoteWitnessContract", null, s), + o.exportSymbol("TronWebProto.VoteWitnessContract.Vote", null, s), + o.exportSymbol("TronWebProto.WitnessCreateContract", null, s), + o.exportSymbol("TronWebProto.WitnessUpdateContract", null, s), + TronWebProto.WitnessCreateContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.WitnessCreateContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.WitnessCreateContract.displayName = "TronWebProto.WitnessCreateContract"), + TronWebProto.WitnessUpdateContract = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.WitnessUpdateContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.WitnessUpdateContract.displayName = "TronWebProto.WitnessUpdateContract"), + TronWebProto.VoteWitnessContract = function(e) { + n.Message.initialize(this, e, 0, -1, TronWebProto.VoteWitnessContract.repeatedFields_, null) + } + , + o.inherits(TronWebProto.VoteWitnessContract, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.VoteWitnessContract.displayName = "TronWebProto.VoteWitnessContract"), + TronWebProto.VoteWitnessContract.Vote = function(e) { + n.Message.initialize(this, e, 0, -1, null, null) + } + , + o.inherits(TronWebProto.VoteWitnessContract.Vote, n.Message), + o.DEBUG && !COMPILED && (TronWebProto.VoteWitnessContract.Vote.displayName = "TronWebProto.VoteWitnessContract.Vote"), + n.Message.GENERATE_TO_OBJECT && (TronWebProto.WitnessCreateContract.prototype.toObject = function(e) { + return TronWebProto.WitnessCreateContract.toObject(e, this) + } + , + TronWebProto.WitnessCreateContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + url: t.getUrl_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.WitnessCreateContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.WitnessCreateContract; + return TronWebProto.WitnessCreateContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.WitnessCreateContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = t.readBytes(), + e.setUrl(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.WitnessCreateContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.WitnessCreateContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.WitnessCreateContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getUrl_asU8()).length > 0 && t.writeBytes(2, r) + } + , + TronWebProto.WitnessCreateContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.WitnessCreateContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.WitnessCreateContract.prototype.getUrl = function() { + return n.Message.getFieldWithDefault(this, 2, "") + } + , + TronWebProto.WitnessCreateContract.prototype.getUrl_asB64 = function() { + return n.Message.bytesAsB64(this.getUrl()) + } + , + TronWebProto.WitnessCreateContract.prototype.getUrl_asU8 = function() { + return n.Message.bytesAsU8(this.getUrl()) + } + , + TronWebProto.WitnessCreateContract.prototype.setUrl = function(e) { + return n.Message.setProto3BytesField(this, 2, e) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.WitnessUpdateContract.prototype.toObject = function(e) { + return TronWebProto.WitnessUpdateContract.toObject(e, this) + } + , + TronWebProto.WitnessUpdateContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + updateUrl: t.getUpdateUrl_asB64() + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.WitnessUpdateContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.WitnessUpdateContract; + return TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 12: + r = t.readBytes(), + e.setUpdateUrl(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.WitnessUpdateContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.WitnessUpdateContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.WitnessUpdateContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getUpdateUrl_asU8()).length > 0 && t.writeBytes(12, r) + } + , + TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.WitnessUpdateContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl = function() { + return n.Message.getFieldWithDefault(this, 12, "") + } + , + TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asB64 = function() { + return n.Message.bytesAsB64(this.getUpdateUrl()) + } + , + TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asU8 = function() { + return n.Message.bytesAsU8(this.getUpdateUrl()) + } + , + TronWebProto.WitnessUpdateContract.prototype.setUpdateUrl = function(e) { + return n.Message.setProto3BytesField(this, 12, e) + } + , + TronWebProto.VoteWitnessContract.repeatedFields_ = [2], + n.Message.GENERATE_TO_OBJECT && (TronWebProto.VoteWitnessContract.prototype.toObject = function(e) { + return TronWebProto.VoteWitnessContract.toObject(e, this) + } + , + TronWebProto.VoteWitnessContract.toObject = function(e, t) { + var r = { + ownerAddress: t.getOwnerAddress_asB64(), + votesList: n.Message.toObjectList(t.getVotesList(), TronWebProto.VoteWitnessContract.Vote.toObject, e), + support: n.Message.getBooleanFieldWithDefault(t, 3, !1) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.VoteWitnessContract.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.VoteWitnessContract; + return TronWebProto.VoteWitnessContract.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.VoteWitnessContract.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setOwnerAddress(r); + break; + case 2: + r = new TronWebProto.VoteWitnessContract.Vote, + t.readMessage(r, TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader), + e.addVotes(r); + break; + case 3: + r = t.readBool(), + e.setSupport(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.VoteWitnessContract.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.VoteWitnessContract.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.VoteWitnessContract.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getOwnerAddress_asU8()).length > 0 && t.writeBytes(1, r), + (r = e.getVotesList()).length > 0 && t.writeRepeatedMessage(2, r, TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter), + (r = e.getSupport()) && t.writeBool(3, r) + } + , + n.Message.GENERATE_TO_OBJECT && (TronWebProto.VoteWitnessContract.Vote.prototype.toObject = function(e) { + return TronWebProto.VoteWitnessContract.Vote.toObject(e, this) + } + , + TronWebProto.VoteWitnessContract.Vote.toObject = function(e, t) { + var r = { + voteAddress: t.getVoteAddress_asB64(), + voteCount: n.Message.getFieldWithDefault(t, 2, 0) + }; + return e && (r.$jspbMessageInstance = t), + r + } + ), + TronWebProto.VoteWitnessContract.Vote.deserializeBinary = function(e) { + var t = new n.BinaryReader(e) + , r = new TronWebProto.VoteWitnessContract.Vote; + return TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader(r, t) + } + , + TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader = function(e, t) { + for (; t.nextField() && !t.isEndGroup(); ) + switch (t.getFieldNumber()) { + case 1: + var r = t.readBytes(); + e.setVoteAddress(r); + break; + case 2: + r = t.readInt64(), + e.setVoteCount(r); + break; + default: + t.skipField() + } + return e + } + , + TronWebProto.VoteWitnessContract.Vote.prototype.serializeBinary = function() { + var e = new n.BinaryWriter; + return TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter(this, e), + e.getResultBuffer() + } + , + TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter = function(e, t) { + var r = void 0; + (r = e.getVoteAddress_asU8()).length > 0 && t.writeBytes(1, r), + 0 !== (r = e.getVoteCount()) && t.writeInt64(2, r) + } + , + TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getVoteAddress()) + } + , + TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getVoteAddress()) + } + , + TronWebProto.VoteWitnessContract.Vote.prototype.setVoteAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.VoteWitnessContract.Vote.prototype.getVoteCount = function() { + return n.Message.getFieldWithDefault(this, 2, 0) + } + , + TronWebProto.VoteWitnessContract.Vote.prototype.setVoteCount = function(e) { + return n.Message.setProto3IntField(this, 2, e) + } + , + TronWebProto.VoteWitnessContract.prototype.getOwnerAddress = function() { + return n.Message.getFieldWithDefault(this, 1, "") + } + , + TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asB64 = function() { + return n.Message.bytesAsB64(this.getOwnerAddress()) + } + , + TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asU8 = function() { + return n.Message.bytesAsU8(this.getOwnerAddress()) + } + , + TronWebProto.VoteWitnessContract.prototype.setOwnerAddress = function(e) { + return n.Message.setProto3BytesField(this, 1, e) + } + , + TronWebProto.VoteWitnessContract.prototype.getVotesList = function() { + return n.Message.getRepeatedWrapperField(this, TronWebProto.VoteWitnessContract.Vote, 2) + } + , + TronWebProto.VoteWitnessContract.prototype.setVotesList = function(e) { + return n.Message.setRepeatedWrapperField(this, 2, e) + } + , + TronWebProto.VoteWitnessContract.prototype.addVotes = function(e, t) { + return n.Message.addToRepeatedWrapperField(this, 2, e, TronWebProto.VoteWitnessContract.Vote, t) + } + , + TronWebProto.VoteWitnessContract.prototype.clearVotesList = function() { + return this.setVotesList([]) + } + , + TronWebProto.VoteWitnessContract.prototype.getSupport = function() { + return n.Message.getBooleanFieldWithDefault(this, 3, !1) + } + , + TronWebProto.VoteWitnessContract.prototype.setSupport = function(e) { + return n.Message.setProto3BooleanField(this, 3, e) + } + , + o.object.extend(t, TronWebProto) + } + , + 3550: function(e, t, r) { + !function(e, t) { + "use strict"; + function n(e, t) { + if (!e) + throw new Error(t || "Assertion failed") + } + function o(e, t) { + e.super_ = t; + var r = function() {}; + r.prototype = t.prototype, + e.prototype = new r, + e.prototype.constructor = e + } + function s(e, t, r) { + if (s.isBN(e)) + return e; + this.negative = 0, + this.words = null, + this.length = 0, + this.red = null, + null !== e && ("le" !== t && "be" !== t || (r = t, + t = 10), + this._init(e || 0, t || 10, r || "be")) + } + var i; + "object" == typeof e ? e.exports = s : t.BN = s, + s.BN = s, + s.wordSize = 26; + try { + i = "undefined" != typeof window && void 0 !== window.Buffer ? window.Buffer : r(6601).Buffer + } catch (e) {} + function a(e, t) { + var r = e.charCodeAt(t); + return r >= 48 && r <= 57 ? r - 48 : r >= 65 && r <= 70 ? r - 55 : r >= 97 && r <= 102 ? r - 87 : void n(!1, "Invalid character in " + e) + } + function u(e, t, r) { + var n = a(e, r); + return r - 1 >= t && (n |= a(e, r - 1) << 4), + n + } + function c(e, t, r, o) { + for (var s = 0, i = 0, a = Math.min(e.length, r), u = t; u < a; u++) { + var c = e.charCodeAt(u) - 48; + s *= o, + i = c >= 49 ? c - 49 + 10 : c >= 17 ? c - 17 + 10 : c, + n(c >= 0 && i < o, "Invalid character"), + s += i + } + return s + } + function l(e, t) { + e.words = t.words, + e.length = t.length, + e.negative = t.negative, + e.red = t.red + } + if (s.isBN = function(e) { + return e instanceof s || null !== e && "object" == typeof e && e.constructor.wordSize === s.wordSize && Array.isArray(e.words) + } + , + s.max = function(e, t) { + return e.cmp(t) > 0 ? e : t + } + , + s.min = function(e, t) { + return e.cmp(t) < 0 ? e : t + } + , + s.prototype._init = function(e, t, r) { + if ("number" == typeof e) + return this._initNumber(e, t, r); + if ("object" == typeof e) + return this._initArray(e, t, r); + "hex" === t && (t = 16), + n(t === (0 | t) && t >= 2 && t <= 36); + var o = 0; + "-" === (e = e.toString().replace(/\s+/g, ""))[0] && (o++, + this.negative = 1), + o < e.length && (16 === t ? this._parseHex(e, o, r) : (this._parseBase(e, t, o), + "le" === r && this._initArray(this.toArray(), t, r))) + } + , + s.prototype._initNumber = function(e, t, r) { + e < 0 && (this.negative = 1, + e = -e), + e < 67108864 ? (this.words = [67108863 & e], + this.length = 1) : e < 4503599627370496 ? (this.words = [67108863 & e, e / 67108864 & 67108863], + this.length = 2) : (n(e < 9007199254740992), + this.words = [67108863 & e, e / 67108864 & 67108863, 1], + this.length = 3), + "le" === r && this._initArray(this.toArray(), t, r) + } + , + s.prototype._initArray = function(e, t, r) { + if (n("number" == typeof e.length), + e.length <= 0) + return this.words = [0], + this.length = 1, + this; + this.length = Math.ceil(e.length / 3), + this.words = new Array(this.length); + for (var o = 0; o < this.length; o++) + this.words[o] = 0; + var s, i, a = 0; + if ("be" === r) + for (o = e.length - 1, + s = 0; o >= 0; o -= 3) + i = e[o] | e[o - 1] << 8 | e[o - 2] << 16, + this.words[s] |= i << a & 67108863, + this.words[s + 1] = i >>> 26 - a & 67108863, + (a += 24) >= 26 && (a -= 26, + s++); + else if ("le" === r) + for (o = 0, + s = 0; o < e.length; o += 3) + i = e[o] | e[o + 1] << 8 | e[o + 2] << 16, + this.words[s] |= i << a & 67108863, + this.words[s + 1] = i >>> 26 - a & 67108863, + (a += 24) >= 26 && (a -= 26, + s++); + return this._strip() + } + , + s.prototype._parseHex = function(e, t, r) { + this.length = Math.ceil((e.length - t) / 6), + this.words = new Array(this.length); + for (var n = 0; n < this.length; n++) + this.words[n] = 0; + var o, s = 0, i = 0; + if ("be" === r) + for (n = e.length - 1; n >= t; n -= 2) + o = u(e, t, n) << s, + this.words[i] |= 67108863 & o, + s >= 18 ? (s -= 18, + i += 1, + this.words[i] |= o >>> 26) : s += 8; + else + for (n = (e.length - t) % 2 == 0 ? t + 1 : t; n < e.length; n += 2) + o = u(e, t, n) << s, + this.words[i] |= 67108863 & o, + s >= 18 ? (s -= 18, + i += 1, + this.words[i] |= o >>> 26) : s += 8; + this._strip() + } + , + s.prototype._parseBase = function(e, t, r) { + this.words = [0], + this.length = 1; + for (var n = 0, o = 1; o <= 67108863; o *= t) + n++; + n--, + o = o / t | 0; + for (var s = e.length - r, i = s % n, a = Math.min(s, s - i) + r, u = 0, l = r; l < a; l += n) + u = c(e, l, l + n, t), + this.imuln(o), + this.words[0] + u < 67108864 ? this.words[0] += u : this._iaddn(u); + if (0 !== i) { + var d = 1; + for (u = c(e, l, e.length, t), + l = 0; l < i; l++) + d *= t; + this.imuln(d), + this.words[0] + u < 67108864 ? this.words[0] += u : this._iaddn(u) + } + this._strip() + } + , + s.prototype.copy = function(e) { + e.words = new Array(this.length); + for (var t = 0; t < this.length; t++) + e.words[t] = this.words[t]; + e.length = this.length, + e.negative = this.negative, + e.red = this.red + } + , + s.prototype._move = function(e) { + l(e, this) + } + , + s.prototype.clone = function() { + var e = new s(null); + return this.copy(e), + e + } + , + s.prototype._expand = function(e) { + for (; this.length < e; ) + this.words[this.length++] = 0; + return this + } + , + s.prototype._strip = function() { + for (; this.length > 1 && 0 === this.words[this.length - 1]; ) + this.length--; + return this._normSign() + } + , + s.prototype._normSign = function() { + return 1 === this.length && 0 === this.words[0] && (this.negative = 0), + this + } + , + "undefined" != typeof Symbol && "function" == typeof Symbol.for) + try { + s.prototype[Symbol.for("nodejs.util.inspect.custom")] = d + } catch (e) { + s.prototype.inspect = d + } + else + s.prototype.inspect = d; + function d() { + return (this.red ? "" + } + var h = ["", "0", "00", "000", "0000", "00000", "000000", "0000000", "00000000", "000000000", "0000000000", "00000000000", "000000000000", "0000000000000", "00000000000000", "000000000000000", "0000000000000000", "00000000000000000", "000000000000000000", "0000000000000000000", "00000000000000000000", "000000000000000000000", "0000000000000000000000", "00000000000000000000000", "000000000000000000000000", "0000000000000000000000000"] + , p = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5] + , f = [0, 0, 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517, 7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101, 5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149, 243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176]; + function g(e, t, r) { + r.negative = t.negative ^ e.negative; + var n = e.length + t.length | 0; + r.length = n, + n = n - 1 | 0; + var o = 0 | e.words[0] + , s = 0 | t.words[0] + , i = o * s + , a = 67108863 & i + , u = i / 67108864 | 0; + r.words[0] = a; + for (var c = 1; c < n; c++) { + for (var l = u >>> 26, d = 67108863 & u, h = Math.min(c, t.length - 1), p = Math.max(0, c - e.length + 1); p <= h; p++) { + var f = c - p | 0; + l += (i = (o = 0 | e.words[f]) * (s = 0 | t.words[p]) + d) / 67108864 | 0, + d = 67108863 & i + } + r.words[c] = 0 | d, + u = 0 | l + } + return 0 !== u ? r.words[c] = 0 | u : r.length--, + r._strip() + } + s.prototype.toString = function(e, t) { + var r; + if (t = 0 | t || 1, + 16 === (e = e || 10) || "hex" === e) { + r = ""; + for (var o = 0, s = 0, i = 0; i < this.length; i++) { + var a = this.words[i] + , u = (16777215 & (a << o | s)).toString(16); + s = a >>> 24 - o & 16777215, + (o += 2) >= 26 && (o -= 26, + i--), + r = 0 !== s || i !== this.length - 1 ? h[6 - u.length] + u + r : u + r + } + for (0 !== s && (r = s.toString(16) + r); r.length % t != 0; ) + r = "0" + r; + return 0 !== this.negative && (r = "-" + r), + r + } + if (e === (0 | e) && e >= 2 && e <= 36) { + var c = p[e] + , l = f[e]; + r = ""; + var d = this.clone(); + for (d.negative = 0; !d.isZero(); ) { + var g = d.modrn(l).toString(e); + r = (d = d.idivn(l)).isZero() ? g + r : h[c - g.length] + g + r + } + for (this.isZero() && (r = "0" + r); r.length % t != 0; ) + r = "0" + r; + return 0 !== this.negative && (r = "-" + r), + r + } + n(!1, "Base should be between 2 and 36") + } + , + s.prototype.toNumber = function() { + var e = this.words[0]; + return 2 === this.length ? e += 67108864 * this.words[1] : 3 === this.length && 1 === this.words[2] ? e += 4503599627370496 + 67108864 * this.words[1] : this.length > 2 && n(!1, "Number can only safely store up to 53 bits"), + 0 !== this.negative ? -e : e + } + , + s.prototype.toJSON = function() { + return this.toString(16, 2) + } + , + i && (s.prototype.toBuffer = function(e, t) { + return this.toArrayLike(i, e, t) + } + ), + s.prototype.toArray = function(e, t) { + return this.toArrayLike(Array, e, t) + } + , + s.prototype.toArrayLike = function(e, t, r) { + this._strip(); + var o = this.byteLength() + , s = r || Math.max(1, o); + n(o <= s, "byte array longer than desired length"), + n(s > 0, "Requested array length <= 0"); + var i = function(e, t) { + return e.allocUnsafe ? e.allocUnsafe(t) : new e(t) + }(e, s); + return this["_toArrayLike" + ("le" === t ? "LE" : "BE")](i, o), + i + } + , + s.prototype._toArrayLikeLE = function(e, t) { + for (var r = 0, n = 0, o = 0, s = 0; o < this.length; o++) { + var i = this.words[o] << s | n; + e[r++] = 255 & i, + r < e.length && (e[r++] = i >> 8 & 255), + r < e.length && (e[r++] = i >> 16 & 255), + 6 === s ? (r < e.length && (e[r++] = i >> 24 & 255), + n = 0, + s = 0) : (n = i >>> 24, + s += 2) + } + if (r < e.length) + for (e[r++] = n; r < e.length; ) + e[r++] = 0 + } + , + s.prototype._toArrayLikeBE = function(e, t) { + for (var r = e.length - 1, n = 0, o = 0, s = 0; o < this.length; o++) { + var i = this.words[o] << s | n; + e[r--] = 255 & i, + r >= 0 && (e[r--] = i >> 8 & 255), + r >= 0 && (e[r--] = i >> 16 & 255), + 6 === s ? (r >= 0 && (e[r--] = i >> 24 & 255), + n = 0, + s = 0) : (n = i >>> 24, + s += 2) + } + if (r >= 0) + for (e[r--] = n; r >= 0; ) + e[r--] = 0 + } + , + Math.clz32 ? s.prototype._countBits = function(e) { + return 32 - Math.clz32(e) + } + : s.prototype._countBits = function(e) { + var t = e + , r = 0; + return t >= 4096 && (r += 13, + t >>>= 13), + t >= 64 && (r += 7, + t >>>= 7), + t >= 8 && (r += 4, + t >>>= 4), + t >= 2 && (r += 2, + t >>>= 2), + r + t + } + , + s.prototype._zeroBits = function(e) { + if (0 === e) + return 26; + var t = e + , r = 0; + return 0 == (8191 & t) && (r += 13, + t >>>= 13), + 0 == (127 & t) && (r += 7, + t >>>= 7), + 0 == (15 & t) && (r += 4, + t >>>= 4), + 0 == (3 & t) && (r += 2, + t >>>= 2), + 0 == (1 & t) && r++, + r + } + , + s.prototype.bitLength = function() { + var e = this.words[this.length - 1] + , t = this._countBits(e); + return 26 * (this.length - 1) + t + } + , + s.prototype.zeroBits = function() { + if (this.isZero()) + return 0; + for (var e = 0, t = 0; t < this.length; t++) { + var r = this._zeroBits(this.words[t]); + if (e += r, + 26 !== r) + break + } + return e + } + , + s.prototype.byteLength = function() { + return Math.ceil(this.bitLength() / 8) + } + , + s.prototype.toTwos = function(e) { + return 0 !== this.negative ? this.abs().inotn(e).iaddn(1) : this.clone() + } + , + s.prototype.fromTwos = function(e) { + return this.testn(e - 1) ? this.notn(e).iaddn(1).ineg() : this.clone() + } + , + s.prototype.isNeg = function() { + return 0 !== this.negative + } + , + s.prototype.neg = function() { + return this.clone().ineg() + } + , + s.prototype.ineg = function() { + return this.isZero() || (this.negative ^= 1), + this + } + , + s.prototype.iuor = function(e) { + for (; this.length < e.length; ) + this.words[this.length++] = 0; + for (var t = 0; t < e.length; t++) + this.words[t] = this.words[t] | e.words[t]; + return this._strip() + } + , + s.prototype.ior = function(e) { + return n(0 == (this.negative | e.negative)), + this.iuor(e) + } + , + s.prototype.or = function(e) { + return this.length > e.length ? this.clone().ior(e) : e.clone().ior(this) + } + , + s.prototype.uor = function(e) { + return this.length > e.length ? this.clone().iuor(e) : e.clone().iuor(this) + } + , + s.prototype.iuand = function(e) { + var t; + t = this.length > e.length ? e : this; + for (var r = 0; r < t.length; r++) + this.words[r] = this.words[r] & e.words[r]; + return this.length = t.length, + this._strip() + } + , + s.prototype.iand = function(e) { + return n(0 == (this.negative | e.negative)), + this.iuand(e) + } + , + s.prototype.and = function(e) { + return this.length > e.length ? this.clone().iand(e) : e.clone().iand(this) + } + , + s.prototype.uand = function(e) { + return this.length > e.length ? this.clone().iuand(e) : e.clone().iuand(this) + } + , + s.prototype.iuxor = function(e) { + var t, r; + this.length > e.length ? (t = this, + r = e) : (t = e, + r = this); + for (var n = 0; n < r.length; n++) + this.words[n] = t.words[n] ^ r.words[n]; + if (this !== t) + for (; n < t.length; n++) + this.words[n] = t.words[n]; + return this.length = t.length, + this._strip() + } + , + s.prototype.ixor = function(e) { + return n(0 == (this.negative | e.negative)), + this.iuxor(e) + } + , + s.prototype.xor = function(e) { + return this.length > e.length ? this.clone().ixor(e) : e.clone().ixor(this) + } + , + s.prototype.uxor = function(e) { + return this.length > e.length ? this.clone().iuxor(e) : e.clone().iuxor(this) + } + , + s.prototype.inotn = function(e) { + n("number" == typeof e && e >= 0); + var t = 0 | Math.ceil(e / 26) + , r = e % 26; + this._expand(t), + r > 0 && t--; + for (var o = 0; o < t; o++) + this.words[o] = 67108863 & ~this.words[o]; + return r > 0 && (this.words[o] = ~this.words[o] & 67108863 >> 26 - r), + this._strip() + } + , + s.prototype.notn = function(e) { + return this.clone().inotn(e) + } + , + s.prototype.setn = function(e, t) { + n("number" == typeof e && e >= 0); + var r = e / 26 | 0 + , o = e % 26; + return this._expand(r + 1), + this.words[r] = t ? this.words[r] | 1 << o : this.words[r] & ~(1 << o), + this._strip() + } + , + s.prototype.iadd = function(e) { + var t, r, n; + if (0 !== this.negative && 0 === e.negative) + return this.negative = 0, + t = this.isub(e), + this.negative ^= 1, + this._normSign(); + if (0 === this.negative && 0 !== e.negative) + return e.negative = 0, + t = this.isub(e), + e.negative = 1, + t._normSign(); + this.length > e.length ? (r = this, + n = e) : (r = e, + n = this); + for (var o = 0, s = 0; s < n.length; s++) + t = (0 | r.words[s]) + (0 | n.words[s]) + o, + this.words[s] = 67108863 & t, + o = t >>> 26; + for (; 0 !== o && s < r.length; s++) + t = (0 | r.words[s]) + o, + this.words[s] = 67108863 & t, + o = t >>> 26; + if (this.length = r.length, + 0 !== o) + this.words[this.length] = o, + this.length++; + else if (r !== this) + for (; s < r.length; s++) + this.words[s] = r.words[s]; + return this + } + , + s.prototype.add = function(e) { + var t; + return 0 !== e.negative && 0 === this.negative ? (e.negative = 0, + t = this.sub(e), + e.negative ^= 1, + t) : 0 === e.negative && 0 !== this.negative ? (this.negative = 0, + t = e.sub(this), + this.negative = 1, + t) : this.length > e.length ? this.clone().iadd(e) : e.clone().iadd(this) + } + , + s.prototype.isub = function(e) { + if (0 !== e.negative) { + e.negative = 0; + var t = this.iadd(e); + return e.negative = 1, + t._normSign() + } + if (0 !== this.negative) + return this.negative = 0, + this.iadd(e), + this.negative = 1, + this._normSign(); + var r, n, o = this.cmp(e); + if (0 === o) + return this.negative = 0, + this.length = 1, + this.words[0] = 0, + this; + o > 0 ? (r = this, + n = e) : (r = e, + n = this); + for (var s = 0, i = 0; i < n.length; i++) + s = (t = (0 | r.words[i]) - (0 | n.words[i]) + s) >> 26, + this.words[i] = 67108863 & t; + for (; 0 !== s && i < r.length; i++) + s = (t = (0 | r.words[i]) + s) >> 26, + this.words[i] = 67108863 & t; + if (0 === s && i < r.length && r !== this) + for (; i < r.length; i++) + this.words[i] = r.words[i]; + return this.length = Math.max(this.length, i), + r !== this && (this.negative = 1), + this._strip() + } + , + s.prototype.sub = function(e) { + return this.clone().isub(e) + } + ; + var y = function(e, t, r) { + var n, o, s, i = e.words, a = t.words, u = r.words, c = 0, l = 0 | i[0], d = 8191 & l, h = l >>> 13, p = 0 | i[1], f = 8191 & p, g = p >>> 13, y = 0 | i[2], b = 8191 & y, m = y >>> 13, T = 0 | i[3], v = 8191 & T, w = T >>> 13, A = 0 | i[4], P = 8191 & A, W = A >>> 13, B = 0 | i[5], C = 8191 & B, E = B >>> 13, M = 0 | i[6], I = 8191 & M, F = M >>> 13, O = 0 | i[7], S = 8191 & O, _ = O >>> 13, x = 0 | i[8], R = 8191 & x, N = x >>> 13, k = 0 | i[9], U = 8191 & k, D = k >>> 13, L = 0 | a[0], z = 8191 & L, j = L >>> 13, $ = 0 | a[1], V = 8191 & $, G = $ >>> 13, H = 0 | a[2], K = 8191 & H, Z = H >>> 13, q = 0 | a[3], J = 8191 & q, Y = q >>> 13, X = 0 | a[4], Q = 8191 & X, ee = X >>> 13, te = 0 | a[5], re = 8191 & te, ne = te >>> 13, oe = 0 | a[6], se = 8191 & oe, ie = oe >>> 13, ae = 0 | a[7], ue = 8191 & ae, ce = ae >>> 13, le = 0 | a[8], de = 8191 & le, he = le >>> 13, pe = 0 | a[9], fe = 8191 & pe, ge = pe >>> 13; + r.negative = e.negative ^ t.negative, + r.length = 19; + var ye = (c + (n = Math.imul(d, z)) | 0) + ((8191 & (o = (o = Math.imul(d, j)) + Math.imul(h, z) | 0)) << 13) | 0; + c = ((s = Math.imul(h, j)) + (o >>> 13) | 0) + (ye >>> 26) | 0, + ye &= 67108863, + n = Math.imul(f, z), + o = (o = Math.imul(f, j)) + Math.imul(g, z) | 0, + s = Math.imul(g, j); + var be = (c + (n = n + Math.imul(d, V) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(d, G) | 0) + Math.imul(h, V) | 0)) << 13) | 0; + c = ((s = s + Math.imul(h, G) | 0) + (o >>> 13) | 0) + (be >>> 26) | 0, + be &= 67108863, + n = Math.imul(b, z), + o = (o = Math.imul(b, j)) + Math.imul(m, z) | 0, + s = Math.imul(m, j), + n = n + Math.imul(f, V) | 0, + o = (o = o + Math.imul(f, G) | 0) + Math.imul(g, V) | 0, + s = s + Math.imul(g, G) | 0; + var me = (c + (n = n + Math.imul(d, K) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(d, Z) | 0) + Math.imul(h, K) | 0)) << 13) | 0; + c = ((s = s + Math.imul(h, Z) | 0) + (o >>> 13) | 0) + (me >>> 26) | 0, + me &= 67108863, + n = Math.imul(v, z), + o = (o = Math.imul(v, j)) + Math.imul(w, z) | 0, + s = Math.imul(w, j), + n = n + Math.imul(b, V) | 0, + o = (o = o + Math.imul(b, G) | 0) + Math.imul(m, V) | 0, + s = s + Math.imul(m, G) | 0, + n = n + Math.imul(f, K) | 0, + o = (o = o + Math.imul(f, Z) | 0) + Math.imul(g, K) | 0, + s = s + Math.imul(g, Z) | 0; + var Te = (c + (n = n + Math.imul(d, J) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(d, Y) | 0) + Math.imul(h, J) | 0)) << 13) | 0; + c = ((s = s + Math.imul(h, Y) | 0) + (o >>> 13) | 0) + (Te >>> 26) | 0, + Te &= 67108863, + n = Math.imul(P, z), + o = (o = Math.imul(P, j)) + Math.imul(W, z) | 0, + s = Math.imul(W, j), + n = n + Math.imul(v, V) | 0, + o = (o = o + Math.imul(v, G) | 0) + Math.imul(w, V) | 0, + s = s + Math.imul(w, G) | 0, + n = n + Math.imul(b, K) | 0, + o = (o = o + Math.imul(b, Z) | 0) + Math.imul(m, K) | 0, + s = s + Math.imul(m, Z) | 0, + n = n + Math.imul(f, J) | 0, + o = (o = o + Math.imul(f, Y) | 0) + Math.imul(g, J) | 0, + s = s + Math.imul(g, Y) | 0; + var ve = (c + (n = n + Math.imul(d, Q) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(d, ee) | 0) + Math.imul(h, Q) | 0)) << 13) | 0; + c = ((s = s + Math.imul(h, ee) | 0) + (o >>> 13) | 0) + (ve >>> 26) | 0, + ve &= 67108863, + n = Math.imul(C, z), + o = (o = Math.imul(C, j)) + Math.imul(E, z) | 0, + s = Math.imul(E, j), + n = n + Math.imul(P, V) | 0, + o = (o = o + Math.imul(P, G) | 0) + Math.imul(W, V) | 0, + s = s + Math.imul(W, G) | 0, + n = n + Math.imul(v, K) | 0, + o = (o = o + Math.imul(v, Z) | 0) + Math.imul(w, K) | 0, + s = s + Math.imul(w, Z) | 0, + n = n + Math.imul(b, J) | 0, + o = (o = o + Math.imul(b, Y) | 0) + Math.imul(m, J) | 0, + s = s + Math.imul(m, Y) | 0, + n = n + Math.imul(f, Q) | 0, + o = (o = o + Math.imul(f, ee) | 0) + Math.imul(g, Q) | 0, + s = s + Math.imul(g, ee) | 0; + var we = (c + (n = n + Math.imul(d, re) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(d, ne) | 0) + Math.imul(h, re) | 0)) << 13) | 0; + c = ((s = s + Math.imul(h, ne) | 0) + (o >>> 13) | 0) + (we >>> 26) | 0, + we &= 67108863, + n = Math.imul(I, z), + o = (o = Math.imul(I, j)) + Math.imul(F, z) | 0, + s = Math.imul(F, j), + n = n + Math.imul(C, V) | 0, + o = (o = o + Math.imul(C, G) | 0) + Math.imul(E, V) | 0, + s = s + Math.imul(E, G) | 0, + n = n + Math.imul(P, K) | 0, + o = (o = o + Math.imul(P, Z) | 0) + Math.imul(W, K) | 0, + s = s + Math.imul(W, Z) | 0, + n = n + Math.imul(v, J) | 0, + o = (o = o + Math.imul(v, Y) | 0) + Math.imul(w, J) | 0, + s = s + Math.imul(w, Y) | 0, + n = n + Math.imul(b, Q) | 0, + o = (o = o + Math.imul(b, ee) | 0) + Math.imul(m, Q) | 0, + s = s + Math.imul(m, ee) | 0, + n = n + Math.imul(f, re) | 0, + o = (o = o + Math.imul(f, ne) | 0) + Math.imul(g, re) | 0, + s = s + Math.imul(g, ne) | 0; + var Ae = (c + (n = n + Math.imul(d, se) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(d, ie) | 0) + Math.imul(h, se) | 0)) << 13) | 0; + c = ((s = s + Math.imul(h, ie) | 0) + (o >>> 13) | 0) + (Ae >>> 26) | 0, + Ae &= 67108863, + n = Math.imul(S, z), + o = (o = Math.imul(S, j)) + Math.imul(_, z) | 0, + s = Math.imul(_, j), + n = n + Math.imul(I, V) | 0, + o = (o = o + Math.imul(I, G) | 0) + Math.imul(F, V) | 0, + s = s + Math.imul(F, G) | 0, + n = n + Math.imul(C, K) | 0, + o = (o = o + Math.imul(C, Z) | 0) + Math.imul(E, K) | 0, + s = s + Math.imul(E, Z) | 0, + n = n + Math.imul(P, J) | 0, + o = (o = o + Math.imul(P, Y) | 0) + Math.imul(W, J) | 0, + s = s + Math.imul(W, Y) | 0, + n = n + Math.imul(v, Q) | 0, + o = (o = o + Math.imul(v, ee) | 0) + Math.imul(w, Q) | 0, + s = s + Math.imul(w, ee) | 0, + n = n + Math.imul(b, re) | 0, + o = (o = o + Math.imul(b, ne) | 0) + Math.imul(m, re) | 0, + s = s + Math.imul(m, ne) | 0, + n = n + Math.imul(f, se) | 0, + o = (o = o + Math.imul(f, ie) | 0) + Math.imul(g, se) | 0, + s = s + Math.imul(g, ie) | 0; + var Pe = (c + (n = n + Math.imul(d, ue) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(d, ce) | 0) + Math.imul(h, ue) | 0)) << 13) | 0; + c = ((s = s + Math.imul(h, ce) | 0) + (o >>> 13) | 0) + (Pe >>> 26) | 0, + Pe &= 67108863, + n = Math.imul(R, z), + o = (o = Math.imul(R, j)) + Math.imul(N, z) | 0, + s = Math.imul(N, j), + n = n + Math.imul(S, V) | 0, + o = (o = o + Math.imul(S, G) | 0) + Math.imul(_, V) | 0, + s = s + Math.imul(_, G) | 0, + n = n + Math.imul(I, K) | 0, + o = (o = o + Math.imul(I, Z) | 0) + Math.imul(F, K) | 0, + s = s + Math.imul(F, Z) | 0, + n = n + Math.imul(C, J) | 0, + o = (o = o + Math.imul(C, Y) | 0) + Math.imul(E, J) | 0, + s = s + Math.imul(E, Y) | 0, + n = n + Math.imul(P, Q) | 0, + o = (o = o + Math.imul(P, ee) | 0) + Math.imul(W, Q) | 0, + s = s + Math.imul(W, ee) | 0, + n = n + Math.imul(v, re) | 0, + o = (o = o + Math.imul(v, ne) | 0) + Math.imul(w, re) | 0, + s = s + Math.imul(w, ne) | 0, + n = n + Math.imul(b, se) | 0, + o = (o = o + Math.imul(b, ie) | 0) + Math.imul(m, se) | 0, + s = s + Math.imul(m, ie) | 0, + n = n + Math.imul(f, ue) | 0, + o = (o = o + Math.imul(f, ce) | 0) + Math.imul(g, ue) | 0, + s = s + Math.imul(g, ce) | 0; + var We = (c + (n = n + Math.imul(d, de) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(d, he) | 0) + Math.imul(h, de) | 0)) << 13) | 0; + c = ((s = s + Math.imul(h, he) | 0) + (o >>> 13) | 0) + (We >>> 26) | 0, + We &= 67108863, + n = Math.imul(U, z), + o = (o = Math.imul(U, j)) + Math.imul(D, z) | 0, + s = Math.imul(D, j), + n = n + Math.imul(R, V) | 0, + o = (o = o + Math.imul(R, G) | 0) + Math.imul(N, V) | 0, + s = s + Math.imul(N, G) | 0, + n = n + Math.imul(S, K) | 0, + o = (o = o + Math.imul(S, Z) | 0) + Math.imul(_, K) | 0, + s = s + Math.imul(_, Z) | 0, + n = n + Math.imul(I, J) | 0, + o = (o = o + Math.imul(I, Y) | 0) + Math.imul(F, J) | 0, + s = s + Math.imul(F, Y) | 0, + n = n + Math.imul(C, Q) | 0, + o = (o = o + Math.imul(C, ee) | 0) + Math.imul(E, Q) | 0, + s = s + Math.imul(E, ee) | 0, + n = n + Math.imul(P, re) | 0, + o = (o = o + Math.imul(P, ne) | 0) + Math.imul(W, re) | 0, + s = s + Math.imul(W, ne) | 0, + n = n + Math.imul(v, se) | 0, + o = (o = o + Math.imul(v, ie) | 0) + Math.imul(w, se) | 0, + s = s + Math.imul(w, ie) | 0, + n = n + Math.imul(b, ue) | 0, + o = (o = o + Math.imul(b, ce) | 0) + Math.imul(m, ue) | 0, + s = s + Math.imul(m, ce) | 0, + n = n + Math.imul(f, de) | 0, + o = (o = o + Math.imul(f, he) | 0) + Math.imul(g, de) | 0, + s = s + Math.imul(g, he) | 0; + var Be = (c + (n = n + Math.imul(d, fe) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(d, ge) | 0) + Math.imul(h, fe) | 0)) << 13) | 0; + c = ((s = s + Math.imul(h, ge) | 0) + (o >>> 13) | 0) + (Be >>> 26) | 0, + Be &= 67108863, + n = Math.imul(U, V), + o = (o = Math.imul(U, G)) + Math.imul(D, V) | 0, + s = Math.imul(D, G), + n = n + Math.imul(R, K) | 0, + o = (o = o + Math.imul(R, Z) | 0) + Math.imul(N, K) | 0, + s = s + Math.imul(N, Z) | 0, + n = n + Math.imul(S, J) | 0, + o = (o = o + Math.imul(S, Y) | 0) + Math.imul(_, J) | 0, + s = s + Math.imul(_, Y) | 0, + n = n + Math.imul(I, Q) | 0, + o = (o = o + Math.imul(I, ee) | 0) + Math.imul(F, Q) | 0, + s = s + Math.imul(F, ee) | 0, + n = n + Math.imul(C, re) | 0, + o = (o = o + Math.imul(C, ne) | 0) + Math.imul(E, re) | 0, + s = s + Math.imul(E, ne) | 0, + n = n + Math.imul(P, se) | 0, + o = (o = o + Math.imul(P, ie) | 0) + Math.imul(W, se) | 0, + s = s + Math.imul(W, ie) | 0, + n = n + Math.imul(v, ue) | 0, + o = (o = o + Math.imul(v, ce) | 0) + Math.imul(w, ue) | 0, + s = s + Math.imul(w, ce) | 0, + n = n + Math.imul(b, de) | 0, + o = (o = o + Math.imul(b, he) | 0) + Math.imul(m, de) | 0, + s = s + Math.imul(m, he) | 0; + var Ce = (c + (n = n + Math.imul(f, fe) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(f, ge) | 0) + Math.imul(g, fe) | 0)) << 13) | 0; + c = ((s = s + Math.imul(g, ge) | 0) + (o >>> 13) | 0) + (Ce >>> 26) | 0, + Ce &= 67108863, + n = Math.imul(U, K), + o = (o = Math.imul(U, Z)) + Math.imul(D, K) | 0, + s = Math.imul(D, Z), + n = n + Math.imul(R, J) | 0, + o = (o = o + Math.imul(R, Y) | 0) + Math.imul(N, J) | 0, + s = s + Math.imul(N, Y) | 0, + n = n + Math.imul(S, Q) | 0, + o = (o = o + Math.imul(S, ee) | 0) + Math.imul(_, Q) | 0, + s = s + Math.imul(_, ee) | 0, + n = n + Math.imul(I, re) | 0, + o = (o = o + Math.imul(I, ne) | 0) + Math.imul(F, re) | 0, + s = s + Math.imul(F, ne) | 0, + n = n + Math.imul(C, se) | 0, + o = (o = o + Math.imul(C, ie) | 0) + Math.imul(E, se) | 0, + s = s + Math.imul(E, ie) | 0, + n = n + Math.imul(P, ue) | 0, + o = (o = o + Math.imul(P, ce) | 0) + Math.imul(W, ue) | 0, + s = s + Math.imul(W, ce) | 0, + n = n + Math.imul(v, de) | 0, + o = (o = o + Math.imul(v, he) | 0) + Math.imul(w, de) | 0, + s = s + Math.imul(w, he) | 0; + var Ee = (c + (n = n + Math.imul(b, fe) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(b, ge) | 0) + Math.imul(m, fe) | 0)) << 13) | 0; + c = ((s = s + Math.imul(m, ge) | 0) + (o >>> 13) | 0) + (Ee >>> 26) | 0, + Ee &= 67108863, + n = Math.imul(U, J), + o = (o = Math.imul(U, Y)) + Math.imul(D, J) | 0, + s = Math.imul(D, Y), + n = n + Math.imul(R, Q) | 0, + o = (o = o + Math.imul(R, ee) | 0) + Math.imul(N, Q) | 0, + s = s + Math.imul(N, ee) | 0, + n = n + Math.imul(S, re) | 0, + o = (o = o + Math.imul(S, ne) | 0) + Math.imul(_, re) | 0, + s = s + Math.imul(_, ne) | 0, + n = n + Math.imul(I, se) | 0, + o = (o = o + Math.imul(I, ie) | 0) + Math.imul(F, se) | 0, + s = s + Math.imul(F, ie) | 0, + n = n + Math.imul(C, ue) | 0, + o = (o = o + Math.imul(C, ce) | 0) + Math.imul(E, ue) | 0, + s = s + Math.imul(E, ce) | 0, + n = n + Math.imul(P, de) | 0, + o = (o = o + Math.imul(P, he) | 0) + Math.imul(W, de) | 0, + s = s + Math.imul(W, he) | 0; + var Me = (c + (n = n + Math.imul(v, fe) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(v, ge) | 0) + Math.imul(w, fe) | 0)) << 13) | 0; + c = ((s = s + Math.imul(w, ge) | 0) + (o >>> 13) | 0) + (Me >>> 26) | 0, + Me &= 67108863, + n = Math.imul(U, Q), + o = (o = Math.imul(U, ee)) + Math.imul(D, Q) | 0, + s = Math.imul(D, ee), + n = n + Math.imul(R, re) | 0, + o = (o = o + Math.imul(R, ne) | 0) + Math.imul(N, re) | 0, + s = s + Math.imul(N, ne) | 0, + n = n + Math.imul(S, se) | 0, + o = (o = o + Math.imul(S, ie) | 0) + Math.imul(_, se) | 0, + s = s + Math.imul(_, ie) | 0, + n = n + Math.imul(I, ue) | 0, + o = (o = o + Math.imul(I, ce) | 0) + Math.imul(F, ue) | 0, + s = s + Math.imul(F, ce) | 0, + n = n + Math.imul(C, de) | 0, + o = (o = o + Math.imul(C, he) | 0) + Math.imul(E, de) | 0, + s = s + Math.imul(E, he) | 0; + var Ie = (c + (n = n + Math.imul(P, fe) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(P, ge) | 0) + Math.imul(W, fe) | 0)) << 13) | 0; + c = ((s = s + Math.imul(W, ge) | 0) + (o >>> 13) | 0) + (Ie >>> 26) | 0, + Ie &= 67108863, + n = Math.imul(U, re), + o = (o = Math.imul(U, ne)) + Math.imul(D, re) | 0, + s = Math.imul(D, ne), + n = n + Math.imul(R, se) | 0, + o = (o = o + Math.imul(R, ie) | 0) + Math.imul(N, se) | 0, + s = s + Math.imul(N, ie) | 0, + n = n + Math.imul(S, ue) | 0, + o = (o = o + Math.imul(S, ce) | 0) + Math.imul(_, ue) | 0, + s = s + Math.imul(_, ce) | 0, + n = n + Math.imul(I, de) | 0, + o = (o = o + Math.imul(I, he) | 0) + Math.imul(F, de) | 0, + s = s + Math.imul(F, he) | 0; + var Fe = (c + (n = n + Math.imul(C, fe) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(C, ge) | 0) + Math.imul(E, fe) | 0)) << 13) | 0; + c = ((s = s + Math.imul(E, ge) | 0) + (o >>> 13) | 0) + (Fe >>> 26) | 0, + Fe &= 67108863, + n = Math.imul(U, se), + o = (o = Math.imul(U, ie)) + Math.imul(D, se) | 0, + s = Math.imul(D, ie), + n = n + Math.imul(R, ue) | 0, + o = (o = o + Math.imul(R, ce) | 0) + Math.imul(N, ue) | 0, + s = s + Math.imul(N, ce) | 0, + n = n + Math.imul(S, de) | 0, + o = (o = o + Math.imul(S, he) | 0) + Math.imul(_, de) | 0, + s = s + Math.imul(_, he) | 0; + var Oe = (c + (n = n + Math.imul(I, fe) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(I, ge) | 0) + Math.imul(F, fe) | 0)) << 13) | 0; + c = ((s = s + Math.imul(F, ge) | 0) + (o >>> 13) | 0) + (Oe >>> 26) | 0, + Oe &= 67108863, + n = Math.imul(U, ue), + o = (o = Math.imul(U, ce)) + Math.imul(D, ue) | 0, + s = Math.imul(D, ce), + n = n + Math.imul(R, de) | 0, + o = (o = o + Math.imul(R, he) | 0) + Math.imul(N, de) | 0, + s = s + Math.imul(N, he) | 0; + var Se = (c + (n = n + Math.imul(S, fe) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(S, ge) | 0) + Math.imul(_, fe) | 0)) << 13) | 0; + c = ((s = s + Math.imul(_, ge) | 0) + (o >>> 13) | 0) + (Se >>> 26) | 0, + Se &= 67108863, + n = Math.imul(U, de), + o = (o = Math.imul(U, he)) + Math.imul(D, de) | 0, + s = Math.imul(D, he); + var _e = (c + (n = n + Math.imul(R, fe) | 0) | 0) + ((8191 & (o = (o = o + Math.imul(R, ge) | 0) + Math.imul(N, fe) | 0)) << 13) | 0; + c = ((s = s + Math.imul(N, ge) | 0) + (o >>> 13) | 0) + (_e >>> 26) | 0, + _e &= 67108863; + var xe = (c + (n = Math.imul(U, fe)) | 0) + ((8191 & (o = (o = Math.imul(U, ge)) + Math.imul(D, fe) | 0)) << 13) | 0; + return c = ((s = Math.imul(D, ge)) + (o >>> 13) | 0) + (xe >>> 26) | 0, + xe &= 67108863, + u[0] = ye, + u[1] = be, + u[2] = me, + u[3] = Te, + u[4] = ve, + u[5] = we, + u[6] = Ae, + u[7] = Pe, + u[8] = We, + u[9] = Be, + u[10] = Ce, + u[11] = Ee, + u[12] = Me, + u[13] = Ie, + u[14] = Fe, + u[15] = Oe, + u[16] = Se, + u[17] = _e, + u[18] = xe, + 0 !== c && (u[19] = c, + r.length++), + r + }; + function b(e, t, r) { + r.negative = t.negative ^ e.negative, + r.length = e.length + t.length; + for (var n = 0, o = 0, s = 0; s < r.length - 1; s++) { + var i = o; + o = 0; + for (var a = 67108863 & n, u = Math.min(s, t.length - 1), c = Math.max(0, s - e.length + 1); c <= u; c++) { + var l = s - c + , d = (0 | e.words[l]) * (0 | t.words[c]) + , h = 67108863 & d; + a = 67108863 & (h = h + a | 0), + o += (i = (i = i + (d / 67108864 | 0) | 0) + (h >>> 26) | 0) >>> 26, + i &= 67108863 + } + r.words[s] = a, + n = i, + i = o + } + return 0 !== n ? r.words[s] = n : r.length--, + r._strip() + } + function m(e, t, r) { + return b(e, t, r) + } + function T(e, t) { + this.x = e, + this.y = t + } + Math.imul || (y = g), + s.prototype.mulTo = function(e, t) { + var r = this.length + e.length; + return 10 === this.length && 10 === e.length ? y(this, e, t) : r < 63 ? g(this, e, t) : r < 1024 ? b(this, e, t) : m(this, e, t) + } + , + T.prototype.makeRBT = function(e) { + for (var t = new Array(e), r = s.prototype._countBits(e) - 1, n = 0; n < e; n++) + t[n] = this.revBin(n, r, e); + return t + } + , + T.prototype.revBin = function(e, t, r) { + if (0 === e || e === r - 1) + return e; + for (var n = 0, o = 0; o < t; o++) + n |= (1 & e) << t - o - 1, + e >>= 1; + return n + } + , + T.prototype.permute = function(e, t, r, n, o, s) { + for (var i = 0; i < s; i++) + n[i] = t[e[i]], + o[i] = r[e[i]] + } + , + T.prototype.transform = function(e, t, r, n, o, s) { + this.permute(s, e, t, r, n, o); + for (var i = 1; i < o; i <<= 1) + for (var a = i << 1, u = Math.cos(2 * Math.PI / a), c = Math.sin(2 * Math.PI / a), l = 0; l < o; l += a) + for (var d = u, h = c, p = 0; p < i; p++) { + var f = r[l + p] + , g = n[l + p] + , y = r[l + p + i] + , b = n[l + p + i] + , m = d * y - h * b; + b = d * b + h * y, + y = m, + r[l + p] = f + y, + n[l + p] = g + b, + r[l + p + i] = f - y, + n[l + p + i] = g - b, + p !== a && (m = u * d - c * h, + h = u * h + c * d, + d = m) + } + } + , + T.prototype.guessLen13b = function(e, t) { + var r = 1 | Math.max(t, e) + , n = 1 & r + , o = 0; + for (r = r / 2 | 0; r; r >>>= 1) + o++; + return 1 << o + 1 + n + } + , + T.prototype.conjugate = function(e, t, r) { + if (!(r <= 1)) + for (var n = 0; n < r / 2; n++) { + var o = e[n]; + e[n] = e[r - n - 1], + e[r - n - 1] = o, + o = t[n], + t[n] = -t[r - n - 1], + t[r - n - 1] = -o + } + } + , + T.prototype.normalize13b = function(e, t) { + for (var r = 0, n = 0; n < t / 2; n++) { + var o = 8192 * Math.round(e[2 * n + 1] / t) + Math.round(e[2 * n] / t) + r; + e[n] = 67108863 & o, + r = o < 67108864 ? 0 : o / 67108864 | 0 + } + return e + } + , + T.prototype.convert13b = function(e, t, r, o) { + for (var s = 0, i = 0; i < t; i++) + s += 0 | e[i], + r[2 * i] = 8191 & s, + s >>>= 13, + r[2 * i + 1] = 8191 & s, + s >>>= 13; + for (i = 2 * t; i < o; ++i) + r[i] = 0; + n(0 === s), + n(0 == (-8192 & s)) + } + , + T.prototype.stub = function(e) { + for (var t = new Array(e), r = 0; r < e; r++) + t[r] = 0; + return t + } + , + T.prototype.mulp = function(e, t, r) { + var n = 2 * this.guessLen13b(e.length, t.length) + , o = this.makeRBT(n) + , s = this.stub(n) + , i = new Array(n) + , a = new Array(n) + , u = new Array(n) + , c = new Array(n) + , l = new Array(n) + , d = new Array(n) + , h = r.words; + h.length = n, + this.convert13b(e.words, e.length, i, n), + this.convert13b(t.words, t.length, c, n), + this.transform(i, s, a, u, n, o), + this.transform(c, s, l, d, n, o); + for (var p = 0; p < n; p++) { + var f = a[p] * l[p] - u[p] * d[p]; + u[p] = a[p] * d[p] + u[p] * l[p], + a[p] = f + } + return this.conjugate(a, u, n), + this.transform(a, u, h, s, n, o), + this.conjugate(h, s, n), + this.normalize13b(h, n), + r.negative = e.negative ^ t.negative, + r.length = e.length + t.length, + r._strip() + } + , + s.prototype.mul = function(e) { + var t = new s(null); + return t.words = new Array(this.length + e.length), + this.mulTo(e, t) + } + , + s.prototype.mulf = function(e) { + var t = new s(null); + return t.words = new Array(this.length + e.length), + m(this, e, t) + } + , + s.prototype.imul = function(e) { + return this.clone().mulTo(e, this) + } + , + s.prototype.imuln = function(e) { + var t = e < 0; + t && (e = -e), + n("number" == typeof e), + n(e < 67108864); + for (var r = 0, o = 0; o < this.length; o++) { + var s = (0 | this.words[o]) * e + , i = (67108863 & s) + (67108863 & r); + r >>= 26, + r += s / 67108864 | 0, + r += i >>> 26, + this.words[o] = 67108863 & i + } + return 0 !== r && (this.words[o] = r, + this.length++), + t ? this.ineg() : this + } + , + s.prototype.muln = function(e) { + return this.clone().imuln(e) + } + , + s.prototype.sqr = function() { + return this.mul(this) + } + , + s.prototype.isqr = function() { + return this.imul(this.clone()) + } + , + s.prototype.pow = function(e) { + var t = function(e) { + for (var t = new Array(e.bitLength()), r = 0; r < t.length; r++) { + var n = r / 26 | 0 + , o = r % 26; + t[r] = e.words[n] >>> o & 1 + } + return t + }(e); + if (0 === t.length) + return new s(1); + for (var r = this, n = 0; n < t.length && 0 === t[n]; n++, + r = r.sqr()) + ; + if (++n < t.length) + for (var o = r.sqr(); n < t.length; n++, + o = o.sqr()) + 0 !== t[n] && (r = r.mul(o)); + return r + } + , + s.prototype.iushln = function(e) { + n("number" == typeof e && e >= 0); + var t, r = e % 26, o = (e - r) / 26, s = 67108863 >>> 26 - r << 26 - r; + if (0 !== r) { + var i = 0; + for (t = 0; t < this.length; t++) { + var a = this.words[t] & s + , u = (0 | this.words[t]) - a << r; + this.words[t] = u | i, + i = a >>> 26 - r + } + i && (this.words[t] = i, + this.length++) + } + if (0 !== o) { + for (t = this.length - 1; t >= 0; t--) + this.words[t + o] = this.words[t]; + for (t = 0; t < o; t++) + this.words[t] = 0; + this.length += o + } + return this._strip() + } + , + s.prototype.ishln = function(e) { + return n(0 === this.negative), + this.iushln(e) + } + , + s.prototype.iushrn = function(e, t, r) { + var o; + n("number" == typeof e && e >= 0), + o = t ? (t - t % 26) / 26 : 0; + var s = e % 26 + , i = Math.min((e - s) / 26, this.length) + , a = 67108863 ^ 67108863 >>> s << s + , u = r; + if (o -= i, + o = Math.max(0, o), + u) { + for (var c = 0; c < i; c++) + u.words[c] = this.words[c]; + u.length = i + } + if (0 === i) + ; + else if (this.length > i) + for (this.length -= i, + c = 0; c < this.length; c++) + this.words[c] = this.words[c + i]; + else + this.words[0] = 0, + this.length = 1; + var l = 0; + for (c = this.length - 1; c >= 0 && (0 !== l || c >= o); c--) { + var d = 0 | this.words[c]; + this.words[c] = l << 26 - s | d >>> s, + l = d & a + } + return u && 0 !== l && (u.words[u.length++] = l), + 0 === this.length && (this.words[0] = 0, + this.length = 1), + this._strip() + } + , + s.prototype.ishrn = function(e, t, r) { + return n(0 === this.negative), + this.iushrn(e, t, r) + } + , + s.prototype.shln = function(e) { + return this.clone().ishln(e) + } + , + s.prototype.ushln = function(e) { + return this.clone().iushln(e) + } + , + s.prototype.shrn = function(e) { + return this.clone().ishrn(e) + } + , + s.prototype.ushrn = function(e) { + return this.clone().iushrn(e) + } + , + s.prototype.testn = function(e) { + n("number" == typeof e && e >= 0); + var t = e % 26 + , r = (e - t) / 26 + , o = 1 << t; + return !(this.length <= r || !(this.words[r] & o)) + } + , + s.prototype.imaskn = function(e) { + n("number" == typeof e && e >= 0); + var t = e % 26 + , r = (e - t) / 26; + if (n(0 === this.negative, "imaskn works only with positive numbers"), + this.length <= r) + return this; + if (0 !== t && r++, + this.length = Math.min(r, this.length), + 0 !== t) { + var o = 67108863 ^ 67108863 >>> t << t; + this.words[this.length - 1] &= o + } + return this._strip() + } + , + s.prototype.maskn = function(e) { + return this.clone().imaskn(e) + } + , + s.prototype.iaddn = function(e) { + return n("number" == typeof e), + n(e < 67108864), + e < 0 ? this.isubn(-e) : 0 !== this.negative ? 1 === this.length && (0 | this.words[0]) <= e ? (this.words[0] = e - (0 | this.words[0]), + this.negative = 0, + this) : (this.negative = 0, + this.isubn(e), + this.negative = 1, + this) : this._iaddn(e) + } + , + s.prototype._iaddn = function(e) { + this.words[0] += e; + for (var t = 0; t < this.length && this.words[t] >= 67108864; t++) + this.words[t] -= 67108864, + t === this.length - 1 ? this.words[t + 1] = 1 : this.words[t + 1]++; + return this.length = Math.max(this.length, t + 1), + this + } + , + s.prototype.isubn = function(e) { + if (n("number" == typeof e), + n(e < 67108864), + e < 0) + return this.iaddn(-e); + if (0 !== this.negative) + return this.negative = 0, + this.iaddn(e), + this.negative = 1, + this; + if (this.words[0] -= e, + 1 === this.length && this.words[0] < 0) + this.words[0] = -this.words[0], + this.negative = 1; + else + for (var t = 0; t < this.length && this.words[t] < 0; t++) + this.words[t] += 67108864, + this.words[t + 1] -= 1; + return this._strip() + } + , + s.prototype.addn = function(e) { + return this.clone().iaddn(e) + } + , + s.prototype.subn = function(e) { + return this.clone().isubn(e) + } + , + s.prototype.iabs = function() { + return this.negative = 0, + this + } + , + s.prototype.abs = function() { + return this.clone().iabs() + } + , + s.prototype._ishlnsubmul = function(e, t, r) { + var o, s, i = e.length + r; + this._expand(i); + var a = 0; + for (o = 0; o < e.length; o++) { + s = (0 | this.words[o + r]) + a; + var u = (0 | e.words[o]) * t; + a = ((s -= 67108863 & u) >> 26) - (u / 67108864 | 0), + this.words[o + r] = 67108863 & s + } + for (; o < this.length - r; o++) + a = (s = (0 | this.words[o + r]) + a) >> 26, + this.words[o + r] = 67108863 & s; + if (0 === a) + return this._strip(); + for (n(-1 === a), + a = 0, + o = 0; o < this.length; o++) + a = (s = -(0 | this.words[o]) + a) >> 26, + this.words[o] = 67108863 & s; + return this.negative = 1, + this._strip() + } + , + s.prototype._wordDiv = function(e, t) { + var r = (this.length, + e.length) + , n = this.clone() + , o = e + , i = 0 | o.words[o.length - 1]; + 0 != (r = 26 - this._countBits(i)) && (o = o.ushln(r), + n.iushln(r), + i = 0 | o.words[o.length - 1]); + var a, u = n.length - o.length; + if ("mod" !== t) { + (a = new s(null)).length = u + 1, + a.words = new Array(a.length); + for (var c = 0; c < a.length; c++) + a.words[c] = 0 + } + var l = n.clone()._ishlnsubmul(o, 1, u); + 0 === l.negative && (n = l, + a && (a.words[u] = 1)); + for (var d = u - 1; d >= 0; d--) { + var h = 67108864 * (0 | n.words[o.length + d]) + (0 | n.words[o.length + d - 1]); + for (h = Math.min(h / i | 0, 67108863), + n._ishlnsubmul(o, h, d); 0 !== n.negative; ) + h--, + n.negative = 0, + n._ishlnsubmul(o, 1, d), + n.isZero() || (n.negative ^= 1); + a && (a.words[d] = h) + } + return a && a._strip(), + n._strip(), + "div" !== t && 0 !== r && n.iushrn(r), + { + div: a || null, + mod: n + } + } + , + s.prototype.divmod = function(e, t, r) { + return n(!e.isZero()), + this.isZero() ? { + div: new s(0), + mod: new s(0) + } : 0 !== this.negative && 0 === e.negative ? (a = this.neg().divmod(e, t), + "mod" !== t && (o = a.div.neg()), + "div" !== t && (i = a.mod.neg(), + r && 0 !== i.negative && i.iadd(e)), + { + div: o, + mod: i + }) : 0 === this.negative && 0 !== e.negative ? (a = this.divmod(e.neg(), t), + "mod" !== t && (o = a.div.neg()), + { + div: o, + mod: a.mod + }) : 0 != (this.negative & e.negative) ? (a = this.neg().divmod(e.neg(), t), + "div" !== t && (i = a.mod.neg(), + r && 0 !== i.negative && i.isub(e)), + { + div: a.div, + mod: i + }) : e.length > this.length || this.cmp(e) < 0 ? { + div: new s(0), + mod: this + } : 1 === e.length ? "div" === t ? { + div: this.divn(e.words[0]), + mod: null + } : "mod" === t ? { + div: null, + mod: new s(this.modrn(e.words[0])) + } : { + div: this.divn(e.words[0]), + mod: new s(this.modrn(e.words[0])) + } : this._wordDiv(e, t); + var o, i, a + } + , + s.prototype.div = function(e) { + return this.divmod(e, "div", !1).div + } + , + s.prototype.mod = function(e) { + return this.divmod(e, "mod", !1).mod + } + , + s.prototype.umod = function(e) { + return this.divmod(e, "mod", !0).mod + } + , + s.prototype.divRound = function(e) { + var t = this.divmod(e); + if (t.mod.isZero()) + return t.div; + var r = 0 !== t.div.negative ? t.mod.isub(e) : t.mod + , n = e.ushrn(1) + , o = e.andln(1) + , s = r.cmp(n); + return s < 0 || 1 === o && 0 === s ? t.div : 0 !== t.div.negative ? t.div.isubn(1) : t.div.iaddn(1) + } + , + s.prototype.modrn = function(e) { + var t = e < 0; + t && (e = -e), + n(e <= 67108863); + for (var r = (1 << 26) % e, o = 0, s = this.length - 1; s >= 0; s--) + o = (r * o + (0 | this.words[s])) % e; + return t ? -o : o + } + , + s.prototype.modn = function(e) { + return this.modrn(e) + } + , + s.prototype.idivn = function(e) { + var t = e < 0; + t && (e = -e), + n(e <= 67108863); + for (var r = 0, o = this.length - 1; o >= 0; o--) { + var s = (0 | this.words[o]) + 67108864 * r; + this.words[o] = s / e | 0, + r = s % e + } + return this._strip(), + t ? this.ineg() : this + } + , + s.prototype.divn = function(e) { + return this.clone().idivn(e) + } + , + s.prototype.egcd = function(e) { + n(0 === e.negative), + n(!e.isZero()); + var t = this + , r = e.clone(); + t = 0 !== t.negative ? t.umod(e) : t.clone(); + for (var o = new s(1), i = new s(0), a = new s(0), u = new s(1), c = 0; t.isEven() && r.isEven(); ) + t.iushrn(1), + r.iushrn(1), + ++c; + for (var l = r.clone(), d = t.clone(); !t.isZero(); ) { + for (var h = 0, p = 1; 0 == (t.words[0] & p) && h < 26; ++h, + p <<= 1) + ; + if (h > 0) + for (t.iushrn(h); h-- > 0; ) + (o.isOdd() || i.isOdd()) && (o.iadd(l), + i.isub(d)), + o.iushrn(1), + i.iushrn(1); + for (var f = 0, g = 1; 0 == (r.words[0] & g) && f < 26; ++f, + g <<= 1) + ; + if (f > 0) + for (r.iushrn(f); f-- > 0; ) + (a.isOdd() || u.isOdd()) && (a.iadd(l), + u.isub(d)), + a.iushrn(1), + u.iushrn(1); + t.cmp(r) >= 0 ? (t.isub(r), + o.isub(a), + i.isub(u)) : (r.isub(t), + a.isub(o), + u.isub(i)) + } + return { + a, + b: u, + gcd: r.iushln(c) + } + } + , + s.prototype._invmp = function(e) { + n(0 === e.negative), + n(!e.isZero()); + var t = this + , r = e.clone(); + t = 0 !== t.negative ? t.umod(e) : t.clone(); + for (var o, i = new s(1), a = new s(0), u = r.clone(); t.cmpn(1) > 0 && r.cmpn(1) > 0; ) { + for (var c = 0, l = 1; 0 == (t.words[0] & l) && c < 26; ++c, + l <<= 1) + ; + if (c > 0) + for (t.iushrn(c); c-- > 0; ) + i.isOdd() && i.iadd(u), + i.iushrn(1); + for (var d = 0, h = 1; 0 == (r.words[0] & h) && d < 26; ++d, + h <<= 1) + ; + if (d > 0) + for (r.iushrn(d); d-- > 0; ) + a.isOdd() && a.iadd(u), + a.iushrn(1); + t.cmp(r) >= 0 ? (t.isub(r), + i.isub(a)) : (r.isub(t), + a.isub(i)) + } + return (o = 0 === t.cmpn(1) ? i : a).cmpn(0) < 0 && o.iadd(e), + o + } + , + s.prototype.gcd = function(e) { + if (this.isZero()) + return e.abs(); + if (e.isZero()) + return this.abs(); + var t = this.clone() + , r = e.clone(); + t.negative = 0, + r.negative = 0; + for (var n = 0; t.isEven() && r.isEven(); n++) + t.iushrn(1), + r.iushrn(1); + for (; ; ) { + for (; t.isEven(); ) + t.iushrn(1); + for (; r.isEven(); ) + r.iushrn(1); + var o = t.cmp(r); + if (o < 0) { + var s = t; + t = r, + r = s + } else if (0 === o || 0 === r.cmpn(1)) + break; + t.isub(r) + } + return r.iushln(n) + } + , + s.prototype.invm = function(e) { + return this.egcd(e).a.umod(e) + } + , + s.prototype.isEven = function() { + return 0 == (1 & this.words[0]) + } + , + s.prototype.isOdd = function() { + return 1 == (1 & this.words[0]) + } + , + s.prototype.andln = function(e) { + return this.words[0] & e + } + , + s.prototype.bincn = function(e) { + n("number" == typeof e); + var t = e % 26 + , r = (e - t) / 26 + , o = 1 << t; + if (this.length <= r) + return this._expand(r + 1), + this.words[r] |= o, + this; + for (var s = o, i = r; 0 !== s && i < this.length; i++) { + var a = 0 | this.words[i]; + s = (a += s) >>> 26, + a &= 67108863, + this.words[i] = a + } + return 0 !== s && (this.words[i] = s, + this.length++), + this + } + , + s.prototype.isZero = function() { + return 1 === this.length && 0 === this.words[0] + } + , + s.prototype.cmpn = function(e) { + var t, r = e < 0; + if (0 !== this.negative && !r) + return -1; + if (0 === this.negative && r) + return 1; + if (this._strip(), + this.length > 1) + t = 1; + else { + r && (e = -e), + n(e <= 67108863, "Number is too big"); + var o = 0 | this.words[0]; + t = o === e ? 0 : o < e ? -1 : 1 + } + return 0 !== this.negative ? 0 | -t : t + } + , + s.prototype.cmp = function(e) { + if (0 !== this.negative && 0 === e.negative) + return -1; + if (0 === this.negative && 0 !== e.negative) + return 1; + var t = this.ucmp(e); + return 0 !== this.negative ? 0 | -t : t + } + , + s.prototype.ucmp = function(e) { + if (this.length > e.length) + return 1; + if (this.length < e.length) + return -1; + for (var t = 0, r = this.length - 1; r >= 0; r--) { + var n = 0 | this.words[r] + , o = 0 | e.words[r]; + if (n !== o) { + n < o ? t = -1 : n > o && (t = 1); + break + } + } + return t + } + , + s.prototype.gtn = function(e) { + return 1 === this.cmpn(e) + } + , + s.prototype.gt = function(e) { + return 1 === this.cmp(e) + } + , + s.prototype.gten = function(e) { + return this.cmpn(e) >= 0 + } + , + s.prototype.gte = function(e) { + return this.cmp(e) >= 0 + } + , + s.prototype.ltn = function(e) { + return -1 === this.cmpn(e) + } + , + s.prototype.lt = function(e) { + return -1 === this.cmp(e) + } + , + s.prototype.lten = function(e) { + return this.cmpn(e) <= 0 + } + , + s.prototype.lte = function(e) { + return this.cmp(e) <= 0 + } + , + s.prototype.eqn = function(e) { + return 0 === this.cmpn(e) + } + , + s.prototype.eq = function(e) { + return 0 === this.cmp(e) + } + , + s.red = function(e) { + return new C(e) + } + , + s.prototype.toRed = function(e) { + return n(!this.red, "Already a number in reduction context"), + n(0 === this.negative, "red works only with positives"), + e.convertTo(this)._forceRed(e) + } + , + s.prototype.fromRed = function() { + return n(this.red, "fromRed works only with numbers in reduction context"), + this.red.convertFrom(this) + } + , + s.prototype._forceRed = function(e) { + return this.red = e, + this + } + , + s.prototype.forceRed = function(e) { + return n(!this.red, "Already a number in reduction context"), + this._forceRed(e) + } + , + s.prototype.redAdd = function(e) { + return n(this.red, "redAdd works only with red numbers"), + this.red.add(this, e) + } + , + s.prototype.redIAdd = function(e) { + return n(this.red, "redIAdd works only with red numbers"), + this.red.iadd(this, e) + } + , + s.prototype.redSub = function(e) { + return n(this.red, "redSub works only with red numbers"), + this.red.sub(this, e) + } + , + s.prototype.redISub = function(e) { + return n(this.red, "redISub works only with red numbers"), + this.red.isub(this, e) + } + , + s.prototype.redShl = function(e) { + return n(this.red, "redShl works only with red numbers"), + this.red.shl(this, e) + } + , + s.prototype.redMul = function(e) { + return n(this.red, "redMul works only with red numbers"), + this.red._verify2(this, e), + this.red.mul(this, e) + } + , + s.prototype.redIMul = function(e) { + return n(this.red, "redMul works only with red numbers"), + this.red._verify2(this, e), + this.red.imul(this, e) + } + , + s.prototype.redSqr = function() { + return n(this.red, "redSqr works only with red numbers"), + this.red._verify1(this), + this.red.sqr(this) + } + , + s.prototype.redISqr = function() { + return n(this.red, "redISqr works only with red numbers"), + this.red._verify1(this), + this.red.isqr(this) + } + , + s.prototype.redSqrt = function() { + return n(this.red, "redSqrt works only with red numbers"), + this.red._verify1(this), + this.red.sqrt(this) + } + , + s.prototype.redInvm = function() { + return n(this.red, "redInvm works only with red numbers"), + this.red._verify1(this), + this.red.invm(this) + } + , + s.prototype.redNeg = function() { + return n(this.red, "redNeg works only with red numbers"), + this.red._verify1(this), + this.red.neg(this) + } + , + s.prototype.redPow = function(e) { + return n(this.red && !e.red, "redPow(normalNum)"), + this.red._verify1(this), + this.red.pow(this, e) + } + ; + var v = { + k256: null, + p224: null, + p192: null, + p25519: null + }; + function w(e, t) { + this.name = e, + this.p = new s(t,16), + this.n = this.p.bitLength(), + this.k = new s(1).iushln(this.n).isub(this.p), + this.tmp = this._tmp() + } + function A() { + w.call(this, "k256", "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f") + } + function P() { + w.call(this, "p224", "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001") + } + function W() { + w.call(this, "p192", "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff") + } + function B() { + w.call(this, "25519", "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed") + } + function C(e) { + if ("string" == typeof e) { + var t = s._prime(e); + this.m = t.p, + this.prime = t + } else + n(e.gtn(1), "modulus must be greater than 1"), + this.m = e, + this.prime = null + } + function E(e) { + C.call(this, e), + this.shift = this.m.bitLength(), + this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26), + this.r = new s(1).iushln(this.shift), + this.r2 = this.imod(this.r.sqr()), + this.rinv = this.r._invmp(this.m), + this.minv = this.rinv.mul(this.r).isubn(1).div(this.m), + this.minv = this.minv.umod(this.r), + this.minv = this.r.sub(this.minv) + } + w.prototype._tmp = function() { + var e = new s(null); + return e.words = new Array(Math.ceil(this.n / 13)), + e + } + , + w.prototype.ireduce = function(e) { + var t, r = e; + do { + this.split(r, this.tmp), + t = (r = (r = this.imulK(r)).iadd(this.tmp)).bitLength() + } while (t > this.n); + var n = t < this.n ? -1 : r.ucmp(this.p); + return 0 === n ? (r.words[0] = 0, + r.length = 1) : n > 0 ? r.isub(this.p) : void 0 !== r.strip ? r.strip() : r._strip(), + r + } + , + w.prototype.split = function(e, t) { + e.iushrn(this.n, 0, t) + } + , + w.prototype.imulK = function(e) { + return e.imul(this.k) + } + , + o(A, w), + A.prototype.split = function(e, t) { + for (var r = 4194303, n = Math.min(e.length, 9), o = 0; o < n; o++) + t.words[o] = e.words[o]; + if (t.length = n, + e.length <= 9) + return e.words[0] = 0, + void (e.length = 1); + var s = e.words[9]; + for (t.words[t.length++] = s & r, + o = 10; o < e.length; o++) { + var i = 0 | e.words[o]; + e.words[o - 10] = (i & r) << 4 | s >>> 22, + s = i + } + s >>>= 22, + e.words[o - 10] = s, + 0 === s && e.length > 10 ? e.length -= 10 : e.length -= 9 + } + , + A.prototype.imulK = function(e) { + e.words[e.length] = 0, + e.words[e.length + 1] = 0, + e.length += 2; + for (var t = 0, r = 0; r < e.length; r++) { + var n = 0 | e.words[r]; + t += 977 * n, + e.words[r] = 67108863 & t, + t = 64 * n + (t / 67108864 | 0) + } + return 0 === e.words[e.length - 1] && (e.length--, + 0 === e.words[e.length - 1] && e.length--), + e + } + , + o(P, w), + o(W, w), + o(B, w), + B.prototype.imulK = function(e) { + for (var t = 0, r = 0; r < e.length; r++) { + var n = 19 * (0 | e.words[r]) + t + , o = 67108863 & n; + n >>>= 26, + e.words[r] = o, + t = n + } + return 0 !== t && (e.words[e.length++] = t), + e + } + , + s._prime = function(e) { + if (v[e]) + return v[e]; + var t; + if ("k256" === e) + t = new A; + else if ("p224" === e) + t = new P; + else if ("p192" === e) + t = new W; + else { + if ("p25519" !== e) + throw new Error("Unknown prime " + e); + t = new B + } + return v[e] = t, + t + } + , + C.prototype._verify1 = function(e) { + n(0 === e.negative, "red works only with positives"), + n(e.red, "red works only with red numbers") + } + , + C.prototype._verify2 = function(e, t) { + n(0 == (e.negative | t.negative), "red works only with positives"), + n(e.red && e.red === t.red, "red works only with red numbers") + } + , + C.prototype.imod = function(e) { + return this.prime ? this.prime.ireduce(e)._forceRed(this) : (l(e, e.umod(this.m)._forceRed(this)), + e) + } + , + C.prototype.neg = function(e) { + return e.isZero() ? e.clone() : this.m.sub(e)._forceRed(this) + } + , + C.prototype.add = function(e, t) { + this._verify2(e, t); + var r = e.add(t); + return r.cmp(this.m) >= 0 && r.isub(this.m), + r._forceRed(this) + } + , + C.prototype.iadd = function(e, t) { + this._verify2(e, t); + var r = e.iadd(t); + return r.cmp(this.m) >= 0 && r.isub(this.m), + r + } + , + C.prototype.sub = function(e, t) { + this._verify2(e, t); + var r = e.sub(t); + return r.cmpn(0) < 0 && r.iadd(this.m), + r._forceRed(this) + } + , + C.prototype.isub = function(e, t) { + this._verify2(e, t); + var r = e.isub(t); + return r.cmpn(0) < 0 && r.iadd(this.m), + r + } + , + C.prototype.shl = function(e, t) { + return this._verify1(e), + this.imod(e.ushln(t)) + } + , + C.prototype.imul = function(e, t) { + return this._verify2(e, t), + this.imod(e.imul(t)) + } + , + C.prototype.mul = function(e, t) { + return this._verify2(e, t), + this.imod(e.mul(t)) + } + , + C.prototype.isqr = function(e) { + return this.imul(e, e.clone()) + } + , + C.prototype.sqr = function(e) { + return this.mul(e, e) + } + , + C.prototype.sqrt = function(e) { + if (e.isZero()) + return e.clone(); + var t = this.m.andln(3); + if (n(t % 2 == 1), + 3 === t) { + var r = this.m.add(new s(1)).iushrn(2); + return this.pow(e, r) + } + for (var o = this.m.subn(1), i = 0; !o.isZero() && 0 === o.andln(1); ) + i++, + o.iushrn(1); + n(!o.isZero()); + var a = new s(1).toRed(this) + , u = a.redNeg() + , c = this.m.subn(1).iushrn(1) + , l = this.m.bitLength(); + for (l = new s(2 * l * l).toRed(this); 0 !== this.pow(l, c).cmp(u); ) + l.redIAdd(u); + for (var d = this.pow(l, o), h = this.pow(e, o.addn(1).iushrn(1)), p = this.pow(e, o), f = i; 0 !== p.cmp(a); ) { + for (var g = p, y = 0; 0 !== g.cmp(a); y++) + g = g.redSqr(); + n(y < f); + var b = this.pow(d, new s(1).iushln(f - y - 1)); + h = h.redMul(b), + d = b.redSqr(), + p = p.redMul(d), + f = y + } + return h + } + , + C.prototype.invm = function(e) { + var t = e._invmp(this.m); + return 0 !== t.negative ? (t.negative = 0, + this.imod(t).redNeg()) : this.imod(t) + } + , + C.prototype.pow = function(e, t) { + if (t.isZero()) + return new s(1).toRed(this); + if (0 === t.cmpn(1)) + return e.clone(); + var r = new Array(16); + r[0] = new s(1).toRed(this), + r[1] = e; + for (var n = 2; n < r.length; n++) + r[n] = this.mul(r[n - 1], e); + var o = r[0] + , i = 0 + , a = 0 + , u = t.bitLength() % 26; + for (0 === u && (u = 26), + n = t.length - 1; n >= 0; n--) { + for (var c = t.words[n], l = u - 1; l >= 0; l--) { + var d = c >> l & 1; + o !== r[0] && (o = this.sqr(o)), + 0 !== d || 0 !== i ? (i <<= 1, + i |= d, + (4 == ++a || 0 === n && 0 === l) && (o = this.mul(o, r[i]), + a = 0, + i = 0)) : a = 0 + } + u = 26 + } + return o + } + , + C.prototype.convertTo = function(e) { + var t = e.umod(this.m); + return t === e ? t.clone() : t + } + , + C.prototype.convertFrom = function(e) { + var t = e.clone(); + return t.red = null, + t + } + , + s.mont = function(e) { + return new E(e) + } + , + o(E, C), + E.prototype.convertTo = function(e) { + return this.imod(e.ushln(this.shift)) + } + , + E.prototype.convertFrom = function(e) { + var t = this.imod(e.mul(this.rinv)); + return t.red = null, + t + } + , + E.prototype.imul = function(e, t) { + if (e.isZero() || t.isZero()) + return e.words[0] = 0, + e.length = 1, + e; + var r = e.imul(t) + , n = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m) + , o = r.isub(n).iushrn(this.shift) + , s = o; + return o.cmp(this.m) >= 0 ? s = o.isub(this.m) : o.cmpn(0) < 0 && (s = o.iadd(this.m)), + s._forceRed(this) + } + , + E.prototype.mul = function(e, t) { + if (e.isZero() || t.isZero()) + return new s(0)._forceRed(this); + var r = e.mul(t) + , n = r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m) + , o = r.isub(n).iushrn(this.shift) + , i = o; + return o.cmp(this.m) >= 0 ? i = o.isub(this.m) : o.cmpn(0) < 0 && (i = o.iadd(this.m)), + i._forceRed(this) + } + , + E.prototype.invm = function(e) { + return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this) + } + }(e = r.nmd(e), this) + }, + 6729: e=>{ + "use strict"; + var t = Object.prototype.hasOwnProperty + , r = "~"; + function n() {} + function o(e, t, r) { + this.fn = e, + this.context = t, + this.once = r || !1 + } + function s(e, t, n, s, i) { + if ("function" != typeof n) + throw new TypeError("The listener must be a function"); + var a = new o(n,s || e,i) + , u = r ? r + t : t; + return e._events[u] ? e._events[u].fn ? e._events[u] = [e._events[u], a] : e._events[u].push(a) : (e._events[u] = a, + e._eventsCount++), + e + } + function i(e, t) { + 0 == --e._eventsCount ? e._events = new n : delete e._events[t] + } + function a() { + this._events = new n, + this._eventsCount = 0 + } + Object.create && (n.prototype = Object.create(null), + (new n).__proto__ || (r = !1)), + a.prototype.eventNames = function() { + var e, n, o = []; + if (0 === this._eventsCount) + return o; + for (n in e = this._events) + t.call(e, n) && o.push(r ? n.slice(1) : n); + return Object.getOwnPropertySymbols ? o.concat(Object.getOwnPropertySymbols(e)) : o + } + , + a.prototype.listeners = function(e) { + var t = r ? r + e : e + , n = this._events[t]; + if (!n) + return []; + if (n.fn) + return [n.fn]; + for (var o = 0, s = n.length, i = new Array(s); o < s; o++) + i[o] = n[o].fn; + return i + } + , + a.prototype.listenerCount = function(e) { + var t = r ? r + e : e + , n = this._events[t]; + return n ? n.fn ? 1 : n.length : 0 + } + , + a.prototype.emit = function(e, t, n, o, s, i) { + var a = r ? r + e : e; + if (!this._events[a]) + return !1; + var u, c, l = this._events[a], d = arguments.length; + if (l.fn) { + switch (l.once && this.removeListener(e, l.fn, void 0, !0), + d) { + case 1: + return l.fn.call(l.context), + !0; + case 2: + return l.fn.call(l.context, t), + !0; + case 3: + return l.fn.call(l.context, t, n), + !0; + case 4: + return l.fn.call(l.context, t, n, o), + !0; + case 5: + return l.fn.call(l.context, t, n, o, s), + !0; + case 6: + return l.fn.call(l.context, t, n, o, s, i), + !0 + } + for (c = 1, + u = new Array(d - 1); c < d; c++) + u[c - 1] = arguments[c]; + l.fn.apply(l.context, u) + } else { + var h, p = l.length; + for (c = 0; c < p; c++) + switch (l[c].once && this.removeListener(e, l[c].fn, void 0, !0), + d) { + case 1: + l[c].fn.call(l[c].context); + break; + case 2: + l[c].fn.call(l[c].context, t); + break; + case 3: + l[c].fn.call(l[c].context, t, n); + break; + case 4: + l[c].fn.call(l[c].context, t, n, o); + break; + default: + if (!u) + for (h = 1, + u = new Array(d - 1); h < d; h++) + u[h - 1] = arguments[h]; + l[c].fn.apply(l[c].context, u) + } + } + return !0 + } + , + a.prototype.on = function(e, t, r) { + return s(this, e, t, r, !1) + } + , + a.prototype.once = function(e, t, r) { + return s(this, e, t, r, !0) + } + , + a.prototype.removeListener = function(e, t, n, o) { + var s = r ? r + e : e; + if (!this._events[s]) + return this; + if (!t) + return i(this, s), + this; + var a = this._events[s]; + if (a.fn) + a.fn !== t || o && !a.once || n && a.context !== n || i(this, s); + else { + for (var u = 0, c = [], l = a.length; u < l; u++) + (a[u].fn !== t || o && !a[u].once || n && a[u].context !== n) && c.push(a[u]); + c.length ? this._events[s] = 1 === c.length ? c[0] : c : i(this, s) + } + return this + } + , + a.prototype.removeAllListeners = function(e) { + var t; + return e ? (t = r ? r + e : e, + this._events[t] && i(this, t)) : (this._events = new n, + this._eventsCount = 0), + this + } + , + a.prototype.off = a.prototype.removeListener, + a.prototype.addListener = a.prototype.on, + a.prefixed = r, + a.EventEmitter = a, + e.exports = a + } + , + 7832: e=>{ + e.exports = function(e) { + return (t,...r)=>function(e, ...t) { + return new Promise(((r,n)=>{ + e(...t, ((e,t)=>{ + e ? n(e) : r(t) + } + )) + } + )) + }(t.bind(e), ...r) + } + } + , + 1094: (e,t,r)=>{ + var n; + !function() { + "use strict"; + var o = "input is invalid type" + , s = "object" == typeof window + , i = s ? window : {}; + i.JS_SHA3_NO_WINDOW && (s = !1); + var a = !s && "object" == typeof self; + !i.JS_SHA3_NO_NODE_JS && "object" == typeof process && process.versions && process.versions.node ? i = r.g : a && (i = self); + var u = !i.JS_SHA3_NO_COMMON_JS && e.exports + , c = r.amdO + , l = !i.JS_SHA3_NO_ARRAY_BUFFER && "undefined" != typeof ArrayBuffer + , d = "0123456789abcdef".split("") + , h = [4, 1024, 262144, 67108864] + , p = [0, 8, 16, 24] + , f = [1, 0, 32898, 0, 32906, 2147483648, 2147516416, 2147483648, 32907, 0, 2147483649, 0, 2147516545, 2147483648, 32777, 2147483648, 138, 0, 136, 0, 2147516425, 0, 2147483658, 0, 2147516555, 0, 139, 2147483648, 32905, 2147483648, 32771, 2147483648, 32770, 2147483648, 128, 2147483648, 32778, 0, 2147483658, 2147483648, 2147516545, 2147483648, 32896, 2147483648, 2147483649, 0, 2147516424, 2147483648] + , g = [224, 256, 384, 512] + , y = [128, 256] + , b = ["hex", "buffer", "arrayBuffer", "array", "digest"] + , m = { + 128: 168, + 256: 136 + }; + !i.JS_SHA3_NO_NODE_JS && Array.isArray || (Array.isArray = function(e) { + return "[object Array]" === Object.prototype.toString.call(e) + } + ), + !l || !i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW && ArrayBuffer.isView || (ArrayBuffer.isView = function(e) { + return "object" == typeof e && e.buffer && e.buffer.constructor === ArrayBuffer + } + ); + for (var T = function(e, t, r) { + return function(n) { + return new x(e,t,e).update(n)[r]() + } + }, v = function(e, t, r) { + return function(n, o) { + return new x(e,t,o).update(n)[r]() + } + }, w = function(e, t, r) { + return function(t, n, o, s) { + return C["cshake" + e].update(t, n, o, s)[r]() + } + }, A = function(e, t, r) { + return function(t, n, o, s) { + return C["kmac" + e].update(t, n, o, s)[r]() + } + }, P = function(e, t, r, n) { + for (var o = 0; o < b.length; ++o) { + var s = b[o]; + e[s] = t(r, n, s) + } + return e + }, W = function(e, t) { + var r = T(e, t, "hex"); + return r.create = function() { + return new x(e,t,e) + } + , + r.update = function(e) { + return r.create().update(e) + } + , + P(r, T, e, t) + }, B = [{ + name: "keccak", + padding: [1, 256, 65536, 16777216], + bits: g, + createMethod: W + }, { + name: "sha3", + padding: [6, 1536, 393216, 100663296], + bits: g, + createMethod: W + }, { + name: "shake", + padding: [31, 7936, 2031616, 520093696], + bits: y, + createMethod: function(e, t) { + var r = v(e, t, "hex"); + return r.create = function(r) { + return new x(e,t,r) + } + , + r.update = function(e, t) { + return r.create(t).update(e) + } + , + P(r, v, e, t) + } + }, { + name: "cshake", + padding: h, + bits: y, + createMethod: function(e, t) { + var r = m[e] + , n = w(e, 0, "hex"); + return n.create = function(n, o, s) { + return o || s ? new x(e,t,n).bytepad([o, s], r) : C["shake" + e].create(n) + } + , + n.update = function(e, t, r, o) { + return n.create(t, r, o).update(e) + } + , + P(n, w, e, t) + } + }, { + name: "kmac", + padding: h, + bits: y, + createMethod: function(e, t) { + var r = m[e] + , n = A(e, 0, "hex"); + return n.create = function(n, o, s) { + return new R(e,t,o).bytepad(["KMAC", s], r).bytepad([n], r) + } + , + n.update = function(e, t, r, o) { + return n.create(e, r, o).update(t) + } + , + P(n, A, e, t) + } + }], C = {}, E = [], M = 0; M < B.length; ++M) + for (var I = B[M], F = I.bits, O = 0; O < F.length; ++O) { + var S = I.name + "_" + F[O]; + if (E.push(S), + C[S] = I.createMethod(F[O], I.padding), + "sha3" !== I.name) { + var _ = I.name + F[O]; + E.push(_), + C[_] = C[S] + } + } + function x(e, t, r) { + this.blocks = [], + this.s = [], + this.padding = t, + this.outputBits = r, + this.reset = !0, + this.finalized = !1, + this.block = 0, + this.start = 0, + this.blockCount = 1600 - (e << 1) >> 5, + this.byteCount = this.blockCount << 2, + this.outputBlocks = r >> 5, + this.extraBytes = (31 & r) >> 3; + for (var n = 0; n < 50; ++n) + this.s[n] = 0 + } + function R(e, t, r) { + x.call(this, e, t, r) + } + x.prototype.update = function(e) { + if (this.finalized) + throw new Error("finalize already called"); + var t, r = typeof e; + if ("string" !== r) { + if ("object" !== r) + throw new Error(o); + if (null === e) + throw new Error(o); + if (l && e.constructor === ArrayBuffer) + e = new Uint8Array(e); + else if (!(Array.isArray(e) || l && ArrayBuffer.isView(e))) + throw new Error(o); + t = !0 + } + for (var n, s, i = this.blocks, a = this.byteCount, u = e.length, c = this.blockCount, d = 0, h = this.s; d < u; ) { + if (this.reset) + for (this.reset = !1, + i[0] = this.block, + n = 1; n < c + 1; ++n) + i[n] = 0; + if (t) + for (n = this.start; d < u && n < a; ++d) + i[n >> 2] |= e[d] << p[3 & n++]; + else + for (n = this.start; d < u && n < a; ++d) + (s = e.charCodeAt(d)) < 128 ? i[n >> 2] |= s << p[3 & n++] : s < 2048 ? (i[n >> 2] |= (192 | s >> 6) << p[3 & n++], + i[n >> 2] |= (128 | 63 & s) << p[3 & n++]) : s < 55296 || s >= 57344 ? (i[n >> 2] |= (224 | s >> 12) << p[3 & n++], + i[n >> 2] |= (128 | s >> 6 & 63) << p[3 & n++], + i[n >> 2] |= (128 | 63 & s) << p[3 & n++]) : (s = 65536 + ((1023 & s) << 10 | 1023 & e.charCodeAt(++d)), + i[n >> 2] |= (240 | s >> 18) << p[3 & n++], + i[n >> 2] |= (128 | s >> 12 & 63) << p[3 & n++], + i[n >> 2] |= (128 | s >> 6 & 63) << p[3 & n++], + i[n >> 2] |= (128 | 63 & s) << p[3 & n++]); + if (this.lastByteIndex = n, + n >= a) { + for (this.start = n - a, + this.block = i[c], + n = 0; n < c; ++n) + h[n] ^= i[n]; + N(h), + this.reset = !0 + } else + this.start = n + } + return this + } + , + x.prototype.encode = function(e, t) { + var r = 255 & e + , n = 1 + , o = [r]; + for (r = 255 & (e >>= 8); r > 0; ) + o.unshift(r), + r = 255 & (e >>= 8), + ++n; + return t ? o.push(n) : o.unshift(n), + this.update(o), + o.length + } + , + x.prototype.encodeString = function(e) { + var t, r = typeof e; + if ("string" !== r) { + if ("object" !== r) + throw new Error(o); + if (null === e) + throw new Error(o); + if (l && e.constructor === ArrayBuffer) + e = new Uint8Array(e); + else if (!(Array.isArray(e) || l && ArrayBuffer.isView(e))) + throw new Error(o); + t = !0 + } + var n = 0 + , s = e.length; + if (t) + n = s; + else + for (var i = 0; i < e.length; ++i) { + var a = e.charCodeAt(i); + a < 128 ? n += 1 : a < 2048 ? n += 2 : a < 55296 || a >= 57344 ? n += 3 : (a = 65536 + ((1023 & a) << 10 | 1023 & e.charCodeAt(++i)), + n += 4) + } + return n += this.encode(8 * n), + this.update(e), + n + } + , + x.prototype.bytepad = function(e, t) { + for (var r = this.encode(t), n = 0; n < e.length; ++n) + r += this.encodeString(e[n]); + var o = t - r % t + , s = []; + return s.length = o, + this.update(s), + this + } + , + x.prototype.finalize = function() { + if (!this.finalized) { + this.finalized = !0; + var e = this.blocks + , t = this.lastByteIndex + , r = this.blockCount + , n = this.s; + if (e[t >> 2] |= this.padding[3 & t], + this.lastByteIndex === this.byteCount) + for (e[0] = e[r], + t = 1; t < r + 1; ++t) + e[t] = 0; + for (e[r - 1] |= 2147483648, + t = 0; t < r; ++t) + n[t] ^= e[t]; + N(n) + } + } + , + x.prototype.toString = x.prototype.hex = function() { + this.finalize(); + for (var e, t = this.blockCount, r = this.s, n = this.outputBlocks, o = this.extraBytes, s = 0, i = 0, a = ""; i < n; ) { + for (s = 0; s < t && i < n; ++s, + ++i) + e = r[s], + a += d[e >> 4 & 15] + d[15 & e] + d[e >> 12 & 15] + d[e >> 8 & 15] + d[e >> 20 & 15] + d[e >> 16 & 15] + d[e >> 28 & 15] + d[e >> 24 & 15]; + i % t == 0 && (N(r), + s = 0) + } + return o && (e = r[s], + a += d[e >> 4 & 15] + d[15 & e], + o > 1 && (a += d[e >> 12 & 15] + d[e >> 8 & 15]), + o > 2 && (a += d[e >> 20 & 15] + d[e >> 16 & 15])), + a + } + , + x.prototype.arrayBuffer = function() { + this.finalize(); + var e, t = this.blockCount, r = this.s, n = this.outputBlocks, o = this.extraBytes, s = 0, i = 0, a = this.outputBits >> 3; + e = o ? new ArrayBuffer(n + 1 << 2) : new ArrayBuffer(a); + for (var u = new Uint32Array(e); i < n; ) { + for (s = 0; s < t && i < n; ++s, + ++i) + u[i] = r[s]; + i % t == 0 && N(r) + } + return o && (u[s] = r[s], + e = e.slice(0, a)), + e + } + , + x.prototype.buffer = x.prototype.arrayBuffer, + x.prototype.digest = x.prototype.array = function() { + this.finalize(); + for (var e, t, r = this.blockCount, n = this.s, o = this.outputBlocks, s = this.extraBytes, i = 0, a = 0, u = []; a < o; ) { + for (i = 0; i < r && a < o; ++i, + ++a) + e = a << 2, + t = n[i], + u[e] = 255 & t, + u[e + 1] = t >> 8 & 255, + u[e + 2] = t >> 16 & 255, + u[e + 3] = t >> 24 & 255; + a % r == 0 && N(n) + } + return s && (e = a << 2, + t = n[i], + u[e] = 255 & t, + s > 1 && (u[e + 1] = t >> 8 & 255), + s > 2 && (u[e + 2] = t >> 16 & 255)), + u + } + , + R.prototype = new x, + R.prototype.finalize = function() { + return this.encode(this.outputBits, !0), + x.prototype.finalize.call(this) + } + ; + var N = function(e) { + var t, r, n, o, s, i, a, u, c, l, d, h, p, g, y, b, m, T, v, w, A, P, W, B, C, E, M, I, F, O, S, _, x, R, N, k, U, D, L, z, j, $, V, G, H, K, Z, q, J, Y, X, Q, ee, te, re, ne, oe, se, ie, ae, ue, ce, le; + for (n = 0; n < 48; n += 2) + o = e[0] ^ e[10] ^ e[20] ^ e[30] ^ e[40], + s = e[1] ^ e[11] ^ e[21] ^ e[31] ^ e[41], + i = e[2] ^ e[12] ^ e[22] ^ e[32] ^ e[42], + a = e[3] ^ e[13] ^ e[23] ^ e[33] ^ e[43], + u = e[4] ^ e[14] ^ e[24] ^ e[34] ^ e[44], + c = e[5] ^ e[15] ^ e[25] ^ e[35] ^ e[45], + l = e[6] ^ e[16] ^ e[26] ^ e[36] ^ e[46], + d = e[7] ^ e[17] ^ e[27] ^ e[37] ^ e[47], + t = (h = e[8] ^ e[18] ^ e[28] ^ e[38] ^ e[48]) ^ (i << 1 | a >>> 31), + r = (p = e[9] ^ e[19] ^ e[29] ^ e[39] ^ e[49]) ^ (a << 1 | i >>> 31), + e[0] ^= t, + e[1] ^= r, + e[10] ^= t, + e[11] ^= r, + e[20] ^= t, + e[21] ^= r, + e[30] ^= t, + e[31] ^= r, + e[40] ^= t, + e[41] ^= r, + t = o ^ (u << 1 | c >>> 31), + r = s ^ (c << 1 | u >>> 31), + e[2] ^= t, + e[3] ^= r, + e[12] ^= t, + e[13] ^= r, + e[22] ^= t, + e[23] ^= r, + e[32] ^= t, + e[33] ^= r, + e[42] ^= t, + e[43] ^= r, + t = i ^ (l << 1 | d >>> 31), + r = a ^ (d << 1 | l >>> 31), + e[4] ^= t, + e[5] ^= r, + e[14] ^= t, + e[15] ^= r, + e[24] ^= t, + e[25] ^= r, + e[34] ^= t, + e[35] ^= r, + e[44] ^= t, + e[45] ^= r, + t = u ^ (h << 1 | p >>> 31), + r = c ^ (p << 1 | h >>> 31), + e[6] ^= t, + e[7] ^= r, + e[16] ^= t, + e[17] ^= r, + e[26] ^= t, + e[27] ^= r, + e[36] ^= t, + e[37] ^= r, + e[46] ^= t, + e[47] ^= r, + t = l ^ (o << 1 | s >>> 31), + r = d ^ (s << 1 | o >>> 31), + e[8] ^= t, + e[9] ^= r, + e[18] ^= t, + e[19] ^= r, + e[28] ^= t, + e[29] ^= r, + e[38] ^= t, + e[39] ^= r, + e[48] ^= t, + e[49] ^= r, + g = e[0], + y = e[1], + K = e[11] << 4 | e[10] >>> 28, + Z = e[10] << 4 | e[11] >>> 28, + I = e[20] << 3 | e[21] >>> 29, + F = e[21] << 3 | e[20] >>> 29, + ae = e[31] << 9 | e[30] >>> 23, + ue = e[30] << 9 | e[31] >>> 23, + $ = e[40] << 18 | e[41] >>> 14, + V = e[41] << 18 | e[40] >>> 14, + R = e[2] << 1 | e[3] >>> 31, + N = e[3] << 1 | e[2] >>> 31, + b = e[13] << 12 | e[12] >>> 20, + m = e[12] << 12 | e[13] >>> 20, + q = e[22] << 10 | e[23] >>> 22, + J = e[23] << 10 | e[22] >>> 22, + O = e[33] << 13 | e[32] >>> 19, + S = e[32] << 13 | e[33] >>> 19, + ce = e[42] << 2 | e[43] >>> 30, + le = e[43] << 2 | e[42] >>> 30, + te = e[5] << 30 | e[4] >>> 2, + re = e[4] << 30 | e[5] >>> 2, + k = e[14] << 6 | e[15] >>> 26, + U = e[15] << 6 | e[14] >>> 26, + T = e[25] << 11 | e[24] >>> 21, + v = e[24] << 11 | e[25] >>> 21, + Y = e[34] << 15 | e[35] >>> 17, + X = e[35] << 15 | e[34] >>> 17, + _ = e[45] << 29 | e[44] >>> 3, + x = e[44] << 29 | e[45] >>> 3, + B = e[6] << 28 | e[7] >>> 4, + C = e[7] << 28 | e[6] >>> 4, + ne = e[17] << 23 | e[16] >>> 9, + oe = e[16] << 23 | e[17] >>> 9, + D = e[26] << 25 | e[27] >>> 7, + L = e[27] << 25 | e[26] >>> 7, + w = e[36] << 21 | e[37] >>> 11, + A = e[37] << 21 | e[36] >>> 11, + Q = e[47] << 24 | e[46] >>> 8, + ee = e[46] << 24 | e[47] >>> 8, + G = e[8] << 27 | e[9] >>> 5, + H = e[9] << 27 | e[8] >>> 5, + E = e[18] << 20 | e[19] >>> 12, + M = e[19] << 20 | e[18] >>> 12, + se = e[29] << 7 | e[28] >>> 25, + ie = e[28] << 7 | e[29] >>> 25, + z = e[38] << 8 | e[39] >>> 24, + j = e[39] << 8 | e[38] >>> 24, + P = e[48] << 14 | e[49] >>> 18, + W = e[49] << 14 | e[48] >>> 18, + e[0] = g ^ ~b & T, + e[1] = y ^ ~m & v, + e[10] = B ^ ~E & I, + e[11] = C ^ ~M & F, + e[20] = R ^ ~k & D, + e[21] = N ^ ~U & L, + e[30] = G ^ ~K & q, + e[31] = H ^ ~Z & J, + e[40] = te ^ ~ne & se, + e[41] = re ^ ~oe & ie, + e[2] = b ^ ~T & w, + e[3] = m ^ ~v & A, + e[12] = E ^ ~I & O, + e[13] = M ^ ~F & S, + e[22] = k ^ ~D & z, + e[23] = U ^ ~L & j, + e[32] = K ^ ~q & Y, + e[33] = Z ^ ~J & X, + e[42] = ne ^ ~se & ae, + e[43] = oe ^ ~ie & ue, + e[4] = T ^ ~w & P, + e[5] = v ^ ~A & W, + e[14] = I ^ ~O & _, + e[15] = F ^ ~S & x, + e[24] = D ^ ~z & $, + e[25] = L ^ ~j & V, + e[34] = q ^ ~Y & Q, + e[35] = J ^ ~X & ee, + e[44] = se ^ ~ae & ce, + e[45] = ie ^ ~ue & le, + e[6] = w ^ ~P & g, + e[7] = A ^ ~W & y, + e[16] = O ^ ~_ & B, + e[17] = S ^ ~x & C, + e[26] = z ^ ~$ & R, + e[27] = j ^ ~V & N, + e[36] = Y ^ ~Q & G, + e[37] = X ^ ~ee & H, + e[46] = ae ^ ~ce & te, + e[47] = ue ^ ~le & re, + e[8] = P ^ ~g & b, + e[9] = W ^ ~y & m, + e[18] = _ ^ ~B & E, + e[19] = x ^ ~C & M, + e[28] = $ ^ ~R & k, + e[29] = V ^ ~N & U, + e[38] = Q ^ ~G & K, + e[39] = ee ^ ~H & Z, + e[48] = ce ^ ~te & ne, + e[49] = le ^ ~re & oe, + e[0] ^= f[n], + e[1] ^= f[n + 1] + }; + if (u) + e.exports = C; + else { + for (M = 0; M < E.length; ++M) + i[E[M]] = C[E[M]]; + c && (void 0 === (n = function() { + return C + } + .call(t, r, t, e)) || (e.exports = n)) + } + }() + } + , + 9335: e=>{ + "use strict"; + function t(e, t) { + return Object.prototype.hasOwnProperty.call(e, t) + } + e.exports = function(e, n, o, s) { + n = n || "&", + o = o || "="; + var i = {}; + if ("string" != typeof e || 0 === e.length) + return i; + var a = /\+/g; + e = e.split(n); + var u = 1e3; + s && "number" == typeof s.maxKeys && (u = s.maxKeys); + var c = e.length; + u > 0 && c > u && (c = u); + for (var l = 0; l < c; ++l) { + var d, h, p, f, g = e[l].replace(a, "%20"), y = g.indexOf(o); + y >= 0 ? (d = g.substr(0, y), + h = g.substr(y + 1)) : (d = g, + h = ""), + p = decodeURIComponent(d), + f = decodeURIComponent(h), + t(i, p) ? r(i[p]) ? i[p].push(f) : i[p] = [i[p], f] : i[p] = f + } + return i + } + ; + var r = Array.isArray || function(e) { + return "[object Array]" === Object.prototype.toString.call(e) + } + } + , + 8795: e=>{ + "use strict"; + var t = function(e) { + switch (typeof e) { + case "string": + return e; + case "boolean": + return e ? "true" : "false"; + case "number": + return isFinite(e) ? e : ""; + default: + return "" + } + }; + e.exports = function(e, s, i, a) { + return s = s || "&", + i = i || "=", + null === e && (e = void 0), + "object" == typeof e ? n(o(e), (function(o) { + var a = encodeURIComponent(t(o)) + i; + return r(e[o]) ? n(e[o], (function(e) { + return a + encodeURIComponent(t(e)) + } + )).join(s) : a + encodeURIComponent(t(e[o])) + } + )).join(s) : a ? encodeURIComponent(t(a)) + i + encodeURIComponent(t(e)) : "" + } + ; + var r = Array.isArray || function(e) { + return "[object Array]" === Object.prototype.toString.call(e) + } + ; + function n(e, t) { + if (e.map) + return e.map(t); + for (var r = [], n = 0; n < e.length; n++) + r.push(t(e[n], n)); + return r + } + var o = Object.keys || function(e) { + var t = []; + for (var r in e) + Object.prototype.hasOwnProperty.call(e, r) && t.push(r); + return t + } + } + , + 7735: (e,t,r)=>{ + "use strict"; + t.decode = t.parse = r(9335), + t.encode = t.stringify = r(8795) + } + , + 6625: (e,t)=>{ + var r; + t = e.exports = X, + r = "object" == typeof process && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? function() { + var e = Array.prototype.slice.call(arguments, 0); + e.unshift("SEMVER"), + console.log.apply(console, e) + } + : function() {} + , + t.SEMVER_SPEC_VERSION = "2.0.0"; + var n = 256 + , o = Number.MAX_SAFE_INTEGER || 9007199254740991 + , s = n - 6 + , i = t.re = [] + , a = t.safeRe = [] + , u = t.src = [] + , c = 0 + , l = "[a-zA-Z0-9-]" + , d = [["\\s", 1], ["\\d", n], [l, s]]; + function h(e) { + for (var t = 0; t < d.length; t++) { + var r = d[t][0] + , n = d[t][1]; + e = e.split(r + "*").join(r + "{0," + n + "}").split(r + "+").join(r + "{1," + n + "}") + } + return e + } + var p = c++; + u[p] = "0|[1-9]\\d*"; + var f = c++; + u[f] = "\\d+"; + var g = c++; + u[g] = "\\d*[a-zA-Z-]" + l + "*"; + var y = c++; + u[y] = "(" + u[p] + ")\\.(" + u[p] + ")\\.(" + u[p] + ")"; + var b = c++; + u[b] = "(" + u[f] + ")\\.(" + u[f] + ")\\.(" + u[f] + ")"; + var m = c++; + u[m] = "(?:" + u[p] + "|" + u[g] + ")"; + var T = c++; + u[T] = "(?:" + u[f] + "|" + u[g] + ")"; + var v = c++; + u[v] = "(?:-(" + u[m] + "(?:\\." + u[m] + ")*))"; + var w = c++; + u[w] = "(?:-?(" + u[T] + "(?:\\." + u[T] + ")*))"; + var A = c++; + u[A] = l + "+"; + var P = c++; + u[P] = "(?:\\+(" + u[A] + "(?:\\." + u[A] + ")*))"; + var W = c++ + , B = "v?" + u[y] + u[v] + "?" + u[P] + "?"; + u[W] = "^" + B + "$"; + var C = "[v=\\s]*" + u[b] + u[w] + "?" + u[P] + "?" + , E = c++; + u[E] = "^" + C + "$"; + var M = c++; + u[M] = "((?:<|>)?=?)"; + var I = c++; + u[I] = u[f] + "|x|X|\\*"; + var F = c++; + u[F] = u[p] + "|x|X|\\*"; + var O = c++; + u[O] = "[v=\\s]*(" + u[F] + ")(?:\\.(" + u[F] + ")(?:\\.(" + u[F] + ")(?:" + u[v] + ")?" + u[P] + "?)?)?"; + var S = c++; + u[S] = "[v=\\s]*(" + u[I] + ")(?:\\.(" + u[I] + ")(?:\\.(" + u[I] + ")(?:" + u[w] + ")?" + u[P] + "?)?)?"; + var _ = c++; + u[_] = "^" + u[M] + "\\s*" + u[O] + "$"; + var x = c++; + u[x] = "^" + u[M] + "\\s*" + u[S] + "$"; + var R = c++; + u[R] = "(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])"; + var N = c++; + u[N] = "(?:~>?)"; + var k = c++; + u[k] = "(\\s*)" + u[N] + "\\s+", + i[k] = new RegExp(u[k],"g"), + a[k] = new RegExp(h(u[k]),"g"); + var U = c++; + u[U] = "^" + u[N] + u[O] + "$"; + var D = c++; + u[D] = "^" + u[N] + u[S] + "$"; + var L = c++; + u[L] = "(?:\\^)"; + var z = c++; + u[z] = "(\\s*)" + u[L] + "\\s+", + i[z] = new RegExp(u[z],"g"), + a[z] = new RegExp(h(u[z]),"g"); + var j = c++; + u[j] = "^" + u[L] + u[O] + "$"; + var $ = c++; + u[$] = "^" + u[L] + u[S] + "$"; + var V = c++; + u[V] = "^" + u[M] + "\\s*(" + C + ")$|^$"; + var G = c++; + u[G] = "^" + u[M] + "\\s*(" + B + ")$|^$"; + var H = c++; + u[H] = "(\\s*)" + u[M] + "\\s*(" + C + "|" + u[O] + ")", + i[H] = new RegExp(u[H],"g"), + a[H] = new RegExp(h(u[H]),"g"); + var K = c++; + u[K] = "^\\s*(" + u[O] + ")\\s+-\\s+(" + u[O] + ")\\s*$"; + var Z = c++; + u[Z] = "^\\s*(" + u[S] + ")\\s+-\\s+(" + u[S] + ")\\s*$"; + var q = c++; + u[q] = "(<|>)?=?\\s*\\*"; + for (var J = 0; J < 35; J++) + r(J, u[J]), + i[J] || (i[J] = new RegExp(u[J]), + a[J] = new RegExp(h(u[J]))); + function Y(e, t) { + if (t && "object" == typeof t || (t = { + loose: !!t, + includePrerelease: !1 + }), + e instanceof X) + return e; + if ("string" != typeof e) + return null; + if (e.length > n) + return null; + if (!(t.loose ? a[E] : a[W]).test(e)) + return null; + try { + return new X(e,t) + } catch (e) { + return null + } + } + function X(e, t) { + if (t && "object" == typeof t || (t = { + loose: !!t, + includePrerelease: !1 + }), + e instanceof X) { + if (e.loose === t.loose) + return e; + e = e.version + } else if ("string" != typeof e) + throw new TypeError("Invalid Version: " + e); + if (e.length > n) + throw new TypeError("version is longer than " + n + " characters"); + if (!(this instanceof X)) + return new X(e,t); + r("SemVer", e, t), + this.options = t, + this.loose = !!t.loose; + var s = e.trim().match(t.loose ? a[E] : a[W]); + if (!s) + throw new TypeError("Invalid Version: " + e); + if (this.raw = e, + this.major = +s[1], + this.minor = +s[2], + this.patch = +s[3], + this.major > o || this.major < 0) + throw new TypeError("Invalid major version"); + if (this.minor > o || this.minor < 0) + throw new TypeError("Invalid minor version"); + if (this.patch > o || this.patch < 0) + throw new TypeError("Invalid patch version"); + s[4] ? this.prerelease = s[4].split(".").map((function(e) { + if (/^[0-9]+$/.test(e)) { + var t = +e; + if (t >= 0 && t < o) + return t + } + return e + } + )) : this.prerelease = [], + this.build = s[5] ? s[5].split(".") : [], + this.format() + } + t.parse = Y, + t.valid = function(e, t) { + var r = Y(e, t); + return r ? r.version : null + } + , + t.clean = function(e, t) { + var r = Y(e.trim().replace(/^[=v]+/, ""), t); + return r ? r.version : null + } + , + t.SemVer = X, + X.prototype.format = function() { + return this.version = this.major + "." + this.minor + "." + this.patch, + this.prerelease.length && (this.version += "-" + this.prerelease.join(".")), + this.version + } + , + X.prototype.toString = function() { + return this.version + } + , + X.prototype.compare = function(e) { + return r("SemVer.compare", this.version, this.options, e), + e instanceof X || (e = new X(e,this.options)), + this.compareMain(e) || this.comparePre(e) + } + , + X.prototype.compareMain = function(e) { + return e instanceof X || (e = new X(e,this.options)), + ee(this.major, e.major) || ee(this.minor, e.minor) || ee(this.patch, e.patch) + } + , + X.prototype.comparePre = function(e) { + if (e instanceof X || (e = new X(e,this.options)), + this.prerelease.length && !e.prerelease.length) + return -1; + if (!this.prerelease.length && e.prerelease.length) + return 1; + if (!this.prerelease.length && !e.prerelease.length) + return 0; + var t = 0; + do { + var n = this.prerelease[t] + , o = e.prerelease[t]; + if (r("prerelease compare", t, n, o), + void 0 === n && void 0 === o) + return 0; + if (void 0 === o) + return 1; + if (void 0 === n) + return -1; + if (n !== o) + return ee(n, o) + } while (++t) + } + , + X.prototype.inc = function(e, t) { + switch (e) { + case "premajor": + this.prerelease.length = 0, + this.patch = 0, + this.minor = 0, + this.major++, + this.inc("pre", t); + break; + case "preminor": + this.prerelease.length = 0, + this.patch = 0, + this.minor++, + this.inc("pre", t); + break; + case "prepatch": + this.prerelease.length = 0, + this.inc("patch", t), + this.inc("pre", t); + break; + case "prerelease": + 0 === this.prerelease.length && this.inc("patch", t), + this.inc("pre", t); + break; + case "major": + 0 === this.minor && 0 === this.patch && 0 !== this.prerelease.length || this.major++, + this.minor = 0, + this.patch = 0, + this.prerelease = []; + break; + case "minor": + 0 === this.patch && 0 !== this.prerelease.length || this.minor++, + this.patch = 0, + this.prerelease = []; + break; + case "patch": + 0 === this.prerelease.length && this.patch++, + this.prerelease = []; + break; + case "pre": + if (0 === this.prerelease.length) + this.prerelease = [0]; + else { + for (var r = this.prerelease.length; --r >= 0; ) + "number" == typeof this.prerelease[r] && (this.prerelease[r]++, + r = -2); + -1 === r && this.prerelease.push(0) + } + t && (this.prerelease[0] === t ? isNaN(this.prerelease[1]) && (this.prerelease = [t, 0]) : this.prerelease = [t, 0]); + break; + default: + throw new Error("invalid increment argument: " + e) + } + return this.format(), + this.raw = this.version, + this + } + , + t.inc = function(e, t, r, n) { + "string" == typeof r && (n = r, + r = void 0); + try { + return new X(e,r).inc(t, n).version + } catch (e) { + return null + } + } + , + t.diff = function(e, t) { + if (oe(e, t)) + return null; + var r = Y(e) + , n = Y(t) + , o = ""; + if (r.prerelease.length || n.prerelease.length) { + o = "pre"; + var s = "prerelease" + } + for (var i in r) + if (("major" === i || "minor" === i || "patch" === i) && r[i] !== n[i]) + return o + i; + return s + } + , + t.compareIdentifiers = ee; + var Q = /^[0-9]+$/; + function ee(e, t) { + var r = Q.test(e) + , n = Q.test(t); + return r && n && (e = +e, + t = +t), + e === t ? 0 : r && !n ? -1 : n && !r ? 1 : e < t ? -1 : 1 + } + function te(e, t, r) { + return new X(e,r).compare(new X(t,r)) + } + function re(e, t, r) { + return te(e, t, r) > 0 + } + function ne(e, t, r) { + return te(e, t, r) < 0 + } + function oe(e, t, r) { + return 0 === te(e, t, r) + } + function se(e, t, r) { + return 0 !== te(e, t, r) + } + function ie(e, t, r) { + return te(e, t, r) >= 0 + } + function ae(e, t, r) { + return te(e, t, r) <= 0 + } + function ue(e, t, r, n) { + switch (t) { + case "===": + return "object" == typeof e && (e = e.version), + "object" == typeof r && (r = r.version), + e === r; + case "!==": + return "object" == typeof e && (e = e.version), + "object" == typeof r && (r = r.version), + e !== r; + case "": + case "=": + case "==": + return oe(e, r, n); + case "!=": + return se(e, r, n); + case ">": + return re(e, r, n); + case ">=": + return ie(e, r, n); + case "<": + return ne(e, r, n); + case "<=": + return ae(e, r, n); + default: + throw new TypeError("Invalid operator: " + t) + } + } + function ce(e, t) { + if (t && "object" == typeof t || (t = { + loose: !!t, + includePrerelease: !1 + }), + e instanceof ce) { + if (e.loose === !!t.loose) + return e; + e = e.value + } + if (!(this instanceof ce)) + return new ce(e,t); + e = e.trim().split(/\s+/).join(" "), + r("comparator", e, t), + this.options = t, + this.loose = !!t.loose, + this.parse(e), + this.semver === le ? this.value = "" : this.value = this.operator + this.semver.version, + r("comp", this) + } + t.rcompareIdentifiers = function(e, t) { + return ee(t, e) + } + , + t.major = function(e, t) { + return new X(e,t).major + } + , + t.minor = function(e, t) { + return new X(e,t).minor + } + , + t.patch = function(e, t) { + return new X(e,t).patch + } + , + t.compare = te, + t.compareLoose = function(e, t) { + return te(e, t, !0) + } + , + t.rcompare = function(e, t, r) { + return te(t, e, r) + } + , + t.sort = function(e, r) { + return e.sort((function(e, n) { + return t.compare(e, n, r) + } + )) + } + , + t.rsort = function(e, r) { + return e.sort((function(e, n) { + return t.rcompare(e, n, r) + } + )) + } + , + t.gt = re, + t.lt = ne, + t.eq = oe, + t.neq = se, + t.gte = ie, + t.lte = ae, + t.cmp = ue, + t.Comparator = ce; + var le = {}; + function de(e, t) { + if (t && "object" == typeof t || (t = { + loose: !!t, + includePrerelease: !1 + }), + e instanceof de) + return e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease ? e : new de(e.raw,t); + if (e instanceof ce) + return new de(e.value,t); + if (!(this instanceof de)) + return new de(e,t); + if (this.options = t, + this.loose = !!t.loose, + this.includePrerelease = !!t.includePrerelease, + this.raw = e.trim().split(/\s+/).join(" "), + this.set = this.raw.split("||").map((function(e) { + return this.parseRange(e.trim()) + } + ), this).filter((function(e) { + return e.length + } + )), + !this.set.length) + throw new TypeError("Invalid SemVer Range: " + this.raw); + this.format() + } + function he(e) { + return !e || "x" === e.toLowerCase() || "*" === e + } + function pe(e, t, r, n, o, s, i, a, u, c, l, d, h) { + return ((t = he(r) ? "" : he(n) ? ">=" + r + ".0.0" : he(o) ? ">=" + r + "." + n + ".0" : ">=" + t) + " " + (a = he(u) ? "" : he(c) ? "<" + (+u + 1) + ".0.0" : he(l) ? "<" + u + "." + (+c + 1) + ".0" : d ? "<=" + u + "." + c + "." + l + "-" + d : "<=" + a)).trim() + } + function fe(e, t, n) { + for (var o = 0; o < e.length; o++) + if (!e[o].test(t)) + return !1; + if (t.prerelease.length && !n.includePrerelease) { + for (o = 0; o < e.length; o++) + if (r(e[o].semver), + e[o].semver !== le && e[o].semver.prerelease.length > 0) { + var s = e[o].semver; + if (s.major === t.major && s.minor === t.minor && s.patch === t.patch) + return !0 + } + return !1 + } + return !0 + } + function ge(e, t, r) { + try { + t = new de(t,r) + } catch (e) { + return !1 + } + return t.test(e) + } + function ye(e, t, r, n) { + var o, s, i, a, u; + switch (e = new X(e,n), + t = new de(t,n), + r) { + case ">": + o = re, + s = ae, + i = ne, + a = ">", + u = ">="; + break; + case "<": + o = ne, + s = ie, + i = re, + a = "<", + u = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + if (ge(e, t, n)) + return !1; + for (var c = 0; c < t.set.length; ++c) { + var l = t.set[c] + , d = null + , h = null; + if (l.forEach((function(e) { + e.semver === le && (e = new ce(">=0.0.0")), + d = d || e, + h = h || e, + o(e.semver, d.semver, n) ? d = e : i(e.semver, h.semver, n) && (h = e) + } + )), + d.operator === a || d.operator === u) + return !1; + if ((!h.operator || h.operator === a) && s(e, h.semver)) + return !1; + if (h.operator === u && i(e, h.semver)) + return !1 + } + return !0 + } + ce.prototype.parse = function(e) { + var t = this.options.loose ? a[V] : a[G] + , r = e.match(t); + if (!r) + throw new TypeError("Invalid comparator: " + e); + this.operator = r[1], + "=" === this.operator && (this.operator = ""), + r[2] ? this.semver = new X(r[2],this.options.loose) : this.semver = le + } + , + ce.prototype.toString = function() { + return this.value + } + , + ce.prototype.test = function(e) { + return r("Comparator.test", e, this.options.loose), + this.semver === le || ("string" == typeof e && (e = new X(e,this.options)), + ue(e, this.operator, this.semver, this.options)) + } + , + ce.prototype.intersects = function(e, t) { + if (!(e instanceof ce)) + throw new TypeError("a Comparator is required"); + var r; + if (t && "object" == typeof t || (t = { + loose: !!t, + includePrerelease: !1 + }), + "" === this.operator) + return r = new de(e.value,t), + ge(this.value, r, t); + if ("" === e.operator) + return r = new de(this.value,t), + ge(e.semver, r, t); + var n = !(">=" !== this.operator && ">" !== this.operator || ">=" !== e.operator && ">" !== e.operator) + , o = !("<=" !== this.operator && "<" !== this.operator || "<=" !== e.operator && "<" !== e.operator) + , s = this.semver.version === e.semver.version + , i = !(">=" !== this.operator && "<=" !== this.operator || ">=" !== e.operator && "<=" !== e.operator) + , a = ue(this.semver, "<", e.semver, t) && (">=" === this.operator || ">" === this.operator) && ("<=" === e.operator || "<" === e.operator) + , u = ue(this.semver, ">", e.semver, t) && ("<=" === this.operator || "<" === this.operator) && (">=" === e.operator || ">" === e.operator); + return n || o || s && i || a || u + } + , + t.Range = de, + de.prototype.format = function() { + return this.range = this.set.map((function(e) { + return e.join(" ").trim() + } + )).join("||").trim(), + this.range + } + , + de.prototype.toString = function() { + return this.range + } + , + de.prototype.parseRange = function(e) { + var t = this.options.loose + , n = t ? a[Z] : a[K]; + e = e.replace(n, pe), + r("hyphen replace", e), + e = e.replace(a[H], "$1$2$3"), + r("comparator trim", e, a[H]), + e = (e = e.replace(a[k], "$1~")).replace(a[z], "$1^"); + var o = t ? a[V] : a[G] + , s = e.split(" ").map((function(e) { + return function(e, t) { + return r("comp", e, t), + e = function(e, t) { + return e.trim().split(/\s+/).map((function(e) { + return function(e, t) { + r("caret", e, t); + var n = t.loose ? a[$] : a[j]; + return e.replace(n, (function(t, n, o, s, i) { + var a; + return r("caret", e, t, n, o, s, i), + he(n) ? a = "" : he(o) ? a = ">=" + n + ".0.0 <" + (+n + 1) + ".0.0" : he(s) ? a = "0" === n ? ">=" + n + "." + o + ".0 <" + n + "." + (+o + 1) + ".0" : ">=" + n + "." + o + ".0 <" + (+n + 1) + ".0.0" : i ? (r("replaceCaret pr", i), + a = "0" === n ? "0" === o ? ">=" + n + "." + o + "." + s + "-" + i + " <" + n + "." + o + "." + (+s + 1) : ">=" + n + "." + o + "." + s + "-" + i + " <" + n + "." + (+o + 1) + ".0" : ">=" + n + "." + o + "." + s + "-" + i + " <" + (+n + 1) + ".0.0") : (r("no pr"), + a = "0" === n ? "0" === o ? ">=" + n + "." + o + "." + s + " <" + n + "." + o + "." + (+s + 1) : ">=" + n + "." + o + "." + s + " <" + n + "." + (+o + 1) + ".0" : ">=" + n + "." + o + "." + s + " <" + (+n + 1) + ".0.0"), + r("caret return", a), + a + } + )) + }(e, t) + } + )).join(" ") + }(e, t), + r("caret", e), + e = function(e, t) { + return e.trim().split(/\s+/).map((function(e) { + return function(e, t) { + var n = t.loose ? a[D] : a[U]; + return e.replace(n, (function(t, n, o, s, i) { + var a; + return r("tilde", e, t, n, o, s, i), + he(n) ? a = "" : he(o) ? a = ">=" + n + ".0.0 <" + (+n + 1) + ".0.0" : he(s) ? a = ">=" + n + "." + o + ".0 <" + n + "." + (+o + 1) + ".0" : i ? (r("replaceTilde pr", i), + a = ">=" + n + "." + o + "." + s + "-" + i + " <" + n + "." + (+o + 1) + ".0") : a = ">=" + n + "." + o + "." + s + " <" + n + "." + (+o + 1) + ".0", + r("tilde return", a), + a + } + )) + }(e, t) + } + )).join(" ") + }(e, t), + r("tildes", e), + e = function(e, t) { + return r("replaceXRanges", e, t), + e.split(/\s+/).map((function(e) { + return function(e, t) { + e = e.trim(); + var n = t.loose ? a[x] : a[_]; + return e.replace(n, (function(t, n, o, s, i, a) { + r("xRange", e, t, n, o, s, i, a); + var u = he(o) + , c = u || he(s) + , l = c || he(i); + return "=" === n && l && (n = ""), + u ? t = ">" === n || "<" === n ? "<0.0.0" : "*" : n && l ? (c && (s = 0), + i = 0, + ">" === n ? (n = ">=", + c ? (o = +o + 1, + s = 0, + i = 0) : (s = +s + 1, + i = 0)) : "<=" === n && (n = "<", + c ? o = +o + 1 : s = +s + 1), + t = n + o + "." + s + "." + i) : c ? t = ">=" + o + ".0.0 <" + (+o + 1) + ".0.0" : l && (t = ">=" + o + "." + s + ".0 <" + o + "." + (+s + 1) + ".0"), + r("xRange return", t), + t + } + )) + }(e, t) + } + )).join(" ") + }(e, t), + r("xrange", e), + e = function(e, t) { + return r("replaceStars", e, t), + e.trim().replace(a[q], "") + }(e, t), + r("stars", e), + e + }(e, this.options) + } + ), this).join(" ").split(/\s+/); + return this.options.loose && (s = s.filter((function(e) { + return !!e.match(o) + } + ))), + s.map((function(e) { + return new ce(e,this.options) + } + ), this) + } + , + de.prototype.intersects = function(e, t) { + if (!(e instanceof de)) + throw new TypeError("a Range is required"); + return this.set.some((function(r) { + return r.every((function(r) { + return e.set.some((function(e) { + return e.every((function(e) { + return r.intersects(e, t) + } + )) + } + )) + } + )) + } + )) + } + , + t.toComparators = function(e, t) { + return new de(e,t).set.map((function(e) { + return e.map((function(e) { + return e.value + } + )).join(" ").trim().split(" ") + } + )) + } + , + de.prototype.test = function(e) { + if (!e) + return !1; + "string" == typeof e && (e = new X(e,this.options)); + for (var t = 0; t < this.set.length; t++) + if (fe(this.set[t], e, this.options)) + return !0; + return !1 + } + , + t.satisfies = ge, + t.maxSatisfying = function(e, t, r) { + var n = null + , o = null; + try { + var s = new de(t,r) + } catch (e) { + return null + } + return e.forEach((function(e) { + s.test(e) && (n && -1 !== o.compare(e) || (o = new X(n = e,r))) + } + )), + n + } + , + t.minSatisfying = function(e, t, r) { + var n = null + , o = null; + try { + var s = new de(t,r) + } catch (e) { + return null + } + return e.forEach((function(e) { + s.test(e) && (n && 1 !== o.compare(e) || (o = new X(n = e,r))) + } + )), + n + } + , + t.minVersion = function(e, t) { + e = new de(e,t); + var r = new X("0.0.0"); + if (e.test(r)) + return r; + if (r = new X("0.0.0-0"), + e.test(r)) + return r; + r = null; + for (var n = 0; n < e.set.length; ++n) + e.set[n].forEach((function(e) { + var t = new X(e.semver.version); + switch (e.operator) { + case ">": + 0 === t.prerelease.length ? t.patch++ : t.prerelease.push(0), + t.raw = t.format(); + case "": + case ">=": + r && !re(r, t) || (r = t); + break; + case "<": + case "<=": + break; + default: + throw new Error("Unexpected operation: " + e.operator) + } + } + )); + return r && e.test(r) ? r : null + } + , + t.validRange = function(e, t) { + try { + return new de(e,t).range || "*" + } catch (e) { + return null + } + } + , + t.ltr = function(e, t, r) { + return ye(e, t, "<", r) + } + , + t.gtr = function(e, t, r) { + return ye(e, t, ">", r) + } + , + t.outside = ye, + t.prerelease = function(e, t) { + var r = Y(e, t); + return r && r.prerelease.length ? r.prerelease : null + } + , + t.intersects = function(e, t, r) { + return e = new de(e,r), + t = new de(t,r), + e.intersects(t) + } + , + t.coerce = function(e) { + if (e instanceof X) + return e; + if ("string" != typeof e) + return null; + var t = e.match(a[R]); + return null == t ? null : Y(t[1] + "." + (t[2] || "0") + "." + (t[3] || "0")) + } + } + , + 8966: (e,t,r)=>{ + "use strict"; + function n(e) { + return n = "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 + } + , + n(e) + } + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = void 0; + var o = Je(r(8469)) + , s = Je(r(7536)) + , i = Je(r(1359)) + , a = Je(r(557)) + , u = Je(r(2315)) + , c = Je(r(9466)) + , l = Je(r(661)) + , d = Je(r(3868)) + , h = Je(r(2492)) + , p = Je(r(8999)) + , f = Je(r(1028)) + , g = Je(r(7795)) + , y = Je(r(221)) + , b = Je(r(2549)) + , m = Je(r(3494)) + , T = Je(r(9493)) + , v = Je(r(7380)) + , w = qe(r(9234)) + , A = qe(r(4583)) + , P = Je(r(4986)) + , W = Je(r(1513)) + , B = Je(r(4595)) + , C = Je(r(3928)) + , E = Je(r(7245)) + , M = Je(r(5566)) + , I = Je(r(4094)) + , F = Je(r(7146)) + , O = Je(r(2941)) + , S = Je(r(9019)) + , _ = Je(r(3590)) + , x = Je(r(6826)) + , R = Je(r(2828)) + , N = Je(r(937)) + , k = qe(r(9146)) + , U = Je(r(5218)) + , D = Je(r(7117)) + , L = Je(r(6090)) + , z = Je(r(8335)) + , j = Je(r(6298)) + , $ = Je(r(6454)) + , V = Je(r(6648)) + , G = Je(r(4339)) + , H = qe(r(8177)) + , K = Je(r(2438)) + , Z = Je(r(368)) + , q = Je(r(8874)) + , J = Je(r(4979)) + , Y = Je(r(1008)) + , X = Je(r(4069)) + , Q = Je(r(4958)) + , ee = Je(r(3235)) + , te = Je(r(7278)) + , re = Je(r(9131)) + , ne = Je(r(3315)) + , oe = Je(r(1464)) + , se = Je(r(7228)) + , ie = Je(r(1592)) + , ae = Je(r(682)) + , ue = Je(r(9396)) + , ce = Je(r(5807)) + , le = Je(r(7148)) + , de = Je(r(7612)) + , he = Je(r(9887)) + , pe = Je(r(3058)) + , fe = qe(r(8355)) + , ge = Je(r(2129)) + , ye = Je(r(94)) + , be = Je(r(8021)) + , me = r(5946) + , Te = Je(r(9211)) + , ve = Je(r(4915)) + , we = Je(r(4611)) + , Ae = Je(r(1727)) + , Pe = Je(r(6776)) + , We = Je(r(9963)) + , Be = Je(r(2782)) + , Ce = Je(r(5008)) + , Ee = Je(r(2689)) + , Me = Je(r(8983)) + , Ie = Je(r(2776)) + , Fe = Je(r(2966)) + , Oe = Je(r(4554)) + , Se = Je(r(478)) + , _e = qe(r(8140)) + , xe = Je(r(4959)) + , Re = Je(r(9778)) + , Ne = Je(r(4790)) + , ke = Je(r(5152)) + , Ue = Je(r(4816)) + , De = Je(r(8035)) + , Le = Je(r(4714)) + , ze = Je(r(4928)) + , je = Je(r(8346)) + , $e = Je(r(2900)) + , Ve = Je(r(8220)) + , Ge = Je(r(2786)) + , He = Je(r(7633)) + , Ke = Je(r(5977)); + function Ze() { + if ("function" != typeof WeakMap) + return null; + var e = new WeakMap; + return Ze = function() { + return e + } + , + e + } + function qe(e) { + if (e && e.__esModule) + return e; + if (null === e || "object" !== n(e) && "function" != typeof e) + return { + default: e + }; + var t = Ze(); + if (t && t.has(e)) + return t.get(e); + var r = {} + , o = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var s in e) + if (Object.prototype.hasOwnProperty.call(e, s)) { + var i = o ? Object.getOwnPropertyDescriptor(e, s) : null; + i && (i.get || i.set) ? Object.defineProperty(r, s, i) : r[s] = e[s] + } + return r.default = e, + t && t.set(e, r), + r + } + function Je(e) { + return e && e.__esModule ? e : { + default: e + } + } + var Ye = { + version: "13.11.0", + toDate: o.default, + toFloat: s.default, + toInt: i.default, + toBoolean: a.default, + equals: u.default, + contains: c.default, + matches: l.default, + isEmail: d.default, + isURL: h.default, + isMACAddress: p.default, + isIP: f.default, + isIPRange: g.default, + isFQDN: y.default, + isBoolean: T.default, + isIBAN: H.default, + isBIC: K.default, + isAlpha: w.default, + isAlphaLocales: w.locales, + isAlphanumeric: A.default, + isAlphanumericLocales: A.locales, + isNumeric: P.default, + isPassportNumber: W.default, + isPort: B.default, + isLowercase: C.default, + isUppercase: E.default, + isAscii: I.default, + isFullWidth: F.default, + isHalfWidth: O.default, + isVariableWidth: S.default, + isMultibyte: _.default, + isSemVer: x.default, + isSurrogatePair: R.default, + isInt: N.default, + isIMEI: M.default, + isFloat: k.default, + isFloatLocales: k.locales, + isDecimal: U.default, + isHexadecimal: D.default, + isOctal: L.default, + isDivisibleBy: z.default, + isHexColor: j.default, + isRgbColor: $.default, + isHSL: V.default, + isISRC: G.default, + isMD5: Z.default, + isHash: q.default, + isJWT: J.default, + isJSON: Y.default, + isEmpty: X.default, + isLength: Q.default, + isLocale: v.default, + isByteLength: ee.default, + isUUID: te.default, + isMongoId: re.default, + isAfter: ne.default, + isBefore: oe.default, + isIn: se.default, + isLuhnNumber: ie.default, + isCreditCard: ae.default, + isIdentityCard: ue.default, + isEAN: ce.default, + isISIN: le.default, + isISBN: de.default, + isISSN: he.default, + isMobilePhone: fe.default, + isMobilePhoneLocales: fe.locales, + isPostalCode: _e.default, + isPostalCodeLocales: _e.locales, + isEthereumAddress: ge.default, + isCurrency: ye.default, + isBtcAddress: be.default, + isISO6346: me.isISO6346, + isFreightContainerID: me.isFreightContainerID, + isISO6391: Te.default, + isISO8601: ve.default, + isRFC3339: we.default, + isISO31661Alpha2: Ae.default, + isISO31661Alpha3: Pe.default, + isISO4217: We.default, + isBase32: Be.default, + isBase58: Ce.default, + isBase64: Ee.default, + isDataURI: Me.default, + isMagnetURI: Ie.default, + isMailtoURI: Fe.default, + isMimeType: Oe.default, + isLatLong: Se.default, + ltrim: xe.default, + rtrim: Re.default, + trim: Ne.default, + escape: ke.default, + unescape: Ue.default, + stripLow: De.default, + whitelist: Le.default, + blacklist: ze.default, + isWhitelisted: je.default, + normalizeEmail: $e.default, + toString, + isSlug: Ve.default, + isStrongPassword: He.default, + isTaxID: pe.default, + isDate: b.default, + isTime: m.default, + isLicensePlate: Ge.default, + isVAT: Ke.default, + ibanLocales: H.locales + }; + t.default = Ye, + e.exports = t.default, + e.exports.default = t.default + } + , + 79: (e,t)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.commaDecimal = t.dotDecimal = t.bengaliLocales = t.farsiLocales = t.arabicLocales = t.englishLocales = t.decimal = t.alphanumeric = t.alpha = void 0; + var r = { + "en-US": /^[A-Z]+$/i, + "az-AZ": /^[A-VXYZÇƏĞİıÖŞÜ]+$/i, + "bg-BG": /^[А-Я]+$/i, + "cs-CZ": /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + "da-DK": /^[A-ZÆØÅ]+$/i, + "de-DE": /^[A-ZÄÖÜß]+$/i, + "el-GR": /^[Α-ώ]+$/i, + "es-ES": /^[A-ZÁÉÍÑÓÚÜ]+$/i, + "fa-IR": /^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i, + "fi-FI": /^[A-ZÅÄÖ]+$/i, + "fr-FR": /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + "it-IT": /^[A-ZÀÉÈÌÎÓÒÙ]+$/i, + "ja-JP": /^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, + "nb-NO": /^[A-ZÆØÅ]+$/i, + "nl-NL": /^[A-ZÁÉËÏÓÖÜÚ]+$/i, + "nn-NO": /^[A-ZÆØÅ]+$/i, + "hu-HU": /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + "pl-PL": /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + "pt-PT": /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, + "ru-RU": /^[А-ЯЁ]+$/i, + "kk-KZ": /^[А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, + "sl-SI": /^[A-ZČĆĐŠŽ]+$/i, + "sk-SK": /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + "sr-RS@latin": /^[A-ZČĆŽŠĐ]+$/i, + "sr-RS": /^[А-ЯЂЈЉЊЋЏ]+$/i, + "sv-SE": /^[A-ZÅÄÖ]+$/i, + "th-TH": /^[ก-๐\s]+$/i, + "tr-TR": /^[A-ZÇĞİıÖŞÜ]+$/i, + "uk-UA": /^[А-ЩЬЮЯЄIЇҐі]+$/i, + "vi-VN": /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, + "ko-KR": /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/, + "ku-IQ": /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, + he: /^[א-ת]+$/, + fa: /^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i, + bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, + "hi-IN": /^[\u0900-\u0961]+[\u0972-\u097F]*$/i, + "si-LK": /^[\u0D80-\u0DFF]+$/ + }; + t.alpha = r; + var n = { + "en-US": /^[0-9A-Z]+$/i, + "az-AZ": /^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i, + "bg-BG": /^[0-9А-Я]+$/i, + "cs-CZ": /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i, + "da-DK": /^[0-9A-ZÆØÅ]+$/i, + "de-DE": /^[0-9A-ZÄÖÜß]+$/i, + "el-GR": /^[0-9Α-ω]+$/i, + "es-ES": /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i, + "fi-FI": /^[0-9A-ZÅÄÖ]+$/i, + "fr-FR": /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i, + "it-IT": /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i, + "ja-JP": /^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i, + "hu-HU": /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i, + "nb-NO": /^[0-9A-ZÆØÅ]+$/i, + "nl-NL": /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i, + "nn-NO": /^[0-9A-ZÆØÅ]+$/i, + "pl-PL": /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i, + "pt-PT": /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i, + "ru-RU": /^[0-9А-ЯЁ]+$/i, + "kk-KZ": /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i, + "sl-SI": /^[0-9A-ZČĆĐŠŽ]+$/i, + "sk-SK": /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i, + "sr-RS@latin": /^[0-9A-ZČĆŽŠĐ]+$/i, + "sr-RS": /^[0-9А-ЯЂЈЉЊЋЏ]+$/i, + "sv-SE": /^[0-9A-ZÅÄÖ]+$/i, + "th-TH": /^[ก-๙\s]+$/i, + "tr-TR": /^[0-9A-ZÇĞİıÖŞÜ]+$/i, + "uk-UA": /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i, + "ko-KR": /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/, + "ku-IQ": /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i, + "vi-VN": /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i, + ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/, + he: /^[0-9א-ת]+$/, + fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i, + bn: /^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/, + "hi-IN": /^[\u0900-\u0963]+[\u0966-\u097F]*$/i, + "si-LK": /^[0-9\u0D80-\u0DFF]+$/ + }; + t.alphanumeric = n; + var o = { + "en-US": ".", + ar: "٫" + }; + t.decimal = o; + var s = ["AU", "GB", "HK", "IN", "NZ", "ZA", "ZM"]; + t.englishLocales = s; + for (var i, a = 0; a < s.length; a++) + r[i = "en-".concat(s[a])] = r["en-US"], + n[i] = n["en-US"], + o[i] = o["en-US"]; + var u = ["AE", "BH", "DZ", "EG", "IQ", "JO", "KW", "LB", "LY", "MA", "QM", "QA", "SA", "SD", "SY", "TN", "YE"]; + t.arabicLocales = u; + for (var c, l = 0; l < u.length; l++) + r[c = "ar-".concat(u[l])] = r.ar, + n[c] = n.ar, + o[c] = o.ar; + var d = ["IR", "AF"]; + t.farsiLocales = d; + for (var h, p = 0; p < d.length; p++) + n[h = "fa-".concat(d[p])] = n.fa, + o[h] = o.ar; + var f = ["BD", "IN"]; + t.bengaliLocales = f; + for (var g, y = 0; y < f.length; y++) + r[g = "bn-".concat(f[y])] = r.bn, + n[g] = n.bn, + o[g] = o["en-US"]; + var b = ["ar-EG", "ar-LB", "ar-LY"]; + t.dotDecimal = b; + var m = ["bg-BG", "cs-CZ", "da-DK", "de-DE", "el-GR", "en-ZM", "es-ES", "fr-CA", "fr-FR", "id-ID", "it-IT", "ku-IQ", "hi-IN", "hu-HU", "nb-NO", "nn-NO", "nl-NL", "pl-PL", "pt-PT", "ru-RU", "kk-KZ", "si-LK", "sl-SI", "sr-RS@latin", "sr-RS", "sv-SE", "tr-TR", "uk-UA", "vi-VN"]; + t.commaDecimal = m; + for (var T = 0; T < b.length; T++) + o[b[T]] = o["en-US"]; + for (var v = 0; v < m.length; v++) + o[m[v]] = ","; + r["fr-CA"] = r["fr-FR"], + n["fr-CA"] = n["fr-FR"], + r["pt-BR"] = r["pt-PT"], + n["pt-BR"] = n["pt-PT"], + o["pt-BR"] = o["pt-PT"], + r["pl-Pl"] = r["pl-PL"], + n["pl-Pl"] = n["pl-PL"], + o["pl-Pl"] = o["pl-PL"], + r["fa-AF"] = r.fa + } + , + 4928: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + o.default)(e), + e.replace(new RegExp("[".concat(t, "]+"),"g"), "") + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 9466: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t, r) { + return (0, + n.default)(e), + (r = (0, + s.default)(r, a)).ignoreCase ? e.toLowerCase().split((0, + o.default)(t).toLowerCase()).length > r.minOccurrences : e.split((0, + o.default)(t)).length > r.minOccurrences + } + ; + var n = i(r(5571)) + , o = i(r(1913)) + , s = i(r(4808)); + function i(e) { + return e && e.__esModule ? e : { + default: e + } + } + var a = { + ignoreCase: !1, + minOccurrences: 1 + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 2315: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + o.default)(e), + e === t + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 5152: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(//g, ">").replace(/\//g, "/").replace(/\\/g, "\").replace(/`/g, "`") + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 3315: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + var r = (null == t ? void 0 : t.comparisonDate) || t || Date().toString() + , n = (0, + o.default)(r) + , s = (0, + o.default)(e); + return !!(s && n && s > n) + } + ; + var n, o = (n = r(8469)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 9234: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "en-US" + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; + (0, + o.default)(e); + var n = e + , i = r.ignore; + if (i) + if (i instanceof RegExp) + n = n.replace(i, ""); + else { + if ("string" != typeof i) + throw new Error("ignore should be instance of a String or RegExp"); + n = n.replace(new RegExp("[".concat(i.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, "\\$&"), "]"),"g"), "") + } + if (t in s.alpha) + return s.alpha[t].test(n); + throw new Error("Invalid locale '".concat(t, "'")) + } + , + t.locales = void 0; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = r(79), i = Object.keys(s.alpha); + t.locales = i + } + , + 4583: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "en-US" + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; + (0, + o.default)(e); + var n = e + , i = r.ignore; + if (i) + if (i instanceof RegExp) + n = n.replace(i, ""); + else { + if ("string" != typeof i) + throw new Error("ignore should be instance of a String or RegExp"); + n = n.replace(new RegExp("[".concat(i.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, "\\$&"), "]"),"g"), "") + } + if (t in s.alphanumeric) + return s.alphanumeric[t].test(n); + throw new Error("Invalid locale '".concat(t, "'")) + } + , + t.locales = void 0; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = r(79), i = Object.keys(s.alphanumeric); + t.locales = i + } + , + 4094: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^[\x00-\x7F]+$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 2438: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + (0, + o.default)(e); + var t = e.slice(4, 6).toUpperCase(); + return !(!s.CountryCodes.has(t) && "XK" !== t) && i.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = r(1727), i = /^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 2782: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + n.default)(e), + (t = (0, + o.default)(t, u)).crockford ? a.test(e) : !(e.length % 8 != 0 || !i.test(e)) + } + ; + var n = s(r(5571)) + , o = s(r(4808)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + var i = /^[A-Z2-7]+=*$/ + , a = /^[A-HJKMNP-TV-Z0-9]+$/ + , u = { + crockford: !1 + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 5008: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + !!s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^[A-HJ-NP-Za-km-z1-9]*$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 2689: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + (0, + n.default)(e), + t = (0, + o.default)(t, u); + var r = e.length; + if (t.urlSafe) + return a.test(e); + if (r % 4 != 0 || i.test(e)) + return !1; + var s = e.indexOf("="); + return -1 === s || s === r - 1 || s === r - 2 && "=" === e[r - 1] + } + ; + var n = s(r(5571)) + , o = s(r(4808)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + var i = /[^A-Z0-9+\/=]/i + , a = /^[A-Z0-9_\-]*$/i + , u = { + urlSafe: !1 + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 1464: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : String(new Date); + (0, + n.default)(e); + var r = (0, + o.default)(t) + , s = (0, + o.default)(e); + return !!(s && r && s < r) + } + ; + var n = s(r(5571)) + , o = s(r(8469)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + e.exports = t.default, + e.exports.default = t.default + } + , + 9493: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : s; + return (0, + o.default)(e), + t.loose ? a.includes(e.toLowerCase()) : i.includes(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = { + loose: !1 + }, i = ["true", "false", "1", "0"], a = [].concat(i, ["yes", "no"]); + e.exports = t.default, + e.exports.default = t.default + } + , + 8021: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) || i.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^(bc1)[a-z0-9]{25,39}$/, i = /^(1|3)[A-HJ-NP-Za-km-z1-9]{25,39}$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 3235: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + var r, n; + (0, + o.default)(e), + "object" === s(t) ? (r = t.min || 0, + n = t.max) : (r = arguments[1], + n = arguments[2]); + var i = encodeURI(e).split(/%..|./).length - 1; + return i >= r && (void 0 === n || i <= n) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + function s(e) { + return 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 + } + , + s(e) + } + e.exports = t.default, + e.exports.default = t.default + } + , + 682: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + (0, + n.default)(e); + var r = t.provider + , s = e.replace(/[- ]+/g, ""); + if (r && r.toLowerCase()in i) { + if (!i[r.toLowerCase()].test(s)) + return !1 + } else { + if (r && !(r.toLowerCase()in i)) + throw new Error("".concat(r, " is not a valid credit card provider.")); + if (!a.some((function(e) { + return e.test(s) + } + ))) + return !1 + } + return (0, + o.default)(e) + } + ; + var n = s(r(5571)) + , o = s(r(1592)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + var i = { + amex: /^3[47][0-9]{13}$/, + dinersclub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/, + discover: /^6(?:011|5[0-9][0-9])[0-9]{12,15}$/, + jcb: /^(?:2131|1800|35\d{3})\d{11}$/, + mastercard: /^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/, + unionpay: /^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/, + visa: /^(?:4[0-9]{12})(?:[0-9]{3,6})?$/ + } + , a = function() { + var e = []; + for (var t in i) + i.hasOwnProperty(t) && e.push(i[t]); + return e + }(); + e.exports = t.default, + e.exports.default = t.default + } + , + 94: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + o.default)(e), + function(e) { + var t = "\\d{".concat(e.digits_after_decimal[0], "}"); + e.digits_after_decimal.forEach((function(e, r) { + 0 !== r && (t = "".concat(t, "|\\d{").concat(e, "}")) + } + )); + var r = "(".concat(e.symbol.replace(/\W/, (function(e) { + return "\\".concat(e) + } + )), ")").concat(e.require_symbol ? "" : "?") + , n = "-?" + , o = "[1-9]\\d{0,2}(\\".concat(e.thousands_separator, "\\d{3})*") + , s = "(".concat(["0", "[1-9]\\d*", o].join("|"), ")?") + , i = "(\\".concat(e.decimal_separator, "(").concat(t, "))").concat(e.require_decimal ? "" : "?") + , a = s + (e.allow_decimal || e.require_decimal ? i : ""); + return e.allow_negatives && !e.parens_for_negatives && (e.negative_sign_after_digits ? a += n : e.negative_sign_before_digits && (a = n + a)), + e.allow_negative_sign_placeholder ? a = "( (?!\\-))?".concat(a) : e.allow_space_after_symbol ? a = " ?".concat(a) : e.allow_space_after_digits && (a += "( (?!$))?"), + e.symbol_after_digits ? a += r : a = r + a, + e.allow_negatives && (e.parens_for_negatives ? a = "(\\(".concat(a, "\\)|").concat(a, ")") : e.negative_sign_before_digits || e.negative_sign_after_digits || (a = n + a)), + new RegExp("^(?!-? )(?=.*\\d)".concat(a, "$")) + }(t = (0, + n.default)(t, i)).test(e) + } + ; + var n = s(r(4808)) + , o = s(r(5571)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + var i = { + symbol: "$", + require_symbol: !1, + allow_space_after_symbol: !1, + symbol_after_digits: !1, + allow_negatives: !0, + parens_for_negatives: !1, + negative_sign_before_digits: !1, + negative_sign_after_digits: !1, + allow_negative_sign_placeholder: !1, + thousands_separator: ",", + decimal_separator: ".", + allow_decimal: !0, + require_decimal: !1, + digits_after_decimal: [2], + allow_space_after_digits: !1 + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 8983: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + (0, + o.default)(e); + var t = e.split(","); + if (t.length < 2) + return !1; + var r = t.shift().trim().split(";") + , n = r.shift(); + if ("data:" !== n.slice(0, 5)) + return !1; + var u = n.slice(5); + if ("" !== u && !s.test(u)) + return !1; + for (var c = 0; c < r.length; c++) + if ((c !== r.length - 1 || "base64" !== r[c].toLowerCase()) && !i.test(r[c])) + return !1; + for (var l = 0; l < t.length; l++) + if (!a.test(t[l])) + return !1; + return !0 + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^[a-z]+\/[a-z0-9\-\+\._]+$/i, i = /^[a-z\-]+=[a-z0-9\-]+$/i, a = /^[a-z0-9!\$&'\(\)\*\+,;=\-\._~:@\/\?%\s]*$/i; + e.exports = t.default, + e.exports.default = t.default + } + , + 2549: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + if (t = "string" == typeof t ? (0, + o.default)({ + format: t + }, a) : (0, + o.default)(t, a), + "string" == typeof e && (b = t.format, + /(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(b))) { + var r, n = t.delimiters.find((function(e) { + return -1 !== t.format.indexOf(e) + } + )), i = t.strictMode ? n : t.delimiters.find((function(t) { + return -1 !== e.indexOf(t) + } + )), u = function(e, t) { + for (var r = [], n = Math.min(e.length, t.length), o = 0; o < n; o++) + r.push([e[o], t[o]]); + return r + }(e.split(i), t.format.toLowerCase().split(n)), c = {}, l = function(e, t) { + var r; + if ("undefined" == typeof Symbol || null == e[Symbol.iterator]) { + if (Array.isArray(e) || (r = s(e))) { + r && (e = r); + var n = 0 + , o = function() {}; + return { + s: o, + n: function() { + return n >= e.length ? { + done: !0 + } : { + done: !1, + value: e[n++] + } + }, + e: function(e) { + throw e + }, + f: o + } + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + } + var i, a = !0, u = !1; + return { + s: function() { + r = e[Symbol.iterator]() + }, + n: function() { + var e = r.next(); + return a = e.done, + e + }, + e: function(e) { + u = !0, + i = e + }, + f: function() { + try { + a || null == r.return || r.return() + } finally { + if (u) + throw i + } + } + } + }(u); + try { + for (l.s(); !(r = l.n()).done; ) { + var d = (y = r.value, + 2, + function(e) { + if (Array.isArray(e)) + return e + }(y) || function(e, t) { + if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) { + var r = [] + , n = !0 + , o = !1 + , s = void 0; + try { + for (var i, a = e[Symbol.iterator](); !(n = (i = a.next()).done) && (r.push(i.value), + 2 !== r.length); n = !0) + ; + } catch (e) { + o = !0, + s = e + } finally { + try { + n || null == a.return || a.return() + } finally { + if (o) + throw s + } + } + return r + } + }(y) || s(y, 2) || function() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + }()) + , h = d[0] + , p = d[1]; + if (h.length !== p.length) + return !1; + c[p.charAt(0)] = h + } + } catch (e) { + l.e(e) + } finally { + l.f() + } + var f = c.y; + if (2 === c.y.length) { + var g = parseInt(c.y, 10); + if (isNaN(g)) + return !1; + f = g < (new Date).getFullYear() % 100 ? "20".concat(c.y) : "19".concat(c.y) + } + return new Date("".concat(f, "-").concat(c.m, "-").concat(c.d)).getDate() === +c.d + } + var y, b; + return !t.strictMode && ("[object Date]" === Object.prototype.toString.call(e) && isFinite(e)) + } + ; + var n, o = (n = r(4808)) && n.__esModule ? n : { + default: n + }; + function s(e, t) { + if (e) { + if ("string" == typeof e) + return i(e, t); + var r = Object.prototype.toString.call(e).slice(8, -1); + return "Object" === r && e.constructor && (r = e.constructor.name), + "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? i(e, t) : void 0 + } + } + function i(e, t) { + (null == t || t > e.length) && (t = e.length); + for (var r = 0, n = new Array(t); r < t; r++) + n[r] = e[r]; + return n + } + var a = { + format: "YYYY/MM/DD", + delimiters: ["/", "-"], + strictMode: !1 + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 5218: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + if ((0, + o.default)(e), + (t = (0, + n.default)(t, u)).locale in i.decimal) + return !(0, + s.default)(c, e.replace(/ /g, "")) && function(e) { + return new RegExp("^[-+]?([0-9]+)?(\\".concat(i.decimal[e.locale], "[0-9]{").concat(e.decimal_digits, "})").concat(e.force_decimal ? "" : "?", "$")) + }(t).test(e); + throw new Error("Invalid locale '".concat(t.locale, "'")) + } + ; + var n = a(r(4808)) + , o = a(r(5571)) + , s = a(r(8343)) + , i = r(79); + function a(e) { + return e && e.__esModule ? e : { + default: e + } + } + var u = { + force_decimal: !1, + decimal_digits: "1,", + locale: "en-US" + } + , c = ["", "-", "+"]; + e.exports = t.default, + e.exports.default = t.default + } + , + 8335: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + n.default)(e), + (0, + o.default)(e) % parseInt(t, 10) == 0 + } + ; + var n = s(r(5571)) + , o = s(r(7536)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + e.exports = t.default, + e.exports.default = t.default + } + , + 5807: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + (0, + o.default)(e); + var t, r, n = Number(e.slice(-1)); + return a.test(e) && n === ((r = 10 - (t = e).slice(0, -1).split("").map((function(e, r) { + return Number(e) * function(e, t) { + return e === s || e === i ? t % 2 == 0 ? 3 : 1 : t % 2 == 0 ? 1 : 3 + }(t.length, r) + } + )).reduce((function(e, t) { + return e + t + } + ), 0) % 10) < 10 ? r : 0) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = 8, i = 14, a = /^(\d{8}|\d{13}|\d{14})$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 3868: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + if ((0, + n.default)(e), + (t = (0, + a.default)(t, c)).require_display_name || t.allow_display_name) { + var r = e.match(l); + if (r) { + var u = r[1]; + if (e = e.replace(u, "").replace(/(^<|>$)/g, ""), + u.endsWith(" ") && (u = u.slice(0, -1)), + !function(e) { + var t = e.replace(/^"(.+)"$/, "$1"); + if (!t.trim()) + return !1; + if (/[\.";<>]/.test(t)) { + if (t === e) + return !1; + if (t.split('"').length !== t.split('\\"').length) + return !1 + } + return !0 + }(u)) + return !1 + } else if (t.require_display_name) + return !1 + } + if (!t.ignore_max_length && e.length > y) + return !1; + var b = e.split("@") + , m = b.pop() + , T = m.toLowerCase(); + if (t.host_blacklist.includes(T)) + return !1; + if (t.host_whitelist.length > 0 && !t.host_whitelist.includes(T)) + return !1; + var v = b.join("@"); + if (t.domain_specific_validation && ("gmail.com" === T || "googlemail.com" === T)) { + var w = (v = v.toLowerCase()).split("+")[0]; + if (!(0, + o.default)(w.replace(/\./g, ""), { + min: 6, + max: 30 + })) + return !1; + for (var A = w.split("."), P = 0; P < A.length; P++) + if (!h.test(A[P])) + return !1 + } + if (!(!1 !== t.ignore_max_length || (0, + o.default)(v, { + max: 64 + }) && (0, + o.default)(m, { + max: 254 + }))) + return !1; + if (!(0, + s.default)(m, { + require_tld: t.require_tld, + ignore_max_length: t.ignore_max_length, + allow_underscores: t.allow_underscores + })) { + if (!t.allow_ip_domain) + return !1; + if (!(0, + i.default)(m)) { + if (!m.startsWith("[") || !m.endsWith("]")) + return !1; + var W = m.slice(1, -1); + if (0 === W.length || !(0, + i.default)(W)) + return !1 + } + } + if ('"' === v[0]) + return v = v.slice(1, v.length - 1), + t.allow_utf8_local_part ? g.test(v) : p.test(v); + for (var B = t.allow_utf8_local_part ? f : d, C = v.split("."), E = 0; E < C.length; E++) + if (!B.test(C[E])) + return !1; + return !t.blacklisted_chars || -1 === v.search(new RegExp("[".concat(t.blacklisted_chars, "]+"),"g")) + } + ; + var n = u(r(5571)) + , o = u(r(3235)) + , s = u(r(221)) + , i = u(r(1028)) + , a = u(r(4808)); + function u(e) { + return e && e.__esModule ? e : { + default: e + } + } + var c = { + allow_display_name: !1, + allow_underscores: !1, + require_display_name: !1, + allow_utf8_local_part: !0, + require_tld: !0, + blacklisted_chars: "", + ignore_max_length: !1, + host_blacklist: [], + host_whitelist: [] + } + , l = /^([^\x00-\x1F\x7F-\x9F\cX]+){ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + n.default)(e), + 0 === ((t = (0, + o.default)(t, i)).ignore_whitespace ? e.trim().length : e.length) + } + ; + var n = s(r(5571)) + , o = s(r(4808)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + var i = { + ignore_whitespace: !1 + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 2129: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^(0x)[0-9a-f]{40}$/i; + e.exports = t.default, + e.exports.default = t.default + } + , + 221: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + (0, + n.default)(e), + (t = (0, + o.default)(t, i)).allow_trailing_dot && "." === e[e.length - 1] && (e = e.substring(0, e.length - 1)), + !0 === t.allow_wildcard && 0 === e.indexOf("*.") && (e = e.substring(2)); + var r = e.split(".") + , s = r[r.length - 1]; + if (t.require_tld) { + if (r.length < 2) + return !1; + if (!t.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(s)) + return !1; + if (/\s/.test(s)) + return !1 + } + return !(!t.allow_numeric_tld && /^\d+$/.test(s)) && r.every((function(e) { + return !(e.length > 63 && !t.ignore_max_length || !/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e) || /[\uff01-\uff5e]/.test(e) || /^-|-$/.test(e) || !t.allow_underscores && /_/.test(e)) + } + )) + } + ; + var n = s(r(5571)) + , o = s(r(4808)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + var i = { + require_tld: !0, + allow_underscores: !1, + allow_trailing_dot: !1, + allow_numeric_tld: !1, + allow_wildcard: !1, + ignore_max_length: !1 + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 9146: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + (0, + o.default)(e), + t = t || {}; + var r = new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(t.locale ? s.decimal[t.locale] : ".", "[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$")); + if ("" === e || "." === e || "," === e || "-" === e || "+" === e) + return !1; + var n = parseFloat(e.replace(",", ".")); + return r.test(e) && (!t.hasOwnProperty("min") || n >= t.min) && (!t.hasOwnProperty("max") || n <= t.max) && (!t.hasOwnProperty("lt") || n < t.lt) && (!t.hasOwnProperty("gt") || n > t.gt) + } + , + t.locales = void 0; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = r(79), i = Object.keys(s.decimal); + t.locales = i + } + , + 7146: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + , + t.fullWidth = void 0; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; + t.fullWidth = s + } + , + 6648: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + (0, + o.default)(e); + var t = e.replace(/\s+/g, " ").replace(/\s?(hsla?\(|\)|,)\s?/gi, "$1"); + return -1 !== t.indexOf(",") ? s.test(t) : i.test(t) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i, i = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i; + e.exports = t.default, + e.exports.default = t.default + } + , + 2941: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + , + t.halfWidth = void 0; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/; + t.halfWidth = s + } + , + 8874: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + o.default)(e), + new RegExp("^[a-fA-F0-9]{".concat(s[t], "}$")).test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = { + md5: 32, + md4: 32, + sha1: 40, + sha256: 64, + sha384: 96, + sha512: 128, + ripemd128: 32, + ripemd160: 40, + tiger128: 32, + tiger160: 40, + tiger192: 48, + crc32: 8, + crc32b: 8 + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 6298: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i; + e.exports = t.default, + e.exports.default = t.default + } + , + 7117: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^(0x|0h)?[0-9A-F]+$/i; + e.exports = t.default, + e.exports.default = t.default + } + , + 8177: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + return (0, + o.default)(e), + function(e, t) { + var r = e.replace(/[\s\-]+/gi, "").toUpperCase() + , n = r.slice(0, 2).toUpperCase() + , o = n in s; + if (t.whitelist) { + if (t.whitelist.filter((function(e) { + return !(e in s) + } + )).length > 0) + return !1; + if (!t.whitelist.includes(n)) + return !1 + } + return (!t.blacklist || !t.blacklist.includes(n)) && (o && s[n].test(r)) + }(e, t) && function(e) { + var t = e.replace(/[^A-Z0-9]+/gi, "").toUpperCase(); + return 1 === (t.slice(4) + t.slice(0, 4)).replace(/[A-Z]/g, (function(e) { + return e.charCodeAt(0) - 55 + } + )).match(/\d{1,7}/g).reduce((function(e, t) { + return Number(e + t) % 97 + } + ), "") + }(e) + } + , + t.locales = void 0; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = { + AD: /^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/, + AE: /^(AE[0-9]{2})\d{3}\d{16}$/, + AL: /^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/, + AT: /^(AT[0-9]{2})\d{16}$/, + AZ: /^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/, + BA: /^(BA[0-9]{2})\d{16}$/, + BE: /^(BE[0-9]{2})\d{12}$/, + BG: /^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/, + BH: /^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/, + BR: /^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/, + BY: /^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/, + CH: /^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/, + CR: /^(CR[0-9]{2})\d{18}$/, + CY: /^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/, + CZ: /^(CZ[0-9]{2})\d{20}$/, + DE: /^(DE[0-9]{2})\d{18}$/, + DK: /^(DK[0-9]{2})\d{14}$/, + DO: /^(DO[0-9]{2})[A-Z]{4}\d{20}$/, + EE: /^(EE[0-9]{2})\d{16}$/, + EG: /^(EG[0-9]{2})\d{25}$/, + ES: /^(ES[0-9]{2})\d{20}$/, + FI: /^(FI[0-9]{2})\d{14}$/, + FO: /^(FO[0-9]{2})\d{14}$/, + FR: /^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/, + GB: /^(GB[0-9]{2})[A-Z]{4}\d{14}$/, + GE: /^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/, + GI: /^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/, + GL: /^(GL[0-9]{2})\d{14}$/, + GR: /^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/, + GT: /^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/, + HR: /^(HR[0-9]{2})\d{17}$/, + HU: /^(HU[0-9]{2})\d{24}$/, + IE: /^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/, + IL: /^(IL[0-9]{2})\d{19}$/, + IQ: /^(IQ[0-9]{2})[A-Z]{4}\d{15}$/, + IR: /^(IR[0-9]{2})0\d{2}0\d{18}$/, + IS: /^(IS[0-9]{2})\d{22}$/, + IT: /^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/, + JO: /^(JO[0-9]{2})[A-Z]{4}\d{22}$/, + KW: /^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/, + KZ: /^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/, + LB: /^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/, + LC: /^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/, + LI: /^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/, + LT: /^(LT[0-9]{2})\d{16}$/, + LU: /^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/, + LV: /^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/, + MA: /^(MA[0-9]{26})$/, + MC: /^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/, + MD: /^(MD[0-9]{2})[A-Z0-9]{20}$/, + ME: /^(ME[0-9]{2})\d{18}$/, + MK: /^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/, + MR: /^(MR[0-9]{2})\d{23}$/, + MT: /^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/, + MU: /^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/, + MZ: /^(MZ[0-9]{2})\d{21}$/, + NL: /^(NL[0-9]{2})[A-Z]{4}\d{10}$/, + NO: /^(NO[0-9]{2})\d{11}$/, + PK: /^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/, + PL: /^(PL[0-9]{2})\d{24}$/, + PS: /^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/, + PT: /^(PT[0-9]{2})\d{21}$/, + QA: /^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/, + RO: /^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/, + RS: /^(RS[0-9]{2})\d{18}$/, + SA: /^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/, + SC: /^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/, + SE: /^(SE[0-9]{2})\d{20}$/, + SI: /^(SI[0-9]{2})\d{15}$/, + SK: /^(SK[0-9]{2})\d{20}$/, + SM: /^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/, + SV: /^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/, + TL: /^(TL[0-9]{2})\d{19}$/, + TN: /^(TN[0-9]{2})\d{20}$/, + TR: /^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/, + UA: /^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/, + VA: /^(VA[0-9]{2})\d{18}$/, + VG: /^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/, + XK: /^(XK[0-9]{2})\d{16}$/ + }, i = Object.keys(s); + t.locales = i + } + , + 5566: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + (0, + o.default)(e); + var r = s; + if ((t = t || {}).allow_hyphens && (r = i), + !r.test(e)) + return !1; + e = e.replace(/-/g, ""); + for (var n = 0, a = 2, u = 0; u < 14; u++) { + var c = e.substring(14 - u - 1, 14 - u) + , l = parseInt(c, 10) * a; + n += l >= 10 ? l % 10 + 1 : l, + 1 === a ? a += 1 : a -= 1 + } + return (10 - n % 10) % 10 === parseInt(e.substring(14, 15), 10) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^[0-9]{15}$/, i = /^\d{2}-\d{6}-\d{6}-\d{1}$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 1028: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function e(t) { + var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : ""; + return (0, + o.default)(t), + (r = String(r)) ? "4" === r ? a.test(t) : "6" === r && c.test(t) : e(t, 4) || e(t, 6) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = "(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])", i = "(".concat(s, "[.]){3}").concat(s), a = new RegExp("^".concat(i, "$")), u = "(?:[0-9a-fA-F]{1,4})", c = new RegExp("^(" + "(?:".concat(u, ":){7}(?:").concat(u, "|:)|") + "(?:".concat(u, ":){6}(?:").concat(i, "|:").concat(u, "|:)|") + "(?:".concat(u, ":){5}(?::").concat(i, "|(:").concat(u, "){1,2}|:)|") + "(?:".concat(u, ":){4}(?:(:").concat(u, "){0,1}:").concat(i, "|(:").concat(u, "){1,3}|:)|") + "(?:".concat(u, ":){3}(?:(:").concat(u, "){0,2}:").concat(i, "|(:").concat(u, "){1,4}|:)|") + "(?:".concat(u, ":){2}(?:(:").concat(u, "){0,3}:").concat(i, "|(:").concat(u, "){1,5}|:)|") + "(?:".concat(u, ":){1}(?:(:").concat(u, "){0,4}:").concat(i, "|(:").concat(u, "){1,6}|:)|") + "(?::((?::".concat(u, "){0,5}:").concat(i, "|(?::").concat(u, "){1,7}|:))") + ")(%[0-9a-zA-Z-.:]{1,})?$"); + e.exports = t.default, + e.exports.default = t.default + } + , + 7795: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : ""; + (0, + n.default)(e); + var r = e.split("/"); + if (2 !== r.length) + return !1; + if (!i.test(r[1])) + return !1; + if (r[1].length > 1 && r[1].startsWith("0")) + return !1; + if (!(0, + o.default)(r[0], t)) + return !1; + var s = null; + switch (String(t)) { + case "4": + s = a; + break; + case "6": + s = u; + break; + default: + s = (0, + o.default)(r[0], "6") ? u : a + } + return r[1] <= s && r[1] >= 0 + } + ; + var n = s(r(5571)) + , o = s(r(1028)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + var i = /^\d{1,3}$/ + , a = 32 + , u = 128; + e.exports = t.default, + e.exports.default = t.default + } + , + 7612: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function e(t, r) { + (0, + o.default)(t); + var n = String((null == r ? void 0 : r.version) || r); + if (!(null != r && r.version || r)) + return e(t, { + version: 10 + }) || e(t, { + version: 13 + }); + var u = t.replace(/[\s-]+/g, "") + , c = 0; + if ("10" === n) { + if (!s.test(u)) + return !1; + for (var l = 0; l < n - 1; l++) + c += (l + 1) * u.charAt(l); + if ("X" === u.charAt(9) ? c += 100 : c += 10 * u.charAt(9), + c % 11 == 0) + return !0 + } else if ("13" === n) { + if (!i.test(u)) + return !1; + for (var d = 0; d < 12; d++) + c += a[d % 2] * u.charAt(d); + if (u.charAt(12) - (10 - c % 10) % 10 == 0) + return !0 + } + return !1 + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^(?:[0-9]{9}X|[0-9]{10})$/, i = /^(?:[0-9]{13})$/, a = [1, 3]; + e.exports = t.default, + e.exports.default = t.default + } + , + 7148: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + if ((0, + o.default)(e), + !s.test(e)) + return !1; + for (var t = !0, r = 0, n = e.length - 2; n >= 0; n--) + if (e[n] >= "A" && e[n] <= "Z") + for (var i = e[n].charCodeAt(0) - 55, a = 0, u = [i % 10, Math.trunc(i / 10)]; a < u.length; a++) { + var c = u[a]; + r += t ? c >= 5 ? 1 + 2 * (c - 5) : 2 * c : c, + t = !t + } + else { + var l = e[n].charCodeAt(0) - "0".charCodeAt(0); + r += t ? l >= 5 ? 1 + 2 * (l - 5) : 2 * l : l, + t = !t + } + var d = 10 * Math.trunc((r + 9) / 10) - r; + return +e[e.length - 1] === d + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 1727: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.has(e.toUpperCase()) + } + , + t.CountryCodes = void 0; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = new Set(["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "YE", "YT", "ZA", "ZM", "ZW"]), i = s; + t.CountryCodes = i + } + , + 6776: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.has(e.toUpperCase()) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = new Set(["AFG", "ALA", "ALB", "DZA", "ASM", "AND", "AGO", "AIA", "ATA", "ATG", "ARG", "ARM", "ABW", "AUS", "AUT", "AZE", "BHS", "BHR", "BGD", "BRB", "BLR", "BEL", "BLZ", "BEN", "BMU", "BTN", "BOL", "BES", "BIH", "BWA", "BVT", "BRA", "IOT", "BRN", "BGR", "BFA", "BDI", "KHM", "CMR", "CAN", "CPV", "CYM", "CAF", "TCD", "CHL", "CHN", "CXR", "CCK", "COL", "COM", "COG", "COD", "COK", "CRI", "CIV", "HRV", "CUB", "CUW", "CYP", "CZE", "DNK", "DJI", "DMA", "DOM", "ECU", "EGY", "SLV", "GNQ", "ERI", "EST", "ETH", "FLK", "FRO", "FJI", "FIN", "FRA", "GUF", "PYF", "ATF", "GAB", "GMB", "GEO", "DEU", "GHA", "GIB", "GRC", "GRL", "GRD", "GLP", "GUM", "GTM", "GGY", "GIN", "GNB", "GUY", "HTI", "HMD", "VAT", "HND", "HKG", "HUN", "ISL", "IND", "IDN", "IRN", "IRQ", "IRL", "IMN", "ISR", "ITA", "JAM", "JPN", "JEY", "JOR", "KAZ", "KEN", "KIR", "PRK", "KOR", "KWT", "KGZ", "LAO", "LVA", "LBN", "LSO", "LBR", "LBY", "LIE", "LTU", "LUX", "MAC", "MKD", "MDG", "MWI", "MYS", "MDV", "MLI", "MLT", "MHL", "MTQ", "MRT", "MUS", "MYT", "MEX", "FSM", "MDA", "MCO", "MNG", "MNE", "MSR", "MAR", "MOZ", "MMR", "NAM", "NRU", "NPL", "NLD", "NCL", "NZL", "NIC", "NER", "NGA", "NIU", "NFK", "MNP", "NOR", "OMN", "PAK", "PLW", "PSE", "PAN", "PNG", "PRY", "PER", "PHL", "PCN", "POL", "PRT", "PRI", "QAT", "REU", "ROU", "RUS", "RWA", "BLM", "SHN", "KNA", "LCA", "MAF", "SPM", "VCT", "WSM", "SMR", "STP", "SAU", "SEN", "SRB", "SYC", "SLE", "SGP", "SXM", "SVK", "SVN", "SLB", "SOM", "ZAF", "SGS", "SSD", "ESP", "LKA", "SDN", "SUR", "SJM", "SWZ", "SWE", "CHE", "SYR", "TWN", "TJK", "TZA", "THA", "TLS", "TGO", "TKL", "TON", "TTO", "TUN", "TUR", "TKM", "TCA", "TUV", "UGA", "UKR", "ARE", "GBR", "USA", "UMI", "URY", "UZB", "VUT", "VEN", "VNM", "VGB", "VIR", "WLF", "ESH", "YEM", "ZMB", "ZWE"]); + e.exports = t.default, + e.exports.default = t.default + } + , + 9963: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.has(e.toUpperCase()) + } + , + t.CurrencyCodes = void 0; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = new Set(["AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "SSP", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", "VES", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", "YER", "ZAR", "ZMW", "ZWL"]), i = s; + t.CurrencyCodes = i + } + , + 5946: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.isISO6346 = a, + t.isFreightContainerID = void 0; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^[A-Z]{3}(U[0-9]{7})|([J,Z][0-9]{6,7})$/, i = /^[0-9]$/; + function a(e) { + if ((0, + o.default)(e), + e = e.toUpperCase(), + !s.test(e)) + return !1; + if (11 === e.length) { + for (var t = 0, r = 0; r < e.length - 1; r++) + if (i.test(e[r])) + t += e[r] * Math.pow(2, r); + else { + var n = e.charCodeAt(r) - 55; + t += (n < 11 ? n : n >= 11 && n <= 20 ? 12 + n % 11 : n >= 21 && n <= 30 ? 23 + n % 21 : 34 + n % 31) * Math.pow(2, r) + } + var a = t % 11; + return Number(e[e.length - 1]) === a + } + return !0 + } + var u = a; + t.isFreightContainerID = u + } + , + 9211: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.has(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = new Set(["aa", "ab", "ae", "af", "ak", "am", "an", "ar", "as", "av", "ay", "az", "az", "ba", "be", "bg", "bh", "bi", "bm", "bn", "bo", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cu", "cv", "cy", "da", "de", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "gv", "ha", "he", "hi", "ho", "hr", "ht", "hu", "hy", "hz", "ia", "id", "ie", "ig", "ii", "ik", "io", "is", "it", "iu", "ja", "jv", "ka", "kg", "ki", "kj", "kk", "kl", "km", "kn", "ko", "kr", "ks", "ku", "kv", "kw", "ky", "la", "lb", "lg", "li", "ln", "lo", "lt", "lu", "lv", "mg", "mh", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "na", "nb", "nd", "ne", "ng", "nl", "nn", "no", "nr", "nv", "ny", "oc", "oj", "om", "or", "os", "pa", "pi", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sc", "sd", "se", "sg", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ty", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "wo", "xh", "yi", "yo", "za", "zh", "zu"]); + e.exports = t.default, + e.exports.default = t.default + } + , + 4915: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + (0, + o.default)(e); + var r = t.strictSeparator ? i.test(e) : s.test(e); + return r && t.strict ? a(e) : r + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/, i = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/, a = function(e) { + var t = e.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/); + if (t) { + var r = Number(t[1]) + , n = Number(t[2]); + return r % 4 == 0 && r % 100 != 0 || r % 400 == 0 ? n <= 366 : n <= 365 + } + var o = e.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number) + , s = o[1] + , i = o[2] + , a = o[3] + , u = i ? "0".concat(i).slice(-2) : i + , c = a ? "0".concat(a).slice(-2) : a + , l = new Date("".concat(s, "-").concat(u || "01", "-").concat(c || "01")); + return !i || !a || l.getUTCFullYear() === s && l.getUTCMonth() + 1 === i && l.getUTCDate() === a + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 4339: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 9887: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + (0, + o.default)(e); + var r = s; + if (r = t.require_hyphen ? r.replace("?", "") : r, + !(r = t.case_sensitive ? new RegExp(r) : new RegExp(r,"i")).test(e)) + return !1; + for (var n = e.replace("-", "").toUpperCase(), i = 0, a = 0; a < n.length; a++) { + var u = n[a]; + i += ("X" === u ? 10 : +u) * (8 - a) + } + return i % 11 == 0 + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = "^\\d{4}-?\\d{3}[\\dX]$"; + e.exports = t.default, + e.exports.default = t.default + } + , + 9396: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + if ((0, + n.default)(e), + t in i) + return i[t](e); + if ("any" === t) { + for (var r in i) + if (i.hasOwnProperty(r) && (0, + i[r])(e)) + return !0; + return !1 + } + throw new Error("Invalid locale '".concat(t, "'")) + } + ; + var n = s(r(5571)) + , o = s(r(937)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + var i = { + PL: function(e) { + (0, + n.default)(e); + var t = { + 1: 1, + 2: 3, + 3: 7, + 4: 9, + 5: 1, + 6: 3, + 7: 7, + 8: 9, + 9: 1, + 10: 3, + 11: 0 + }; + if (null != e && 11 === e.length && (0, + o.default)(e, { + allow_leading_zeroes: !0 + })) { + var r = e.split("").slice(0, -1).reduce((function(e, r, n) { + return e + Number(r) * t[n + 1] + } + ), 0) % 10 + , s = Number(e.charAt(e.length - 1)); + if (0 === r && 0 === s || s === 10 - r) + return !0 + } + return !1 + }, + ES: function(e) { + (0, + n.default)(e); + var t = { + X: 0, + Y: 1, + Z: 2 + } + , r = e.trim().toUpperCase(); + if (!/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/.test(r)) + return !1; + var o = r.slice(0, -1).replace(/[X,Y,Z]/g, (function(e) { + return t[e] + } + )); + return r.endsWith(["T", "R", "W", "A", "G", "M", "Y", "F", "P", "D", "X", "B", "N", "J", "Z", "S", "Q", "V", "H", "L", "C", "K", "E"][o % 23]) + }, + FI: function(e) { + return (0, + n.default)(e), + 11 === e.length && (!!e.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/) && "0123456789ABCDEFHJKLMNPRSTUVWXY"[(1e3 * parseInt(e.slice(0, 6), 10) + parseInt(e.slice(7, 10), 10)) % 31] === e.slice(10, 11)) + }, + IN: function(e) { + var t = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]] + , r = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]] + , n = e.trim(); + if (!/^[1-9]\d{3}\s?\d{4}\s?\d{4}$/.test(n)) + return !1; + var o = 0; + return n.replace(/\s/g, "").split("").map(Number).reverse().forEach((function(e, n) { + o = t[o][r[n % 8][e]] + } + )), + 0 === o + }, + IR: function(e) { + if (!e.match(/^\d{10}$/)) + return !1; + if (e = "0000".concat(e).slice(e.length - 6), + 0 === parseInt(e.slice(3, 9), 10)) + return !1; + for (var t = parseInt(e.slice(9, 10), 10), r = 0, n = 0; n < 9; n++) + r += parseInt(e.slice(n, n + 1), 10) * (10 - n); + return (r %= 11) < 2 && t === r || r >= 2 && t === 11 - r + }, + IT: function(e) { + return 9 === e.length && "CA00000AA" !== e && e.search(/C[A-Z][0-9]{5}[A-Z]{2}/i) > -1 + }, + NO: function(e) { + var t = e.trim(); + if (isNaN(Number(t))) + return !1; + if (11 !== t.length) + return !1; + if ("00000000000" === t) + return !1; + var r = t.split("").map(Number) + , n = (11 - (3 * r[0] + 7 * r[1] + 6 * r[2] + 1 * r[3] + 8 * r[4] + 9 * r[5] + 4 * r[6] + 5 * r[7] + 2 * r[8]) % 11) % 11 + , o = (11 - (5 * r[0] + 4 * r[1] + 3 * r[2] + 2 * r[3] + 7 * r[4] + 6 * r[5] + 5 * r[6] + 4 * r[7] + 3 * r[8] + 2 * n) % 11) % 11; + return n === r[9] && o === r[10] + }, + TH: function(e) { + if (!e.match(/^[1-8]\d{12}$/)) + return !1; + for (var t = 0, r = 0; r < 12; r++) + t += parseInt(e[r], 10) * (13 - r); + return e[12] === ((11 - t % 11) % 10).toString() + }, + LK: function(e) { + return !(10 !== e.length || !/^[1-9]\d{8}[vx]$/i.test(e)) || !(12 !== e.length || !/^[1-9]\d{11}$/i.test(e)) + }, + "he-IL": function(e) { + var t = e.trim(); + if (!/^\d{9}$/.test(t)) + return !1; + for (var r, n = t, o = 0, s = 0; s < n.length; s++) + o += (r = Number(n[s]) * (s % 2 + 1)) > 9 ? r - 9 : r; + return o % 10 == 0 + }, + "ar-LY": function(e) { + var t = e.trim(); + return !!/^(1|2)\d{11}$/.test(t) + }, + "ar-TN": function(e) { + var t = e.trim(); + return !!/^\d{8}$/.test(t) + }, + "zh-CN": function(e) { + var t, r = ["11", "12", "13", "14", "15", "21", "22", "23", "31", "32", "33", "34", "35", "36", "37", "41", "42", "43", "44", "45", "46", "50", "51", "52", "53", "54", "61", "62", "63", "64", "65", "71", "81", "82", "91"], n = ["7", "9", "10", "5", "8", "4", "2", "1", "6", "3", "7", "9", "10", "5", "8", "4", "2"], o = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"], s = function(e) { + return r.includes(e) + }, i = function(e) { + var t = parseInt(e.substring(0, 4), 10) + , r = parseInt(e.substring(4, 6), 10) + , n = parseInt(e.substring(6), 10) + , o = new Date(t,r - 1,n); + return !(o > new Date) && o.getFullYear() === t && o.getMonth() === r - 1 && o.getDate() === n + }; + return !!/^\d{15}|(\d{17}(\d|x|X))$/.test(t = e) && (15 === t.length ? function(e) { + var t = /^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(e); + if (!t) + return !1; + var r = e.substring(0, 2); + if (!(t = s(r))) + return !1; + var n = "19".concat(e.substring(6, 12)); + return !!(t = i(n)) + }(t) : function(e) { + var t = /^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(e); + if (!t) + return !1; + var r = e.substring(0, 2); + if (!(t = s(r))) + return !1; + var a = e.substring(6, 14); + return !!(t = i(a)) && function(e) { + return function(e) { + for (var t = e.substring(0, 17), r = 0, s = 0; s < 17; s++) + r += parseInt(t.charAt(s), 10) * parseInt(n[s], 10); + return o[r % 11] + }(e) === e.charAt(17).toUpperCase() + }(e) + }(t)) + }, + "zh-HK": function(e) { + var t = /^[0-9]$/; + if (e = (e = e.trim()).toUpperCase(), + !/^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/.test(e)) + return !1; + 8 === (e = e.replace(/\[|\]|\(|\)/g, "")).length && (e = "3".concat(e)); + for (var r = 0, n = 0; n <= 7; n++) + r += (t.test(e[n]) ? e[n] : (e[n].charCodeAt(0) - 55) % 11) * (9 - n); + return (0 == (r %= 11) ? "0" : 1 === r ? "A" : String(11 - r)) === e[e.length - 1] + }, + "zh-TW": function(e) { + var t = { + A: 10, + B: 11, + C: 12, + D: 13, + E: 14, + F: 15, + G: 16, + H: 17, + I: 34, + J: 18, + K: 19, + L: 20, + M: 21, + N: 22, + O: 35, + P: 23, + Q: 24, + R: 25, + S: 26, + T: 27, + U: 28, + V: 29, + W: 32, + X: 30, + Y: 31, + Z: 33 + } + , r = e.trim().toUpperCase(); + return !!/^[A-Z][0-9]{9}$/.test(r) && Array.from(r).reduce((function(e, r, n) { + if (0 === n) { + var o = t[r]; + return o % 10 * 9 + Math.floor(o / 10) + } + return 9 === n ? (10 - e % 10 - Number(r)) % 10 == 0 : e + Number(r) * (9 - n) + } + ), 0) + } + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 7228: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + var r; + if ((0, + n.default)(e), + "[object Array]" === Object.prototype.toString.call(t)) { + var s = []; + for (r in t) + ({}).hasOwnProperty.call(t, r) && (s[r] = (0, + o.default)(t[r])); + return s.indexOf(e) >= 0 + } + return "object" === i(t) ? t.hasOwnProperty(e) : !(!t || "function" != typeof t.indexOf) && t.indexOf(e) >= 0 + } + ; + var n = s(r(5571)) + , o = s(r(1913)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + function i(e) { + return 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 + } + , + i(e) + } + e.exports = t.default, + e.exports.default = t.default + } + , + 937: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + (0, + o.default)(e); + var r = (t = t || {}).hasOwnProperty("allow_leading_zeroes") && !t.allow_leading_zeroes ? s : i + , n = !t.hasOwnProperty("min") || e >= t.min + , a = !t.hasOwnProperty("max") || e <= t.max + , u = !t.hasOwnProperty("lt") || e < t.lt + , c = !t.hasOwnProperty("gt") || e > t.gt; + return r.test(e) && n && a && u && c + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^(?:[-+]?(?:0|[1-9][0-9]*))$/, i = /^[-+]?[0-9]+$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 1008: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + (0, + n.default)(e); + try { + t = (0, + o.default)(t, a); + var r = []; + t.allow_primitives && (r = [null, !1, !0]); + var s = JSON.parse(e); + return r.includes(s) || !!s && "object" === i(s) + } catch (e) {} + return !1 + } + ; + var n = s(r(5571)) + , o = s(r(4808)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + function i(e) { + return 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 + } + , + i(e) + } + var a = { + allow_primitives: !1 + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 4979: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + (0, + n.default)(e); + var t = e.split("."); + return 3 === t.length && t.reduce((function(e, t) { + return e && (0, + o.default)(t, { + urlSafe: !0 + }) + } + ), !0) + } + ; + var n = s(r(5571)) + , o = s(r(2689)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + e.exports = t.default, + e.exports.default = t.default + } + , + 478: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + if ((0, + n.default)(e), + t = (0, + o.default)(t, l), + !e.includes(",")) + return !1; + var r = e.split(","); + return !(r[0].startsWith("(") && !r[1].endsWith(")") || r[1].endsWith(")") && !r[0].startsWith("(")) && (t.checkDMS ? u.test(r[0]) && c.test(r[1]) : i.test(r[0]) && a.test(r[1])) + } + ; + var n = s(r(5571)) + , o = s(r(4808)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + var i = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/ + , a = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/ + , u = /^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i + , c = /^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i + , l = { + checkDMS: !1 + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 4958: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + var r, n; + (0, + o.default)(e), + "object" === s(t) ? (r = t.min || 0, + n = t.max) : (r = arguments[1] || 0, + n = arguments[2]); + var i = e.match(/(\uFE0F|\uFE0E)/g) || [] + , a = e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g) || [] + , u = e.length - i.length - a.length; + return u >= r && (void 0 === n || u <= n) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + function s(e) { + return 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 + } + , + s(e) + } + e.exports = t.default, + e.exports.default = t.default + } + , + 2786: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + if ((0, + o.default)(e), + t in s) + return s[t](e); + if ("any" === t) { + for (var r in s) + if ((0, + s[r])(e)) + return !0; + return !1 + } + throw new Error("Invalid locale '".concat(t, "'")) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = { + "cs-CZ": function(e) { + return /^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(e) + }, + "de-DE": function(e) { + return /^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(e) + }, + "de-LI": function(e) { + return /^FL[- ]?\d{1,5}[UZ]?$/.test(e) + }, + "en-IN": function(e) { + return /^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(e) + }, + "es-AR": function(e) { + return /^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(e) + }, + "fi-FI": function(e) { + return /^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(e) + }, + "hu-HU": function(e) { + return /^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(e) + }, + "pt-BR": function(e) { + return /^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(e) + }, + "pt-PT": function(e) { + return /^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(e) + }, + "sq-AL": function(e) { + return /^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(e) + }, + "sv-SE": function(e) { + return /^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(e.trim()) + } + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 7380: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + d.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = "(([a-zA-Z]{2,3}(-".concat("([A-Za-z]{3}(-[A-Za-z]{3}){0,2})", ")?)|([a-zA-Z]{5,8}))"), i = "(".concat("(\\d|[A-W]|[Y-Z]|[a-w]|[y-z])", "(-[A-Za-z0-9]{2,8})+)"), a = "(x(-[A-Za-z0-9]{1,8})+)", u = "(".concat("((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))", "|").concat("((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))", ")"), c = "(-|_)", l = "".concat(s, "(").concat(c).concat("([A-Za-z]{4})", ")?(").concat(c).concat("([A-Za-z]{2}|\\d{3})", ")?(").concat(c).concat("([A-Za-z0-9]{5,8}|(\\d[A-Z-a-z0-9]{3}))", ")*(").concat(c).concat(i, ")*(").concat(c).concat(a, ")?"), d = new RegExp("(^".concat(a, "$)|(^").concat(u, "$)|(^").concat(l, "$)")); + e.exports = t.default, + e.exports.default = t.default + } + , + 3928: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + e === e.toLowerCase() + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 1592: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + (0, + o.default)(e); + for (var t, r, n, s = e.replace(/[- ]+/g, ""), i = 0, a = s.length - 1; a >= 0; a--) + t = s.substring(a, a + 1), + r = parseInt(t, 10), + i += n && (r *= 2) >= 10 ? r % 10 + 1 : r, + n = !n; + return !(i % 10 != 0 || !s) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 8999: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function e(t, r) { + return (0, + o.default)(t), + null != r && r.eui && (r.eui = String(r.eui)), + null != r && r.no_colons || null != r && r.no_separators ? "48" === r.eui ? i.test(t) : "64" === r.eui ? c.test(t) : i.test(t) || c.test(t) : "48" === (null == r ? void 0 : r.eui) ? s.test(t) || a.test(t) : "64" === (null == r ? void 0 : r.eui) ? u.test(t) || l.test(t) : e(t, { + eui: "48" + }) || e(t, { + eui: "64" + }) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/, i = /^([0-9a-fA-F]){12}$/, a = /^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/, u = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/, c = /^([0-9a-fA-F]){16}$/, l = /^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 368: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^[a-f0-9]{32}$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 2776: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + 0 === e.indexOf("magnet:?") && s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i; + e.exports = t.default, + e.exports.default = t.default + } + , + 2966: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + if ((0, + s.default)(e), + 0 !== e.indexOf("mailto:")) + return !1; + var r = a(e.replace("mailto:", "").split("?"), 2) + , i = r[0] + , c = void 0 === i ? "" : i + , l = r[1] + , d = void 0 === l ? "" : l; + if (!c && !d) + return !0; + var h = function(e) { + var t = new Set(["subject", "body", "cc", "bcc"]) + , r = { + cc: "", + bcc: "" + } + , n = !1 + , o = e.split("&"); + if (o.length > 4) + return !1; + var s, i = function(e, t) { + var r; + if ("undefined" == typeof Symbol || null == e[Symbol.iterator]) { + if (Array.isArray(e) || (r = u(e))) { + r && (e = r); + var n = 0 + , o = function() {}; + return { + s: o, + n: function() { + return n >= e.length ? { + done: !0 + } : { + done: !1, + value: e[n++] + } + }, + e: function(e) { + throw e + }, + f: o + } + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + } + var s, i = !0, a = !1; + return { + s: function() { + r = e[Symbol.iterator]() + }, + n: function() { + var e = r.next(); + return i = e.done, + e + }, + e: function(e) { + a = !0, + s = e + }, + f: function() { + try { + i || null == r.return || r.return() + } finally { + if (a) + throw s + } + } + } + }(o); + try { + for (i.s(); !(s = i.n()).done; ) { + var c = a(s.value.split("="), 2) + , l = c[0] + , d = c[1]; + if (l && !t.has(l)) { + n = !0; + break + } + !d || "cc" !== l && "bcc" !== l || (r[l] = d), + l && t.delete(l) + } + } catch (e) { + i.e(e) + } finally { + i.f() + } + return !n && r + }(d); + return !!h && "".concat(c, ",").concat(h.cc, ",").concat(h.bcc).split(",").every((function(e) { + return !(e = (0, + n.default)(e, " ")) || (0, + o.default)(e, t) + } + )) + } + ; + var n = i(r(4790)) + , o = i(r(3868)) + , s = i(r(5571)); + function i(e) { + return e && e.__esModule ? e : { + default: e + } + } + function a(e, t) { + return function(e) { + if (Array.isArray(e)) + return e + }(e) || function(e, t) { + if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) { + var r = [] + , n = !0 + , o = !1 + , s = void 0; + try { + for (var i, a = e[Symbol.iterator](); !(n = (i = a.next()).done) && (r.push(i.value), + !t || r.length !== t); n = !0) + ; + } catch (e) { + o = !0, + s = e + } finally { + try { + n || null == a.return || a.return() + } finally { + if (o) + throw s + } + } + return r + } + }(e, t) || u(e, t) || function() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + }() + } + function u(e, t) { + if (e) { + if ("string" == typeof e) + return c(e, t); + var r = Object.prototype.toString.call(e).slice(8, -1); + return "Object" === r && e.constructor && (r = e.constructor.name), + "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? c(e, t) : void 0 + } + } + function c(e, t) { + (null == t || t > e.length) && (t = e.length); + for (var r = 0, n = new Array(t); r < t; r++) + n[r] = e[r]; + return n + } + e.exports = t.default, + e.exports.default = t.default + } + , + 4554: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) || i.test(e) || a.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i, i = /^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i, a = /^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i; + e.exports = t.default, + e.exports.default = t.default + } + , + 8355: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t, r) { + if ((0, + o.default)(e), + r && r.strictMode && !e.startsWith("+")) + return !1; + if (Array.isArray(t)) + return t.some((function(t) { + return !(!s.hasOwnProperty(t) || !s[t].test(e)) + } + )); + if (t in s) + return s[t].test(e); + if (!t || "any" === t) { + for (var n in s) + if (s.hasOwnProperty(n) && s[n].test(e)) + return !0; + return !1 + } + throw new Error("Invalid locale '".concat(t, "'")) + } + , + t.locales = void 0; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = { + "am-AM": /^(\+?374|0)((10|[9|7][0-9])\d{6}$|[2-4]\d{7}$)/, + "ar-AE": /^((\+?971)|0)?5[024568]\d{7}$/, + "ar-BH": /^(\+?973)?(3|6)\d{7}$/, + "ar-DZ": /^(\+?213|0)(5|6|7)\d{8}$/, + "ar-LB": /^(\+?961)?((3|81)\d{6}|7\d{7})$/, + "ar-EG": /^((\+?20)|0)?1[0125]\d{8}$/, + "ar-IQ": /^(\+?964|0)?7[0-9]\d{8}$/, + "ar-JO": /^(\+?962|0)?7[789]\d{7}$/, + "ar-KW": /^(\+?965)([569]\d{7}|41\d{6})$/, + "ar-LY": /^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/, + "ar-MA": /^(?:(?:\+|00)212|0)[5-7]\d{8}$/, + "ar-OM": /^((\+|00)968)?(9[1-9])\d{6}$/, + "ar-PS": /^(\+?970|0)5[6|9](\d{7})$/, + "ar-SA": /^(!?(\+?966)|0)?5\d{8}$/, + "ar-SD": /^((\+?249)|0)?(9[012369]|1[012])\d{7}$/, + "ar-SY": /^(!?(\+?963)|0)?9\d{8}$/, + "ar-TN": /^(\+?216)?[2459]\d{7}$/, + "az-AZ": /^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/, + "bs-BA": /^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/, + "be-BY": /^(\+?375)?(24|25|29|33|44)\d{7}$/, + "bg-BG": /^(\+?359|0)?8[789]\d{7}$/, + "bn-BD": /^(\+?880|0)1[13456789][0-9]{8}$/, + "ca-AD": /^(\+376)?[346]\d{5}$/, + "cs-CZ": /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + "da-DK": /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/, + "de-DE": /^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/, + "de-AT": /^(\+43|0)\d{1,4}\d{3,12}$/, + "de-CH": /^(\+41|0)([1-9])\d{1,9}$/, + "de-LU": /^(\+352)?((6\d1)\d{6})$/, + "dv-MV": /^(\+?960)?(7[2-9]|9[1-9])\d{5}$/, + "el-GR": /^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/, + "el-CY": /^(\+?357?)?(9(9|6)\d{6})$/, + "en-AI": /^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/, + "en-AU": /^(\+?61|0)4\d{8}$/, + "en-AG": /^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/, + "en-BM": /^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/, + "en-BS": /^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/, + "en-GB": /^(\+?44|0)7\d{9}$/, + "en-GG": /^(\+?44|0)1481\d{6}$/, + "en-GH": /^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/, + "en-GY": /^(\+592|0)6\d{6}$/, + "en-HK": /^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/, + "en-MO": /^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/, + "en-IE": /^(\+?353|0)8[356789]\d{7}$/, + "en-IN": /^(\+?91|0)?[6789]\d{9}$/, + "en-JM": /^(\+?876)?\d{7}$/, + "en-KE": /^(\+?254|0)(7|1)\d{8}$/, + "fr-CF": /^(\+?236| ?)(70|75|77|72|21|22)\d{6}$/, + "en-SS": /^(\+?211|0)(9[1257])\d{7}$/, + "en-KI": /^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/, + "en-KN": /^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/, + "en-LS": /^(\+?266)(22|28|57|58|59|27|52)\d{6}$/, + "en-MT": /^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/, + "en-MU": /^(\+?230|0)?\d{8}$/, + "en-NA": /^(\+?264|0)(6|8)\d{7}$/, + "en-NG": /^(\+?234|0)?[789]\d{9}$/, + "en-NZ": /^(\+?64|0)[28]\d{7,9}$/, + "en-PG": /^(\+?675|0)?(7\d|8[18])\d{6}$/, + "en-PK": /^((00|\+)?92|0)3[0-6]\d{8}$/, + "en-PH": /^(09|\+639)\d{9}$/, + "en-RW": /^(\+?250|0)?[7]\d{8}$/, + "en-SG": /^(\+65)?[3689]\d{7}$/, + "en-SL": /^(\+?232|0)\d{8}$/, + "en-TZ": /^(\+?255|0)?[67]\d{8}$/, + "en-UG": /^(\+?256|0)?[7]\d{8}$/, + "en-US": /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/, + "en-ZA": /^(\+?27|0)\d{9}$/, + "en-ZM": /^(\+?26)?09[567]\d{7}$/, + "en-ZW": /^(\+263)[0-9]{9}$/, + "en-BW": /^(\+?267)?(7[1-8]{1})\d{6}$/, + "es-AR": /^\+?549(11|[2368]\d)\d{8}$/, + "es-BO": /^(\+?591)?(6|7)\d{7}$/, + "es-CO": /^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/, + "es-CL": /^(\+?56|0)[2-9]\d{1}\d{7}$/, + "es-CR": /^(\+506)?[2-8]\d{7}$/, + "es-CU": /^(\+53|0053)?5\d{7}$/, + "es-DO": /^(\+?1)?8[024]9\d{7}$/, + "es-HN": /^(\+?504)?[9|8|3|2]\d{7}$/, + "es-EC": /^(\+?593|0)([2-7]|9[2-9])\d{7}$/, + "es-ES": /^(\+?34)?[6|7]\d{8}$/, + "es-PE": /^(\+?51)?9\d{8}$/, + "es-MX": /^(\+?52)?(1|01)?\d{10,11}$/, + "es-NI": /^(\+?505)\d{7,8}$/, + "es-PA": /^(\+?507)\d{7,8}$/, + "es-PY": /^(\+?595|0)9[9876]\d{7}$/, + "es-SV": /^(\+?503)?[67]\d{7}$/, + "es-UY": /^(\+598|0)9[1-9][\d]{6}$/, + "es-VE": /^(\+?58)?(2|4)\d{9}$/, + "et-EE": /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/, + "fa-IR": /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/, + "fi-FI": /^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/, + "fj-FJ": /^(\+?679)?\s?\d{3}\s?\d{4}$/, + "fo-FO": /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + "fr-BF": /^(\+226|0)[67]\d{7}$/, + "fr-BJ": /^(\+229)\d{8}$/, + "fr-CD": /^(\+?243|0)?(8|9)\d{8}$/, + "fr-CM": /^(\+?237)6[0-9]{8}$/, + "fr-FR": /^(\+?33|0)[67]\d{8}$/, + "fr-GF": /^(\+?594|0|00594)[67]\d{8}$/, + "fr-GP": /^(\+?590|0|00590)[67]\d{8}$/, + "fr-MQ": /^(\+?596|0|00596)[67]\d{8}$/, + "fr-PF": /^(\+?689)?8[789]\d{6}$/, + "fr-RE": /^(\+?262|0|00262)[67]\d{8}$/, + "fr-WF": /^(\+681)?\d{6}$/, + "he-IL": /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/, + "hu-HU": /^(\+?36|06)(20|30|31|50|70)\d{7}$/, + "id-ID": /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/, + "ir-IR": /^(\+98|0)?9\d{9}$/, + "it-IT": /^(\+?39)?\s?3\d{2} ?\d{6,7}$/, + "it-SM": /^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/, + "ja-JP": /^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/, + "ka-GE": /^(\+?995)?(79\d{7}|5\d{8})$/, + "kk-KZ": /^(\+?7|8)?7\d{9}$/, + "kl-GL": /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/, + "ko-KR": /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/, + "ky-KG": /^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/, + "lt-LT": /^(\+370|8)\d{8}$/, + "lv-LV": /^(\+?371)2\d{7}$/, + "mg-MG": /^((\+?261|0)(2|3)\d)?\d{7}$/, + "mn-MN": /^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/, + "my-MM": /^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/, + "ms-MY": /^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/, + "mz-MZ": /^(\+?258)?8[234567]\d{7}$/, + "nb-NO": /^(\+?47)?[49]\d{7}$/, + "ne-NP": /^(\+?977)?9[78]\d{8}$/, + "nl-BE": /^(\+?32|0)4\d{8}$/, + "nl-NL": /^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/, + "nl-AW": /^(\+)?297(56|59|64|73|74|99)\d{5}$/, + "nn-NO": /^(\+?47)?[49]\d{7}$/, + "pl-PL": /^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/, + "pt-BR": /^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/, + "pt-PT": /^(\+?351)?9[1236]\d{7}$/, + "pt-AO": /^(\+244)\d{9}$/, + "ro-MD": /^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/, + "ro-RO": /^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/, + "ru-RU": /^(\+?7|8)?9\d{9}$/, + "si-LK": /^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/, + "sl-SI": /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/, + "sk-SK": /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/, + "so-SO": /^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/, + "sq-AL": /^(\+355|0)6[789]\d{6}$/, + "sr-RS": /^(\+3816|06)[- \d]{5,9}$/, + "sv-SE": /^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/, + "tg-TJ": /^(\+?992)?[5][5]\d{7}$/, + "th-TH": /^(\+66|66|0)\d{9}$/, + "tr-TR": /^(\+?90|0)?5\d{9}$/, + "tk-TM": /^(\+993|993|8)\d{8}$/, + "uk-UA": /^(\+?38|8)?0\d{9}$/, + "uz-UZ": /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/, + "vi-VN": /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/, + "zh-CN": /^((\+|00)86)?(1[3-9]|9[28])\d{9}$/, + "zh-TW": /^(\+?886\-?|0)?9\d{8}$/, + "dz-BT": /^(\+?975|0)?(17|16|77|02)\d{6}$/, + "ar-YE": /^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/, + "ar-EH": /^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/, + "fa-AF": /^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/ + }; + s["en-CA"] = s["en-US"], + s["fr-CA"] = s["en-CA"], + s["fr-BE"] = s["nl-BE"], + s["zh-HK"] = s["en-HK"], + s["zh-MO"] = s["en-MO"], + s["ga-IE"] = s["en-IE"], + s["fr-CH"] = s["de-CH"], + s["it-CH"] = s["fr-CH"]; + var i = Object.keys(s); + t.locales = i + } + , + 9131: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + n.default)(e), + (0, + o.default)(e) && 24 === e.length + } + ; + var n = s(r(5571)) + , o = s(r(7117)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + e.exports = t.default, + e.exports.default = t.default + } + , + 3590: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /[^\x00-\x7F]/; + e.exports = t.default, + e.exports.default = t.default + } + , + 4986: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + o.default)(e), + t && t.no_symbols ? i.test(e) : new RegExp("^[+-]?([0-9]*[".concat((t || {}).locale ? s.decimal[t.locale] : ".", "])?[0-9]+$")).test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = r(79), i = /^[0-9]+$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 6090: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^(0o)?[0-7]+$/i; + e.exports = t.default, + e.exports.default = t.default + } + , + 1513: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + (0, + o.default)(e); + var r = e.replace(/\s/g, "").toUpperCase(); + return t.toUpperCase()in s && s[t].test(r) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = { + AM: /^[A-Z]{2}\d{7}$/, + AR: /^[A-Z]{3}\d{6}$/, + AT: /^[A-Z]\d{7}$/, + AU: /^[A-Z]\d{7}$/, + AZ: /^[A-Z]{2,3}\d{7,8}$/, + BE: /^[A-Z]{2}\d{6}$/, + BG: /^\d{9}$/, + BR: /^[A-Z]{2}\d{6}$/, + BY: /^[A-Z]{2}\d{7}$/, + CA: /^[A-Z]{2}\d{6}$/, + CH: /^[A-Z]\d{7}$/, + CN: /^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/, + CY: /^[A-Z](\d{6}|\d{8})$/, + CZ: /^\d{8}$/, + DE: /^[CFGHJKLMNPRTVWXYZ0-9]{9}$/, + DK: /^\d{9}$/, + DZ: /^\d{9}$/, + EE: /^([A-Z]\d{7}|[A-Z]{2}\d{7})$/, + ES: /^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/, + FI: /^[A-Z]{2}\d{7}$/, + FR: /^\d{2}[A-Z]{2}\d{5}$/, + GB: /^\d{9}$/, + GR: /^[A-Z]{2}\d{7}$/, + HR: /^\d{9}$/, + HU: /^[A-Z]{2}(\d{6}|\d{7})$/, + IE: /^[A-Z0-9]{2}\d{7}$/, + IN: /^[A-Z]{1}-?\d{7}$/, + ID: /^[A-C]\d{7}$/, + IR: /^[A-Z]\d{8}$/, + IS: /^(A)\d{7}$/, + IT: /^[A-Z0-9]{2}\d{7}$/, + JM: /^[Aa]\d{7}$/, + JP: /^[A-Z]{2}\d{7}$/, + KR: /^[MS]\d{8}$/, + KZ: /^[a-zA-Z]\d{7}$/, + LI: /^[a-zA-Z]\d{5}$/, + LT: /^[A-Z0-9]{8}$/, + LU: /^[A-Z0-9]{8}$/, + LV: /^[A-Z0-9]{2}\d{7}$/, + LY: /^[A-Z0-9]{8}$/, + MT: /^\d{7}$/, + MZ: /^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/, + MY: /^[AHK]\d{8}$/, + MX: /^\d{10,11}$/, + NL: /^[A-Z]{2}[A-Z0-9]{6}\d$/, + NZ: /^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/, + PH: /^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/, + PK: /^[A-Z]{2}\d{7}$/, + PL: /^[A-Z]{2}\d{7}$/, + PT: /^[A-Z]\d{6}$/, + RO: /^\d{8,9}$/, + RU: /^\d{9}$/, + SE: /^\d{8}$/, + SL: /^(P)[A-Z]\d{7}$/, + SK: /^[0-9A-Z]\d{7}$/, + TH: /^[A-Z]{1,2}\d{6,7}$/, + TR: /^[A-Z]\d{8}$/, + UA: /^[A-Z]{2}\d{6}$/, + US: /^\d{9}$/ + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 4595: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e, { + min: 0, + max: 65535 + }) + } + ; + var n, o = (n = r(937)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 8140: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + if ((0, + o.default)(e), + t in c) + return c[t].test(e); + if ("any" === t) { + for (var r in c) + if (c.hasOwnProperty(r) && c[r].test(e)) + return !0; + return !1 + } + throw new Error("Invalid locale '".concat(t, "'")) + } + , + t.locales = void 0; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^\d{3}$/, i = /^\d{4}$/, a = /^\d{5}$/, u = /^\d{6}$/, c = { + AD: /^AD\d{3}$/, + AT: i, + AU: i, + AZ: /^AZ\d{4}$/, + BA: /^([7-8]\d{4}$)/, + BE: i, + BG: i, + BR: /^\d{5}-\d{3}$/, + BY: /^2[1-4]\d{4}$/, + CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i, + CH: i, + CN: /^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/, + CZ: /^\d{3}\s?\d{2}$/, + DE: a, + DK: i, + DO: a, + DZ: a, + EE: a, + ES: /^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/, + FI: a, + FR: /^\d{2}\s?\d{3}$/, + GB: /^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i, + GR: /^\d{3}\s?\d{2}$/, + HR: /^([1-5]\d{4}$)/, + HT: /^HT\d{4}$/, + HU: i, + ID: a, + IE: /^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i, + IL: /^(\d{5}|\d{7})$/, + IN: /^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/, + IR: /^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/, + IS: s, + IT: a, + JP: /^\d{3}\-\d{4}$/, + KE: a, + KR: /^(\d{5}|\d{6})$/, + LI: /^(948[5-9]|949[0-7])$/, + LT: /^LT\-\d{5}$/, + LU: i, + LV: /^LV\-\d{4}$/, + LK: a, + MG: s, + MX: a, + MT: /^[A-Za-z]{3}\s{0,1}\d{4}$/, + MY: a, + NL: /^\d{4}\s?[a-z]{2}$/i, + NO: i, + NP: /^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i, + NZ: i, + PL: /^\d{2}\-\d{3}$/, + PR: /^00[679]\d{2}([ -]\d{4})?$/, + PT: /^\d{4}\-\d{3}?$/, + RO: u, + RU: u, + SA: a, + SE: /^[1-9]\d{2}\s?\d{2}$/, + SG: u, + SI: i, + SK: /^\d{3}\s?\d{2}$/, + TH: a, + TN: i, + TW: /^\d{3}(\d{2})?$/, + UA: a, + US: /^\d{5}(-\d{4})?$/, + ZA: i, + ZM: a + }, l = Object.keys(c); + t.locales = l + } + , + 4611: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + h.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /([01][0-9]|2[0-3])/, i = /[0-5][0-9]/, a = new RegExp("[-+]".concat(s.source, ":").concat(i.source)), u = new RegExp("([zZ]|".concat(a.source, ")")), c = new RegExp("".concat(s.source, ":").concat(i.source, ":").concat(/([0-5][0-9]|60)/.source).concat(/(\.[0-9]+)?/.source)), l = new RegExp("".concat(/[0-9]{4}/.source, "-").concat(/(0[1-9]|1[0-2])/.source, "-").concat(/([12]\d|0[1-9]|3[01])/.source)), d = new RegExp("".concat(c.source).concat(u.source)), h = new RegExp("^".concat(l.source, "[ tT]").concat(d.source, "$")); + e.exports = t.default, + e.exports.default = t.default + } + , + 6454: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; + return (0, + o.default)(e), + t ? s.test(e) || i.test(e) || a.test(e) || u.test(e) : s.test(e) || i.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/, i = /^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/, a = /^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/, u = /^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 6826: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + n.default)(e), + s.test(e) + } + ; + var n = o(r(5571)); + function o(e) { + return e && e.__esModule ? e : { + default: e + } + } + var s = (0, + o(r(4731)).default)(["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)", "(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))", "?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"], "i"); + e.exports = t.default, + e.exports.default = t.default + } + , + 8220: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/; + e.exports = t.default, + e.exports.default = t.default + } + , + 7633: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : null; + (0, + o.default)(e); + var r = function(e) { + var t = function(e) { + var t = {}; + return Array.from(e).forEach((function(e) { + t[e] ? t[e] += 1 : t[e] = 1 + } + )), + t + }(e) + , r = { + length: e.length, + uniqueChars: Object.keys(t).length, + uppercaseCount: 0, + lowercaseCount: 0, + numberCount: 0, + symbolCount: 0 + }; + return Object.keys(t).forEach((function(e) { + i.test(e) ? r.uppercaseCount += t[e] : a.test(e) ? r.lowercaseCount += t[e] : u.test(e) ? r.numberCount += t[e] : c.test(e) && (r.symbolCount += t[e]) + } + )), + r + }(e); + return (t = (0, + n.default)(t || {}, l)).returnScore ? function(e, t) { + var r = 0; + return r += e.uniqueChars * t.pointsPerUnique, + r += (e.length - e.uniqueChars) * t.pointsPerRepeat, + e.lowercaseCount > 0 && (r += t.pointsForContainingLower), + e.uppercaseCount > 0 && (r += t.pointsForContainingUpper), + e.numberCount > 0 && (r += t.pointsForContainingNumber), + e.symbolCount > 0 && (r += t.pointsForContainingSymbol), + r + }(r, t) : r.length >= t.minLength && r.lowercaseCount >= t.minLowercase && r.uppercaseCount >= t.minUppercase && r.numberCount >= t.minNumbers && r.symbolCount >= t.minSymbols + } + ; + var n = s(r(4808)) + , o = s(r(5571)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + var i = /^[A-Z]$/ + , a = /^[a-z]$/ + , u = /^[0-9]$/ + , c = /^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/ ]$/ + , l = { + minLength: 8, + minLowercase: 1, + minUppercase: 1, + minNumbers: 1, + minSymbols: 1, + returnScore: !1, + pointsPerUnique: 1, + pointsPerRepeat: .5, + pointsForContainingLower: 10, + pointsForContainingUpper: 10, + pointsForContainingNumber: 10, + pointsForContainingSymbol: 10 + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 2828: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = /[\uD800-\uDBFF][\uDC00-\uDFFF]/; + e.exports = t.default, + e.exports.default = t.default + } + , + 3058: (e,t,r)=>{ + "use strict"; + function n(e) { + return n = "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 + } + , + n(e) + } + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "en-US"; + (0, + o.default)(e); + var r = e.slice(0); + if (t in h) + return t in g && (r = r.replace(g[t], "")), + !!h[t].test(r) && (!(t in p) || p[t](r)); + throw new Error("Invalid locale '".concat(t, "'")) + } + ; + var o = u(r(5571)) + , s = function(e) { + if (e && e.__esModule) + return e; + if (null === e || "object" !== n(e) && "function" != typeof e) + return { + default: e + }; + var t = a(); + if (t && t.has(e)) + return t.get(e); + var r = {} + , o = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var s in e) + if (Object.prototype.hasOwnProperty.call(e, s)) { + var i = o ? Object.getOwnPropertyDescriptor(e, s) : null; + i && (i.get || i.set) ? Object.defineProperty(r, s, i) : r[s] = e[s] + } + return r.default = e, + t && t.set(e, r), + r + }(r(3672)) + , i = u(r(2549)); + function a() { + if ("function" != typeof WeakMap) + return null; + var e = new WeakMap; + return a = function() { + return e + } + , + e + } + function u(e) { + return e && e.__esModule ? e : { + default: e + } + } + function c(e, t) { + (null == t || t > e.length) && (t = e.length); + for (var r = 0, n = new Array(t); r < t; r++) + n[r] = e[r]; + return n + } + var l = { + andover: ["10", "12"], + atlanta: ["60", "67"], + austin: ["50", "53"], + brookhaven: ["01", "02", "03", "04", "05", "06", "11", "13", "14", "16", "21", "22", "23", "25", "34", "51", "52", "54", "55", "56", "57", "58", "59", "65"], + cincinnati: ["30", "32", "35", "36", "37", "38", "61"], + fresno: ["15", "24"], + internet: ["20", "26", "27", "45", "46", "47"], + kansas: ["40", "44"], + memphis: ["94", "95"], + ogden: ["80", "90"], + philadelphia: ["33", "39", "41", "42", "43", "46", "48", "62", "63", "64", "66", "68", "71", "72", "73", "74", "75", "76", "77", "81", "82", "83", "84", "85", "86", "87", "88", "91", "92", "93", "98", "99"], + sba: ["31"] + }; + function d(e) { + for (var t = !1, r = !1, n = 0; n < 3; n++) + if (!t && /[AEIOU]/.test(e[n])) + t = !0; + else if (!r && t && "X" === e[n]) + r = !0; + else if (n > 0) { + if (t && !r && !/[AEIOU]/.test(e[n])) + return !1; + if (r && !/X/.test(e[n])) + return !1 + } + return !0 + } + var h = { + "bg-BG": /^\d{10}$/, + "cs-CZ": /^\d{6}\/{0,1}\d{3,4}$/, + "de-AT": /^\d{9}$/, + "de-DE": /^[1-9]\d{10}$/, + "dk-DK": /^\d{6}-{0,1}\d{4}$/, + "el-CY": /^[09]\d{7}[A-Z]$/, + "el-GR": /^([0-4]|[7-9])\d{8}$/, + "en-CA": /^\d{9}$/, + "en-GB": /^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i, + "en-IE": /^\d{7}[A-W][A-IW]{0,1}$/i, + "en-US": /^\d{2}[- ]{0,1}\d{7}$/, + "es-ES": /^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i, + "et-EE": /^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/, + "fi-FI": /^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i, + "fr-BE": /^\d{11}$/, + "fr-FR": /^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/, + "fr-LU": /^\d{13}$/, + "hr-HR": /^\d{11}$/, + "hu-HU": /^8\d{9}$/, + "it-IT": /^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i, + "lv-LV": /^\d{6}-{0,1}\d{5}$/, + "mt-MT": /^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i, + "nl-NL": /^\d{9}$/, + "pl-PL": /^\d{10,11}$/, + "pt-BR": /(?:^\d{11}$)|(?:^\d{14}$)/, + "pt-PT": /^\d{9}$/, + "ro-RO": /^\d{13}$/, + "sk-SK": /^\d{6}\/{0,1}\d{3,4}$/, + "sl-SI": /^[1-9]\d{7}$/, + "sv-SE": /^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/ + }; + h["lb-LU"] = h["fr-LU"], + h["lt-LT"] = h["et-EE"], + h["nl-BE"] = h["fr-BE"], + h["fr-CA"] = h["en-CA"]; + var p = { + "bg-BG": function(e) { + var t = e.slice(0, 2) + , r = parseInt(e.slice(2, 4), 10); + r > 40 ? (r -= 40, + t = "20".concat(t)) : r > 20 ? (r -= 20, + t = "18".concat(t)) : t = "19".concat(t), + r < 10 && (r = "0".concat(r)); + var n = "".concat(t, "/").concat(r, "/").concat(e.slice(4, 6)); + if (!(0, + i.default)(n, "YYYY/MM/DD")) + return !1; + for (var o = e.split("").map((function(e) { + return parseInt(e, 10) + } + )), s = [2, 4, 8, 5, 10, 9, 7, 3, 6], a = 0, u = 0; u < s.length; u++) + a += o[u] * s[u]; + return (a = a % 11 == 10 ? 0 : a % 11) === o[9] + }, + "cs-CZ": function(e) { + e = e.replace(/\W/, ""); + var t = parseInt(e.slice(0, 2), 10); + if (10 === e.length) + t = t < 54 ? "20".concat(t) : "19".concat(t); + else { + if ("000" === e.slice(6)) + return !1; + if (!(t < 54)) + return !1; + t = "19".concat(t) + } + 3 === t.length && (t = [t.slice(0, 2), "0", t.slice(2)].join("")); + var r = parseInt(e.slice(2, 4), 10); + if (r > 50 && (r -= 50), + r > 20) { + if (parseInt(t, 10) < 2004) + return !1; + r -= 20 + } + r < 10 && (r = "0".concat(r)); + var n = "".concat(t, "/").concat(r, "/").concat(e.slice(4, 6)); + if (!(0, + i.default)(n, "YYYY/MM/DD")) + return !1; + if (10 === e.length && parseInt(e, 10) % 11 != 0) { + var o = parseInt(e.slice(0, 9), 10) % 11; + if (!(parseInt(t, 10) < 1986 && 10 === o)) + return !1; + if (0 !== parseInt(e.slice(9), 10)) + return !1 + } + return !0 + }, + "de-AT": function(e) { + return s.luhnCheck(e) + }, + "de-DE": function(e) { + for (var t = e.split("").map((function(e) { + return parseInt(e, 10) + } + )), r = [], n = 0; n < t.length - 1; n++) { + r.push(""); + for (var o = 0; o < t.length - 1; o++) + t[n] === t[o] && (r[n] += o) + } + if (2 !== (r = r.filter((function(e) { + return e.length > 1 + } + ))).length && 3 !== r.length) + return !1; + if (3 === r[0].length) { + for (var i = r[0].split("").map((function(e) { + return parseInt(e, 10) + } + )), a = 0, u = 0; u < i.length - 1; u++) + i[u] + 1 === i[u + 1] && (a += 1); + if (2 === a) + return !1 + } + return s.iso7064Check(e) + }, + "dk-DK": function(e) { + e = e.replace(/\W/, ""); + var t = parseInt(e.slice(4, 6), 10); + switch (e.slice(6, 7)) { + case "0": + case "1": + case "2": + case "3": + t = "19".concat(t); + break; + case "4": + case "9": + t = t < 37 ? "20".concat(t) : "19".concat(t); + break; + default: + if (t < 37) + t = "20".concat(t); + else { + if (!(t > 58)) + return !1; + t = "18".concat(t) + } + } + 3 === t.length && (t = [t.slice(0, 2), "0", t.slice(2)].join("")); + var r = "".concat(t, "/").concat(e.slice(2, 4), "/").concat(e.slice(0, 2)); + if (!(0, + i.default)(r, "YYYY/MM/DD")) + return !1; + for (var n = e.split("").map((function(e) { + return parseInt(e, 10) + } + )), o = 0, s = 4, a = 0; a < 9; a++) + o += n[a] * s, + 1 == (s -= 1) && (s = 7); + return 1 != (o %= 11) && (0 === o ? 0 === n[9] : n[9] === 11 - o) + }, + "el-CY": function(e) { + for (var t = e.slice(0, 8).split("").map((function(e) { + return parseInt(e, 10) + } + )), r = 0, n = 1; n < t.length; n += 2) + r += t[n]; + for (var o = 0; o < t.length; o += 2) + t[o] < 2 ? r += 1 - t[o] : (r += 2 * (t[o] - 2) + 5, + t[o] > 4 && (r += 2)); + return String.fromCharCode(r % 26 + 65) === e.charAt(8) + }, + "el-GR": function(e) { + for (var t = e.split("").map((function(e) { + return parseInt(e, 10) + } + )), r = 0, n = 0; n < 8; n++) + r += t[n] * Math.pow(2, 8 - n); + return r % 11 % 10 === t[8] + }, + "en-CA": function(e) { + var t = e.split("") + , r = t.filter((function(e, t) { + return t % 2 + } + )).map((function(e) { + return 2 * Number(e) + } + )).join("").split(""); + return t.filter((function(e, t) { + return !(t % 2) + } + )).concat(r).map((function(e) { + return Number(e) + } + )).reduce((function(e, t) { + return e + t + } + )) % 10 == 0 + }, + "en-IE": function(e) { + var t = s.reverseMultiplyAndSum(e.split("").slice(0, 7).map((function(e) { + return parseInt(e, 10) + } + )), 8); + return 9 === e.length && "W" !== e[8] && (t += 9 * (e[8].charCodeAt(0) - 64)), + 0 == (t %= 23) ? "W" === e[7].toUpperCase() : e[7].toUpperCase() === String.fromCharCode(64 + t) + }, + "en-US": function(e) { + return -1 !== function() { + var e, t = []; + for (var r in l) + l.hasOwnProperty(r) && t.push.apply(t, function(e) { + if (Array.isArray(e)) + return c(e) + }(e = l[r]) || function(e) { + if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) + return Array.from(e) + }(e) || function(e, t) { + if (e) { + if ("string" == typeof e) + return c(e, t); + var r = Object.prototype.toString.call(e).slice(8, -1); + return "Object" === r && e.constructor && (r = e.constructor.name), + "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? c(e, t) : void 0 + } + }(e) || function() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + }()); + return t + }().indexOf(e.slice(0, 2)) + }, + "es-ES": function(e) { + var t = e.toUpperCase().split(""); + if (isNaN(parseInt(t[0], 10)) && t.length > 1) { + var r = 0; + switch (t[0]) { + case "Y": + r = 1; + break; + case "Z": + r = 2 + } + t.splice(0, 1, r) + } else + for (; t.length < 9; ) + t.unshift(0); + t = t.join(""); + var n = parseInt(t.slice(0, 8), 10) % 23; + return t[8] === ["T", "R", "W", "A", "G", "M", "Y", "F", "P", "D", "X", "B", "N", "J", "Z", "S", "Q", "V", "H", "L", "C", "K", "E"][n] + }, + "et-EE": function(e) { + var t = e.slice(1, 3); + switch (e.slice(0, 1)) { + case "1": + case "2": + t = "18".concat(t); + break; + case "3": + case "4": + t = "19".concat(t); + break; + default: + t = "20".concat(t) + } + var r = "".concat(t, "/").concat(e.slice(3, 5), "/").concat(e.slice(5, 7)); + if (!(0, + i.default)(r, "YYYY/MM/DD")) + return !1; + for (var n = e.split("").map((function(e) { + return parseInt(e, 10) + } + )), o = 0, s = 1, a = 0; a < 10; a++) + o += n[a] * s, + 10 === (s += 1) && (s = 1); + if (o % 11 == 10) { + o = 0, + s = 3; + for (var u = 0; u < 10; u++) + o += n[u] * s, + 10 === (s += 1) && (s = 1); + if (o % 11 == 10) + return 0 === n[10] + } + return o % 11 === n[10] + }, + "fi-FI": function(e) { + var t = e.slice(4, 6); + switch (e.slice(6, 7)) { + case "+": + t = "18".concat(t); + break; + case "-": + t = "19".concat(t); + break; + default: + t = "20".concat(t) + } + var r = "".concat(t, "/").concat(e.slice(2, 4), "/").concat(e.slice(0, 2)); + if (!(0, + i.default)(r, "YYYY/MM/DD")) + return !1; + var n = parseInt(e.slice(0, 6) + e.slice(7, 10), 10) % 31; + return n < 10 ? n === parseInt(e.slice(10), 10) : ["A", "B", "C", "D", "E", "F", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y"][n -= 10] === e.slice(10) + }, + "fr-BE": function(e) { + if ("00" !== e.slice(2, 4) || "00" !== e.slice(4, 6)) { + var t = "".concat(e.slice(0, 2), "/").concat(e.slice(2, 4), "/").concat(e.slice(4, 6)); + if (!(0, + i.default)(t, "YY/MM/DD")) + return !1 + } + var r = 97 - parseInt(e.slice(0, 9), 10) % 97 + , n = parseInt(e.slice(9, 11), 10); + return r === n || (r = 97 - parseInt("2".concat(e.slice(0, 9)), 10) % 97) === n + }, + "fr-FR": function(e) { + return e = e.replace(/\s/g, ""), + parseInt(e.slice(0, 10), 10) % 511 === parseInt(e.slice(10, 13), 10) + }, + "fr-LU": function(e) { + var t = "".concat(e.slice(0, 4), "/").concat(e.slice(4, 6), "/").concat(e.slice(6, 8)); + return !!(0, + i.default)(t, "YYYY/MM/DD") && !!s.luhnCheck(e.slice(0, 12)) && s.verhoeffCheck("".concat(e.slice(0, 11)).concat(e[12])) + }, + "hr-HR": function(e) { + return s.iso7064Check(e) + }, + "hu-HU": function(e) { + for (var t = e.split("").map((function(e) { + return parseInt(e, 10) + } + )), r = 8, n = 1; n < 9; n++) + r += t[n] * (n + 1); + return r % 11 === t[9] + }, + "it-IT": function(e) { + var t = e.toUpperCase().split(""); + if (!d(t.slice(0, 3))) + return !1; + if (!d(t.slice(3, 6))) + return !1; + for (var r = { + L: "0", + M: "1", + N: "2", + P: "3", + Q: "4", + R: "5", + S: "6", + T: "7", + U: "8", + V: "9" + }, n = 0, o = [6, 7, 9, 10, 12, 13, 14]; n < o.length; n++) { + var s = o[n]; + t[s]in r && t.splice(s, 1, r[t[s]]) + } + var a = { + A: "01", + B: "02", + C: "03", + D: "04", + E: "05", + H: "06", + L: "07", + M: "08", + P: "09", + R: "10", + S: "11", + T: "12" + }[t[8]] + , u = parseInt(t[9] + t[10], 10); + u > 40 && (u -= 40), + u < 10 && (u = "0".concat(u)); + var c = "".concat(t[6]).concat(t[7], "/").concat(a, "/").concat(u); + if (!(0, + i.default)(c, "YY/MM/DD")) + return !1; + for (var l = 0, h = 1; h < t.length - 1; h += 2) { + var p = parseInt(t[h], 10); + isNaN(p) && (p = t[h].charCodeAt(0) - 65), + l += p + } + for (var f = { + A: 1, + B: 0, + C: 5, + D: 7, + E: 9, + F: 13, + G: 15, + H: 17, + I: 19, + J: 21, + K: 2, + L: 4, + M: 18, + N: 20, + O: 11, + P: 3, + Q: 6, + R: 8, + S: 12, + T: 14, + U: 16, + V: 10, + W: 22, + X: 25, + Y: 24, + Z: 23, + 0: 1, + 1: 0 + }, g = 0; g < t.length - 1; g += 2) { + var y = 0; + if (t[g]in f) + y = f[t[g]]; + else { + var b = parseInt(t[g], 10); + y = 2 * b + 1, + b > 4 && (y += 2) + } + l += y + } + return String.fromCharCode(65 + l % 26) === t[15] + }, + "lv-LV": function(e) { + var t = (e = e.replace(/\W/, "")).slice(0, 2); + if ("32" !== t) { + if ("00" !== e.slice(2, 4)) { + var r = e.slice(4, 6); + switch (e[6]) { + case "0": + r = "18".concat(r); + break; + case "1": + r = "19".concat(r); + break; + default: + r = "20".concat(r) + } + var n = "".concat(r, "/").concat(e.slice(2, 4), "/").concat(t); + if (!(0, + i.default)(n, "YYYY/MM/DD")) + return !1 + } + for (var o = 1101, s = [1, 6, 3, 7, 9, 10, 5, 8, 4, 2], a = 0; a < e.length - 1; a++) + o -= parseInt(e[a], 10) * s[a]; + return parseInt(e[10], 10) === o % 11 + } + return !0 + }, + "mt-MT": function(e) { + if (9 !== e.length) { + for (var t = e.toUpperCase().split(""); t.length < 8; ) + t.unshift(0); + switch (e[7]) { + case "A": + case "P": + if (0 === parseInt(t[6], 10)) + return !1; + break; + default: + var r = parseInt(t.join("").slice(0, 5), 10); + if (r > 32e3) + return !1; + if (r === parseInt(t.join("").slice(5, 7), 10)) + return !1 + } + } + return !0 + }, + "nl-NL": function(e) { + return s.reverseMultiplyAndSum(e.split("").slice(0, 8).map((function(e) { + return parseInt(e, 10) + } + )), 9) % 11 === parseInt(e[8], 10) + }, + "pl-PL": function(e) { + if (10 === e.length) { + for (var t = [6, 5, 7, 2, 3, 4, 5, 6, 7], r = 0, n = 0; n < t.length; n++) + r += parseInt(e[n], 10) * t[n]; + return 10 != (r %= 11) && r === parseInt(e[9], 10) + } + var o = e.slice(0, 2) + , s = parseInt(e.slice(2, 4), 10); + s > 80 ? (o = "18".concat(o), + s -= 80) : s > 60 ? (o = "22".concat(o), + s -= 60) : s > 40 ? (o = "21".concat(o), + s -= 40) : s > 20 ? (o = "20".concat(o), + s -= 20) : o = "19".concat(o), + s < 10 && (s = "0".concat(s)); + var a = "".concat(o, "/").concat(s, "/").concat(e.slice(4, 6)); + if (!(0, + i.default)(a, "YYYY/MM/DD")) + return !1; + for (var u = 0, c = 1, l = 0; l < e.length - 1; l++) + u += parseInt(e[l], 10) * c % 10, + (c += 2) > 10 ? c = 1 : 5 === c && (c += 2); + return (u = 10 - u % 10) === parseInt(e[10], 10) + }, + "pt-BR": function(e) { + if (11 === e.length) { + var t, r; + if (t = 0, + "11111111111" === e || "22222222222" === e || "33333333333" === e || "44444444444" === e || "55555555555" === e || "66666666666" === e || "77777777777" === e || "88888888888" === e || "99999999999" === e || "00000000000" === e) + return !1; + for (var n = 1; n <= 9; n++) + t += parseInt(e.substring(n - 1, n), 10) * (11 - n); + if (10 == (r = 10 * t % 11) && (r = 0), + r !== parseInt(e.substring(9, 10), 10)) + return !1; + t = 0; + for (var o = 1; o <= 10; o++) + t += parseInt(e.substring(o - 1, o), 10) * (12 - o); + return 10 == (r = 10 * t % 11) && (r = 0), + r === parseInt(e.substring(10, 11), 10) + } + if ("00000000000000" === e || "11111111111111" === e || "22222222222222" === e || "33333333333333" === e || "44444444444444" === e || "55555555555555" === e || "66666666666666" === e || "77777777777777" === e || "88888888888888" === e || "99999999999999" === e) + return !1; + for (var s = e.length - 2, i = e.substring(0, s), a = e.substring(s), u = 0, c = s - 7, l = s; l >= 1; l--) + u += i.charAt(s - l) * c, + (c -= 1) < 2 && (c = 9); + var d = u % 11 < 2 ? 0 : 11 - u % 11; + if (d !== parseInt(a.charAt(0), 10)) + return !1; + s += 1, + i = e.substring(0, s), + u = 0, + c = s - 7; + for (var h = s; h >= 1; h--) + u += i.charAt(s - h) * c, + (c -= 1) < 2 && (c = 9); + return (d = u % 11 < 2 ? 0 : 11 - u % 11) === parseInt(a.charAt(1), 10) + }, + "pt-PT": function(e) { + var t = 11 - s.reverseMultiplyAndSum(e.split("").slice(0, 8).map((function(e) { + return parseInt(e, 10) + } + )), 9) % 11; + return t > 9 ? 0 === parseInt(e[8], 10) : t === parseInt(e[8], 10) + }, + "ro-RO": function(e) { + if ("9000" !== e.slice(0, 4)) { + var t = e.slice(1, 3); + switch (e[0]) { + case "1": + case "2": + t = "19".concat(t); + break; + case "3": + case "4": + t = "18".concat(t); + break; + case "5": + case "6": + t = "20".concat(t) + } + var r = "".concat(t, "/").concat(e.slice(3, 5), "/").concat(e.slice(5, 7)); + if (8 === r.length) { + if (!(0, + i.default)(r, "YY/MM/DD")) + return !1 + } else if (!(0, + i.default)(r, "YYYY/MM/DD")) + return !1; + for (var n = e.split("").map((function(e) { + return parseInt(e, 10) + } + )), o = [2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9], s = 0, a = 0; a < o.length; a++) + s += n[a] * o[a]; + return s % 11 == 10 ? 1 === n[12] : n[12] === s % 11 + } + return !0 + }, + "sk-SK": function(e) { + if (9 === e.length) { + if ("000" === (e = e.replace(/\W/, "")).slice(6)) + return !1; + var t = parseInt(e.slice(0, 2), 10); + if (t > 53) + return !1; + t = t < 10 ? "190".concat(t) : "19".concat(t); + var r = parseInt(e.slice(2, 4), 10); + r > 50 && (r -= 50), + r < 10 && (r = "0".concat(r)); + var n = "".concat(t, "/").concat(r, "/").concat(e.slice(4, 6)); + if (!(0, + i.default)(n, "YYYY/MM/DD")) + return !1 + } + return !0 + }, + "sl-SI": function(e) { + var t = 11 - s.reverseMultiplyAndSum(e.split("").slice(0, 7).map((function(e) { + return parseInt(e, 10) + } + )), 8) % 11; + return 10 === t ? 0 === parseInt(e[7], 10) : t === parseInt(e[7], 10) + }, + "sv-SE": function(e) { + var t = e.slice(0); + e.length > 11 && (t = t.slice(2)); + var r = "" + , n = t.slice(2, 4) + , o = parseInt(t.slice(4, 6), 10); + if (e.length > 11) + r = e.slice(0, 4); + else if (r = e.slice(0, 2), + 11 === e.length && o < 60) { + var a = (new Date).getFullYear().toString() + , u = parseInt(a.slice(0, 2), 10); + if (a = parseInt(a, 10), + "-" === e[6]) + r = parseInt("".concat(u).concat(r), 10) > a ? "".concat(u - 1).concat(r) : "".concat(u).concat(r); + else if (r = "".concat(u - 1).concat(r), + a - parseInt(r, 10) < 100) + return !1 + } + o > 60 && (o -= 60), + o < 10 && (o = "0".concat(o)); + var c = "".concat(r, "/").concat(n, "/").concat(o); + if (8 === c.length) { + if (!(0, + i.default)(c, "YY/MM/DD")) + return !1 + } else if (!(0, + i.default)(c, "YYYY/MM/DD")) + return !1; + return s.luhnCheck(e.replace(/\W/, "")) + } + }; + p["lb-LU"] = p["fr-LU"], + p["lt-LT"] = p["et-EE"], + p["nl-BE"] = p["fr-BE"], + p["fr-CA"] = p["en-CA"]; + var f = /[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g + , g = { + "de-AT": f, + "de-DE": /[\/\\]/g, + "fr-BE": f + }; + g["nl-BE"] = g["fr-BE"], + e.exports = t.default, + e.exports.default = t.default + } + , + 3494: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return t = (0, + o.default)(t, s), + "string" == typeof e && i[t.hourFormat][t.mode].test(e) + } + ; + var n, o = (n = r(4808)) && n.__esModule ? n : { + default: n + }, s = { + hourFormat: "hour24", + mode: "default" + }, i = { + hour24: { + default: /^([01]?[0-9]|2[0-3]):([0-5][0-9])$/, + withSeconds: /^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/ + }, + hour12: { + default: /^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/, + withSeconds: /^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/ + } + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 2492: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + if ((0, + n.default)(e), + !e || /[\s<>]/.test(e)) + return !1; + if (0 === e.indexOf("mailto:")) + return !1; + if ((t = (0, + i.default)(t, c)).validate_length && e.length >= 2083) + return !1; + if (!t.allow_fragments && e.includes("#")) + return !1; + if (!t.allow_query_components && (e.includes("?") || e.includes("&"))) + return !1; + var r, a, h, p, f, g, y, b, m; + if (y = e.split("#"), + e = y.shift(), + y = e.split("?"), + e = y.shift(), + (y = e.split("://")).length > 1) { + if (r = y.shift().toLowerCase(), + t.require_valid_protocol && -1 === t.protocols.indexOf(r)) + return !1 + } else { + if (t.require_protocol) + return !1; + if ("//" === e.slice(0, 2)) { + if (!t.allow_protocol_relative_urls) + return !1; + y[0] = e.slice(2) + } + } + if ("" === (e = y.join("://"))) + return !1; + if (y = e.split("/"), + "" === (e = y.shift()) && !t.require_host) + return !0; + if ((y = e.split("@")).length > 1) { + if (t.disallow_auth) + return !1; + if ("" === y[0]) + return !1; + if ((a = y.shift()).indexOf(":") >= 0 && a.split(":").length > 2) + return !1; + var T = (2, + function(e) { + if (Array.isArray(e)) + return e + }(m = a.split(":")) || function(e, t) { + if ("undefined" != typeof Symbol && Symbol.iterator in Object(e)) { + var r = [] + , n = !0 + , o = !1 + , s = void 0; + try { + for (var i, a = e[Symbol.iterator](); !(n = (i = a.next()).done) && (r.push(i.value), + 2 !== r.length); n = !0) + ; + } catch (e) { + o = !0, + s = e + } finally { + try { + n || null == a.return || a.return() + } finally { + if (o) + throw s + } + } + return r + } + }(m) || function(e, t) { + if (e) { + if ("string" == typeof e) + return u(e, 2); + var r = Object.prototype.toString.call(e).slice(8, -1); + return "Object" === r && e.constructor && (r = e.constructor.name), + "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? u(e, 2) : void 0 + } + }(m) || function() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") + }()) + , v = T[0] + , w = T[1]; + if ("" === v && "" === w) + return !1 + } + g = null, + b = null; + var A = (p = y.join("@")).match(l); + if (A ? (h = "", + b = A[1], + g = A[2] || null) : (h = (y = p.split(":")).shift(), + y.length && (g = y.join(":"))), + null !== g && g.length > 0) { + if (f = parseInt(g, 10), + !/^[0-9]+$/.test(g) || f <= 0 || f > 65535) + return !1 + } else if (t.require_port) + return !1; + return t.host_whitelist ? d(h, t.host_whitelist) : "" === h && !t.require_host || !!((0, + s.default)(h) || (0, + o.default)(h, t) || b && (0, + s.default)(b, 6)) && (h = h || b, + !t.host_blacklist || !d(h, t.host_blacklist)) + } + ; + var n = a(r(5571)) + , o = a(r(221)) + , s = a(r(1028)) + , i = a(r(4808)); + function a(e) { + return e && e.__esModule ? e : { + default: e + } + } + function u(e, t) { + (null == t || t > e.length) && (t = e.length); + for (var r = 0, n = new Array(t); r < t; r++) + n[r] = e[r]; + return n + } + var c = { + protocols: ["http", "https", "ftp"], + require_tld: !0, + require_protocol: !1, + require_host: !0, + require_port: !1, + require_valid_protocol: !0, + allow_underscores: !1, + allow_trailing_dot: !1, + allow_protocol_relative_urls: !1, + allow_fragments: !0, + allow_query_components: !0, + validate_length: !0 + } + , l = /^\[([^\]]+)\](?::([0-9]+))?$/; + function d(e, t) { + for (var r = 0; r < t.length; r++) { + var n = t[r]; + if (e === n || (o = n, + "[object RegExp]" === Object.prototype.toString.call(o) && n.test(e))) + return !0 + } + var o; + return !1 + } + e.exports = t.default, + e.exports.default = t.default + } + , + 7278: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + (0, + o.default)(e); + var r = s[[void 0, null].includes(t) ? "all" : t]; + return !!r && r.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = { + 1: /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + 2: /^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, + 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, + all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 7245: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + e === e.toUpperCase() + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 5977: (e,t,r)=>{ + "use strict"; + function n(e) { + return n = "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 + } + , + n(e) + } + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + if ((0, + s.default)(e), + (0, + s.default)(t), + t in u) + return u[t](e); + throw new Error("Invalid country code: '".concat(t, "'")) + } + , + t.vatMatchers = void 0; + var o, s = (o = r(5571)) && o.__esModule ? o : { + default: o + }, i = function(e) { + if (e && e.__esModule) + return e; + if (null === e || "object" !== n(e) && "function" != typeof e) + return { + default: e + }; + var t = a(); + if (t && t.has(e)) + return t.get(e); + var r = {} + , o = Object.defineProperty && Object.getOwnPropertyDescriptor; + for (var s in e) + if (Object.prototype.hasOwnProperty.call(e, s)) { + var i = o ? Object.getOwnPropertyDescriptor(e, s) : null; + i && (i.get || i.set) ? Object.defineProperty(r, s, i) : r[s] = e[s] + } + return r.default = e, + t && t.set(e, r), + r + }(r(3672)); + function a() { + if ("function" != typeof WeakMap) + return null; + var e = new WeakMap; + return a = function() { + return e + } + , + e + } + var u = { + AT: function(e) { + return /^(AT)?U\d{8}$/.test(e) + }, + BE: function(e) { + return /^(BE)?\d{10}$/.test(e) + }, + BG: function(e) { + return /^(BG)?\d{9,10}$/.test(e) + }, + HR: function(e) { + return /^(HR)?\d{11}$/.test(e) + }, + CY: function(e) { + return /^(CY)?\w{9}$/.test(e) + }, + CZ: function(e) { + return /^(CZ)?\d{8,10}$/.test(e) + }, + DK: function(e) { + return /^(DK)?\d{8}$/.test(e) + }, + EE: function(e) { + return /^(EE)?\d{9}$/.test(e) + }, + FI: function(e) { + return /^(FI)?\d{8}$/.test(e) + }, + FR: function(e) { + return /^(FR)?\w{2}\d{9}$/.test(e) + }, + DE: function(e) { + return /^(DE)?\d{9}$/.test(e) + }, + EL: function(e) { + return /^(EL)?\d{9}$/.test(e) + }, + HU: function(e) { + return /^(HU)?\d{8}$/.test(e) + }, + IE: function(e) { + return /^(IE)?\d{7}\w{1}(W)?$/.test(e) + }, + IT: function(e) { + return /^(IT)?\d{11}$/.test(e) + }, + LV: function(e) { + return /^(LV)?\d{11}$/.test(e) + }, + LT: function(e) { + return /^(LT)?\d{9,12}$/.test(e) + }, + LU: function(e) { + return /^(LU)?\d{8}$/.test(e) + }, + MT: function(e) { + return /^(MT)?\d{8}$/.test(e) + }, + NL: function(e) { + return /^(NL)?\d{9}B\d{2}$/.test(e) + }, + PL: function(e) { + return /^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(e) + }, + PT: function(e) { + var t = e.match(/^(PT)?(\d{9})$/); + if (!t) + return !1; + var r = t[2] + , n = 11 - i.reverseMultiplyAndSum(r.split("").slice(0, 8).map((function(e) { + return parseInt(e, 10) + } + )), 9) % 11; + return n > 9 ? 0 === parseInt(r[8], 10) : n === parseInt(r[8], 10) + }, + RO: function(e) { + return /^(RO)?\d{2,10}$/.test(e) + }, + SK: function(e) { + return /^(SK)?\d{10}$/.test(e) + }, + SI: function(e) { + return /^(SI)?\d{8}$/.test(e) + }, + ES: function(e) { + return /^(ES)?\w\d{7}[A-Z]$/.test(e) + }, + SE: function(e) { + return /^(SE)?\d{12}$/.test(e) + }, + AL: function(e) { + return /^(AL)?\w{9}[A-Z]$/.test(e) + }, + MK: function(e) { + return /^(MK)?\d{13}$/.test(e) + }, + AU: function(e) { + return /^(AU)?\d{11}$/.test(e) + }, + BY: function(e) { + return /^(УНП )?\d{9}$/.test(e) + }, + CA: function(e) { + return /^(CA)?\d{9}$/.test(e) + }, + IS: function(e) { + return /^(IS)?\d{5,6}$/.test(e) + }, + IN: function(e) { + return /^(IN)?\d{15}$/.test(e) + }, + ID: function(e) { + return /^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(e) + }, + IL: function(e) { + return /^(IL)?\d{9}$/.test(e) + }, + KZ: function(e) { + return /^(KZ)?\d{9}$/.test(e) + }, + NZ: function(e) { + return /^(NZ)?\d{9}$/.test(e) + }, + NG: function(e) { + return /^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(e) + }, + NO: function(e) { + return /^(NO)?\d{9}MVA$/.test(e) + }, + PH: function(e) { + return /^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(e) + }, + RU: function(e) { + return /^(RU)?(\d{10}|\d{12})$/.test(e) + }, + SM: function(e) { + return /^(SM)?\d{5}$/.test(e) + }, + SA: function(e) { + return /^(SA)?\d{15}$/.test(e) + }, + RS: function(e) { + return /^(RS)?\d{9}$/.test(e) + }, + CH: function(e) { + var t, r, n; + return /^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(e) && (r = (t = e.match(/\d/g).map((function(e) { + return +e + } + ))).pop(), + n = [5, 4, 3, 2, 7, 6, 5, 4], + r === (11 - t.reduce((function(e, t, r) { + return e + t * n[r] + } + ), 0) % 11) % 11) + }, + TR: function(e) { + return /^(TR)?\d{10}$/.test(e) + }, + UA: function(e) { + return /^(UA)?\d{12}$/.test(e) + }, + GB: function(e) { + return /^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(e) + }, + UZ: function(e) { + return /^(UZ)?\d{9}$/.test(e) + }, + AR: function(e) { + return /^(AR)?\d{11}$/.test(e) + }, + BO: function(e) { + return /^(BO)?\d{7}$/.test(e) + }, + BR: function(e) { + return /^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(e) + }, + CL: function(e) { + return /^(CL)?\d{8}-\d{1}$/.test(e) + }, + CO: function(e) { + return /^(CO)?\d{10}$/.test(e) + }, + CR: function(e) { + return /^(CR)?\d{9,12}$/.test(e) + }, + EC: function(e) { + return /^(EC)?\d{13}$/.test(e) + }, + SV: function(e) { + return /^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(e) + }, + GT: function(e) { + return /^(GT)?\d{7}-\d{1}$/.test(e) + }, + HN: function(e) { + return /^(HN)?$/.test(e) + }, + MX: function(e) { + return /^(MX)?\w{3,4}\d{6}\w{3}$/.test(e) + }, + NI: function(e) { + return /^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(e) + }, + PA: function(e) { + return /^(PA)?$/.test(e) + }, + PY: function(e) { + return /^(PY)?\d{6,8}-\d{1}$/.test(e) + }, + PE: function(e) { + return /^(PE)?\d{11}$/.test(e) + }, + DO: function(e) { + return /^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(e) + }, + UY: function(e) { + return /^(UY)?\d{12}$/.test(e) + }, + VE: function(e) { + return /^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(e) + } + }; + t.vatMatchers = u + } + , + 9019: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + s.fullWidth.test(e) && i.halfWidth.test(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }, s = r(7146), i = r(2941); + e.exports = t.default, + e.exports.default = t.default + } + , + 8346: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + (0, + o.default)(e); + for (var r = e.length - 1; r >= 0; r--) + if (-1 === t.indexOf(e[r])) + return !1; + return !0 + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 4959: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + (0, + o.default)(e); + var r = t ? new RegExp("^[".concat(t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "]+"),"g") : /^\s+/g; + return e.replace(r, "") + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 661: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t, r) { + return (0, + o.default)(e), + "[object RegExp]" !== Object.prototype.toString.call(t) && (t = new RegExp(t,r)), + !!e.match(t) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 2900: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + t = (0, + o.default)(t, s); + var r = e.split("@") + , n = r.pop() + , d = [r.join("@"), n]; + if (d[1] = d[1].toLowerCase(), + "gmail.com" === d[1] || "googlemail.com" === d[1]) { + if (t.gmail_remove_subaddress && (d[0] = d[0].split("+")[0]), + t.gmail_remove_dots && (d[0] = d[0].replace(/\.+/g, l)), + !d[0].length) + return !1; + (t.all_lowercase || t.gmail_lowercase) && (d[0] = d[0].toLowerCase()), + d[1] = t.gmail_convert_googlemaildotcom ? "gmail.com" : d[1] + } else if (i.indexOf(d[1]) >= 0) { + if (t.icloud_remove_subaddress && (d[0] = d[0].split("+")[0]), + !d[0].length) + return !1; + (t.all_lowercase || t.icloud_lowercase) && (d[0] = d[0].toLowerCase()) + } else if (a.indexOf(d[1]) >= 0) { + if (t.outlookdotcom_remove_subaddress && (d[0] = d[0].split("+")[0]), + !d[0].length) + return !1; + (t.all_lowercase || t.outlookdotcom_lowercase) && (d[0] = d[0].toLowerCase()) + } else if (u.indexOf(d[1]) >= 0) { + if (t.yahoo_remove_subaddress) { + var h = d[0].split("-"); + d[0] = h.length > 1 ? h.slice(0, -1).join("-") : h[0] + } + if (!d[0].length) + return !1; + (t.all_lowercase || t.yahoo_lowercase) && (d[0] = d[0].toLowerCase()) + } else + c.indexOf(d[1]) >= 0 ? ((t.all_lowercase || t.yandex_lowercase) && (d[0] = d[0].toLowerCase()), + d[1] = "yandex.ru") : t.all_lowercase && (d[0] = d[0].toLowerCase()); + return d.join("@") + } + ; + var n, o = (n = r(4808)) && n.__esModule ? n : { + default: n + }, s = { + all_lowercase: !0, + gmail_lowercase: !0, + gmail_remove_dots: !0, + gmail_remove_subaddress: !0, + gmail_convert_googlemaildotcom: !0, + outlookdotcom_lowercase: !0, + outlookdotcom_remove_subaddress: !0, + yahoo_lowercase: !0, + yahoo_remove_subaddress: !0, + yandex_lowercase: !0, + icloud_lowercase: !0, + icloud_remove_subaddress: !0 + }, i = ["icloud.com", "me.com"], a = ["hotmail.at", "hotmail.be", "hotmail.ca", "hotmail.cl", "hotmail.co.il", "hotmail.co.nz", "hotmail.co.th", "hotmail.co.uk", "hotmail.com", "hotmail.com.ar", "hotmail.com.au", "hotmail.com.br", "hotmail.com.gr", "hotmail.com.mx", "hotmail.com.pe", "hotmail.com.tr", "hotmail.com.vn", "hotmail.cz", "hotmail.de", "hotmail.dk", "hotmail.es", "hotmail.fr", "hotmail.hu", "hotmail.id", "hotmail.ie", "hotmail.in", "hotmail.it", "hotmail.jp", "hotmail.kr", "hotmail.lv", "hotmail.my", "hotmail.ph", "hotmail.pt", "hotmail.sa", "hotmail.sg", "hotmail.sk", "live.be", "live.co.uk", "live.com", "live.com.ar", "live.com.mx", "live.de", "live.es", "live.eu", "live.fr", "live.it", "live.nl", "msn.com", "outlook.at", "outlook.be", "outlook.cl", "outlook.co.il", "outlook.co.nz", "outlook.co.th", "outlook.com", "outlook.com.ar", "outlook.com.au", "outlook.com.br", "outlook.com.gr", "outlook.com.pe", "outlook.com.tr", "outlook.com.vn", "outlook.cz", "outlook.de", "outlook.dk", "outlook.es", "outlook.fr", "outlook.hu", "outlook.id", "outlook.ie", "outlook.in", "outlook.it", "outlook.jp", "outlook.kr", "outlook.lv", "outlook.my", "outlook.ph", "outlook.pt", "outlook.sa", "outlook.sg", "outlook.sk", "passport.com"], u = ["rocketmail.com", "yahoo.ca", "yahoo.co.uk", "yahoo.com", "yahoo.de", "yahoo.fr", "yahoo.in", "yahoo.it", "ymail.com"], c = ["yandex.ru", "yandex.ua", "yandex.kz", "yandex.com", "yandex.by", "ya.ru"]; + function l(e) { + return e.length > 1 ? e : "" + } + e.exports = t.default, + e.exports.default = t.default + } + , + 9778: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + if ((0, + o.default)(e), + t) { + var r = new RegExp("[".concat(t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "]+$"),"g"); + return e.replace(r, "") + } + for (var n = e.length - 1; /\s/.test(e.charAt(n)); ) + n -= 1; + return e.slice(0, n + 1) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 8035: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + (0, + n.default)(e); + var r = t ? "\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F" : "\\x00-\\x1F\\x7F"; + return (0, + o.default)(e, r) + } + ; + var n = s(r(5571)) + , o = s(r(4928)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + e.exports = t.default, + e.exports.default = t.default + } + , + 557: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + o.default)(e), + t ? "1" === e || /^true$/i.test(e) : "0" !== e && !/^false$/i.test(e) && "" !== e + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 8469: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + e = Date.parse(e), + isNaN(e) ? null : new Date(e) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 7536: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e) ? parseFloat(e) : NaN + } + ; + var n, o = (n = r(9146)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 1359: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + o.default)(e), + parseInt(e, t || 10) + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 4790: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + n.default)((0, + o.default)(e, t), t) + } + ; + var n = s(r(9778)) + , o = s(r(4959)); + function s(e) { + return e && e.__esModule ? e : { + default: e + } + } + e.exports = t.default, + e.exports.default = t.default + } + , + 4816: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return (0, + o.default)(e), + e.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(///g, "/").replace(/\/g, "\\").replace(/`/g, "`").replace(/&/g, "&") + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 3672: (e,t)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.iso7064Check = function(e) { + for (var t = 10, r = 0; r < e.length - 1; r++) + t = (parseInt(e[r], 10) + t) % 10 == 0 ? 9 : (parseInt(e[r], 10) + t) % 10 * 2 % 11; + return (t = 1 === t ? 0 : 11 - t) === parseInt(e[10], 10) + } + , + t.luhnCheck = function(e) { + for (var t = 0, r = !1, n = e.length - 1; n >= 0; n--) { + if (r) { + var o = 2 * parseInt(e[n], 10); + t += o > 9 ? o.toString().split("").map((function(e) { + return parseInt(e, 10) + } + )).reduce((function(e, t) { + return e + t + } + ), 0) : o + } else + t += parseInt(e[n], 10); + r = !r + } + return t % 10 == 0 + } + , + t.reverseMultiplyAndSum = function(e, t) { + for (var r = 0, n = 0; n < e.length; n++) + r += e[n] * (t - n); + return r + } + , + t.verhoeffCheck = function(e) { + for (var t = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 0, 6, 7, 8, 9, 5], [2, 3, 4, 0, 1, 7, 8, 9, 5, 6], [3, 4, 0, 1, 2, 8, 9, 5, 6, 7], [4, 0, 1, 2, 3, 9, 5, 6, 7, 8], [5, 9, 8, 7, 6, 0, 4, 3, 2, 1], [6, 5, 9, 8, 7, 1, 0, 4, 3, 2], [7, 6, 5, 9, 8, 2, 1, 0, 4, 3], [8, 7, 6, 5, 9, 3, 2, 1, 0, 4], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]], r = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 5, 7, 6, 2, 8, 3, 0, 9, 4], [5, 8, 0, 3, 7, 9, 6, 1, 4, 2], [8, 9, 1, 6, 0, 4, 3, 5, 2, 7], [9, 4, 5, 3, 1, 2, 6, 8, 7, 0], [4, 2, 8, 6, 5, 7, 3, 9, 0, 1], [2, 7, 9, 3, 8, 0, 6, 4, 1, 5], [7, 0, 4, 6, 9, 1, 3, 2, 5, 8]], n = e.split("").reverse().join(""), o = 0, s = 0; s < n.length; s++) + o = t[o][r[s % 8][parseInt(n[s], 10)]]; + return 0 === o + } + } + , + 5571: (e,t)=>{ + "use strict"; + function r(e) { + return r = "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 + } + , + r(e) + } + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + if (!("string" == typeof e || e instanceof String)) { + var t = r(e); + throw null === e ? t = "null" : "object" === t && (t = e.constructor.name), + new TypeError("Expected a string but received a ".concat(t)) + } + } + , + e.exports = t.default, + e.exports.default = t.default + } + , + 8343: (e,t)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = void 0; + t.default = function(e, t) { + return e.some((function(e) { + return t === e + } + )) + } + , + e.exports = t.default, + e.exports.default = t.default + } + , + 4808: (e,t)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function() { + var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} + , t = arguments.length > 1 ? arguments[1] : void 0; + for (var r in t) + void 0 === e[r] && (e[r] = t[r]); + return e + } + , + e.exports = t.default, + e.exports.default = t.default + } + , + 4731: (e,t)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + var r = e.join(""); + return new RegExp(r,t) + } + , + e.exports = t.default, + e.exports.default = t.default + } + , + 1913: (e,t)=>{ + "use strict"; + function r(e) { + return r = "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 + } + , + r(e) + } + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e) { + return "object" === r(e) && null !== e ? e = "function" == typeof e.toString ? e.toString() : "[object Object]" : (null == e || isNaN(e) && !e.length) && (e = ""), + String(e) + } + , + e.exports = t.default, + e.exports.default = t.default + } + , + 4714: (e,t,r)=>{ + "use strict"; + Object.defineProperty(t, "__esModule", { + value: !0 + }), + t.default = function(e, t) { + return (0, + o.default)(e), + e.replace(new RegExp("[^".concat(t, "]+"),"g"), "") + } + ; + var n, o = (n = r(5571)) && n.__esModule ? n : { + default: n + }; + e.exports = t.default, + e.exports.default = t.default + } + , + 6601: ()=>{} + } + , t = {}; + function r(n) { + var o = t[n]; + if (void 0 !== o) + return o.exports; + var s = t[n] = { + id: n, + loaded: !1, + exports: {} + }; + return e[n].call(s.exports, s, s.exports, r), + s.loaded = !0, + s.exports + } + r.amdO = {}, + r.n = e=>{ + var t = e && e.__esModule ? ()=>e.default : ()=>e; + return r.d(t, { + a: t + }), + t + } + , + r.d = (e,t)=>{ + for (var n in t) + r.o(t, n) && !r.o(e, n) && Object.defineProperty(e, n, { + enumerable: !0, + get: t[n] + }) + } + , + r.g = function() { + if ("object" == typeof globalThis) + return globalThis; + try { + return this || new Function("return this")() + } catch (e) { + if ("object" == typeof window) + return window + } + }(), + r.o = (e,t)=>Object.prototype.hasOwnProperty.call(e, t), + r.r = e=>{ + "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { + value: "Module" + }), + Object.defineProperty(e, "__esModule", { + value: !0 + }) + } + , + r.nmd = e=>(e.paths = [], + e.children || (e.children = []), + e); + var n = {}; + return (()=>{ + "use strict"; + r.d(n, { + default: ()=>pf + }); + var e = {}; + r.r(e), + r.d(e, { + base64DecodeFromString: ()=>v, + base64EncodeToString: ()=>w, + byte2hexStr: ()=>y, + byteArray2hexStr: ()=>T, + bytesToString: ()=>b, + hextoString: ()=>m + }); + var t = {}; + r.r(t), + r.d(t, { + arrayEquals: ()=>M, + base64DecodeFromString: ()=>v, + base64EncodeToString: ()=>w, + bin2String: ()=>E, + byte2hexStr: ()=>y, + byteArray2hexStr: ()=>T, + bytesToString: ()=>b, + getStringType: ()=>R, + hexChar2byte: ()=>F, + hexStr2byteArray: ()=>S, + hextoString: ()=>m, + isHexChar: ()=>O, + isNumber: ()=>x, + strToDate: ()=>_, + stringToBytes: ()=>I + }); + var o = {}; + r.r(o), + r.d(o, { + decode58: ()=>L, + encode58: ()=>D + }); + var s = {}; + r.r(s), + r.d(s, { + dQ: ()=>Vr, + ci: ()=>Rr, + bytesToNumberBE: ()=>Ur, + ty: ()=>Dr, + eV: ()=>$r, + n$: ()=>Kr, + ql: ()=>jr, + hexToBytes: ()=>kr, + tL: ()=>Lr, + S5: ()=>zr, + FF: ()=>qr + }); + var i = {}; + r.r(i), + r.d(i, { + AbiCoder: ()=>No, + FormatTypes: ()=>Iu, + Interface: ()=>Bu, + Mnemonic: ()=>Tr, + SigningKey: ()=>Fn, + Wordlist: ()=>dr, + arrayify: ()=>Mu, + concat: ()=>ue, + ethersHDNodeWallet: ()=>Aa, + ethersWallet: ()=>Ea, + id: ()=>ar, + isValidMnemonic: ()=>Fu, + joinSignature: ()=>Eu, + keccak256: ()=>ir, + recoverAddress: ()=>Sn, + sha256: ()=>St, + splitSignature: ()=>Cu, + toUtf8Bytes: ()=>Lt, + toUtf8String: ()=>zt, + wordlists: ()=>Ma + }); + var a = {}; + r.r(a), + r.d(a, { + dQ: ()=>Bc, + ci: ()=>yc, + bytesToNumberBE: ()=>Tc, + ty: ()=>vc, + eV: ()=>Wc, + n$: ()=>Mc, + ql: ()=>Pc, + hexToBytes: ()=>mc, + tL: ()=>wc, + S5: ()=>Ac, + FF: ()=>Fc + }); + var u = {}; + r.r(u), + r.d(u, { + ECKeySign: ()=>Cl, + SHA256: ()=>El, + _signTypedData: ()=>gl, + arrayToBase64String: ()=>pl, + computeAddress: ()=>ml, + decode58Check: ()=>vl, + decodeBase58Address: ()=>dl, + genPriKey: ()=>bl, + getAddressFromPriKey: ()=>Tl, + getAddressFromPriKeyBase64String: ()=>Wl, + getBase58CheckAddress: ()=>ll, + getBase58CheckAddressFromPriKeyBase64String: ()=>Al, + getHexStrAddressFromPriKeyBase64String: ()=>Pl, + getPubKeyFromPriKey: ()=>Bl, + getRowBytesFromTransactionBase64: ()=>yl, + isAddressValid: ()=>wl, + passwordToAddress: ()=>Ml, + pkToAddress: ()=>Il, + signBytes: ()=>fl, + signTransaction: ()=>hl + }); + var c = {}; + r.r(c), + r.d(c, { + generateAccount: ()=>Ol, + generateAccountWithMnemonic: ()=>_l, + generateRandom: ()=>Sl + }); + var l = {}; + r.r(l), + r.d(l, { + decodeParams: ()=>hh, + decodeParamsV2ByABI: ()=>bh, + encodeParams: ()=>ph, + encodeParamsV2ByABI: ()=>yh + }); + var d = {}; + r.r(d), + r.d(d, { + TRON_MESSAGE_PREFIX: ()=>mh, + hashMessage: ()=>Th, + signMessage: ()=>vh, + verifyMessage: ()=>wh + }); + var h = {}; + r.r(h), + r.d(h, { + txCheck: ()=>pp, + txCheckWithArgs: ()=>fp, + txJsonToPb: ()=>cp, + txJsonToPbWithArgs: ()=>lp, + txPbToRawDataHex: ()=>hp, + txPbToTxID: ()=>gp + }); + var p = r(9669) + , f = r.n(p); + function g() { + this._keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", + this.encode = e=>{ + let t, r, n, o, s, i, a, u = "", c = 0; + for (; c < e.length; ) + t = e.charCodeAt(c++), + r = e.charCodeAt(c++), + n = e.charCodeAt(c++), + o = t >> 2, + s = (3 & t) << 4 | r >> 4, + i = (15 & r) << 2 | n >> 6, + a = 63 & n, + isNaN(r) ? i = a = 64 : isNaN(n) && (a = 64), + u = u + this._keyStr.charAt(o) + this._keyStr.charAt(s) + this._keyStr.charAt(i) + this._keyStr.charAt(a); + return u + } + , + this.encodeIgnoreUtf8 = e=>{ + let t, r, n, o, s, i, a, u = "", c = 0; + for (; c < e.length; ) + t = e[c++], + r = e[c++], + n = e[c++], + o = t >> 2, + s = (3 & t) << 4 | r >> 4, + i = (15 & r) << 2 | n >> 6, + a = 63 & n, + isNaN(r) ? i = a = 64 : isNaN(n) && (a = 64), + u = u + this._keyStr.charAt(o) + this._keyStr.charAt(s) + this._keyStr.charAt(i) + this._keyStr.charAt(a); + return u + } + , + this.decode = e=>{ + let t, r, n, o, s, i, a, u = "", c = 0; + for (e = e.replace(/[^A-Za-z0-9\+\/\=]/g, ""); c < e.length; ) + o = this._keyStr.indexOf(e.charAt(c++)), + s = this._keyStr.indexOf(e.charAt(c++)), + i = this._keyStr.indexOf(e.charAt(c++)), + a = this._keyStr.indexOf(e.charAt(c++)), + t = o << 2 | s >> 4, + r = (15 & s) << 4 | i >> 2, + n = (3 & i) << 6 | a, + u += String.fromCharCode(t), + 64 != i && (u += String.fromCharCode(r)), + 64 != a && (u += String.fromCharCode(n)); + return this._utf8_decode(u) + } + , + this.decodeToByteArray = e=>{ + let t, r, n, o, s, i, a, u = "", c = 0; + for (e = e.replace(/[^A-Za-z0-9\+\/\=]/g, ""); c < e.length; ) + o = this._keyStr.indexOf(e.charAt(c++)), + s = this._keyStr.indexOf(e.charAt(c++)), + i = this._keyStr.indexOf(e.charAt(c++)), + a = this._keyStr.indexOf(e.charAt(c++)), + t = o << 2 | s >> 4, + r = (15 & s) << 4 | i >> 2, + n = (3 & i) << 6 | a, + u += String.fromCharCode(t), + 64 != i && (u += String.fromCharCode(r)), + 64 != a && (u += String.fromCharCode(n)); + return this._out2ByteArray(u) + } + , + this._out2ByteArray = e=>{ + const t = new Array(e.length); + let r = 0 + , n = 0; + for (; r < e.length; ) + n = e.charCodeAt(r), + t[r] = n, + r++; + return t + } + , + this._utf8_encode = e=>{ + e = e.replace(/\r\n/g, "\n"); + let t = ""; + for (let r = 0; r < e.length; r++) { + const n = e.charCodeAt(r); + n < 128 ? t += String.fromCharCode(n) : n > 127 && n < 2048 ? (t += String.fromCharCode(n >> 6 | 192), + t += String.fromCharCode(63 & n | 128)) : (t += String.fromCharCode(n >> 12 | 224), + t += String.fromCharCode(n >> 6 & 63 | 128), + t += String.fromCharCode(63 & n | 128)) + } + return t + } + , + this._utf8_decode = e=>{ + let t = "" + , r = 0 + , n = 0 + , o = 0 + , s = 0; + for (; r < e.length; ) + n = e.charCodeAt(r), + n < 128 ? (t += String.fromCharCode(n), + r++) : n > 191 && n < 224 ? (o = e.charCodeAt(r + 1), + t += String.fromCharCode((31 & n) << 6 | 63 & o), + r += 2) : (o = e.charCodeAt(r + 1), + s = e.charCodeAt(r + 2), + t += String.fromCharCode((15 & n) << 12 | (63 & o) << 6 | 63 & s), + r += 3); + return t + } + } + function y(e) { + if ("number" != typeof e) + throw new Error("Input must be a number"); + if (e < 0 || e > 255) + throw new Error("Input must be a byte"); + const t = "0123456789ABCDEF"; + let r = ""; + return r += t.charAt(e >> 4), + r += t.charAt(15 & e), + r + } + function b(e) { + if ("string" == typeof e) + return e; + let t = ""; + for (let r = 0; r < e.length; r++) { + const n = e[r].toString(2) + , o = n.match(/^1+?(?=0)/); + if (o && 8 === n.length) { + const n = o[0].length; + let s = e[r].toString(2).slice(7 - n); + for (let t = 1; t < n; t++) + s += e[t + r].toString(2).slice(2); + t += String.fromCharCode(parseInt(s, 2)), + r += n - 1 + } else + t += String.fromCharCode(e[r]) + } + return t + } + function m(e) { + const t = e.replace(/^0x/, "").split(""); + let r = ""; + for (let e = 0; e < t.length / 2; e++) { + let n = `0x${t[2 * e]}${t[2 * e + 1]}`; + r += String.fromCharCode(n) + } + return r + } + function T(e) { + let t = ""; + for (let r = 0; r < e.length; r++) + t += y(e[r]); + return t + } + function v(e) { + return (new g).decodeToByteArray(e) + } + function w(e) { + return (new g).encodeIgnoreUtf8(e) + } + const A = 34 + , P = "41" + , W = 65 + , B = /^(41)/ + , C = "m/44'/195'/0'/0/0"; + function E(e) { + return b(e) + } + function M(e, t, r) { + if (e.length != t.length) + return !1; + let n; + for (n = 0; n < e.length; n++) + if (r) { + if (e[n] != t[n]) + return !1 + } else if (JSON.stringify(e[n]) != JSON.stringify(t[n])) + return !1; + return !0 + } + function I(e) { + if ("string" != typeof e) + throw new Error("The passed string is not a string"); + const t = new Array; + let r, n; + r = e.length; + for (let o = 0; o < r; o++) + n = e.charCodeAt(o), + n >= 65536 && n <= 1114111 ? (t.push(n >> 18 & 7 | 240), + t.push(n >> 12 & 63 | 128), + t.push(n >> 6 & 63 | 128), + t.push(63 & n | 128)) : n >= 2048 && n <= 65535 ? (t.push(n >> 12 & 15 | 224), + t.push(n >> 6 & 63 | 128), + t.push(63 & n | 128)) : n >= 128 && n <= 2047 ? (t.push(n >> 6 & 31 | 192), + t.push(63 & n | 128)) : t.push(255 & n); + return t + } + function F(e) { + let t; + if (e >= "A" && e <= "F" ? t = e.charCodeAt(0) - "A".charCodeAt(0) + 10 : e >= "a" && e <= "f" ? t = e.charCodeAt(0) - "a".charCodeAt(0) + 10 : e >= "0" && e <= "9" && (t = e.charCodeAt(0) - "0".charCodeAt(0)), + "number" == typeof t) + return t; + throw new Error("The passed hex char is not a valid hex char") + } + function O(e) { + return e >= "A" && e <= "F" || e >= "a" && e <= "f" || e >= "0" && e <= "9" ? 1 : 0 + } + function S(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if ("string" != typeof e) + throw new Error("The passed string is not a string"); + let r = e.length; + t && r % 2 && (e = `0${e}`, + r++); + const n = Array(); + let o = 0 + , s = 0 + , i = 0; + for (let t = 0; t < r; t++) { + const r = e.charAt(t); + if (!O(r)) + throw new Error("The passed hex char is not a valid hex string"); + o <<= 4, + o += F(r), + s++, + 0 == s % 2 && (n[i++] = o, + o = 0) + } + return n + } + function _(e) { + if (!/^\d{4}-\d{2}-\d{2}( \d{2}-\d{2}-\d{2}|)/.test(e)) + throw new Error("The passed date string is not valid"); + const t = e.split(" ") + , r = t[0].split("-") + , n = parseInt(r[0], 10) + , o = parseInt(r[1], 10) - 1 + , s = parseInt(r[2], 10); + if (t.length > 1) { + const e = t[1].split("-") + , r = parseInt(e[0], 10) + , i = parseInt(e[1], 10) + , a = parseInt(e[2], 10); + return new Date(n,o,s,r,i,a) + } + return new Date(n,o,s) + } + function x(e) { + return e >= "0" && e <= "9" ? 1 : 0 + } + function R(e) { + if (null == e) + return -1; + if ("string" != typeof e) + return -1; + if (0 == e.length || "" == e) + return -1; + let t = 0; + if (40 == e.length) + for (; t < 40 && O(e.charAt(t)); t++) + ; + if (40 == t) + return 1; + for (t = 0; t < e.length && x(e.charAt(t)); t++) + ; + if (t == e.length) + return 2; + for (t = 0; t < e.length; t++) + if (e.charAt(t) > " ") + return 3; + return -1 + } + const N = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" + , k = {}; + for (let e = 0; e < N.length; e++) + k[N.charAt(e)] = e; + const U = 58; + function D(e) { + if (0 === e.length) + return ""; + let t, r; + const n = [0]; + for (t = 0; t < e.length; t++) { + for (r = 0; r < n.length; r++) + n[r] <<= 8; + n[0] += e[t]; + let o = 0; + for (r = 0; r < n.length; ++r) + n[r] += o, + o = n[r] / U | 0, + n[r] %= U; + for (; o; ) + n.push(o % U), + o = o / U | 0 + } + for (t = 0; 0 === e[t] && t < e.length - 1; t++) + n.push(0); + return n.reverse().map((e=>N[e])).join("") + } + function L(e) { + if (0 === e.length) + return []; + let t, r; + const n = [0]; + for (t = 0; t < e.length; t++) { + const o = e[t]; + if (!(o in k)) + throw new Error("Non-base58 character"); + for (r = 0; r < n.length; r++) + n[r] *= U; + n[0] += k[o]; + let s = 0; + for (r = 0; r < n.length; ++r) + n[r] += s, + s = n[r] >> 8, + n[r] &= 255; + for (; s; ) + n.push(255 & s), + s >>= 8 + } + for (t = 0; "1" === e[t] && t < e.length - 1; t++) + n.push(0); + return n.reverse() + } + const z = "0x0000000000000000000000000000000000000000000000000000000000000000" + , j = "6.8.0"; + function $(e, t, r) { + const n = t.split("|").map((e=>e.trim())); + for (let r = 0; r < n.length; r++) + switch (t) { + case "any": + return; + case "bigint": + case "boolean": + case "number": + case "string": + if (typeof e === t) + return + } + const o = new Error(`invalid value for type ${t}`); + throw o.code = "INVALID_ARGUMENT", + o.argument = `value.${r}`, + o.value = e, + o + } + async function V(e) { + const t = Object.keys(e); + return (await Promise.all(t.map((t=>Promise.resolve(e[t]))))).reduce(((e,r,n)=>(e[t[n]] = r, + e)), {}) + } + function G(e, t, r) { + for (let n in t) { + let o = t[n]; + const s = r ? r[n] : null; + s && $(o, s, n), + Object.defineProperty(e, n, { + enumerable: !0, + value: o, + writable: !1 + }) + } + } + function H(e) { + if (null == e) + return "null"; + if (Array.isArray(e)) + return "[ " + e.map(H).join(", ") + " ]"; + if (e instanceof Uint8Array) { + const t = "0123456789abcdef"; + let r = "0x"; + for (let n = 0; n < e.length; n++) + r += t[e[n] >> 4], + r += t[15 & e[n]]; + return r + } + if ("object" == typeof e && "function" == typeof e.toJSON) + return H(e.toJSON()); + switch (typeof e) { + case "boolean": + case "symbol": + case "number": + return e.toString(); + case "bigint": + return BigInt(e).toString(); + case "string": + return JSON.stringify(e); + case "object": + { + const t = Object.keys(e); + return t.sort(), + "{ " + t.map((t=>`${H(t)}: ${H(e[t])}`)).join(", ") + " }" + } + } + return "[ COULD NOT SERIALIZE ]" + } + function K(e, t) { + return e && e.code === t + } + function Z(e, t, r) { + let n, o = e; + { + const n = []; + if (r) { + if ("message"in r || "code"in r || "name"in r) + throw new Error(`value will overwrite populated values: ${H(r)}`); + for (const e in r) { + if ("shortMessage" === e) + continue; + const t = r[e]; + n.push(e + "=" + H(t)) + } + } + n.push(`code=${t}`), + n.push(`version=${j}`), + n.length && (e += " (" + n.join(", ") + ")") + } + switch (t) { + case "INVALID_ARGUMENT": + n = new TypeError(e); + break; + case "NUMERIC_FAULT": + case "BUFFER_OVERRUN": + n = new RangeError(e); + break; + default: + n = new Error(e) + } + return G(n, { + code: t + }), + r && Object.assign(n, r), + null == n.shortMessage && G(n, { + shortMessage: o + }), + n + } + function q(e, t, r, n) { + if (!e) + throw Z(t, r, n) + } + function J(e, t, r, n) { + q(e, t, "INVALID_ARGUMENT", { + argument: r, + value: n + }) + } + function Y(e, t, r) { + null == r && (r = ""), + r && (r = ": " + r), + q(e >= t, "missing arguemnt" + r, "MISSING_ARGUMENT", { + count: e, + expectedCount: t + }), + q(e <= t, "too many arguemnts" + r, "UNEXPECTED_ARGUMENT", { + count: e, + expectedCount: t + }) + } + const X = ["NFD", "NFC", "NFKD", "NFKC"].reduce(((e,t)=>{ + try { + if ("test" !== "test".normalize(t)) + throw new Error("bad"); + if ("NFD" === t) { + if (String.fromCharCode(233).normalize("NFD") !== String.fromCharCode(101, 769)) + throw new Error("broken") + } + e.push(t) + } catch (e) {} + return e + } + ), []); + function Q(e) { + q(X.indexOf(e) >= 0, "platform missing String.prototype.normalize", "UNSUPPORTED_OPERATION", { + operation: "String.prototype.normalize", + info: { + form: e + } + }) + } + function ee(e, t, r) { + if (null == r && (r = ""), + e !== t) { + let e = r + , t = "new"; + r && (e += ".", + t += " " + r), + q(!1, `private constructor; use ${e}from* methods`, "UNSUPPORTED_OPERATION", { + operation: t + }) + } + } + function te(e, t, r) { + if (e instanceof Uint8Array) + return r ? new Uint8Array(e) : e; + if ("string" == typeof e && e.match(/^0x([0-9a-f][0-9a-f])*$/i)) { + const t = new Uint8Array((e.length - 2) / 2); + let r = 2; + for (let n = 0; n < t.length; n++) + t[n] = parseInt(e.substring(r, r + 2), 16), + r += 2; + return t + } + J(!1, "invalid BytesLike value", t || "value", e) + } + function re(e, t) { + return te(e, t, !1) + } + function ne(e, t) { + return te(e, t, !0) + } + function oe(e, t) { + return !("string" != typeof e || !e.match(/^0x[0-9A-Fa-f]*$/) || "number" == typeof t && e.length !== 2 + 2 * t || !0 === t && e.length % 2 != 0) + } + function se(e) { + return oe(e, !0) || e instanceof Uint8Array + } + const ie = "0123456789abcdef"; + function ae(e) { + const t = re(e); + let r = "0x"; + for (let e = 0; e < t.length; e++) { + const n = t[e]; + r += ie[(240 & n) >> 4] + ie[15 & n] + } + return r + } + function ue(e) { + return "0x" + e.map((e=>ae(e).substring(2))).join("") + } + function ce(e) { + return oe(e, !0) ? (e.length - 2) / 2 : re(e).length + } + function le(e, t, r) { + const n = re(e); + return null != r && r > n.length && q(!1, "cannot slice beyond data bounds", "BUFFER_OVERRUN", { + buffer: n, + length: n.length, + offset: r + }), + ae(n.slice(null == t ? 0 : t, null == r ? n.length : r)) + } + function de(e, t) { + return function(e, t, r) { + const n = re(e); + q(t >= n.length, "padding exceeds data length", "BUFFER_OVERRUN", { + buffer: new Uint8Array(n), + length: t, + offset: t + 1 + }); + const o = new Uint8Array(t); + return o.fill(0), + r ? o.set(n, t - n.length) : o.set(n, 0), + ae(o) + }(e, t, !0) + } + const he = BigInt(0) + , pe = BigInt(1) + , fe = 9007199254740991; + function ge(e, t) { + let r = be(e, "value"); + const n = BigInt(we(t, "width")) + , o = pe << n - pe; + return r < he ? (r = -r, + q(r <= o, "too low", "NUMERIC_FAULT", { + operation: "toTwos", + fault: "overflow", + value: e + }), + (~r & (pe << n) - pe) + pe) : (q(r < o, "too high", "NUMERIC_FAULT", { + operation: "toTwos", + fault: "overflow", + value: e + }), + r) + } + function ye(e, t) { + const r = me(e, "value") + , n = BigInt(we(t, "bits")); + return r & (pe << n) - pe + } + function be(e, t) { + switch (typeof e) { + case "bigint": + return e; + case "number": + return J(Number.isInteger(e), "underflow", t || "value", e), + J(e >= -fe && e <= fe, "overflow", t || "value", e), + BigInt(e); + case "string": + try { + if ("" === e) + throw new Error("empty string"); + return "-" === e[0] && "-" !== e[1] ? -BigInt(e.substring(1)) : BigInt(e) + } catch (r) { + J(!1, `invalid BigNumberish string: ${r.message}`, t || "value", e) + } + } + J(!1, "invalid BigNumberish value", t || "value", e) + } + function me(e, t) { + const r = be(e, t); + return q(r >= he, "unsigned value cannot be negative", "NUMERIC_FAULT", { + fault: "overflow", + operation: "getUint", + value: e + }), + r + } + const Te = "0123456789abcdef"; + function ve(e) { + if (e instanceof Uint8Array) { + let t = "0x0"; + for (const r of e) + t += Te[r >> 4], + t += Te[15 & r]; + return BigInt(t) + } + return be(e) + } + function we(e, t) { + switch (typeof e) { + case "bigint": + return J(e >= -fe && e <= fe, "overflow", t || "value", e), + Number(e); + case "number": + return J(Number.isInteger(e), "underflow", t || "value", e), + J(e >= -fe && e <= fe, "overflow", t || "value", e), + e; + case "string": + try { + if ("" === e) + throw new Error("empty string"); + return we(BigInt(e), t) + } catch (r) { + J(!1, `invalid numeric string: ${r.message}`, t || "value", e) + } + } + J(!1, "invalid numeric value", t || "value", e) + } + function Ae(e, t) { + let r = me(e, "value").toString(16); + if (null == t) + r.length % 2 && (r = "0" + r); + else { + const n = we(t, "width"); + for (q(2 * n >= r.length, `value exceeds width (${n} bits)`, "NUMERIC_FAULT", { + operation: "toBeHex", + fault: "overflow", + value: e + }); r.length < 2 * n; ) + r = "0" + r + } + return "0x" + r + } + function Pe(e) { + const t = me(e, "value"); + if (t === he) + return new Uint8Array([]); + let r = t.toString(16); + r.length % 2 && (r = "0" + r); + const n = new Uint8Array(r.length / 2); + for (let e = 0; e < n.length; e++) { + const t = 2 * e; + n[e] = parseInt(r.substring(t, t + 2), 16) + } + return n + } + const We = BigInt(0) + , Be = BigInt(1) + , Ce = BigInt(2) + , Ee = BigInt(27) + , Me = BigInt(28) + , Ie = BigInt(35) + , Fe = {}; + function Oe(e) { + return de(Pe(e), 32) + } + class Se { + #e; + #t; + #r; + #n; + get r() { + return this.#e + } + set r(e) { + J(32 === ce(e), "invalid r", "value", e), + this.#e = ae(e) + } + get s() { + return this.#t + } + set s(e) { + J(32 === ce(e), "invalid s", "value", e); + const t = ae(e); + J(parseInt(t.substring(0, 3)) < 8, "non-canonical s", "value", t), + this.#t = t + } + get v() { + return this.#r + } + set v(e) { + const t = we(e, "value"); + J(27 === t || 28 === t, "invalid v", "v", e), + this.#r = t + } + get networkV() { + return this.#n + } + get legacyChainId() { + const e = this.networkV; + return null == e ? null : Se.getChainId(e) + } + get yParity() { + return 27 === this.v ? 0 : 1 + } + get yParityAndS() { + const e = re(this.s); + return this.yParity && (e[0] |= 128), + ae(e) + } + get compactSerialized() { + return ue([this.r, this.yParityAndS]) + } + get serialized() { + return ue([this.r, this.s, this.yParity ? "0x1c" : "0x1b"]) + } + constructor(e, t, r, n) { + ee(e, Fe, "Signature"), + this.#e = t, + this.#t = r, + this.#r = n, + this.#n = null + } + [Symbol.for("nodejs.util.inspect.custom")]() { + return `Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }` + } + clone() { + const e = new Se(Fe,this.r,this.s,this.v); + return this.networkV && (e.#n = this.networkV), + e + } + toJSON() { + const e = this.networkV; + return { + _type: "signature", + networkV: null != e ? e.toString() : null, + r: this.r, + s: this.s, + v: this.v + } + } + static getChainId(e) { + const t = be(e, "v"); + return t == Ee || t == Me ? We : (J(t >= Ie, "invalid EIP-155 v", "v", e), + (t - Ie) / Ce) + } + static getChainIdV(e, t) { + return be(e) * Ce + BigInt(35 + t - 27) + } + static getNormalizedV(e) { + const t = be(e); + return t === We || t === Ee ? 27 : t === Be || t === Me ? 28 : (J(t >= Ie, "invalid v", "v", e), + t & Be ? 27 : 28) + } + static from(e) { + function t(t, r) { + J(t, r, "signature", e) + } + if (null == e) + return new Se(Fe,z,z,27); + if ("string" == typeof e) { + const r = re(e, "signature"); + if (64 === r.length) { + const e = ae(r.slice(0, 32)) + , t = r.slice(32, 64) + , n = 128 & t[0] ? 28 : 27; + return t[0] &= 127, + new Se(Fe,e,ae(t),n) + } + if (65 === r.length) { + const e = ae(r.slice(0, 32)) + , n = r.slice(32, 64); + t(0 == (128 & n[0]), "non-canonical s"); + const o = Se.getNormalizedV(r[64]); + return new Se(Fe,e,ae(n),o) + } + t(!1, "invalid raw signature length") + } + if (e instanceof Se) + return e.clone(); + const r = e.r; + t(null != r, "missing r"); + const n = Oe(r) + , o = function(e, r) { + if (null != e) + return Oe(e); + if (null != r) { + t(oe(r, 32), "invalid yParityAndS"); + const e = re(r); + return e[0] &= 127, + ae(e) + } + t(!1, "missing s") + }(e.s, e.yParityAndS); + t(0 == (128 & re(o)[0]), "non-canonical s"); + const {networkV: s, v: i} = function(e, r, n) { + if (null != e) { + const t = be(e); + return { + networkV: t >= Ie ? t : void 0, + v: Se.getNormalizedV(t) + } + } + if (null != r) + return t(oe(r, 32), "invalid yParityAndS"), + { + v: 128 & re(r)[0] ? 28 : 27 + }; + if (null != n) { + switch (we(n, "sig.yParity")) { + case 0: + return { + v: 27 + }; + case 1: + return { + v: 28 + } + } + t(!1, "invalid yParity") + } + t(!1, "missing v") + }(e.v, e.yParityAndS, e.yParity) + , a = new Se(Fe,n,o,i); + return s && (a.#n = s), + t(null == e.yParity || we(e.yParity, "sig.yParity") === a.yParity, "yParity mismatch"), + t(null == e.yParityAndS || e.yParityAndS === a.yParityAndS, "yParityAndS mismatch"), + a + } + } + function _e(e) { + if (!Number.isSafeInteger(e) || e < 0) + throw new Error(`Wrong positive integer: ${e}`) + } + function xe(e, ...t) { + if (!(e instanceof Uint8Array)) + throw new Error("Expected Uint8Array"); + if (t.length > 0 && !t.includes(e.length)) + throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`) + } + function Re(e) { + if ("function" != typeof e || "function" != typeof e.create) + throw new Error("Hash should be wrapped by utils.wrapConstructor"); + _e(e.outputLen), + _e(e.blockLen) + } + function Ne(e, t=!0) { + if (e.destroyed) + throw new Error("Hash instance has been destroyed"); + if (t && e.finished) + throw new Error("Hash#digest() has already been called") + } + function ke(e, t) { + xe(e); + const r = t.outputLen; + if (e.length < r) + throw new Error(`digestInto() expects output buffer of length at least ${r}`) + } + const Ue = "object" == typeof globalThis && "crypto"in globalThis ? globalThis.crypto : void 0 + , De = e=>e instanceof Uint8Array + , Le = e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength / 4)) + , ze = e=>new DataView(e.buffer,e.byteOffset,e.byteLength) + , je = (e,t)=>e << 32 - t | e >>> t; + if (68 !== new Uint8Array(new Uint32Array([287454020]).buffer)[0]) + throw new Error("Non little-endian hardware is not supported"); + const $e = async()=>{} + ; + async function Ve(e, t, r) { + let n = Date.now(); + for (let o = 0; o < e; o++) { + r(o); + const e = Date.now() - n; + e >= 0 && e < t || (await $e(), + n += e) + } + } + function Ge(e) { + if ("string" == typeof e && (e = function(e) { + if ("string" != typeof e) + throw new Error("utf8ToBytes expected string, got " + typeof e); + return new Uint8Array((new TextEncoder).encode(e)) + }(e)), + !De(e)) + throw new Error("expected Uint8Array, got " + typeof e); + return e + } + class He { + clone() { + return this._cloneInto() + } + } + const Ke = {}.toString; + function Ze(e, t) { + if (void 0 !== t && "[object Object]" !== Ke.call(t)) + throw new Error("Options should be object or undefined"); + return Object.assign(e, t) + } + function qe(e) { + const t = t=>e().update(Ge(t)).digest() + , r = e(); + return t.outputLen = r.outputLen, + t.blockLen = r.blockLen, + t.create = ()=>e(), + t + } + function Je(e=32) { + if (Ue && "function" == typeof Ue.getRandomValues) + return Ue.getRandomValues(new Uint8Array(e)); + throw new Error("crypto.getRandomValues must be defined") + } + class Ye extends He { + constructor(e, t) { + super(), + this.finished = !1, + this.destroyed = !1, + Re(e); + const r = Ge(t); + if (this.iHash = e.create(), + "function" != typeof this.iHash.update) + throw new Error("Expected instance of class which extends utils.Hash"); + this.blockLen = this.iHash.blockLen, + this.outputLen = this.iHash.outputLen; + const n = this.blockLen + , o = new Uint8Array(n); + o.set(r.length > n ? e.create().update(r).digest() : r); + for (let e = 0; e < o.length; e++) + o[e] ^= 54; + this.iHash.update(o), + this.oHash = e.create(); + for (let e = 0; e < o.length; e++) + o[e] ^= 106; + this.oHash.update(o), + o.fill(0) + } + update(e) { + return Ne(this), + this.iHash.update(e), + this + } + digestInto(e) { + Ne(this), + xe(e, this.outputLen), + this.finished = !0, + this.iHash.digestInto(e), + this.oHash.update(e), + this.oHash.digestInto(e), + this.destroy() + } + digest() { + const e = new Uint8Array(this.oHash.outputLen); + return this.digestInto(e), + e + } + _cloneInto(e) { + e || (e = Object.create(Object.getPrototypeOf(this), {})); + const {oHash: t, iHash: r, finished: n, destroyed: o, blockLen: s, outputLen: i} = this; + return e.finished = n, + e.destroyed = o, + e.blockLen = s, + e.outputLen = i, + e.oHash = t._cloneInto(e.oHash), + e.iHash = r._cloneInto(e.iHash), + e + } + destroy() { + this.destroyed = !0, + this.oHash.destroy(), + this.iHash.destroy() + } + } + const Xe = (e,t,r)=>new Ye(e,t).update(r).digest(); + function Qe(e, t, r, n) { + const {c: o, dkLen: s, DK: i, PRF: a, PRFSalt: u} = function(e, t, r, n) { + Re(e); + const o = Ze({ + dkLen: 32, + asyncTick: 10 + }, n) + , {c: s, dkLen: i, asyncTick: a} = o; + if (_e(s), + _e(i), + _e(a), + s < 1) + throw new Error("PBKDF2: iterations (c) should be >= 1"); + const u = Ge(t) + , c = Ge(r) + , l = new Uint8Array(i) + , d = Xe.create(e, u) + , h = d._cloneInto().update(c); + return { + c: s, + dkLen: i, + asyncTick: a, + DK: l, + PRF: d, + PRFSalt: h + } + }(e, t, r, n); + let c; + const l = new Uint8Array(4) + , d = ze(l) + , h = new Uint8Array(a.outputLen); + for (let e = 1, t = 0; t < s; e++, + t += a.outputLen) { + const r = i.subarray(t, t + a.outputLen); + d.setInt32(0, e, !1), + (c = u._cloneInto(c)).update(l).digestInto(h), + r.set(h.subarray(0, r.length)); + for (let e = 1; e < o; e++) { + a._cloneInto(c).update(h).digestInto(h); + for (let e = 0; e < r.length; e++) + r[e] ^= h[e] + } + } + return function(e, t, r, n, o) { + return e.destroy(), + t.destroy(), + n && n.destroy(), + o.fill(0), + r + }(a, u, i, c, h) + } + Xe.create = (e,t)=>new Ye(e,t); + class et extends He { + constructor(e, t, r, n) { + super(), + this.blockLen = e, + this.outputLen = t, + this.padOffset = r, + this.isLE = n, + this.finished = !1, + this.length = 0, + this.pos = 0, + this.destroyed = !1, + this.buffer = new Uint8Array(e), + this.view = ze(this.buffer) + } + update(e) { + Ne(this); + const {view: t, buffer: r, blockLen: n} = this + , o = (e = Ge(e)).length; + for (let s = 0; s < o; ) { + const i = Math.min(n - this.pos, o - s); + if (i !== n) + r.set(e.subarray(s, s + i), this.pos), + this.pos += i, + s += i, + this.pos === n && (this.process(t, 0), + this.pos = 0); + else { + const t = ze(e); + for (; n <= o - s; s += n) + this.process(t, s) + } + } + return this.length += e.length, + this.roundClean(), + this + } + digestInto(e) { + Ne(this), + ke(e, this), + this.finished = !0; + const {buffer: t, view: r, blockLen: n, isLE: o} = this; + let {pos: s} = this; + t[s++] = 128, + this.buffer.subarray(s).fill(0), + this.padOffset > n - s && (this.process(r, 0), + s = 0); + for (let e = s; e < n; e++) + t[e] = 0; + !function(e, t, r, n) { + if ("function" == typeof e.setBigUint64) + return e.setBigUint64(t, r, n); + const o = BigInt(32) + , s = BigInt(4294967295) + , i = Number(r >> o & s) + , a = Number(r & s) + , u = n ? 4 : 0 + , c = n ? 0 : 4; + e.setUint32(t + u, i, n), + e.setUint32(t + c, a, n) + }(r, n - 8, BigInt(8 * this.length), o), + this.process(r, 0); + const i = ze(e) + , a = this.outputLen; + if (a % 4) + throw new Error("_sha2: outputLen should be aligned to 32bit"); + const u = a / 4 + , c = this.get(); + if (u > c.length) + throw new Error("_sha2: outputLen bigger than state"); + for (let e = 0; e < u; e++) + i.setUint32(4 * e, c[e], o) + } + digest() { + const {buffer: e, outputLen: t} = this; + this.digestInto(e); + const r = e.slice(0, t); + return this.destroy(), + r + } + _cloneInto(e) { + e || (e = new this.constructor), + e.set(...this.get()); + const {blockLen: t, buffer: r, length: n, finished: o, destroyed: s, pos: i} = this; + return e.length = n, + e.pos = i, + e.finished = o, + e.destroyed = s, + n % t && e.buffer.set(r), + e + } + } + const tt = (e,t,r)=>e & t ^ ~e & r + , rt = (e,t,r)=>e & t ^ e & r ^ t & r + , nt = new Uint32Array([1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]) + , ot = new Uint32Array([1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]) + , st = new Uint32Array(64); + class it extends et { + constructor() { + super(64, 32, 8, !1), + this.A = 0 | ot[0], + this.B = 0 | ot[1], + this.C = 0 | ot[2], + this.D = 0 | ot[3], + this.E = 0 | ot[4], + this.F = 0 | ot[5], + this.G = 0 | ot[6], + this.H = 0 | ot[7] + } + get() { + const {A: e, B: t, C: r, D: n, E: o, F: s, G: i, H: a} = this; + return [e, t, r, n, o, s, i, a] + } + set(e, t, r, n, o, s, i, a) { + this.A = 0 | e, + this.B = 0 | t, + this.C = 0 | r, + this.D = 0 | n, + this.E = 0 | o, + this.F = 0 | s, + this.G = 0 | i, + this.H = 0 | a + } + process(e, t) { + for (let r = 0; r < 16; r++, + t += 4) + st[r] = e.getUint32(t, !1); + for (let e = 16; e < 64; e++) { + const t = st[e - 15] + , r = st[e - 2] + , n = je(t, 7) ^ je(t, 18) ^ t >>> 3 + , o = je(r, 17) ^ je(r, 19) ^ r >>> 10; + st[e] = o + st[e - 7] + n + st[e - 16] | 0 + } + let {A: r, B: n, C: o, D: s, E: i, F: a, G: u, H: c} = this; + for (let e = 0; e < 64; e++) { + const t = c + (je(i, 6) ^ je(i, 11) ^ je(i, 25)) + tt(i, a, u) + nt[e] + st[e] | 0 + , l = (je(r, 2) ^ je(r, 13) ^ je(r, 22)) + rt(r, n, o) | 0; + c = u, + u = a, + a = i, + i = s + t | 0, + s = o, + o = n, + n = r, + r = t + l | 0 + } + r = r + this.A | 0, + n = n + this.B | 0, + o = o + this.C | 0, + s = s + this.D | 0, + i = i + this.E | 0, + a = a + this.F | 0, + u = u + this.G | 0, + c = c + this.H | 0, + this.set(r, n, o, s, i, a, u, c) + } + roundClean() { + st.fill(0) + } + destroy() { + this.set(0, 0, 0, 0, 0, 0, 0, 0), + this.buffer.fill(0) + } + } + const at = qe((()=>new it)) + , ut = BigInt(2 ** 32 - 1) + , ct = BigInt(32); + function lt(e, t=!1) { + return t ? { + h: Number(e & ut), + l: Number(e >> ct & ut) + } : { + h: 0 | Number(e >> ct & ut), + l: 0 | Number(e & ut) + } + } + function dt(e, t=!1) { + let r = new Uint32Array(e.length) + , n = new Uint32Array(e.length); + for (let o = 0; o < e.length; o++) { + const {h: s, l: i} = lt(e[o], t); + [r[o],n[o]] = [s, i] + } + return [r, n] + } + const ht = (e,t,r)=>e << r | t >>> 32 - r + , pt = (e,t,r)=>t << r | e >>> 32 - r + , ft = (e,t,r)=>t << r - 32 | e >>> 64 - r + , gt = (e,t,r)=>e << r - 32 | t >>> 64 - r + , yt = { + fromBig: lt, + split: dt, + toBig: (e,t)=>BigInt(e >>> 0) << ct | BigInt(t >>> 0), + shrSH: (e,t,r)=>e >>> r, + shrSL: (e,t,r)=>e << 32 - r | t >>> r, + rotrSH: (e,t,r)=>e >>> r | t << 32 - r, + rotrSL: (e,t,r)=>e << 32 - r | t >>> r, + rotrBH: (e,t,r)=>e << 64 - r | t >>> r - 32, + rotrBL: (e,t,r)=>e >>> r - 32 | t << 64 - r, + rotr32H: (e,t)=>t, + rotr32L: (e,t)=>e, + rotlSH: ht, + rotlSL: pt, + rotlBH: ft, + rotlBL: gt, + add: function(e, t, r, n) { + const o = (t >>> 0) + (n >>> 0); + return { + h: e + r + (o / 2 ** 32 | 0) | 0, + l: 0 | o + } + }, + add3L: (e,t,r)=>(e >>> 0) + (t >>> 0) + (r >>> 0), + add3H: (e,t,r,n)=>t + r + n + (e / 2 ** 32 | 0) | 0, + add4L: (e,t,r,n)=>(e >>> 0) + (t >>> 0) + (r >>> 0) + (n >>> 0), + add4H: (e,t,r,n,o)=>t + r + n + o + (e / 2 ** 32 | 0) | 0, + add5H: (e,t,r,n,o,s)=>t + r + n + o + s + (e / 2 ** 32 | 0) | 0, + add5L: (e,t,r,n,o)=>(e >>> 0) + (t >>> 0) + (r >>> 0) + (n >>> 0) + (o >>> 0) + } + , [bt,mt] = (()=>yt.split(["0x428a2f98d728ae22", "0x7137449123ef65cd", "0xb5c0fbcfec4d3b2f", "0xe9b5dba58189dbbc", "0x3956c25bf348b538", "0x59f111f1b605d019", "0x923f82a4af194f9b", "0xab1c5ed5da6d8118", "0xd807aa98a3030242", "0x12835b0145706fbe", "0x243185be4ee4b28c", "0x550c7dc3d5ffb4e2", "0x72be5d74f27b896f", "0x80deb1fe3b1696b1", "0x9bdc06a725c71235", "0xc19bf174cf692694", "0xe49b69c19ef14ad2", "0xefbe4786384f25e3", "0x0fc19dc68b8cd5b5", "0x240ca1cc77ac9c65", "0x2de92c6f592b0275", "0x4a7484aa6ea6e483", "0x5cb0a9dcbd41fbd4", "0x76f988da831153b5", "0x983e5152ee66dfab", "0xa831c66d2db43210", "0xb00327c898fb213f", "0xbf597fc7beef0ee4", "0xc6e00bf33da88fc2", "0xd5a79147930aa725", "0x06ca6351e003826f", "0x142929670a0e6e70", "0x27b70a8546d22ffc", "0x2e1b21385c26c926", "0x4d2c6dfc5ac42aed", "0x53380d139d95b3df", "0x650a73548baf63de", "0x766a0abb3c77b2a8", "0x81c2c92e47edaee6", "0x92722c851482353b", "0xa2bfe8a14cf10364", "0xa81a664bbc423001", "0xc24b8b70d0f89791", "0xc76c51a30654be30", "0xd192e819d6ef5218", "0xd69906245565a910", "0xf40e35855771202a", "0x106aa07032bbd1b8", "0x19a4c116b8d2d0c8", "0x1e376c085141ab53", "0x2748774cdf8eeb99", "0x34b0bcb5e19b48a8", "0x391c0cb3c5c95a63", "0x4ed8aa4ae3418acb", "0x5b9cca4f7763e373", "0x682e6ff3d6b2b8a3", "0x748f82ee5defb2fc", "0x78a5636f43172f60", "0x84c87814a1f0ab72", "0x8cc702081a6439ec", "0x90befffa23631e28", "0xa4506cebde82bde9", "0xbef9a3f7b2c67915", "0xc67178f2e372532b", "0xca273eceea26619c", "0xd186b8c721c0c207", "0xeada7dd6cde0eb1e", "0xf57d4f7fee6ed178", "0x06f067aa72176fba", "0x0a637dc5a2c898a6", "0x113f9804bef90dae", "0x1b710b35131c471b", "0x28db77f523047d84", "0x32caab7b40c72493", "0x3c9ebe0a15c9bebc", "0x431d67c49c100d4c", "0x4cc5d4becb3e42b6", "0x597f299cfc657e2a", "0x5fcb6fab3ad6faec", "0x6c44198c4a475817"].map((e=>BigInt(e)))))() + , Tt = new Uint32Array(80) + , vt = new Uint32Array(80); + class wt extends et { + constructor() { + super(128, 64, 16, !1), + this.Ah = 1779033703, + this.Al = -205731576, + this.Bh = -1150833019, + this.Bl = -2067093701, + this.Ch = 1013904242, + this.Cl = -23791573, + this.Dh = -1521486534, + this.Dl = 1595750129, + this.Eh = 1359893119, + this.El = -1377402159, + this.Fh = -1694144372, + this.Fl = 725511199, + this.Gh = 528734635, + this.Gl = -79577749, + this.Hh = 1541459225, + this.Hl = 327033209 + } + get() { + const {Ah: e, Al: t, Bh: r, Bl: n, Ch: o, Cl: s, Dh: i, Dl: a, Eh: u, El: c, Fh: l, Fl: d, Gh: h, Gl: p, Hh: f, Hl: g} = this; + return [e, t, r, n, o, s, i, a, u, c, l, d, h, p, f, g] + } + set(e, t, r, n, o, s, i, a, u, c, l, d, h, p, f, g) { + this.Ah = 0 | e, + this.Al = 0 | t, + this.Bh = 0 | r, + this.Bl = 0 | n, + this.Ch = 0 | o, + this.Cl = 0 | s, + this.Dh = 0 | i, + this.Dl = 0 | a, + this.Eh = 0 | u, + this.El = 0 | c, + this.Fh = 0 | l, + this.Fl = 0 | d, + this.Gh = 0 | h, + this.Gl = 0 | p, + this.Hh = 0 | f, + this.Hl = 0 | g + } + process(e, t) { + for (let r = 0; r < 16; r++, + t += 4) + Tt[r] = e.getUint32(t), + vt[r] = e.getUint32(t += 4); + for (let e = 16; e < 80; e++) { + const t = 0 | Tt[e - 15] + , r = 0 | vt[e - 15] + , n = yt.rotrSH(t, r, 1) ^ yt.rotrSH(t, r, 8) ^ yt.shrSH(t, r, 7) + , o = yt.rotrSL(t, r, 1) ^ yt.rotrSL(t, r, 8) ^ yt.shrSL(t, r, 7) + , s = 0 | Tt[e - 2] + , i = 0 | vt[e - 2] + , a = yt.rotrSH(s, i, 19) ^ yt.rotrBH(s, i, 61) ^ yt.shrSH(s, i, 6) + , u = yt.rotrSL(s, i, 19) ^ yt.rotrBL(s, i, 61) ^ yt.shrSL(s, i, 6) + , c = yt.add4L(o, u, vt[e - 7], vt[e - 16]) + , l = yt.add4H(c, n, a, Tt[e - 7], Tt[e - 16]); + Tt[e] = 0 | l, + vt[e] = 0 | c + } + let {Ah: r, Al: n, Bh: o, Bl: s, Ch: i, Cl: a, Dh: u, Dl: c, Eh: l, El: d, Fh: h, Fl: p, Gh: f, Gl: g, Hh: y, Hl: b} = this; + for (let e = 0; e < 80; e++) { + const t = yt.rotrSH(l, d, 14) ^ yt.rotrSH(l, d, 18) ^ yt.rotrBH(l, d, 41) + , m = yt.rotrSL(l, d, 14) ^ yt.rotrSL(l, d, 18) ^ yt.rotrBL(l, d, 41) + , T = l & h ^ ~l & f + , v = d & p ^ ~d & g + , w = yt.add5L(b, m, v, mt[e], vt[e]) + , A = yt.add5H(w, y, t, T, bt[e], Tt[e]) + , P = 0 | w + , W = yt.rotrSH(r, n, 28) ^ yt.rotrBH(r, n, 34) ^ yt.rotrBH(r, n, 39) + , B = yt.rotrSL(r, n, 28) ^ yt.rotrBL(r, n, 34) ^ yt.rotrBL(r, n, 39) + , C = r & o ^ r & i ^ o & i + , E = n & s ^ n & a ^ s & a; + y = 0 | f, + b = 0 | g, + f = 0 | h, + g = 0 | p, + h = 0 | l, + p = 0 | d, + ({h: l, l: d} = yt.add(0 | u, 0 | c, 0 | A, 0 | P)), + u = 0 | i, + c = 0 | a, + i = 0 | o, + a = 0 | s, + o = 0 | r, + s = 0 | n; + const M = yt.add3L(P, B, E); + r = yt.add3H(M, A, W, C), + n = 0 | M + } + ({h: r, l: n} = yt.add(0 | this.Ah, 0 | this.Al, 0 | r, 0 | n)), + ({h: o, l: s} = yt.add(0 | this.Bh, 0 | this.Bl, 0 | o, 0 | s)), + ({h: i, l: a} = yt.add(0 | this.Ch, 0 | this.Cl, 0 | i, 0 | a)), + ({h: u, l: c} = yt.add(0 | this.Dh, 0 | this.Dl, 0 | u, 0 | c)), + ({h: l, l: d} = yt.add(0 | this.Eh, 0 | this.El, 0 | l, 0 | d)), + ({h, l: p} = yt.add(0 | this.Fh, 0 | this.Fl, 0 | h, 0 | p)), + ({h: f, l: g} = yt.add(0 | this.Gh, 0 | this.Gl, 0 | f, 0 | g)), + ({h: y, l: b} = yt.add(0 | this.Hh, 0 | this.Hl, 0 | y, 0 | b)), + this.set(r, n, o, s, i, a, u, c, l, d, h, p, f, g, y, b) + } + roundClean() { + Tt.fill(0), + vt.fill(0) + } + destroy() { + this.buffer.fill(0), + this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + } + } + const At = qe((()=>new wt)) + , Pt = function() { + if ("undefined" != typeof self) + return self; + if ("undefined" != typeof window) + return window; + if ("undefined" != typeof global) + return global; + throw new Error("unable to locate global object") + }() + , Wt = Pt.crypto || Pt.msCrypto; + function Bt(e) { + switch (e) { + case "sha256": + return at.create(); + case "sha512": + return At.create() + } + J(!1, "invalid hashing algorithm name", "algorithm", e) + } + const Ct = function(e) { + return Bt("sha256").update(e).digest() + } + , Et = function(e) { + return Bt("sha512").update(e).digest() + }; + let Mt = Ct + , It = Et + , Ft = !1 + , Ot = !1; + function St(e) { + const t = re(e, "data"); + return ae(Mt(t)) + } + function _t(e) { + const t = re(e, "data"); + return ae(It(t)) + } + St._ = Ct, + St.lock = function() { + Ft = !0 + } + , + St.register = function(e) { + if (Ft) + throw new Error("sha256 is locked"); + Mt = e + } + , + Object.freeze(St), + _t._ = Et, + _t.lock = function() { + Ot = !0 + } + , + _t.register = function(e) { + if (Ot) + throw new Error("sha512 is locked"); + It = e + } + , + Object.freeze(St); + let xt = !1; + const Rt = function(e, t, r, n, o) { + return function(e, t, r, n, o) { + const s = { + sha256: at, + sha512: At + }[o]; + return J(null != s, "invalid pbkdf2 algorithm", "algorithm", o), + Qe(s, e, t, { + c: r, + dkLen: n + }) + }(e, t, r, n, o) + }; + let Nt = Rt; + function kt(e, t, r, n, o) { + const s = re(e, "password") + , i = re(t, "salt"); + return ae(Nt(s, i, r, n, o)) + } + function Ut(e, t, r, n, o) { + if ("BAD_PREFIX" === e || "UNEXPECTED_CONTINUE" === e) { + let e = 0; + for (let n = t + 1; n < r.length && r[n] >> 6 == 2; n++) + e++; + return e + } + return "OVERRUN" === e ? r.length - t - 1 : 0 + } + kt._ = Rt, + kt.lock = function() { + xt = !0 + } + , + kt.register = function(e) { + if (xt) + throw new Error("pbkdf2 is locked"); + Nt = e + } + , + Object.freeze(kt); + const Dt = Object.freeze({ + error: function(e, t, r, n, o) { + J(!1, `invalid codepoint at offset ${t}; ${e}`, "bytes", r) + }, + ignore: Ut, + replace: function(e, t, r, n, o) { + return "OVERLONG" === e ? (J("number" == typeof o, "invalid bad code point for replacement", "badCodepoint", o), + n.push(o), + 0) : (n.push(65533), + Ut(e, t, r)) + } + }); + function Lt(e, t) { + null != t && (Q(t), + e = e.normalize(t)); + let r = []; + for (let t = 0; t < e.length; t++) { + const n = e.charCodeAt(t); + if (n < 128) + r.push(n); + else if (n < 2048) + r.push(n >> 6 | 192), + r.push(63 & n | 128); + else if (55296 == (64512 & n)) { + t++; + const o = e.charCodeAt(t); + J(t < e.length && 56320 == (64512 & o), "invalid surrogate pair", "str", e); + const s = 65536 + ((1023 & n) << 10) + (1023 & o); + r.push(s >> 18 | 240), + r.push(s >> 12 & 63 | 128), + r.push(s >> 6 & 63 | 128), + r.push(63 & s | 128) + } else + r.push(n >> 12 | 224), + r.push(n >> 6 & 63 | 128), + r.push(63 & n | 128) + } + return new Uint8Array(r) + } + function zt(e, t) { + return function(e, t) { + null == t && (t = Dt.error); + const r = re(e, "bytes") + , n = []; + let o = 0; + for (; o < r.length; ) { + const e = r[o++]; + if (e >> 7 == 0) { + n.push(e); + continue + } + let s = null + , i = null; + if (192 == (224 & e)) + s = 1, + i = 127; + else if (224 == (240 & e)) + s = 2, + i = 2047; + else { + if (240 != (248 & e)) { + o += t(128 == (192 & e) ? "UNEXPECTED_CONTINUE" : "BAD_PREFIX", o - 1, r, n); + continue + } + s = 3, + i = 65535 + } + if (o - 1 + s >= r.length) { + o += t("OVERRUN", o - 1, r, n); + continue + } + let a = e & (1 << 8 - s - 1) - 1; + for (let e = 0; e < s; e++) { + let e = r[o]; + if (128 != (192 & e)) { + o += t("MISSING_CONTINUE", o, r, n), + a = null; + break + } + a = a << 6 | 63 & e, + o++ + } + null !== a && (a > 1114111 ? o += t("OUT_OF_RANGE", o - 1 - s, r, n, a) : a >= 55296 && a <= 57343 ? o += t("UTF16_SURROGATE", o - 1 - s, r, n, a) : a <= i ? o += t("OVERLONG", o - 1 - s, r, n, a) : n.push(a)) + } + return n + }(e, t).map((e=>e <= 65535 ? String.fromCharCode(e) : (e -= 65536, + String.fromCharCode(55296 + (e >> 10 & 1023), 56320 + (1023 & e))))).join("") + } + const [jt,$t,Vt] = [[], [], []] + , Gt = BigInt(0) + , Ht = BigInt(1) + , Kt = BigInt(2) + , Zt = BigInt(7) + , qt = BigInt(256) + , Jt = BigInt(113); + for (let e = 0, t = Ht, r = 1, n = 0; e < 24; e++) { + [r,n] = [n, (2 * r + 3 * n) % 5], + jt.push(2 * (5 * n + r)), + $t.push((e + 1) * (e + 2) / 2 % 64); + let o = Gt; + for (let e = 0; e < 7; e++) + t = (t << Ht ^ (t >> Zt) * Jt) % qt, + t & Kt && (o ^= Ht << (Ht << BigInt(e)) - Ht); + Vt.push(o) + } + const [Yt,Xt] = dt(Vt, !0) + , Qt = (e,t,r)=>r > 32 ? ft(e, t, r) : ht(e, t, r) + , er = (e,t,r)=>r > 32 ? gt(e, t, r) : pt(e, t, r); + class tr extends He { + constructor(e, t, r, n=!1, o=24) { + if (super(), + this.blockLen = e, + this.suffix = t, + this.outputLen = r, + this.enableXOF = n, + this.rounds = o, + this.pos = 0, + this.posOut = 0, + this.finished = !1, + this.destroyed = !1, + _e(r), + 0 >= this.blockLen || this.blockLen >= 200) + throw new Error("Sha3 supports only keccak-f1600 function"); + this.state = new Uint8Array(200), + this.state32 = Le(this.state) + } + keccak() { + !function(e, t=24) { + const r = new Uint32Array(10); + for (let n = 24 - t; n < 24; n++) { + for (let t = 0; t < 10; t++) + r[t] = e[t] ^ e[t + 10] ^ e[t + 20] ^ e[t + 30] ^ e[t + 40]; + for (let t = 0; t < 10; t += 2) { + const n = (t + 8) % 10 + , o = (t + 2) % 10 + , s = r[o] + , i = r[o + 1] + , a = Qt(s, i, 1) ^ r[n] + , u = er(s, i, 1) ^ r[n + 1]; + for (let r = 0; r < 50; r += 10) + e[t + r] ^= a, + e[t + r + 1] ^= u + } + let t = e[2] + , o = e[3]; + for (let r = 0; r < 24; r++) { + const n = $t[r] + , s = Qt(t, o, n) + , i = er(t, o, n) + , a = jt[r]; + t = e[a], + o = e[a + 1], + e[a] = s, + e[a + 1] = i + } + for (let t = 0; t < 50; t += 10) { + for (let n = 0; n < 10; n++) + r[n] = e[t + n]; + for (let n = 0; n < 10; n++) + e[t + n] ^= ~r[(n + 2) % 10] & r[(n + 4) % 10] + } + e[0] ^= Yt[n], + e[1] ^= Xt[n] + } + r.fill(0) + }(this.state32, this.rounds), + this.posOut = 0, + this.pos = 0 + } + update(e) { + Ne(this); + const {blockLen: t, state: r} = this + , n = (e = Ge(e)).length; + for (let o = 0; o < n; ) { + const s = Math.min(t - this.pos, n - o); + for (let t = 0; t < s; t++) + r[this.pos++] ^= e[o++]; + this.pos === t && this.keccak() + } + return this + } + finish() { + if (this.finished) + return; + this.finished = !0; + const {state: e, suffix: t, pos: r, blockLen: n} = this; + e[r] ^= t, + 0 != (128 & t) && r === n - 1 && this.keccak(), + e[n - 1] ^= 128, + this.keccak() + } + writeInto(e) { + Ne(this, !1), + xe(e), + this.finish(); + const t = this.state + , {blockLen: r} = this; + for (let n = 0, o = e.length; n < o; ) { + this.posOut >= r && this.keccak(); + const s = Math.min(r - this.posOut, o - n); + e.set(t.subarray(this.posOut, this.posOut + s), n), + this.posOut += s, + n += s + } + return e + } + xofInto(e) { + if (!this.enableXOF) + throw new Error("XOF is not possible for this instance"); + return this.writeInto(e) + } + xof(e) { + return _e(e), + this.xofInto(new Uint8Array(e)) + } + digestInto(e) { + if (ke(e, this), + this.finished) + throw new Error("digest() was already called"); + return this.writeInto(e), + this.destroy(), + e + } + digest() { + return this.digestInto(new Uint8Array(this.outputLen)) + } + destroy() { + this.destroyed = !0, + this.state.fill(0) + } + _cloneInto(e) { + const {blockLen: t, suffix: r, outputLen: n, rounds: o, enableXOF: s} = this; + return e || (e = new tr(t,r,n,s,o)), + e.state32.set(this.state32), + e.pos = this.pos, + e.posOut = this.posOut, + e.finished = this.finished, + e.rounds = o, + e.suffix = r, + e.outputLen = n, + e.enableXOF = s, + e.destroyed = this.destroyed, + e + } + } + const rr = ((e,t,r)=>qe((()=>new tr(t,e,r))))(1, 136, 32); + let nr = !1; + const or = function(e) { + return rr(e) + }; + let sr = or; + function ir(e) { + const t = re(e, "data"); + return ae(sr(t)) + } + function ar(e) { + return ir(Lt(e)) + } + ir._ = or, + ir.lock = function() { + nr = !0 + } + , + ir.register = function(e) { + if (nr) + throw new TypeError("keccak256 is locked"); + sr = e + } + , + Object.freeze(ir); + const ur = " !#$%&'()*+,-./<=>?@[]^_`{|}~" + , cr = /^[a-z]*$/i; + function lr(e, t) { + let r = 97; + return e.reduce(((e,n)=>(n === t ? r++ : n.match(cr) ? e.push(String.fromCharCode(r) + n) : (r = 97, + e.push(n)), + e)), []) + } + class dr { + locale; + constructor(e) { + G(this, { + locale: e + }) + } + split(e) { + return e.toLowerCase().split(/\s+/g) + } + join(e) { + return e.join(" ") + } + } + class hr extends dr { + #o; + #s; + constructor(e, t, r) { + super(e), + this.#o = t, + this.#s = r, + this.#i = null + } + get _data() { + return this.#o + } + _decodeWords() { + return J("0" === (e = this.#o)[0], "unsupported auwl data", "data", e), + function(e, t) { + for (let r = 28; r >= 0; r--) + e = e.split(ur[r]).join(t.substring(2 * r, 2 * r + 2)); + const r = [] + , n = e.replace(/(:|([0-9])|([A-Z][a-z]*))/g, ((e,t,n,o)=>{ + if (n) + for (let e = parseInt(n); e >= 0; e--) + r.push(";"); + else + r.push(t.toLowerCase()); + return "" + } + )); + if (n) + throw new Error(`leftovers: ${JSON.stringify(n)}`); + return lr(lr(r, ";"), ":") + }(e.substring(59), e.substring(1, 59)); + var e + } + #i; + #a() { + if (null == this.#i) { + const e = this._decodeWords(); + if (ar(e.join("\n") + "\n") !== this.#s) + throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`); + this.#i = e + } + return this.#i + } + getWord(e) { + const t = this.#a(); + return J(e >= 0 && e < t.length, `invalid word index: ${e}`, "index", e), + t[e] + } + getWordIndex(e) { + return this.#a().indexOf(e) + } + } + let pr = null; + class fr extends hr { + constructor() { + super("en", "0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO", "0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60") + } + static wordlist() { + return null == pr && (pr = new fr), + pr + } + } + function gr(e) { + return (1 << e) - 1 << 8 - e & 255 + } + function yr(e, t) { + Q("NFKD"), + null == t && (t = fr.wordlist()); + const r = t.split(e); + J(r.length % 3 == 0 && r.length >= 12 && r.length <= 24, "invalid mnemonic length", "mnemonic", "[ REDACTED ]"); + const n = new Uint8Array(Math.ceil(11 * r.length / 8)); + let o = 0; + for (let e = 0; e < r.length; e++) { + let s = t.getWordIndex(r[e].normalize("NFKD")); + J(s >= 0, `invalid mnemonic word at index ${e}`, "mnemonic", "[ REDACTED ]"); + for (let e = 0; e < 11; e++) + s & 1 << 10 - e && (n[o >> 3] |= 1 << 7 - o % 8), + o++ + } + const s = 32 * r.length / 3 + , i = gr(r.length / 3); + return J((re(St(n.slice(0, s / 8)))[0] & i) == (n[n.length - 1] & i), "invalid mnemonic checksum", "mnemonic", "[ REDACTED ]"), + ae(n.slice(0, s / 8)) + } + function br(e, t) { + J(e.length % 4 == 0 && e.length >= 16 && e.length <= 32, "invalid entropy size", "entropy", "[ REDACTED ]"), + null == t && (t = fr.wordlist()); + const r = [0]; + let n = 11; + for (let t = 0; t < e.length; t++) + n > 8 ? (r[r.length - 1] <<= 8, + r[r.length - 1] |= e[t], + n -= 8) : (r[r.length - 1] <<= n, + r[r.length - 1] |= e[t] >> 8 - n, + r.push(e[t] & (1 << 8 - n) - 1 & 255), + n += 3); + const o = e.length / 4 + , s = parseInt(St(e).substring(2, 4), 16) & gr(o); + return r[r.length - 1] <<= o, + r[r.length - 1] |= s >> 8 - o, + t.join(r.map((e=>t.getWord(e)))) + } + const mr = {}; + class Tr { + phrase; + password; + wordlist; + entropy; + constructor(e, t, r, n, o) { + null == n && (n = ""), + null == o && (o = fr.wordlist()), + ee(e, mr, "Mnemonic"), + G(this, { + phrase: r, + password: n, + wordlist: o, + entropy: t + }) + } + computeSeed() { + const e = Lt("mnemonic" + this.password, "NFKD"); + return kt(Lt(this.phrase, "NFKD"), e, 2048, 64, "sha512") + } + static fromPhrase(e, t, r) { + const n = yr(e, r); + return e = br(re(n), r), + new Tr(mr,n,e,t,r) + } + static fromEntropy(e, t, r) { + const n = re(e, "entropy") + , o = br(n, r); + return new Tr(mr,ae(n),o,t,r) + } + static entropyToPhrase(e, t) { + return br(re(e, "entropy"), t) + } + static phraseToEntropy(e, t) { + return yr(e, t) + } + static isValidMnemonic(e, t) { + try { + return yr(e, t), + !0 + } catch (e) {} + return !1 + } + } + let vr = !1; + const wr = function(e, t, r) { + return function(e, t) { + const r = { + sha256: at, + sha512: At + }[e]; + return J(null != r, "invalid hmac algorithm", "algorithm", e), + Xe.create(r, t) + }(e, t).update(r).digest() + }; + let Ar = wr; + function Pr(e, t, r) { + const n = re(t, "key") + , o = re(r, "data"); + return ae(Ar(e, n, o)) + } + Pr._ = wr, + Pr.lock = function() { + vr = !0 + } + , + Pr.register = function(e) { + if (vr) + throw new Error("computeHmac is locked"); + Ar = e + } + , + Object.freeze(Pr); + const Wr = BigInt(0) + , Br = BigInt(36); + function Cr(e) { + const t = (e = e.toLowerCase()).substring(2).split("") + , r = new Uint8Array(40); + for (let e = 0; e < 40; e++) + r[e] = t[e].charCodeAt(0); + const n = re(ir(r)); + for (let e = 0; e < 40; e += 2) + n[e >> 1] >> 4 >= 8 && (t[e] = t[e].toUpperCase()), + (15 & n[e >> 1]) >= 8 && (t[e + 1] = t[e + 1].toUpperCase()); + return "0x" + t.join("") + } + const Er = {}; + for (let e = 0; e < 10; e++) + Er[String(e)] = String(e); + for (let e = 0; e < 26; e++) + Er[String.fromCharCode(65 + e)] = String(10 + e); + const Mr = 15; + const Ir = function() { + const e = {}; + for (let t = 0; t < 36; t++) + e["0123456789abcdefghijklmnopqrstuvwxyz"[t]] = BigInt(t); + return e + }(); + function Fr(e) { + if (J("string" == typeof e, "invalid address", "address", e), + e.match(/^(0x)?[0-9a-fA-F]{40}$/)) { + e.startsWith("0x") || (e = "0x" + e); + const t = Cr(e); + return J(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/) || t === e, "bad address checksum", "address", e), + t + } + if (e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) { + J(e.substring(2, 4) === function(e) { + let t = (e = (e = e.toUpperCase()).substring(4) + e.substring(0, 2) + "00").split("").map((e=>Er[e])).join(""); + for (; t.length >= Mr; ) { + let e = t.substring(0, Mr); + t = parseInt(e, 10) % 97 + t.substring(e.length) + } + let r = String(98 - parseInt(t, 10) % 97); + for (; r.length < 2; ) + r = "0" + r; + return r + }(e), "bad icap checksum", "address", e); + let t = function(e) { + e = e.toLowerCase(); + let t = Wr; + for (let r = 0; r < e.length; r++) + t = t * Br + Ir[e[r]]; + return t + }(e.substring(4)).toString(16); + for (; t.length < 40; ) + t = "0" + t; + return Cr("0x" + t) + } + J(!1, "invalid address", "address", e) + } + BigInt(0); + const Or = BigInt(1) + , Sr = BigInt(2) + , _r = e=>e instanceof Uint8Array + , xr = Array.from({ + length: 256 + }, ((e,t)=>t.toString(16).padStart(2, "0"))); + function Rr(e) { + if (!_r(e)) + throw new Error("Uint8Array expected"); + let t = ""; + for (let r = 0; r < e.length; r++) + t += xr[e[r]]; + return t + } + function Nr(e) { + if ("string" != typeof e) + throw new Error("hex string expected, got " + typeof e); + return BigInt("" === e ? "0" : `0x${e}`) + } + function kr(e) { + if ("string" != typeof e) + throw new Error("hex string expected, got " + typeof e); + const t = e.length; + if (t % 2) + throw new Error("padded hex string expected, got unpadded hex of length " + t); + const r = new Uint8Array(t / 2); + for (let t = 0; t < r.length; t++) { + const n = 2 * t + , o = e.slice(n, n + 2) + , s = Number.parseInt(o, 16); + if (Number.isNaN(s) || s < 0) + throw new Error("Invalid byte sequence"); + r[t] = s + } + return r + } + function Ur(e) { + return Nr(Rr(e)) + } + function Dr(e) { + if (!_r(e)) + throw new Error("Uint8Array expected"); + return Nr(Rr(Uint8Array.from(e).reverse())) + } + function Lr(e, t) { + return kr(e.toString(16).padStart(2 * t, "0")) + } + function zr(e, t) { + return Lr(e, t).reverse() + } + function jr(e, t, r) { + let n; + if ("string" == typeof t) + try { + n = kr(t) + } catch (r) { + throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`) + } + else { + if (!_r(t)) + throw new Error(`${e} must be hex string or Uint8Array`); + n = Uint8Array.from(t) + } + const o = n.length; + if ("number" == typeof r && o !== r) + throw new Error(`${e} expected ${r} bytes, got ${o}`); + return n + } + function $r(...e) { + const t = new Uint8Array(e.reduce(((e,t)=>e + t.length), 0)); + let r = 0; + return e.forEach((e=>{ + if (!_r(e)) + throw new Error("Uint8Array expected"); + t.set(e, r), + r += e.length + } + )), + t + } + const Vr = e=>(Sr << BigInt(e - 1)) - Or + , Gr = e=>new Uint8Array(e) + , Hr = e=>Uint8Array.from(e); + function Kr(e, t, r) { + if ("number" != typeof e || e < 2) + throw new Error("hashLen must be a number"); + if ("number" != typeof t || t < 2) + throw new Error("qByteLen must be a number"); + if ("function" != typeof r) + throw new Error("hmacFn must be a function"); + let n = Gr(e) + , o = Gr(e) + , s = 0; + const i = ()=>{ + n.fill(1), + o.fill(0), + s = 0 + } + , a = (...e)=>r(o, n, ...e) + , u = (e=Gr())=>{ + o = a(Hr([0]), e), + n = a(), + 0 !== e.length && (o = a(Hr([1]), e), + n = a()) + } + , c = ()=>{ + if (s++ >= 1e3) + throw new Error("drbg: tried 1000 values"); + let e = 0; + const r = []; + for (; e < t; ) { + n = a(); + const t = n.slice(); + r.push(t), + e += n.length + } + return $r(...r) + } + ; + return (e,t)=>{ + let r; + for (i(), + u(e); !(r = t(c())); ) + u(); + return i(), + r + } + } + const Zr = { + bigint: e=>"bigint" == typeof e, + function: e=>"function" == typeof e, + boolean: e=>"boolean" == typeof e, + string: e=>"string" == typeof e, + stringOrUint8Array: e=>"string" == typeof e || e instanceof Uint8Array, + isSafeInteger: e=>Number.isSafeInteger(e), + array: e=>Array.isArray(e), + field: (e,t)=>t.Fp.isValid(e), + hash: e=>"function" == typeof e && Number.isSafeInteger(e.outputLen) + }; + function qr(e, t, r={}) { + const n = (t,r,n)=>{ + const o = Zr[r]; + if ("function" != typeof o) + throw new Error(`Invalid validator "${r}", expected function`); + const s = e[t]; + if (!(n && void 0 === s || o(s, e))) + throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`) + } + ; + for (const [e,r] of Object.entries(t)) + n(e, r, !1); + for (const [e,t] of Object.entries(r)) + n(e, t, !0); + return e + } + const Jr = BigInt(0) + , Yr = BigInt(1) + , Xr = BigInt(2) + , Qr = BigInt(3) + , en = BigInt(4) + , tn = BigInt(5) + , rn = BigInt(8); + function nn(e, t) { + const r = e % t; + return r >= Jr ? r : t + r + } + function on(e, t, r) { + if (r <= Jr || t < Jr) + throw new Error("Expected power/modulo > 0"); + if (r === Yr) + return Jr; + let n = Yr; + for (; t > Jr; ) + t & Yr && (n = n * e % r), + e = e * e % r, + t >>= Yr; + return n + } + function sn(e, t, r) { + let n = e; + for (; t-- > Jr; ) + n *= n, + n %= r; + return n + } + function an(e, t) { + if (e === Jr || t <= Jr) + throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`); + let r = nn(e, t) + , n = t + , o = Jr + , s = Yr + , i = Yr + , a = Jr; + for (; r !== Jr; ) { + const e = n / r + , t = n % r + , u = o - i * e + , c = s - a * e; + n = r, + r = t, + o = i, + s = a, + i = u, + a = c + } + if (n !== Yr) + throw new Error("invert: does not exist"); + return nn(o, t) + } + BigInt(9), + BigInt(16); + const un = ["create", "isValid", "is0", "neg", "inv", "sqrt", "sqr", "eql", "add", "sub", "mul", "pow", "div", "addN", "subN", "mulN", "sqrN"]; + function cn(e, t) { + const r = void 0 !== t ? t : e.toString(2).length; + return { + nBitLength: r, + nByteLength: Math.ceil(r / 8) + } + } + function ln(e) { + if ("bigint" != typeof e) + throw new Error("field order must be bigint"); + const t = e.toString(2).length; + return Math.ceil(t / 8) + } + function dn(e) { + const t = ln(e); + return t + Math.ceil(t / 2) + } + const hn = BigInt(0) + , pn = BigInt(1); + function fn(e) { + return qr(e.Fp, un.reduce(((e,t)=>(e[t] = "function", + e)), { + ORDER: "bigint", + MASK: "bigint", + BYTES: "isSafeInteger", + BITS: "isSafeInteger" + })), + qr(e, { + n: "bigint", + h: "bigint", + Gx: "field", + Gy: "field" + }, { + nBitLength: "isSafeInteger", + nByteLength: "isSafeInteger" + }), + Object.freeze({ + ...cn(e.n, e.nBitLength), + ...e, + p: e.Fp.ORDER + }) + } + const {bytesToNumberBE: gn, hexToBytes: yn} = s + , bn = { + Err: class extends Error { + constructor(e="") { + super(e) + } + } + , + _parseInt(e) { + const {Err: t} = bn; + if (e.length < 2 || 2 !== e[0]) + throw new t("Invalid signature integer tag"); + const r = e[1] + , n = e.subarray(2, r + 2); + if (!r || n.length !== r) + throw new t("Invalid signature integer: wrong length"); + if (128 & n[0]) + throw new t("Invalid signature integer: negative"); + if (0 === n[0] && !(128 & n[1])) + throw new t("Invalid signature integer: unnecessary leading zero"); + return { + d: gn(n), + l: e.subarray(r + 2) + } + }, + toSig(e) { + const {Err: t} = bn + , r = "string" == typeof e ? yn(e) : e; + if (!(r instanceof Uint8Array)) + throw new Error("ui8a expected"); + let n = r.length; + if (n < 2 || 48 != r[0]) + throw new t("Invalid signature tag"); + if (r[1] !== n - 2) + throw new t("Invalid signature: incorrect length"); + const {d: o, l: s} = bn._parseInt(r.subarray(2)) + , {d: i, l: a} = bn._parseInt(s); + if (a.length) + throw new t("Invalid signature: left bytes after parsing"); + return { + r: o, + s: i + } + }, + hexFromSig(e) { + const t = e=>8 & Number.parseInt(e[0], 16) ? "00" + e : e + , r = e=>{ + const t = e.toString(16); + return 1 & t.length ? `0${t}` : t + } + , n = t(r(e.s)) + , o = t(r(e.r)) + , s = n.length / 2 + , i = o.length / 2 + , a = r(s) + , u = r(i); + return `30${r(i + s + 4)}02${u}${o}02${a}${n}` + } + } + , mn = BigInt(0) + , Tn = BigInt(1) + , vn = (BigInt(2), + BigInt(3)); + function wn(e) { + const t = function(e) { + const t = fn(e); + return qr(t, { + hash: "hash", + hmac: "function", + randomBytes: "function" + }, { + bits2int: "function", + bits2int_modN: "function", + lowS: "boolean" + }), + Object.freeze({ + lowS: !0, + ...t + }) + }(e) + , {Fp: r, n} = t + , o = r.BYTES + 1 + , s = 2 * r.BYTES + 1; + function i(e) { + return nn(e, n) + } + function a(e) { + return an(e, n) + } + const {ProjectivePoint: u, normPrivateKeyToScalar: c, weierstrassEquation: l, isWithinCurveOrder: d} = function(e) { + const t = function(e) { + const t = fn(e); + qr(t, { + a: "field", + b: "field" + }, { + allowedPrivateKeyLengths: "array", + wrapPrivateKey: "boolean", + isTorsionFree: "function", + clearCofactor: "function", + allowInfinityPoint: "boolean", + fromBytes: "function", + toBytes: "function" + }); + const {endo: r, Fp: n, a: o} = t; + if (r) { + if (!n.eql(o, n.ZERO)) + throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0"); + if ("object" != typeof r || "bigint" != typeof r.beta || "function" != typeof r.splitScalar) + throw new Error("Expected endomorphism with beta: bigint and splitScalar: function") + } + return Object.freeze({ + ...t + }) + }(e) + , {Fp: r} = t + , n = t.toBytes || ((e,t,n)=>{ + const o = t.toAffine(); + return $r(Uint8Array.from([4]), r.toBytes(o.x), r.toBytes(o.y)) + } + ) + , o = t.fromBytes || (e=>{ + const t = e.subarray(1); + return { + x: r.fromBytes(t.subarray(0, r.BYTES)), + y: r.fromBytes(t.subarray(r.BYTES, 2 * r.BYTES)) + } + } + ); + function s(e) { + const {a: n, b: o} = t + , s = r.sqr(e) + , i = r.mul(s, e); + return r.add(r.add(i, r.mul(e, n)), o) + } + if (!r.eql(r.sqr(t.Gy), s(t.Gx))) + throw new Error("bad generator point: equation left != right"); + function i(e) { + return "bigint" == typeof e && mn < e && e < t.n + } + function a(e) { + if (!i(e)) + throw new Error("Expected valid bigint: 0 < bigint < curve.n") + } + function u(e) { + const {allowedPrivateKeyLengths: r, nByteLength: n, wrapPrivateKey: o, n: s} = t; + if (r && "bigint" != typeof e) { + if (e instanceof Uint8Array && (e = Rr(e)), + "string" != typeof e || !r.includes(e.length)) + throw new Error("Invalid key"); + e = e.padStart(2 * n, "0") + } + let i; + try { + i = "bigint" == typeof e ? e : Ur(jr("private key", e, n)) + } catch (t) { + throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`) + } + return o && (i = nn(i, s)), + a(i), + i + } + const c = new Map; + function l(e) { + if (!(e instanceof d)) + throw new Error("ProjectivePoint expected") + } + class d { + constructor(e, t, n) { + if (this.px = e, + this.py = t, + this.pz = n, + null == e || !r.isValid(e)) + throw new Error("x required"); + if (null == t || !r.isValid(t)) + throw new Error("y required"); + if (null == n || !r.isValid(n)) + throw new Error("z required") + } + static fromAffine(e) { + const {x: t, y: n} = e || {}; + if (!e || !r.isValid(t) || !r.isValid(n)) + throw new Error("invalid affine point"); + if (e instanceof d) + throw new Error("projective point not allowed"); + const o = e=>r.eql(e, r.ZERO); + return o(t) && o(n) ? d.ZERO : new d(t,n,r.ONE) + } + get x() { + return this.toAffine().x + } + get y() { + return this.toAffine().y + } + static normalizeZ(e) { + const t = r.invertBatch(e.map((e=>e.pz))); + return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine) + } + static fromHex(e) { + const t = d.fromAffine(o(jr("pointHex", e))); + return t.assertValidity(), + t + } + static fromPrivateKey(e) { + return d.BASE.multiply(u(e)) + } + _setWindowSize(e) { + this._WINDOW_SIZE = e, + c.delete(this) + } + assertValidity() { + if (this.is0()) { + if (t.allowInfinityPoint && !r.is0(this.py)) + return; + throw new Error("bad point: ZERO") + } + const {x: e, y: n} = this.toAffine(); + if (!r.isValid(e) || !r.isValid(n)) + throw new Error("bad point: x or y not FE"); + const o = r.sqr(n) + , i = s(e); + if (!r.eql(o, i)) + throw new Error("bad point: equation left != right"); + if (!this.isTorsionFree()) + throw new Error("bad point: not in prime-order subgroup") + } + hasEvenY() { + const {y: e} = this.toAffine(); + if (r.isOdd) + return !r.isOdd(e); + throw new Error("Field doesn't support isOdd") + } + equals(e) { + l(e); + const {px: t, py: n, pz: o} = this + , {px: s, py: i, pz: a} = e + , u = r.eql(r.mul(t, a), r.mul(s, o)) + , c = r.eql(r.mul(n, a), r.mul(i, o)); + return u && c + } + negate() { + return new d(this.px,r.neg(this.py),this.pz) + } + double() { + const {a: e, b: n} = t + , o = r.mul(n, vn) + , {px: s, py: i, pz: a} = this; + let u = r.ZERO + , c = r.ZERO + , l = r.ZERO + , h = r.mul(s, s) + , p = r.mul(i, i) + , f = r.mul(a, a) + , g = r.mul(s, i); + return g = r.add(g, g), + l = r.mul(s, a), + l = r.add(l, l), + u = r.mul(e, l), + c = r.mul(o, f), + c = r.add(u, c), + u = r.sub(p, c), + c = r.add(p, c), + c = r.mul(u, c), + u = r.mul(g, u), + l = r.mul(o, l), + f = r.mul(e, f), + g = r.sub(h, f), + g = r.mul(e, g), + g = r.add(g, l), + l = r.add(h, h), + h = r.add(l, h), + h = r.add(h, f), + h = r.mul(h, g), + c = r.add(c, h), + f = r.mul(i, a), + f = r.add(f, f), + h = r.mul(f, g), + u = r.sub(u, h), + l = r.mul(f, p), + l = r.add(l, l), + l = r.add(l, l), + new d(u,c,l) + } + add(e) { + l(e); + const {px: n, py: o, pz: s} = this + , {px: i, py: a, pz: u} = e; + let c = r.ZERO + , h = r.ZERO + , p = r.ZERO; + const f = t.a + , g = r.mul(t.b, vn); + let y = r.mul(n, i) + , b = r.mul(o, a) + , m = r.mul(s, u) + , T = r.add(n, o) + , v = r.add(i, a); + T = r.mul(T, v), + v = r.add(y, b), + T = r.sub(T, v), + v = r.add(n, s); + let w = r.add(i, u); + return v = r.mul(v, w), + w = r.add(y, m), + v = r.sub(v, w), + w = r.add(o, s), + c = r.add(a, u), + w = r.mul(w, c), + c = r.add(b, m), + w = r.sub(w, c), + p = r.mul(f, v), + c = r.mul(g, m), + p = r.add(c, p), + c = r.sub(b, p), + p = r.add(b, p), + h = r.mul(c, p), + b = r.add(y, y), + b = r.add(b, y), + m = r.mul(f, m), + v = r.mul(g, v), + b = r.add(b, m), + m = r.sub(y, m), + m = r.mul(f, m), + v = r.add(v, m), + y = r.mul(b, v), + h = r.add(h, y), + y = r.mul(w, v), + c = r.mul(T, c), + c = r.sub(c, y), + y = r.mul(T, b), + p = r.mul(w, p), + p = r.add(p, y), + new d(c,h,p) + } + subtract(e) { + return this.add(e.negate()) + } + is0() { + return this.equals(d.ZERO) + } + wNAF(e) { + return p.wNAFCached(this, c, e, (e=>{ + const t = r.invertBatch(e.map((e=>e.pz))); + return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine) + } + )) + } + multiplyUnsafe(e) { + const n = d.ZERO; + if (e === mn) + return n; + if (a(e), + e === Tn) + return this; + const {endo: o} = t; + if (!o) + return p.unsafeLadder(this, e); + let {k1neg: s, k1: i, k2neg: u, k2: c} = o.splitScalar(e) + , l = n + , h = n + , f = this; + for (; i > mn || c > mn; ) + i & Tn && (l = l.add(f)), + c & Tn && (h = h.add(f)), + f = f.double(), + i >>= Tn, + c >>= Tn; + return s && (l = l.negate()), + u && (h = h.negate()), + h = new d(r.mul(h.px, o.beta),h.py,h.pz), + l.add(h) + } + multiply(e) { + a(e); + let n, o, s = e; + const {endo: i} = t; + if (i) { + const {k1neg: e, k1: t, k2neg: a, k2: u} = i.splitScalar(s); + let {p: c, f: l} = this.wNAF(t) + , {p: h, f} = this.wNAF(u); + c = p.constTimeNegate(e, c), + h = p.constTimeNegate(a, h), + h = new d(r.mul(h.px, i.beta),h.py,h.pz), + n = c.add(h), + o = l.add(f) + } else { + const {p: e, f: t} = this.wNAF(s); + n = e, + o = t + } + return d.normalizeZ([n, o])[0] + } + multiplyAndAddUnsafe(e, t, r) { + const n = d.BASE + , o = (e,t)=>t !== mn && t !== Tn && e.equals(n) ? e.multiply(t) : e.multiplyUnsafe(t) + , s = o(this, t).add(o(e, r)); + return s.is0() ? void 0 : s + } + toAffine(e) { + const {px: t, py: n, pz: o} = this + , s = this.is0(); + null == e && (e = s ? r.ONE : r.inv(o)); + const i = r.mul(t, e) + , a = r.mul(n, e) + , u = r.mul(o, e); + if (s) + return { + x: r.ZERO, + y: r.ZERO + }; + if (!r.eql(u, r.ONE)) + throw new Error("invZ was invalid"); + return { + x: i, + y: a + } + } + isTorsionFree() { + const {h: e, isTorsionFree: r} = t; + if (e === Tn) + return !0; + if (r) + return r(d, this); + throw new Error("isTorsionFree() has not been declared for the elliptic curve") + } + clearCofactor() { + const {h: e, clearCofactor: r} = t; + return e === Tn ? this : r ? r(d, this) : this.multiplyUnsafe(t.h) + } + toRawBytes(e=!0) { + return this.assertValidity(), + n(d, this, e) + } + toHex(e=!0) { + return Rr(this.toRawBytes(e)) + } + } + d.BASE = new d(t.Gx,t.Gy,r.ONE), + d.ZERO = new d(r.ZERO,r.ONE,r.ZERO); + const h = t.nBitLength + , p = function(e, t) { + const r = (e,t)=>{ + const r = t.negate(); + return e ? r : t + } + , n = e=>({ + windows: Math.ceil(t / e) + 1, + windowSize: 2 ** (e - 1) + }); + return { + constTimeNegate: r, + unsafeLadder(t, r) { + let n = e.ZERO + , o = t; + for (; r > hn; ) + r & pn && (n = n.add(o)), + o = o.double(), + r >>= pn; + return n + }, + precomputeWindow(e, t) { + const {windows: r, windowSize: o} = n(t) + , s = []; + let i = e + , a = i; + for (let e = 0; e < r; e++) { + a = i, + s.push(a); + for (let e = 1; e < o; e++) + a = a.add(i), + s.push(a); + i = a.double() + } + return s + }, + wNAF(t, o, s) { + const {windows: i, windowSize: a} = n(t); + let u = e.ZERO + , c = e.BASE; + const l = BigInt(2 ** t - 1) + , d = 2 ** t + , h = BigInt(t); + for (let e = 0; e < i; e++) { + const t = e * a; + let n = Number(s & l); + s >>= h, + n > a && (n -= d, + s += pn); + const i = t + , p = t + Math.abs(n) - 1 + , f = e % 2 != 0 + , g = n < 0; + 0 === n ? c = c.add(r(f, o[i])) : u = u.add(r(g, o[p])) + } + return { + p: u, + f: c + } + }, + wNAFCached(e, t, r, n) { + const o = e._WINDOW_SIZE || 1; + let s = t.get(e); + return s || (s = this.precomputeWindow(e, o), + 1 !== o && t.set(e, n(s))), + this.wNAF(o, s, r) + } + } + }(d, t.endo ? Math.ceil(h / 2) : h); + return { + CURVE: t, + ProjectivePoint: d, + normPrivateKeyToScalar: u, + weierstrassEquation: s, + isWithinCurveOrder: i + } + }({ + ...t, + toBytes(e, t, n) { + const o = t.toAffine() + , s = r.toBytes(o.x) + , i = $r; + return n ? i(Uint8Array.from([t.hasEvenY() ? 2 : 3]), s) : i(Uint8Array.from([4]), s, r.toBytes(o.y)) + }, + fromBytes(e) { + const t = e.length + , n = e[0] + , i = e.subarray(1); + if (t !== o || 2 !== n && 3 !== n) { + if (t === s && 4 === n) + return { + x: r.fromBytes(i.subarray(0, r.BYTES)), + y: r.fromBytes(i.subarray(r.BYTES, 2 * r.BYTES)) + }; + throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`) + } + { + const e = Ur(i); + if (!(mn < (a = e) && a < r.ORDER)) + throw new Error("Point is not on curve"); + const t = l(e); + let o = r.sqrt(t); + return 1 == (1 & n) != ((o & Tn) === Tn) && (o = r.neg(o)), + { + x: e, + y: o + } + } + var a + } + }) + , h = e=>Rr(Lr(e, t.nByteLength)); + function p(e) { + return e > n >> Tn + } + const f = (e,t,r)=>Ur(e.slice(t, r)); + class g { + constructor(e, t, r) { + this.r = e, + this.s = t, + this.recovery = r, + this.assertValidity() + } + static fromCompact(e) { + const r = t.nByteLength; + return e = jr("compactSignature", e, 2 * r), + new g(f(e, 0, r),f(e, r, 2 * r)) + } + static fromDER(e) { + const {r: t, s: r} = bn.toSig(jr("DER", e)); + return new g(t,r) + } + assertValidity() { + if (!d(this.r)) + throw new Error("r must be 0 < r < CURVE.n"); + if (!d(this.s)) + throw new Error("s must be 0 < s < CURVE.n") + } + addRecoveryBit(e) { + return new g(this.r,this.s,e) + } + recoverPublicKey(e) { + const {r: n, s: o, recovery: s} = this + , c = T(jr("msgHash", e)); + if (null == s || ![0, 1, 2, 3].includes(s)) + throw new Error("recovery id invalid"); + const l = 2 === s || 3 === s ? n + t.n : n; + if (l >= r.ORDER) + throw new Error("recovery id 2 or 3 invalid"); + const d = 0 == (1 & s) ? "02" : "03" + , p = u.fromHex(d + h(l)) + , f = a(l) + , g = i(-c * f) + , y = i(o * f) + , b = u.BASE.multiplyAndAddUnsafe(p, g, y); + if (!b) + throw new Error("point at infinify"); + return b.assertValidity(), + b + } + hasHighS() { + return p(this.s) + } + normalizeS() { + return this.hasHighS() ? new g(this.r,i(-this.s),this.recovery) : this + } + toDERRawBytes() { + return kr(this.toDERHex()) + } + toDERHex() { + return bn.hexFromSig({ + r: this.r, + s: this.s + }) + } + toCompactRawBytes() { + return kr(this.toCompactHex()) + } + toCompactHex() { + return h(this.r) + h(this.s) + } + } + const y = { + isValidPrivateKey(e) { + try { + return c(e), + !0 + } catch (e) { + return !1 + } + }, + normPrivateKeyToScalar: c, + randomPrivateKey: ()=>{ + const e = dn(t.n); + return function(e, t, r=!1) { + const n = e.length + , o = ln(t) + , s = dn(t); + if (n < 16 || n < s || n > 1024) + throw new Error(`expected ${s}-1024 bytes of input, got ${n}`); + const i = nn(r ? Ur(e) : Dr(e), t - Yr) + Yr; + return r ? zr(i, o) : Lr(i, o) + }(t.randomBytes(e), t.n) + } + , + precompute: (e=8,t=u.BASE)=>(t._setWindowSize(e), + t.multiply(BigInt(3)), + t) + }; + function b(e) { + const t = e instanceof Uint8Array + , r = "string" == typeof e + , n = (t || r) && e.length; + return t ? n === o || n === s : r ? n === 2 * o || n === 2 * s : e instanceof u + } + const m = t.bits2int || function(e) { + const r = Ur(e) + , n = 8 * e.length - t.nBitLength; + return n > 0 ? r >> BigInt(n) : r + } + , T = t.bits2int_modN || function(e) { + return i(m(e)) + } + , v = Vr(t.nBitLength); + function w(e) { + if ("bigint" != typeof e) + throw new Error("bigint expected"); + if (!(mn <= e && e < v)) + throw new Error(`bigint expected < 2^${t.nBitLength}`); + return Lr(e, t.nByteLength) + } + const A = { + lowS: t.lowS, + prehash: !1 + } + , P = { + lowS: t.lowS, + prehash: !1 + }; + return u.BASE._setWindowSize(8), + { + CURVE: t, + getPublicKey: function(e, t=!0) { + return u.fromPrivateKey(e).toRawBytes(t) + }, + getSharedSecret: function(e, t, r=!0) { + if (b(e)) + throw new Error("first arg must be private key"); + if (!b(t)) + throw new Error("second arg must be public key"); + return u.fromHex(t).multiply(c(e)).toRawBytes(r) + }, + sign: function(e, n, o=A) { + const {seed: s, k2sig: l} = function(e, n, o=A) { + if (["recovered", "canonical"].some((e=>e in o))) + throw new Error("sign() legacy options not supported"); + const {hash: s, randomBytes: l} = t; + let {lowS: h, prehash: f, extraEntropy: y} = o; + null == h && (h = !0), + e = jr("msgHash", e), + f && (e = jr("prehashed msgHash", s(e))); + const b = T(e) + , v = c(n) + , P = [w(v), w(b)]; + if (null != y) { + const e = !0 === y ? l(r.BYTES) : y; + P.push(jr("extraEntropy", e)) + } + const W = $r(...P) + , B = b; + return { + seed: W, + k2sig: function(e) { + const t = m(e); + if (!d(t)) + return; + const r = a(t) + , n = u.BASE.multiply(t).toAffine() + , o = i(n.x); + if (o === mn) + return; + const s = i(r * i(B + o * v)); + if (s === mn) + return; + let c = (n.x === o ? 0 : 2) | Number(n.y & Tn) + , l = s; + return h && p(s) && (l = function(e) { + return p(e) ? i(-e) : e + }(s), + c ^= 1), + new g(o,l,c) + } + } + }(e, n, o) + , h = t; + return Kr(h.hash.outputLen, h.nByteLength, h.hmac)(s, l) + }, + verify: function(e, r, n, o=P) { + const s = e; + if (r = jr("msgHash", r), + n = jr("publicKey", n), + "strict"in o) + throw new Error("options.strict was renamed to lowS"); + const {lowS: c, prehash: l} = o; + let d, h; + try { + if ("string" == typeof s || s instanceof Uint8Array) + try { + d = g.fromDER(s) + } catch (e) { + if (!(e instanceof bn.Err)) + throw e; + d = g.fromCompact(s) + } + else { + if ("object" != typeof s || "bigint" != typeof s.r || "bigint" != typeof s.s) + throw new Error("PARSE"); + { + const {r: e, s: t} = s; + d = new g(e,t) + } + } + h = u.fromHex(n) + } catch (e) { + if ("PARSE" === e.message) + throw new Error("signature must be Signature instance, Uint8Array or hex string"); + return !1 + } + if (c && d.hasHighS()) + return !1; + l && (r = t.hash(r)); + const {r: p, s: f} = d + , y = T(r) + , b = a(f) + , m = i(y * b) + , v = i(p * b) + , w = u.BASE.multiplyAndAddUnsafe(h, m, v)?.toAffine(); + return !!w && i(w.x) === p + }, + ProjectivePoint: u, + Signature: g, + utils: y + } + } + function An(e) { + return { + hash: e, + hmac: (t,...r)=>Xe(e, t, function(...e) { + const t = new Uint8Array(e.reduce(((e,t)=>e + t.length), 0)); + let r = 0; + return e.forEach((e=>{ + if (!De(e)) + throw new Error("Uint8Array expected"); + t.set(e, r), + r += e.length + } + )), + t + }(...r)), + randomBytes: Je + } + } + BigInt(4); + const Pn = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f") + , Wn = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141") + , Bn = BigInt(1) + , Cn = BigInt(2) + , En = (e,t)=>(e + t / Cn) / t; + const Mn = function(e, t, r=!1, n={}) { + if (e <= Jr) + throw new Error(`Expected Field ORDER > 0, got ${e}`); + const {nBitLength: o, nByteLength: s} = cn(e, t); + if (s > 2048) + throw new Error("Field lengths over 2048 bytes are not supported"); + const i = function(e) { + if (e % en === Qr) { + const t = (e + Yr) / en; + return function(e, r) { + const n = e.pow(r, t); + if (!e.eql(e.sqr(n), r)) + throw new Error("Cannot find square root"); + return n + } + } + if (e % rn === tn) { + const t = (e - tn) / rn; + return function(e, r) { + const n = e.mul(r, Xr) + , o = e.pow(n, t) + , s = e.mul(r, o) + , i = e.mul(e.mul(s, Xr), o) + , a = e.mul(s, e.sub(i, e.ONE)); + if (!e.eql(e.sqr(a), r)) + throw new Error("Cannot find square root"); + return a + } + } + return function(e) { + const t = (e - Yr) / Xr; + let r, n, o; + for (r = e - Yr, + n = 0; r % Xr === Jr; r /= Xr, + n++) + ; + for (o = Xr; o < e && on(o, t, e) !== e - Yr; o++) + ; + if (1 === n) { + const t = (e + Yr) / en; + return function(e, r) { + const n = e.pow(r, t); + if (!e.eql(e.sqr(n), r)) + throw new Error("Cannot find square root"); + return n + } + } + const s = (r + Yr) / Xr; + return function(e, i) { + if (e.pow(i, t) === e.neg(e.ONE)) + throw new Error("Cannot find square root"); + let a = n + , u = e.pow(e.mul(e.ONE, o), r) + , c = e.pow(i, s) + , l = e.pow(i, r); + for (; !e.eql(l, e.ONE); ) { + if (e.eql(l, e.ZERO)) + return e.ZERO; + let t = 1; + for (let r = e.sqr(l); t < a && !e.eql(r, e.ONE); t++) + r = e.sqr(r); + const r = e.pow(u, Yr << BigInt(a - t - 1)); + u = e.sqr(r), + c = e.mul(c, r), + l = e.mul(l, u), + a = t + } + return c + } + }(e) + }(e) + , a = Object.freeze({ + ORDER: e, + BITS: o, + BYTES: s, + MASK: Vr(o), + ZERO: Jr, + ONE: Yr, + create: t=>nn(t, e), + isValid: t=>{ + if ("bigint" != typeof t) + throw new Error("Invalid field element: expected bigint, got " + typeof t); + return Jr <= t && t < e + } + , + is0: e=>e === Jr, + isOdd: e=>(e & Yr) === Yr, + neg: t=>nn(-t, e), + eql: (e,t)=>e === t, + sqr: t=>nn(t * t, e), + add: (t,r)=>nn(t + r, e), + sub: (t,r)=>nn(t - r, e), + mul: (t,r)=>nn(t * r, e), + pow: (e,t)=>function(e, t, r) { + if (r < Jr) + throw new Error("Expected power > 0"); + if (r === Jr) + return e.ONE; + if (r === Yr) + return t; + let n = e.ONE + , o = t; + for (; r > Jr; ) + r & Yr && (n = e.mul(n, o)), + o = e.sqr(o), + r >>= Yr; + return n + }(a, e, t), + div: (t,r)=>nn(t * an(r, e), e), + sqrN: e=>e * e, + addN: (e,t)=>e + t, + subN: (e,t)=>e - t, + mulN: (e,t)=>e * t, + inv: t=>an(t, e), + sqrt: n.sqrt || (e=>i(a, e)), + invertBatch: e=>function(e, t) { + const r = new Array(t.length) + , n = t.reduce(((t,n,o)=>e.is0(n) ? t : (r[o] = t, + e.mul(t, n))), e.ONE) + , o = e.inv(n); + return t.reduceRight(((t,n,o)=>e.is0(n) ? t : (r[o] = e.mul(t, r[o]), + e.mul(t, n))), o), + r + }(a, e), + cmov: (e,t,r)=>r ? t : e, + toBytes: e=>r ? zr(e, s) : Lr(e, s), + fromBytes: e=>{ + if (e.length !== s) + throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`); + return r ? Dr(e) : Ur(e) + } + }); + return Object.freeze(a) + }(Pn, void 0, void 0, { + sqrt: function(e) { + const t = Pn + , r = BigInt(3) + , n = BigInt(6) + , o = BigInt(11) + , s = BigInt(22) + , i = BigInt(23) + , a = BigInt(44) + , u = BigInt(88) + , c = e * e * e % t + , l = c * c * e % t + , d = sn(l, r, t) * l % t + , h = sn(d, r, t) * l % t + , p = sn(h, Cn, t) * c % t + , f = sn(p, o, t) * p % t + , g = sn(f, s, t) * f % t + , y = sn(g, a, t) * g % t + , b = sn(y, u, t) * y % t + , m = sn(b, a, t) * g % t + , T = sn(m, r, t) * l % t + , v = sn(T, i, t) * f % t + , w = sn(v, n, t) * c % t + , A = sn(w, Cn, t); + if (!Mn.eql(Mn.sqr(A), e)) + throw new Error("Cannot find square root"); + return A + } + }) + , In = function(e, t) { + const r = t=>wn({ + ...e, + ...An(t) + }); + return Object.freeze({ + ...r(t), + create: r + }) + }({ + a: BigInt(0), + b: BigInt(7), + Fp: Mn, + n: Wn, + Gx: BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"), + Gy: BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"), + h: BigInt(1), + lowS: !0, + endo: { + beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"), + splitScalar: e=>{ + const t = Wn + , r = BigInt("0x3086d221a7d46bcde86c90e49284eb15") + , n = -Bn * BigInt("0xe4437ed6010e88286f547fa90abfe4c3") + , o = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8") + , s = r + , i = BigInt("0x100000000000000000000000000000000") + , a = En(s * e, t) + , u = En(-n * e, t); + let c = nn(e - a * r - u * o, t) + , l = nn(-a * n - u * s, t); + const d = c > i + , h = l > i; + if (d && (c = t - c), + h && (l = t - l), + c > i || l > i) + throw new Error("splitScalar: Endomorphism failed, k=" + e); + return { + k1neg: d, + k1: c, + k2neg: h, + k2: l + } + } + } + }, at); + BigInt(0), + In.ProjectivePoint; + class Fn { + #u; + constructor(e) { + J(32 === ce(e), "invalid private key", "privateKey", "[REDACTED]"), + this.#u = ae(e) + } + get privateKey() { + return this.#u + } + get publicKey() { + return Fn.computePublicKey(this.#u) + } + get compressedPublicKey() { + return Fn.computePublicKey(this.#u, !0) + } + sign(e) { + J(32 === ce(e), "invalid digest length", "digest", e); + const t = In.sign(ne(e), ne(this.#u), { + lowS: !0 + }); + return Se.from({ + r: Ae(t.r, 32), + s: Ae(t.s, 32), + v: t.recovery ? 28 : 27 + }) + } + computeSharedSecret(e) { + const t = Fn.computePublicKey(e); + return ae(In.getSharedSecret(ne(this.#u), re(t), !1)) + } + static computePublicKey(e, t) { + let r = re(e, "key"); + if (32 === r.length) + return ae(In.getPublicKey(r, !!t)); + if (64 === r.length) { + const e = new Uint8Array(65); + e[0] = 4, + e.set(r, 1), + r = e + } + return ae(In.ProjectivePoint.fromHex(r).toRawBytes(t)) + } + static recoverPublicKey(e, t) { + J(32 === ce(e), "invalid digest length", "digest", e); + const r = Se.from(t); + let n = In.Signature.fromCompact(ne(ue([r.r, r.s]))); + n = n.addRecoveryBit(r.yParity); + const o = n.recoverPublicKey(ne(e)); + return J(null != o, "invalid signautre for digest", "signature", t), + "0x" + o.toHex(!1) + } + static addPoints(e, t, r) { + const n = In.ProjectivePoint.fromHex(Fn.computePublicKey(e).substring(2)) + , o = In.ProjectivePoint.fromHex(Fn.computePublicKey(t).substring(2)); + return "0x" + n.add(o).toHex(!!r) + } + } + function On(e) { + let t; + return t = "string" == typeof e ? Fn.computePublicKey(e, !1) : e.publicKey, + Fr(ir("0x" + t.substring(4)).substring(26)) + } + function Sn(e, t) { + return On(Fn.recoverPublicKey(e, t)) + } + const _n = 32 + , xn = new Uint8Array(_n) + , Rn = ["then"] + , Nn = {}; + function kn(e, t) { + const r = new Error(`deferred error during ABI decoding triggered accessing ${e}`); + throw r.error = t, + r + } + class Un extends Array { + #c; + constructor() { + for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) + t[r] = arguments[r]; + const n = t[0]; + let o = t[1] + , s = (t[2] || []).slice() + , i = !0; + n !== Nn && (o = t, + s = [], + i = !1), + super(o.length), + o.forEach(((e,t)=>{ + this[t] = e + } + )); + const a = s.reduce(((e,t)=>("string" == typeof t && e.set(t, (e.get(t) || 0) + 1), + e)), new Map); + if (this.#c = Object.freeze(o.map(((e,t)=>{ + const r = s[t]; + return null != r && 1 === a.get(r) ? r : null + } + ))), + i) + return Object.freeze(this), + new Proxy(this,{ + get: (e,t,r)=>{ + if ("string" == typeof t) { + if (t.match(/^[0-9]+$/)) { + const r = we(t, "%index"); + if (r < 0 || r >= this.length) + throw new RangeError("out of result range"); + const n = e[r]; + return n instanceof Error && kn(`index ${r}`, n), + n + } + if (Rn.indexOf(t) >= 0) + return Reflect.get(e, t, r); + const n = e[t]; + if (n instanceof Function) + return function() { + for (var t = arguments.length, o = new Array(t), s = 0; s < t; s++) + o[s] = arguments[s]; + return n.apply(this === r ? e : this, o) + } + ; + if (!(t in e)) + return e.getValue.apply(this === r ? e : this, [t]) + } + return Reflect.get(e, t, r) + } + }) + } + toArray() { + const e = []; + return this.forEach(((t,r)=>{ + t instanceof Error && kn(`index ${r}`, t), + e.push(t) + } + )), + e + } + toObject() { + return this.#c.reduce(((e,t,r)=>(q(null != t, "value at index ${ index } unnamed", "UNSUPPORTED_OPERATION", { + operation: "toObject()" + }), + t in e || (e[t] = this.getValue(t)), + e)), {}) + } + slice(e, t) { + null == e && (e = 0), + e < 0 && (e += this.length) < 0 && (e = 0), + null == t && (t = this.length), + t < 0 && (t += this.length) < 0 && (t = 0), + t > this.length && (t = this.length); + const r = [] + , n = []; + for (let o = e; o < t; o++) + r.push(this[o]), + n.push(this.#c[o]); + return new Un(Nn,r,n) + } + filter(e, t) { + const r = [] + , n = []; + for (let o = 0; o < this.length; o++) { + const s = this[o]; + s instanceof Error && kn(`index ${o}`, s), + e.call(t, s, o, this) && (r.push(s), + n.push(this.#c[o])) + } + return new Un(Nn,r,n) + } + map(e, t) { + const r = []; + for (let n = 0; n < this.length; n++) { + const o = this[n]; + o instanceof Error && kn(`index ${n}`, o), + r.push(e.call(t, o, n, this)) + } + return r + } + getValue(e) { + const t = this.#c.indexOf(e); + if (-1 === t) + return; + const r = this[t]; + return r instanceof Error && kn(`property ${JSON.stringify(e)}`, r.error), + r + } + static fromItems(e, t) { + return new Un(Nn,e,t) + } + } + function Dn(e) { + let t = Pe(e); + return q(t.length <= _n, "value out-of-bounds", "BUFFER_OVERRUN", { + buffer: t, + length: _n, + offset: t.length + }), + t.length !== _n && (t = ne(ue([xn.slice(t.length % _n), t]))), + t + } + class Ln { + name; + type; + localName; + dynamic; + constructor(e, t, r, n) { + G(this, { + name: e, + type: t, + localName: r, + dynamic: n + }, { + name: "string", + type: "string", + localName: "string", + dynamic: "boolean" + }) + } + _throwError(e, t) { + J(!1, e, this.localName, t) + } + } + class zn { + #o; + #l; + constructor() { + this.#o = [], + this.#l = 0 + } + get data() { + return ue(this.#o) + } + get length() { + return this.#l + } + #d(e) { + return this.#o.push(e), + this.#l += e.length, + e.length + } + appendWriter(e) { + return this.#d(ne(e.data)) + } + writeBytes(e) { + let t = ne(e); + const r = t.length % _n; + return r && (t = ne(ue([t, xn.slice(r)]))), + this.#d(t) + } + writeValue(e) { + return this.#d(Dn(e)) + } + writeUpdatableValue() { + const e = this.#o.length; + return this.#o.push(xn), + this.#l += _n, + t=>{ + this.#o[e] = Dn(t) + } + } + } + class jn { + allowLoose; + #o; + #h; + constructor(e, t) { + G(this, { + allowLoose: !!t + }), + this.#o = ne(e), + this.#h = 0 + } + get data() { + return ae(this.#o) + } + get dataLength() { + return this.#o.length + } + get consumed() { + return this.#h + } + get bytes() { + return new Uint8Array(this.#o) + } + #p(e, t, r) { + let n = Math.ceil(t / _n) * _n; + return this.#h + n > this.#o.length && (this.allowLoose && r && this.#h + t <= this.#o.length ? n = t : q(!1, "data out-of-bounds", "BUFFER_OVERRUN", { + buffer: ne(this.#o), + length: this.#o.length, + offset: this.#h + n + })), + this.#o.slice(this.#h, this.#h + n) + } + subReader(e) { + return new jn(this.#o.slice(this.#h + e),this.allowLoose) + } + readBytes(e, t) { + let r = this.#p(0, e, !!t); + return this.#h += r.length, + r.slice(0, e) + } + readValue() { + return ve(this.readBytes(_n)) + } + readIndex() { + return we(ve(this.readBytes(_n))) + } + } + const $n = {}; + function Vn(e, t) { + let r = !1; + return t < 0 && (r = !0, + t *= -1), + new Kn($n,`${r ? "" : "u"}int${t}`,e,{ + signed: r, + width: t + }) + } + function Gn(e, t) { + return new Kn($n,`bytes${t || ""}`,e,{ + size: t + }) + } + const Hn = Symbol.for("_ethers_typed"); + class Kn { + type; + value; + #f; + _typedSymbol; + constructor(e, t, r, n) { + null == n && (n = null), + ee($n, e, "Typed"), + G(this, { + _typedSymbol: Hn, + type: t, + value: r + }), + this.#f = n, + this.format() + } + format() { + if ("array" === this.type) + throw new Error(""); + if ("dynamicArray" === this.type) + throw new Error(""); + return "tuple" === this.type ? `tuple(${this.value.map((e=>e.format())).join(",")})` : this.type + } + defaultValue() { + return 0 + } + minValue() { + return 0 + } + maxValue() { + return 0 + } + isBigInt() { + return !!this.type.match(/^u?int[0-9]+$/) + } + isData() { + return this.type.startsWith("bytes") + } + isString() { + return "string" === this.type + } + get tupleName() { + if ("tuple" !== this.type) + throw TypeError("not a tuple"); + return this.#f + } + get arrayLength() { + if ("array" !== this.type) + throw TypeError("not an array"); + return !0 === this.#f ? -1 : !1 === this.#f ? this.value.length : null + } + static from(e, t) { + return new Kn($n,e,t) + } + static uint8(e) { + return Vn(e, 8) + } + static uint16(e) { + return Vn(e, 16) + } + static uint24(e) { + return Vn(e, 24) + } + static uint32(e) { + return Vn(e, 32) + } + static uint40(e) { + return Vn(e, 40) + } + static uint48(e) { + return Vn(e, 48) + } + static uint56(e) { + return Vn(e, 56) + } + static uint64(e) { + return Vn(e, 64) + } + static uint72(e) { + return Vn(e, 72) + } + static uint80(e) { + return Vn(e, 80) + } + static uint88(e) { + return Vn(e, 88) + } + static uint96(e) { + return Vn(e, 96) + } + static uint104(e) { + return Vn(e, 104) + } + static uint112(e) { + return Vn(e, 112) + } + static uint120(e) { + return Vn(e, 120) + } + static uint128(e) { + return Vn(e, 128) + } + static uint136(e) { + return Vn(e, 136) + } + static uint144(e) { + return Vn(e, 144) + } + static uint152(e) { + return Vn(e, 152) + } + static uint160(e) { + return Vn(e, 160) + } + static uint168(e) { + return Vn(e, 168) + } + static uint176(e) { + return Vn(e, 176) + } + static uint184(e) { + return Vn(e, 184) + } + static uint192(e) { + return Vn(e, 192) + } + static uint200(e) { + return Vn(e, 200) + } + static uint208(e) { + return Vn(e, 208) + } + static uint216(e) { + return Vn(e, 216) + } + static uint224(e) { + return Vn(e, 224) + } + static uint232(e) { + return Vn(e, 232) + } + static uint240(e) { + return Vn(e, 240) + } + static uint248(e) { + return Vn(e, 248) + } + static uint256(e) { + return Vn(e, 256) + } + static uint(e) { + return Vn(e, 256) + } + static int8(e) { + return Vn(e, -8) + } + static int16(e) { + return Vn(e, -16) + } + static int24(e) { + return Vn(e, -24) + } + static int32(e) { + return Vn(e, -32) + } + static int40(e) { + return Vn(e, -40) + } + static int48(e) { + return Vn(e, -48) + } + static int56(e) { + return Vn(e, -56) + } + static int64(e) { + return Vn(e, -64) + } + static int72(e) { + return Vn(e, -72) + } + static int80(e) { + return Vn(e, -80) + } + static int88(e) { + return Vn(e, -88) + } + static int96(e) { + return Vn(e, -96) + } + static int104(e) { + return Vn(e, -104) + } + static int112(e) { + return Vn(e, -112) + } + static int120(e) { + return Vn(e, -120) + } + static int128(e) { + return Vn(e, -128) + } + static int136(e) { + return Vn(e, -136) + } + static int144(e) { + return Vn(e, -144) + } + static int152(e) { + return Vn(e, -152) + } + static int160(e) { + return Vn(e, -160) + } + static int168(e) { + return Vn(e, -168) + } + static int176(e) { + return Vn(e, -176) + } + static int184(e) { + return Vn(e, -184) + } + static int192(e) { + return Vn(e, -192) + } + static int200(e) { + return Vn(e, -200) + } + static int208(e) { + return Vn(e, -208) + } + static int216(e) { + return Vn(e, -216) + } + static int224(e) { + return Vn(e, -224) + } + static int232(e) { + return Vn(e, -232) + } + static int240(e) { + return Vn(e, -240) + } + static int248(e) { + return Vn(e, -248) + } + static int256(e) { + return Vn(e, -256) + } + static int(e) { + return Vn(e, -256) + } + static bytes1(e) { + return Gn(e, 1) + } + static bytes2(e) { + return Gn(e, 2) + } + static bytes3(e) { + return Gn(e, 3) + } + static bytes4(e) { + return Gn(e, 4) + } + static bytes5(e) { + return Gn(e, 5) + } + static bytes6(e) { + return Gn(e, 6) + } + static bytes7(e) { + return Gn(e, 7) + } + static bytes8(e) { + return Gn(e, 8) + } + static bytes9(e) { + return Gn(e, 9) + } + static bytes10(e) { + return Gn(e, 10) + } + static bytes11(e) { + return Gn(e, 11) + } + static bytes12(e) { + return Gn(e, 12) + } + static bytes13(e) { + return Gn(e, 13) + } + static bytes14(e) { + return Gn(e, 14) + } + static bytes15(e) { + return Gn(e, 15) + } + static bytes16(e) { + return Gn(e, 16) + } + static bytes17(e) { + return Gn(e, 17) + } + static bytes18(e) { + return Gn(e, 18) + } + static bytes19(e) { + return Gn(e, 19) + } + static bytes20(e) { + return Gn(e, 20) + } + static bytes21(e) { + return Gn(e, 21) + } + static bytes22(e) { + return Gn(e, 22) + } + static bytes23(e) { + return Gn(e, 23) + } + static bytes24(e) { + return Gn(e, 24) + } + static bytes25(e) { + return Gn(e, 25) + } + static bytes26(e) { + return Gn(e, 26) + } + static bytes27(e) { + return Gn(e, 27) + } + static bytes28(e) { + return Gn(e, 28) + } + static bytes29(e) { + return Gn(e, 29) + } + static bytes30(e) { + return Gn(e, 30) + } + static bytes31(e) { + return Gn(e, 31) + } + static bytes32(e) { + return Gn(e, 32) + } + static address(e) { + return new Kn($n,"address",e) + } + static bool(e) { + return new Kn($n,"bool",!!e) + } + static bytes(e) { + return new Kn($n,"bytes",e) + } + static string(e) { + return new Kn($n,"string",e) + } + static array(e, t) { + throw new Error("not implemented yet") + } + static tuple(e, t) { + throw new Error("not implemented yet") + } + static overrides(e) { + return new Kn($n,"overrides",Object.assign({}, e)) + } + static isTyped(e) { + return e && "object" == typeof e && "_typedSymbol"in e && e._typedSymbol === Hn + } + static dereference(e, t) { + if (Kn.isTyped(e)) { + if (e.type !== t) + throw new Error(`invalid type: expecetd ${t}, got ${e.type}`); + return e.value + } + return e + } + } + class Zn extends Ln { + constructor(e) { + super("address", "address", e, !1) + } + defaultValue() { + return "0x0000000000000000000000000000000000000000" + } + encode(e, t) { + let r = Kn.dereference(t, "string"); + try { + r = Fr(r) + } catch (e) { + return this._throwError(e.message, t) + } + return e.writeValue(r) + } + decode(e) { + return Fr(Ae(e.readValue(), 20)) + } + } + class qn extends Ln { + coder; + constructor(e) { + super(e.name, e.type, "_", e.dynamic), + this.coder = e + } + defaultValue() { + return this.coder.defaultValue() + } + encode(e, t) { + return this.coder.encode(e, t) + } + decode(e) { + return this.coder.decode(e) + } + } + function Jn(e, t, r) { + let n = []; + if (Array.isArray(r)) + n = r; + else if (r && "object" == typeof r) { + let e = {}; + n = t.map((t=>{ + const n = t.localName; + return q(n, "cannot encode object for signature with missing names", "INVALID_ARGUMENT", { + argument: "values", + info: { + coder: t + }, + value: r + }), + q(!e[n], "cannot encode object for signature with duplicate names", "INVALID_ARGUMENT", { + argument: "values", + info: { + coder: t + }, + value: r + }), + e[n] = !0, + r[n] + } + )) + } else + J(!1, "invalid tuple value", "tuple", r); + J(t.length === n.length, "types/value length mismatch", "tuple", r); + let o = new zn + , s = new zn + , i = []; + t.forEach(((e,t)=>{ + let r = n[t]; + if (e.dynamic) { + let t = s.length; + e.encode(s, r); + let n = o.writeUpdatableValue(); + i.push((e=>{ + n(e + t) + } + )) + } else + e.encode(o, r) + } + )), + i.forEach((e=>{ + e(o.length) + } + )); + let a = e.appendWriter(o); + return a += e.appendWriter(s), + a + } + function Yn(e, t) { + let r = [] + , n = [] + , o = e.subReader(0); + return t.forEach((t=>{ + let s = null; + if (t.dynamic) { + let r = e.readIndex() + , n = o.subReader(r); + try { + s = t.decode(n) + } catch (e) { + if (K(e, "BUFFER_OVERRUN")) + throw e; + s = e, + s.baseType = t.name, + s.name = t.localName, + s.type = t.type + } + } else + try { + s = t.decode(e) + } catch (e) { + if (K(e, "BUFFER_OVERRUN")) + throw e; + s = e, + s.baseType = t.name, + s.name = t.localName, + s.type = t.type + } + if (null == s) + throw new Error("investigate"); + r.push(s), + n.push(t.localName || null) + } + )), + Un.fromItems(r, n) + } + class Xn extends Ln { + coder; + length; + constructor(e, t, r) { + super("array", e.type + "[" + (t >= 0 ? t : "") + "]", r, -1 === t || e.dynamic), + G(this, { + coder: e, + length: t + }) + } + defaultValue() { + const e = this.coder.defaultValue() + , t = []; + for (let r = 0; r < this.length; r++) + t.push(e); + return t + } + encode(e, t) { + const r = Kn.dereference(t, "array"); + Array.isArray(r) || this._throwError("expected array value", r); + let n = this.length; + -1 === n && (n = r.length, + e.writeValue(r.length)), + Y(r.length, n, "coder array" + (this.localName ? " " + this.localName : "")); + let o = []; + for (let e = 0; e < r.length; e++) + o.push(this.coder); + return Jn(e, o, r) + } + decode(e) { + let t = this.length; + -1 === t && (t = e.readIndex(), + q(t * _n <= e.dataLength, "insufficient data length", "BUFFER_OVERRUN", { + buffer: e.bytes, + offset: t * _n, + length: e.dataLength + })); + let r = []; + for (let e = 0; e < t; e++) + r.push(new qn(this.coder)); + return Yn(e, r) + } + } + class Qn extends Ln { + constructor(e) { + super("bool", "bool", e, !1) + } + defaultValue() { + return !1 + } + encode(e, t) { + const r = Kn.dereference(t, "bool"); + return e.writeValue(r ? 1 : 0) + } + decode(e) { + return !!e.readValue() + } + } + class eo extends Ln { + constructor(e, t) { + super(e, e, t, !0) + } + defaultValue() { + return "0x" + } + encode(e, t) { + t = ne(t); + let r = e.writeValue(t.length); + return r += e.writeBytes(t), + r + } + decode(e) { + return e.readBytes(e.readIndex(), !0) + } + } + class to extends eo { + constructor(e) { + super("bytes", e) + } + decode(e) { + return ae(super.decode(e)) + } + } + class ro extends Ln { + size; + constructor(e, t) { + let r = "bytes" + String(e); + super(r, r, t, !1), + G(this, { + size: e + }, { + size: "number" + }) + } + defaultValue() { + return "0x0000000000000000000000000000000000000000000000000000000000000000".substring(0, 2 + 2 * this.size) + } + encode(e, t) { + let r = ne(Kn.dereference(t, this.type)); + return r.length !== this.size && this._throwError("incorrect data length", t), + e.writeBytes(r) + } + decode(e) { + return ae(e.readBytes(this.size)) + } + } + const no = new Uint8Array([]); + class oo extends Ln { + constructor(e) { + super("null", "", e, !1) + } + defaultValue() { + return null + } + encode(e, t) { + return null != t && this._throwError("not null", t), + e.writeBytes(no) + } + decode(e) { + return e.readBytes(0), + null + } + } + const so = BigInt(0) + , io = BigInt(1) + , ao = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + class uo extends Ln { + size; + signed; + constructor(e, t, r) { + const n = (t ? "int" : "uint") + 8 * e; + super(n, n, r, !1), + G(this, { + size: e, + signed: t + }, { + size: "number", + signed: "boolean" + }) + } + defaultValue() { + return 0 + } + encode(e, t) { + let r = be(Kn.dereference(t, this.type)) + , n = ye(ao, 256); + if (this.signed) { + let e = ye(n, 8 * this.size - 1); + (r > e || r < -(e + io)) && this._throwError("value out-of-bounds", t), + r = ge(r, 256) + } else + (r < so || r > ye(n, 8 * this.size)) && this._throwError("value out-of-bounds", t); + return e.writeValue(r) + } + decode(e) { + let t = ye(e.readValue(), 8 * this.size); + return this.signed && (t = function(e, t) { + const r = me(e, "value") + , n = BigInt(we(t, "width")); + return q(r >> n === he, "overflow", "NUMERIC_FAULT", { + operation: "fromTwos", + fault: "overflow", + value: e + }), + r >> n - pe ? -((~r & (pe << n) - pe) + pe) : r + }(t, 8 * this.size)), + t + } + } + class co extends eo { + constructor(e) { + super("string", e) + } + defaultValue() { + return "" + } + encode(e, t) { + return super.encode(e, Lt(Kn.dereference(t, "string"))) + } + decode(e) { + return zt(super.decode(e)) + } + } + class lo extends Ln { + coders; + constructor(e, t) { + let r = !1; + const n = []; + e.forEach((e=>{ + e.dynamic && (r = !0), + n.push(e.type) + } + )), + super("tuple", "tuple(" + n.join(",") + ")", t, r), + G(this, { + coders: Object.freeze(e.slice()) + }) + } + defaultValue() { + const e = []; + this.coders.forEach((t=>{ + e.push(t.defaultValue()) + } + )); + const t = this.coders.reduce(((e,t)=>{ + const r = t.localName; + return r && (e[r] || (e[r] = 0), + e[r]++), + e + } + ), {}); + return this.coders.forEach(((r,n)=>{ + let o = r.localName; + o && 1 === t[o] && ("length" === o && (o = "_length"), + null == e[o] && (e[o] = e[n])) + } + )), + Object.freeze(e) + } + encode(e, t) { + const r = Kn.dereference(t, "tuple"); + return Jn(e, this.coders, r) + } + decode(e) { + return Yn(e, this.coders) + } + } + function ho(e) { + const t = new Set; + return e.forEach((e=>t.add(e))), + Object.freeze(t) + } + ho("external public payable".split(" ")); + const po = "constant external internal payable private public pure view" + , fo = (ho(po.split(" ")), + "constructor error event fallback function receive struct") + , go = (ho(fo.split(" ")), + "calldata memory storage payable indexed") + , yo = ho(go.split(" ")) + , bo = ho([fo, go, "tuple returns", po].join(" ").split(" ")) + , mo = { + "(": "OPEN_PAREN", + ")": "CLOSE_PAREN", + "[": "OPEN_BRACKET", + "]": "CLOSE_BRACKET", + ",": "COMMA", + "@": "AT" + } + , To = new RegExp("^(\\s*)") + , vo = new RegExp("^([0-9]+)") + , wo = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)") + , Ao = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$") + , Po = new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$"); + class Wo { + #h; + #g; + get offset() { + return this.#h + } + get length() { + return this.#g.length - this.#h + } + constructor(e) { + this.#h = 0, + this.#g = e.slice() + } + clone() { + return new Wo(this.#g) + } + reset() { + this.#h = 0 + } + #y() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0 + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0; + return new Wo(this.#g.slice(e, t).map((t=>Object.freeze(Object.assign({}, t, { + match: t.match - e, + linkBack: t.linkBack - e, + linkNext: t.linkNext - e + }))))) + } + popKeyword(e) { + const t = this.peek(); + if ("KEYWORD" !== t.type || !e.has(t.text)) + throw new Error(`expected keyword ${t.text}`); + return this.pop().text + } + popType(e) { + if (this.peek().type !== e) + throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`); + return this.pop().text + } + popParen() { + const e = this.peek(); + if ("OPEN_PAREN" !== e.type) + throw new Error("bad start"); + const t = this.#y(this.#h + 1, e.match + 1); + return this.#h = e.match + 1, + t + } + popParams() { + const e = this.peek(); + if ("OPEN_PAREN" !== e.type) + throw new Error("bad start"); + const t = []; + for (; this.#h < e.match - 1; ) { + const e = this.peek().linkNext; + t.push(this.#y(this.#h + 1, e)), + this.#h = e + } + return this.#h = e.match + 1, + t + } + peek() { + if (this.#h >= this.#g.length) + throw new Error("out-of-bounds"); + return this.#g[this.#h] + } + peekKeyword(e) { + const t = this.peekType("KEYWORD"); + return null != t && e.has(t) ? t : null + } + peekType(e) { + if (0 === this.length) + return null; + const t = this.peek(); + return t.type === e ? t.text : null + } + pop() { + const e = this.peek(); + return this.#h++, + e + } + toString() { + const e = []; + for (let t = this.#h; t < this.#g.length; t++) { + const r = this.#g[t]; + e.push(`${r.type}:${r.text}`) + } + return `` + } + } + function Bo(e, t) { + const r = new Set; + for (; ; ) { + const n = e.peekType("KEYWORD"); + if (null == n || t && !t.has(n)) + break; + if (e.pop(), + r.has(n)) + throw new Error(`duplicate keywords: ${JSON.stringify(n)}`); + r.add(n) + } + return Object.freeze(r) + } + const Co = new RegExp(/^(.*)\[([0-9]*)\]$/); + function Eo(e) { + const t = e.match(Po); + if (J(t, "invalid type", "type", e), + "uint" === e) + return "uint256"; + if ("int" === e) + return "int256"; + if (t[2]) { + const r = parseInt(t[2]); + J(0 !== r && r <= 32, "invalid bytes length", "type", e) + } else if (t[3]) { + const r = parseInt(t[3]); + J(0 !== r && r <= 256 && r % 8 == 0, "invalid numeric width", "type", e) + } + return e + } + const Mo = {} + , Io = Symbol.for("_ethers_internal") + , Fo = "_ParamTypeInternal"; + class Oo { + name; + type; + baseType; + indexed; + components; + arrayLength; + arrayChildren; + constructor(e, t, r, n, o, s, i, a) { + if (ee(e, Mo, "ParamType"), + Object.defineProperty(this, Io, { + value: Fo + }), + s && (s = Object.freeze(s.slice())), + "array" === n) { + if (null == i || null == a) + throw new Error("") + } else if (null != i || null != a) + throw new Error(""); + if ("tuple" === n) { + if (null == s) + throw new Error("") + } else if (null != s) + throw new Error(""); + G(this, { + name: t, + type: r, + baseType: n, + indexed: o, + components: s, + arrayLength: i, + arrayChildren: a + }) + } + format(e) { + if (null == e && (e = "sighash"), + "json" === e) { + const t = this.name || ""; + if (this.isArray()) { + const e = JSON.parse(this.arrayChildren.format("json")); + return e.name = t, + e.type += `[${this.arrayLength < 0 ? "" : String(this.arrayLength)}]`, + JSON.stringify(e) + } + const r = { + type: "tuple" === this.baseType ? "tuple" : this.type, + name: t + }; + return "boolean" == typeof this.indexed && (r.indexed = this.indexed), + this.isTuple() && (r.components = this.components.map((t=>JSON.parse(t.format(e))))), + JSON.stringify(r) + } + let t = ""; + return this.isArray() ? (t += this.arrayChildren.format(e), + t += `[${this.arrayLength < 0 ? "" : String(this.arrayLength)}]`) : this.isTuple() ? ("sighash" !== e && (t += this.type), + t += "(" + this.components.map((t=>t.format(e))).join("full" === e ? ", " : ",") + ")") : t += this.type, + "sighash" !== e && (!0 === this.indexed && (t += " indexed"), + "full" === e && this.name && (t += " " + this.name)), + t + } + isArray() { + return "array" === this.baseType + } + isTuple() { + return "tuple" === this.baseType + } + isIndexable() { + return null != this.indexed + } + walk(e, t) { + if (this.isArray()) { + if (!Array.isArray(e)) + throw new Error("invalid array value"); + if (-1 !== this.arrayLength && e.length !== this.arrayLength) + throw new Error("array is wrong length"); + const r = this; + return e.map((e=>r.arrayChildren.walk(e, t))) + } + if (this.isTuple()) { + if (!Array.isArray(e)) + throw new Error("invalid tuple value"); + if (e.length !== this.components.length) + throw new Error("array is wrong length"); + const r = this; + return e.map(((e,n)=>r.components[n].walk(e, t))) + } + return t(this.type, e) + } + #b(e, t, r, n) { + if (this.isArray()) { + if (!Array.isArray(t)) + throw new Error("invalid array value"); + if (-1 !== this.arrayLength && t.length !== this.arrayLength) + throw new Error("array is wrong length"); + const o = this.arrayChildren + , s = t.slice(); + return s.forEach(((t,n)=>{ + o.#b(e, t, r, (e=>{ + s[n] = e + } + )) + } + )), + void n(s) + } + if (this.isTuple()) { + const o = this.components; + let s; + if (Array.isArray(t)) + s = t.slice(); + else { + if (null == t || "object" != typeof t) + throw new Error("invalid tuple value"); + s = o.map((e=>{ + if (!e.name) + throw new Error("cannot use object value with unnamed components"); + if (!(e.name in t)) + throw new Error(`missing value for component ${e.name}`); + return t[e.name] + } + )) + } + if (s.length !== this.components.length) + throw new Error("array is wrong length"); + return s.forEach(((t,n)=>{ + o[n].#b(e, t, r, (e=>{ + s[n] = e + } + )) + } + )), + void n(s) + } + const o = r(this.type, t); + o.then ? e.push(async function() { + n(await o) + }()) : n(o) + } + async walkAsync(e, t) { + const r = [] + , n = [e]; + return this.#b(r, e, t, (e=>{ + n[0] = e + } + )), + r.length && await Promise.all(r), + n[0] + } + static from(e, t) { + if (Oo.isParamType(e)) + return e; + if ("string" == typeof e) + try { + return Oo.from(function(e) { + const t = [] + , r = t=>{ + const r = s < e.length ? JSON.stringify(e[s]) : "$EOI"; + throw new Error(`invalid token ${r} at ${s}: ${t}`) + } + ; + let n = [] + , o = [] + , s = 0; + for (; s < e.length; ) { + let i = e.substring(s) + , a = i.match(To); + a && (s += a[1].length, + i = e.substring(s)); + const u = { + depth: n.length, + linkBack: -1, + linkNext: -1, + match: -1, + type: "", + text: "", + offset: s, + value: -1 + }; + t.push(u); + let c = mo[i[0]] || ""; + if (c) { + if (u.type = c, + u.text = i[0], + s++, + "OPEN_PAREN" === c) + n.push(t.length - 1), + o.push(t.length - 1); + else if ("CLOSE_PAREN" == c) + 0 === n.length && r("no matching open bracket"), + u.match = n.pop(), + t[u.match].match = t.length - 1, + u.depth--, + u.linkBack = o.pop(), + t[u.linkBack].linkNext = t.length - 1; + else if ("COMMA" === c) + u.linkBack = o.pop(), + t[u.linkBack].linkNext = t.length - 1, + o.push(t.length - 1); + else if ("OPEN_BRACKET" === c) + u.type = "BRACKET"; + else if ("CLOSE_BRACKET" === c) { + let e = t.pop().text; + if (t.length > 0 && "NUMBER" === t[t.length - 1].type) { + const r = t.pop().text; + e = r + e, + t[t.length - 1].value = we(r) + } + if (0 === t.length || "BRACKET" !== t[t.length - 1].type) + throw new Error("missing opening bracket"); + t[t.length - 1].text += e + } + } else if (a = i.match(wo), + a) { + if (u.text = a[1], + s += u.text.length, + bo.has(u.text)) { + u.type = "KEYWORD"; + continue + } + if (u.text.match(Po)) { + u.type = "TYPE"; + continue + } + u.type = "ID" + } else { + if (a = i.match(vo), + !a) + throw new Error(`unexpected token ${JSON.stringify(i[0])} at position ${s}`); + u.text = a[1], + u.type = "NUMBER", + s += u.text.length + } + } + return new Wo(t.map((e=>Object.freeze(e)))) + }(e), t) + } catch (t) { + J(!1, "invalid param type", "obj", e) + } + else if (e instanceof Wo) { + let r = "" + , n = "" + , o = null; + Bo(e, ho(["tuple"])).has("tuple") || e.peekType("OPEN_PAREN") ? (n = "tuple", + o = e.popParams().map((e=>Oo.from(e))), + r = `tuple(${o.map((e=>e.format())).join(",")})`) : (r = Eo(e.popType("TYPE")), + n = r); + let s = null + , i = null; + for (; e.length && e.peekType("BRACKET"); ) { + const t = e.pop(); + s = new Oo(Mo,"",r,n,null,o,i,s), + i = t.value, + r += t.text, + n = "array", + o = null + } + let a = null; + if (Bo(e, yo).has("indexed")) { + if (!t) + throw new Error(""); + a = !0 + } + const u = e.peekType("ID") ? e.pop().text : ""; + if (e.length) + throw new Error("leftover tokens"); + return new Oo(Mo,u,r,n,a,o,i,s) + } + const r = e.name; + J(!r || "string" == typeof r && r.match(Ao), "invalid name", "obj.name", r); + let n = e.indexed; + null != n && (J(t, "parameter cannot be indexed", "obj.indexed", e.indexed), + n = !!n); + let o = e.type + , s = o.match(Co); + if (s) { + const t = parseInt(s[2] || "-1") + , i = Oo.from({ + type: s[1], + components: e.components + }); + return new Oo(Mo,r || "",o,"array",n,null,t,i) + } + if ("tuple" === o || o.startsWith("tuple(") || o.startsWith("(")) { + const t = null != e.components ? e.components.map((e=>Oo.from(e))) : null; + return new Oo(Mo,r || "",o,"tuple",n,t,null,null) + } + return o = Eo(e.type), + new Oo(Mo,r || "",o,o,n,null,null,null) + } + static isParamType(e) { + return e && e[Io] === Fo + } + } + const So = new Map; + So.set(0, "GENERIC_PANIC"), + So.set(1, "ASSERT_FALSE"), + So.set(17, "OVERFLOW"), + So.set(18, "DIVIDE_BY_ZERO"), + So.set(33, "ENUM_RANGE_ERROR"), + So.set(34, "BAD_STORAGE_DATA"), + So.set(49, "STACK_UNDERFLOW"), + So.set(50, "ARRAY_RANGE_ERROR"), + So.set(65, "OUT_OF_MEMORY"), + So.set(81, "UNINITIALIZED_FUNCTION_CALL"); + const _o = new RegExp(/^bytes([0-9]*)$/) + , xo = new RegExp(/^(u?int)([0-9]*)$/); + let Ro = null; + class No { + #m(e) { + if (e.isArray()) + return new Xn(this.#m(e.arrayChildren),e.arrayLength,e.name); + if (e.isTuple()) + return new lo(e.components.map((e=>this.#m(e))),e.name); + switch (e.baseType) { + case "address": + return new Zn(e.name); + case "bool": + return new Qn(e.name); + case "string": + return new co(e.name); + case "bytes": + return new to(e.name); + case "": + return new oo(e.name) + } + let t = e.type.match(xo); + if (t) { + let r = parseInt(t[2] || "256"); + return J(0 !== r && r <= 256 && r % 8 == 0, "invalid " + t[1] + " bit length", "param", e), + new uo(r / 8,"int" === t[1],e.name) + } + if (t = e.type.match(_o), + t) { + let r = parseInt(t[1]); + return J(0 !== r && r <= 32, "invalid bytes length", "param", e), + new ro(r,e.name) + } + J(!1, "invalid type", "type", e.type) + } + getDefaultValue(e) { + const t = e.map((e=>this.#m(Oo.from(e)))); + return new lo(t,"_").defaultValue() + } + encode(e, t) { + Y(t.length, e.length, "types/values length mismatch"); + const r = e.map((e=>this.#m(Oo.from(e)))) + , n = new lo(r,"_") + , o = new zn; + return n.encode(o, t), + o.data + } + decode(e, t, r) { + const n = e.map((e=>this.#m(Oo.from(e)))); + return new lo(n,"_").decode(new jn(t,r)) + } + static defaultAbiCoder() { + return null == Ro && (Ro = new No), + Ro + } + static getBuiltinCallException(e, t, r) { + return function(e, t, r, n) { + let o = "missing revert data" + , s = null + , i = null; + if (r) { + o = "execution reverted"; + const e = re(r); + if (r = ae(r), + 0 === e.length) + o += " (no data present; likely require(false) occurred", + s = "require(false)"; + else if (e.length % 32 != 4) + o += " (could not decode reason; invalid data length)"; + else if ("0x08c379a0" === ae(e.slice(0, 4))) + try { + s = n.decode(["string"], e.slice(4))[0], + i = { + signature: "Error(string)", + name: "Error", + args: [s] + }, + o += `: ${JSON.stringify(s)}` + } catch (e) { + o += " (could not decode reason; invalid string data)" + } + else if ("0x4e487b71" === ae(e.slice(0, 4))) + try { + const t = Number(n.decode(["uint256"], e.slice(4))[0]); + i = { + signature: "Panic(uint256)", + name: "Panic", + args: [t] + }, + s = `Panic due to ${So.get(t) || "UNKNOWN"}(${t})`, + o += `: ${s}` + } catch (e) { + o += " (could not decode panic code)" + } + else + o += " (unknown custom error)" + } + const a = { + to: t.to ? Fr(t.to) : null, + data: t.data || "0x" + }; + return t.from && (a.from = Fr(t.from)), + Z(o, "CALL_EXCEPTION", { + action: e, + data: r, + reason: s, + transaction: a, + invocation: null, + revert: i + }) + }(e, t, r, No.defaultAbiCoder()) + } + } + async function ko(e, t) { + const r = await t; + return null != r && "0x0000000000000000000000000000000000000000" !== r || (q("string" != typeof e, "unconfigured name", "UNCONFIGURED_NAME", { + value: e + }), + J(!1, "invalid AddressLike value; did not resolve to a value address", "target", e)), + Fr(r) + } + function Uo(e, t) { + return "string" == typeof e ? e.match(/^0x[0-9a-f]{40}$/i) ? Fr(e) : (q(null != t, "ENS resolution requires a provider", "UNSUPPORTED_OPERATION", { + operation: "resolveName" + }), + ko(e, t.resolveName(e))) : (r = e) && "function" == typeof r.getAddress ? ko(e, e.getAddress()) : e && "function" == typeof e.then ? ko(e, e) : void J(!1, "unsupported addressable value", "target", e); + var r + } + const Do = new Uint8Array(32); + Do.fill(0); + const Lo = BigInt(-1) + , zo = BigInt(0) + , jo = BigInt(1) + , $o = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff") + , Vo = Ae(jo, 32) + , Go = Ae(zo, 32) + , Ho = { + name: "string", + version: "string", + chainId: "uint256", + verifyingContract: "address", + salt: "bytes32" + } + , Ko = ["name", "version", "chainId", "verifyingContract", "salt"]; + function Zo(e) { + return function(t) { + return J("string" == typeof t, `invalid domain value for ${JSON.stringify(e)}`, `domain.${e}`, t), + t + } + } + const qo = { + name: Zo("name"), + version: Zo("version"), + chainId: function(e) { + const t = be(e, "domain.chainId"); + return J(t >= 0, "invalid chain ID", "domain.chainId", e), + Number.isSafeInteger(t) ? Number(t) : function(e) { + let t = ae(se(e) ? e : Pe(e)).substring(2); + for (; t.startsWith("0"); ) + t = t.substring(1); + return "" === t && (t = "0"), + "0x" + t + }(t) + }, + verifyingContract: function(e) { + try { + return Fr(e).toLowerCase() + } catch (e) {} + J(!1, 'invalid domain value "verifyingContract"', "domain.verifyingContract", e) + }, + salt: function(e) { + const t = re(e, "domain.salt"); + return J(32 === t.length, 'invalid domain value "salt"', "domain.salt", e), + ae(t) + } + }; + function Jo(e) { + { + const t = e.match(/^(u?)int(\d*)$/); + if (t) { + const r = "" === t[1] + , n = parseInt(t[2] || "256"); + J(n % 8 == 0 && 0 !== n && n <= 256 && (null == t[2] || t[2] === String(n)), "invalid numeric width", "type", e); + const o = ye($o, r ? n - 1 : n) + , s = r ? (o + jo) * Lo : zo; + return function(t) { + const n = be(t, "value"); + return J(n >= s && n <= o, `value out-of-bounds for ${e}`, "value", n), + Ae(r ? ge(n, 256) : n, 32) + } + } + } + { + const t = e.match(/^bytes(\d+)$/); + if (t) { + const r = parseInt(t[1]); + return J(0 !== r && r <= 32 && t[1] === String(r), "invalid bytes width", "type", e), + function(t) { + return J(re(t).length === r, `invalid length for ${e}`, "value", t), + function(e) { + const t = re(e) + , r = t.length % 32; + return r ? ue([t, Do.slice(r)]) : ae(t) + }(t) + } + } + } + switch (e) { + case "address": + return function(e) { + return de(Fr(e), 32) + } + ; + case "bool": + return function(e) { + return e ? Vo : Go + } + ; + case "bytes": + return function(e) { + return ir(e) + } + ; + case "string": + return function(e) { + return ar(e) + } + } + return null + } + function Yo(e, t) { + return `${e}(${t.map((e=>{ + let {name: t, type: r} = e; + return r + " " + t + } + )).join(",")})` + } + class Xo { + primaryType; + #T; + get types() { + return JSON.parse(this.#T) + } + #v; + #w; + constructor(e) { + this.#T = JSON.stringify(e), + this.#v = new Map, + this.#w = new Map; + const t = new Map + , r = new Map + , n = new Map; + Object.keys(e).forEach((e=>{ + t.set(e, new Set), + r.set(e, []), + n.set(e, new Set) + } + )); + for (const n in e) { + const o = new Set; + for (const s of e[n]) { + J(!o.has(s.name), `duplicate variable name ${JSON.stringify(s.name)} in ${JSON.stringify(n)}`, "types", e), + o.add(s.name); + const i = s.type.match(/^([^\x5b]*)(\x5b|$)/)[1] || null; + J(i !== n, `circular type reference to ${JSON.stringify(i)}`, "types", e), + Jo(i) || (J(r.has(i), `unknown type ${JSON.stringify(i)}`, "types", e), + r.get(i).push(n), + t.get(n).add(i)) + } + } + const o = Array.from(r.keys()).filter((e=>0 === r.get(e).length)); + J(0 !== o.length, "missing primary type", "types", e), + J(1 === o.length, `ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`, "types", e), + G(this, { + primaryType: o[0] + }), + function o(s, i) { + J(!i.has(s), `circular type reference to ${JSON.stringify(s)}`, "types", e), + i.add(s); + for (const e of t.get(s)) + if (r.has(e)) { + o(e, i); + for (const t of i) + n.get(t).add(e) + } + i.delete(s) + }(this.primaryType, new Set); + for (const [t,r] of n) { + const n = Array.from(r); + n.sort(), + this.#v.set(t, Yo(t, e[t]) + n.map((t=>Yo(t, e[t]))).join("")) + } + } + getEncoder(e) { + let t = this.#w.get(e); + return t || (t = this.#A(e), + this.#w.set(e, t)), + t + } + #A(e) { + { + const t = Jo(e); + if (t) + return t + } + const t = e.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (t) { + const e = t[1] + , r = this.getEncoder(e); + return n=>{ + J(!t[3] || parseInt(t[3]) === n.length, `array length mismatch; expected length ${parseInt(t[3])}`, "value", n); + let o = n.map(r); + return this.#v.has(e) && (o = o.map(ir)), + ir(ue(o)) + } + } + const r = this.types[e]; + if (r) { + const t = ar(this.#v.get(e)); + return e=>{ + const n = r.map((t=>{ + let {name: r, type: n} = t; + const o = this.getEncoder(n)(e[r]); + return this.#v.has(n) ? ir(o) : o + } + )); + return n.unshift(t), + ue(n) + } + } + J(!1, `unknown type: ${e}`, "type", e) + } + encodeType(e) { + const t = this.#v.get(e); + return J(t, `unknown type: ${JSON.stringify(e)}`, "name", e), + t + } + encodeData(e, t) { + return this.getEncoder(e)(t) + } + hashStruct(e, t) { + return ir(this.encodeData(e, t)) + } + encode(e) { + return this.encodeData(this.primaryType, e) + } + hash(e) { + return this.hashStruct(this.primaryType, e) + } + _visit(e, t, r) { + if (Jo(e)) + return r(e, t); + const n = e.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (n) + return J(!n[3] || parseInt(n[3]) === t.length, `array length mismatch; expected length ${parseInt(n[3])}`, "value", t), + t.map((e=>this._visit(n[1], e, r))); + const o = this.types[e]; + if (o) + return o.reduce(((e,n)=>{ + let {name: o, type: s} = n; + return e[o] = this._visit(s, t[o], r), + e + } + ), {}); + J(!1, `unknown type: ${e}`, "type", e) + } + visit(e, t) { + return this._visit(this.primaryType, e, t) + } + static from(e) { + return new Xo(e) + } + static getPrimaryType(e) { + return Xo.from(e).primaryType + } + static hashStruct(e, t, r) { + return Xo.from(t).hashStruct(e, r) + } + static hashDomain(e) { + const t = []; + for (const r in e) { + if (null == e[r]) + continue; + const n = Ho[r]; + J(n, `invalid typed-data domain key: ${JSON.stringify(r)}`, "domain", e), + t.push({ + name: r, + type: n + }) + } + return t.sort(((e,t)=>Ko.indexOf(e.name) - Ko.indexOf(t.name))), + Xo.hashStruct("EIP712Domain", { + EIP712Domain: t + }, e) + } + static encode(e, t, r) { + return ue(["0x1901", Xo.hashDomain(e), Xo.from(t).hash(r)]) + } + static hash(e, t, r) { + return ir(Xo.encode(e, t, r)) + } + static async resolveNames(e, t, r, n) { + e = Object.assign({}, e); + for (const t in e) + null == e[t] && delete e[t]; + const o = {}; + e.verifyingContract && !oe(e.verifyingContract, 20) && (o[e.verifyingContract] = "0x"); + const s = Xo.from(t); + s.visit(r, ((e,t)=>("address" !== e || oe(t, 20) || (o[t] = "0x"), + t))); + for (const e in o) + o[e] = await n(e); + return e.verifyingContract && o[e.verifyingContract] && (e.verifyingContract = o[e.verifyingContract]), + { + domain: e, + value: r = s.visit(r, ((e,t)=>"address" === e && o[t] ? o[t] : t)) + } + } + static getPayload(e, t, r) { + Xo.hashDomain(e); + const n = {} + , o = []; + Ko.forEach((t=>{ + const r = e[t]; + null != r && (n[t] = qo[t](r), + o.push({ + name: t, + type: Ho[t] + })) + } + )); + const s = Xo.from(t) + , i = Object.assign({}, t); + return J(null == i.EIP712Domain, "types must not contain EIP712Domain type", "types.EIP712Domain", t), + i.EIP712Domain = o, + s.encode(r), + { + types: i, + domain: n, + primaryType: s.primaryType, + message: s.visit(r, ((e,t)=>{ + if (e.match(/^bytes(\d*)/)) + return ae(re(t)); + if (e.match(/^u?int/)) + return be(t).toString(); + switch (e) { + case "address": + return t.toLowerCase(); + case "bool": + return !!t; + case "string": + return J("string" == typeof t, "invalid string", "value", t), + t + } + J(!1, "unsupported type", "type", e) + } + )) + } + } + } + function Qo(e) { + let t = e.toString(16); + for (; t.length < 2; ) + t = "0" + t; + return "0x" + t + } + function es(e, t, r) { + let n = 0; + for (let o = 0; o < r; o++) + n = 256 * n + e[t + o]; + return n + } + function ts(e, t, r, n) { + const o = []; + for (; r < t + 1 + n; ) { + const s = rs(e, r); + o.push(s.result), + q((r += s.consumed) <= t + 1 + n, "child data too short", "BUFFER_OVERRUN", { + buffer: e, + length: n, + offset: t + }) + } + return { + consumed: 1 + n, + result: o + } + } + function rs(e, t) { + q(0 !== e.length, "data too short", "BUFFER_OVERRUN", { + buffer: e, + length: 0, + offset: 1 + }); + const r = t=>{ + q(t <= e.length, "data short segment too short", "BUFFER_OVERRUN", { + buffer: e, + length: e.length, + offset: t + }) + } + ; + if (e[t] >= 248) { + const n = e[t] - 247; + r(t + 1 + n); + const o = es(e, t + 1, n); + return r(t + 1 + n + o), + ts(e, t, t + 1 + n, n + o) + } + if (e[t] >= 192) { + const n = e[t] - 192; + return r(t + 1 + n), + ts(e, t, t + 1, n) + } + if (e[t] >= 184) { + const n = e[t] - 183; + r(t + 1 + n); + const o = es(e, t + 1, n); + return r(t + 1 + n + o), + { + consumed: 1 + n + o, + result: ae(e.slice(t + 1 + n, t + 1 + n + o)) + } + } + if (e[t] >= 128) { + const n = e[t] - 128; + return r(t + 1 + n), + { + consumed: 1 + n, + result: ae(e.slice(t + 1, t + 1 + n)) + } + } + return { + consumed: 1, + result: Qo(e[t]) + } + } + function ns(e) { + const t = re(e, "data") + , r = rs(t, 0); + return J(r.consumed === t.length, "unexpected junk after rlp payload", "data", e), + r.result + } + function os(e) { + const t = []; + for (; e; ) + t.unshift(255 & e), + e >>= 8; + return t + } + function ss(e) { + if (Array.isArray(e)) { + let t = []; + if (e.forEach((function(e) { + t = t.concat(ss(e)) + } + )), + t.length <= 55) + return t.unshift(192 + t.length), + t; + const r = os(t.length); + return r.unshift(247 + r.length), + r.concat(t) + } + const t = Array.prototype.slice.call(re(e, "object")); + if (1 === t.length && t[0] <= 127) + return t; + if (t.length <= 55) + return t.unshift(128 + t.length), + t; + const r = os(t.length); + return r.unshift(183 + r.length), + r.concat(t) + } + const is = "0123456789abcdef"; + function as(e) { + let t = "0x"; + for (const r of ss(e)) + t += is[r >> 4], + t += is[15 & r]; + return t + } + function us(e, t) { + return { + address: Fr(e), + storageKeys: t.map(((e,t)=>(J(oe(e, 32), "invalid slot", `storageKeys[${t}]`, e), + e.toLowerCase()))) + } + } + function cs(e) { + if (Array.isArray(e)) + return e.map(((t,r)=>Array.isArray(t) ? (J(2 === t.length, "invalid slot set", `value[${r}]`, t), + us(t[0], t[1])) : (J(null != t && "object" == typeof t, "invalid address-slot set", "value", e), + us(t.address, t.storageKeys)))); + J(null != e && "object" == typeof e, "invalid access list", "value", e); + const t = Object.keys(e).map((t=>{ + const r = e[t].reduce(((e,t)=>(e[t] = !0, + e)), {}); + return us(t, Object.keys(r).sort()) + } + )); + return t.sort(((e,t)=>e.address.localeCompare(t.address))), + t + } + const ls = BigInt(0) + , ds = BigInt(2) + , hs = BigInt(27) + , ps = BigInt(28) + , fs = BigInt(35) + , gs = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + function ys(e) { + return "0x" === e ? null : Fr(e) + } + function bs(e, t) { + try { + return cs(e) + } catch (r) { + J(!1, r.message, t, e) + } + } + function ms(e, t) { + return "0x" === e ? 0 : we(e, t) + } + function Ts(e, t) { + if ("0x" === e) + return ls; + const r = be(e, t); + return J(r <= gs, "value exceeds uint size", t, r), + r + } + function vs(e, t) { + const r = be(e, "value") + , n = Pe(r); + return J(n.length <= 32, "value too large", `tx.${t}`, r), + n + } + function ws(e) { + return cs(e).map((e=>[e.address, e.storageKeys])) + } + function As(e, t) { + const r = [vs(e.nonce || 0, "nonce"), vs(e.gasPrice || 0, "gasPrice"), vs(e.gasLimit || 0, "gasLimit"), null != e.to ? Fr(e.to) : "0x", vs(e.value || 0, "value"), e.data || "0x"]; + let n = ls; + if (e.chainId != ls) + n = be(e.chainId, "tx.chainId"), + J(!t || null == t.networkV || t.legacyChainId === n, "tx.chainId/sig.v mismatch", "sig", t); + else if (e.signature) { + const t = e.signature.legacyChainId; + null != t && (n = t) + } + if (!t) + return n !== ls && (r.push(Pe(n)), + r.push("0x"), + r.push("0x")), + as(r); + let o = BigInt(27 + t.yParity); + return n !== ls ? o = Se.getChainIdV(n, t.v) : BigInt(t.v) !== o && J(!1, "tx.chainId/sig.v mismatch", "sig", t), + r.push(Pe(o)), + r.push(Pe(t.r)), + r.push(Pe(t.s)), + as(r) + } + function Ps(e, t) { + let r; + try { + if (r = ms(t[0], "yParity"), + 0 !== r && 1 !== r) + throw new Error("bad yParity") + } catch (e) { + J(!1, "invalid yParity", "yParity", t[0]) + } + const n = de(t[1], 32) + , o = de(t[2], 32) + , s = Se.from({ + r: n, + s: o, + yParity: r + }); + e.signature = s + } + function Ws(e, t) { + const r = [vs(e.chainId || 0, "chainId"), vs(e.nonce || 0, "nonce"), vs(e.maxPriorityFeePerGas || 0, "maxPriorityFeePerGas"), vs(e.maxFeePerGas || 0, "maxFeePerGas"), vs(e.gasLimit || 0, "gasLimit"), null != e.to ? Fr(e.to) : "0x", vs(e.value || 0, "value"), e.data || "0x", ws(e.accessList || [])]; + return t && (r.push(vs(t.yParity, "yParity")), + r.push(Pe(t.r)), + r.push(Pe(t.s))), + ue(["0x02", as(r)]) + } + function Bs(e, t) { + const r = [vs(e.chainId || 0, "chainId"), vs(e.nonce || 0, "nonce"), vs(e.gasPrice || 0, "gasPrice"), vs(e.gasLimit || 0, "gasLimit"), null != e.to ? Fr(e.to) : "0x", vs(e.value || 0, "value"), e.data || "0x", ws(e.accessList || [])]; + return t && (r.push(vs(t.yParity, "recoveryParam")), + r.push(Pe(t.r)), + r.push(Pe(t.s))), + ue(["0x01", as(r)]) + } + class Cs { + #P; + #W; + #o; + #B; + #C; + #E; + #M; + #I; + #F; + #O; + #S; + #_; + get type() { + return this.#P + } + set type(e) { + switch (e) { + case null: + this.#P = null; + break; + case 0: + case "legacy": + this.#P = 0; + break; + case 1: + case "berlin": + case "eip-2930": + this.#P = 1; + break; + case 2: + case "london": + case "eip-1559": + this.#P = 2; + break; + default: + J(!1, "unsupported transaction type", "type", e) + } + } + get typeName() { + switch (this.type) { + case 0: + return "legacy"; + case 1: + return "eip-2930"; + case 2: + return "eip-1559" + } + return null + } + get to() { + return this.#W + } + set to(e) { + this.#W = null == e ? null : Fr(e) + } + get nonce() { + return this.#B + } + set nonce(e) { + this.#B = we(e, "value") + } + get gasLimit() { + return this.#C + } + set gasLimit(e) { + this.#C = be(e) + } + get gasPrice() { + const e = this.#E; + return null != e || 0 !== this.type && 1 !== this.type ? e : ls + } + set gasPrice(e) { + this.#E = null == e ? null : be(e, "gasPrice") + } + get maxPriorityFeePerGas() { + const e = this.#M; + return null == e ? 2 === this.type ? ls : null : e + } + set maxPriorityFeePerGas(e) { + this.#M = null == e ? null : be(e, "maxPriorityFeePerGas") + } + get maxFeePerGas() { + const e = this.#I; + return null == e ? 2 === this.type ? ls : null : e + } + set maxFeePerGas(e) { + this.#I = null == e ? null : be(e, "maxFeePerGas") + } + get data() { + return this.#o + } + set data(e) { + this.#o = ae(e) + } + get value() { + return this.#F + } + set value(e) { + this.#F = be(e, "value") + } + get chainId() { + return this.#O + } + set chainId(e) { + this.#O = be(e) + } + get signature() { + return this.#S || null + } + set signature(e) { + this.#S = null == e ? null : Se.from(e) + } + get accessList() { + const e = this.#_ || null; + return null == e ? 1 === this.type || 2 === this.type ? [] : null : e + } + set accessList(e) { + this.#_ = null == e ? null : cs(e) + } + constructor() { + this.#P = null, + this.#W = null, + this.#B = 0, + this.#C = BigInt(0), + this.#E = null, + this.#M = null, + this.#I = null, + this.#o = "0x", + this.#F = BigInt(0), + this.#O = BigInt(0), + this.#S = null, + this.#_ = null + } + get hash() { + return null == this.signature ? null : ir(this.serialized) + } + get unsignedHash() { + return ir(this.unsignedSerialized) + } + get from() { + return null == this.signature ? null : Sn(this.unsignedHash, this.signature) + } + get fromPublicKey() { + return null == this.signature ? null : Fn.recoverPublicKey(this.unsignedHash, this.signature) + } + isSigned() { + return null != this.signature + } + get serialized() { + switch (q(null != this.signature, "cannot serialize unsigned transaction; maybe you meant .unsignedSerialized", "UNSUPPORTED_OPERATION", { + operation: ".serialized" + }), + this.inferType()) { + case 0: + return As(this, this.signature); + case 1: + return Bs(this, this.signature); + case 2: + return Ws(this, this.signature) + } + q(!1, "unsupported transaction type", "UNSUPPORTED_OPERATION", { + operation: ".serialized" + }) + } + get unsignedSerialized() { + switch (this.inferType()) { + case 0: + return As(this); + case 1: + return Bs(this); + case 2: + return Ws(this) + } + q(!1, "unsupported transaction type", "UNSUPPORTED_OPERATION", { + operation: ".unsignedSerialized" + }) + } + inferType() { + return this.inferTypes().pop() + } + inferTypes() { + const e = null != this.gasPrice + , t = null != this.maxFeePerGas || null != this.maxPriorityFeePerGas + , r = null != this.accessList; + null != this.maxFeePerGas && null != this.maxPriorityFeePerGas && q(this.maxFeePerGas >= this.maxPriorityFeePerGas, "priorityFee cannot be more than maxFee", "BAD_DATA", { + value: this + }), + q(!t || 0 !== this.type && 1 !== this.type, "transaction type cannot have maxFeePerGas or maxPriorityFeePerGas", "BAD_DATA", { + value: this + }), + q(0 !== this.type || !r, "legacy transaction cannot have accessList", "BAD_DATA", { + value: this + }); + const n = []; + return null != this.type ? n.push(this.type) : t ? n.push(2) : e ? (n.push(1), + r || n.push(0)) : r ? (n.push(1), + n.push(2)) : (n.push(0), + n.push(1), + n.push(2)), + n.sort(), + n + } + isLegacy() { + return 0 === this.type + } + isBerlin() { + return 1 === this.type + } + isLondon() { + return 2 === this.type + } + clone() { + return Cs.from(this) + } + toJSON() { + const e = e=>null == e ? null : e.toString(); + return { + type: this.type, + to: this.to, + data: this.data, + nonce: this.nonce, + gasLimit: e(this.gasLimit), + gasPrice: e(this.gasPrice), + maxPriorityFeePerGas: e(this.maxPriorityFeePerGas), + maxFeePerGas: e(this.maxFeePerGas), + value: e(this.value), + chainId: e(this.chainId), + sig: this.signature ? this.signature.toJSON() : null, + accessList: this.accessList + } + } + static from(e) { + if (null == e) + return new Cs; + if ("string" == typeof e) { + const t = re(e); + if (t[0] >= 127) + return Cs.from(function(e) { + const t = ns(e); + J(Array.isArray(t) && (9 === t.length || 6 === t.length), "invalid field count for legacy transaction", "data", e); + const r = { + type: 0, + nonce: ms(t[0], "nonce"), + gasPrice: Ts(t[1], "gasPrice"), + gasLimit: Ts(t[2], "gasLimit"), + to: ys(t[3]), + value: Ts(t[4], "value"), + data: ae(t[5]), + chainId: ls + }; + if (6 === t.length) + return r; + const n = Ts(t[6], "v") + , o = Ts(t[7], "r") + , s = Ts(t[8], "s"); + if (o === ls && s === ls) + r.chainId = n; + else { + let o = (n - fs) / ds; + o < ls && (o = ls), + r.chainId = o, + J(o !== ls || n === hs || n === ps, "non-canonical legacy v", "v", t[6]), + r.signature = Se.from({ + r: de(t[7], 32), + s: de(t[8], 32), + v: n + }), + r.hash = ir(e) + } + return r + }(t)); + switch (t[0]) { + case 1: + return Cs.from(function(e) { + const t = ns(re(e).slice(1)); + J(Array.isArray(t) && (8 === t.length || 11 === t.length), "invalid field count for transaction type: 1", "data", ae(e)); + const r = { + type: 1, + chainId: Ts(t[0], "chainId"), + nonce: ms(t[1], "nonce"), + gasPrice: Ts(t[2], "gasPrice"), + gasLimit: Ts(t[3], "gasLimit"), + to: ys(t[4]), + value: Ts(t[5], "value"), + data: ae(t[6]), + accessList: bs(t[7], "accessList") + }; + return 8 === t.length || (r.hash = ir(e), + Ps(r, t.slice(8))), + r + }(t)); + case 2: + return Cs.from(function(e) { + const t = ns(re(e).slice(1)); + J(Array.isArray(t) && (9 === t.length || 12 === t.length), "invalid field count for transaction type: 2", "data", ae(e)); + const r = Ts(t[2], "maxPriorityFeePerGas") + , n = Ts(t[3], "maxFeePerGas") + , o = { + type: 2, + chainId: Ts(t[0], "chainId"), + nonce: ms(t[1], "nonce"), + maxPriorityFeePerGas: r, + maxFeePerGas: n, + gasPrice: null, + gasLimit: Ts(t[4], "gasLimit"), + to: ys(t[5]), + value: Ts(t[6], "value"), + data: ae(t[7]), + accessList: bs(t[8], "accessList") + }; + return 9 === t.length || (o.hash = ir(e), + Ps(o, t.slice(9))), + o + }(t)) + } + q(!1, "unsupported transaction type", "UNSUPPORTED_OPERATION", { + operation: "from" + }) + } + const t = new Cs; + return null != e.type && (t.type = e.type), + null != e.to && (t.to = e.to), + null != e.nonce && (t.nonce = e.nonce), + null != e.gasLimit && (t.gasLimit = e.gasLimit), + null != e.gasPrice && (t.gasPrice = e.gasPrice), + null != e.maxPriorityFeePerGas && (t.maxPriorityFeePerGas = e.maxPriorityFeePerGas), + null != e.maxFeePerGas && (t.maxFeePerGas = e.maxFeePerGas), + null != e.data && (t.data = e.data), + null != e.value && (t.value = e.value), + null != e.chainId && (t.chainId = e.chainId), + null != e.signature && (t.signature = Se.from(e.signature)), + null != e.accessList && (t.accessList = e.accessList), + null != e.hash && (J(t.isSigned(), "unsigned transaction cannot define hash", "tx", e), + J(t.hash === e.hash, "hash mismatch", "tx", e)), + null != e.from && (J(t.isSigned(), "unsigned transaction cannot define from", "tx", e), + J(t.from.toLowerCase() === (e.from || "").toLowerCase(), "from mismatch", "tx", e)), + t + } + } + function Es(e, t) { + if (e.provider) + return e.provider; + q(!1, "missing provider", "UNSUPPORTED_OPERATION", { + operation: t + }) + } + async function Ms(e, t) { + let r = function(e) { + const t = {}; + e.to && (t.to = e.to), + e.from && (t.from = e.from), + e.data && (t.data = ae(e.data)); + const r = "chainId,gasLimit,gasPrice,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/); + for (const n of r) + n in e && null != e[n] && (t[n] = be(e[n], `request.${n}`)); + const n = "type,nonce".split(/,/); + for (const r of n) + r in e && null != e[r] && (t[r] = we(e[r], `request.${r}`)); + return e.accessList && (t.accessList = cs(e.accessList)), + "blockTag"in e && (t.blockTag = e.blockTag), + "enableCcipRead"in e && (t.enableCcipRead = !!e.enableCcipRead), + "customData"in e && (t.customData = e.customData), + t + }(t); + if (null != r.to && (r.to = Uo(r.to, e)), + null != r.from) { + const t = r.from; + r.from = Promise.all([e.getAddress(), Uo(t, e)]).then((e=>{ + let[t,r] = e; + return J(t.toLowerCase() === r.toLowerCase(), "transaction from mismatch", "tx.from", r), + t + } + )) + } else + r.from = e.getAddress(); + return await V(r) + } + BigInt(0), + Symbol.iterator, + Symbol.iterator; + class Is { + provider; + constructor(e) { + G(this, { + provider: e || null + }) + } + async getNonce(e) { + return Es(this, "getTransactionCount").getTransactionCount(await this.getAddress(), e) + } + async populateCall(e) { + return await Ms(this, e) + } + async populateTransaction(e) { + const t = Es(this, "populateTransaction") + , r = await Ms(this, e); + null == r.nonce && (r.nonce = await this.getNonce("pending")), + null == r.gasLimit && (r.gasLimit = await this.estimateGas(r)); + const n = await this.provider.getNetwork(); + null != r.chainId ? J(be(r.chainId) === n.chainId, "transaction chainId mismatch", "tx.chainId", e.chainId) : r.chainId = n.chainId; + const o = null != r.maxFeePerGas || null != r.maxPriorityFeePerGas; + if (null == r.gasPrice || 2 !== r.type && !o ? 0 !== r.type && 1 !== r.type || !o || J(!1, "pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas", "tx", e) : J(!1, "eip-1559 transaction do not support gasPrice", "tx", e), + 2 !== r.type && null != r.type || null == r.maxFeePerGas || null == r.maxPriorityFeePerGas) + if (0 === r.type || 1 === r.type) { + const e = await t.getFeeData(); + q(null != e.gasPrice, "network does not support gasPrice", "UNSUPPORTED_OPERATION", { + operation: "getGasPrice" + }), + null == r.gasPrice && (r.gasPrice = e.gasPrice) + } else { + const e = await t.getFeeData(); + if (null == r.type) + if (null != e.maxFeePerGas && null != e.maxPriorityFeePerGas) + if (r.type = 2, + null != r.gasPrice) { + const e = r.gasPrice; + delete r.gasPrice, + r.maxFeePerGas = e, + r.maxPriorityFeePerGas = e + } else + null == r.maxFeePerGas && (r.maxFeePerGas = e.maxFeePerGas), + null == r.maxPriorityFeePerGas && (r.maxPriorityFeePerGas = e.maxPriorityFeePerGas); + else + null != e.gasPrice ? (q(!o, "network does not support EIP-1559", "UNSUPPORTED_OPERATION", { + operation: "populateTransaction" + }), + null == r.gasPrice && (r.gasPrice = e.gasPrice), + r.type = 0) : q(!1, "failed to get consistent fee data", "UNSUPPORTED_OPERATION", { + operation: "signer.getFeeData" + }); + else + 2 === r.type && (null == r.maxFeePerGas && (r.maxFeePerGas = e.maxFeePerGas), + null == r.maxPriorityFeePerGas && (r.maxPriorityFeePerGas = e.maxPriorityFeePerGas)) + } + else + r.type = 2; + return await V(r) + } + async estimateGas(e) { + return Es(this, "estimateGas").estimateGas(await this.populateCall(e)) + } + async call(e) { + return Es(this, "call").call(await this.populateCall(e)) + } + async resolveName(e) { + const t = Es(this, "resolveName"); + return await t.resolveName(e) + } + async sendTransaction(e) { + const t = Es(this, "sendTransaction") + , r = await this.populateTransaction(e); + delete r.from; + const n = Cs.from(r); + return await t.broadcastTransaction(await this.signTransaction(n)) + } + } + class Fs extends Is { + address; + constructor(e, t) { + super(t), + G(this, { + address: e + }) + } + async getAddress() { + return this.address + } + connect(e) { + return new Fs(this.address,e) + } + #x(e, t) { + q(!1, `VoidSigner cannot sign ${e}`, "UNSUPPORTED_OPERATION", { + operation: t + }) + } + async signTransaction(e) { + this.#x("transactions", "signTransaction") + } + async signMessage(e) { + this.#x("messages", "signMessage") + } + async signTypedData(e, t, r) { + this.#x("typed-data", "signTypedData") + } + } + class Os extends Is { + address; + #R; + constructor(e, t) { + super(t), + J(e && "function" == typeof e.sign, "invalid private key", "privateKey", "[ REDACTED ]"), + this.#R = e, + G(this, { + address: On(this.signingKey.publicKey) + }) + } + get signingKey() { + return this.#R + } + get privateKey() { + return this.signingKey.privateKey + } + async getAddress() { + return this.address + } + connect(e) { + return new Os(this.#R,e) + } + async signTransaction(e) { + const {to: t, from: r} = await V({ + to: e.to ? Uo(e.to, this.provider) : void 0, + from: e.from ? Uo(e.from, this.provider) : void 0 + }); + null != t && (e.to = t), + null != r && (e.from = r), + null != e.from && (J(Fr(e.from) === this.address, "transaction from address mismatch", "tx.from", e.from), + delete e.from); + const n = Cs.from(e); + return n.signature = this.signingKey.sign(n.unsignedHash), + n.serialized + } + async signMessage(e) { + return this.signMessageSync(e) + } + signMessageSync(e) { + return this.signingKey.sign(function(e) { + return "string" == typeof e && (e = Lt(e)), + ir(ue([Lt("Ethereum Signed Message:\n"), Lt(String(e.length)), e])) + }(e)).serialized + } + async signTypedData(e, t, r) { + const n = await Xo.resolveNames(e, t, r, (async e=>{ + q(null != this.provider, "cannot resolve ENS names without a provider", "UNSUPPORTED_OPERATION", { + operation: "resolveName", + info: { + name: e + } + }); + const t = await this.provider.resolveName(e); + return q(null != t, "unconfigured ENS name", "UNCONFIGURED_NAME", { + value: e + }), + t + } + )); + return this.signingKey.sign(Xo.hash(n.domain, t, n.value)).serialized + } + } + const Ss = new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]) + , _s = Uint8Array.from({ + length: 16 + }, ((e,t)=>t)); + let xs = [_s] + , Rs = [_s.map((e=>(9 * e + 5) % 16))]; + for (let e = 0; e < 4; e++) + for (let t of [xs, Rs]) + t.push(t[e].map((e=>Ss[e]))); + const Ns = [[11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8], [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7], [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9], [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6], [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]].map((e=>new Uint8Array(e))) + , ks = xs.map(((e,t)=>e.map((e=>Ns[t][e])))) + , Us = Rs.map(((e,t)=>e.map((e=>Ns[t][e])))) + , Ds = new Uint32Array([0, 1518500249, 1859775393, 2400959708, 2840853838]) + , Ls = new Uint32Array([1352829926, 1548603684, 1836072691, 2053994217, 0]) + , zs = (e,t)=>e << t | e >>> 32 - t; + function js(e, t, r, n) { + return 0 === e ? t ^ r ^ n : 1 === e ? t & r | ~t & n : 2 === e ? (t | ~r) ^ n : 3 === e ? t & n | r & ~n : t ^ (r | ~n) + } + const $s = new Uint32Array(16); + class Vs extends et { + constructor() { + super(64, 20, 8, !0), + this.h0 = 1732584193, + this.h1 = -271733879, + this.h2 = -1732584194, + this.h3 = 271733878, + this.h4 = -1009589776 + } + get() { + const {h0: e, h1: t, h2: r, h3: n, h4: o} = this; + return [e, t, r, n, o] + } + set(e, t, r, n, o) { + this.h0 = 0 | e, + this.h1 = 0 | t, + this.h2 = 0 | r, + this.h3 = 0 | n, + this.h4 = 0 | o + } + process(e, t) { + for (let r = 0; r < 16; r++, + t += 4) + $s[r] = e.getUint32(t, !0); + let r = 0 | this.h0 + , n = r + , o = 0 | this.h1 + , s = o + , i = 0 | this.h2 + , a = i + , u = 0 | this.h3 + , c = u + , l = 0 | this.h4 + , d = l; + for (let e = 0; e < 5; e++) { + const t = 4 - e + , h = Ds[e] + , p = Ls[e] + , f = xs[e] + , g = Rs[e] + , y = ks[e] + , b = Us[e]; + for (let t = 0; t < 16; t++) { + const n = zs(r + js(e, o, i, u) + $s[f[t]] + h, y[t]) + l | 0; + r = l, + l = u, + u = 0 | zs(i, 10), + i = o, + o = n + } + for (let e = 0; e < 16; e++) { + const r = zs(n + js(t, s, a, c) + $s[g[e]] + p, b[e]) + d | 0; + n = d, + d = c, + c = 0 | zs(a, 10), + a = s, + s = r + } + } + this.set(this.h1 + i + c | 0, this.h2 + u + d | 0, this.h3 + l + n | 0, this.h4 + r + s | 0, this.h0 + o + a | 0) + } + roundClean() { + $s.fill(0) + } + destroy() { + this.destroyed = !0, + this.buffer.fill(0), + this.set(0, 0, 0, 0, 0) + } + } + const Gs = qe((()=>new Vs)); + let Hs = !1; + const Ks = function(e) { + return Gs(e) + }; + let Zs = Ks; + function qs(e) { + const t = re(e, "data"); + return ae(Zs(t)) + } + qs._ = Ks, + qs.lock = function() { + Hs = !0 + } + , + qs.register = function(e) { + if (Hs) + throw new TypeError("ripemd160 is locked"); + Zs = e + } + , + Object.freeze(qs); + let Js = !1; + const Ys = function(e) { + return new Uint8Array(function(e) { + q(null != Wt, "platform does not support secure random numbers", "UNSUPPORTED_OPERATION", { + operation: "randomBytes" + }), + J(Number.isInteger(e) && e > 0 && e <= 1024, "invalid length", "length", e); + const t = new Uint8Array(e); + return Wt.getRandomValues(t), + t + }(e)) + }; + let Xs = Ys; + function Qs(e) { + return Xs(e) + } + Qs._ = Ys, + Qs.lock = function() { + Js = !0 + } + , + Qs.register = function(e) { + if (Js) + throw new Error("randomBytes is locked"); + Xs = e + } + , + Object.freeze(Qs); + const ei = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; + let ti = null; + function ri(e) { + if (null == ti) { + ti = {}; + for (let e = 0; e < 58; e++) + ti[ei[e]] = BigInt(e) + } + const t = ti[e]; + return J(null != t, "invalid base58 value", "letter", e), + t + } + const ni = BigInt(0) + , oi = BigInt(58); + var si, ii, ai, ui = function(e, t, r, n) { + if ("a" === r && !n) + throw new TypeError("Private accessor was defined without a getter"); + if ("function" == typeof t ? e !== t || !n : !t.has(e)) + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return "m" === r ? n : "a" === r ? n.call(e) : n ? n.value : t.get(e) + }, ci = function(e, t, r, n, o) { + if ("m" === n) + throw new TypeError("Private method is not writable"); + if ("a" === n && !o) + throw new TypeError("Private accessor was defined without a setter"); + if ("function" == typeof t ? e !== t || !o : !t.has(e)) + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return "a" === n ? o.call(e, r) : o ? o.value = r : t.set(e, r), + r + }; + const li = { + 16: 10, + 24: 12, + 32: 14 + } + , di = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145] + , hi = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22] + , pi = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125] + , fi = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986] + , gi = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766] + , yi = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126] + , bi = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436] + , mi = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890] + , Ti = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935] + , vi = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600] + , wi = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480] + , Ai = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795] + , Pi = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855] + , Wi = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150] + , Bi = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925]; + function Ci(e) { + const t = []; + for (let r = 0; r < e.length; r += 4) + t.push(e[r] << 24 | e[r + 1] << 16 | e[r + 2] << 8 | e[r + 3]); + return t + } + class Ei { + get key() { + return ui(this, si, "f").slice() + } + constructor(e) { + if (si.set(this, void 0), + ii.set(this, void 0), + ai.set(this, void 0), + !(this instanceof Ei)) + throw Error("AES must be instanitated with `new`"); + ci(this, si, new Uint8Array(e), "f"); + const t = li[this.key.length]; + if (null == t) + throw new TypeError("invalid key size (must be 16, 24 or 32 bytes)"); + ci(this, ai, [], "f"), + ci(this, ii, [], "f"); + for (let e = 0; e <= t; e++) + ui(this, ai, "f").push([0, 0, 0, 0]), + ui(this, ii, "f").push([0, 0, 0, 0]); + const r = 4 * (t + 1) + , n = this.key.length / 4 + , o = Ci(this.key); + let s; + for (let e = 0; e < n; e++) + s = e >> 2, + ui(this, ai, "f")[s][e % 4] = o[e], + ui(this, ii, "f")[t - s][e % 4] = o[e]; + let i, a = 0, u = n; + for (; u < r; ) { + if (i = o[n - 1], + o[0] ^= hi[i >> 16 & 255] << 24 ^ hi[i >> 8 & 255] << 16 ^ hi[255 & i] << 8 ^ hi[i >> 24 & 255] ^ di[a] << 24, + a += 1, + 8 != n) + for (let e = 1; e < n; e++) + o[e] ^= o[e - 1]; + else { + for (let e = 1; e < n / 2; e++) + o[e] ^= o[e - 1]; + i = o[n / 2 - 1], + o[n / 2] ^= hi[255 & i] ^ hi[i >> 8 & 255] << 8 ^ hi[i >> 16 & 255] << 16 ^ hi[i >> 24 & 255] << 24; + for (let e = n / 2 + 1; e < n; e++) + o[e] ^= o[e - 1] + } + let e, s, c = 0; + for (; c < n && u < r; ) + e = u >> 2, + s = u % 4, + ui(this, ai, "f")[e][s] = o[c], + ui(this, ii, "f")[t - e][s] = o[c++], + u++ + } + for (let e = 1; e < t; e++) + for (let t = 0; t < 4; t++) + i = ui(this, ii, "f")[e][t], + ui(this, ii, "f")[e][t] = Ai[i >> 24 & 255] ^ Pi[i >> 16 & 255] ^ Wi[i >> 8 & 255] ^ Bi[255 & i] + } + encrypt(e) { + if (16 != e.length) + throw new TypeError("invalid plaintext size (must be 16 bytes)"); + const t = ui(this, ai, "f").length - 1 + , r = [0, 0, 0, 0]; + let n = Ci(e); + for (let e = 0; e < 4; e++) + n[e] ^= ui(this, ai, "f")[0][e]; + for (let e = 1; e < t; e++) { + for (let t = 0; t < 4; t++) + r[t] = fi[n[t] >> 24 & 255] ^ gi[n[(t + 1) % 4] >> 16 & 255] ^ yi[n[(t + 2) % 4] >> 8 & 255] ^ bi[255 & n[(t + 3) % 4]] ^ ui(this, ai, "f")[e][t]; + n = r.slice() + } + const o = new Uint8Array(16); + let s = 0; + for (let e = 0; e < 4; e++) + s = ui(this, ai, "f")[t][e], + o[4 * e] = 255 & (hi[n[e] >> 24 & 255] ^ s >> 24), + o[4 * e + 1] = 255 & (hi[n[(e + 1) % 4] >> 16 & 255] ^ s >> 16), + o[4 * e + 2] = 255 & (hi[n[(e + 2) % 4] >> 8 & 255] ^ s >> 8), + o[4 * e + 3] = 255 & (hi[255 & n[(e + 3) % 4]] ^ s); + return o + } + decrypt(e) { + if (16 != e.length) + throw new TypeError("invalid ciphertext size (must be 16 bytes)"); + const t = ui(this, ii, "f").length - 1 + , r = [0, 0, 0, 0]; + let n = Ci(e); + for (let e = 0; e < 4; e++) + n[e] ^= ui(this, ii, "f")[0][e]; + for (let e = 1; e < t; e++) { + for (let t = 0; t < 4; t++) + r[t] = mi[n[t] >> 24 & 255] ^ Ti[n[(t + 3) % 4] >> 16 & 255] ^ vi[n[(t + 2) % 4] >> 8 & 255] ^ wi[255 & n[(t + 1) % 4]] ^ ui(this, ii, "f")[e][t]; + n = r.slice() + } + const o = new Uint8Array(16); + let s = 0; + for (let e = 0; e < 4; e++) + s = ui(this, ii, "f")[t][e], + o[4 * e] = 255 & (pi[n[e] >> 24 & 255] ^ s >> 24), + o[4 * e + 1] = 255 & (pi[n[(e + 3) % 4] >> 16 & 255] ^ s >> 16), + o[4 * e + 2] = 255 & (pi[n[(e + 2) % 4] >> 8 & 255] ^ s >> 8), + o[4 * e + 3] = 255 & (pi[255 & n[(e + 1) % 4]] ^ s); + return o + } + } + si = new WeakMap, + ii = new WeakMap, + ai = new WeakMap; + class Mi { + constructor(e, t, r) { + if (r && !(this instanceof r)) + throw new Error(`${e} must be instantiated with "new"`); + Object.defineProperties(this, { + aes: { + enumerable: !0, + value: new Ei(t) + }, + name: { + enumerable: !0, + value: e + } + }) + } + } + var Ii, Fi, Oi = function(e, t, r, n, o) { + if ("m" === n) + throw new TypeError("Private method is not writable"); + if ("a" === n && !o) + throw new TypeError("Private accessor was defined without a setter"); + if ("function" == typeof t ? e !== t || !o : !t.has(e)) + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return "a" === n ? o.call(e, r) : o ? o.value = r : t.set(e, r), + r + }, Si = function(e, t, r, n) { + if ("a" === r && !n) + throw new TypeError("Private accessor was defined without a getter"); + if ("function" == typeof t ? e !== t || !n : !t.has(e)) + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return "m" === r ? n : "a" === r ? n.call(e) : n ? n.value : t.get(e) + }; + class _i extends Mi { + constructor(e, t) { + if (super("ECC", e, _i), + Ii.set(this, void 0), + Fi.set(this, void 0), + t) { + if (t.length % 16) + throw new TypeError("invalid iv size (must be 16 bytes)"); + Oi(this, Ii, new Uint8Array(t), "f") + } else + Oi(this, Ii, new Uint8Array(16), "f"); + Oi(this, Fi, this.iv, "f") + } + get iv() { + return new Uint8Array(Si(this, Ii, "f")) + } + encrypt(e) { + if (e.length % 16) + throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)"); + const t = new Uint8Array(e.length); + for (let r = 0; r < e.length; r += 16) { + for (let t = 0; t < 16; t++) + Si(this, Fi, "f")[t] ^= e[r + t]; + Oi(this, Fi, this.aes.encrypt(Si(this, Fi, "f")), "f"), + t.set(Si(this, Fi, "f"), r) + } + return t + } + decrypt(e) { + if (e.length % 16) + throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)"); + const t = new Uint8Array(e.length); + for (let r = 0; r < e.length; r += 16) { + const n = this.aes.decrypt(e.subarray(r, r + 16)); + for (let o = 0; o < 16; o++) + t[r + o] = n[o] ^ Si(this, Fi, "f")[o], + Si(this, Fi, "f")[o] = e[r + o] + } + return t + } + } + Ii = new WeakMap, + Fi = new WeakMap; + new WeakMap, + new WeakMap, + new WeakSet; + var xi, Ri, Ni, ki = function(e, t, r, n, o) { + if ("m" === n) + throw new TypeError("Private method is not writable"); + if ("a" === n && !o) + throw new TypeError("Private accessor was defined without a setter"); + if ("function" == typeof t ? e !== t || !o : !t.has(e)) + throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return "a" === n ? o.call(e, r) : o ? o.value = r : t.set(e, r), + r + }, Ui = function(e, t, r, n) { + if ("a" === r && !n) + throw new TypeError("Private accessor was defined without a getter"); + if ("function" == typeof t ? e !== t || !n : !t.has(e)) + throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return "m" === r ? n : "a" === r ? n.call(e) : n ? n.value : t.get(e) + }; + class Di extends Mi { + constructor(e, t) { + super("CTR", e, Di), + xi.set(this, void 0), + Ri.set(this, void 0), + Ni.set(this, void 0), + ki(this, Ni, new Uint8Array(16), "f"), + Ui(this, Ni, "f").fill(0), + ki(this, xi, Ui(this, Ni, "f"), "f"), + ki(this, Ri, 16, "f"), + null == t && (t = 1), + "number" == typeof t ? this.setCounterValue(t) : this.setCounterBytes(t) + } + get counter() { + return new Uint8Array(Ui(this, Ni, "f")) + } + setCounterValue(e) { + if (!Number.isInteger(e) || e < 0 || e > Number.MAX_SAFE_INTEGER) + throw new TypeError("invalid counter initial integer value"); + for (let t = 15; t >= 0; --t) + Ui(this, Ni, "f")[t] = e % 256, + e = Math.floor(e / 256) + } + setCounterBytes(e) { + if (16 !== e.length) + throw new TypeError("invalid counter initial Uint8Array value length"); + Ui(this, Ni, "f").set(e) + } + increment() { + for (let e = 15; e >= 0; e--) { + if (255 !== Ui(this, Ni, "f")[e]) { + Ui(this, Ni, "f")[e]++; + break + } + Ui(this, Ni, "f")[e] = 0 + } + } + encrypt(e) { + var t, r; + const n = new Uint8Array(e); + for (let e = 0; e < n.length; e++) + 16 === Ui(this, Ri, "f") && (ki(this, xi, this.aes.encrypt(Ui(this, Ni, "f")), "f"), + ki(this, Ri, 0, "f"), + this.increment()), + n[e] ^= Ui(this, xi, "f")[(ki(this, Ri, (r = Ui(this, Ri, "f"), + t = r++, + r), "f"), + t)]; + return n + } + decrypt(e) { + return this.encrypt(e) + } + } + xi = new WeakMap, + Ri = new WeakMap, + Ni = new WeakMap, + new WeakMap, + new WeakMap, + new WeakMap; + const Li = (e,t)=>e << t | e >>> 32 - t; + function zi(e, t, r, n, o, s) { + let i = e[t++] ^ r[n++] + , a = e[t++] ^ r[n++] + , u = e[t++] ^ r[n++] + , c = e[t++] ^ r[n++] + , l = e[t++] ^ r[n++] + , d = e[t++] ^ r[n++] + , h = e[t++] ^ r[n++] + , p = e[t++] ^ r[n++] + , f = e[t++] ^ r[n++] + , g = e[t++] ^ r[n++] + , y = e[t++] ^ r[n++] + , b = e[t++] ^ r[n++] + , m = e[t++] ^ r[n++] + , T = e[t++] ^ r[n++] + , v = e[t++] ^ r[n++] + , w = e[t++] ^ r[n++] + , A = i + , P = a + , W = u + , B = c + , C = l + , E = d + , M = h + , I = p + , F = f + , O = g + , S = y + , _ = b + , x = m + , R = T + , N = v + , k = w; + for (let e = 0; e < 8; e += 2) + C ^= Li(A + x | 0, 7), + F ^= Li(C + A | 0, 9), + x ^= Li(F + C | 0, 13), + A ^= Li(x + F | 0, 18), + O ^= Li(E + P | 0, 7), + R ^= Li(O + E | 0, 9), + P ^= Li(R + O | 0, 13), + E ^= Li(P + R | 0, 18), + N ^= Li(S + M | 0, 7), + W ^= Li(N + S | 0, 9), + M ^= Li(W + N | 0, 13), + S ^= Li(M + W | 0, 18), + B ^= Li(k + _ | 0, 7), + I ^= Li(B + k | 0, 9), + _ ^= Li(I + B | 0, 13), + k ^= Li(_ + I | 0, 18), + P ^= Li(A + B | 0, 7), + W ^= Li(P + A | 0, 9), + B ^= Li(W + P | 0, 13), + A ^= Li(B + W | 0, 18), + M ^= Li(E + C | 0, 7), + I ^= Li(M + E | 0, 9), + C ^= Li(I + M | 0, 13), + E ^= Li(C + I | 0, 18), + _ ^= Li(S + O | 0, 7), + F ^= Li(_ + S | 0, 9), + O ^= Li(F + _ | 0, 13), + S ^= Li(O + F | 0, 18), + x ^= Li(k + N | 0, 7), + R ^= Li(x + k | 0, 9), + N ^= Li(R + x | 0, 13), + k ^= Li(N + R | 0, 18); + o[s++] = i + A | 0, + o[s++] = a + P | 0, + o[s++] = u + W | 0, + o[s++] = c + B | 0, + o[s++] = l + C | 0, + o[s++] = d + E | 0, + o[s++] = h + M | 0, + o[s++] = p + I | 0, + o[s++] = f + F | 0, + o[s++] = g + O | 0, + o[s++] = y + S | 0, + o[s++] = b + _ | 0, + o[s++] = m + x | 0, + o[s++] = T + R | 0, + o[s++] = v + N | 0, + o[s++] = w + k | 0 + } + function ji(e, t, r, n, o) { + let s = n + 0 + , i = n + 16 * o; + for (let n = 0; n < 16; n++) + r[i + n] = e[t + 16 * (2 * o - 1) + n]; + for (let n = 0; n < o; n++, + s += 16, + t += 16) + zi(r, i, e, t, r, s), + n > 0 && (i += 16), + zi(r, s, e, t += 16, r, i) + } + function $i(e, t, r) { + const n = Ze({ + dkLen: 32, + asyncTick: 10, + maxmem: 1073742848 + }, r) + , {N: o, r: s, p: i, dkLen: a, asyncTick: u, maxmem: c, onProgress: l} = n; + if (_e(o), + _e(s), + _e(i), + _e(a), + _e(u), + _e(c), + void 0 !== l && "function" != typeof l) + throw new Error("progressCb should be function"); + const d = 128 * s + , h = d / 4; + if (o <= 1 || 0 != (o & o - 1) || o >= 2 ** (d / 8) || o > 2 ** 32) + throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32"); + if (i < 0 || i > 137438953440 / d) + throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)"); + if (a < 0 || a > 137438953440) + throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32"); + const p = d * (o + i); + if (p > c) + throw new Error(`Scrypt: parameters too large, ${p} (128 * r * (N + p)) > ${c} (maxmem)`); + const f = Qe(at, e, t, { + c: 1, + dkLen: d * i + }) + , g = Le(f) + , y = Le(new Uint8Array(d * o)) + , b = Le(new Uint8Array(d)); + let m = ()=>{} + ; + if (l) { + const e = 2 * o * i + , t = Math.max(Math.floor(e / 1e4), 1); + let r = 0; + m = ()=>{ + r++, + !l || r % t && r !== e || l(r / e) + } + } + return { + N: o, + r: s, + p: i, + dkLen: a, + blockSize32: h, + V: y, + B32: g, + B: f, + tmp: b, + blockMixCb: m, + asyncTick: u + } + } + function Vi(e, t, r, n, o) { + const s = Qe(at, e, r, { + c: 1, + dkLen: t + }); + return r.fill(0), + n.fill(0), + o.fill(0), + s + } + let Gi = !1 + , Hi = !1; + const Ki = async function(e, t, r, n, o, s, i) { + return await async function(e, t, r) { + const {N: n, r: o, p: s, dkLen: i, blockSize32: a, V: u, B32: c, B: l, tmp: d, blockMixCb: h, asyncTick: p} = $i(e, t, r); + for (let e = 0; e < s; e++) { + const t = a * e; + for (let e = 0; e < a; e++) + u[e] = c[t + e]; + let r = 0; + await Ve(n - 1, p, (()=>{ + ji(u, r, u, r += a, o), + h() + } + )), + ji(u, (n - 1) * a, c, t, o), + h(), + await Ve(n, p, (()=>{ + const e = c[t + a - 16] % n; + for (let r = 0; r < a; r++) + d[r] = c[t + r] ^ u[e * a + r]; + ji(d, 0, c, t, o), + h() + } + )) + } + return Vi(e, i, l, u, d) + }(e, t, { + N: r, + r: n, + p: o, + dkLen: s, + onProgress: i + }) + } + , Zi = function(e, t, r, n, o, s) { + return function(e, t, r) { + const {N: n, r: o, p: s, dkLen: i, blockSize32: a, V: u, B32: c, B: l, tmp: d, blockMixCb: h} = $i(e, t, r); + for (let e = 0; e < s; e++) { + const t = a * e; + for (let e = 0; e < a; e++) + u[e] = c[t + e]; + for (let e = 0, t = 0; e < n - 1; e++) + ji(u, t, u, t += a, o), + h(); + ji(u, (n - 1) * a, c, t, o), + h(); + for (let e = 0; e < n; e++) { + const e = c[t + a - 16] % n; + for (let r = 0; r < a; r++) + d[r] = c[t + r] ^ u[e * a + r]; + ji(d, 0, c, t, o), + h() + } + } + return Vi(e, i, l, u, d) + }(e, t, { + N: r, + r: n, + p: o, + dkLen: s + }) + }; + let qi = Ki + , Ji = Zi; + async function Yi(e, t, r, n, o, s, i) { + const a = re(e, "passwd") + , u = re(t, "salt"); + return ae(await qi(a, u, r, n, o, s, i)) + } + function Xi(e, t, r, n, o, s) { + const i = re(e, "passwd") + , a = re(t, "salt"); + return ae(Ji(i, a, r, n, o, s)) + } + function Qi(e) { + const t = re(e, "randomBytes"); + t[6] = 15 & t[6] | 64, + t[8] = 63 & t[8] | 128; + const r = ae(t); + return [r.substring(2, 10), r.substring(10, 14), r.substring(14, 18), r.substring(18, 22), r.substring(22, 34)].join("-") + } + function ea(e) { + return "string" != typeof e || e.startsWith("0x") || (e = "0x" + e), + ne(e) + } + function ta(e, t) { + for (e = String(e); e.length < t; ) + e = "0" + e; + return e + } + function ra(e) { + return "string" == typeof e ? Lt(e, "NFKC") : ne(e) + } + function na(e, t) { + const r = t.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i); + J(null != r, "invalid path", "path", t); + const n = r[1] + , o = r[3] + , s = "!" === r[4]; + let i = e; + for (const e of n.toLowerCase().split(".")) { + if (Array.isArray(i)) { + if (!e.match(/^[0-9]+$/)) + break; + i = i[parseInt(e)] + } else if ("object" == typeof i) { + let t = null; + for (const r in i) + if (r.toLowerCase() === e) { + t = i[r]; + break + } + i = t + } else + i = null; + if (null == i) + break + } + if (J(!s || null != i, "missing required value", "path", n), + o && null != i) { + if ("int" === o) { + if ("string" == typeof i && i.match(/^-?[0-9]+$/)) + return parseInt(i); + if (Number.isSafeInteger(i)) + return i + } + if ("number" === o && "string" == typeof i && i.match(/^-?[0-9.]*$/)) + return parseFloat(i); + if ("data" === o && "string" == typeof i) + return ea(i); + if ("array" === o && Array.isArray(i)) + return i; + if (o === typeof i) + return i; + J(!1, `wrong type found for ${o} `, "path", n) + } + return i + } + Yi._ = Ki, + Yi.lock = function() { + Hi = !0 + } + , + Yi.register = function(e) { + if (Hi) + throw new Error("scrypt is locked"); + qi = e + } + , + Object.freeze(Yi), + Xi._ = Zi, + Xi.lock = function() { + Gi = !0 + } + , + Xi.register = function(e) { + if (Gi) + throw new Error("scryptSync is locked"); + Ji = e + } + , + Object.freeze(Xi); + const oa = "m/44'/60'/0'/0/0"; + function sa(e) { + try { + const t = JSON.parse(e); + if (3 === (null != t.version ? parseInt(t.version) : 0)) + return !0 + } catch (e) {} + return !1 + } + function ia(e, t) { + const r = re(t) + , n = na(e, "crypto.ciphertext:data!"); + J(ae(ir(ue([r.slice(16, 32), n]))).substring(2) === na(e, "crypto.mac:string!").toLowerCase(), "incorrect password", "password", "[ REDACTED ]"); + const o = function(e, t, r) { + if ("aes-128-ctr" === na(e, "crypto.cipher:string")) { + const n = na(e, "crypto.cipherparams.iv:data!"); + return ae(new Di(t,n).decrypt(r)) + } + q(!1, "unsupported cipher", "UNSUPPORTED_OPERATION", { + operation: "decrypt" + }) + }(e, r.slice(0, 16), n) + , s = On(o); + if (e.address) { + let t = e.address.toLowerCase(); + t.startsWith("0x") || (t = "0x" + t), + J(Fr(t) === s, "keystore address/privateKey mismatch", "address", e.address) + } + const i = { + address: s, + privateKey: o + }; + if ("0.1" === na(e, "x-ethers.version:string")) { + const t = r.slice(32, 64) + , n = na(e, "x-ethers.mnemonicCiphertext:data!") + , o = na(e, "x-ethers.mnemonicCounter:data!") + , s = new Di(t,o); + i.mnemonic = { + path: na(e, "x-ethers.path:string") || oa, + locale: na(e, "x-ethers.locale:string") || "en", + entropy: ae(re(s.decrypt(n))) + } + } + return i + } + function aa(e) { + const t = na(e, "crypto.kdf:string"); + if (t && "string" == typeof t) { + if ("scrypt" === t.toLowerCase()) { + const r = na(e, "crypto.kdfparams.salt:data!") + , n = na(e, "crypto.kdfparams.n:int!") + , o = na(e, "crypto.kdfparams.r:int!") + , s = na(e, "crypto.kdfparams.p:int!"); + J(n > 0 && 0 == (n & n - 1), "invalid kdf.N", "kdf.N", n), + J(o > 0 && s > 0, "invalid kdf", "kdf", t); + const i = na(e, "crypto.kdfparams.dklen:int!"); + return J(32 === i, "invalid kdf.dklen", "kdf.dflen", i), + { + name: "scrypt", + salt: r, + N: n, + r: o, + p: s, + dkLen: 64 + } + } + if ("pbkdf2" === t.toLowerCase()) { + const t = na(e, "crypto.kdfparams.salt:data!") + , r = na(e, "crypto.kdfparams.prf:string!") + , n = r.split("-").pop(); + J("sha256" === n || "sha512" === n, "invalid kdf.pdf", "kdf.pdf", r); + const o = na(e, "crypto.kdfparams.c:int!") + , s = na(e, "crypto.kdfparams.dklen:int!"); + return J(32 === s, "invalid kdf.dklen", "kdf.dklen", s), + { + name: "pbkdf2", + salt: t, + count: o, + dkLen: s, + algorithm: n + } + } + } + J(!1, "unsupported key-derivation function", "kdf", t) + } + function ua(e) { + return new Promise((t=>{ + setTimeout((()=>{ + t() + } + ), e) + } + )) + } + function ca(e) { + const t = null != e.salt ? re(e.salt, "options.salt") : Qs(32); + let r = 1 << 17 + , n = 8 + , o = 1; + return e.scrypt && (e.scrypt.N && (r = e.scrypt.N), + e.scrypt.r && (n = e.scrypt.r), + e.scrypt.p && (o = e.scrypt.p)), + J("number" == typeof r && r > 0 && Number.isSafeInteger(r) && (BigInt(r) & BigInt(r - 1)) === BigInt(0), "invalid scrypt N parameter", "options.N", r), + J("number" == typeof n && n > 0 && Number.isSafeInteger(n), "invalid scrypt r parameter", "options.r", n), + J("number" == typeof o && o > 0 && Number.isSafeInteger(o), "invalid scrypt p parameter", "options.p", o), + { + name: "scrypt", + dkLen: 32, + salt: t, + N: r, + r: n, + p: o + } + } + function la(e, t, r, n) { + const o = re(r.privateKey, "privateKey") + , s = null != n.iv ? re(n.iv, "options.iv") : Qs(16); + J(16 === s.length, "invalid options.iv length", "options.iv", n.iv); + const i = null != n.uuid ? re(n.uuid, "options.uuid") : Qs(16); + J(16 === i.length, "invalid options.uuid length", "options.uuid", n.iv); + const a = e.slice(0, 16) + , u = e.slice(16, 32) + , c = re(new Di(a,s).encrypt(o)) + , l = ir(ue([u, c])) + , d = { + address: r.address.substring(2).toLowerCase(), + id: Qi(i), + version: 3, + Crypto: { + cipher: "aes-128-ctr", + cipherparams: { + iv: ae(s).substring(2) + }, + ciphertext: ae(c).substring(2), + kdf: "scrypt", + kdfparams: { + salt: ae(t.salt).substring(2), + n: t.N, + dklen: 32, + p: t.p, + r: t.r + }, + mac: l.substring(2) + } + }; + if (r.mnemonic) { + const t = null != n.client ? n.client : `ethers/${j}` + , o = r.mnemonic.path || oa + , s = r.mnemonic.locale || "en" + , i = e.slice(32, 64) + , a = re(r.mnemonic.entropy, "account.mnemonic.entropy") + , u = Qs(16) + , c = re(new Di(i,u).encrypt(a)) + , l = new Date + , h = "UTC--" + l.getUTCFullYear() + "-" + ta(l.getUTCMonth() + 1, 2) + "-" + ta(l.getUTCDate(), 2) + "T" + ta(l.getUTCHours(), 2) + "-" + ta(l.getUTCMinutes(), 2) + "-" + ta(l.getUTCSeconds(), 2) + ".0Z--" + d.address; + d["x-ethers"] = { + client: t, + gethFilename: h, + path: o, + locale: s, + mnemonicCounter: ae(u).substring(2), + mnemonicCiphertext: ae(c).substring(2), + version: "0.1" + } + } + return JSON.stringify(d) + } + function da(e, t, r) { + null == r && (r = {}); + const n = ra(t) + , o = ca(r); + return la(re(Xi(n, o.salt, o.N, o.r, o.p, 64)), o, e, r) + } + async function ha(e, t, r) { + null == r && (r = {}); + const n = ra(t) + , o = ca(r); + return la(re(await Yi(n, o.salt, o.N, o.r, o.p, 64, r.progressCallback)), o, e, r) + } + const pa = "m/44'/60'/0'/0/0" + , fa = new Uint8Array([66, 105, 116, 99, 111, 105, 110, 32, 115, 101, 101, 100]) + , ga = 2147483648 + , ya = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"); + function ba(e, t) { + let r = ""; + for (; e; ) + r = "0123456789abcdef"[e % 16] + r, + e = Math.trunc(e / 16); + for (; r.length < 2 * t; ) + r = "0" + r; + return "0x" + r + } + function ma(e) { + const t = re(e); + return function(e) { + let t = ve(re(e)) + , r = ""; + for (; t; ) + r = ei[Number(t % oi)] + r, + t /= oi; + return r + }(ue([t, le(St(St(t)), 0, 4)])) + } + const Ta = {}; + function va(e, t, r, n) { + const o = new Uint8Array(37); + e & ga ? (q(null != n, "cannot derive child of neutered node", "UNSUPPORTED_OPERATION", { + operation: "deriveChild" + }), + o.set(re(n), 1)) : o.set(re(r)); + for (let t = 24; t >= 0; t -= 8) + o[33 + (t >> 3)] = e >> 24 - t & 255; + const s = re(Pr("sha512", t, o)); + return { + IL: s.slice(0, 32), + IR: s.slice(32) + } + } + function wa(e, t) { + const r = t.split("/"); + J(r.length > 0 && ("m" === r[0] || e.depth > 0), "invalid path", "path", t), + "m" === r[0] && r.shift(); + let n = e; + for (let e = 0; e < r.length; e++) { + const t = r[e]; + if (t.match(/^[0-9]+'$/)) { + const r = parseInt(t.substring(0, t.length - 1)); + J(r < ga, "invalid path index", `path[${e}]`, t), + n = n.deriveChild(ga + r) + } else if (t.match(/^[0-9]+$/)) { + const r = parseInt(t); + J(r < ga, "invalid path index", `path[${e}]`, t), + n = n.deriveChild(r) + } else + J(!1, "invalid path component", `path[${e}]`, t) + } + return n + } + class Aa extends Os { + publicKey; + fingerprint; + parentFingerprint; + mnemonic; + chainCode; + path; + index; + depth; + constructor(e, t, r, n, o, s, i, a, u) { + super(t, u), + ee(e, Ta, "HDNodeWallet"), + G(this, { + publicKey: t.compressedPublicKey + }), + G(this, { + parentFingerprint: r, + fingerprint: le(qs(St(this.publicKey)), 0, 4), + chainCode: n, + path: o, + index: s, + depth: i + }), + G(this, { + mnemonic: a + }) + } + connect(e) { + return new Aa(Ta,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,e) + } + #N() { + const e = { + address: this.address, + privateKey: this.privateKey + } + , t = this.mnemonic; + return this.path && t && "en" === t.wordlist.locale && "" === t.password && (e.mnemonic = { + path: this.path, + locale: "en", + entropy: t.entropy + }), + e + } + async encrypt(e, t) { + return await ha(this.#N(), e, { + progressCallback: t + }) + } + encryptSync(e) { + return da(this.#N(), e) + } + get extendedKey() { + return q(this.depth < 256, "Depth too deep", "UNSUPPORTED_OPERATION", { + operation: "extendedKey" + }), + ma(ue(["0x0488ADE4", ba(this.depth, 1), this.parentFingerprint, ba(this.index, 4), this.chainCode, ue(["0x00", this.privateKey])])) + } + hasPath() { + return null != this.path + } + neuter() { + return new Pa(Ta,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider) + } + deriveChild(e) { + const t = we(e, "index"); + J(t <= 4294967295, "invalid index", "index", t); + let r = this.path; + r && (r += "/" + (2147483647 & t), + t & ga && (r += "'")); + const {IR: n, IL: o} = va(t, this.chainCode, this.publicKey, this.privateKey) + , s = new Fn(Ae((ve(o) + BigInt(this.privateKey)) % ya, 32)); + return new Aa(Ta,s,this.fingerprint,ae(n),r,t,this.depth + 1,this.mnemonic,this.provider) + } + derivePath(e) { + return wa(this, e) + } + static #k(e, t) { + J(se(e), "invalid seed", "seed", "[REDACTED]"); + const r = re(e, "seed"); + J(r.length >= 16 && r.length <= 64, "invalid seed", "seed", "[REDACTED]"); + const n = re(Pr("sha512", fa, r)) + , o = new Fn(ae(n.slice(0, 32))); + return new Aa(Ta,o,"0x00000000",ae(n.slice(32)),"m",0,0,t,null) + } + static fromExtendedKey(e) { + const t = Pe(function(e) { + let t = ni; + for (let r = 0; r < e.length; r++) + t *= oi, + t += ri(e[r]); + return t + }(e)); + J(82 === t.length || ma(t.slice(0, 78)) === e, "invalid extended key", "extendedKey", "[ REDACTED ]"); + const r = t[4] + , n = ae(t.slice(5, 9)) + , o = parseInt(ae(t.slice(9, 13)).substring(2), 16) + , s = ae(t.slice(13, 45)) + , i = t.slice(45, 78); + switch (ae(t.slice(0, 4))) { + case "0x0488b21e": + case "0x043587cf": + { + const e = ae(i); + return new Pa(Ta,On(e),e,n,s,null,o,r,null) + } + case "0x0488ade4": + case "0x04358394 ": + if (0 !== i[0]) + break; + return new Aa(Ta,new Fn(i.slice(1)),n,s,null,o,r,null,null) + } + J(!1, "invalid extended key prefix", "extendedKey", "[ REDACTED ]") + } + static createRandom(e, t, r) { + null == e && (e = ""), + null == t && (t = pa), + null == r && (r = fr.wordlist()); + const n = Tr.fromEntropy(Qs(16), e, r); + return Aa.#k(n.computeSeed(), n).derivePath(t) + } + static fromMnemonic(e, t) { + return t || (t = pa), + Aa.#k(e.computeSeed(), e).derivePath(t) + } + static fromPhrase(e, t, r, n) { + null == t && (t = ""), + null == r && (r = pa), + null == n && (n = fr.wordlist()); + const o = Tr.fromPhrase(e, t, n); + return Aa.#k(o.computeSeed(), o).derivePath(r) + } + static fromSeed(e) { + return Aa.#k(e, null) + } + } + class Pa extends Fs { + publicKey; + fingerprint; + parentFingerprint; + chainCode; + path; + index; + depth; + constructor(e, t, r, n, o, s, i, a, u) { + super(t, u), + ee(e, Ta, "HDNodeVoidWallet"), + G(this, { + publicKey: r + }), + G(this, { + publicKey: r, + fingerprint: le(qs(St(r)), 0, 4), + parentFingerprint: n, + chainCode: o, + path: s, + index: i, + depth: a + }) + } + connect(e) { + return new Pa(Ta,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,e) + } + get extendedKey() { + return q(this.depth < 256, "Depth too deep", "UNSUPPORTED_OPERATION", { + operation: "extendedKey" + }), + ma(ue(["0x0488B21E", ba(this.depth, 1), this.parentFingerprint, ba(this.index, 4), this.chainCode, this.publicKey])) + } + hasPath() { + return null != this.path + } + deriveChild(e) { + const t = we(e, "index"); + J(t <= 4294967295, "invalid index", "index", t); + let r = this.path; + r && (r += "/" + (2147483647 & t), + t & ga && (r += "'")); + const {IR: n, IL: o} = va(t, this.chainCode, this.publicKey, null) + , s = Fn.addPoints(o, this.publicKey, !0) + , i = On(s); + return new Pa(Ta,i,s,this.fingerprint,ae(n),r,t,this.depth + 1,this.provider) + } + derivePath(e) { + return wa(this, e) + } + } + function Wa(e) { + try { + if (JSON.parse(e).encseed) + return !0 + } catch (e) {} + return !1 + } + function Ba(e, t) { + const r = JSON.parse(e) + , n = ra(t) + , o = Fr(na(r, "ethaddr:string!")) + , s = ea(na(r, "encseed:string!")); + J(s && s.length % 16 == 0, "invalid encseed", "json", e); + const i = re(kt(n, n, 2e3, 32, "sha256")).slice(0, 16) + , a = s.slice(0, 16) + , u = s.slice(16) + , c = function(e) { + if (e.length < 16) + throw new TypeError("PKCS#7 invalid length"); + const t = e[e.length - 1]; + if (t > 16) + throw new TypeError("PKCS#7 padding byte out of range"); + const r = e.length - t; + for (let n = 0; n < t; n++) + if (e[r + n] !== t) + throw new TypeError("PKCS#7 invalid padding byte"); + return new Uint8Array(e.subarray(0, r)) + }(re(new _i(i,a).decrypt(u))); + let l = ""; + for (let e = 0; e < c.length; e++) + l += String.fromCharCode(c[e]); + return { + address: o, + privateKey: ar(l) + } + } + function Ca(e) { + return new Promise((t=>{ + setTimeout((()=>{ + t() + } + ), e) + } + )) + } + class Ea extends Os { + constructor(e, t) { + "string" != typeof e || e.startsWith("0x") || (e = "0x" + e), + super("string" == typeof e ? new Fn(e) : e, t) + } + connect(e) { + return new Ea(this.signingKey,e) + } + async encrypt(e, t) { + const r = { + address: this.address, + privateKey: this.privateKey + }; + return await ha(r, e, { + progressCallback: t + }) + } + encryptSync(e) { + return da({ + address: this.address, + privateKey: this.privateKey + }, e) + } + static #U(e) { + if (J(e, "invalid JSON wallet", "json", "[ REDACTED ]"), + "mnemonic"in e && e.mnemonic && "en" === e.mnemonic.locale) { + const t = Tr.fromEntropy(e.mnemonic.entropy) + , r = Aa.fromMnemonic(t, e.mnemonic.path); + if (r.address === e.address && r.privateKey === e.privateKey) + return r; + console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key") + } + const t = new Ea(e.privateKey); + return J(t.address === e.address, "address/privateKey mismatch", "json", "[ REDACTED ]"), + t + } + static async fromEncryptedJson(e, t, r) { + let n = null; + return sa(e) ? n = await async function(e, t, r) { + const n = JSON.parse(e) + , o = ra(t) + , s = aa(n); + if ("pbkdf2" === s.name) { + r && (r(0), + await ua(0)); + const {salt: e, count: t, dkLen: i, algorithm: a} = s + , u = kt(o, e, t, i, a); + return r && (r(1), + await ua(0)), + ia(n, u) + } + q("scrypt" === s.name, "cannot be reached", "UNKNOWN_ERROR", { + params: s + }); + const {salt: i, N: a, r: u, p: c, dkLen: l} = s; + return ia(n, await Yi(o, i, a, u, c, l, r)) + }(e, t, r) : Wa(e) && (r && (r(0), + await Ca(0)), + n = Ba(e, t), + r && (r(1), + await Ca(0))), + Ea.#U(n) + } + static fromEncryptedJsonSync(e, t) { + let r = null; + return sa(e) ? r = function(e, t) { + const r = JSON.parse(e) + , n = ra(t) + , o = aa(r); + if ("pbkdf2" === o.name) { + const {salt: e, count: t, dkLen: s, algorithm: i} = o; + return ia(r, kt(n, e, t, s, i)) + } + q("scrypt" === o.name, "cannot be reached", "UNKNOWN_ERROR", { + params: o + }); + const {salt: s, N: i, r: a, p: u, dkLen: c} = o; + return ia(r, Xi(n, s, i, a, u, c)) + }(e, t) : Wa(e) ? r = Ba(e, t) : J(!1, "invalid JSON wallet", "json", "[ REDACTED ]"), + Ea.#U(r) + } + static createRandom(e) { + const t = Aa.createRandom(); + return e ? t.connect(e) : t + } + static fromPhrase(e, t) { + const r = Aa.fromPhrase(e); + return t ? r.connect(t) : r + } + } + const Ma = { + en: fr.wordlist() + }; + function Ia(e) { + const t = new Set; + return e.forEach((e=>t.add(e))), + Object.freeze(t) + } + const Fa = "constant external internal payable private public pure view" + , Oa = Ia(Fa.split(" ")) + , Sa = "constructor error event fallback function receive struct" + , _a = Ia(Sa.split(" ")) + , xa = "calldata memory storage payable indexed" + , Ra = Ia(xa.split(" ")) + , Na = Ia([Sa, xa, "tuple returns", Fa].join(" ").split(" ")) + , ka = { + "(": "OPEN_PAREN", + ")": "CLOSE_PAREN", + "[": "OPEN_BRACKET", + "]": "CLOSE_BRACKET", + ",": "COMMA", + "@": "AT" + } + , Ua = new RegExp("^(\\s*)") + , Da = new RegExp("^([0-9]+)") + , La = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)") + , za = new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$") + , ja = new RegExp("^(trcToken|address|bool|bytes([0-9]*)|string|u?int([0-9]*))$"); + class $a { + #h; + #g; + get offset() { + return this.#h + } + get length() { + return this.#g.length - this.#h + } + constructor(e) { + this.#h = 0, + this.#g = e.slice() + } + clone() { + return new $a(this.#g) + } + reset() { + this.#h = 0 + } + #y() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0 + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0; + return new $a(this.#g.slice(e, t).map((t=>Object.freeze(Object.assign({}, t, { + match: t.match - e, + linkBack: t.linkBack - e, + linkNext: t.linkNext - e + }))))) + } + popKeyword(e) { + const t = this.peek(); + if ("KEYWORD" !== t.type || !e.has(t.text)) + throw new Error(`expected keyword ${t.text}`); + return this.pop().text + } + popType(e) { + if (this.peek().type !== e) + throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`); + return this.pop().text + } + popParen() { + const e = this.peek(); + if ("OPEN_PAREN" !== e.type) + throw new Error("bad start"); + const t = this.#y(this.#h + 1, e.match + 1); + return this.#h = e.match + 1, + t + } + popParams() { + const e = this.peek(); + if ("OPEN_PAREN" !== e.type) + throw new Error("bad start"); + const t = []; + for (; this.#h < e.match - 1; ) { + const e = this.peek().linkNext; + t.push(this.#y(this.#h + 1, e)), + this.#h = e + } + return this.#h = e.match + 1, + t + } + peek() { + if (this.#h >= this.#g.length) + throw new Error("out-of-bounds"); + return this.#g[this.#h] + } + peekKeyword(e) { + const t = this.peekType("KEYWORD"); + return null != t && e.has(t) ? t : null + } + peekType(e) { + if (0 === this.length) + return null; + const t = this.peek(); + return t.type === e ? t.text : null + } + pop() { + const e = this.peek(); + return this.#h++, + e + } + toString() { + const e = []; + for (let t = this.#h; t < this.#g.length; t++) { + const r = this.#g[t]; + e.push(`${r.type}:${r.text}`) + } + return `` + } + } + function Va(e) { + const t = [] + , r = t=>{ + const r = s < e.length ? JSON.stringify(e[s]) : "$EOI"; + throw new Error(`invalid token ${r} at ${s}: ${t}`) + } + ; + let n = [] + , o = [] + , s = 0; + for (; s < e.length; ) { + let i = e.substring(s) + , a = i.match(Ua); + a && (s += a[1].length, + i = e.substring(s)); + const u = { + depth: n.length, + linkBack: -1, + linkNext: -1, + match: -1, + type: "", + text: "", + offset: s, + value: -1 + }; + t.push(u); + let c = ka[i[0]] || ""; + if (c) { + if (u.type = c, + u.text = i[0], + s++, + "OPEN_PAREN" === c) + n.push(t.length - 1), + o.push(t.length - 1); + else if ("CLOSE_PAREN" == c) + 0 === n.length && r("no matching open bracket"), + u.match = n.pop(), + t[u.match].match = t.length - 1, + u.depth--, + u.linkBack = o.pop(), + t[u.linkBack].linkNext = t.length - 1; + else if ("COMMA" === c) + u.linkBack = o.pop(), + t[u.linkBack].linkNext = t.length - 1, + o.push(t.length - 1); + else if ("OPEN_BRACKET" === c) + u.type = "BRACKET"; + else if ("CLOSE_BRACKET" === c) { + let e = t.pop().text; + if (t.length > 0 && "NUMBER" === t[t.length - 1].type) { + const r = t.pop().text; + e = r + e, + t[t.length - 1].value = we(r) + } + if (0 === t.length || "BRACKET" !== t[t.length - 1].type) + throw new Error("missing opening bracket"); + t[t.length - 1].text += e + } + } else if (a = i.match(La), + a) { + if (u.text = a[1], + s += u.text.length, + Na.has(u.text)) { + u.type = "KEYWORD"; + continue + } + if (u.text.match(ja)) { + u.type = "TYPE"; + continue + } + u.type = "ID" + } else { + if (a = i.match(Da), + !a) + throw new Error(`unexpected token ${JSON.stringify(i[0])} at position ${s}`); + u.text = a[1], + u.type = "NUMBER", + s += u.text.length + } + } + return new $a(t.map((e=>Object.freeze(e)))) + } + function Ga(e, t) { + let r = []; + for (const n in t.keys()) + e.has(n) && r.push(n); + if (r.length > 1) + throw new Error(`conflicting types: ${r.join(", ")}`) + } + function Ha(e, t) { + if (t.peekKeyword(_a)) { + const r = t.pop().text; + if (r !== e) + throw new Error(`expected ${e}, got ${r}`) + } + return t.popType("ID") + } + function Ka(e, t) { + const r = new Set; + for (; ; ) { + const n = e.peekType("KEYWORD"); + if (null == n || t && !t.has(n)) + break; + if (e.pop(), + r.has(n)) + throw new Error(`duplicate keywords: ${JSON.stringify(n)}`); + r.add(n) + } + return Object.freeze(r) + } + function Za(e) { + let t = Ka(e, Oa); + return Ga(t, Ia("constant payable nonpayable".split(" "))), + Ga(t, Ia("pure view payable nonpayable".split(" "))), + t.has("view") ? "view" : t.has("pure") ? "pure" : t.has("payable") ? "payable" : t.has("nonpayable") ? "nonpayable" : t.has("constant") ? "view" : "nonpayable" + } + function qa(e, t) { + return e.popParams().map((e=>cu.from(e, t))) + } + function Ja(e) { + if (e.peekType("AT")) { + if (e.pop(), + e.peekType("NUMBER")) + return be(e.pop().text); + throw new Error("invalid gas") + } + return null + } + function Ya(e) { + if (e.length) + throw new Error(`unexpected tokens: ${e.toString()}`) + } + const Xa = new RegExp(/^(.*)\[([0-9]*)\]$/); + function Qa(e) { + const t = e.match(ja); + if (J(t, "invalid type", "type", e), + "uint" === e) + return "uint256"; + if ("int" === e) + return "int256"; + if (t[2]) { + const r = parseInt(t[2]); + J(0 !== r && r <= 32, "invalid bytes length", "type", e) + } else if (t[3]) { + const r = parseInt(t[3]); + J(0 !== r && r <= 256 && r % 8 == 0, "invalid numeric width", "type", e) + } + return e + } + const eu = {} + , tu = Symbol.for("_ethers_internal") + , ru = "_ParamTypeInternal" + , nu = "_ErrorInternal" + , ou = "_EventInternal" + , su = "_ConstructorInternal" + , iu = "_FallbackInternal" + , au = "_FunctionInternal" + , uu = "_StructInternal"; + class cu { + name; + type; + baseType; + indexed; + components; + arrayLength; + arrayChildren; + constructor(e, t, r, n, o, s, i, a) { + if (ee(e, eu, "ParamType"), + Object.defineProperty(this, tu, { + value: ru + }), + s && (s = Object.freeze(s.slice())), + "array" === n) { + if (null == i || null == a) + throw new Error("") + } else if (null != i || null != a) + throw new Error(""); + if ("tuple" === n) + null == s && (s = Object.freeze([])); + else if (null != s) + throw new Error(""); + G(this, { + name: t, + type: r, + baseType: n, + indexed: o, + components: s, + arrayLength: i, + arrayChildren: a + }) + } + format(e) { + if (null == e && (e = "sighash"), + "json" === e) { + let t = { + type: "tuple" === this.baseType ? "tuple" : this.type, + name: this.name || void 0 + }; + return "boolean" == typeof this.indexed && (t.indexed = this.indexed), + this.isTuple() && (t.components = this.components.map((t=>JSON.parse(t.format(e))))), + JSON.stringify(t) + } + let t = ""; + return this.isArray() ? (t += this.arrayChildren.format(e), + t += `[${this.arrayLength < 0 ? "" : String(this.arrayLength)}]`) : this.isTuple() ? ("sighash" !== e && (t += this.type), + t += "(" + this.components.map((t=>t.format(e))).join("full" === e ? ", " : ",") + ")") : t += this.type, + "sighash" !== e && (!0 === this.indexed && (t += " indexed"), + "full" === e && this.name && (t += " " + this.name)), + t + } + isArray() { + return "array" === this.baseType + } + isTuple() { + return "tuple" === this.baseType + } + isIndexable() { + return null != this.indexed + } + walk(e, t) { + if (this.isArray()) { + if (!Array.isArray(e)) + throw new Error("invalid array value"); + if (-1 !== this.arrayLength && e.length !== this.arrayLength) + throw new Error("array is wrong length"); + const r = this; + return e.map((e=>r.arrayChildren.walk(e, t))) + } + if (this.isTuple()) { + if (!Array.isArray(e)) + throw new Error("invalid tuple value"); + if (e.length !== this.components.length) + throw new Error("array is wrong length"); + const r = this; + return e.map(((e,n)=>r.components[n].walk(e, t))) + } + return t(this.type, e) + } + #b(e, t, r, n) { + if (this.isArray()) { + if (!Array.isArray(t)) + throw new Error("invalid array value"); + if (-1 !== this.arrayLength && t.length !== this.arrayLength) + throw new Error("array is wrong length"); + const o = this.arrayChildren + , s = t.slice(); + return s.forEach(((t,n)=>{ + o.#b(e, t, r, (e=>{ + s[n] = e + } + )) + } + )), + void n(s) + } + if (this.isTuple()) { + const o = this.components; + let s; + if (Array.isArray(t)) + s = t.slice(); + else { + if (null == t || "object" != typeof t) + throw new Error("invalid tuple value"); + s = o.map((e=>{ + if (!e.name) + throw new Error("cannot use object value with unnamed components"); + if (!(e.name in t)) + throw new Error(`missing value for component ${e.name}`); + return t[e.name] + } + )) + } + if (s.length !== this.components.length) + throw new Error("array is wrong length"); + return s.forEach(((t,n)=>{ + o[n].#b(e, t, r, (e=>{ + s[n] = e + } + )) + } + )), + void n(s) + } + const o = r(this.type, t); + o.then ? e.push(async function() { + n(await o) + }()) : n(o) + } + async walkAsync(e, t) { + const r = [] + , n = [e]; + return this.#b(r, e, t, (e=>{ + n[0] = e + } + )), + r.length && await Promise.all(r), + n[0] + } + static from(e, t) { + if (cu.isParamType(e)) + return e; + if ("string" == typeof e) + return cu.from(Va(e), t); + if (e instanceof $a) { + let r = "" + , n = "" + , o = null; + Ka(e, Ia(["tuple"])).has("tuple") || e.peekType("OPEN_PAREN") ? (n = "tuple", + o = e.popParams().map((e=>cu.from(e))), + r = `tuple(${o.map((e=>e.format())).join(",")})`) : (r = Qa(e.popType("TYPE")), + n = r); + let s = null + , i = null; + for (; e.length && e.peekType("BRACKET"); ) { + const t = e.pop(); + s = new cu(eu,"",r,n,null,o,i,s), + i = t.value, + r += t.text, + n = "array", + o = null + } + let a = null; + if (Ka(e, Ra).has("indexed")) { + if (!t) + throw new Error(""); + a = !0 + } + const u = e.peekType("ID") ? e.pop().text : ""; + if (e.length) + throw new Error("leftover tokens"); + return new cu(eu,u,r,n,a,o,i,s) + } + const r = e.name; + J(!r || "string" == typeof r && r.match(za), "invalid name", "obj.name", r); + let n = e.indexed; + null != n && (J(t, "parameter cannot be indexed", "obj.indexed", e.indexed), + n = !!n); + let o = e.type + , s = o.match(Xa); + if (s) { + const t = parseInt(s[2] || "-1") + , i = cu.from({ + type: s[1], + components: e.components + }); + return new cu(eu,r || "",o,"array",n,null,t,i) + } + if ("tuple" === o || o.startsWith("tuple(") || o.startsWith("(")) { + const t = null != e.components ? e.components.map((e=>cu.from(e))) : null; + return new cu(eu,r || "",o,"tuple",n,t,null,null) + } + return o = Qa(e.type), + new cu(eu,r || "",o,o,n,null,null,null) + } + static isParamType(e) { + return e && e[tu] === ru + } + } + class lu { + type; + inputs; + constructor(e, t, r) { + ee(e, eu, "Fragment"), + G(this, { + type: t, + inputs: r = Object.freeze(r.slice()) + }) + } + static from(e) { + if ("string" == typeof e) { + try { + lu.from(JSON.parse(e)) + } catch (e) {} + return lu.from(Va(e)) + } + if (e instanceof $a) + switch (e.peekKeyword(_a)) { + case "constructor": + return gu.from(e); + case "error": + return pu.from(e); + case "event": + return fu.from(e); + case "fallback": + case "receive": + return yu.from(e); + case "function": + return bu.from(e); + case "struct": + return mu.from(e) + } + else if ("object" == typeof e) { + switch (e.type) { + case "constructor": + return gu.from(e); + case "error": + return pu.from(e); + case "event": + return fu.from(e); + case "fallback": + case "receive": + return yu.from(e); + case "function": + return bu.from(e); + case "struct": + return mu.from(e) + } + q(!1, `unsupported type: ${e.type}`, "UNSUPPORTED_OPERATION", { + operation: "Fragment.from" + }) + } + J(!1, "unsupported frgament object", "obj", e) + } + static isConstructor(e) { + return gu.isFragment(e) + } + static isError(e) { + return pu.isFragment(e) + } + static isEvent(e) { + return fu.isFragment(e) + } + static isFunction(e) { + return bu.isFragment(e) + } + static isStruct(e) { + return mu.isFragment(e) + } + } + class du extends lu { + name; + constructor(e, t, r, n) { + super(e, t, n), + J("string" == typeof r && r.match(za), "invalid identifier", "name", r), + n = Object.freeze(n.slice()), + G(this, { + name: r + }) + } + } + function hu(e, t) { + return "(" + t.map((t=>t.format(e))).join("full" === e ? ", " : ",") + ")" + } + class pu extends du { + constructor(e, t, r) { + super(e, "error", t, r), + Object.defineProperty(this, tu, { + value: nu + }) + } + get selector() { + return ar(this.format("sighash")).substring(0, 10) + } + format(e) { + if (null == e && (e = "sighash"), + "json" === e) + return JSON.stringify({ + type: "error", + name: this.name, + inputs: this.inputs.map((t=>JSON.parse(t.format(e)))) + }); + const t = []; + return "sighash" !== e && t.push("error"), + t.push(this.name + hu(e, this.inputs)), + t.join(" ") + } + static from(e) { + if (pu.isFragment(e)) + return e; + if ("string" == typeof e) + return pu.from(Va(e)); + if (e instanceof $a) { + const t = Ha("error", e) + , r = qa(e); + return Ya(e), + new pu(eu,t,r) + } + return new pu(eu,e.name,e.inputs ? e.inputs.map(cu.from) : []) + } + static isFragment(e) { + return e && e[tu] === nu + } + } + class fu extends du { + anonymous; + constructor(e, t, r, n) { + super(e, "event", t, r), + Object.defineProperty(this, tu, { + value: ou + }), + G(this, { + anonymous: n + }) + } + get topicHash() { + return ar(this.format("sighash")) + } + format(e) { + if (null == e && (e = "sighash"), + "json" === e) + return JSON.stringify({ + type: "event", + anonymous: this.anonymous, + name: this.name, + inputs: this.inputs.map((t=>JSON.parse(t.format(e)))) + }); + const t = []; + return "sighash" !== e && t.push("event"), + t.push(this.name + hu(e, this.inputs)), + "sighash" !== e && this.anonymous && t.push("anonymous"), + t.join(" ") + } + static getTopicHash(e, t) { + return t = (t || []).map((e=>cu.from(e))), + new fu(eu,e,t,!1).topicHash + } + static from(e) { + if (fu.isFragment(e)) + return e; + if ("string" == typeof e) + return fu.from(Va(e)); + if (e instanceof $a) { + const t = Ha("event", e) + , r = qa(e, !0) + , n = !!Ka(e, Ia(["anonymous"])).has("anonymous"); + return Ya(e), + new fu(eu,t,r,n) + } + return new fu(eu,e.name,e.inputs ? e.inputs.map((e=>cu.from(e, !0))) : [],!!e.anonymous) + } + static isFragment(e) { + return e && e[tu] === ou + } + } + class gu extends lu { + payable; + gas; + constructor(e, t, r, n, o) { + super(e, t, r), + Object.defineProperty(this, tu, { + value: su + }), + G(this, { + payable: n, + gas: o + }) + } + format(e) { + if (q(null != e && "sighash" !== e, "cannot format a constructor for sighash", "UNSUPPORTED_OPERATION", { + operation: "format(sighash)" + }), + "json" === e) + return JSON.stringify({ + type: "constructor", + stateMutability: this.payable ? "payable" : "undefined", + payable: this.payable, + gas: null != this.gas ? this.gas : void 0, + inputs: this.inputs.map((t=>JSON.parse(t.format(e)))) + }); + const t = [`constructor${hu(e, this.inputs)}`]; + return t.push(this.payable ? "payable" : "nonpayable"), + null != this.gas && t.push(`@${this.gas.toString()}`), + t.join(" ") + } + static from(e) { + if (gu.isFragment(e)) + return e; + if ("string" == typeof e) + return gu.from(Va(e)); + if (e instanceof $a) { + Ka(e, Ia(["constructor"])); + const t = qa(e) + , r = !!Ka(e, Ia(["payable"])).has("payable") + , n = Ja(e); + return Ya(e), + new gu(eu,"constructor",t,r,n) + } + return new gu(eu,"constructor",e.inputs ? e.inputs.map(cu.from) : [],!!e.payable,null != e.gas ? e.gas : null) + } + static isFragment(e) { + return e && e[tu] === su + } + } + class yu extends lu { + payable; + constructor(e, t, r) { + super(e, "fallback", t), + Object.defineProperty(this, tu, { + value: iu + }), + G(this, { + payable: r + }) + } + format(e) { + const t = 0 === this.inputs.length ? "receive" : "fallback"; + if ("json" === e) { + const e = this.payable ? "payable" : "nonpayable"; + return JSON.stringify({ + type: t, + stateMutability: e + }) + } + return `${t}()${this.payable ? " payable" : ""}` + } + static from(e) { + if (yu.isFragment(e)) + return e; + if ("string" == typeof e) + return yu.from(Va(e)); + if (e instanceof $a) { + const t = e.toString(); + if (J(e.peekKeyword(Ia(["fallback", "receive"])), "type must be fallback or receive", "obj", t), + "receive" === e.popKeyword(Ia(["fallback", "receive"]))) { + const t = qa(e); + return J(0 === t.length, "receive cannot have arguments", "obj.inputs", t), + Ka(e, Ia(["payable"])), + Ya(e), + new yu(eu,[],!0) + } + let r = qa(e); + r.length ? J(1 === r.length && "bytes" === r[0].type, "invalid fallback inputs", "obj.inputs", r.map((e=>e.format("minimal"))).join(", ")) : r = [cu.from("bytes")]; + const n = Za(e); + if (J("nonpayable" === n || "payable" === n, "fallback cannot be constants", "obj.stateMutability", n), + Ka(e, Ia(["returns"])).has("returns")) { + const t = qa(e); + J(1 === t.length && "bytes" === t[0].type, "invalid fallback outputs", "obj.outputs", t.map((e=>e.format("minimal"))).join(", ")) + } + return Ya(e), + new yu(eu,r,"payable" === n) + } + if ("receive" === e.type) + return new yu(eu,[],!0); + if ("fallback" === e.type) { + const t = [cu.from("bytes")] + , r = "payable" === e.stateMutability; + return new yu(eu,t,r) + } + J(!1, "invalid fallback description", "obj", e) + } + static isFragment(e) { + return e && e[tu] === iu + } + } + class bu extends du { + constant; + outputs; + stateMutability; + payable; + gas; + constructor(e, t, r, n, o, s) { + super(e, "function", t, n), + Object.defineProperty(this, tu, { + value: au + }), + G(this, { + constant: "view" === r || "pure" === r, + gas: s, + outputs: o = Object.freeze(o.slice()), + payable: "payable" === r, + stateMutability: r + }) + } + get selector() { + return ar(this.format("sighash")).substring(0, 10) + } + format(e) { + if (null == e && (e = "sighash"), + "json" === e) + return JSON.stringify({ + type: "function", + name: this.name, + constant: this.constant, + stateMutability: "nonpayable" !== this.stateMutability ? this.stateMutability : void 0, + payable: this.payable, + gas: null != this.gas ? this.gas : void 0, + inputs: this.inputs.map((t=>JSON.parse(t.format(e)))), + outputs: this.outputs.map((t=>JSON.parse(t.format(e)))) + }); + const t = []; + return "sighash" !== e && t.push("function"), + t.push(this.name + hu(e, this.inputs)), + "sighash" !== e && ("nonpayable" !== this.stateMutability && t.push(this.stateMutability), + this.outputs && this.outputs.length && (t.push("returns"), + t.push(hu(e, this.outputs))), + null != this.gas && t.push(`@${this.gas.toString()}`)), + t.join(" ") + } + static getSelector(e, t) { + return t = (t || []).map((e=>cu.from(e))), + new bu(eu,e,"view",t,[],null).selector + } + static from(e) { + if (bu.isFragment(e)) + return e; + if ("string" == typeof e) + return bu.from(Va(e)); + if (e instanceof $a) { + const t = Ha("function", e) + , r = qa(e) + , n = Za(e); + let o = []; + Ka(e, Ia(["returns"])).has("returns") && (o = qa(e)); + const s = Ja(e); + return Ya(e), + new bu(eu,t,n,r,o,s) + } + return new bu(eu,e.name,e.stateMutability,e.inputs ? e.inputs.map(cu.from) : [],e.outputs ? e.outputs.map(cu.from) : [],null != e.gas ? e.gas : null) + } + static isFragment(e) { + return e && e[tu] === au + } + } + class mu extends du { + constructor(e, t, r) { + super(e, "struct", t, r), + Object.defineProperty(this, tu, { + value: uu + }) + } + format() { + throw new Error("@TODO") + } + static from(e) { + if ("string" == typeof e) + return mu.from(Va(e)); + if (e instanceof $a) { + const t = Ha("struct", e) + , r = qa(e); + return Ya(e), + new mu(eu,t,r) + } + return new mu(eu,e.name,e.inputs ? e.inputs.map(cu.from) : []) + } + static isFragment(e) { + return e && e[tu] === uu + } + } + class Tu { + fragment; + name; + signature; + topic; + args; + constructor(e, t, r) { + const n = e.name + , o = e.format(); + G(this, { + fragment: e, + name: n, + signature: o, + topic: t, + args: r + }) + } + } + class vu { + fragment; + name; + args; + signature; + selector; + value; + constructor(e, t, r, n) { + const o = e.name + , s = e.format(); + G(this, { + fragment: e, + name: o, + args: r, + signature: s, + selector: t, + value: n + }) + } + } + class wu { + fragment; + name; + args; + signature; + selector; + constructor(e, t, r) { + const n = e.name + , o = e.format(); + G(this, { + fragment: e, + name: n, + args: r, + signature: o, + selector: t + }) + } + } + class Au { + hash; + _isIndexed; + static isIndexed(e) { + return !(!e || !e._isIndexed) + } + constructor(e) { + G(this, { + hash: e, + _isIndexed: !0 + }) + } + } + const Pu = { + 0: "generic panic", + 1: "assert(false)", + 17: "arithmetic overflow", + 18: "division or modulo by zero", + 33: "enum overflow", + 34: "invalid encoded storage byte array accessed", + 49: "out-of-bounds array access; popping on an empty array", + 50: "out-of-bounds access of an array or bytesN", + 65: "out of memory", + 81: "uninitialized function" + } + , Wu = { + "0x08c379a0": { + signature: "Error(string)", + name: "Error", + inputs: ["string"], + reason: e=>`reverted with reason string ${JSON.stringify(e)}` + }, + "0x4e487b71": { + signature: "Panic(uint256)", + name: "Panic", + inputs: ["uint256"], + reason: e=>{ + let t = "unknown panic code"; + return e >= 0 && e <= 255 && Pu[e.toString()] && (t = Pu[e.toString()]), + `reverted with panic code 0x${e.toString(16)} (${t})` + } + } + }; + class Bu { + fragments; + deploy; + fallback; + receive; + #D; + #L; + #z; + #j; + constructor(e) { + let t = []; + t = "string" == typeof e ? JSON.parse(e) : e, + this.#z = new Map, + this.#D = new Map, + this.#L = new Map; + const r = []; + for (const e of t) + try { + r.push(lu.from(e)) + } catch (e) { + console.log("EE", e) + } + G(this, { + fragments: Object.freeze(r) + }); + let n = null + , o = !1; + this.#j = this.getAbiCoder(), + this.fragments.forEach(((e,t)=>{ + let r; + switch (e.type) { + case "constructor": + return this.deploy ? void console.log("duplicate definition - constructor") : void G(this, { + deploy: e + }); + case "fallback": + return void (0 === e.inputs.length ? o = !0 : (J(!n || e.payable !== n.payable, "conflicting fallback fragments", `fragments[${t}]`, e), + n = e, + o = n.payable)); + case "function": + r = this.#z; + break; + case "event": + r = this.#L; + break; + case "error": + r = this.#D; + break; + default: + return + } + const s = e.format(); + r.has(s) || r.set(s, e) + } + )), + this.deploy || G(this, { + deploy: gu.from("constructor()") + }), + G(this, { + fallback: n, + receive: o + }) + } + format(e) { + const t = e ? "minimal" : "full" + , r = this.fragments.map((e=>e.format(t))); + return r + } + formatJson() { + const e = this.fragments.map((e=>e.format("json"))); + return JSON.stringify(e.map((e=>JSON.parse(e)))) + } + getAbiCoder() { + return No.defaultAbiCoder() + } + #$(e, t, r) { + if (oe(e)) { + const t = e.toLowerCase(); + for (const e of this.#z.values()) + if (t === e.selector) + return e; + return null + } + if (-1 === e.indexOf("(")) { + const n = []; + for (const [t,r] of this.#z) + t.split("(")[0] === e && n.push(r); + if (t) { + const e = t.length > 0 ? t[t.length - 1] : null; + let r = t.length + , o = !0; + Kn.isTyped(e) && "overrides" === e.type && (o = !1, + r--); + for (let e = n.length - 1; e >= 0; e--) { + const t = n[e].inputs.length; + t === r || o && t === r - 1 || n.splice(e, 1) + } + for (let e = n.length - 1; e >= 0; e--) { + const r = n[e].inputs; + for (let o = 0; o < t.length; o++) + if (Kn.isTyped(t[o])) { + if (o >= r.length) { + if ("overrides" === t[o].type) + continue; + n.splice(e, 1); + break + } + if (t[o].type !== r[o].baseType) { + n.splice(e, 1); + break + } + } + } + } + if (1 === n.length && t && t.length !== n[0].inputs.length) { + const e = t[t.length - 1]; + (null == e || Array.isArray(e) || "object" != typeof e) && n.splice(0, 1) + } + return 0 === n.length ? null : (n.length > 1 && r && J(!1, `ambiguous function description (i.e. matches ${n.map((e=>JSON.stringify(e.format()))).join(", ")})`, "key", e), + n[0]) + } + return this.#z.get(bu.from(e).format()) || null + } + getFunctionName(e) { + const t = this.#$(e, null, !1); + return J(t, "no matching function", "key", e), + t.name + } + getFunction(e, t) { + return this.#$(e, t || null, !0) + } + forEachFunction(e) { + const t = Array.from(this.#z.keys()); + t.sort(((e,t)=>e.localeCompare(t))); + for (let r = 0; r < t.length; r++) { + const n = t[r]; + e(this.#z.get(n), r) + } + } + #V(e, t, r) { + if (oe(e)) { + const t = e.toLowerCase(); + for (const e of this.#L.values()) + if (t === e.topicHash) + return e; + return null + } + if (-1 === e.indexOf("(")) { + const n = []; + for (const [t,r] of this.#L) + t.split("(")[0] === e && n.push(r); + if (t) { + for (let e = n.length - 1; e >= 0; e--) + n[e].inputs.length < t.length && n.splice(e, 1); + for (let e = n.length - 1; e >= 0; e--) { + const r = n[e].inputs; + for (let o = 0; o < t.length; o++) + if (Kn.isTyped(t[o]) && t[o].type !== r[o].baseType) { + n.splice(e, 1); + break + } + } + } + return 0 === n.length ? null : (n.length > 1 && r && J(!1, `ambiguous event description (i.e. matches ${n.map((e=>JSON.stringify(e.format()))).join(", ")})`, "key", e), + n[0]) + } + return this.#L.get(fu.from(e).format()) || null + } + getEventName(e) { + const t = this.#V(e, null, !1); + return J(t, "no matching event", "key", e), + t.name + } + getEvent(e, t) { + return this.#V(e, t || null, !0) + } + forEachEvent(e) { + const t = Array.from(this.#L.keys()); + t.sort(((e,t)=>e.localeCompare(t))); + for (let r = 0; r < t.length; r++) { + const n = t[r]; + e(this.#L.get(n), r) + } + } + getError(e, t) { + if (oe(e)) { + const t = e.toLowerCase(); + if (Wu[t]) + return pu.from(Wu[t].signature); + for (const e of this.#D.values()) + if (t === e.selector) + return e; + return null + } + if (-1 === e.indexOf("(")) { + const t = []; + for (const [r,n] of this.#D) + r.split("(")[0] === e && t.push(n); + return 0 === t.length ? "Error" === e ? pu.from("error Error(string)") : "Panic" === e ? pu.from("error Panic(uint256)") : null : (t.length > 1 && J(!1, `ambiguous error description (i.e. ${t.map((e=>JSON.stringify(e.format()))).join(", ")})`, "name", e), + t[0]) + } + if ("Error(string)" === (e = pu.from(e).format())) + return pu.from("error Error(string)"); + if ("Panic(uint256)" === e) + return pu.from("error Panic(uint256)"); + return this.#D.get(e) || null + } + forEachError(e) { + const t = Array.from(this.#D.keys()); + t.sort(((e,t)=>e.localeCompare(t))); + for (let r = 0; r < t.length; r++) { + const n = t[r]; + e(this.#D.get(n), r) + } + } + _decodeParams(e, t) { + return this.#j.decode(e, t) + } + _encodeParams(e, t) { + return this.#j.encode(e, t) + } + encodeDeploy(e) { + return this._encodeParams(this.deploy.inputs, e || []) + } + decodeErrorResult(e, t) { + if ("string" == typeof e) { + const t = this.getError(e); + J(t, "unknown error", "fragment", e), + e = t + } + return J(le(t, 0, 4) === e.selector, `data signature does not match error ${e.name}.`, "data", t), + this._decodeParams(e.inputs, le(t, 4)) + } + encodeErrorResult(e, t) { + if ("string" == typeof e) { + const t = this.getError(e); + J(t, "unknown error", "fragment", e), + e = t + } + return ue([e.selector, this._encodeParams(e.inputs, t || [])]) + } + decodeFunctionData(e, t) { + if ("string" == typeof e) { + const t = this.getFunction(e); + J(t, "unknown function", "fragment", e), + e = t + } + return J(le(t, 0, 4) === e.selector, `data signature does not match function ${e.name}.`, "data", t), + this._decodeParams(e.inputs, le(t, 4)) + } + encodeFunctionData(e, t) { + if ("string" == typeof e) { + const t = this.getFunction(e); + J(t, "unknown function", "fragment", e), + e = t + } + return ue([e.selector, this._encodeParams(e.inputs, t || [])]) + } + decodeFunctionResult(e, t) { + if ("string" == typeof e) { + const t = this.getFunction(e); + J(t, "unknown function", "fragment", e), + e = t + } + let r = "invalid length for result data"; + const n = ne(t); + if (n.length % 32 == 0) + try { + return this.#j.decode(e.outputs, n) + } catch (e) { + r = "could not decode result data" + } + q(!1, r, "BAD_DATA", { + value: ae(n), + info: { + method: e.name, + signature: e.format() + } + }) + } + makeError(e, t) { + const r = re(e, "data") + , n = No.getBuiltinCallException("call", t, r); + if (n.message.startsWith("execution reverted (unknown custom error)")) { + const e = ae(r.slice(0, 4)) + , t = this.getError(e); + if (t) + try { + const e = this.#j.decode(t.inputs, r.slice(4)); + n.revert = { + name: t.name, + signature: t.format(), + args: e + }, + n.reason = n.revert.signature, + n.message = `execution reverted: ${n.reason}` + } catch (e) { + n.message = "execution reverted (coult not decode custom error)" + } + } + const o = this.parseTransaction(t); + return o && (n.invocation = { + method: o.name, + signature: o.signature, + args: o.args + }), + n + } + encodeFunctionResult(e, t) { + if ("string" == typeof e) { + const t = this.getFunction(e); + J(t, "unknown function", "fragment", e), + e = t + } + return ae(this.#j.encode(e.outputs, t || [])) + } + encodeFilterTopics(e, t) { + if ("string" == typeof e) { + const t = this.getEvent(e); + J(t, "unknown event", "eventFragment", e), + e = t + } + q(t.length <= e.inputs.length, `too many arguments for ${e.format()}`, "UNEXPECTED_ARGUMENT", { + count: t.length, + expectedCount: e.inputs.length + }); + const r = []; + e.anonymous || r.push(e.topicHash); + const n = (e,t)=>"string" === e.type ? ar(t) : "bytes" === e.type ? ir(ae(t)) : ("bool" === e.type && "boolean" == typeof t && (t = t ? "0x01" : "0x00"), + e.type.match(/^u?int/) && (t = Ae(t)), + "address" === e.type && this.#j.encode(["address"], [t]), + de(ae(t), 32)); + for (t.forEach(((t,o)=>{ + const s = e.inputs[o]; + s.indexed ? null == t ? r.push(null) : "array" === s.baseType || "tuple" === s.baseType ? J(!1, "filtering with tuples or arrays not supported", "contract." + s.name, t) : Array.isArray(t) ? r.push(t.map((e=>n(s, e)))) : r.push(n(s, t)) : J(null == t, "cannot filter non-indexed parameters; must be null", "contract." + s.name, t) + } + )); r.length && null === r[r.length - 1]; ) + r.pop(); + return r + } + encodeEventLog(e, t) { + if ("string" == typeof e) { + const t = this.getEvent(e); + J(t, "unknown event", "eventFragment", e), + e = t + } + const r = [] + , n = [] + , o = []; + return e.anonymous || r.push(e.topicHash), + J(t.length === e.inputs.length, "event arguments/values mismatch", "values", t), + e.inputs.forEach(((e,s)=>{ + const i = t[s]; + if (e.indexed) + if ("string" === e.type) + r.push(ar(i)); + else if ("bytes" === e.type) + r.push(ir(i)); + else { + if ("tuple" === e.baseType || "array" === e.baseType) + throw new Error("not implemented"); + r.push(this.#j.encode([e.type], [i])) + } + else + n.push(e), + o.push(i) + } + )), + { + data: this.#j.encode(n, o), + topics: r + } + } + decodeEventLog(e, t, r) { + if ("string" == typeof e) { + const t = this.getEvent(e); + J(t, "unknown event", "eventFragment", e), + e = t + } + if (null != r && !e.anonymous) { + const t = e.topicHash; + J(oe(r[0], 32) && r[0].toLowerCase() === t, "fragment/topic mismatch", "topics[0]", r[0]), + r = r.slice(1) + } + const n = [] + , o = [] + , s = []; + e.inputs.forEach(((e,t)=>{ + e.indexed ? "string" === e.type || "bytes" === e.type || "tuple" === e.baseType || "array" === e.baseType ? (n.push(cu.from({ + type: "bytes32", + name: e.name + })), + s.push(!0)) : (n.push(e), + s.push(!1)) : (o.push(e), + s.push(!1)) + } + )); + const i = null != r ? this.#j.decode(n, ue(r)) : null + , a = this.#j.decode(o, t, !0) + , u = [] + , c = []; + let l = 0 + , d = 0; + return e.inputs.forEach(((e,t)=>{ + let r = null; + if (e.indexed) + if (null == i) + r = new Au(null); + else if (s[t]) + r = new Au(i[d++]); + else + try { + r = i[d++] + } catch (e) { + r = e + } + else + try { + r = a[l++] + } catch (e) { + r = e + } + u.push(r), + c.push(e.name || null) + } + )), + Un.fromItems(u, c) + } + parseTransaction(e) { + const t = re(e.data, "tx.data") + , r = be(null != e.value ? e.value : 0, "tx.value") + , n = this.getFunction(ae(t.slice(0, 4))); + if (!n) + return null; + const o = this.#j.decode(n.inputs, t.slice(4)); + return new vu(n,n.selector,o,r) + } + parseCallResult(e) { + throw new Error("@TODO") + } + parseLog(e) { + const t = this.getEvent(e.topics[0]); + return !t || t.anonymous ? null : new Tu(t,t.topicHash,this.decodeEventLog(t, e.data, e.topics)) + } + parseError(e) { + const t = ae(e) + , r = this.getError(le(t, 0, 4)); + if (!r) + return null; + const n = this.#j.decode(r.inputs, le(t, 4)); + return new wu(r,r.selector,n) + } + static from(e) { + return e instanceof Bu ? e : "string" == typeof e ? new Bu(JSON.parse(e)) : "function" == typeof e.format ? new Bu(e.format("json")) : new Bu(e) + } + } + const Cu = e=>Se.from(e) + , Eu = e=>Se.from(e).serialized + , Mu = e=>re(e) + , Iu = { + sighash: "sighash", + minimal: "minimal", + full: "full", + json: "json" + } + , Fu = Tr.isValidMnemonic; + Pr.register(((e,t,r)=>Pr._(e, ethereumjs.Buffer.Buffer.from(t), ethereumjs.Buffer.Buffer.from(r)))); + const Ou = new Uint8Array(32); + Ou.fill(0); + const Su = BigInt(-1) + , _u = BigInt(0) + , xu = BigInt(1) + , Ru = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff") + , Nu = Ae(xu, 32) + , ku = Ae(_u, 32) + , Uu = { + name: "string", + version: "string", + chainId: "uint256", + verifyingContract: "address", + salt: "bytes32" + } + , Du = ["name", "version", "chainId", "verifyingContract", "salt"]; + function Lu(e) { + return function(t) { + return J("string" == typeof t, `invalid domain value for ${JSON.stringify(e)}`, `domain.${e}`, t), + t + } + } + const zu = { + name: Lu("name"), + version: Lu("version"), + chainId: function(e) { + return be(e, "domain.chainId") + }, + verifyingContract: function(e) { + try { + return (t = e, + pf.address.toHex(t)).toLowerCase() + } catch (e) {} + var t; + J(!1, 'invalid domain value "verifyingContract"', "domain.verifyingContract", e) + }, + salt: function(e) { + const t = re(e, "domain.salt"); + return J(32 === t.length, 'invalid domain value "salt"', "domain.salt", e), + ae(t) + } + }; + function ju(e) { + { + const t = e.match(/^(u?)int(\d*)$/); + if (t) { + const r = "" === t[1] + , n = parseInt(t[2] || "256"); + J(n % 8 == 0 && 0 !== n && n <= 256 && (null == t[2] || t[2] === String(n)), "invalid numeric width", "type", e); + const o = ye(Ru, r ? n - 1 : n) + , s = r ? (o + xu) * Su : _u; + return function(t) { + const n = be(t, "value"); + return J(n >= s && n <= o, `value out-of-bounds for ${e}`, "value", n), + Ae(r ? ge(n, 256) : n, 32) + } + } + } + { + const t = e.match(/^bytes(\d+)$/); + if (t) { + const r = parseInt(t[1]); + return J(0 !== r && r <= 32 && t[1] === String(r), "invalid bytes width", "type", e), + function(t) { + return J(re(t).length === r, `invalid length for ${e}`, "value", t), + function(e) { + const t = re(e) + , r = t.length % 32; + return r ? ue([t, Ou.slice(r)]) : ae(t) + }(t) + } + } + } + switch (e) { + case "trcToken": + return ju("uint256"); + case "address": + return function(e) { + return de((t = e, + pf.address.toHex(t).replace(B, "0x")), 32); + var t + } + ; + case "bool": + return function(e) { + return e ? Nu : ku + } + ; + case "bytes": + return function(e) { + return ir(e) + } + ; + case "string": + return function(e) { + return ar(e) + } + } + return null + } + function $u(e, t) { + return `${e}(${t.map((e=>{ + let {name: t, type: r} = e; + return r + " " + t + } + )).join(",")})` + } + class Vu { + primaryType; + #T; + get types() { + return JSON.parse(this.#T) + } + #v; + #w; + constructor(e) { + this.#T = JSON.stringify(e), + this.#v = new Map, + this.#w = new Map; + const t = new Map + , r = new Map + , n = new Map; + Object.keys(e).forEach((e=>{ + t.set(e, new Set), + r.set(e, []), + n.set(e, new Set) + } + )); + for (const n in e) { + const o = new Set; + for (const s of e[n]) { + J(!o.has(s.name), `duplicate variable name ${JSON.stringify(s.name)} in ${JSON.stringify(n)}`, "types", e), + o.add(s.name); + const i = s.type.match(/^([^\x5b]*)(\x5b|$)/)[1] || null; + J(i !== n, `circular type reference to ${JSON.stringify(i)}`, "types", e), + ju(i) || (J(r.has(i), `unknown type ${JSON.stringify(i)}`, "types", e), + r.get(i).push(n), + t.get(n).add(i)) + } + } + const o = Array.from(r.keys()).filter((e=>0 === r.get(e).length)); + J(0 !== o.length, "missing primary type", "types", e), + J(1 === o.length, `ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`, "types", e), + G(this, { + primaryType: o[0] + }), + function o(s, i) { + J(!i.has(s), `circular type reference to ${JSON.stringify(s)}`, "types", e), + i.add(s); + for (const e of t.get(s)) + if (r.has(e)) { + o(e, i); + for (const t of i) + n.get(t).add(e) + } + i.delete(s) + }(this.primaryType, new Set); + for (const [t,r] of n) { + const n = Array.from(r); + n.sort(), + this.#v.set(t, $u(t, e[t]) + n.map((t=>$u(t, e[t]))).join("")) + } + } + getEncoder(e) { + let t = this.#w.get(e); + return t || (t = this.#A(e), + this.#w.set(e, t)), + t + } + #A(e) { + { + const t = ju(e); + if (t) + return t + } + const t = e.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (t) { + const e = t[1] + , r = this.getEncoder(e); + return n=>{ + J(!t[3] || parseInt(t[3]) === n.length, `array length mismatch; expected length ${parseInt(t[3])}`, "value", n); + let o = n.map(r); + return this.#v.has(e) && (o = o.map(ir)), + ir(ue(o)) + } + } + const r = this.types[e]; + if (r) { + const t = ar(this.#v.get(e)); + return e=>{ + const n = r.map((t=>{ + let {name: r, type: n} = t; + const o = this.getEncoder(n)(e[r]); + return this.#v.has(n) ? ir(o) : o + } + )); + return n.unshift(t), + ue(n) + } + } + J(!1, `unknown type: ${e}`, "type", e) + } + encodeType(e) { + const t = this.#v.get(e); + return J(t, `unknown type: ${JSON.stringify(e)}`, "name", e), + t + } + encodeData(e, t) { + return this.getEncoder(e)(t) + } + hashStruct(e, t) { + return ir(this.encodeData(e, t)) + } + encode(e) { + return this.encodeData(this.primaryType, e) + } + hash(e) { + return this.hashStruct(this.primaryType, e) + } + _visit(e, t, r) { + if (ju(e)) + return r(e, t); + const n = e.match(/^(.*)(\x5b(\d*)\x5d)$/); + if (n) + return J(!n[3] || parseInt(n[3]) === t.length, `array length mismatch; expected length ${parseInt(n[3])}`, "value", t), + t.map((e=>this._visit(n[1], e, r))); + const o = this.types[e]; + if (o) + return o.reduce(((e,n)=>{ + let {name: o, type: s} = n; + return e[o] = this._visit(s, t[o], r), + e + } + ), {}); + J(!1, `unknown type: ${e}`, "type", e) + } + visit(e, t) { + return this._visit(this.primaryType, e, t) + } + static from(e) { + return new Vu(e) + } + static getPrimaryType(e) { + return Vu.from(e).primaryType + } + static hashStruct(e, t, r) { + return Vu.from(t).hashStruct(e, r) + } + static hashDomain(e) { + const t = []; + for (const r in e) { + if (null == e[r]) + continue; + const n = Uu[r]; + J(n, `invalid typed-data domain key: ${JSON.stringify(r)}`, "domain", e), + t.push({ + name: r, + type: n + }) + } + return t.sort(((e,t)=>Du.indexOf(e.name) - Du.indexOf(t.name))), + Vu.hashStruct("EIP712Domain", { + EIP712Domain: t + }, e) + } + static encode(e, t, r) { + return ue(["0x1901", Vu.hashDomain(e), Vu.from(t).hash(r)]) + } + static hash(e, t, r) { + return ir(Vu.encode(e, t, r)) + } + static getPayload(e, t, r) { + Vu.hashDomain(e); + const n = {} + , o = []; + Du.forEach((t=>{ + const r = e[t]; + null != r && (n[t] = zu[t](r), + o.push({ + name: t, + type: Uu[t] + })) + } + )); + const s = Vu.from(t) + , i = Object.assign({}, t); + return J(null == i.EIP712Domain, "types must not contain EIP712Domain type", "types.EIP712Domain", t), + i.EIP712Domain = o, + s.encode(r), + { + types: i, + domain: n, + primaryType: s.primaryType, + message: s.visit(r, ((e,t)=>{ + if (e.match(/^bytes(\d*)/)) + return ae(re(t)); + if (e.match(/^u?int/)) + return be(t).toString(); + switch (e) { + case "trcToken": + return be(t).toString(); + case "address": + return t.toLowerCase(); + case "bool": + return !!t; + case "string": + return J("string" == typeof t, "invalid string", "value", t), + t + } + J(!1, "unsupported type", "type", e) + } + )) + } + } + } + function Gu(e) { + if (!Number.isSafeInteger(e) || e < 0) + throw new Error(`Wrong positive integer: ${e}`) + } + function Hu(e, ...t) { + if (!(e instanceof Uint8Array)) + throw new Error("Expected Uint8Array"); + if (t.length > 0 && !t.includes(e.length)) + throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`) + } + const Ku = { + number: Gu, + bool: function(e) { + if ("boolean" != typeof e) + throw new Error(`Expected boolean, not ${e}`) + }, + bytes: Hu, + hash: function(e) { + if ("function" != typeof e || "function" != typeof e.create) + throw new Error("Hash should be wrapped by utils.wrapConstructor"); + Gu(e.outputLen), + Gu(e.blockLen) + }, + exists: function(e, t=!0) { + if (e.destroyed) + throw new Error("Hash instance has been destroyed"); + if (t && e.finished) + throw new Error("Hash#digest() has already been called") + }, + output: function(e, t) { + Hu(e); + const r = t.outputLen; + if (e.length < r) + throw new Error(`digestInto() expects output buffer of length at least ${r}`) + } + } + , Zu = Ku + , qu = "object" == typeof globalThis && "crypto"in globalThis ? globalThis.crypto : void 0 + , Ju = e=>e instanceof Uint8Array + , Yu = e=>new DataView(e.buffer,e.byteOffset,e.byteLength) + , Xu = (e,t)=>e << 32 - t | e >>> t; + if (68 !== new Uint8Array(new Uint32Array([287454020]).buffer)[0]) + throw new Error("Non little-endian hardware is not supported"); + function Qu(e) { + if ("string" == typeof e && (e = function(e) { + if ("string" != typeof e) + throw new Error("utf8ToBytes expected string, got " + typeof e); + return new Uint8Array((new TextEncoder).encode(e)) + }(e)), + !Ju(e)) + throw new Error("expected Uint8Array, got " + typeof e); + return e + } + Array.from({ + length: 256 + }, ((e,t)=>t.toString(16).padStart(2, "0"))); + class ec { + clone() { + return this._cloneInto() + } + } + function tc(e) { + const t = t=>e().update(Qu(t)).digest() + , r = e(); + return t.outputLen = r.outputLen, + t.blockLen = r.blockLen, + t.create = ()=>e(), + t + } + function rc(e=32) { + if (qu && "function" == typeof qu.getRandomValues) + return qu.getRandomValues(new Uint8Array(e)); + throw new Error("crypto.getRandomValues must be defined") + } + class nc extends ec { + constructor(e, t, r, n) { + super(), + this.blockLen = e, + this.outputLen = t, + this.padOffset = r, + this.isLE = n, + this.finished = !1, + this.length = 0, + this.pos = 0, + this.destroyed = !1, + this.buffer = new Uint8Array(e), + this.view = Yu(this.buffer) + } + update(e) { + Zu.exists(this); + const {view: t, buffer: r, blockLen: n} = this + , o = (e = Qu(e)).length; + for (let s = 0; s < o; ) { + const i = Math.min(n - this.pos, o - s); + if (i !== n) + r.set(e.subarray(s, s + i), this.pos), + this.pos += i, + s += i, + this.pos === n && (this.process(t, 0), + this.pos = 0); + else { + const t = Yu(e); + for (; n <= o - s; s += n) + this.process(t, s) + } + } + return this.length += e.length, + this.roundClean(), + this + } + digestInto(e) { + Zu.exists(this), + Zu.output(e, this), + this.finished = !0; + const {buffer: t, view: r, blockLen: n, isLE: o} = this; + let {pos: s} = this; + t[s++] = 128, + this.buffer.subarray(s).fill(0), + this.padOffset > n - s && (this.process(r, 0), + s = 0); + for (let e = s; e < n; e++) + t[e] = 0; + !function(e, t, r, n) { + if ("function" == typeof e.setBigUint64) + return e.setBigUint64(t, r, n); + const o = BigInt(32) + , s = BigInt(4294967295) + , i = Number(r >> o & s) + , a = Number(r & s) + , u = n ? 4 : 0 + , c = n ? 0 : 4; + e.setUint32(t + u, i, n), + e.setUint32(t + c, a, n) + }(r, n - 8, BigInt(8 * this.length), o), + this.process(r, 0); + const i = Yu(e) + , a = this.outputLen; + if (a % 4) + throw new Error("_sha2: outputLen should be aligned to 32bit"); + const u = a / 4 + , c = this.get(); + if (u > c.length) + throw new Error("_sha2: outputLen bigger than state"); + for (let e = 0; e < u; e++) + i.setUint32(4 * e, c[e], o) + } + digest() { + const {buffer: e, outputLen: t} = this; + this.digestInto(e); + const r = e.slice(0, t); + return this.destroy(), + r + } + _cloneInto(e) { + e || (e = new this.constructor), + e.set(...this.get()); + const {blockLen: t, buffer: r, length: n, finished: o, destroyed: s, pos: i} = this; + return e.length = n, + e.pos = i, + e.finished = o, + e.destroyed = s, + n % t && e.buffer.set(r), + e + } + } + const oc = (e,t,r)=>e & t ^ ~e & r + , sc = (e,t,r)=>e & t ^ e & r ^ t & r + , ic = new Uint32Array([1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]) + , ac = new Uint32Array([1779033703, 3144134277, 1013904242, 2773480762, 1359893119, 2600822924, 528734635, 1541459225]) + , uc = new Uint32Array(64); + class cc extends nc { + constructor() { + super(64, 32, 8, !1), + this.A = 0 | ac[0], + this.B = 0 | ac[1], + this.C = 0 | ac[2], + this.D = 0 | ac[3], + this.E = 0 | ac[4], + this.F = 0 | ac[5], + this.G = 0 | ac[6], + this.H = 0 | ac[7] + } + get() { + const {A: e, B: t, C: r, D: n, E: o, F: s, G: i, H: a} = this; + return [e, t, r, n, o, s, i, a] + } + set(e, t, r, n, o, s, i, a) { + this.A = 0 | e, + this.B = 0 | t, + this.C = 0 | r, + this.D = 0 | n, + this.E = 0 | o, + this.F = 0 | s, + this.G = 0 | i, + this.H = 0 | a + } + process(e, t) { + for (let r = 0; r < 16; r++, + t += 4) + uc[r] = e.getUint32(t, !1); + for (let e = 16; e < 64; e++) { + const t = uc[e - 15] + , r = uc[e - 2] + , n = Xu(t, 7) ^ Xu(t, 18) ^ t >>> 3 + , o = Xu(r, 17) ^ Xu(r, 19) ^ r >>> 10; + uc[e] = o + uc[e - 7] + n + uc[e - 16] | 0 + } + let {A: r, B: n, C: o, D: s, E: i, F: a, G: u, H: c} = this; + for (let e = 0; e < 64; e++) { + const t = c + (Xu(i, 6) ^ Xu(i, 11) ^ Xu(i, 25)) + oc(i, a, u) + ic[e] + uc[e] | 0 + , l = (Xu(r, 2) ^ Xu(r, 13) ^ Xu(r, 22)) + sc(r, n, o) | 0; + c = u, + u = a, + a = i, + i = s + t | 0, + s = o, + o = n, + n = r, + r = t + l | 0 + } + r = r + this.A | 0, + n = n + this.B | 0, + o = o + this.C | 0, + s = s + this.D | 0, + i = i + this.E | 0, + a = a + this.F | 0, + u = u + this.G | 0, + c = c + this.H | 0, + this.set(r, n, o, s, i, a, u, c) + } + roundClean() { + uc.fill(0) + } + destroy() { + this.set(0, 0, 0, 0, 0, 0, 0, 0), + this.buffer.fill(0) + } + } + class lc extends cc { + constructor() { + super(), + this.A = -1056596264, + this.B = 914150663, + this.C = 812702999, + this.D = -150054599, + this.E = -4191439, + this.F = 1750603025, + this.G = 1694076839, + this.H = -1090891868, + this.outputLen = 28 + } + } + const dc = tc((()=>new cc)) + , hc = (tc((()=>new lc)), + BigInt(0), + BigInt(1)) + , pc = BigInt(2) + , fc = e=>e instanceof Uint8Array + , gc = Array.from({ + length: 256 + }, ((e,t)=>t.toString(16).padStart(2, "0"))); + function yc(e) { + if (!fc(e)) + throw new Error("Uint8Array expected"); + let t = ""; + for (let r = 0; r < e.length; r++) + t += gc[e[r]]; + return t + } + function bc(e) { + if ("string" != typeof e) + throw new Error("hex string expected, got " + typeof e); + return BigInt("" === e ? "0" : `0x${e}`) + } + function mc(e) { + if ("string" != typeof e) + throw new Error("hex string expected, got " + typeof e); + const t = e.length; + if (t % 2) + throw new Error("padded hex string expected, got unpadded hex of length " + t); + const r = new Uint8Array(t / 2); + for (let t = 0; t < r.length; t++) { + const n = 2 * t + , o = e.slice(n, n + 2) + , s = Number.parseInt(o, 16); + if (Number.isNaN(s) || s < 0) + throw new Error("Invalid byte sequence"); + r[t] = s + } + return r + } + function Tc(e) { + return bc(yc(e)) + } + function vc(e) { + if (!fc(e)) + throw new Error("Uint8Array expected"); + return bc(yc(Uint8Array.from(e).reverse())) + } + function wc(e, t) { + return mc(e.toString(16).padStart(2 * t, "0")) + } + function Ac(e, t) { + return wc(e, t).reverse() + } + function Pc(e, t, r) { + let n; + if ("string" == typeof t) + try { + n = mc(t) + } catch (r) { + throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`) + } + else { + if (!fc(t)) + throw new Error(`${e} must be hex string or Uint8Array`); + n = Uint8Array.from(t) + } + const o = n.length; + if ("number" == typeof r && o !== r) + throw new Error(`${e} expected ${r} bytes, got ${o}`); + return n + } + function Wc(...e) { + const t = new Uint8Array(e.reduce(((e,t)=>e + t.length), 0)); + let r = 0; + return e.forEach((e=>{ + if (!fc(e)) + throw new Error("Uint8Array expected"); + t.set(e, r), + r += e.length + } + )), + t + } + const Bc = e=>(pc << BigInt(e - 1)) - hc + , Cc = e=>new Uint8Array(e) + , Ec = e=>Uint8Array.from(e); + function Mc(e, t, r) { + if ("number" != typeof e || e < 2) + throw new Error("hashLen must be a number"); + if ("number" != typeof t || t < 2) + throw new Error("qByteLen must be a number"); + if ("function" != typeof r) + throw new Error("hmacFn must be a function"); + let n = Cc(e) + , o = Cc(e) + , s = 0; + const i = ()=>{ + n.fill(1), + o.fill(0), + s = 0 + } + , a = (...e)=>r(o, n, ...e) + , u = (e=Cc())=>{ + o = a(Ec([0]), e), + n = a(), + 0 !== e.length && (o = a(Ec([1]), e), + n = a()) + } + , c = ()=>{ + if (s++ >= 1e3) + throw new Error("drbg: tried 1000 values"); + let e = 0; + const r = []; + for (; e < t; ) { + n = a(); + const t = n.slice(); + r.push(t), + e += n.length + } + return Wc(...r) + } + ; + return (e,t)=>{ + let r; + for (i(), + u(e); !(r = t(c())); ) + u(); + return i(), + r + } + } + const Ic = { + bigint: e=>"bigint" == typeof e, + function: e=>"function" == typeof e, + boolean: e=>"boolean" == typeof e, + string: e=>"string" == typeof e, + isSafeInteger: e=>Number.isSafeInteger(e), + array: e=>Array.isArray(e), + field: (e,t)=>t.Fp.isValid(e), + hash: e=>"function" == typeof e && Number.isSafeInteger(e.outputLen) + }; + function Fc(e, t, r={}) { + const n = (t,r,n)=>{ + const o = Ic[r]; + if ("function" != typeof o) + throw new Error(`Invalid validator "${r}", expected function`); + const s = e[t]; + if (!(n && void 0 === s || o(s, e))) + throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`) + } + ; + for (const [e,r] of Object.entries(t)) + n(e, r, !1); + for (const [e,t] of Object.entries(r)) + n(e, t, !0); + return e + } + const Oc = BigInt(0) + , Sc = BigInt(1) + , _c = BigInt(2) + , xc = BigInt(3) + , Rc = BigInt(4) + , Nc = BigInt(5) + , kc = BigInt(8); + function Uc(e, t) { + const r = e % t; + return r >= Oc ? r : t + r + } + function Dc(e, t, r) { + if (r <= Oc || t < Oc) + throw new Error("Expected power/modulo > 0"); + if (r === Sc) + return Oc; + let n = Sc; + for (; t > Oc; ) + t & Sc && (n = n * e % r), + e = e * e % r, + t >>= Sc; + return n + } + function Lc(e, t, r) { + let n = e; + for (; t-- > Oc; ) + n *= n, + n %= r; + return n + } + function zc(e, t) { + if (e === Oc || t <= Oc) + throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`); + let r = Uc(e, t) + , n = t + , o = Oc + , s = Sc + , i = Sc + , a = Oc; + for (; r !== Oc; ) { + const e = n / r + , t = n % r + , u = o - i * e + , c = s - a * e; + n = r, + r = t, + o = i, + s = a, + i = u, + a = c + } + if (n !== Sc) + throw new Error("invert: does not exist"); + return Uc(o, t) + } + BigInt(9), + BigInt(16); + const jc = ["create", "isValid", "is0", "neg", "inv", "sqrt", "sqr", "eql", "add", "sub", "mul", "pow", "div", "addN", "subN", "mulN", "sqrN"]; + function $c(e, t) { + const r = void 0 !== t ? t : e.toString(2).length; + return { + nBitLength: r, + nByteLength: Math.ceil(r / 8) + } + } + const Vc = BigInt(0) + , Gc = BigInt(1); + function Hc(e) { + return Fc(e.Fp, jc.reduce(((e,t)=>(e[t] = "function", + e)), { + ORDER: "bigint", + MASK: "bigint", + BYTES: "isSafeInteger", + BITS: "isSafeInteger" + })), + Fc(e, { + n: "bigint", + h: "bigint", + Gx: "field", + Gy: "field" + }, { + nBitLength: "isSafeInteger", + nByteLength: "isSafeInteger" + }), + Object.freeze({ + ...$c(e.n, e.nBitLength), + ...e, + p: e.Fp.ORDER + }) + } + const {bytesToNumberBE: Kc, hexToBytes: Zc} = a + , qc = { + Err: class extends Error { + constructor(e="") { + super(e) + } + } + , + _parseInt(e) { + const {Err: t} = qc; + if (e.length < 2 || 2 !== e[0]) + throw new t("Invalid signature integer tag"); + const r = e[1] + , n = e.subarray(2, r + 2); + if (!r || n.length !== r) + throw new t("Invalid signature integer: wrong length"); + if (128 & n[0]) + throw new t("Invalid signature integer: negative"); + if (0 === n[0] && !(128 & n[1])) + throw new t("Invalid signature integer: unnecessary leading zero"); + return { + d: Kc(n), + l: e.subarray(r + 2) + } + }, + toSig(e) { + const {Err: t} = qc + , r = "string" == typeof e ? Zc(e) : e; + if (!(r instanceof Uint8Array)) + throw new Error("ui8a expected"); + let n = r.length; + if (n < 2 || 48 != r[0]) + throw new t("Invalid signature tag"); + if (r[1] !== n - 2) + throw new t("Invalid signature: incorrect length"); + const {d: o, l: s} = qc._parseInt(r.subarray(2)) + , {d: i, l: a} = qc._parseInt(s); + if (a.length) + throw new t("Invalid signature: left bytes after parsing"); + return { + r: o, + s: i + } + }, + hexFromSig(e) { + const t = e=>8 & Number.parseInt(e[0], 16) ? "00" + e : e + , r = e=>{ + const t = e.toString(16); + return 1 & t.length ? `0${t}` : t + } + , n = t(r(e.s)) + , o = t(r(e.r)) + , s = n.length / 2 + , i = o.length / 2 + , a = r(s) + , u = r(i); + return `30${r(i + s + 4)}02${u}${o}02${a}${n}` + } + } + , Jc = BigInt(0) + , Yc = BigInt(1) + , Xc = (BigInt(2), + BigInt(3)); + function Qc(e) { + const t = function(e) { + const t = Hc(e); + return Fc(t, { + hash: "hash", + hmac: "function", + randomBytes: "function" + }, { + bits2int: "function", + bits2int_modN: "function", + lowS: "boolean" + }), + Object.freeze({ + lowS: !0, + ...t + }) + }(e) + , {Fp: r, n} = t + , o = r.BYTES + 1 + , s = 2 * r.BYTES + 1; + function i(e) { + return Uc(e, n) + } + function a(e) { + return zc(e, n) + } + const {ProjectivePoint: u, normPrivateKeyToScalar: c, weierstrassEquation: l, isWithinCurveOrder: d} = function(e) { + const t = function(e) { + const t = Hc(e); + Fc(t, { + a: "field", + b: "field" + }, { + allowedPrivateKeyLengths: "array", + wrapPrivateKey: "boolean", + isTorsionFree: "function", + clearCofactor: "function", + allowInfinityPoint: "boolean", + fromBytes: "function", + toBytes: "function" + }); + const {endo: r, Fp: n, a: o} = t; + if (r) { + if (!n.eql(o, n.ZERO)) + throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0"); + if ("object" != typeof r || "bigint" != typeof r.beta || "function" != typeof r.splitScalar) + throw new Error("Expected endomorphism with beta: bigint and splitScalar: function") + } + return Object.freeze({ + ...t + }) + }(e) + , {Fp: r} = t + , n = t.toBytes || ((e,t,n)=>{ + const o = t.toAffine(); + return Wc(Uint8Array.from([4]), r.toBytes(o.x), r.toBytes(o.y)) + } + ) + , o = t.fromBytes || (e=>{ + const t = e.subarray(1); + return { + x: r.fromBytes(t.subarray(0, r.BYTES)), + y: r.fromBytes(t.subarray(r.BYTES, 2 * r.BYTES)) + } + } + ); + function s(e) { + const {a: n, b: o} = t + , s = r.sqr(e) + , i = r.mul(s, e); + return r.add(r.add(i, r.mul(e, n)), o) + } + if (!r.eql(r.sqr(t.Gy), s(t.Gx))) + throw new Error("bad generator point: equation left != right"); + function i(e) { + return "bigint" == typeof e && Jc < e && e < t.n + } + function a(e) { + if (!i(e)) + throw new Error("Expected valid bigint: 0 < bigint < curve.n") + } + function u(e) { + const {allowedPrivateKeyLengths: r, nByteLength: n, wrapPrivateKey: o, n: s} = t; + if (r && "bigint" != typeof e) { + if (e instanceof Uint8Array && (e = yc(e)), + "string" != typeof e || !r.includes(e.length)) + throw new Error("Invalid key"); + e = e.padStart(2 * n, "0") + } + let i; + try { + i = "bigint" == typeof e ? e : Tc(Pc("private key", e, n)) + } catch (t) { + throw new Error(`private key must be ${n} bytes, hex or bigint, not ${typeof e}`) + } + return o && (i = Uc(i, s)), + a(i), + i + } + const c = new Map; + function l(e) { + if (!(e instanceof d)) + throw new Error("ProjectivePoint expected") + } + class d { + constructor(e, t, n) { + if (this.px = e, + this.py = t, + this.pz = n, + null == e || !r.isValid(e)) + throw new Error("x required"); + if (null == t || !r.isValid(t)) + throw new Error("y required"); + if (null == n || !r.isValid(n)) + throw new Error("z required") + } + static fromAffine(e) { + const {x: t, y: n} = e || {}; + if (!e || !r.isValid(t) || !r.isValid(n)) + throw new Error("invalid affine point"); + if (e instanceof d) + throw new Error("projective point not allowed"); + const o = e=>r.eql(e, r.ZERO); + return o(t) && o(n) ? d.ZERO : new d(t,n,r.ONE) + } + get x() { + return this.toAffine().x + } + get y() { + return this.toAffine().y + } + static normalizeZ(e) { + const t = r.invertBatch(e.map((e=>e.pz))); + return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine) + } + static fromHex(e) { + const t = d.fromAffine(o(Pc("pointHex", e))); + return t.assertValidity(), + t + } + static fromPrivateKey(e) { + return d.BASE.multiply(u(e)) + } + _setWindowSize(e) { + this._WINDOW_SIZE = e, + c.delete(this) + } + assertValidity() { + if (this.is0()) { + if (t.allowInfinityPoint) + return; + throw new Error("bad point: ZERO") + } + const {x: e, y: n} = this.toAffine(); + if (!r.isValid(e) || !r.isValid(n)) + throw new Error("bad point: x or y not FE"); + const o = r.sqr(n) + , i = s(e); + if (!r.eql(o, i)) + throw new Error("bad point: equation left != right"); + if (!this.isTorsionFree()) + throw new Error("bad point: not in prime-order subgroup") + } + hasEvenY() { + const {y: e} = this.toAffine(); + if (r.isOdd) + return !r.isOdd(e); + throw new Error("Field doesn't support isOdd") + } + equals(e) { + l(e); + const {px: t, py: n, pz: o} = this + , {px: s, py: i, pz: a} = e + , u = r.eql(r.mul(t, a), r.mul(s, o)) + , c = r.eql(r.mul(n, a), r.mul(i, o)); + return u && c + } + negate() { + return new d(this.px,r.neg(this.py),this.pz) + } + double() { + const {a: e, b: n} = t + , o = r.mul(n, Xc) + , {px: s, py: i, pz: a} = this; + let u = r.ZERO + , c = r.ZERO + , l = r.ZERO + , h = r.mul(s, s) + , p = r.mul(i, i) + , f = r.mul(a, a) + , g = r.mul(s, i); + return g = r.add(g, g), + l = r.mul(s, a), + l = r.add(l, l), + u = r.mul(e, l), + c = r.mul(o, f), + c = r.add(u, c), + u = r.sub(p, c), + c = r.add(p, c), + c = r.mul(u, c), + u = r.mul(g, u), + l = r.mul(o, l), + f = r.mul(e, f), + g = r.sub(h, f), + g = r.mul(e, g), + g = r.add(g, l), + l = r.add(h, h), + h = r.add(l, h), + h = r.add(h, f), + h = r.mul(h, g), + c = r.add(c, h), + f = r.mul(i, a), + f = r.add(f, f), + h = r.mul(f, g), + u = r.sub(u, h), + l = r.mul(f, p), + l = r.add(l, l), + l = r.add(l, l), + new d(u,c,l) + } + add(e) { + l(e); + const {px: n, py: o, pz: s} = this + , {px: i, py: a, pz: u} = e; + let c = r.ZERO + , h = r.ZERO + , p = r.ZERO; + const f = t.a + , g = r.mul(t.b, Xc); + let y = r.mul(n, i) + , b = r.mul(o, a) + , m = r.mul(s, u) + , T = r.add(n, o) + , v = r.add(i, a); + T = r.mul(T, v), + v = r.add(y, b), + T = r.sub(T, v), + v = r.add(n, s); + let w = r.add(i, u); + return v = r.mul(v, w), + w = r.add(y, m), + v = r.sub(v, w), + w = r.add(o, s), + c = r.add(a, u), + w = r.mul(w, c), + c = r.add(b, m), + w = r.sub(w, c), + p = r.mul(f, v), + c = r.mul(g, m), + p = r.add(c, p), + c = r.sub(b, p), + p = r.add(b, p), + h = r.mul(c, p), + b = r.add(y, y), + b = r.add(b, y), + m = r.mul(f, m), + v = r.mul(g, v), + b = r.add(b, m), + m = r.sub(y, m), + m = r.mul(f, m), + v = r.add(v, m), + y = r.mul(b, v), + h = r.add(h, y), + y = r.mul(w, v), + c = r.mul(T, c), + c = r.sub(c, y), + y = r.mul(T, b), + p = r.mul(w, p), + p = r.add(p, y), + new d(c,h,p) + } + subtract(e) { + return this.add(e.negate()) + } + is0() { + return this.equals(d.ZERO) + } + wNAF(e) { + return p.wNAFCached(this, c, e, (e=>{ + const t = r.invertBatch(e.map((e=>e.pz))); + return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine) + } + )) + } + multiplyUnsafe(e) { + const n = d.ZERO; + if (e === Jc) + return n; + if (a(e), + e === Yc) + return this; + const {endo: o} = t; + if (!o) + return p.unsafeLadder(this, e); + let {k1neg: s, k1: i, k2neg: u, k2: c} = o.splitScalar(e) + , l = n + , h = n + , f = this; + for (; i > Jc || c > Jc; ) + i & Yc && (l = l.add(f)), + c & Yc && (h = h.add(f)), + f = f.double(), + i >>= Yc, + c >>= Yc; + return s && (l = l.negate()), + u && (h = h.negate()), + h = new d(r.mul(h.px, o.beta),h.py,h.pz), + l.add(h) + } + multiply(e) { + a(e); + let n, o, s = e; + const {endo: i} = t; + if (i) { + const {k1neg: e, k1: t, k2neg: a, k2: u} = i.splitScalar(s); + let {p: c, f: l} = this.wNAF(t) + , {p: h, f} = this.wNAF(u); + c = p.constTimeNegate(e, c), + h = p.constTimeNegate(a, h), + h = new d(r.mul(h.px, i.beta),h.py,h.pz), + n = c.add(h), + o = l.add(f) + } else { + const {p: e, f: t} = this.wNAF(s); + n = e, + o = t + } + return d.normalizeZ([n, o])[0] + } + multiplyAndAddUnsafe(e, t, r) { + const n = d.BASE + , o = (e,t)=>t !== Jc && t !== Yc && e.equals(n) ? e.multiply(t) : e.multiplyUnsafe(t) + , s = o(this, t).add(o(e, r)); + return s.is0() ? void 0 : s + } + toAffine(e) { + const {px: t, py: n, pz: o} = this + , s = this.is0(); + null == e && (e = s ? r.ONE : r.inv(o)); + const i = r.mul(t, e) + , a = r.mul(n, e) + , u = r.mul(o, e); + if (s) + return { + x: r.ZERO, + y: r.ZERO + }; + if (!r.eql(u, r.ONE)) + throw new Error("invZ was invalid"); + return { + x: i, + y: a + } + } + isTorsionFree() { + const {h: e, isTorsionFree: r} = t; + if (e === Yc) + return !0; + if (r) + return r(d, this); + throw new Error("isTorsionFree() has not been declared for the elliptic curve") + } + clearCofactor() { + const {h: e, clearCofactor: r} = t; + return e === Yc ? this : r ? r(d, this) : this.multiplyUnsafe(t.h) + } + toRawBytes(e=!0) { + return this.assertValidity(), + n(d, this, e) + } + toHex(e=!0) { + return yc(this.toRawBytes(e)) + } + } + d.BASE = new d(t.Gx,t.Gy,r.ONE), + d.ZERO = new d(r.ZERO,r.ONE,r.ZERO); + const h = t.nBitLength + , p = function(e, t) { + const r = (e,t)=>{ + const r = t.negate(); + return e ? r : t + } + , n = e=>({ + windows: Math.ceil(t / e) + 1, + windowSize: 2 ** (e - 1) + }); + return { + constTimeNegate: r, + unsafeLadder(t, r) { + let n = e.ZERO + , o = t; + for (; r > Vc; ) + r & Gc && (n = n.add(o)), + o = o.double(), + r >>= Gc; + return n + }, + precomputeWindow(e, t) { + const {windows: r, windowSize: o} = n(t) + , s = []; + let i = e + , a = i; + for (let e = 0; e < r; e++) { + a = i, + s.push(a); + for (let e = 1; e < o; e++) + a = a.add(i), + s.push(a); + i = a.double() + } + return s + }, + wNAF(t, o, s) { + const {windows: i, windowSize: a} = n(t); + let u = e.ZERO + , c = e.BASE; + const l = BigInt(2 ** t - 1) + , d = 2 ** t + , h = BigInt(t); + for (let e = 0; e < i; e++) { + const t = e * a; + let n = Number(s & l); + s >>= h, + n > a && (n -= d, + s += Gc); + const i = t + , p = t + Math.abs(n) - 1 + , f = e % 2 != 0 + , g = n < 0; + 0 === n ? c = c.add(r(f, o[i])) : u = u.add(r(g, o[p])) + } + return { + p: u, + f: c + } + }, + wNAFCached(e, t, r, n) { + const o = e._WINDOW_SIZE || 1; + let s = t.get(e); + return s || (s = this.precomputeWindow(e, o), + 1 !== o && t.set(e, n(s))), + this.wNAF(o, s, r) + } + } + }(d, t.endo ? Math.ceil(h / 2) : h); + return { + CURVE: t, + ProjectivePoint: d, + normPrivateKeyToScalar: u, + weierstrassEquation: s, + isWithinCurveOrder: i + } + }({ + ...t, + toBytes(e, t, n) { + const o = t.toAffine() + , s = r.toBytes(o.x) + , i = Wc; + return n ? i(Uint8Array.from([t.hasEvenY() ? 2 : 3]), s) : i(Uint8Array.from([4]), s, r.toBytes(o.y)) + }, + fromBytes(e) { + const t = e.length + , n = e[0] + , i = e.subarray(1); + if (t !== o || 2 !== n && 3 !== n) { + if (t === s && 4 === n) + return { + x: r.fromBytes(i.subarray(0, r.BYTES)), + y: r.fromBytes(i.subarray(r.BYTES, 2 * r.BYTES)) + }; + throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`) + } + { + const e = Tc(i); + if (!(Jc < (a = e) && a < r.ORDER)) + throw new Error("Point is not on curve"); + const t = l(e); + let o = r.sqrt(t); + return 1 == (1 & n) != ((o & Yc) === Yc) && (o = r.neg(o)), + { + x: e, + y: o + } + } + var a + } + }) + , h = e=>yc(wc(e, t.nByteLength)); + function p(e) { + return e > n >> Yc + } + const f = (e,t,r)=>Tc(e.slice(t, r)); + class g { + constructor(e, t, r) { + this.r = e, + this.s = t, + this.recovery = r, + this.assertValidity() + } + static fromCompact(e) { + const r = t.nByteLength; + return e = Pc("compactSignature", e, 2 * r), + new g(f(e, 0, r),f(e, r, 2 * r)) + } + static fromDER(e) { + const {r: t, s: r} = qc.toSig(Pc("DER", e)); + return new g(t,r) + } + assertValidity() { + if (!d(this.r)) + throw new Error("r must be 0 < r < CURVE.n"); + if (!d(this.s)) + throw new Error("s must be 0 < s < CURVE.n") + } + addRecoveryBit(e) { + return new g(this.r,this.s,e) + } + recoverPublicKey(e) { + const {r: n, s: o, recovery: s} = this + , c = T(Pc("msgHash", e)); + if (null == s || ![0, 1, 2, 3].includes(s)) + throw new Error("recovery id invalid"); + const l = 2 === s || 3 === s ? n + t.n : n; + if (l >= r.ORDER) + throw new Error("recovery id 2 or 3 invalid"); + const d = 0 == (1 & s) ? "02" : "03" + , p = u.fromHex(d + h(l)) + , f = a(l) + , g = i(-c * f) + , y = i(o * f) + , b = u.BASE.multiplyAndAddUnsafe(p, g, y); + if (!b) + throw new Error("point at infinify"); + return b.assertValidity(), + b + } + hasHighS() { + return p(this.s) + } + normalizeS() { + return this.hasHighS() ? new g(this.r,i(-this.s),this.recovery) : this + } + toDERRawBytes() { + return mc(this.toDERHex()) + } + toDERHex() { + return qc.hexFromSig({ + r: this.r, + s: this.s + }) + } + toCompactRawBytes() { + return mc(this.toCompactHex()) + } + toCompactHex() { + return h(this.r) + h(this.s) + } + } + const y = { + isValidPrivateKey(e) { + try { + return c(e), + !0 + } catch (e) { + return !1 + } + }, + normPrivateKeyToScalar: c, + randomPrivateKey: ()=>wc(function(e, t, r=!1) { + const n = (e = Pc("privateHash", e)).length + , o = $c(t).nByteLength + 8; + if (o < 24 || n < o || n > 1024) + throw new Error(`hashToPrivateScalar: expected ${o}-1024 bytes of input, got ${n}`); + return Uc(r ? vc(e) : Tc(e), t - Sc) + Sc + }(t.randomBytes(r.BYTES + 8), n), t.nByteLength), + precompute: (e=8,t=u.BASE)=>(t._setWindowSize(e), + t.multiply(BigInt(3)), + t) + }; + function b(e) { + const t = e instanceof Uint8Array + , r = "string" == typeof e + , n = (t || r) && e.length; + return t ? n === o || n === s : r ? n === 2 * o || n === 2 * s : e instanceof u + } + const m = t.bits2int || function(e) { + const r = Tc(e) + , n = 8 * e.length - t.nBitLength; + return n > 0 ? r >> BigInt(n) : r + } + , T = t.bits2int_modN || function(e) { + return i(m(e)) + } + , v = Bc(t.nBitLength); + function w(e) { + if ("bigint" != typeof e) + throw new Error("bigint expected"); + if (!(Jc <= e && e < v)) + throw new Error(`bigint expected < 2^${t.nBitLength}`); + return wc(e, t.nByteLength) + } + const A = { + lowS: t.lowS, + prehash: !1 + } + , P = { + lowS: t.lowS, + prehash: !1 + }; + return u.BASE._setWindowSize(8), + { + CURVE: t, + getPublicKey: function(e, t=!0) { + return u.fromPrivateKey(e).toRawBytes(t) + }, + getSharedSecret: function(e, t, r=!0) { + if (b(e)) + throw new Error("first arg must be private key"); + if (!b(t)) + throw new Error("second arg must be public key"); + return u.fromHex(t).multiply(c(e)).toRawBytes(r) + }, + sign: function(e, n, o=A) { + const {seed: s, k2sig: l} = function(e, n, o=A) { + if (["recovered", "canonical"].some((e=>e in o))) + throw new Error("sign() legacy options not supported"); + const {hash: s, randomBytes: l} = t; + let {lowS: h, prehash: f, extraEntropy: y} = o; + null == h && (h = !0), + e = Pc("msgHash", e), + f && (e = Pc("prehashed msgHash", s(e))); + const b = T(e) + , v = c(n) + , P = [w(v), w(b)]; + if (null != y) { + const e = !0 === y ? l(r.BYTES) : y; + P.push(Pc("extraEntropy", e, r.BYTES)) + } + const W = Wc(...P) + , B = b; + return { + seed: W, + k2sig: function(e) { + const t = m(e); + if (!d(t)) + return; + const r = a(t) + , n = u.BASE.multiply(t).toAffine() + , o = i(n.x); + if (o === Jc) + return; + const s = i(r * i(B + o * v)); + if (s === Jc) + return; + let c = (n.x === o ? 0 : 2) | Number(n.y & Yc) + , l = s; + return h && p(s) && (l = function(e) { + return p(e) ? i(-e) : e + }(s), + c ^= 1), + new g(o,l,c) + } + } + }(e, n, o) + , h = t; + return Mc(h.hash.outputLen, h.nByteLength, h.hmac)(s, l) + }, + verify: function(e, r, n, o=P) { + const s = e; + if (r = Pc("msgHash", r), + n = Pc("publicKey", n), + "strict"in o) + throw new Error("options.strict was renamed to lowS"); + const {lowS: c, prehash: l} = o; + let d, h; + try { + if ("string" == typeof s || s instanceof Uint8Array) + try { + d = g.fromDER(s) + } catch (e) { + if (!(e instanceof qc.Err)) + throw e; + d = g.fromCompact(s) + } + else { + if ("object" != typeof s || "bigint" != typeof s.r || "bigint" != typeof s.s) + throw new Error("PARSE"); + { + const {r: e, s: t} = s; + d = new g(e,t) + } + } + h = u.fromHex(n) + } catch (e) { + if ("PARSE" === e.message) + throw new Error("signature must be Signature instance, Uint8Array or hex string"); + return !1 + } + if (c && d.hasHighS()) + return !1; + l && (r = t.hash(r)); + const {r: p, s: f} = d + , y = T(r) + , b = a(f) + , m = i(y * b) + , v = i(p * b) + , w = u.BASE.multiplyAndAddUnsafe(h, m, v)?.toAffine(); + return !!w && i(w.x) === p + }, + ProjectivePoint: u, + Signature: g, + utils: y + } + } + BigInt(4); + class el extends ec { + constructor(e, t) { + super(), + this.finished = !1, + this.destroyed = !1, + Zu.hash(e); + const r = Qu(t); + if (this.iHash = e.create(), + "function" != typeof this.iHash.update) + throw new Error("Expected instance of class which extends utils.Hash"); + this.blockLen = this.iHash.blockLen, + this.outputLen = this.iHash.outputLen; + const n = this.blockLen + , o = new Uint8Array(n); + o.set(r.length > n ? e.create().update(r).digest() : r); + for (let e = 0; e < o.length; e++) + o[e] ^= 54; + this.iHash.update(o), + this.oHash = e.create(); + for (let e = 0; e < o.length; e++) + o[e] ^= 106; + this.oHash.update(o), + o.fill(0) + } + update(e) { + return Zu.exists(this), + this.iHash.update(e), + this + } + digestInto(e) { + Zu.exists(this), + Zu.bytes(e, this.outputLen), + this.finished = !0, + this.iHash.digestInto(e), + this.oHash.update(e), + this.oHash.digestInto(e), + this.destroy() + } + digest() { + const e = new Uint8Array(this.oHash.outputLen); + return this.digestInto(e), + e + } + _cloneInto(e) { + e || (e = Object.create(Object.getPrototypeOf(this), {})); + const {oHash: t, iHash: r, finished: n, destroyed: o, blockLen: s, outputLen: i} = this; + return e.finished = n, + e.destroyed = o, + e.blockLen = s, + e.outputLen = i, + e.oHash = t._cloneInto(e.oHash), + e.iHash = r._cloneInto(e.iHash), + e + } + destroy() { + this.destroyed = !0, + this.oHash.destroy(), + this.iHash.destroy() + } + } + const tl = (e,t,r)=>new el(e,t).update(r).digest(); + function rl(e) { + return { + hash: e, + hmac: (t,...r)=>tl(e, t, function(...e) { + const t = new Uint8Array(e.reduce(((e,t)=>e + t.length), 0)); + let r = 0; + return e.forEach((e=>{ + if (!Ju(e)) + throw new Error("Uint8Array expected"); + t.set(e, r), + r += e.length + } + )), + t + }(...r)), + randomBytes: rc + } + } + tl.create = (e,t)=>new el(e,t); + const nl = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f") + , ol = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141") + , sl = BigInt(1) + , il = BigInt(2) + , al = (e,t)=>(e + t / il) / t; + const ul = function(e, t, r=!1, n={}) { + if (e <= Oc) + throw new Error(`Expected Fp ORDER > 0, got ${e}`); + const {nBitLength: o, nByteLength: s} = $c(e, t); + if (s > 2048) + throw new Error("Field lengths over 2048 bytes are not supported"); + const i = function(e) { + if (e % Rc === xc) { + const t = (e + Sc) / Rc; + return function(e, r) { + const n = e.pow(r, t); + if (!e.eql(e.sqr(n), r)) + throw new Error("Cannot find square root"); + return n + } + } + if (e % kc === Nc) { + const t = (e - Nc) / kc; + return function(e, r) { + const n = e.mul(r, _c) + , o = e.pow(n, t) + , s = e.mul(r, o) + , i = e.mul(e.mul(s, _c), o) + , a = e.mul(s, e.sub(i, e.ONE)); + if (!e.eql(e.sqr(a), r)) + throw new Error("Cannot find square root"); + return a + } + } + return function(e) { + const t = (e - Sc) / _c; + let r, n, o; + for (r = e - Sc, + n = 0; r % _c === Oc; r /= _c, + n++) + ; + for (o = _c; o < e && Dc(o, t, e) !== e - Sc; o++) + ; + if (1 === n) { + const t = (e + Sc) / Rc; + return function(e, r) { + const n = e.pow(r, t); + if (!e.eql(e.sqr(n), r)) + throw new Error("Cannot find square root"); + return n + } + } + const s = (r + Sc) / _c; + return function(e, i) { + if (e.pow(i, t) === e.neg(e.ONE)) + throw new Error("Cannot find square root"); + let a = n + , u = e.pow(e.mul(e.ONE, o), r) + , c = e.pow(i, s) + , l = e.pow(i, r); + for (; !e.eql(l, e.ONE); ) { + if (e.eql(l, e.ZERO)) + return e.ZERO; + let t = 1; + for (let r = e.sqr(l); t < a && !e.eql(r, e.ONE); t++) + r = e.sqr(r); + const r = e.pow(u, Sc << BigInt(a - t - 1)); + u = e.sqr(r), + c = e.mul(c, r), + l = e.mul(l, u), + a = t + } + return c + } + }(e) + }(e) + , a = Object.freeze({ + ORDER: e, + BITS: o, + BYTES: s, + MASK: Bc(o), + ZERO: Oc, + ONE: Sc, + create: t=>Uc(t, e), + isValid: t=>{ + if ("bigint" != typeof t) + throw new Error("Invalid field element: expected bigint, got " + typeof t); + return Oc <= t && t < e + } + , + is0: e=>e === Oc, + isOdd: e=>(e & Sc) === Sc, + neg: t=>Uc(-t, e), + eql: (e,t)=>e === t, + sqr: t=>Uc(t * t, e), + add: (t,r)=>Uc(t + r, e), + sub: (t,r)=>Uc(t - r, e), + mul: (t,r)=>Uc(t * r, e), + pow: (e,t)=>function(e, t, r) { + if (r < Oc) + throw new Error("Expected power > 0"); + if (r === Oc) + return e.ONE; + if (r === Sc) + return t; + let n = e.ONE + , o = t; + for (; r > Oc; ) + r & Sc && (n = e.mul(n, o)), + o = e.sqr(o), + r >>= Sc; + return n + }(a, e, t), + div: (t,r)=>Uc(t * zc(r, e), e), + sqrN: e=>e * e, + addN: (e,t)=>e + t, + subN: (e,t)=>e - t, + mulN: (e,t)=>e * t, + inv: t=>zc(t, e), + sqrt: n.sqrt || (e=>i(a, e)), + invertBatch: e=>function(e, t) { + const r = new Array(t.length) + , n = t.reduce(((t,n,o)=>e.is0(n) ? t : (r[o] = t, + e.mul(t, n))), e.ONE) + , o = e.inv(n); + return t.reduceRight(((t,n,o)=>e.is0(n) ? t : (r[o] = e.mul(t, r[o]), + e.mul(t, n))), o), + r + }(a, e), + cmov: (e,t,r)=>r ? t : e, + toBytes: e=>r ? Ac(e, s) : wc(e, s), + fromBytes: e=>{ + if (e.length !== s) + throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`); + return r ? vc(e) : Tc(e) + } + }); + return Object.freeze(a) + }(nl, void 0, void 0, { + sqrt: function(e) { + const t = nl + , r = BigInt(3) + , n = BigInt(6) + , o = BigInt(11) + , s = BigInt(22) + , i = BigInt(23) + , a = BigInt(44) + , u = BigInt(88) + , c = e * e * e % t + , l = c * c * e % t + , d = Lc(l, r, t) * l % t + , h = Lc(d, r, t) * l % t + , p = Lc(h, il, t) * c % t + , f = Lc(p, o, t) * p % t + , g = Lc(f, s, t) * f % t + , y = Lc(g, a, t) * g % t + , b = Lc(y, u, t) * y % t + , m = Lc(b, a, t) * g % t + , T = Lc(m, r, t) * l % t + , v = Lc(T, i, t) * f % t + , w = Lc(v, n, t) * c % t + , A = Lc(w, il, t); + if (!ul.eql(ul.sqr(A), e)) + throw new Error("Cannot find square root"); + return A + } + }) + , cl = function(e, t) { + const r = t=>Qc({ + ...e, + ...rl(t) + }); + return Object.freeze({ + ...r(t), + create: r + }) + }({ + a: BigInt(0), + b: BigInt(7), + Fp: ul, + n: ol, + Gx: BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"), + Gy: BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"), + h: BigInt(1), + lowS: !0, + endo: { + beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"), + splitScalar: e=>{ + const t = ol + , r = BigInt("0x3086d221a7d46bcde86c90e49284eb15") + , n = -sl * BigInt("0xe4437ed6010e88286f547fa90abfe4c3") + , o = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8") + , s = r + , i = BigInt("0x100000000000000000000000000000000") + , a = al(s * e, t) + , u = al(-n * e, t); + let c = Uc(e - a * r - u * o, t) + , l = Uc(-a * n - u * s, t); + const d = c > i + , h = l > i; + if (d && (c = t - c), + h && (l = t - l), + c > i || l > i) + throw new Error("splitScalar: Endomorphism failed, k=" + e); + return { + k1neg: d, + k1: c, + k2neg: h, + k2: l + } + } + } + }, dc); + function ll(e) { + const t = El(e); + let r = El(t).slice(0, 4); + return r = e.concat(r), + D(r) + } + function dl(e) { + if ("string" != typeof e) + return !1; + if (e.length <= 4) + return !1; + let t = L(e); + if (e.length <= 4) + return !1; + const r = t.length - 4 + , n = t.slice(r); + t = t.slice(0, r); + const o = El(t) + , s = El(o).slice(0, 4); + if (n[0] == s[0] && n[1] == s[1] && n[2] == s[2] && n[3] == s[3]) + return t; + throw new Error("Invalid address provided") + } + function hl(e, t) { + "string" == typeof e && (e = S(e)); + const r = Cl(S(t.txID), e); + return Array.isArray(t.signature) ? t.signature.includes(r) || t.signature.push(r) : t.signature = [r], + t + } + function pl(e) { + return btoa(String.fromCharCode(...e)) + } + function fl(e, t) { + return "string" == typeof e && (e = S(e)), + Cl(El(t), e) + } + function gl(e, t, r, n) { + const o = `0x${n.replace(/^0x/, "")}` + , s = new Fn(o) + , i = Vu.hash(e, t, r) + , a = s.sign(i); + return ["0x", a.r.substring(2), a.s.substring(2), Number(a.v).toString(16)].join("") + } + function yl(e) { + const t = v(e); + return proto.protocol.Transaction.deserializeBinary(t).getRawData().serializeBinary() + } + function bl() { + let e = T(cl.utils.randomPrivateKey()); + return e = e.padStart(64, "0"), + S(e) + } + function ml(e) { + 65 === e.length && (e = e.slice(1)); + const t = ir(new Uint8Array(e)).toString().substring(2); + return S(P + t.substring(24)) + } + function Tl(e) { + return ml(Bl(e)) + } + function vl(e) { + const t = L(e); + if (t.length <= 4) + return !1; + const r = t.slice(0, t.length - 4) + , n = El(r) + , o = El(n); + return o[0] === t[r.length] && o[1] === t[r.length + 1] && o[2] === t[r.length + 2] && o[3] === t[r.length + 3] && r + } + function wl(e) { + if ("string" != typeof e) + return !1; + if (e.length !== A) + return !1; + let t = L(e); + if (25 !== t.length) + return !1; + if (t[0] !== W) + return !1; + const r = t.slice(21); + t = t.slice(0, 21); + const n = El(t) + , o = El(n).slice(0, 4); + return r[0] == o[0] && r[1] == o[1] && r[2] == o[2] && r[3] == o[3] + } + function Al(e) { + return ll(ml(Bl(v(e)))) + } + function Pl(e) { + return T(ml(Bl(v(e)))) + } + function Wl(e) { + return w(ml(Bl(v(e)))) + } + function Bl(e) { + const t = cl.ProjectivePoint.fromPrivateKey(new Uint8Array(function(e) { + return S(T(e).padStart(64, "0")) + }(e))) + , r = t.x + , n = t.y; + return S(`04${r.toString(16).padStart(64, "0")}${n.toString(16).padStart(64, "0")}`) + } + function Cl(e, t) { + const r = cl.sign(T(e), T(t)) + , n = r.r.toString(16) + , o = r.s.toString(16) + , s = r.recovery + 27; + return n.padStart(64, "0") + o.padStart(64, "0") + y(s) + } + function El(e) { + return S(St("0x" + T(e)).replace(/^0x/, "")) + } + function Ml(e) { + return ll(Tl(v(e))) + } + function Il(e) { + return ll(Tl(S(e, arguments.length > 1 && void 0 !== arguments[1] && arguments[1]))) + } + BigInt(0), + cl.ProjectivePoint; + const Fl = "Invalid tron path provided"; + function Ol() { + const e = bl() + , t = Bl(e) + , r = Tl(e); + return { + privateKey: T(e), + publicKey: T(t), + address: { + base58: ll(r), + hex: T(r) + } + } + } + function Sl(e) { + if (Dp.isObject(e) || (e = {}), + e.path || (e.path = C), + !String(e.path).match(/^m\/44\'\/195\'/)) + throw new Error(Fl); + const t = Aa.createRandom(e.password, e.path, e.wordlist); + return { + mnemonic: t.mnemonic, + privateKey: t.privateKey, + publicKey: t.signingKey.publicKey, + address: Il(t.privateKey.replace(/^0x/, "")) + } + } + function _l(e, t) { + let r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null; + if (t || (t = C), + !String(t).match(/^m\/44\'\/195\'/)) + throw new Error(Fl); + const n = Aa.fromMnemonic(Tr.fromPhrase(e, null, r), t); + return { + mnemonic: n.mnemonic, + privateKey: n.privateKey, + publicKey: n.signingKey.publicKey, + address: Il(n.privateKey.replace(/^0x/, "")) + } + } + let xl = !1 + , Rl = !1; + const Nl = { + debug: 1, + default: 2, + info: 2, + warning: 3, + error: 4, + off: 5 + }; + let kl = Nl.default + , Ul = null; + const Dl = function() { + try { + const e = []; + if (["NFD", "NFC", "NFKD", "NFKC"].forEach((t=>{ + try { + if ("test" !== "test".normalize(t)) + throw new Error("bad normalize") + } catch (r) { + e.push(t) + } + } + )), + e.length) + throw new Error("missing " + e.join(", ")); + if (String.fromCharCode(233).normalize("NFD") !== String.fromCharCode(101, 769)) + throw new Error("broken implementation") + } catch (e) { + return e.message + } + return null + }(); + var Ll, zl; + !function(e) { + e.DEBUG = "DEBUG", + e.INFO = "INFO", + e.WARNING = "WARNING", + e.ERROR = "ERROR", + e.OFF = "OFF" + }(Ll || (Ll = {})), + function(e) { + e.UNKNOWN_ERROR = "UNKNOWN_ERROR", + e.NOT_IMPLEMENTED = "NOT_IMPLEMENTED", + e.UNSUPPORTED_OPERATION = "UNSUPPORTED_OPERATION", + e.NETWORK_ERROR = "NETWORK_ERROR", + e.SERVER_ERROR = "SERVER_ERROR", + e.TIMEOUT = "TIMEOUT", + e.BUFFER_OVERRUN = "BUFFER_OVERRUN", + e.NUMERIC_FAULT = "NUMERIC_FAULT", + e.MISSING_NEW = "MISSING_NEW", + e.INVALID_ARGUMENT = "INVALID_ARGUMENT", + e.MISSING_ARGUMENT = "MISSING_ARGUMENT", + e.UNEXPECTED_ARGUMENT = "UNEXPECTED_ARGUMENT", + e.CALL_EXCEPTION = "CALL_EXCEPTION", + e.INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS", + e.NONCE_EXPIRED = "NONCE_EXPIRED", + e.REPLACEMENT_UNDERPRICED = "REPLACEMENT_UNDERPRICED", + e.UNPREDICTABLE_GAS_LIMIT = "UNPREDICTABLE_GAS_LIMIT", + e.TRANSACTION_REPLACED = "TRANSACTION_REPLACED", + e.ACTION_REJECTED = "ACTION_REJECTED" + }(zl || (zl = {})); + const jl = "0123456789abcdef"; + class $l { + constructor(e) { + Object.defineProperty(this, "version", { + enumerable: !0, + value: e, + writable: !1 + }) + } + _log(e, t) { + const r = e.toLowerCase(); + null == Nl[r] && this.throwArgumentError("invalid log level name", "logLevel", e), + kl > Nl[r] || console.log.apply(console, t) + } + debug(...e) { + this._log($l.levels.DEBUG, e) + } + info(...e) { + this._log($l.levels.INFO, e) + } + warn(...e) { + this._log($l.levels.WARNING, e) + } + makeError(e, t, r) { + if (Rl) + return this.makeError("censored error", t, {}); + t || (t = $l.errors.UNKNOWN_ERROR), + r || (r = {}); + const n = []; + Object.keys(r).forEach((e=>{ + const t = r[e]; + try { + if (t instanceof Uint8Array) { + let r = ""; + for (let e = 0; e < t.length; e++) + r += jl[t[e] >> 4], + r += jl[15 & t[e]]; + n.push(e + "=Uint8Array(0x" + r + ")") + } else + n.push(e + "=" + JSON.stringify(t)) + } catch (t) { + n.push(e + "=" + JSON.stringify(r[e].toString())) + } + } + )), + n.push(`code=${t}`), + n.push(`version=${this.version}`); + const o = e; + let s = ""; + switch (t) { + case zl.NUMERIC_FAULT: + { + s = "NUMERIC_FAULT"; + const t = e; + switch (t) { + case "overflow": + case "underflow": + case "division-by-zero": + s += "-" + t; + break; + case "negative-power": + case "negative-width": + s += "-unsupported"; + break; + case "unbound-bitwise-result": + s += "-unbound-result" + } + break + } + case zl.CALL_EXCEPTION: + case zl.INSUFFICIENT_FUNDS: + case zl.MISSING_NEW: + case zl.NONCE_EXPIRED: + case zl.REPLACEMENT_UNDERPRICED: + case zl.TRANSACTION_REPLACED: + case zl.UNPREDICTABLE_GAS_LIMIT: + s = t + } + s && (e += " [ See: https://links.ethers.org/v5-errors-" + s + " ]"), + n.length && (e += " (" + n.join(", ") + ")"); + const i = new Error(e); + return i.reason = o, + i.code = t, + Object.keys(r).forEach((function(e) { + i[e] = r[e] + } + )), + i + } + throwError(e, t, r) { + throw this.makeError(e, t, r) + } + throwArgumentError(e, t, r) { + return this.throwError(e, $l.errors.INVALID_ARGUMENT, { + argument: t, + value: r + }) + } + assert(e, t, r, n) { + e || this.throwError(t, r, n) + } + assertArgument(e, t, r, n) { + e || this.throwArgumentError(t, r, n) + } + checkNormalize(e) { + null == e && (e = "platform missing String.prototype.normalize"), + Dl && this.throwError("platform missing String.prototype.normalize", $l.errors.UNSUPPORTED_OPERATION, { + operation: "String.prototype.normalize", + form: Dl + }) + } + checkSafeUint53(e, t) { + "number" == typeof e && (null == t && (t = "value not safe"), + (e < 0 || e >= 9007199254740991) && this.throwError(t, $l.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "out-of-safe-range", + value: e + }), + e % 1 && this.throwError(t, $l.errors.NUMERIC_FAULT, { + operation: "checkSafeInteger", + fault: "non-integer", + value: e + })) + } + checkArgumentCount(e, t, r) { + r = r ? ": " + r : "", + e < t && this.throwError("missing argument" + r, $l.errors.MISSING_ARGUMENT, { + count: e, + expectedCount: t + }), + e > t && this.throwError("too many arguments" + r, $l.errors.UNEXPECTED_ARGUMENT, { + count: e, + expectedCount: t + }) + } + checkNew(e, t) { + e !== Object && null != e || this.throwError("missing new", $l.errors.MISSING_NEW, { + name: t.name + }) + } + checkAbstract(e, t) { + e === t ? this.throwError("cannot instantiate abstract class " + JSON.stringify(t.name) + " directly; use a sub-class", $l.errors.UNSUPPORTED_OPERATION, { + name: e.name, + operation: "new" + }) : e !== Object && null != e || this.throwError("missing new", $l.errors.MISSING_NEW, { + name: t.name + }) + } + static globalLogger() { + return Ul || (Ul = new $l("logger/5.7.0")), + Ul + } + static setCensorship(e, t) { + if (!e && t && this.globalLogger().throwError("cannot permanently disable censorship", $l.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }), + xl) { + if (!e) + return; + this.globalLogger().throwError("error censorship permanent", $l.errors.UNSUPPORTED_OPERATION, { + operation: "setCensorship" + }) + } + Rl = !!e, + xl = !!t + } + static setLogLevel(e) { + const t = Nl[e.toLowerCase()]; + null != t ? kl = t : $l.globalLogger().warn("invalid log level - " + e) + } + static from(e) { + return new $l(e) + } + } + $l.errors = zl, + $l.levels = Ll; + const Vl = new $l("bytes/5.7.0"); + function Gl(e) { + return !!e.toHexString + } + function Hl(e) { + return e.slice || (e.slice = function() { + const t = Array.prototype.slice.call(arguments); + return Hl(new Uint8Array(Array.prototype.slice.apply(e, t))) + } + ), + e + } + function Kl(e) { + return "number" == typeof e && e == e && e % 1 == 0 + } + function Zl(e) { + if (null == e) + return !1; + if (e.constructor === Uint8Array) + return !0; + if ("string" == typeof e) + return !1; + if (!Kl(e.length) || e.length < 0) + return !1; + for (let t = 0; t < e.length; t++) { + const r = e[t]; + if (!Kl(r) || r < 0 || r >= 256) + return !1 + } + return !0 + } + function ql(e, t) { + if (t || (t = {}), + "number" == typeof e) { + Vl.checkSafeUint53(e, "invalid arrayify value"); + const t = []; + for (; e; ) + t.unshift(255 & e), + e = parseInt(String(e / 256)); + return 0 === t.length && t.push(0), + Hl(new Uint8Array(t)) + } + if (t.allowMissingPrefix && "string" == typeof e && "0x" !== e.substring(0, 2) && (e = "0x" + e), + Gl(e) && (e = e.toHexString()), + Yl(e)) { + let r = e.substring(2); + r.length % 2 && ("left" === t.hexPad ? r = "0" + r : "right" === t.hexPad ? r += "0" : Vl.throwArgumentError("hex data is odd-length", "value", e)); + const n = []; + for (let e = 0; e < r.length; e += 2) + n.push(parseInt(r.substring(e, e + 2), 16)); + return Hl(new Uint8Array(n)) + } + return Zl(e) ? Hl(new Uint8Array(e)) : Vl.throwArgumentError("invalid arrayify value", "value", e) + } + function Jl(e) { + const t = e.map((e=>ql(e))) + , r = t.reduce(((e,t)=>e + t.length), 0) + , n = new Uint8Array(r); + return t.reduce(((e,t)=>(n.set(t, e), + e + t.length)), 0), + Hl(n) + } + function Yl(e, t) { + return !("string" != typeof e || !e.match(/^0x[0-9A-Fa-f]*$/) || t && e.length !== 2 + 2 * t) + } + const Xl = "0123456789abcdef"; + function Ql(e, t) { + if (t || (t = {}), + "number" == typeof e) { + Vl.checkSafeUint53(e, "invalid hexlify value"); + let t = ""; + for (; e; ) + t = Xl[15 & e] + t, + e = Math.floor(e / 16); + return t.length ? (t.length % 2 && (t = "0" + t), + "0x" + t) : "0x00" + } + if ("bigint" == typeof e) + return (e = e.toString(16)).length % 2 ? "0x0" + e : "0x" + e; + if (t.allowMissingPrefix && "string" == typeof e && "0x" !== e.substring(0, 2) && (e = "0x" + e), + Gl(e)) + return e.toHexString(); + if (Yl(e)) + return e.length % 2 && ("left" === t.hexPad ? e = "0x0" + e.substring(2) : "right" === t.hexPad ? e += "0" : Vl.throwArgumentError("hex data is odd-length", "value", e)), + e.toLowerCase(); + if (Zl(e)) { + let t = "0x"; + for (let r = 0; r < e.length; r++) { + let n = e[r]; + t += Xl[(240 & n) >> 4] + Xl[15 & n] + } + return t + } + return Vl.throwArgumentError("invalid hexlify value", "value", e) + } + function ed(e, t, r) { + Object.defineProperty(e, t, { + enumerable: !0, + value: r, + writable: !1 + }) + } + new $l("properties/5.7.0"); + const td = "abi/5.7.0"; + var rd = r(3550) + , nd = r.n(rd)().BN; + const od = new $l("bignumber/5.7.0") + , sd = {} + , id = 9007199254740991; + let ad = !1; + class ud { + constructor(e, t) { + e !== sd && od.throwError("cannot call constructor directly; use BigNumber.from", $l.errors.UNSUPPORTED_OPERATION, { + operation: "new (BigNumber)" + }), + this._hex = t, + this._isBigNumber = !0, + Object.freeze(this) + } + fromTwos(e) { + return ld(dd(this).fromTwos(e)) + } + toTwos(e) { + return ld(dd(this).toTwos(e)) + } + abs() { + return "-" === this._hex[0] ? ud.from(this._hex.substring(1)) : this + } + add(e) { + return ld(dd(this).add(dd(e))) + } + sub(e) { + return ld(dd(this).sub(dd(e))) + } + div(e) { + return ud.from(e).isZero() && hd("division-by-zero", "div"), + ld(dd(this).div(dd(e))) + } + mul(e) { + return ld(dd(this).mul(dd(e))) + } + mod(e) { + const t = dd(e); + return t.isNeg() && hd("division-by-zero", "mod"), + ld(dd(this).umod(t)) + } + pow(e) { + const t = dd(e); + return t.isNeg() && hd("negative-power", "pow"), + ld(dd(this).pow(t)) + } + and(e) { + const t = dd(e); + return (this.isNegative() || t.isNeg()) && hd("unbound-bitwise-result", "and"), + ld(dd(this).and(t)) + } + or(e) { + const t = dd(e); + return (this.isNegative() || t.isNeg()) && hd("unbound-bitwise-result", "or"), + ld(dd(this).or(t)) + } + xor(e) { + const t = dd(e); + return (this.isNegative() || t.isNeg()) && hd("unbound-bitwise-result", "xor"), + ld(dd(this).xor(t)) + } + mask(e) { + return (this.isNegative() || e < 0) && hd("negative-width", "mask"), + ld(dd(this).maskn(e)) + } + shl(e) { + return (this.isNegative() || e < 0) && hd("negative-width", "shl"), + ld(dd(this).shln(e)) + } + shr(e) { + return (this.isNegative() || e < 0) && hd("negative-width", "shr"), + ld(dd(this).shrn(e)) + } + eq(e) { + return dd(this).eq(dd(e)) + } + lt(e) { + return dd(this).lt(dd(e)) + } + lte(e) { + return dd(this).lte(dd(e)) + } + gt(e) { + return dd(this).gt(dd(e)) + } + gte(e) { + return dd(this).gte(dd(e)) + } + isNegative() { + return "-" === this._hex[0] + } + isZero() { + return dd(this).isZero() + } + toNumber() { + try { + return dd(this).toNumber() + } catch (e) { + hd("overflow", "toNumber", this.toString()) + } + return null + } + toBigInt() { + try { + return BigInt(this.toString()) + } catch (e) {} + return od.throwError("this platform does not support BigInt", $l.errors.UNSUPPORTED_OPERATION, { + value: this.toString() + }) + } + toString() { + return arguments.length > 0 && (10 === arguments[0] ? ad || (ad = !0, + od.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")) : 16 === arguments[0] ? od.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()", $l.errors.UNEXPECTED_ARGUMENT, {}) : od.throwError("BigNumber.toString does not accept parameters", $l.errors.UNEXPECTED_ARGUMENT, {})), + dd(this).toString(10) + } + toHexString() { + return this._hex + } + toJSON(e) { + return { + type: "BigNumber", + hex: this.toHexString() + } + } + static from(e) { + if (e instanceof ud) + return e; + if ("string" == typeof e) + return e.match(/^-?0x[0-9a-f]+$/i) ? new ud(sd,cd(e)) : e.match(/^-?[0-9]+$/) ? new ud(sd,cd(new nd(e))) : od.throwArgumentError("invalid BigNumber string", "value", e); + if ("number" == typeof e) + return e % 1 && hd("underflow", "BigNumber.from", e), + (e >= id || e <= -id) && hd("overflow", "BigNumber.from", e), + ud.from(String(e)); + const t = e; + if ("bigint" == typeof t) + return ud.from(t.toString()); + if (Zl(t)) + return ud.from(Ql(t)); + if (t) + if (t.toHexString) { + const e = t.toHexString(); + if ("string" == typeof e) + return ud.from(e) + } else { + let e = t._hex; + if (null == e && "BigNumber" === t.type && (e = t.hex), + "string" == typeof e && (Yl(e) || "-" === e[0] && Yl(e.substring(1)))) + return ud.from(e) + } + return od.throwArgumentError("invalid BigNumber value", "value", e) + } + static isBigNumber(e) { + return !(!e || !e._isBigNumber) + } + } + function cd(e) { + if ("string" != typeof e) + return cd(e.toString(16)); + if ("-" === e[0]) + return "-" === (e = e.substring(1))[0] && od.throwArgumentError("invalid hex", "value", e), + "0x00" === (e = cd(e)) ? e : "-" + e; + if ("0x" !== e.substring(0, 2) && (e = "0x" + e), + "0x" === e) + return "0x00"; + for (e.length % 2 && (e = "0x0" + e.substring(2)); e.length > 4 && "0x00" === e.substring(0, 4); ) + e = "0x" + e.substring(4); + return e + } + function ld(e) { + return ud.from(cd(e)) + } + function dd(e) { + const t = ud.from(e).toHexString(); + return "-" === t[0] ? new nd("-" + t.substring(3),16) : new nd(t.substring(2),16) + } + function hd(e, t, r) { + const n = { + fault: e, + operation: t + }; + return null != r && (n.value = r), + od.throwError(e, $l.errors.NUMERIC_FAULT, n) + } + const pd = new $l(td); + class fd { + constructor(e, t, r, n) { + this.name = e, + this.type = t, + this.localName = r, + this.dynamic = n + } + _throwError(e, t) { + pd.throwArgumentError(e, this.localName, t) + } + } + class gd { + constructor(e) { + ed(this, "wordSize", e || 32), + this._data = [], + this._dataLength = 0, + this._padding = new Uint8Array(e) + } + get data() { + return function(e) { + let t = "0x"; + return e.forEach((e=>{ + t += Ql(e).substring(2) + } + )), + t + }(this._data) + } + get length() { + return this._dataLength + } + _writeData(e) { + return this._data.push(e), + this._dataLength += e.length, + e.length + } + appendWriter(e) { + return this._writeData(Jl(e._data)) + } + writeBytes(e) { + let t = ql(e); + const r = t.length % this.wordSize; + return r && (t = Jl([t, this._padding.slice(r)])), + this._writeData(t) + } + _getValue(e) { + let t = ql(ud.from(e)); + return t.length > this.wordSize && pd.throwError("value out-of-bounds", $l.errors.BUFFER_OVERRUN, { + length: this.wordSize, + offset: t.length + }), + t.length % this.wordSize && (t = Jl([this._padding.slice(t.length % this.wordSize), t])), + t + } + writeValue(e) { + return this._writeData(this._getValue(e)) + } + writeUpdatableValue() { + const e = this._data.length; + return this._data.push(this._padding), + this._dataLength += this.wordSize, + t=>{ + this._data[e] = this._getValue(t) + } + } + } + class yd { + constructor(e, t, r, n) { + ed(this, "_data", ql(e)), + ed(this, "wordSize", t || 32), + ed(this, "_coerceFunc", r), + ed(this, "allowLoose", n), + this._offset = 0 + } + get data() { + return Ql(this._data) + } + get consumed() { + return this._offset + } + static coerce(e, t) { + let r = e.match("^u?int([0-9]+)$"); + return r && parseInt(r[1]) <= 48 && (t = t.toNumber()), + t + } + coerce(e, t) { + return this._coerceFunc ? this._coerceFunc(e, t) : yd.coerce(e, t) + } + _peekBytes(e, t, r) { + let n = Math.ceil(t / this.wordSize) * this.wordSize; + return this._offset + n > this._data.length && (this.allowLoose && r && this._offset + t <= this._data.length ? n = t : pd.throwError("data out-of-bounds", $l.errors.BUFFER_OVERRUN, { + length: this._data.length, + offset: this._offset + n + })), + this._data.slice(this._offset, this._offset + n) + } + subReader(e) { + return new yd(this._data.slice(this._offset + e),this.wordSize,this._coerceFunc,this.allowLoose) + } + readBytes(e, t) { + let r = this._peekBytes(0, e, !!t); + return this._offset += r.length, + r.slice(0, e) + } + readValue() { + return ud.from(this.readBytes(this.wordSize)) + } + } + var bd = r(1094) + , md = r.n(bd); + const Td = new $l("address/5.7.0"); + function vd(e) { + Yl(e, 20) || Td.throwArgumentError("invalid address", "address", e); + const t = (e = e.toLowerCase()).substring(2).split("") + , r = new Uint8Array(40); + for (let e = 0; e < 40; e++) + r[e] = t[e].charCodeAt(0); + const n = ql((o = r, + "0x" + md().keccak_256(ql(o)))); + var o; + for (let e = 0; e < 40; e += 2) + n[e >> 1] >> 4 >= 8 && (t[e] = t[e].toUpperCase()), + (15 & n[e >> 1]) >= 8 && (t[e + 1] = t[e + 1].toUpperCase()); + return "0x" + t.join("") + } + const wd = {}; + for (let e = 0; e < 10; e++) + wd[String(e)] = String(e); + for (let e = 0; e < 26; e++) + wd[String.fromCharCode(65 + e)] = String(10 + e); + const Ad = Math.floor((Pd = 9007199254740991, + Math.log10 ? Math.log10(Pd) : Math.log(Pd) / Math.LN10)); + var Pd; + function Wd(e) { + let t = null; + if ("string" != typeof e && Td.throwArgumentError("invalid address", "address", e), + e.match(/^(0x)?[0-9a-fA-F]{40}$/)) + "0x" !== e.substring(0, 2) && (e = "0x" + e), + t = vd(e), + e.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && t !== e && Td.throwArgumentError("bad address checksum", "address", e); + else if (e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) { + for (e.substring(2, 4) !== function(e) { + let t = (e = (e = e.toUpperCase()).substring(4) + e.substring(0, 2) + "00").split("").map((e=>wd[e])).join(""); + for (; t.length >= Ad; ) { + let e = t.substring(0, Ad); + t = parseInt(e, 10) % 97 + t.substring(e.length) + } + let r = String(98 - parseInt(t, 10) % 97); + for (; r.length < 2; ) + r = "0" + r; + return r + }(e) && Td.throwArgumentError("bad icap checksum", "address", e), + r = e.substring(4), + t = new nd(r,36).toString(16); t.length < 40; ) + t = "0" + t; + t = vd("0x" + t) + } else + Td.throwArgumentError("invalid address", "address", e); + var r; + return t + } + class Bd extends fd { + constructor(e) { + super("address", "address", e, !1) + } + defaultValue() { + return "0x0000000000000000000000000000000000000000" + } + encode(e, t) { + try { + t = Wd(t) + } catch (e) { + this._throwError(e.message, t) + } + return e.writeValue(t) + } + decode(e) { + return Wd(function(e, t) { + for ("string" != typeof e ? e = Ql(e) : Yl(e) || Vl.throwArgumentError("invalid hex string", "value", e), + e.length > 2 * t + 2 && Vl.throwArgumentError("value out of range", "value", arguments[1]); e.length < 2 * t + 2; ) + e = "0x0" + e.substring(2); + return e + }(e.readValue().toHexString(), 20)) + } + } + class Cd extends fd { + constructor(e) { + super(e.name, e.type, void 0, e.dynamic), + this.coder = e + } + defaultValue() { + return this.coder.defaultValue() + } + encode(e, t) { + return this.coder.encode(e, t) + } + decode(e) { + return this.coder.decode(e) + } + } + const Ed = new $l(td); + function Md(e, t, r) { + let n = null; + if (Array.isArray(r)) + n = r; + else if (r && "object" == typeof r) { + let e = {}; + n = t.map((t=>{ + const n = t.localName; + return n || Ed.throwError("cannot encode object for signature with missing names", $l.errors.INVALID_ARGUMENT, { + argument: "values", + coder: t, + value: r + }), + e[n] && Ed.throwError("cannot encode object for signature with duplicate names", $l.errors.INVALID_ARGUMENT, { + argument: "values", + coder: t, + value: r + }), + e[n] = !0, + r[n] + } + )) + } else + Ed.throwArgumentError("invalid tuple value", "tuple", r); + t.length !== n.length && Ed.throwArgumentError("types/value length mismatch", "tuple", r); + let o = new gd(e.wordSize) + , s = new gd(e.wordSize) + , i = []; + t.forEach(((e,t)=>{ + let r = n[t]; + if (e.dynamic) { + let t = s.length; + e.encode(s, r); + let n = o.writeUpdatableValue(); + i.push((e=>{ + n(e + t) + } + )) + } else + e.encode(o, r) + } + )), + i.forEach((e=>{ + e(o.length) + } + )); + let a = e.appendWriter(o); + return a += e.appendWriter(s), + a + } + function Id(e, t) { + let r = [] + , n = e.subReader(0); + t.forEach((t=>{ + let o = null; + if (t.dynamic) { + let r = e.readValue() + , s = n.subReader(r.toNumber()); + try { + o = t.decode(s) + } catch (e) { + if (e.code === $l.errors.BUFFER_OVERRUN) + throw e; + o = e, + o.baseType = t.name, + o.name = t.localName, + o.type = t.type + } + } else + try { + o = t.decode(e) + } catch (e) { + if (e.code === $l.errors.BUFFER_OVERRUN) + throw e; + o = e, + o.baseType = t.name, + o.name = t.localName, + o.type = t.type + } + null != o && r.push(o) + } + )); + const o = t.reduce(((e,t)=>{ + const r = t.localName; + return r && (e[r] || (e[r] = 0), + e[r]++), + e + } + ), {}); + t.forEach(((e,t)=>{ + let n = e.localName; + if (!n || 1 !== o[n]) + return; + if ("length" === n && (n = "_length"), + null != r[n]) + return; + const s = r[t]; + s instanceof Error ? Object.defineProperty(r, n, { + enumerable: !0, + get: ()=>{ + throw s + } + }) : r[n] = s + } + )); + for (let e = 0; e < r.length; e++) { + const t = r[e]; + t instanceof Error && Object.defineProperty(r, e, { + enumerable: !0, + get: ()=>{ + throw t + } + }) + } + return Object.freeze(r) + } + class Fd extends fd { + constructor(e, t, r) { + super("array", e.type + "[" + (t >= 0 ? t : "") + "]", r, -1 === t || e.dynamic), + this.coder = e, + this.length = t + } + defaultValue() { + const e = this.coder.defaultValue() + , t = []; + for (let r = 0; r < this.length; r++) + t.push(e); + return t + } + encode(e, t) { + Array.isArray(t) || this._throwError("expected array value", t); + let r = this.length; + -1 === r && (r = t.length, + e.writeValue(t.length)), + Ed.checkArgumentCount(t.length, r, "coder array" + (this.localName ? " " + this.localName : "")); + let n = []; + for (let e = 0; e < t.length; e++) + n.push(this.coder); + return Md(e, n, t) + } + decode(e) { + let t = this.length; + -1 === t && (t = e.readValue().toNumber(), + 32 * t > e._data.length && Ed.throwError("insufficient data length", $l.errors.BUFFER_OVERRUN, { + length: e._data.length, + count: t + })); + let r = []; + for (let e = 0; e < t; e++) + r.push(new Cd(this.coder)); + return e.coerce(this.name, Id(e, r)) + } + } + class Od extends fd { + constructor(e) { + super("bool", "bool", e, !1) + } + defaultValue() { + return !1 + } + encode(e, t) { + return e.writeValue(t ? 1 : 0) + } + decode(e) { + return e.coerce(this.type, !e.readValue().isZero()) + } + } + class Sd extends fd { + constructor(e, t) { + super(e, e, t, !0) + } + defaultValue() { + return "0x" + } + encode(e, t) { + t = ql(t); + let r = e.writeValue(t.length); + return r += e.writeBytes(t), + r + } + decode(e) { + return e.readBytes(e.readValue().toNumber(), !0) + } + } + class _d extends Sd { + constructor(e) { + super("bytes", e) + } + decode(e) { + return e.coerce(this.name, Ql(super.decode(e))) + } + } + class xd extends fd { + constructor(e, t) { + let r = "bytes" + String(e); + super(r, r, t, !1), + this.size = e + } + defaultValue() { + return "0x0000000000000000000000000000000000000000000000000000000000000000".substring(0, 2 + 2 * this.size) + } + encode(e, t) { + let r = ql(t); + return r.length !== this.size && this._throwError("incorrect data length", t), + e.writeBytes(r) + } + decode(e) { + return e.coerce(this.name, Ql(e.readBytes(this.size))) + } + } + class Rd extends fd { + constructor(e) { + super("null", "", e, !1) + } + defaultValue() { + return null + } + encode(e, t) { + return null != t && this._throwError("not null", t), + e.writeBytes([]) + } + decode(e) { + return e.readBytes(0), + e.coerce(this.name, null) + } + } + const Nd = ud.from(-1) + , kd = ud.from(0) + , Ud = ud.from(1) + , Dd = ud.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + class Ld extends fd { + constructor(e, t, r) { + const n = (t ? "int" : "uint") + 8 * e; + super(n, n, r, !1), + this.size = e, + this.signed = t + } + defaultValue() { + return 0 + } + encode(e, t) { + let r = ud.from(t) + , n = Dd.mask(8 * e.wordSize); + if (this.signed) { + let e = n.mask(8 * this.size - 1); + (r.gt(e) || r.lt(e.add(Ud).mul(Nd))) && this._throwError("value out-of-bounds", t) + } else + (r.lt(kd) || r.gt(n.mask(8 * this.size))) && this._throwError("value out-of-bounds", t); + return r = r.toTwos(8 * this.size).mask(8 * this.size), + this.signed && (r = r.fromTwos(8 * this.size).toTwos(8 * e.wordSize)), + e.writeValue(r) + } + decode(e) { + let t = e.readValue().mask(8 * this.size); + return this.signed && (t = t.fromTwos(8 * this.size)), + e.coerce(this.name, t) + } + } + const zd = new $l("strings/5.7.0"); + var jd, $d; + function Vd(e, t, r, n, o) { + if (e === $d.BAD_PREFIX || e === $d.UNEXPECTED_CONTINUE) { + let e = 0; + for (let n = t + 1; n < r.length && r[n] >> 6 == 2; n++) + e++; + return e + } + return e === $d.OVERRUN ? r.length - t - 1 : 0 + } + !function(e) { + e.current = "", + e.NFC = "NFC", + e.NFD = "NFD", + e.NFKC = "NFKC", + e.NFKD = "NFKD" + }(jd || (jd = {})), + function(e) { + e.UNEXPECTED_CONTINUE = "unexpected continuation byte", + e.BAD_PREFIX = "bad codepoint prefix", + e.OVERRUN = "string overrun", + e.MISSING_CONTINUE = "missing continuation byte", + e.OUT_OF_RANGE = "out of UTF-8 range", + e.UTF16_SURROGATE = "UTF-16 surrogate", + e.OVERLONG = "overlong representation" + }($d || ($d = {})); + const Gd = Object.freeze({ + error: function(e, t, r, n, o) { + return zd.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`, "bytes", r) + }, + ignore: Vd, + replace: function(e, t, r, n, o) { + return e === $d.OVERLONG ? (n.push(o), + 0) : (n.push(65533), + Vd(e, t, r)) + } + }); + function Hd(e, t) { + return function(e, t) { + null == t && (t = Gd.error), + e = ql(e); + const r = []; + let n = 0; + for (; n < e.length; ) { + const o = e[n++]; + if (o >> 7 == 0) { + r.push(o); + continue + } + let s = null + , i = null; + if (192 == (224 & o)) + s = 1, + i = 127; + else if (224 == (240 & o)) + s = 2, + i = 2047; + else { + if (240 != (248 & o)) { + n += t(128 == (192 & o) ? $d.UNEXPECTED_CONTINUE : $d.BAD_PREFIX, n - 1, e, r); + continue + } + s = 3, + i = 65535 + } + if (n - 1 + s >= e.length) { + n += t($d.OVERRUN, n - 1, e, r); + continue + } + let a = o & (1 << 8 - s - 1) - 1; + for (let o = 0; o < s; o++) { + let o = e[n]; + if (128 != (192 & o)) { + n += t($d.MISSING_CONTINUE, n, e, r), + a = null; + break + } + a = a << 6 | 63 & o, + n++ + } + null !== a && (a > 1114111 ? n += t($d.OUT_OF_RANGE, n - 1 - s, e, r, a) : a >= 55296 && a <= 57343 ? n += t($d.UTF16_SURROGATE, n - 1 - s, e, r, a) : a <= i ? n += t($d.OVERLONG, n - 1 - s, e, r, a) : r.push(a)) + } + return r + }(e, t).map((e=>e <= 65535 ? String.fromCharCode(e) : (e -= 65536, + String.fromCharCode(55296 + (e >> 10 & 1023), 56320 + (1023 & e))))).join("") + } + class Kd extends Sd { + constructor(e) { + super("string", e) + } + defaultValue() { + return "" + } + encode(e, t) { + return super.encode(e, function(e, t=jd.current) { + t != jd.current && (zd.checkNormalize(), + e = e.normalize(t)); + let r = []; + for (let t = 0; t < e.length; t++) { + const n = e.charCodeAt(t); + if (n < 128) + r.push(n); + else if (n < 2048) + r.push(n >> 6 | 192), + r.push(63 & n | 128); + else if (55296 == (64512 & n)) { + t++; + const o = e.charCodeAt(t); + if (t >= e.length || 56320 != (64512 & o)) + throw new Error("invalid utf-8 string"); + const s = 65536 + ((1023 & n) << 10) + (1023 & o); + r.push(s >> 18 | 240), + r.push(s >> 12 & 63 | 128), + r.push(s >> 6 & 63 | 128), + r.push(63 & s | 128) + } else + r.push(n >> 12 | 224), + r.push(n >> 6 & 63 | 128), + r.push(63 & n | 128) + } + return ql(r) + }(t)) + } + decode(e) { + return Hd(super.decode(e)) + } + } + class Zd extends fd { + constructor(e, t) { + let r = !1; + const n = []; + e.forEach((e=>{ + e.dynamic && (r = !0), + n.push(e.type) + } + )), + super("tuple", "tuple(" + n.join(",") + ")", t, r), + this.coders = e + } + defaultValue() { + const e = []; + this.coders.forEach((t=>{ + e.push(t.defaultValue()) + } + )); + const t = this.coders.reduce(((e,t)=>{ + const r = t.localName; + return r && (e[r] || (e[r] = 0), + e[r]++), + e + } + ), {}); + return this.coders.forEach(((r,n)=>{ + let o = r.localName; + o && 1 === t[o] && ("length" === o && (o = "_length"), + null == e[o] && (e[o] = e[n])) + } + )), + Object.freeze(e) + } + encode(e, t) { + return Md(e, this.coders, t) + } + decode(e) { + return e.coerce(this.name, Id(e, this.coders)) + } + } + const qd = new $l(td) + , Jd = {}; + let Yd = { + calldata: !0, + memory: !0, + storage: !0 + } + , Xd = { + calldata: !0, + memory: !0 + }; + function Qd(e, t) { + if ("bytes" === e || "string" === e) { + if (Yd[t]) + return !0 + } else if ("address" === e) { + if ("payable" === t) + return !0 + } else if ((e.indexOf("[") >= 0 || "tuple" === e) && Xd[t]) + return !0; + return (Yd[t] || "payable" === t) && qd.throwArgumentError("invalid modifier", "name", t), + !1 + } + function eh(e, t) { + for (let r in t) + ed(e, r, t[r]) + } + const th = Object.freeze({ + sighash: "sighash", + minimal: "minimal", + full: "full", + json: "json" + }) + , rh = new RegExp(/^(.*)\[([0-9]*)\]$/); + class nh { + constructor(e, t) { + e !== Jd && qd.throwError("use fromString", $l.errors.UNSUPPORTED_OPERATION, { + operation: "new ParamType()" + }), + eh(this, t); + let r = this.type.match(rh); + eh(this, r ? { + arrayLength: parseInt(r[2] || "-1"), + arrayChildren: nh.fromObject({ + type: r[1], + components: this.components + }), + baseType: "array" + } : { + arrayLength: null, + arrayChildren: null, + baseType: null != this.components ? "tuple" : this.type + }), + this._isParamType = !0, + Object.freeze(this) + } + format(e) { + if (e || (e = th.sighash), + th[e] || qd.throwArgumentError("invalid format type", "format", e), + e === th.json) { + let t = { + type: "tuple" === this.baseType ? "tuple" : this.type, + name: this.name || void 0 + }; + return "boolean" == typeof this.indexed && (t.indexed = this.indexed), + this.components && (t.components = this.components.map((t=>JSON.parse(t.format(e))))), + JSON.stringify(t) + } + let t = ""; + return "array" === this.baseType ? (t += this.arrayChildren.format(e), + t += "[" + (this.arrayLength < 0 ? "" : String(this.arrayLength)) + "]") : "tuple" === this.baseType ? (e !== th.sighash && (t += this.type), + t += "(" + this.components.map((t=>t.format(e))).join(e === th.full ? ", " : ",") + ")") : t += this.type, + e !== th.sighash && (!0 === this.indexed && (t += " indexed"), + e === th.full && this.name && (t += " " + this.name)), + t + } + static from(e, t) { + return "string" == typeof e ? nh.fromString(e, t) : nh.fromObject(e) + } + static fromObject(e) { + return nh.isParamType(e) ? e : new nh(Jd,{ + name: e.name || null, + type: oh(e.type), + indexed: null == e.indexed ? null : !!e.indexed, + components: e.components ? e.components.map(nh.fromObject) : null + }) + } + static fromString(e, t) { + return r = function(e, t) { + let r = e; + function n(t) { + qd.throwArgumentError(`unexpected character at position ${t}`, "param", e) + } + function o(e) { + let r = { + type: "", + name: "", + parent: e, + state: { + allowType: !0 + } + }; + return t && (r.indexed = !1), + r + } + e = e.replace(/\s/g, " "); + let s = { + type: "", + name: "", + state: { + allowType: !0 + } + } + , i = s; + for (let r = 0; r < e.length; r++) { + let s = e[r]; + switch (s) { + case "(": + i.state.allowType && "" === i.type ? i.type = "tuple" : i.state.allowParams || n(r), + i.state.allowType = !1, + i.type = oh(i.type), + i.components = [o(i)], + i = i.components[0]; + break; + case ")": + delete i.state, + "indexed" === i.name && (t || n(r), + i.indexed = !0, + i.name = ""), + Qd(i.type, i.name) && (i.name = ""), + i.type = oh(i.type); + let e = i; + i = i.parent, + i || n(r), + delete e.parent, + i.state.allowParams = !1, + i.state.allowName = !0, + i.state.allowArray = !0; + break; + case ",": + delete i.state, + "indexed" === i.name && (t || n(r), + i.indexed = !0, + i.name = ""), + Qd(i.type, i.name) && (i.name = ""), + i.type = oh(i.type); + let a = o(i.parent); + i.parent.components.push(a), + delete i.parent, + i = a; + break; + case " ": + i.state.allowType && "" !== i.type && (i.type = oh(i.type), + delete i.state.allowType, + i.state.allowName = !0, + i.state.allowParams = !0), + i.state.allowName && "" !== i.name && ("indexed" === i.name ? (t || n(r), + i.indexed && n(r), + i.indexed = !0, + i.name = "") : Qd(i.type, i.name) ? i.name = "" : i.state.allowName = !1); + break; + case "[": + i.state.allowArray || n(r), + i.type += s, + i.state.allowArray = !1, + i.state.allowName = !1, + i.state.readArray = !0; + break; + case "]": + i.state.readArray || n(r), + i.type += s, + i.state.readArray = !1, + i.state.allowArray = !0, + i.state.allowName = !0; + break; + default: + i.state.allowType ? (i.type += s, + i.state.allowParams = !0, + i.state.allowArray = !0) : i.state.allowName ? (i.name += s, + delete i.state.allowArray) : i.state.readArray ? i.type += s : n(r) + } + } + return i.parent && qd.throwArgumentError("unexpected eof", "param", e), + delete s.state, + "indexed" === i.name ? (t || n(r.length - 7), + i.indexed && n(r.length - 7), + i.indexed = !0, + i.name = "") : Qd(i.type, i.name) && (i.name = ""), + s.type = oh(s.type), + s + }(e, !!t), + nh.fromObject({ + name: r.name, + type: r.type, + indexed: r.indexed, + components: r.components + }); + var r + } + static isParamType(e) { + return !(null == e || !e._isParamType) + } + } + function oh(e) { + return e.match(/^uint($|[^1-9])/) ? e = "uint256" + e.substring(4) : e.match(/^int($|[^1-9])/) && (e = "int256" + e.substring(3)), + e + } + const sh = new $l(td) + , ih = new RegExp(/^bytes([0-9]*)$/) + , ah = new RegExp(/^(u?int)([0-9]*)$/); + class uh { + constructor(e) { + ed(this, "coerceFunc", e || null) + } + _getCoder(e) { + switch (e.baseType) { + case "address": + return new Bd(e.name); + case "bool": + return new Od(e.name); + case "string": + return new Kd(e.name); + case "bytes": + return new _d(e.name); + case "array": + return new Fd(this._getCoder(e.arrayChildren),e.arrayLength,e.name); + case "tuple": + return new Zd((e.components || []).map((e=>this._getCoder(e))),e.name); + case "": + return new Rd(e.name) + } + let t = e.type.match(ah); + if (t) { + let r = parseInt(t[2] || "256"); + return (0 === r || r > 256 || r % 8 != 0) && sh.throwArgumentError("invalid " + t[1] + " bit length", "param", e), + new Ld(r / 8,"int" === t[1],e.name) + } + if (t = e.type.match(ih), + t) { + let r = parseInt(t[1]); + return (0 === r || r > 32) && sh.throwArgumentError("invalid bytes length", "param", e), + new xd(r,e.name) + } + return sh.throwArgumentError("invalid type", "type", e.type) + } + _getWordSize() { + return 32 + } + _getReader(e, t) { + return new yd(e,this._getWordSize(),this.coerceFunc,t) + } + _getWriter() { + return new gd(this._getWordSize()) + } + getDefaultValue(e) { + const t = e.map((e=>this._getCoder(nh.from(e)))); + return new Zd(t,"_").defaultValue() + } + encode(e, t) { + e.length !== t.length && sh.throwError("types/values length mismatch", $l.errors.INVALID_ARGUMENT, { + count: { + types: e.length, + values: t.length + }, + value: { + types: e, + values: t + } + }); + const r = e.map((e=>this._getCoder(nh.from(e)))) + , n = new Zd(r,"_") + , o = this._getWriter(); + return n.encode(o, t), + o.data + } + decode(e, t, r) { + const n = e.map((e=>this._getCoder(nh.from(e)))); + return new Zd(n,"_").decode(this._getReader(ql(t), r)) + } + } + new uh; + const ch = new uh; + function lh(e) { + return pf.address.toHex(e).replace(B, "0x") + } + function dh(e) { + if ("[object Object]" !== Object.prototype.toString.call(e) && "[object Array]" !== Object.prototype.toString.call(e)) + return e; + const t = (r = e, + Array.isArray(r) ? [] : {}); + var r; + return Object.keys(e).forEach((r=>t[r] = e[r]instanceof Object && !e[r]._isBigNumber ? dh(e[r]) : e[r])), + t + } + function hh(e, t, r, n) { + if (r && "boolean" != typeof r || (n = r, + r = t, + t = e, + e = []), + n && r.replace(/^0x/, "").length % 64 == 8 && (r = "0x" + r.replace(/^0x/, "").substring(8)), + r.replace(/^0x/, "").length % 64) + throw new Error("The encoded string is not valid. Its length must be a multiple of 64."); + return t = t.map((e=>(/trcToken/.test(e) && (e = e.replace(/trcToken/, "uint256")), + e))), + ch.decode(t, r).reduce(((r,n,o)=>("address" == t[o] && (n = P + n.substr(2).toLowerCase()), + e.length ? r[e[o]] = n : r.push(n), + r)), e.length ? {} : []) + } + function ph(e, t) { + for (let r = 0; r < e.length; r++) + "address" === e[r] && (t[r] = pf.address.toHex(t[r]).replace(B, "0x")); + return ch.encode(e, t) + } + function fh(e) { + const t = e.match(/([a-zA-Z0-9])(\[.*\])/); + return t ? t[2] : "" + } + function gh(e) { + return (fh(e).match(/\]\[/g) || []).length + 1 + } + function yh(e, t) { + const r = [] + , n = e=>e && 0 === e.type.indexOf("tuple") && e.components ? `tuple(${e.components.map((e=>n(e))).join(",")})${fh(e.type)}` : /trcToken/.test(e.type) ? e.type.replace(/trcToken/, "uint256") : e.type + , o = e=>Array.isArray(e) ? (e.forEach(((t,r)=>{ + e[r] = o(t) + } + )), + e) : lh(e) + , s = (e,t,r)=>{ + r > 1 ? t.length && t.forEach((t=>{ + s(e, t, r - 1) + } + )) : t.length && r && t.forEach((t=>{ + i(e, t) + } + )) + } + , i = function() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [] + , t = arguments.length > 1 ? arguments[1] : void 0; + e.length && e.forEach(((e,r)=>{ + const n = e.type; + if (t[r]) + if ("address" === n) + t[r] = lh(t[r]); + else if ("address[" === n.match(/^([^\x5b]*)(\x5b|$)/)[0]) + o(t[r]); + else if (0 === n.indexOf("tuple")) + if (fh(n)) { + const o = gh(n); + s(e.components, t[r], o) + } else + i(e.components, t[r]) + } + )) + }; + if (e.inputs && e.inputs.length) + for (let o = 0; o < e.inputs.length; o++) { + const s = e.inputs[o].type; + "bool" === s && "false" === t[o] && (t[o] = !1), + r.push(0 === s.indexOf("tuple") ? n(e.inputs[o]) : s), + t.length < r.length && t.push("") + } + return i(e.inputs, t), + (e=>{ + for (let t = 0; t < e.length; t++) { + const r = e[t]; + /trcToken/.test(r) && (e[t] = r.replace(/trcToken/, "uint256")) + } + } + )(r), + ch.encode(r, t) + } + function bh(e, t) { + const r = e=>Array.isArray(e) ? (e.forEach(((t,n)=>{ + e[n] = r(t) + } + )), + e) : pf.address.toHex(e) + , n = (e,t,r)=>{ + r > 1 ? t.length && t.forEach((t=>{ + n(e, t, r - 1) + } + )) : t.length && r && t.forEach((t=>{ + s(e, t) + } + )) + } + , o = e=>{ + const t = e.name ? ` ${e.name}` : ""; + return e && 0 === e.type.indexOf("tuple") && e.components ? `tuple(${e.components.map((e=>o(e))).join(",")})${fh(e.type)}${t}` : /trcToken/.test(e.type) ? e.type.replace(/trcToken/, "uint256") + t : e.type + t + } + , s = function() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [] + , t = arguments.length > 1 ? arguments[1] : void 0; + e.length && e.forEach(((e,o)=>{ + const {type: i, name: a} = e; + if (t[o]) + if ("address" === i) + t[o] = pf.address.toHex(t[o]), + a && (t[a] = pf.address.toHex(t[a])); + else if ("address[" === i.match(/^([^\x5b]*)(\x5b|$)/)[0]) + r(t[o]), + a && r(t[a]); + else if (0 === i.indexOf("tuple")) { + if (fh(i)) { + const r = gh(i); + n(e.components, t[o], r) + } else + s(e.components, t[o]); + a && (t[a] = t[o]) + } + } + )) + }; + if (e.outputs && e.outputs.length > 0) { + let r = []; + for (let t = 0; t < e.outputs.length; t++) { + const n = e.outputs[t].type + , s = e.outputs[t].name ? ` ${e.outputs[t].name}` : ""; + r.push(0 === n.indexOf("tuple") ? o(e.outputs[t]) : n + s) + } + (e=>{ + for (let t = 0; t < e.length; t++) { + const r = e[t]; + /^trcToken/.test(r) && (e[t] = r.replace(/^trcToken/, "uint256")) + } + } + )(r), + t && t.length || (t = new Uint8Array(32 * e.outputs.length)); + const n = dh(ch.decode(r, t)); + return s(e.outputs, n), + n + } + return [] + } + const mh = "TRON Signed Message:\n"; + function Th(e) { + return "string" == typeof e && (e = Lt(e)), + Array.isArray(e) && (e = new Uint8Array(e)), + ir(ue([Lt(mh), Lt(String(e.length)), e])) + } + function vh(e, t) { + t.match(/^0x/) || (t = "0x" + t); + const r = new Fn(t) + , n = Th(e) + , o = r.sign(n); + return Eu(o) + } + function wh(e, t) { + return t.match(/^0x/) || (t = "0x" + t), + ll(S(Sn(Th(e), t).replace(/^0x/, P))) + } + const Ah = r(6177) + , {Transaction: Ph, Permission: Wh, Key: Bh} = r(8020) + , {TransferContract: Ch, FreezeBalanceContract: Eh, UnfreezeBalanceContract: Mh, WithdrawBalanceContract: Ih, FreezeBalanceV2Contract: Fh, UnfreezeBalanceV2Contract: Oh, WithdrawExpireUnfreezeContract: Sh, DelegateResourceContract: _h, UnDelegateResourceContract: xh} = r(1791) + , {TransferAssetContract: Rh, ParticipateAssetIssueContract: Nh, AssetIssueContract: kh, UpdateAssetContract: Uh} = r(6439) + , {TriggerSmartContract: Dh, ClearABIContract: Lh, UpdateEnergyLimitContract: zh, UpdateSettingContract: jh, CreateSmartContract: $h, SmartContract: Vh} = r(5171) + , {ResourceCode: Gh} = r(7764) + , {WitnessCreateContract: Hh, VoteWitnessContract: Kh} = r(7084) + , {UpdateBrokerageContract: Zh} = r(672) + , {AccountCreateContract: qh, AccountUpdateContract: Jh, SetAccountIdContract: Yh, AccountPermissionUpdateContract: Xh} = r(956) + , {ProposalCreateContract: Qh, ProposalDeleteContract: ep, ProposalApproveContract: tp} = r(3544) + , {ExchangeCreateContract: rp, ExchangeInjectContract: np, ExchangeWithdrawContract: op, ExchangeTransactionContract: sp} = r(9520) + , ip = e=>e && 0 !== e.length ? new Uint8Array(pf.address.toHex(e).match(/.{1,2}/g).map((e=>parseInt(e, 16)))) : new Uint8Array([]) + , ap = (e,t,r,n)=>{ + let o = new Ah.Any; + o.pack(e.serializeBinary(), "protocol." + r); + let s = new Ph.Contract; + s.setType(t), + s.setParameter(o), + n && s.setPermissionId(n); + let i = new Ph.raw; + i.addContract(s); + let a = new Ph; + return a.setRawData(i), + a + } + , up = (e,t,r)=>{ + switch (e.type) { + case "TransferContract": + return ((e,t)=>{ + const {to_address: r, owner_address: n, amount: o} = e; + let s = new Ch; + return s.setToAddress(ip(r)), + s.setOwnerAddress(ip(n)), + s.setAmount(o), + ap(s, Ph.Contract.ContractType.TRANSFERCONTRACT, "TransferContract", t.Permission_id) + } + )(t, r); + case "TransferAssetContract": + return ((e,t)=>{ + const {to_address: r, owner_address: n, amount: o, asset_name: s} = e; + let i = new Rh; + return i.setToAddress(ip(r)), + i.setOwnerAddress(ip(n)), + i.setAssetName(ip(s.replace(/^0x/, ""))), + i.setAmount(o), + ap(i, Ph.Contract.ContractType.TRANSFERASSETCONTRACT, "TransferAssetContract", t.Permission_id) + } + )(t, r); + case "ParticipateAssetIssueContract": + return ((e,t)=>{ + let r = new Nh; + return r.setToAddress(ip(e.to_address)), + r.setOwnerAddress(ip(e.owner_address)), + r.setAssetName(ip(e.asset_name.replace(/^0x/, ""))), + r.setAmount(e.amount), + ap(r, Ph.Contract.ContractType.PARTICIPATEASSETISSUECONTRACT, "ParticipateAssetIssueContract", t.Permission_id) + } + )(t, r); + case "TriggerSmartContract": + return ((e,t)=>{ + let r = new Dh; + const {owner_address: n, contract_address: o, parameter: s="", function_selector: i, call_value: a, call_token_value: u, token_id: c, data: l} = e; + if (r.setOwnerAddress(ip(n)), + r.setContractAddress(ip(o)), + r.setCallValue(a), + l) + r.setData(ip(l)); + else if (i) { + const e = function(e) { + return (arguments.length > 1 && void 0 !== arguments[1] && !arguments[1] ? "" : "0x") + ir(ethereumjs.Buffer.Buffer.from(e, "utf-8")).toString().substring(2) + }(i).substring(2, 10) + s; + r.setData(ip(e)) + } + return c && r.setTokenId(c), + u && r.setCallTokenValue(u), + ap(r, Ph.Contract.ContractType.TRIGGERSMARTCONTRACT, "TriggerSmartContract", t.Permission_id) + } + )(t, r); + case "FreezeBalanceContract": + return ((e,t)=>{ + let r = new Eh; + const {owner_address: n, frozen_balance: o, frozen_duration: s, resource: i, receiver_address: a} = e; + return r.setOwnerAddress(ip(n)), + r.setFrozenBalance(o), + r.setFrozenDuration(s), + i && r.setResource(Gh[i]), + a && r.setReceiverAddress(ip(a)), + ap(r, Ph.Contract.ContractType.FREEZEBALANCECONTRACT, "FreezeBalanceContract", t.Permission_id) + } + )(t, r); + case "UnfreezeBalanceContract": + return ((e,t)=>{ + let r = new Mh; + const {owner_address: n, resource: o, receiver_address: s} = e; + return r.setOwnerAddress(ip(n)), + o && r.setResource(Gh[o]), + s && r.setReceiverAddress(ip(s)), + ap(r, Ph.Contract.ContractType.UNFREEZEBALANCECONTRACT, "UnfreezeBalanceContract", t.Permission_id) + } + )(t, r); + case "WithdrawBalanceContract": + return ((e,t)=>{ + let r = new Ih; + const {owner_address: n} = e; + return r.setOwnerAddress(ip(n)), + ap(r, Ph.Contract.ContractType.WITHDRAWBALANCECONTRACT, "WithdrawBalanceContract", t.Permission_id) + } + )(t, r); + case "FreezeBalanceV2Contract": + return ((e,t)=>{ + const r = new Fh + , {owner_address: n, frozen_balance: o, resource: s} = e; + return r.setOwnerAddress(ip(n)), + r.setFrozenBalance(o), + r.setResource(Gh[s]), + ap(r, Ph.Contract.ContractType.FREEZEBALANCEV2CONTRACT, "FreezeBalanceV2Contract", t.Permission_id) + } + )(t, r); + case "CancelAllUnfreezeV2Contract": + return ((e,t)=>{ + const r = new Sh + , {owner_address: n} = e; + return r.setOwnerAddress(ip(n)), + ap(r, Ph.Contract.ContractType.CANCELALLUNFREEZEV2CONTRACT, "CancelAllUnfreezeV2Contract", t.Permission_id) + } + )(t, r); + case "UnfreezeBalanceV2Contract": + return ((e,t)=>{ + const r = new Oh + , {owner_address: n, unfreeze_balance: o, resource: s} = e; + return r.setOwnerAddress(ip(n)), + r.setUnfreezeBalance(o), + r.setResource(Gh[s]), + ap(r, Ph.Contract.ContractType.UNFREEZEBALANCEV2CONTRACT, "UnfreezeBalanceV2Contract", t.Permission_id) + } + )(t, r); + case "DelegateResourceContract": + return ((e,t)=>{ + const r = new _h + , {owner_address: n, receiver_address: o, balance: s, resource: i, lock: a=!1, lock_period: u} = e; + return r.setOwnerAddress(ip(n)), + r.setBalance(s), + r.setResource(Gh[i]), + r.setLock(a), + r.setLockPeriod(u), + r.setReceiverAddress(ip(o)), + ap(r, Ph.Contract.ContractType.DELEGATERESOURCECONTRACT, "DelegateResourceContract", t.Permission_id) + } + )(t, r); + case "UnDelegateResourceContract": + return ((e,t)=>{ + const r = new xh + , {owner_address: n, receiver_address: o, balance: s, resource: i} = e; + return r.setOwnerAddress(ip(n)), + r.setBalance(s), + r.setResource(Gh[i]), + r.setReceiverAddress(ip(o)), + ap(r, Ph.Contract.ContractType.UNDELEGATERESOURCECONTRACT, "UnDelegateResourceContract", t.Permission_id) + } + )(t, r); + case "WithdrawExpireUnfreezeContract": + return ((e,t)=>{ + const r = new Sh + , {owner_address: n} = e; + return r.setOwnerAddress(ip(n)), + ap(r, Ph.Contract.ContractType.WITHDRAWEXPIREUNFREEZECONTRACT, "WithdrawExpireUnfreezeContract", t.Permission_id) + } + )(t, r); + case "WitnessCreateContract": + return ((e,t)=>{ + const r = new Hh + , {owner_address: n, url: o} = e; + return r.setOwnerAddress(ip(n)), + r.setUrl(ip(o.replace(/^0x/, ""))), + ap(r, Ph.Contract.ContractType.WITNESSCREATECONTRACT, "WitnessCreateContract", t.Permission_id) + } + )(t, r); + case "VoteWitnessContract": + return ((e,t)=>{ + let r = new Kh; + const {owner_address: n, votes: o} = e; + return r.setOwnerAddress(ip(n)), + o.forEach((e=>{ + let t = new Kh.Vote; + const {vote_address: n, vote_count: o} = e; + t.setVoteAddress(ip(n)); + let s = parseInt(o); + t.setVoteCount(s), + r.addVotes(t) + } + )), + ap(r, Ph.Contract.ContractType.VOTEWITNESSCONTRACT, "VoteWitnessContract", t.Permission_id) + } + )(t, r); + case "CreateSmartContract": + return ((e,t)=>{ + let r = e?.new_contract ? { + owner_address: e.owner_address, + call_token_value: e.call_token_value, + token_id: e.token_id, + ...e.new_contract + } : e + , {owner_address: n, consume_user_resource_percent: o, origin_energy_limit: s, abi: i, bytecode: a="", name: u, parameter: c="", call_value: l, call_token_value: d, token_id: h, origin_address: p} = r + , f = new $h; + f.setOwnerAddress(ip(n)), + h && f.setTokenId(h), + d && f.setCallTokenValue(d); + const g = new Vh; + if (i) { + let e; + e = "string" == typeof i ? JSON.parse(i) : i?.entrys || []; + const t = new Vh.ABI + , r = e=>{ + const t = new Vh.ABI.Entry.Param + , {indexed: r, name: n, type: o} = e; + return !0 === r && t.setIndexed(!0), + t.setName(n), + t.setType(o), + t + } + , n = e.map((e=>{ + const {anonymous: t, constant: n, name: o, inputs: s, outputs: i, type: a, payable: u, stateMutability: c} = e + , l = new Vh.ABI.Entry; + return l.setAnonymous(t), + l.setConstant(n), + l.setName(o), + s && l.setInputsList(s.map((e=>r(e)))), + i && l.setOutputsList(i.map((e=>r(e)))), + a && l.setType(Vh.ABI.Entry.EntryType[a.toUpperCase()]), + l.setPayable(u), + c && l.setStatemutability(Vh.ABI.Entry.StateMutabilityType[c.toUpperCase()]), + l + } + )); + t.setEntrysList(n), + g.setAbi(t) + } + if (l && g.setCallValue(l), + g.setConsumeUserResourcePercent(o), + g.setOriginEnergyLimit(s), + p || (p = n), + g.setOriginAddress(ip(p)), + a) { + const e = a.replace(/^0x/, "") + c.replace(/^0x/, ""); + g.setBytecode(ip(e)) + } + return g.setName(u), + f.setNewContract(g), + ap(f, Ph.Contract.ContractType.CREATESMARTCONTRACT, "CreateSmartContract", t.Permission_id) + } + )(t, r); + case "ClearABIContract": + return ((e,t)=>{ + const {contract_address: r, owner_address: n} = e + , o = new Lh; + return o.setOwnerAddress(ip(n)), + o.setContractAddress(ip(r)), + ap(o, Ph.Contract.ContractType.CLEARABICONTRACT, "ClearABIContract", t.Permission_id) + } + )(t, r); + case "UpdateBrokerageContract": + return ((e,t)=>{ + const {brokerage: r, owner_address: n} = e + , o = new Zh; + return o.setOwnerAddress(ip(n)), + o.setBrokerage(r), + ap(o, Ph.Contract.ContractType.UPDATEBROKERAGECONTRACT, "UpdateBrokerageContract", t.Permission_id) + } + )(t, r); + case "AssetIssueContract": + return ((e,t)=>{ + const {owner_address: r, name: n, abbr: o, description: s, url: i, total_supply: a, trx_num: u, num: c, start_time: l, end_time: d, precision: h, free_asset_net_limit: p, public_free_asset_net_limit: f, public_free_asset_net_usage: g=0, public_latest_free_net_time: y=0, vote_score: b=0, frozen_supply: m} = e; + let T = new kh; + if (T.setOwnerAddress(ip(r)), + n && T.setName(ip(n.replace(/^0x/, ""))), + o && T.setAbbr(ip(o.replace(/^0x/, ""))), + T.setTotalSupply(a), + T.setNum(c), + T.setEndTime(d), + T.setStartTime(l), + T.setTrxNum(u), + T.setVoteScore(b), + h && T.setPrecision(h), + y && T.setPublicLatestFreeNetTime(y), + s && T.setDescription(ip(s.replace(/^0x/, ""))), + i && T.setUrl(ip(i.replace(/^0x/, ""))), + T.setPublicFreeAssetNetUsage(g), + T.setFreeAssetNetLimit(p), + T.setPublicFreeAssetNetLimit(f), + m) { + let e = new kh.FrozenSupply; + e.setFrozenAmount(m.length ? m[0].frozen_amount : m.frozen_amount), + e.setFrozenDays(m.length ? m[0].frozen_days : m.frozen_days), + T.addFrozenSupply(e) + } + return ap(T, Ph.Contract.ContractType.ASSETISSUECONTRACT, "AssetIssueContract", t.Permission_id) + } + )(t, r); + case "AccountCreateContract": + return ((e,t)=>{ + let r = new qh; + const {account_address: n, owner_address: o} = e; + return r.setOwnerAddress(ip(o)), + r.setAccountAddress(ip(n.replace(/^0x/, ""))), + ap(r, Ph.Contract.ContractType.ACCOUNTCREATECONTRACT, "AccountCreateContract", t.Permission_id) + } + )(t, r); + case "AccountUpdateContract": + return ((e,t)=>{ + let r = new Jh; + const {account_name: n, owner_address: o} = e; + return r.setOwnerAddress(ip(o)), + r.setAccountName(ip(n.replace(/^0x/, ""))), + ap(r, Ph.Contract.ContractType.ACCOUNTUPDATECONTRACT, "AccountUpdateContract", t.Permission_id) + } + )(t, r); + case "SetAccountIdContract": + return ((e,t)=>{ + let r = new Yh; + const {account_id: n, owner_address: o} = e; + return r.setOwnerAddress(ip(o)), + r.setAccountId(ip(n.replace(/^0x/, ""))), + ap(r, Ph.Contract.ContractType.SETACCOUNTIDCONTRACT, "SetAccountIdContract", t.Permission_id) + } + )(t, r); + case "ProposalCreateContract": + return ((e,t)=>{ + let r = new Qh; + const {owner_address: n, parameters: o} = e; + return r.setOwnerAddress(ip(n)), + o.forEach((e=>{ + r.getParametersMap().set(e.key, e.value) + } + )), + ap(r, Ph.Contract.ContractType.PROPOSALCREATECONTRACT, "ProposalCreateContract", t.Permission_id) + } + )(t, r); + case "ProposalDeleteContract": + return ((e,t)=>{ + let r = new ep; + const {owner_address: n, proposal_id: o} = e; + return r.setOwnerAddress(ip(n)), + r.setProposalId(o), + ap(r, Ph.Contract.ContractType.PROPOSALDELETECONTRACT, "ProposalDeleteContract", t.Permission_id) + } + )(t, r); + case "ProposalApproveContract": + return ((e,t)=>{ + let r = new tp; + const {owner_address: n, proposal_id: o, is_add_approval: s} = e; + return r.setOwnerAddress(ip(n)), + r.setProposalId(o), + r.setIsAddApproval(s), + ap(r, Ph.Contract.ContractType.PROPOSALAPPROVECONTRACT, "ProposalApproveContract", t.Permission_id) + } + )(t, r); + case "ExchangeCreateContract": + return ((e,t)=>{ + const r = new rp + , {owner_address: n, first_token_id: o, first_token_balance: s, second_token_id: i, second_token_balance: a} = e; + return r.setOwnerAddress(ip(n)), + r.setFirstTokenId(ip(o.replace(/^0x/, ""))), + r.setFirstTokenBalance(s), + r.setSecondTokenId(ip(i.replace(/^0x/, ""))), + r.setSecondTokenBalance(a), + ap(r, Ph.Contract.ContractType.EXCHANGECREATECONTRACT, "ExchangeCreateContract", t.Permission_id) + } + )(t, r); + case "ExchangeInjectContract": + return ((e,t)=>{ + const r = new np + , {owner_address: n, exchange_id: o, token_id: s, quant: i} = e; + return r.setOwnerAddress(ip(n)), + r.setExchangeId(o), + r.setTokenId(ip(s.replace(/^0x/, ""))), + r.setQuant(i), + ap(r, Ph.Contract.ContractType.EXCHANGEINJECTCONTRACT, "ExchangeInjectContract", t.Permission_id) + } + )(t, r); + case "ExchangeWithdrawContract": + return ((e,t)=>{ + const r = new op + , {owner_address: n, exchange_id: o, token_id: s, quant: i} = e; + return r.setOwnerAddress(ip(n)), + r.setExchangeId(o), + r.setTokenId(ip(s.replace(/^0x/, ""))), + r.setQuant(i), + ap(r, Ph.Contract.ContractType.EXCHANGEWITHDRAWCONTRACT, "ExchangeWithdrawContract", t.Permission_id) + } + )(t, r); + case "ExchangeTransactionContract": + return ((e,t)=>{ + const r = new sp + , {owner_address: n, exchange_id: o, token_id: s, quant: i, expected: a} = e; + return r.setOwnerAddress(ip(n)), + r.setExchangeId(o), + r.setTokenId(ip(s.replace(/^0x/, ""))), + r.setQuant(i), + r.setExpected(a), + ap(r, Ph.Contract.ContractType.EXCHANGETRANSACTIONCONTRACT, "ExchangeTransactionContract", t.Permission_id) + } + )(t, r); + case "UpdateSettingContract": + return ((e,t)=>{ + const r = new jh + , {owner_address: n, contract_address: o, consume_user_resource_percent: s} = e; + return r.setOwnerAddress(ip(n)), + r.setContractAddress(ip(o)), + r.setConsumeUserResourcePercent(s), + ap(r, Ph.Contract.ContractType.UPDATESETTINGCONTRACT, "UpdateSettingContract", t.Permission_id) + } + )(t, r); + case "UpdateEnergyLimitContract": + return ((e,t)=>{ + const r = new zh + , {owner_address: n, contract_address: o, origin_energy_limit: s} = e; + return r.setOwnerAddress(ip(n)), + r.setContractAddress(ip(o)), + r.setOriginEnergyLimit(s), + ap(r, Ph.Contract.ContractType.UPDATEENERGYLIMITCONTRACT, "UpdateEnergyLimitContract", t.Permission_id) + } + )(t, r); + case "AccountPermissionUpdateContract": + return ((e,t)=>{ + const r = new Xh + , {owner_address: n, owner: o, witness: s, actives: i} = e; + r.setOwnerAddress(ip(n)); + const a = e=>{ + const t = new Wh + , {type: r, id: n, permission_name: o, threshold: s, parentId: i, operations: a, keys: u} = e; + return t.setType((e=>isNaN(e) ? "Active" === e ? 2 : "Witness" === e ? 1 : 0 : e)(r)), + t.setId(n), + t.setPermissionName(o), + t.setThreshold(s), + i && t.setParentId(i), + a && t.setOperations(ip(a)), + u && t.setKeysList(u.map((e=>{ + const t = new Bh; + return t.setAddress(ip(e.address)), + t.setWeight(e.weight), + t + } + ))), + t + } + ; + return o && r.setOwner(a(o)), + s && r.setWitness(a(s)), + i && (Array.isArray(i) ? r.setActivesList(i.map((e=>a(e)))) : r.setActivesList([a(i)])), + ap(r, Ph.Contract.ContractType.ACCOUNTPERMISSIONUPDATECONTRACT, "AccountPermissionUpdateContract", t.Permission_id) + } + )(t, r); + case "UpdateAssetContract": + return ((e,t)=>{ + const r = new Uh + , {owner_address: n, description: o, url: s, new_limit: i, new_public_limit: a} = e; + return r.setOwnerAddress(ip(n)), + o && r.setDescription(ip(o.replace(/^0x/, ""))), + s && r.setUrl(ip(s.replace(/^0x/, ""))), + i && r.setNewLimit(i), + a && r.setNewPublicLimit(a), + ap(r, Ph.Contract.ContractType.UPDATEASSETCONTRACT, "UpdateAssetContract", t.Permission_id) + } + )(t, r) + } + } + , cp = e=>{ + const t = e.raw_data + , r = t.contract[0] + , n = r.parameter.value + , o = { + Permission_id: r.Permission_id + } + , s = up(r, n, o) + , i = s.getRawData(); + return i.setRefBlockBytes(ip(t.ref_block_bytes)), + i.setRefBlockHash(ip(t.ref_block_hash)), + t.data && i.setData(ip(t.data)), + t.fee_limit && i.setFeeLimit(t.fee_limit), + t.expiration && i.setExpiration(t.expiration), + t.timestamp && i.setTimestamp(t.timestamp), + s.setRawData(i), + s + } + , lp = function(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; + const n = e.raw_data + , o = n.contract[0] + , s = up(o, t, { + Permission_id: t?.Permission_id + }) + , i = s.getRawData(); + return i.setRefBlockBytes(ip(n.ref_block_bytes)), + i.setRefBlockHash(ip(n.ref_block_hash)), + r.data && i.setData(ip(r.data.replace(/^0x/, ""))), + (r.fee_limit || t.fee_limit) && i.setFeeLimit(r.fee_limit || t.fee_limit), + n.expiration && i.setExpiration(n.expiration), + n.timestamp && i.setTimestamp(n.timestamp), + s.setRawData(i), + s + } + , dp = (e,t)=>{ + const r = t.getRawData().serializeBinary() + , n = T(r) + , o = St(r); + return n.toLowerCase() === e.raw_data_hex.toLowerCase() && o.replace(/^0x/, "").toLowerCase() === e.txID.replace(/^0x/, "").toLowerCase() + } + , hp = e=>T(e.getRawData().serializeBinary()) + , pp = e=>{ + const t = cp(e); + return dp(e, t) + } + , fp = (e,t,r)=>{ + const n = lp(e, t, r); + return dp(e, n) + } + , gp = e=>St(e.getRawData().serializeBinary()); + var yp = r(8966) + , bp = r.n(yp) + , mp = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i + , Tp = Math.ceil + , vp = Math.floor + , wp = "[BigNumber Error] " + , Ap = wp + "Number primitive has more than 15 significant digits: " + , Pp = 1e14 + , Wp = 14 + , Bp = 9007199254740991 + , Cp = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13] + , Ep = 1e7 + , Mp = 1e9; + function Ip(e) { + var t = 0 | e; + return e > 0 || e === t ? t : t - 1 + } + function Fp(e) { + for (var t, r, n = 1, o = e.length, s = e[0] + ""; n < o; ) { + for (t = e[n++] + "", + r = Wp - t.length; r--; t = "0" + t) + ; + s += t + } + for (o = s.length; 48 === s.charCodeAt(--o); ) + ; + return s.slice(0, o + 1 || 1) + } + function Op(e, t) { + var r, n, o = e.c, s = t.c, i = e.s, a = t.s, u = e.e, c = t.e; + if (!i || !a) + return null; + if (r = o && !o[0], + n = s && !s[0], + r || n) + return r ? n ? 0 : -a : i; + if (i != a) + return i; + if (r = i < 0, + n = u == c, + !o || !s) + return n ? 0 : !o ^ r ? 1 : -1; + if (!n) + return u > c ^ r ? 1 : -1; + for (a = (u = o.length) < (c = s.length) ? u : c, + i = 0; i < a; i++) + if (o[i] != s[i]) + return o[i] > s[i] ^ r ? 1 : -1; + return u == c ? 0 : u > c ^ r ? 1 : -1 + } + function Sp(e, t, r, n) { + if (e < t || e > r || e !== vp(e)) + throw Error(wp + (n || "Argument") + ("number" == typeof e ? e < t || e > r ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e)) + } + function _p(e) { + var t = e.c.length - 1; + return Ip(e.e / Wp) == t && e.c[t] % 2 != 0 + } + function xp(e, t) { + return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (t < 0 ? "e" : "e+") + t + } + function Rp(e, t, r) { + var n, o; + if (t < 0) { + for (o = r + "."; ++t; o += r) + ; + e = o + e + } else if (++t > (n = e.length)) { + for (o = r, + t -= n; --t; o += r) + ; + e += o + } else + t < n && (e = e.slice(0, t) + "." + e.slice(t)); + return e + } + var Np = function e(t) { + var r, n, o, s, i, a, u, c, l, d, h = C.prototype = { + constructor: C, + toString: null, + valueOf: null + }, p = new C(1), f = 20, g = 4, y = -7, b = 21, m = -1e7, T = 1e7, v = !1, w = 1, A = 0, P = { + prefix: "", + groupSize: 3, + secondaryGroupSize: 0, + groupSeparator: ",", + decimalSeparator: ".", + fractionGroupSize: 0, + fractionGroupSeparator: " ", + suffix: "" + }, W = "0123456789abcdefghijklmnopqrstuvwxyz", B = !0; + function C(e, t) { + var r, s, i, a, u, c, l, d, h = this; + if (!(h instanceof C)) + return new C(e,t); + if (null == t) { + if (e && !0 === e._isBigNumber) + return h.s = e.s, + void (!e.c || e.e > T ? h.c = h.e = null : e.e < m ? h.c = [h.e = 0] : (h.e = e.e, + h.c = e.c.slice())); + if ((c = "number" == typeof e) && 0 * e == 0) { + if (h.s = 1 / e < 0 ? (e = -e, + -1) : 1, + e === ~~e) { + for (a = 0, + u = e; u >= 10; u /= 10, + a++) + ; + return void (a > T ? h.c = h.e = null : (h.e = a, + h.c = [e])) + } + d = String(e) + } else { + if (!mp.test(d = String(e))) + return o(h, d, c); + h.s = 45 == d.charCodeAt(0) ? (d = d.slice(1), + -1) : 1 + } + (a = d.indexOf(".")) > -1 && (d = d.replace(".", "")), + (u = d.search(/e/i)) > 0 ? (a < 0 && (a = u), + a += +d.slice(u + 1), + d = d.substring(0, u)) : a < 0 && (a = d.length) + } else { + if (Sp(t, 2, W.length, "Base"), + 10 == t && B) + return F(h = new C(e), f + h.e + 1, g); + if (d = String(e), + c = "number" == typeof e) { + if (0 * e != 0) + return o(h, d, c, t); + if (h.s = 1 / e < 0 ? (d = d.slice(1), + -1) : 1, + C.DEBUG && d.replace(/^0\.0*|\./, "").length > 15) + throw Error(Ap + e) + } else + h.s = 45 === d.charCodeAt(0) ? (d = d.slice(1), + -1) : 1; + for (r = W.slice(0, t), + a = u = 0, + l = d.length; u < l; u++) + if (r.indexOf(s = d.charAt(u)) < 0) { + if ("." == s) { + if (u > a) { + a = l; + continue + } + } else if (!i && (d == d.toUpperCase() && (d = d.toLowerCase()) || d == d.toLowerCase() && (d = d.toUpperCase()))) { + i = !0, + u = -1, + a = 0; + continue + } + return o(h, String(e), c, t) + } + c = !1, + (a = (d = n(d, t, 10, h.s)).indexOf(".")) > -1 ? d = d.replace(".", "") : a = d.length + } + for (u = 0; 48 === d.charCodeAt(u); u++) + ; + for (l = d.length; 48 === d.charCodeAt(--l); ) + ; + if (d = d.slice(u, ++l)) { + if (l -= u, + c && C.DEBUG && l > 15 && (e > Bp || e !== vp(e))) + throw Error(Ap + h.s * e); + if ((a = a - u - 1) > T) + h.c = h.e = null; + else if (a < m) + h.c = [h.e = 0]; + else { + if (h.e = a, + h.c = [], + u = (a + 1) % Wp, + a < 0 && (u += Wp), + u < l) { + for (u && h.c.push(+d.slice(0, u)), + l -= Wp; u < l; ) + h.c.push(+d.slice(u, u += Wp)); + u = Wp - (d = d.slice(u)).length + } else + u -= l; + for (; u--; d += "0") + ; + h.c.push(+d) + } + } else + h.c = [h.e = 0] + } + function E(e, t, r, n) { + var o, s, i, a, u; + if (null == r ? r = g : Sp(r, 0, 8), + !e.c) + return e.toString(); + if (o = e.c[0], + i = e.e, + null == t) + u = Fp(e.c), + u = 1 == n || 2 == n && (i <= y || i >= b) ? xp(u, i) : Rp(u, i, "0"); + else if (s = (e = F(new C(e), t, r)).e, + a = (u = Fp(e.c)).length, + 1 == n || 2 == n && (t <= s || s <= y)) { + for (; a < t; u += "0", + a++) + ; + u = xp(u, s) + } else if (t -= i, + u = Rp(u, s, "0"), + s + 1 > a) { + if (--t > 0) + for (u += "."; t--; u += "0") + ; + } else if ((t += s - a) > 0) + for (s + 1 == a && (u += "."); t--; u += "0") + ; + return e.s < 0 && o ? "-" + u : u + } + function M(e, t) { + for (var r, n, o = 1, s = new C(e[0]); o < e.length; o++) + (!(n = new C(e[o])).s || (r = Op(s, n)) === t || 0 === r && s.s === t) && (s = n); + return s + } + function I(e, t, r) { + for (var n = 1, o = t.length; !t[--o]; t.pop()) + ; + for (o = t[0]; o >= 10; o /= 10, + n++) + ; + return (r = n + r * Wp - 1) > T ? e.c = e.e = null : r < m ? e.c = [e.e = 0] : (e.e = r, + e.c = t), + e + } + function F(e, t, r, n) { + var o, s, i, a, u, c, l, d = e.c, h = Cp; + if (d) { + e: { + for (o = 1, + a = d[0]; a >= 10; a /= 10, + o++) + ; + if ((s = t - o) < 0) + s += Wp, + i = t, + u = d[c = 0], + l = vp(u / h[o - i - 1] % 10); + else if ((c = Tp((s + 1) / Wp)) >= d.length) { + if (!n) + break e; + for (; d.length <= c; d.push(0)) + ; + u = l = 0, + o = 1, + i = (s %= Wp) - Wp + 1 + } else { + for (u = a = d[c], + o = 1; a >= 10; a /= 10, + o++) + ; + l = (i = (s %= Wp) - Wp + o) < 0 ? 0 : vp(u / h[o - i - 1] % 10) + } + if (n = n || t < 0 || null != d[c + 1] || (i < 0 ? u : u % h[o - i - 1]), + n = r < 4 ? (l || n) && (0 == r || r == (e.s < 0 ? 3 : 2)) : l > 5 || 5 == l && (4 == r || n || 6 == r && (s > 0 ? i > 0 ? u / h[o - i] : 0 : d[c - 1]) % 10 & 1 || r == (e.s < 0 ? 8 : 7)), + t < 1 || !d[0]) + return d.length = 0, + n ? (t -= e.e + 1, + d[0] = h[(Wp - t % Wp) % Wp], + e.e = -t || 0) : d[0] = e.e = 0, + e; + if (0 == s ? (d.length = c, + a = 1, + c--) : (d.length = c + 1, + a = h[Wp - s], + d[c] = i > 0 ? vp(u / h[o - i] % h[i]) * a : 0), + n) + for (; ; ) { + if (0 == c) { + for (s = 1, + i = d[0]; i >= 10; i /= 10, + s++) + ; + for (i = d[0] += a, + a = 1; i >= 10; i /= 10, + a++) + ; + s != a && (e.e++, + d[0] == Pp && (d[0] = 1)); + break + } + if (d[c] += a, + d[c] != Pp) + break; + d[c--] = 0, + a = 1 + } + for (s = d.length; 0 === d[--s]; d.pop()) + ; + } + e.e > T ? e.c = e.e = null : e.e < m && (e.c = [e.e = 0]) + } + return e + } + function O(e) { + var t, r = e.e; + return null === r ? e.toString() : (t = Fp(e.c), + t = r <= y || r >= b ? xp(t, r) : Rp(t, r, "0"), + e.s < 0 ? "-" + t : t) + } + return C.clone = e, + C.ROUND_UP = 0, + C.ROUND_DOWN = 1, + C.ROUND_CEIL = 2, + C.ROUND_FLOOR = 3, + C.ROUND_HALF_UP = 4, + C.ROUND_HALF_DOWN = 5, + C.ROUND_HALF_EVEN = 6, + C.ROUND_HALF_CEIL = 7, + C.ROUND_HALF_FLOOR = 8, + C.EUCLID = 9, + C.config = C.set = function(e) { + var t, r; + if (null != e) { + if ("object" != typeof e) + throw Error(wp + "Object expected: " + e); + if (e.hasOwnProperty(t = "DECIMAL_PLACES") && (Sp(r = e[t], 0, Mp, t), + f = r), + e.hasOwnProperty(t = "ROUNDING_MODE") && (Sp(r = e[t], 0, 8, t), + g = r), + e.hasOwnProperty(t = "EXPONENTIAL_AT") && ((r = e[t]) && r.pop ? (Sp(r[0], -Mp, 0, t), + Sp(r[1], 0, Mp, t), + y = r[0], + b = r[1]) : (Sp(r, -Mp, Mp, t), + y = -(b = r < 0 ? -r : r))), + e.hasOwnProperty(t = "RANGE")) + if ((r = e[t]) && r.pop) + Sp(r[0], -Mp, -1, t), + Sp(r[1], 1, Mp, t), + m = r[0], + T = r[1]; + else { + if (Sp(r, -Mp, Mp, t), + !r) + throw Error(wp + t + " cannot be zero: " + r); + m = -(T = r < 0 ? -r : r) + } + if (e.hasOwnProperty(t = "CRYPTO")) { + if ((r = e[t]) !== !!r) + throw Error(wp + t + " not true or false: " + r); + if (r) { + if ("undefined" == typeof crypto || !crypto || !crypto.getRandomValues && !crypto.randomBytes) + throw v = !r, + Error(wp + "crypto unavailable"); + v = r + } else + v = r + } + if (e.hasOwnProperty(t = "MODULO_MODE") && (Sp(r = e[t], 0, 9, t), + w = r), + e.hasOwnProperty(t = "POW_PRECISION") && (Sp(r = e[t], 0, Mp, t), + A = r), + e.hasOwnProperty(t = "FORMAT")) { + if ("object" != typeof (r = e[t])) + throw Error(wp + t + " not an object: " + r); + P = r + } + if (e.hasOwnProperty(t = "ALPHABET")) { + if ("string" != typeof (r = e[t]) || /^.?$|[+\-.\s]|(.).*\1/.test(r)) + throw Error(wp + t + " invalid: " + r); + B = "0123456789" == r.slice(0, 10), + W = r + } + } + return { + DECIMAL_PLACES: f, + ROUNDING_MODE: g, + EXPONENTIAL_AT: [y, b], + RANGE: [m, T], + CRYPTO: v, + MODULO_MODE: w, + POW_PRECISION: A, + FORMAT: P, + ALPHABET: W + } + } + , + C.isBigNumber = function(e) { + if (!e || !0 !== e._isBigNumber) + return !1; + if (!C.DEBUG) + return !0; + var t, r, n = e.c, o = e.e, s = e.s; + e: if ("[object Array]" == {}.toString.call(n)) { + if ((1 === s || -1 === s) && o >= -Mp && o <= Mp && o === vp(o)) { + if (0 === n[0]) { + if (0 === o && 1 === n.length) + return !0; + break e + } + if ((t = (o + 1) % Wp) < 1 && (t += Wp), + String(n[0]).length == t) { + for (t = 0; t < n.length; t++) + if ((r = n[t]) < 0 || r >= Pp || r !== vp(r)) + break e; + if (0 !== r) + return !0 + } + } + } else if (null === n && null === o && (null === s || 1 === s || -1 === s)) + return !0; + throw Error(wp + "Invalid BigNumber: " + e) + } + , + C.maximum = C.max = function() { + return M(arguments, -1) + } + , + C.minimum = C.min = function() { + return M(arguments, 1) + } + , + C.random = (s = 9007199254740992, + i = Math.random() * s & 2097151 ? function() { + return vp(Math.random() * s) + } + : function() { + return 8388608 * (1073741824 * Math.random() | 0) + (8388608 * Math.random() | 0) + } + , + function(e) { + var t, r, n, o, s, a = 0, u = [], c = new C(p); + if (null == e ? e = f : Sp(e, 0, Mp), + o = Tp(e / Wp), + v) + if (crypto.getRandomValues) { + for (t = crypto.getRandomValues(new Uint32Array(o *= 2)); a < o; ) + (s = 131072 * t[a] + (t[a + 1] >>> 11)) >= 9e15 ? (r = crypto.getRandomValues(new Uint32Array(2)), + t[a] = r[0], + t[a + 1] = r[1]) : (u.push(s % 1e14), + a += 2); + a = o / 2 + } else { + if (!crypto.randomBytes) + throw v = !1, + Error(wp + "crypto unavailable"); + for (t = crypto.randomBytes(o *= 7); a < o; ) + (s = 281474976710656 * (31 & t[a]) + 1099511627776 * t[a + 1] + 4294967296 * t[a + 2] + 16777216 * t[a + 3] + (t[a + 4] << 16) + (t[a + 5] << 8) + t[a + 6]) >= 9e15 ? crypto.randomBytes(7).copy(t, a) : (u.push(s % 1e14), + a += 7); + a = o / 7 + } + if (!v) + for (; a < o; ) + (s = i()) < 9e15 && (u[a++] = s % 1e14); + for (o = u[--a], + e %= Wp, + o && e && (s = Cp[Wp - e], + u[a] = vp(o / s) * s); 0 === u[a]; u.pop(), + a--) + ; + if (a < 0) + u = [n = 0]; + else { + for (n = -1; 0 === u[0]; u.splice(0, 1), + n -= Wp) + ; + for (a = 1, + s = u[0]; s >= 10; s /= 10, + a++) + ; + a < Wp && (n -= Wp - a) + } + return c.e = n, + c.c = u, + c + } + ), + C.sum = function() { + for (var e = 1, t = arguments, r = new C(t[0]); e < t.length; ) + r = r.plus(t[e++]); + return r + } + , + n = function() { + var e = "0123456789"; + function t(e, t, r, n) { + for (var o, s, i = [0], a = 0, u = e.length; a < u; ) { + for (s = i.length; s--; i[s] *= t) + ; + for (i[0] += n.indexOf(e.charAt(a++)), + o = 0; o < i.length; o++) + i[o] > r - 1 && (null == i[o + 1] && (i[o + 1] = 0), + i[o + 1] += i[o] / r | 0, + i[o] %= r) + } + return i.reverse() + } + return function(n, o, s, i, a) { + var u, c, l, d, h, p, y, b, m = n.indexOf("."), T = f, v = g; + for (m >= 0 && (d = A, + A = 0, + n = n.replace(".", ""), + p = (b = new C(o)).pow(n.length - m), + A = d, + b.c = t(Rp(Fp(p.c), p.e, "0"), 10, s, e), + b.e = b.c.length), + l = d = (y = t(n, o, s, a ? (u = W, + e) : (u = e, + W))).length; 0 == y[--d]; y.pop()) + ; + if (!y[0]) + return u.charAt(0); + if (m < 0 ? --l : (p.c = y, + p.e = l, + p.s = i, + y = (p = r(p, b, T, v, s)).c, + h = p.r, + l = p.e), + m = y[c = l + T + 1], + d = s / 2, + h = h || c < 0 || null != y[c + 1], + h = v < 4 ? (null != m || h) && (0 == v || v == (p.s < 0 ? 3 : 2)) : m > d || m == d && (4 == v || h || 6 == v && 1 & y[c - 1] || v == (p.s < 0 ? 8 : 7)), + c < 1 || !y[0]) + n = h ? Rp(u.charAt(1), -T, u.charAt(0)) : u.charAt(0); + else { + if (y.length = c, + h) + for (--s; ++y[--c] > s; ) + y[c] = 0, + c || (++l, + y = [1].concat(y)); + for (d = y.length; !y[--d]; ) + ; + for (m = 0, + n = ""; m <= d; n += u.charAt(y[m++])) + ; + n = Rp(n, l, u.charAt(0)) + } + return n + } + }(), + r = function() { + function e(e, t, r) { + var n, o, s, i, a = 0, u = e.length, c = t % Ep, l = t / Ep | 0; + for (e = e.slice(); u--; ) + a = ((o = c * (s = e[u] % Ep) + (n = l * s + (i = e[u] / Ep | 0) * c) % Ep * Ep + a) / r | 0) + (n / Ep | 0) + l * i, + e[u] = o % r; + return a && (e = [a].concat(e)), + e + } + function t(e, t, r, n) { + var o, s; + if (r != n) + s = r > n ? 1 : -1; + else + for (o = s = 0; o < r; o++) + if (e[o] != t[o]) { + s = e[o] > t[o] ? 1 : -1; + break + } + return s + } + function r(e, t, r, n) { + for (var o = 0; r--; ) + e[r] -= o, + o = e[r] < t[r] ? 1 : 0, + e[r] = o * n + e[r] - t[r]; + for (; !e[0] && e.length > 1; e.splice(0, 1)) + ; + } + return function(n, o, s, i, a) { + var u, c, l, d, h, p, f, g, y, b, m, T, v, w, A, P, W, B = n.s == o.s ? 1 : -1, E = n.c, M = o.c; + if (!(E && E[0] && M && M[0])) + return new C(n.s && o.s && (E ? !M || E[0] != M[0] : M) ? E && 0 == E[0] || !M ? 0 * B : B / 0 : NaN); + for (y = (g = new C(B)).c = [], + B = s + (c = n.e - o.e) + 1, + a || (a = Pp, + c = Ip(n.e / Wp) - Ip(o.e / Wp), + B = B / Wp | 0), + l = 0; M[l] == (E[l] || 0); l++) + ; + if (M[l] > (E[l] || 0) && c--, + B < 0) + y.push(1), + d = !0; + else { + for (w = E.length, + P = M.length, + l = 0, + B += 2, + (h = vp(a / (M[0] + 1))) > 1 && (M = e(M, h, a), + E = e(E, h, a), + P = M.length, + w = E.length), + v = P, + m = (b = E.slice(0, P)).length; m < P; b[m++] = 0) + ; + W = M.slice(), + W = [0].concat(W), + A = M[0], + M[1] >= a / 2 && A++; + do { + if (h = 0, + (u = t(M, b, P, m)) < 0) { + if (T = b[0], + P != m && (T = T * a + (b[1] || 0)), + (h = vp(T / A)) > 1) + for (h >= a && (h = a - 1), + f = (p = e(M, h, a)).length, + m = b.length; 1 == t(p, b, f, m); ) + h--, + r(p, P < f ? W : M, f, a), + f = p.length, + u = 1; + else + 0 == h && (u = h = 1), + f = (p = M.slice()).length; + if (f < m && (p = [0].concat(p)), + r(b, p, m, a), + m = b.length, + -1 == u) + for (; t(M, b, P, m) < 1; ) + h++, + r(b, P < m ? W : M, m, a), + m = b.length + } else + 0 === u && (h++, + b = [0]); + y[l++] = h, + b[0] ? b[m++] = E[v] || 0 : (b = [E[v]], + m = 1) + } while ((v++ < w || null != b[0]) && B--); + d = null != b[0], + y[0] || y.splice(0, 1) + } + if (a == Pp) { + for (l = 1, + B = y[0]; B >= 10; B /= 10, + l++) + ; + F(g, s + (g.e = l + c * Wp - 1) + 1, i, d) + } else + g.e = c, + g.r = +d; + return g + } + }(), + a = /^(-?)0([xbo])(?=\w[\w.]*$)/i, + u = /^([^.]+)\.$/, + c = /^\.([^.]+)$/, + l = /^-?(Infinity|NaN)$/, + d = /^\s*\+(?=[\w.])|^\s+|\s+$/g, + o = function(e, t, r, n) { + var o, s = r ? t : t.replace(d, ""); + if (l.test(s)) + e.s = isNaN(s) ? null : s < 0 ? -1 : 1; + else { + if (!r && (s = s.replace(a, (function(e, t, r) { + return o = "x" == (r = r.toLowerCase()) ? 16 : "b" == r ? 2 : 8, + n && n != o ? e : t + } + )), + n && (o = n, + s = s.replace(u, "$1").replace(c, "0.$1")), + t != s)) + return new C(s,o); + if (C.DEBUG) + throw Error(wp + "Not a" + (n ? " base " + n : "") + " number: " + t); + e.s = null + } + e.c = e.e = null + } + , + h.absoluteValue = h.abs = function() { + var e = new C(this); + return e.s < 0 && (e.s = 1), + e + } + , + h.comparedTo = function(e, t) { + return Op(this, new C(e,t)) + } + , + h.decimalPlaces = h.dp = function(e, t) { + var r, n, o, s = this; + if (null != e) + return Sp(e, 0, Mp), + null == t ? t = g : Sp(t, 0, 8), + F(new C(s), e + s.e + 1, t); + if (!(r = s.c)) + return null; + if (n = ((o = r.length - 1) - Ip(this.e / Wp)) * Wp, + o = r[o]) + for (; o % 10 == 0; o /= 10, + n--) + ; + return n < 0 && (n = 0), + n + } + , + h.dividedBy = h.div = function(e, t) { + return r(this, new C(e,t), f, g) + } + , + h.dividedToIntegerBy = h.idiv = function(e, t) { + return r(this, new C(e,t), 0, 1) + } + , + h.exponentiatedBy = h.pow = function(e, t) { + var r, n, o, s, i, a, u, c, l = this; + if ((e = new C(e)).c && !e.isInteger()) + throw Error(wp + "Exponent not an integer: " + O(e)); + if (null != t && (t = new C(t)), + i = e.e > 14, + !l.c || !l.c[0] || 1 == l.c[0] && !l.e && 1 == l.c.length || !e.c || !e.c[0]) + return c = new C(Math.pow(+O(l), i ? e.s * (2 - _p(e)) : +O(e))), + t ? c.mod(t) : c; + if (a = e.s < 0, + t) { + if (t.c ? !t.c[0] : !t.s) + return new C(NaN); + (n = !a && l.isInteger() && t.isInteger()) && (l = l.mod(t)) + } else { + if (e.e > 9 && (l.e > 0 || l.e < -1 || (0 == l.e ? l.c[0] > 1 || i && l.c[1] >= 24e7 : l.c[0] < 8e13 || i && l.c[0] <= 9999975e7))) + return s = l.s < 0 && _p(e) ? -0 : 0, + l.e > -1 && (s = 1 / s), + new C(a ? 1 / s : s); + A && (s = Tp(A / Wp + 2)) + } + for (i ? (r = new C(.5), + a && (e.s = 1), + u = _p(e)) : u = (o = Math.abs(+O(e))) % 2, + c = new C(p); ; ) { + if (u) { + if (!(c = c.times(l)).c) + break; + s ? c.c.length > s && (c.c.length = s) : n && (c = c.mod(t)) + } + if (o) { + if (0 === (o = vp(o / 2))) + break; + u = o % 2 + } else if (F(e = e.times(r), e.e + 1, 1), + e.e > 14) + u = _p(e); + else { + if (0 == (o = +O(e))) + break; + u = o % 2 + } + l = l.times(l), + s ? l.c && l.c.length > s && (l.c.length = s) : n && (l = l.mod(t)) + } + return n ? c : (a && (c = p.div(c)), + t ? c.mod(t) : s ? F(c, A, g, void 0) : c) + } + , + h.integerValue = function(e) { + var t = new C(this); + return null == e ? e = g : Sp(e, 0, 8), + F(t, t.e + 1, e) + } + , + h.isEqualTo = h.eq = function(e, t) { + return 0 === Op(this, new C(e,t)) + } + , + h.isFinite = function() { + return !!this.c + } + , + h.isGreaterThan = h.gt = function(e, t) { + return Op(this, new C(e,t)) > 0 + } + , + h.isGreaterThanOrEqualTo = h.gte = function(e, t) { + return 1 === (t = Op(this, new C(e,t))) || 0 === t + } + , + h.isInteger = function() { + return !!this.c && Ip(this.e / Wp) > this.c.length - 2 + } + , + h.isLessThan = h.lt = function(e, t) { + return Op(this, new C(e,t)) < 0 + } + , + h.isLessThanOrEqualTo = h.lte = function(e, t) { + return -1 === (t = Op(this, new C(e,t))) || 0 === t + } + , + h.isNaN = function() { + return !this.s + } + , + h.isNegative = function() { + return this.s < 0 + } + , + h.isPositive = function() { + return this.s > 0 + } + , + h.isZero = function() { + return !!this.c && 0 == this.c[0] + } + , + h.minus = function(e, t) { + var r, n, o, s, i = this, a = i.s; + if (t = (e = new C(e,t)).s, + !a || !t) + return new C(NaN); + if (a != t) + return e.s = -t, + i.plus(e); + var u = i.e / Wp + , c = e.e / Wp + , l = i.c + , d = e.c; + if (!u || !c) { + if (!l || !d) + return l ? (e.s = -t, + e) : new C(d ? i : NaN); + if (!l[0] || !d[0]) + return d[0] ? (e.s = -t, + e) : new C(l[0] ? i : 3 == g ? -0 : 0) + } + if (u = Ip(u), + c = Ip(c), + l = l.slice(), + a = u - c) { + for ((s = a < 0) ? (a = -a, + o = l) : (c = u, + o = d), + o.reverse(), + t = a; t--; o.push(0)) + ; + o.reverse() + } else + for (n = (s = (a = l.length) < (t = d.length)) ? a : t, + a = t = 0; t < n; t++) + if (l[t] != d[t]) { + s = l[t] < d[t]; + break + } + if (s && (o = l, + l = d, + d = o, + e.s = -e.s), + (t = (n = d.length) - (r = l.length)) > 0) + for (; t--; l[r++] = 0) + ; + for (t = 99999999999999; n > a; ) { + if (l[--n] < d[n]) { + for (r = n; r && !l[--r]; l[r] = t) + ; + --l[r], + l[n] += Pp + } + l[n] -= d[n] + } + for (; 0 == l[0]; l.splice(0, 1), + --c) + ; + return l[0] ? I(e, l, c) : (e.s = 3 == g ? -1 : 1, + e.c = [e.e = 0], + e) + } + , + h.modulo = h.mod = function(e, t) { + var n, o, s = this; + return e = new C(e,t), + !s.c || !e.s || e.c && !e.c[0] ? new C(NaN) : !e.c || s.c && !s.c[0] ? new C(s) : (9 == w ? (o = e.s, + e.s = 1, + n = r(s, e, 0, 3), + e.s = o, + n.s *= o) : n = r(s, e, 0, w), + (e = s.minus(n.times(e))).c[0] || 1 != w || (e.s = s.s), + e) + } + , + h.multipliedBy = h.times = function(e, t) { + var r, n, o, s, i, a, u, c, l, d, h, p, f, g, y, b = this, m = b.c, T = (e = new C(e,t)).c; + if (!(m && T && m[0] && T[0])) + return !b.s || !e.s || m && !m[0] && !T || T && !T[0] && !m ? e.c = e.e = e.s = null : (e.s *= b.s, + m && T ? (e.c = [0], + e.e = 0) : e.c = e.e = null), + e; + for (n = Ip(b.e / Wp) + Ip(e.e / Wp), + e.s *= b.s, + (u = m.length) < (d = T.length) && (f = m, + m = T, + T = f, + o = u, + u = d, + d = o), + o = u + d, + f = []; o--; f.push(0)) + ; + for (g = Pp, + y = Ep, + o = d; --o >= 0; ) { + for (r = 0, + h = T[o] % y, + p = T[o] / y | 0, + s = o + (i = u); s > o; ) + r = ((c = h * (c = m[--i] % y) + (a = p * c + (l = m[i] / y | 0) * h) % y * y + f[s] + r) / g | 0) + (a / y | 0) + p * l, + f[s--] = c % g; + f[s] = r + } + return r ? ++n : f.splice(0, 1), + I(e, f, n) + } + , + h.negated = function() { + var e = new C(this); + return e.s = -e.s || null, + e + } + , + h.plus = function(e, t) { + var r, n = this, o = n.s; + if (t = (e = new C(e,t)).s, + !o || !t) + return new C(NaN); + if (o != t) + return e.s = -t, + n.minus(e); + var s = n.e / Wp + , i = e.e / Wp + , a = n.c + , u = e.c; + if (!s || !i) { + if (!a || !u) + return new C(o / 0); + if (!a[0] || !u[0]) + return u[0] ? e : new C(a[0] ? n : 0 * o) + } + if (s = Ip(s), + i = Ip(i), + a = a.slice(), + o = s - i) { + for (o > 0 ? (i = s, + r = u) : (o = -o, + r = a), + r.reverse(); o--; r.push(0)) + ; + r.reverse() + } + for ((o = a.length) - (t = u.length) < 0 && (r = u, + u = a, + a = r, + t = o), + o = 0; t; ) + o = (a[--t] = a[t] + u[t] + o) / Pp | 0, + a[t] = Pp === a[t] ? 0 : a[t] % Pp; + return o && (a = [o].concat(a), + ++i), + I(e, a, i) + } + , + h.precision = h.sd = function(e, t) { + var r, n, o, s = this; + if (null != e && e !== !!e) + return Sp(e, 1, Mp), + null == t ? t = g : Sp(t, 0, 8), + F(new C(s), e, t); + if (!(r = s.c)) + return null; + if (n = (o = r.length - 1) * Wp + 1, + o = r[o]) { + for (; o % 10 == 0; o /= 10, + n--) + ; + for (o = r[0]; o >= 10; o /= 10, + n++) + ; + } + return e && s.e + 1 > n && (n = s.e + 1), + n + } + , + h.shiftedBy = function(e) { + return Sp(e, -9007199254740991, Bp), + this.times("1e" + e) + } + , + h.squareRoot = h.sqrt = function() { + var e, t, n, o, s, i = this, a = i.c, u = i.s, c = i.e, l = f + 4, d = new C("0.5"); + if (1 !== u || !a || !a[0]) + return new C(!u || u < 0 && (!a || a[0]) ? NaN : a ? i : 1 / 0); + if (0 == (u = Math.sqrt(+O(i))) || u == 1 / 0 ? (((t = Fp(a)).length + c) % 2 == 0 && (t += "0"), + u = Math.sqrt(+t), + c = Ip((c + 1) / 2) - (c < 0 || c % 2), + n = new C(t = u == 1 / 0 ? "5e" + c : (t = u.toExponential()).slice(0, t.indexOf("e") + 1) + c)) : n = new C(u + ""), + n.c[0]) + for ((u = (c = n.e) + l) < 3 && (u = 0); ; ) + if (s = n, + n = d.times(s.plus(r(i, s, l, 1))), + Fp(s.c).slice(0, u) === (t = Fp(n.c)).slice(0, u)) { + if (n.e < c && --u, + "9999" != (t = t.slice(u - 3, u + 1)) && (o || "4999" != t)) { + +t && (+t.slice(1) || "5" != t.charAt(0)) || (F(n, n.e + f + 2, 1), + e = !n.times(n).eq(i)); + break + } + if (!o && (F(s, s.e + f + 2, 0), + s.times(s).eq(i))) { + n = s; + break + } + l += 4, + u += 4, + o = 1 + } + return F(n, n.e + f + 1, g, e) + } + , + h.toExponential = function(e, t) { + return null != e && (Sp(e, 0, Mp), + e++), + E(this, e, t, 1) + } + , + h.toFixed = function(e, t) { + return null != e && (Sp(e, 0, Mp), + e = e + this.e + 1), + E(this, e, t) + } + , + h.toFormat = function(e, t, r) { + var n, o = this; + if (null == r) + null != e && t && "object" == typeof t ? (r = t, + t = null) : e && "object" == typeof e ? (r = e, + e = t = null) : r = P; + else if ("object" != typeof r) + throw Error(wp + "Argument not an object: " + r); + if (n = o.toFixed(e, t), + o.c) { + var s, i = n.split("."), a = +r.groupSize, u = +r.secondaryGroupSize, c = r.groupSeparator || "", l = i[0], d = i[1], h = o.s < 0, p = h ? l.slice(1) : l, f = p.length; + if (u && (s = a, + a = u, + u = s, + f -= s), + a > 0 && f > 0) { + for (s = f % a || a, + l = p.substr(0, s); s < f; s += a) + l += c + p.substr(s, a); + u > 0 && (l += c + p.slice(s)), + h && (l = "-" + l) + } + n = d ? l + (r.decimalSeparator || "") + ((u = +r.fractionGroupSize) ? d.replace(new RegExp("\\d{" + u + "}\\B","g"), "$&" + (r.fractionGroupSeparator || "")) : d) : l + } + return (r.prefix || "") + n + (r.suffix || "") + } + , + h.toFraction = function(e) { + var t, n, o, s, i, a, u, c, l, d, h, f, y = this, b = y.c; + if (null != e && (!(u = new C(e)).isInteger() && (u.c || 1 !== u.s) || u.lt(p))) + throw Error(wp + "Argument " + (u.isInteger() ? "out of range: " : "not an integer: ") + O(u)); + if (!b) + return new C(y); + for (t = new C(p), + l = n = new C(p), + o = c = new C(p), + f = Fp(b), + i = t.e = f.length - y.e - 1, + t.c[0] = Cp[(a = i % Wp) < 0 ? Wp + a : a], + e = !e || u.comparedTo(t) > 0 ? i > 0 ? t : l : u, + a = T, + T = 1 / 0, + u = new C(f), + c.c[0] = 0; d = r(u, t, 0, 1), + 1 != (s = n.plus(d.times(o))).comparedTo(e); ) + n = o, + o = s, + l = c.plus(d.times(s = l)), + c = s, + t = u.minus(d.times(s = t)), + u = s; + return s = r(e.minus(n), o, 0, 1), + c = c.plus(s.times(l)), + n = n.plus(s.times(o)), + c.s = l.s = y.s, + h = r(l, o, i *= 2, g).minus(y).abs().comparedTo(r(c, n, i, g).minus(y).abs()) < 1 ? [l, o] : [c, n], + T = a, + h + } + , + h.toNumber = function() { + return +O(this) + } + , + h.toPrecision = function(e, t) { + return null != e && Sp(e, 1, Mp), + E(this, e, t, 2) + } + , + h.toString = function(e) { + var t, r = this, o = r.s, s = r.e; + return null === s ? o ? (t = "Infinity", + o < 0 && (t = "-" + t)) : t = "NaN" : (null == e ? t = s <= y || s >= b ? xp(Fp(r.c), s) : Rp(Fp(r.c), s, "0") : 10 === e && B ? t = Rp(Fp((r = F(new C(r), f + s + 1, g)).c), r.e, "0") : (Sp(e, 2, W.length, "Base"), + t = n(Rp(Fp(r.c), s, "0"), 10, e, o, !0)), + o < 0 && r.c[0] && (t = "-" + t)), + t + } + , + h.valueOf = h.toJSON = function() { + return O(this) + } + , + h._isBigNumber = !0, + h[Symbol.toStringTag] = "BigNumber", + h[Symbol.for("nodejs.util.inspect.custom")] = h.valueOf, + null != t && C.set(t), + C + }(); + const kp = Np + , Up = { + isValidURL: e=>"string" == typeof e && bp().isURL(e.toString(), { + protocols: ["http", "https"], + require_tld: !1 + }), + isObject: e=>e === Object(e) && "[object Array]" !== Object.prototype.toString.call(e), + isArray: e=>Array.isArray(e), + isJson(e) { + try { + return !!JSON.parse(e) + } catch (e) { + return !1 + } + }, + isBoolean: e=>"boolean" == typeof e, + isBigNumber: e=>e && (e instanceof kp || e.constructor && "BigNumber" === e.constructor.name), + isString: e=>"string" == typeof e || e && e.constructor && "String" === e.constructor.name, + isFunction: e=>"function" == typeof e, + isHex: e=>"string" == typeof e && !isNaN(parseInt(e, 16)) && /^(0x|)[a-fA-F0-9]+$/.test(e), + isInteger: e=>null !== e && Number.isInteger(Number(e)), + hasProperty: (e,t)=>Object.prototype.hasOwnProperty.call(e, t), + hasProperties(e) { + for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++) + r[n - 1] = arguments[n]; + return r.length && !r.map((t=>this.hasProperty(e, t))).includes(!1) + }, + mapEvent(e) { + let t = { + block: e.block_number, + timestamp: e.block_timestamp, + contract: e.contract_address, + name: e.event_name, + transaction: e.transaction_id, + result: e.result, + resourceNode: e.resource_Node || (e._unconfirmed ? "fullNode" : "solidityNode") + }; + return e._unconfirmed && (t.unconfirmed = e._unconfirmed), + e._fingerprint && (t.fingerprint = e._fingerprint), + t + }, + parseEvent(e, t) { + let {inputs: r} = t; + if (!e.result) + return e; + if (this.isObject(e.result)) + for (var n = 0; n < r.length; n++) { + let t = r[n]; + "address" == t.type && t.name in e.result && (e.result[t.name] = P + e.result[t.name].substr(2).toLowerCase()) + } + else + this.isArray(e.result) && (e.result = e.result.reduce(((e,t,n)=>{ + const {name: o, type: s} = r[n]; + return "address" == s && (t = P + t.substr(2).toLowerCase()), + e[o] = t, + e + } + ), {})); + return e + }, + padLeft(e, t, r) { + let n = e.toString(); + for (; n.length < r; ) + n = t + n; + return n + }, + isNotNullOrUndefined: e=>null != e, + async sleep() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 1e3; + return new Promise((t=>setTimeout(t, e))) + } + } + , Dp = { + ...Up, + code: t, + accounts: c, + base58: o, + bytes: e, + crypto: u, + abi: l, + message: d, + _TypedDataEncoder: Vu, + transaction: h, + ethersUtils: i + } + , Lp = { + HttpProvider: class { + constructor(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 3e4 + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3] + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {} + , s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : "/"; + if (!Dp.isValidURL(e)) + throw new Error("Invalid URL provided to HttpProvider"); + if (isNaN(t) || t < 0) + throw new Error("Invalid timeout duration provided"); + if (!Dp.isObject(o)) + throw new Error("Invalid headers object provided"); + e = e.replace(/\/+$/, ""), + this.host = e, + this.timeout = t, + this.user = r, + this.password = n, + this.headers = o, + this.statusPage = s, + this.instance = f().create({ + baseURL: e, + timeout: t, + headers: o, + auth: r && { + user: r, + password: n + } + }) + } + setStatusPage() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "/"; + this.statusPage = e + } + async isConnected() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.statusPage; + return this.request(e).then((e=>Dp.hasProperties(e, "blockID", "block_header"))).catch((()=>!1)) + } + request(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "get"; + return r = r.toLowerCase(), + this.instance.request({ + data: "post" == r && Object.keys(t).length ? t : null, + params: "get" == r && t, + url: e, + method: r + }).then((e=>{ + let {data: t} = e; + return t + } + )) + } + } + }; + var zp = r(6729) + , jp = r.n(zp); + var $p = r(6625) + , Vp = r.n($p) + , Gp = r(7832) + , Hp = r.n(Gp); + class Kp { + constructor() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e || !e instanceof pf) + throw new Error("Expected instance of TronWeb"); + this.tronWeb = e + } + invalid(e) { + return e.msg || `Invalid ${e.name}${"address" === e.type ? " address" : ""} provided` + } + notPositive(e) { + return `${e.name} must be a positive integer` + } + notEqual(e) { + return e.msg || `${e.names[0]} can not be equal to ${e.names[1]}` + } + notValid() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Function + , r = {} + , n = !1; + for (const o of e) { + let {name: e, names: s, value: i, type: a, gt: u, lt: c, gte: l, lte: d, se: h, optional: p} = o; + if (!p || Dp.isNotNullOrUndefined(i) && ("boolean" === a || !1 !== i)) { + switch (r[o.name] = o.value, + a) { + case "address": + this.tronWeb.isAddress(i) ? r[e] = this.tronWeb.address.toHex(i) : n = !0; + break; + case "integer": + (!Dp.isInteger(i) || "number" == typeof u && i <= o.gt || "number" == typeof c && i >= o.lt || "number" == typeof l && i < o.gte || "number" == typeof d && i > o.lte) && (n = !0); + break; + case "positive-integer": + if (!Dp.isInteger(i) || i <= 0) + return void t(this.notPositive(o)); + break; + case "tokenId": + case "not-empty-string": + Dp.isString(i) && i.length || (n = !0); + break; + case "notEmptyObject": + Dp.isObject(i) && Object.keys(i).length || (n = !0); + break; + case "notEqual": + if (r[s[0]] === r[s[1]]) + return t(this.notEqual(o)), + !0; + break; + case "resource": + ["BANDWIDTH", "ENERGY"].includes(i) || (n = !0); + break; + case "url": + Dp.isValidURL(i) || (n = !0); + break; + case "hex": + Dp.isHex(i) || (n = !0); + break; + case "array": + Array.isArray(i) || (n = !0); + break; + case "boolean": + Dp.isBoolean(i) || (n = !0); + break; + case "string": + (!Dp.isString(i) || "number" == typeof u && i.length <= o.gt || "number" == typeof c && i.length >= o.lt || "number" == typeof l && i.length < o.gte || "number" == typeof d && i.length > o.lte) && (n = !0) + } + if (n) + return t(this.invalid(o)), + !0 + } + } + return !1 + } + } + let Zp; + function qp(e) { + return pf.address.toHex(e) + } + function Jp(e) { + return Zp.tronWeb.fromUtf8(e).replace(/^0x/, "") + } + function Yp(e) { + return JSON.parse(JSON.stringify(e)) + } + async function Xp(e, t, r, n) { + let o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {}; + var s; + const i = { + visible: !1, + txID: "", + raw_data_hex: "", + raw_data: { + contract: [{ + parameter: { + value: r, + type_url: `type.googleapis.com/protocol.${t}` + }, + type: t + }], + ...await (s = e.fullNode, + s.request("wallet/getblock", { + detail: !1 + }, "post").then((e=>({ + ref_block_bytes: e.block_header.raw_data.number.toString(16).slice(-4).padStart(4, "0"), + ref_block_hash: e.blockID.slice(16, 32), + expiration: e.block_header.raw_data.timestamp + 6e4, + timestamp: e.block_header.raw_data.timestamp + })))), + ...o + } + }; + n && (i.raw_data.contract[0].Permission_id = n); + const a = cp(i); + return i.txID = gp(a).replace(/^0x/, ""), + i.raw_data_hex = hp(a).toLowerCase(), + i + } + class Qp { + constructor() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e || !e instanceof pf) + throw new Error("Expected instance of TronWeb"); + Zp = this, + this.tronWeb = e, + this.injectPromise = Hp()(this), + this.validator = new Kp(e) + } + sendTrx() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0 + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.tronWeb.defaultAddress.hex + , n = arguments.length > 3 ? arguments[3] : void 0 + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = {}), + Dp.isFunction(r) ? (o = r, + r = this.tronWeb.defaultAddress.hex) : Dp.isObject(r) && (n = r, + r = this.tronWeb.defaultAddress.hex), + !o) + return this.injectPromise(this.sendTrx, e, t, r, n); + if (t = parseInt(t), + this.validator.notValid([{ + name: "recipient", + type: "address", + value: e + }, { + name: "origin", + type: "address", + value: r + }, { + names: ["recipient", "origin"], + type: "notEqual", + msg: "Cannot transfer TRX to the same account" + }, { + name: "amount", + type: "integer", + gt: 0, + value: t + }], o)) + return; + const s = { + to_address: qp(e), + owner_address: qp(r), + amount: t + }; + Xp(this.tronWeb, "TransferContract", s, n?.permissionId).then((e=>o(null, e))).catch((e=>o(e))) + } + sendToken() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0 + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.tronWeb.defaultAddress.hex + , o = arguments.length > 4 ? arguments[4] : void 0 + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (Dp.isFunction(o) && (s = o, + o = {}), + Dp.isFunction(n) ? (s = n, + n = this.tronWeb.defaultAddress.hex) : Dp.isObject(n) && (o = n, + n = this.tronWeb.defaultAddress.hex), + !s) + return this.injectPromise(this.sendToken, e, t, r, n, o); + if (t = parseInt(t), + this.validator.notValid([{ + name: "recipient", + type: "address", + value: e + }, { + name: "origin", + type: "address", + value: n + }, { + names: ["recipient", "origin"], + type: "notEqual", + msg: "Cannot transfer tokens to the same account" + }, { + name: "amount", + type: "integer", + gt: 0, + value: t + }, { + name: "token ID", + type: "tokenId", + value: r + }], s)) + return; + const i = { + to_address: qp(e), + owner_address: qp(n), + asset_name: Jp(r), + amount: parseInt(t) + }; + Xp(this.tronWeb, "TransferAssetContract", i, o?.permissionId).then((e=>s(null, e))).catch((e=>s(e))) + } + purchaseToken() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0 + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.tronWeb.defaultAddress.hex + , o = arguments.length > 4 ? arguments[4] : void 0 + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (Dp.isFunction(o) && (s = o, + o = {}), + Dp.isFunction(n) ? (s = n, + n = this.tronWeb.defaultAddress.hex) : Dp.isObject(n) && (o = n, + n = this.tronWeb.defaultAddress.hex), + !s) + return this.injectPromise(this.purchaseToken, e, t, r, n, o); + if (this.validator.notValid([{ + name: "buyer", + type: "address", + value: n + }, { + name: "issuer", + type: "address", + value: e + }, { + names: ["buyer", "issuer"], + type: "notEqual", + msg: "Cannot purchase tokens from same account" + }, { + name: "amount", + type: "integer", + gt: 0, + value: r + }, { + name: "token ID", + type: "tokenId", + value: t + }], s)) + return; + const i = { + to_address: qp(e), + owner_address: qp(n), + asset_name: Jp(t), + amount: parseInt(r) + }; + Xp(this.tronWeb, "ParticipateAssetIssueContract", i, o?.permissionId).then((e=>s(null, e))).catch((e=>s(e))) + } + freezeBalance() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0 + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 3 + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "BANDWIDTH" + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.tronWeb.defaultAddress.hex + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : void 0 + , s = arguments.length > 5 ? arguments[5] : void 0 + , i = arguments.length > 6 && void 0 !== arguments[6] && arguments[6]; + if (Dp.isFunction(s) && (i = s, + s = {}), + Dp.isFunction(o) ? (i = o, + o = void 0) : Dp.isObject(o) && (s = o, + o = void 0), + Dp.isFunction(n) ? (i = n, + n = this.tronWeb.defaultAddress.hex) : Dp.isObject(n) && (s = n, + n = this.tronWeb.defaultAddress.hex), + Dp.isFunction(t) && (i = t, + t = 3), + Dp.isFunction(r) && (i = r, + r = "BANDWIDTH"), + !i) + return this.injectPromise(this.freezeBalance, e, t, r, n, o, s); + if (this.validator.notValid([{ + name: "origin", + type: "address", + value: n + }, { + name: "receiver", + type: "address", + value: o, + optional: !0 + }, { + name: "amount", + type: "integer", + gt: 0, + value: e + }, { + name: "duration", + type: "integer", + gte: 3, + value: t + }, { + name: "resource", + type: "resource", + value: r, + msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' + }], i)) + return; + const a = { + owner_address: qp(n), + frozen_balance: parseInt(e), + frozen_duration: parseInt(t) + }; + "BANDWIDTH" !== r && (a.resource = r), + Dp.isNotNullOrUndefined(o) && qp(o) !== qp(n) && (a.receiver_address = qp(o)), + Xp(this.tronWeb, "FreezeBalanceContract", a, s?.permissionId).then((e=>i(null, e))).catch((e=>i(e))) + } + unfreezeBalance() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "BANDWIDTH" + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : void 0 + , n = arguments.length > 3 ? arguments[3] : void 0 + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = {}), + Dp.isFunction(r) ? (o = r, + r = void 0) : Dp.isObject(r) && (n = r, + r = void 0), + Dp.isFunction(t) ? (o = t, + t = this.tronWeb.defaultAddress.hex) : Dp.isObject(t) && (n = t, + t = this.tronWeb.defaultAddress.hex), + Dp.isFunction(e) && (o = e, + e = "BANDWIDTH"), + !o) + return this.injectPromise(this.unfreezeBalance, e, t, r, n); + if (this.validator.notValid([{ + name: "origin", + type: "address", + value: t + }, { + name: "receiver", + type: "address", + value: r, + optional: !0 + }, { + name: "resource", + type: "resource", + value: e, + msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' + }], o)) + return; + const s = { + owner_address: qp(t) + }; + "BANDWIDTH" !== e && (s.resource = e), + Dp.isNotNullOrUndefined(r) && qp(r) !== qp(t) && (s.receiver_address = qp(r)), + Xp(this.tronWeb, "UnfreezeBalanceContract", s, n?.permissionId).then((e=>o(null, e))).catch((e=>o(e))) + } + freezeBalanceV2() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0 + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "BANDWIDTH" + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.tronWeb.defaultAddress.hex + , n = arguments.length > 3 ? arguments[3] : void 0 + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = {}), + Dp.isFunction(r) ? (o = r, + r = this.tronWeb.defaultAddress.hex) : Dp.isObject(r) && (n = r, + r = this.tronWeb.defaultAddress.hex), + Dp.isFunction(t) ? (o = t, + t = "BANDWIDTH") : Dp.isObject(t) && (n = t, + t = "BANDWIDTH"), + !o) + return this.injectPromise(this.freezeBalanceV2, e, t, r, n); + if (this.validator.notValid([{ + name: "origin", + type: "address", + value: r + }, { + name: "amount", + type: "integer", + gt: 0, + value: e + }, { + name: "resource", + type: "resource", + value: t, + msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' + }], o)) + return; + const s = { + owner_address: qp(r), + frozen_balance: parseInt(e) + }; + "BANDWIDTH" !== t && (s.resource = t), + Xp(this.tronWeb, "FreezeBalanceV2Contract", s, n?.permissionId).then((e=>o(null, e))).catch((e=>o(e))) + } + unfreezeBalanceV2() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0 + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "BANDWIDTH" + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.tronWeb.defaultAddress.hex + , n = arguments.length > 3 ? arguments[3] : void 0 + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = {}), + Dp.isFunction(r) ? (o = r, + r = this.tronWeb.defaultAddress.hex) : Dp.isObject(r) && (n = r, + r = this.tronWeb.defaultAddress.hex), + Dp.isFunction(t) ? (o = t, + t = "BANDWIDTH") : Dp.isObject(t) && (n = t, + t = "BANDWIDTH"), + !o) + return this.injectPromise(this.unfreezeBalanceV2, e, t, r, n); + if (this.validator.notValid([{ + name: "origin", + type: "address", + value: r + }, { + name: "amount", + type: "integer", + gt: 0, + value: e + }, { + name: "resource", + type: "resource", + value: t, + msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' + }], o)) + return; + const s = { + owner_address: qp(r), + unfreeze_balance: parseInt(e) + }; + "BANDWIDTH" !== t && (s.resource = t), + Xp(this.tronWeb, "UnfreezeBalanceV2Contract", s, n?.permissionId).then((e=>o(null, e))).catch((e=>o(e))) + } + cancelUnfreezeBalanceV2() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 ? arguments[1] : void 0 + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = {}), + Dp.isFunction(e) ? (r = e, + t = {}, + e = this.tronWeb.defaultAddress.hex) : Dp.isObject(e) && (t = e, + e = this.tronWeb.defaultAddress.hex), + !r) + return this.injectPromise(this.cancelUnfreezeBalanceV2, e, t); + if (this.validator.notValid([{ + name: "origin", + type: "address", + value: e + }], r)) + return; + const n = { + owner_address: qp(e) + }; + Xp(this.tronWeb, "CancelAllUnfreezeV2Contract", n, t?.permissionId).then((e=>r(null, e))).catch((e=>r(e))) + } + delegateResource() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0 + , t = arguments.length > 1 ? arguments[1] : void 0 + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "BANDWIDTH" + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.tronWeb.defaultAddress.hex + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4] + , s = arguments.length > 5 ? arguments[5] : void 0 + , i = arguments.length > 6 ? arguments[6] : void 0 + , a = arguments.length > 7 && void 0 !== arguments[7] && arguments[7]; + if (Dp.isFunction(i) && (a = i, + i = {}), + Dp.isFunction(s) ? (a = s, + s = void 0) : Dp.isObject(s) && (i = s, + s = void 0), + Dp.isFunction(o) ? (a = o, + o = !1) : Dp.isObject(o) && (i = o, + o = !1), + Dp.isFunction(n) ? (a = n, + n = this.tronWeb.defaultAddress.hex) : Dp.isObject(n) && (i = n, + n = this.tronWeb.defaultAddress.hex), + Dp.isFunction(r) ? (a = r, + r = "BANDWIDTH") : Dp.isObject(r) && (i = r, + r = "BANDWIDTH"), + !a) + return this.injectPromise(this.delegateResource, e, t, r, n, o, s, i); + if (this.validator.notValid([{ + name: "amount", + type: "integer", + gt: 0, + value: e + }, { + name: "resource", + type: "resource", + value: r, + msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' + }, { + name: "receiver", + type: "address", + value: t + }, { + name: "origin", + type: "address", + value: n + }, { + name: "lock", + type: "boolean", + value: o + }, { + name: "lock period", + type: "integer", + gte: 0, + value: s, + optional: !0 + }], a)) + return; + if (qp(t) === qp(n)) + return a("Receiver address must not be the same as owner address"); + const u = { + owner_address: qp(n), + receiver_address: qp(t), + balance: parseInt(e) + }; + "BANDWIDTH" !== r && (u.resource = r), + o && (u.lock = o, + Dp.isNotNullOrUndefined(s) && (u.lock_period = s)), + Xp(this.tronWeb, "DelegateResourceContract", u, i?.permissionId).then((e=>a(null, e))).catch((e=>a(e))) + } + undelegateResource() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0 + , t = arguments.length > 1 ? arguments[1] : void 0 + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "BANDWIDTH" + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.tronWeb.defaultAddress.hex + , o = arguments.length > 4 ? arguments[4] : void 0 + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (Dp.isFunction(o) && (s = o, + o = {}), + Dp.isFunction(n) ? (s = n, + n = this.tronWeb.defaultAddress.hex) : Dp.isObject(n) && (o = n, + n = this.tronWeb.defaultAddress.hex), + Dp.isFunction(r) ? (s = r, + r = "BANDWIDTH") : Dp.isObject(r) && (o = r, + r = "BANDWIDTH"), + !s) + return this.injectPromise(this.undelegateResource, e, t, r, n, o); + if (this.validator.notValid([{ + name: "origin", + type: "address", + value: n + }, { + name: "receiver", + type: "address", + value: t + }, { + name: "amount", + type: "integer", + gt: 0, + value: e + }, { + name: "resource", + type: "resource", + value: r, + msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' + }], s)) + return; + if (qp(t) === qp(n)) + return s("Receiver address must not be the same as owner address"); + const i = { + owner_address: qp(n), + receiver_address: qp(t), + balance: parseInt(e) + }; + "BANDWIDTH" !== r && (i.resource = r), + Xp(this.tronWeb, "UnDelegateResourceContract", i, o?.permissionId).then((e=>s(null, e))).catch((e=>s(e))) + } + withdrawExpireUnfreeze() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 ? arguments[1] : void 0 + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = {}), + Dp.isFunction(e) ? (r = e, + e = this.tronWeb.defaultAddress.hex) : Dp.isObject(e) && (t = e, + e = this.tronWeb.defaultAddress.hex), + !r) + return this.injectPromise(this.withdrawExpireUnfreeze, e, t); + if (this.validator.notValid([{ + name: "origin", + type: "address", + value: e + }], r)) + return; + const n = { + owner_address: qp(e) + }; + Xp(this.tronWeb, "WithdrawExpireUnfreezeContract", n, t?.permissionId).then((e=>r(null, e))).catch((e=>r(e))) + } + withdrawBlockRewards() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 ? arguments[1] : void 0 + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = {}), + Dp.isFunction(e) ? (r = e, + e = this.tronWeb.defaultAddress.hex) : Dp.isObject(e) && (t = e, + e = this.tronWeb.defaultAddress.hex), + !r) + return this.injectPromise(this.withdrawBlockRewards, e, t); + if (this.validator.notValid([{ + name: "origin", + type: "address", + value: e + }], r)) + return; + const n = { + owner_address: qp(e) + }; + Xp(this.tronWeb, "WithdrawBalanceContract", n, t?.permissionId).then((e=>r(null, e))).catch((e=>r(e))) + } + applyForSR() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 ? arguments[2] : void 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + Dp.isObject(t) && Dp.isValidURL(e) && (r = t, + t = e, + e = this.tronWeb.defaultAddress.hex), + !n) + return this.injectPromise(this.applyForSR, e, t, r); + if (this.validator.notValid([{ + name: "origin", + type: "address", + value: e + }, { + name: "url", + type: "url", + value: t, + msg: "Invalid url provided" + }, { + name: "url", + type: "string", + value: t, + lte: 256, + msg: "Invalid url provided" + }], n)) + return; + const o = { + owner_address: qp(e), + url: Jp(t) + }; + Xp(this.tronWeb, "WitnessCreateContract", o, r?.permissionId).then((e=>n(null, e))).catch((e=>n(e))) + } + vote() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 ? arguments[2] : void 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + Dp.isFunction(t) ? (n = t, + t = this.tronWeb.defaultAddress.hex) : Dp.isObject(t) && (r = t, + t = this.tronWeb.defaultAddress.hex), + !n) + return this.injectPromise(this.vote, e, t, r); + if (this.validator.notValid([{ + name: "voter", + type: "address", + value: t + }, { + name: "votes", + type: "notEmptyObject", + value: e + }], n)) + return; + let o = !1; + if (e = Object.entries(e).map((e=>{ + let[t,r] = e; + if (!o) + return this.validator.notValid([{ + name: "SR", + type: "address", + value: t + }, { + name: "vote count", + type: "integer", + gt: 0, + value: r, + msg: "Invalid vote count provided for SR: " + t + }]) ? o = !0 : { + vote_address: qp(t), + vote_count: parseInt(r) + } + } + )), + o) + return; + const s = { + owner_address: qp(t), + votes: e + }; + Xp(this.tronWeb, "VoteWitnessContract", s, r?.permissionId).then((e=>n(null, e))).catch((e=>n(e))) + } + createSmartContract() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = this.tronWeb.defaultAddress.hex), + !r) + return this.injectPromise(this.createSmartContract, e, t); + const n = e.feeLimit || this.tronWeb.feeLimit; + let o = e.userFeePercentage; + "number" == typeof o || o || (o = 100); + const s = e.originEnergyLimit || 1e7 + , i = e.callValue || 0 + , a = e.tokenValue + , u = e.tokenId || e.token_id; + let {abi: c=!1, bytecode: l=!1, parameters: d=[], name: h=""} = e; + if (c && Dp.isString(c)) + try { + c = JSON.parse(c) + } catch { + return r("Invalid options.abi provided") + } + if (c.entrys && (c = c.entrys), + !Dp.isArray(c)) + return r("Invalid options.abi provided"); + const p = c.some((e=>"constructor" === e.type && "payable" === e.stateMutability.toLowerCase())); + if (this.validator.notValid([{ + name: "bytecode", + type: "hex", + value: l + }, { + name: "feeLimit", + type: "integer", + value: n, + gt: 0 + }, { + name: "callValue", + type: "integer", + value: i, + gte: 0 + }, { + name: "userFeePercentage", + type: "integer", + value: o, + gte: 0, + lte: 100 + }, { + name: "originEnergyLimit", + type: "integer", + value: s, + gte: 0, + lte: 1e7 + }, { + name: "parameters", + type: "array", + value: d + }, { + name: "issuer", + type: "address", + value: t + }, { + name: "tokenValue", + type: "integer", + value: a, + gte: 0, + optional: !0 + }, { + name: "tokenId", + type: "integer", + value: u, + gte: 0, + optional: !0 + }], r)) + return; + if (!p && (i > 0 || a > 0)) + return r("When contract is not payable, options.callValue and options.tokenValue must be 0"); + if (e.rawParameter && Dp.isString(e.rawParameter)) + d = e.rawParameter.replace(/^(0x)/, ""); + else if (e.funcABIV2) + d = yh(e.funcABIV2, e.parametersV2).replace(/^(0x)/, ""); + else { + var f = c.find((e=>"constructor" === e.type)); + if (void 0 !== f && f) { + const e = new uh + , t = [] + , n = []; + if (f = f.inputs, + d.length != f.length) + return r(`constructor needs ${f.length} but ${d.length} provided`); + for (let e = 0; e < d.length; e++) { + let o = f[e].type + , s = d[e]; + if (!o || !Dp.isString(o) || !o.length) + return r("Invalid parameter type provided: " + o); + "address" === o ? s = qp(s).replace(B, "0x") : "address[" === o.match(/^([^\x5b]*)(\x5b|$)/)[0] ? s = s.map((e=>qp(e).replace(B, "0x"))) : /trcToken/.test(o) && (o = o.replace(/trcToken/, "uint256")), + t.push(o), + n.push(s) + } + try { + d = e.encode(t, n).replace(/^(0x)/, "") + } catch (e) { + return r(e) + } + } else + d = "" + } + const g = { + owner_address: qp(t), + fee_limit: parseInt(n), + call_value: parseInt(i), + consume_user_resource_percent: o, + origin_energy_limit: s, + abi: JSON.stringify(c), + bytecode: l, + parameter: d, + name: h + }; + Dp.isNotNullOrUndefined(a) && (g.call_token_value = parseInt(a)), + Dp.isNotNullOrUndefined(u) && (g.token_id = parseInt(u)), + new Promise((e=>{ + const t = {}; + t.owner_address = g.owner_address, + Dp.isNotNullOrUndefined(g.call_token_value) && (t.call_token_value = g.call_token_value), + Dp.isNotNullOrUndefined(g.token_id) && (t.token_id = g.token_id); + const r = t.new_contract = {}; + g.abi ? r.abi = { + entrys: JSON.parse(g.abi) + } : r.abi = {}, + g.call_value && (r.call_value = g.call_value), + r.consume_user_resource_percent = g.consume_user_resource_percent, + r.origin_energy_limit = g.origin_energy_limit, + r.origin_address = g.origin_address ?? g.owner_address, + g.bytecode + g.parameter && (r.bytecode = (g.bytecode + g.parameter).replace(/^0x/, "")), + Dp.isNotNullOrUndefined(g.name) && (r.name = g.name), + e(t) + } + )).then((async t=>{ + const r = await Xp(this.tronWeb, "CreateSmartContract", t, e?.permissionId, { + fee_limit: g.fee_limit + }); + var n, o; + return r.contract_address = (n = g.owner_address, + o = r.txID, + "41" + ir(ethereumjs.Buffer.Buffer.from(o + n, "hex")).toString().substring(2).slice(24)), + r + } + )).then((e=>r(null, e))).catch((e=>r(e))) + } + triggerSmartContract() { + for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) + t[r] = arguments[r]; + return "object" != typeof t[2] && (t[2] = { + feeLimit: t[2], + callValue: t[3] + }, + t.splice(3, 1)), + t[2]?.txLocal ? this._triggerSmartContractLocal(...t) : this._triggerSmartContract(...t) + } + triggerConstantContract() { + for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) + t[r] = arguments[r]; + return t[2]._isConstant = !0, + this._triggerSmartContract(...t) + } + triggerConfirmedConstantContract() { + for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) + t[r] = arguments[r]; + return t[2]._isConstant = !0, + t[2].confirmed = !0, + this._triggerSmartContract(...t) + } + estimateEnergy() { + for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) + t[r] = arguments[r]; + return t[2].estimateEnergy = !0, + this._triggerSmartContract(...t) + } + async deployConstantContract() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + const {input: t, ownerAddress: r, tokenId: n, tokenValue: o, callValue: s=0} = e; + this.validator.notValid([{ + name: "input", + type: "not-empty-string", + value: t + }, { + name: "callValue", + type: "integer", + value: s, + gte: 0 + }, { + name: "owner", + type: "address", + value: r + }, { + name: "tokenValue", + type: "integer", + value: o, + gte: 0, + optional: !0 + }, { + name: "tokenId", + type: "integer", + value: n, + gte: 0, + optional: !0 + }], (e=>{ + throw new Error(e) + } + )); + const i = { + data: t, + owner_address: qp(r), + call_value: s + }; + n && (i.token_id = n), + o && (i.call_token_value = o); + const a = `wallet${e.confirmed ? "solidity" : ""}/${e.estimateEnergy ? "estimateenergy" : "triggerconstantcontract"}`; + return this.tronWeb[e.confirmed ? "solidityNode" : "fullNode"].request(a, i, "post").then((e=>{ + if (e.Error) + throw new Error(e.Error); + if (e.result && e.result.message) + throw new Error(this.tronWeb.toUtf8(e.result.message)); + return e + } + )).then((e=>e.energy_used ? { + result: e.result, + energy_required: e.energy_used + } : e)) + } + _getTriggerSmartContractArgs(e, t, r, n, o, s, i, a, u) { + const c = { + contract_address: qp(e), + owner_address: qp(o) + }; + if (t && Dp.isString(t)) { + if (t = t.replace("/s*/g", ""), + n.length) { + const e = new uh; + let t = []; + const r = []; + for (let e = 0; e < n.length; e++) { + let {type: o, value: s} = n[e]; + if (!o || !Dp.isString(o) || !o.length) + return callback("Invalid parameter type provided: " + o); + "address" === o ? s = qp(s).replace(B, "0x") : "address[" === o.match(/^([^\x5b]*)(\x5b|$)/)[0] && (s = s.map((e=>qp(e).replace(B, "0x")))), + t.push(o), + r.push(s) + } + try { + t = t.map((e=>(/trcToken/.test(e) && (e = e.replace(/trcToken/, "uint256")), + e))), + n = e.encode(t, r).replace(/^(0x)/, "") + } catch (e) { + return callback(e) + } + } else + n = ""; + r.funcABIV2 && (n = yh(r.funcABIV2, r.parametersV2).replace(/^(0x)/, "")), + r.shieldedParameter && Dp.isString(r.shieldedParameter) && (n = r.shieldedParameter.replace(/^(0x)/, "")), + r.rawParameter && Dp.isString(r.rawParameter) && (n = r.rawParameter.replace(/^(0x)/, "")), + c.function_selector = t, + c.parameter = n + } else + r.input && (c.data = r.input); + return c.call_value = parseInt(a), + Dp.isNotNullOrUndefined(s) && (c.call_token_value = parseInt(s)), + Dp.isNotNullOrUndefined(i) && (c.token_id = parseInt(i)), + r._isConstant || r.estimateEnergy || (c.fee_limit = parseInt(u)), + r.permissionId && (c.Permission_id = r.permissionId), + c + } + _triggerSmartContractLocal(e, t) { + let r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {} + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : [] + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.tronWeb.defaultAddress.hex + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (Dp.isFunction(o) && (s = o, + o = this.tronWeb.defaultAddress.hex), + Dp.isFunction(n) && (s = n, + n = []), + !s) + return this.injectPromise(this._triggerSmartContractLocal, e, t, r, n, o); + let {tokenValue: i, tokenId: a, callValue: u, feeLimit: c} = Object.assign({ + callValue: 0, + feeLimit: this.tronWeb.feeLimit + }, r); + if (this.validator.notValid([{ + name: "feeLimit", + type: "integer", + value: c, + gt: 0 + }, { + name: "callValue", + type: "integer", + value: u, + gte: 0 + }, { + name: "parameters", + type: "array", + value: n + }, { + name: "contract", + type: "address", + value: e + }, { + name: "issuer", + type: "address", + value: o, + optional: !0 + }, { + name: "tokenValue", + type: "integer", + value: i, + gte: 0, + optional: !0 + }, { + name: "tokenId", + type: "integer", + value: a, + gte: 0, + optional: !0 + }], s)) + return; + const l = this._getTriggerSmartContractArgs(e, t, r, n, o, i, a, u, c); + l.function_selector && (l.data = ir(ethereumjs.Buffer.Buffer.from(l.function_selector, "utf-8")).toString().substring(2, 10) + l.parameter); + const d = { + data: l.data, + owner_address: l.owner_address, + contract_address: l.contract_address + }; + l.call_value && (d.call_value = l.call_value), + l.call_token_value && (d.call_token_value = l.call_token_value), + l.token_id && (d.token_id = l.token_id), + Xp(this.tronWeb, "TriggerSmartContract", d, r.permissionId, { + fee_limit: l.fee_limit + }).then((e=>{ + s(null, { + result: { + result: !0 + }, + transaction: e + }) + } + )).catch((e=>s(e))) + } + _triggerSmartContract(e, t) { + let r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {} + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : [] + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.tronWeb.defaultAddress.hex + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (Dp.isFunction(o) && (s = o, + o = this.tronWeb.defaultAddress.hex), + Dp.isFunction(n) && (s = n, + n = []), + !s) + return this.injectPromise(this._triggerSmartContract, e, t, r, n, o); + let {tokenValue: i, tokenId: a, callValue: u, feeLimit: c} = Object.assign({ + callValue: 0, + feeLimit: this.tronWeb.feeLimit + }, r); + if (this.validator.notValid([{ + name: "feeLimit", + type: "integer", + value: c, + gt: 0 + }, { + name: "callValue", + type: "integer", + value: u, + gte: 0 + }, { + name: "parameters", + type: "array", + value: n + }, { + name: "contract", + type: "address", + value: e + }, { + name: "issuer", + type: "address", + value: o, + optional: !0 + }, { + name: "tokenValue", + type: "integer", + value: i, + gte: 0, + optional: !0 + }, { + name: "tokenId", + type: "integer", + value: a, + gte: 0, + optional: !0 + }], s)) + return; + const l = this._getTriggerSmartContractArgs(e, t, r, n, o, i, a, u, c); + let d = "triggersmartcontract"; + r._isConstant ? d = "triggerconstantcontract" : r.estimateEnergy && (d = "estimateenergy"), + d = `wallet${r.confirmed ? "solidity" : ""}/${d}`, + this.tronWeb[r.confirmed ? "solidityNode" : "fullNode"].request(d, l, "post").then((e=>function(e, t, r, n) { + return e.Error ? n(e.Error) : e.result && e.result.message ? n(Zp.tronWeb.toUtf8(e.result.message)) : r._isConstant || r.estimateEnergy || fp(e.transaction, t, r) ? n(null, e) : n("Invalid transaction") + }(e, l, r, s))).catch((e=>s(e))) + } + clearABI(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 ? arguments[2] : void 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + Dp.isFunction(t) ? (n = t, + t = this.tronWeb.defaultAddress.hex) : Dp.isObject(t) && (r = t, + t = this.tronWeb.defaultAddress.hex), + !n) + return this.injectPromise(this.clearABI, e, t, r); + if (!this.tronWeb.isAddress(e)) + return n("Invalid contract address provided"); + if (!this.tronWeb.isAddress(t)) + return n("Invalid owner address provided"); + const o = { + contract_address: qp(e), + owner_address: qp(t) + }; + this.tronWeb.trx.cache.contracts[e] && delete this.tronWeb.trx.cache.contracts[e], + Xp(this.tronWeb, "ClearABIContract", o, r?.permissionId).then((e=>n(null, e))).catch((e=>n(e))) + } + updateBrokerage(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 ? arguments[2] : void 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + Dp.isFunction(t) ? (n = t, + t = this.tronWeb.defaultAddress.hex) : Dp.isObject(t) && (r = t, + t = this.tronWeb.defaultAddress.hex), + !n) + return this.injectPromise(this.updateBrokerage, e, t, r); + if (!Dp.isNotNullOrUndefined(e)) + return n("Invalid brokerage provided"); + if (!Dp.isInteger(e) || e < 0 || e > 100) + return n("Brokerage must be an integer between 0 and 100"); + if (!this.tronWeb.isAddress(t)) + return n("Invalid owner address provided"); + const o = { + brokerage: parseInt(e), + owner_address: qp(t) + }; + Xp(this.tronWeb, "UpdateBrokerageContract", o, r?.permissionId).then((e=>n(null, e))).catch((e=>n(e))) + } + createToken() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = this.tronWeb.defaultAddress.hex), + !r) + return this.injectPromise(this.createToken, e, t); + const {name: n=!1, abbreviation: o=!1, description: s="", url: i=!1, totalSupply: a=0, trxRatio: u=1, tokenRatio: c=1, saleStart: l=Date.now(), saleEnd: d=!1, freeBandwidth: h=0, freeBandwidthLimit: p=0, frozenAmount: f=0, frozenDuration: g=0, voteScore: y, precision: b} = e; + if (this.validator.notValid([{ + name: "Supply amount", + type: "positive-integer", + value: a + }, { + name: "TRX ratio", + type: "positive-integer", + value: u + }, { + name: "Token ratio", + type: "positive-integer", + value: c + }, { + name: "token abbreviation", + type: "string", + value: o, + lte: 32, + gt: 0 + }, { + name: "token name", + type: "not-empty-string", + value: n + }, { + name: "token description", + type: "string", + value: s, + lte: 200 + }, { + name: "token url", + type: "url", + value: i + }, { + name: "token url", + type: "string", + value: i, + lte: 256 + }, { + name: "issuer", + type: "address", + value: t + }, { + name: "sale start timestamp", + type: "integer", + value: l, + gte: Date.now() + }, { + name: "sale end timestamp", + type: "integer", + value: d, + gt: l + }, { + name: "Frozen supply", + type: "integer", + value: f, + gte: 0 + }, { + name: "Frozen duration", + type: "integer", + value: g, + gte: 0 + }], r)) + return; + if (Dp.isNotNullOrUndefined(y) && (!Dp.isInteger(y) || y <= 0)) + return r("voteScore must be a positive integer greater than 0"); + if (Dp.isNotNullOrUndefined(b) && (!Dp.isInteger(b) || b < 0 || b > 6)) + return r("precision must be a positive integer >= 0 and <= 6"); + const m = { + owner_address: qp(t), + name: Jp(n), + abbr: Jp(o), + description: Jp(s), + url: Jp(i), + total_supply: parseInt(a), + trx_num: parseInt(u), + num: parseInt(c), + start_time: parseInt(l), + end_time: parseInt(d), + frozen_supply: [{ + frozen_amount: parseInt(f), + frozen_days: parseInt(g) + }] + }; + ["name", "abbr", "description", "url"].forEach((e=>{ + m[e] || delete m[e] + } + )), + parseInt(f) > 0 || delete m.frozen_supply, + h && !isNaN(parseInt(h)) && parseInt(h) >= 0 && (m.free_asset_net_limit = parseInt(h)), + p && !isNaN(parseInt(p)) && parseInt(p) >= 0 && (m.public_free_asset_net_limit = parseInt(p)), + b && !isNaN(parseInt(b)) && (m.precision = parseInt(b)), + y && !isNaN(parseInt(y)) && (m.vote_score = parseInt(y)), + Xp(this.tronWeb, "AssetIssueContract", m, e?.permissionId).then((e=>r(null, e))).catch((e=>r(e))) + } + createAccount(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 ? arguments[2] : void 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + Dp.isFunction(t) ? (n = t, + t = this.tronWeb.defaultAddress.hex) : Dp.isObject(t) && (r = t, + t = this.tronWeb.defaultAddress.hex), + !n) + return this.injectPromise(this.createAccount, e, t, r); + if (this.validator.notValid([{ + name: "account", + type: "address", + value: e + }, { + name: "origin", + type: "address", + value: t + }], n)) + return; + const o = { + owner_address: qp(t), + account_address: qp(e) + }; + Xp(this.tronWeb, "AccountCreateContract", o, r?.permissionId).then((e=>n(null, e))).catch((e=>n(e))) + } + updateAccount() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 ? arguments[2] : void 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + Dp.isFunction(t) ? (n = t, + t = this.tronWeb.defaultAddress.hex) : Dp.isObject(t) && (r = t, + t = this.tronWeb.defaultAddress.hex), + !n) + return this.injectPromise(this.updateAccount, e, t, r); + if (this.validator.notValid([{ + name: "Name", + type: "string", + lte: 200, + gt: 0, + value: e, + msg: "Invalid accountName" + }, { + name: "origin", + type: "address", + value: t + }], n)) + return; + const o = { + account_name: Jp(e), + owner_address: qp(t) + }; + Xp(this.tronWeb, "AccountUpdateContract", o, r?.permissionId).then((e=>n(null, e))).catch((e=>n(e))) + } + setAccountId(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 ? arguments[2] : void 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + Dp.isFunction(t) ? (n = t, + t = this.tronWeb.defaultAddress.hex) : Dp.isObject(t) && (r = t, + t = this.tronWeb.defaultAddress.hex), + !n) + return this.injectPromise(this.setAccountId, e, t, r); + if (e && Dp.isString(e) && e.startsWith("0x") && (e = e.slice(2)), + this.validator.notValid([{ + name: "accountId", + type: "hex", + value: e + }, { + name: "accountId", + type: "string", + lte: 32, + gte: 8, + value: e + }, { + name: "origin", + type: "address", + value: t + }], n)) + return; + const o = { + account_id: e, + owner_address: qp(t) + }; + Xp(this.tronWeb, "SetAccountIdContract", o, r?.permissionId).then((e=>n(null, e))).catch((e=>n(e))) + } + updateToken() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) ? (r = t, + t = this.tronWeb.defaultAddress.hex) : Dp.isObject(t) && (e = t, + t = this.tronWeb.defaultAddress.hex), + !r) + return this.injectPromise(this.updateToken, e, t); + const {description: n="", url: o=!1, freeBandwidth: s=0, freeBandwidthLimit: i=0} = e; + if (this.validator.notValid([{ + name: "token description", + type: "string", + value: n, + lte: 200 + }, { + name: "token url", + type: "url", + value: o + }, { + name: "token url", + type: "string", + value: o, + lte: 256 + }, { + name: "issuer", + type: "address", + value: t + }], r)) + return; + const a = { + owner_address: qp(t), + description: Jp(n), + url: Jp(o) + }; + s && !isNaN(parseInt(s)) && parseInt(s) >= 0 && (a.new_limit = parseInt(s)), + i && !isNaN(parseInt(i)) && parseInt(i) >= 0 && (a.new_public_limit = parseInt(i)), + Xp(this.tronWeb, "UpdateAssetContract", a, e?.permissionId).then((e=>r(null, e))).catch((e=>r(e))) + } + sendAsset() { + return this.sendToken(...arguments) + } + purchaseAsset() { + return this.purchaseToken(...arguments) + } + createAsset() { + return this.createToken(...arguments) + } + updateAsset() { + return this.updateToken(...arguments) + } + createProposal() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 ? arguments[2] : void 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + Dp.isFunction(t) ? (n = t, + t = this.tronWeb.defaultAddress.hex) : Dp.isObject(t) && (r = t, + t = this.tronWeb.defaultAddress.hex), + !n) + return this.injectPromise(this.createProposal, e, t, r); + if (this.validator.notValid([{ + name: "issuer", + type: "address", + value: t + }], n)) + return; + const o = "Invalid proposal parameters provided"; + if (!e) + return n(o); + Dp.isArray(e) || (e = [e]); + for (let t of e) + if (!Dp.isObject(t)) + return n(o); + const s = { + owner_address: qp(t), + parameters: e + }; + Xp(this.tronWeb, "ProposalCreateContract", s, r?.permissionId).then((e=>n(null, e))).catch((e=>n(e))) + } + deleteProposal() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 ? arguments[2] : void 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + Dp.isFunction(t) ? (n = t, + t = this.tronWeb.defaultAddress.hex) : Dp.isObject(t) && (r = t, + t = this.tronWeb.defaultAddress.hex), + !n) + return this.injectPromise(this.deleteProposal, e, t, r); + if (this.validator.notValid([{ + name: "issuer", + type: "address", + value: t + }, { + name: "proposalID", + type: "integer", + value: e, + gte: 0 + }], n)) + return; + const o = { + owner_address: qp(t), + proposal_id: parseInt(e) + }; + Xp(this.tronWeb, "ProposalDeleteContract", o, r?.permissionId).then((e=>n(null, e))).catch((e=>n(e))) + } + voteProposal() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.tronWeb.defaultAddress.hex + , n = arguments.length > 3 ? arguments[3] : void 0 + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = {}), + Dp.isFunction(r) ? (o = r, + r = this.tronWeb.defaultAddress.hex) : Dp.isObject(r) && (n = r, + r = this.tronWeb.defaultAddress.hex), + !o) + return this.injectPromise(this.voteProposal, e, t, r, n); + if (this.validator.notValid([{ + name: "voter", + type: "address", + value: r + }, { + name: "proposalID", + type: "integer", + value: e, + gte: 0 + }, { + name: "has approval", + type: "boolean", + value: t + }], o)) + return; + const s = { + owner_address: qp(r), + proposal_id: parseInt(e), + is_add_approval: t + }; + Xp(this.tronWeb, "ProposalApproveContract", s, n?.permissionId).then((e=>o(null, e))).catch((e=>o(e))) + } + createTRXExchange(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.tronWeb.defaultAddress.hex + , o = arguments.length > 4 ? arguments[4] : void 0 + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (Dp.isFunction(o) && (s = o, + o = {}), + Dp.isFunction(n) ? (s = n, + n = this.tronWeb.defaultAddress.hex) : Dp.isObject(n) && (o = n, + n = this.tronWeb.defaultAddress.hex), + !s) + return this.injectPromise(this.createTRXExchange, e, t, r, n, o); + if (this.validator.notValid([{ + name: "owner", + type: "address", + value: n + }, { + name: "token name", + type: "not-empty-string", + value: e + }, { + name: "token balance", + type: "positive-integer", + value: t + }, { + name: "trx balance", + type: "positive-integer", + value: r + }], s)) + return; + const i = { + owner_address: qp(n), + first_token_id: Jp(e), + first_token_balance: t, + second_token_id: "5f", + second_token_balance: r + }; + Xp(this.tronWeb, "ExchangeCreateContract", i, o?.permissionId).then((e=>s(null, e))).catch((e=>s(e))) + } + createTokenExchange(e, t, r, n) { + let o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.tronWeb.defaultAddress.hex + , s = arguments.length > 5 ? arguments[5] : void 0 + , i = arguments.length > 6 && void 0 !== arguments[6] && arguments[6]; + if (Dp.isFunction(s) && (i = s, + s = {}), + Dp.isFunction(o) ? (i = o, + o = this.tronWeb.defaultAddress.hex) : Dp.isObject(o) && (s = o, + o = this.tronWeb.defaultAddress.hex), + !i) + return this.injectPromise(this.createTokenExchange, e, t, r, n, o, s); + if (this.validator.notValid([{ + name: "owner", + type: "address", + value: o + }, { + name: "first token name", + type: "not-empty-string", + value: e + }, { + name: "second token name", + type: "not-empty-string", + value: r + }, { + name: "first token balance", + type: "positive-integer", + value: t + }, { + name: "second token balance", + type: "positive-integer", + value: n + }], i)) + return; + const a = { + owner_address: qp(o), + first_token_id: Jp(e), + first_token_balance: t, + second_token_id: Jp(r), + second_token_balance: n + }; + Xp(this.tronWeb, "ExchangeCreateContract", a, s?.permissionId).then((e=>i(null, e))).catch((e=>i(e))) + } + injectExchangeTokens() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0 + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.tronWeb.defaultAddress.hex + , o = arguments.length > 4 ? arguments[4] : void 0 + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (Dp.isFunction(o) && (s = o, + o = {}), + Dp.isFunction(n) ? (s = n, + n = this.tronWeb.defaultAddress.hex) : Dp.isObject(n) && (o = n, + n = this.tronWeb.defaultAddress.hex), + !s) + return this.injectPromise(this.injectExchangeTokens, e, t, r, n, o); + if (this.validator.notValid([{ + name: "owner", + type: "address", + value: n + }, { + name: "token name", + type: "not-empty-string", + value: t + }, { + name: "token amount", + type: "integer", + value: r, + gte: 1 + }, { + name: "exchangeID", + type: "integer", + value: e, + gte: 0 + }], s)) + return; + const i = { + owner_address: qp(n), + exchange_id: parseInt(e), + token_id: Jp(t), + quant: parseInt(r) + }; + Xp(this.tronWeb, "ExchangeInjectContract", i, o?.permissionId).then((e=>s(null, e))).catch((e=>s(e))) + } + withdrawExchangeTokens() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0 + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.tronWeb.defaultAddress.hex + , o = arguments.length > 4 ? arguments[4] : void 0 + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (Dp.isFunction(o) && (s = o, + o = {}), + Dp.isFunction(n) ? (s = n, + n = this.tronWeb.defaultAddress.hex) : Dp.isObject(n) && (o = n, + n = this.tronWeb.defaultAddress.hex), + !s) + return this.injectPromise(this.withdrawExchangeTokens, e, t, r, n, o); + if (this.validator.notValid([{ + name: "owner", + type: "address", + value: n + }, { + name: "token name", + type: "not-empty-string", + value: t + }, { + name: "token amount", + type: "integer", + value: r, + gte: 1 + }, { + name: "exchangeID", + type: "integer", + value: e, + gte: 0 + }], s)) + return; + const i = { + owner_address: qp(n), + exchange_id: parseInt(e), + token_id: Jp(t), + quant: parseInt(r) + }; + Xp(this.tronWeb, "ExchangeWithdrawContract", i, o?.permissionId).then((e=>s(null, e))).catch((e=>s(e))) + } + tradeExchangeTokens() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0 + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0 + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.tronWeb.defaultAddress.hex + , s = arguments.length > 5 ? arguments[5] : void 0 + , i = arguments.length > 6 && void 0 !== arguments[6] && arguments[6]; + if (Dp.isFunction(s) && (i = s, + s = {}), + Dp.isFunction(o) ? (i = o, + o = this.tronWeb.defaultAddress.hex) : Dp.isObject(o) && (s = o, + o = this.tronWeb.defaultAddress.hex), + !i) + return this.injectPromise(this.tradeExchangeTokens, e, t, r, n, o, s); + if (this.validator.notValid([{ + name: "owner", + type: "address", + value: o + }, { + name: "token name", + type: "not-empty-string", + value: t + }, { + name: "tokenAmountSold", + type: "integer", + value: r, + gte: 1 + }, { + name: "tokenAmountExpected", + type: "integer", + value: n, + gte: 1 + }, { + name: "exchangeID", + type: "integer", + value: e, + gte: 0 + }], i)) + return; + const a = { + owner_address: qp(o), + exchange_id: parseInt(e), + token_id: this.tronWeb.fromAscii(t).replace(/^0x/, ""), + quant: parseInt(r), + expected: parseInt(n) + }; + Xp(this.tronWeb, "ExchangeTransactionContract", a, s?.permissionId).then((e=>i(null, e))).catch((e=>i(e))) + } + updateSetting() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.tronWeb.defaultAddress.hex + , n = arguments.length > 3 ? arguments[3] : void 0 + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = {}), + Dp.isFunction(r) ? (o = r, + r = this.tronWeb.defaultAddress.hex) : Dp.isObject(r) && (n = r, + r = this.tronWeb.defaultAddress.hex), + !o) + return this.injectPromise(this.updateSetting, e, t, r, n); + if (this.validator.notValid([{ + name: "owner", + type: "address", + value: r + }, { + name: "contract", + type: "address", + value: e + }, { + name: "userFeePercentage", + type: "integer", + value: t, + gte: 0, + lte: 100 + }], o)) + return; + const s = { + owner_address: qp(r), + contract_address: qp(e), + consume_user_resource_percent: t + }; + Xp(this.tronWeb, "UpdateSettingContract", s, n?.permissionId).then((e=>o(null, e))).catch((e=>o(e))) + } + updateEnergyLimit() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.tronWeb.defaultAddress.hex + , n = arguments.length > 3 ? arguments[3] : void 0 + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = {}), + Dp.isFunction(r) ? (o = r, + r = this.tronWeb.defaultAddress.hex) : Dp.isObject(r) && (n = r, + r = this.tronWeb.defaultAddress.hex), + !o) + return this.injectPromise(this.updateEnergyLimit, e, t, r, n); + if (this.validator.notValid([{ + name: "owner", + type: "address", + value: r + }, { + name: "contract", + type: "address", + value: e + }, { + name: "originEnergyLimit", + type: "integer", + value: t, + gte: 0, + lte: 1e7 + }], o)) + return; + const s = { + owner_address: qp(r), + contract_address: qp(e), + origin_energy_limit: t + }; + Xp(this.tronWeb, "UpdateEnergyLimitContract", s, n?.permissionId).then((e=>o(null, e))).catch((e=>o(e))) + } + checkPermissions(e, t) { + if (e) { + if (e.type !== t || !e.permission_name || !Dp.isString(e.permission_name) || !Dp.isInteger(e.threshold) || e.threshold < 1 || !e.keys) + return !1; + for (let r of e.keys) + if (!this.tronWeb.isAddress(r.address) || !Dp.isInteger(r.weight) || r.weight > e.threshold || r.weight < 1 || 2 === t && !e.operations) + return !1 + } + return !0 + } + updateAccountPermissions() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3] + , o = arguments.length > 4 ? arguments[4] : void 0 + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (Dp.isFunction(o) && (s = o, + o = {}), + Dp.isFunction(n) && (s = n, + n = !1), + Dp.isFunction(r) && (s = r, + r = n = !1), + Dp.isFunction(t) && (s = t, + t = r = n = !1), + !s) + return this.injectPromise(this.updateAccountPermissions, e, t, r, n, o); + if (!this.tronWeb.isAddress(e)) + return s("Invalid ownerAddress provided"); + if (!this.checkPermissions(t, 0)) + return s("Invalid ownerPermissions provided"); + if (!this.checkPermissions(r, 1)) + return s("Invalid witnessPermissions provided"); + Array.isArray(n) || (n = [n]); + for (let e of n) + if (!this.checkPermissions(e, 2)) + return s("Invalid activesPermissions provided"); + const i = { + owner_address: qp(e) + }; + if (t) { + const e = Yp(t); + "type"in e && delete e.type, + i.owner = e + } + if (r) { + const e = Yp(r); + e.type = "Witness", + i.witness = e + } + if (n) { + const e = Yp(n); + e.forEach((e=>{ + e.type = "Active" + } + )), + i.actives = e + } + Xp(this.tronWeb, "AccountPermissionUpdateContract", i, o?.permissionId).then((e=>s(null, e))).catch((e=>s(e))) + } + async newTxID(e, t, r) { + if (Dp.isFunction(t) && (r = t, + t = {}), + !r) + return this.injectPromise(this.newTxID, e, t); + if (t?.txLocal) { + const t = e.raw_data.contract[0]; + Xp(this.tronWeb, t.type, t.parameter.value, t.Permission_id, { + fee_limit: e.raw_data.fee_limit, + data: e.raw_data.data, + ref_block_bytes: e.raw_data.ref_block_bytes, + ref_block_hash: e.raw_data.ref_block_hash, + expiration: e.raw_data.expiration, + timestamp: e.raw_data.timestamp + }).then((t=>{ + t.signature = e.signature, + t.visible = e.visible, + r(null, t) + } + )).catch((e=>r("Error generating a new transaction id."))) + } else + this.tronWeb.fullNode.request("wallet/getsignweight", e, "post").then((t=>("boolean" == typeof e.visible && (t.transaction.transaction.visible = e.visible), + function(e, t, r, n) { + return "function" == typeof r && (n = r), + "function" == typeof t && (n = t, + t = null), + e.Error ? n(e.Error) : e.result && e.result.message ? n(Zp.tronWeb.toUtf8(e.result.message)) : fp(e, t, r) ? n(null, e) : n("Invalid transaction") + }(t.transaction.transaction, { + ...e.raw_data.contract[0].parameter.value, + Permission_id: e.raw_data.contract[0].Permission_id + }, { + data: e.raw_data.data, + fee_limit: e.raw_data.fee_limit + }, r)))).catch((e=>r("Error generating a new transaction id."))) + } + async alterTransaction(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (!r) + return this.injectPromise(this.alterTransaction, e, t); + if (e.signature) + return r("You can not extend the expiration of a signed transaction."); + if (t.data) { + if ("hex" !== t.dataFormat && (t.data = this.tronWeb.toHex(t.data)), + t.data = t.data.replace(/^0x/, ""), + 0 === t.data.length) + return r("Invalid data provided"); + e.raw_data.data = t.data + } + if (t.extension) { + if (t.extension = parseInt(1e3 * t.extension), + isNaN(t.extension) || e.raw_data.expiration + t.extension <= Date.now() + 3e3) + return r("Invalid extension provided"); + e.raw_data.expiration += t.extension + } + this.newTxID(e, { + txLocal: t.txLocal + }, r) + } + async extendExpiration(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + !n) + return this.injectPromise(this.extendExpiration, e, t, r); + this.alterTransaction(e, { + extension: t, + txLocal: r?.txLocal + }, n) + } + async addUpdateData(e, t) { + let r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "utf8" + , n = arguments.length > 3 ? arguments[3] : void 0 + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = {}), + Dp.isFunction(r) ? (o = r, + r = "utf8") : Dp.isObject(r) && (n = r, + r = "utf8"), + !o) + return this.injectPromise(this.addUpdateData, e, t, r, n); + this.alterTransaction(e, { + data: t, + dataFormat: r, + txLocal: n?.txLocal + }, o) + } + } + const ef = "TRON Signed Message:\n32" + , tf = "Ethereum Signed Message:\n32"; + function rf(e) { + return pf.address.toHex(e) + } + class nf { + constructor() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e || !e instanceof pf) + throw new Error("Expected instance of TronWeb"); + this.tronWeb = e, + this.injectPromise = Hp()(this), + this.cache = { + contracts: {} + }, + this.validator = new Kp(e) + } + _parseToken(e) { + return { + ...e, + name: this.tronWeb.toUtf8(e.name), + abbr: e.abbr && this.tronWeb.toUtf8(e.abbr), + description: e.description && this.tronWeb.toUtf8(e.description), + url: e.url && this.tronWeb.toUtf8(e.url) + } + } + getCurrentBlock() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e) + return this.injectPromise(this.getCurrentBlock); + this.tronWeb.fullNode.request("wallet/getnowblock").then((t=>{ + e(null, t) + } + )).catch((t=>e(t))) + } + getConfirmedCurrentBlock() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e) + return this.injectPromise(this.getConfirmedCurrentBlock); + this.tronWeb.solidityNode.request("walletsolidity/getnowblock").then((t=>{ + e(null, t) + } + )).catch((t=>e(t))) + } + getBlock() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultBlock + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return Dp.isFunction(e) && (t = e, + e = this.tronWeb.defaultBlock), + t ? !1 === e ? t("No block identifier provided") : ("earliest" == e && (e = 0), + "latest" == e ? this.getCurrentBlock(t) : isNaN(e) && Dp.isHex(e) ? this.getBlockByHash(e, t) : void this.getBlockByNumber(e, t)) : this.injectPromise(this.getBlock, e) + } + getBlockByHash(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if (!t) + return this.injectPromise(this.getBlockByHash, e); + this.tronWeb.fullNode.request("wallet/getblockbyid", { + value: e + }, "post").then((e=>{ + if (!Object.keys(e).length) + return t("Block not found"); + t(null, e) + } + )).catch((e=>t(e))) + } + getBlockByNumber(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return t ? !Dp.isInteger(e) || e < 0 ? t("Invalid block number provided") : void this.tronWeb.fullNode.request("wallet/getblockbynum", { + num: parseInt(e) + }, "post").then((e=>{ + if (!Object.keys(e).length) + return t("Block not found"); + t(null, e) + } + )).catch((e=>t(e))) : this.injectPromise(this.getBlockByNumber, e) + } + getBlockTransactionCount() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultBlock + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if (Dp.isFunction(e) && (t = e, + e = this.tronWeb.defaultBlock), + !t) + return this.injectPromise(this.getBlockTransactionCount, e); + this.getBlock(e).then((e=>{ + let {transactions: r=[]} = e; + t(null, r.length) + } + )).catch((e=>t(e))) + } + getTransactionFromBlock() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultBlock + , t = arguments.length > 1 ? arguments[1] : void 0 + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = 0), + Dp.isFunction(e) && (r = e, + e = this.tronWeb.defaultBlock), + !r) + return this.injectPromise(this.getTransactionFromBlock, e, t); + this.getBlock(e).then((e=>{ + let {transactions: n=!1} = e; + n ? "number" == typeof t ? t >= 0 && t < n.length ? r(null, n[t]) : r("Invalid transaction index provided") : r(null, n) : r("Transaction not found in block") + } + )).catch((e=>r(e))) + } + getTransaction(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if (!t) + return this.injectPromise(this.getTransaction, e); + this.tronWeb.fullNode.request("wallet/gettransactionbyid", { + value: e + }, "post").then((e=>{ + if (!Object.keys(e).length) + return t("Transaction not found"); + t(null, e) + } + )).catch((e=>t(e))) + } + getConfirmedTransaction(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if (!t) + return this.injectPromise(this.getConfirmedTransaction, e); + this.tronWeb.solidityNode.request("walletsolidity/gettransactionbyid", { + value: e + }, "post").then((e=>{ + if (!Object.keys(e).length) + return t("Transaction not found"); + t(null, e) + } + )).catch((e=>t(e))) + } + getUnconfirmedTransactionInfo(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return this._getTransactionInfoById(e, { + confirmed: !1 + }, t) + } + getTransactionInfo(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return this._getTransactionInfoById(e, { + confirmed: !0 + }, t) + } + _getTransactionInfoById(e, t) { + let r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (!r) + return this.injectPromise(this._getTransactionInfoById, e, t); + this.tronWeb[t.confirmed ? "solidityNode" : "fullNode"].request(`wallet${t.confirmed ? "solidity" : ""}/gettransactioninfobyid`, { + value: e + }, "post").then((e=>{ + r(null, e) + } + )).catch((e=>r(e))) + } + getTransactionsToAddress() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 30 + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + return Dp.isFunction(r) && (n = r, + r = 0), + Dp.isFunction(t) && (n = t, + t = 30), + n ? (e = this.tronWeb.address.toHex(e), + this.getTransactionsRelated(e, "to", t, r, n)) : this.injectPromise(this.getTransactionsToAddress, e, t, r) + } + getTransactionsFromAddress() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 30 + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + return Dp.isFunction(r) && (n = r, + r = 0), + Dp.isFunction(t) && (n = t, + t = 30), + n ? (e = this.tronWeb.address.toHex(e), + this.getTransactionsRelated(e, "from", t, r, n)) : this.injectPromise(this.getTransactionsFromAddress, e, t, r) + } + async getTransactionsRelated() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "all" + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 30 + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0 + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = 0), + Dp.isFunction(r) && (o = r, + r = 30), + Dp.isFunction(t) && (o = t, + t = "all"), + Dp.isFunction(e) && (o = e, + e = this.tronWeb.defaultAddress.hex), + !o) + return this.injectPromise(this.getTransactionsRelated, e, t, r, n); + if (!["to", "from", "all"].includes(t)) + return o('Invalid direction provided: Expected "to", "from" or "all"'); + if ("all" == t) + try { + const [t,s] = await Promise.all([this.getTransactionsRelated(e, "from", r, n), this.getTransactionsRelated(e, "to", r, n)]); + return o(null, [...t.map((e=>(e.direction = "from", + e))), ...s.map((e=>(e.direction = "to", + e)))].sort(((e,t)=>t.raw_data.timestamp - e.raw_data.timestamp))) + } catch (e) { + return o(e) + } + return this.tronWeb.isAddress(e) ? !Dp.isInteger(r) || r < 0 || n && r < 1 ? o("Invalid limit provided") : !Dp.isInteger(n) || n < 0 ? o("Invalid offset provided") : (e = this.tronWeb.address.toHex(e), + void this.tronWeb.solidityNode.request(`walletextension/gettransactions${t}this`, { + account: { + address: e + }, + offset: n, + limit: r + }, "post").then((e=>{ + let {transaction: t} = e; + o(null, t) + } + )).catch((e=>o(e)))) : o("Invalid address provided") + } + getAccount() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return Dp.isFunction(e) && (t = e, + e = this.tronWeb.defaultAddress.hex), + t ? this.tronWeb.isAddress(e) ? (e = this.tronWeb.address.toHex(e), + void this.tronWeb.solidityNode.request("walletsolidity/getaccount", { + address: e + }, "post").then((e=>{ + t(null, e) + } + )).catch((e=>t(e)))) : t("Invalid address provided") : this.injectPromise(this.getAccount, e) + } + getAccountById() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if (!t) + return this.injectPromise(this.getAccountById, e); + this.getAccountInfoById(e, { + confirmed: !0 + }, t) + } + getAccountInfoById(e, t, r) { + this.validator.notValid([{ + name: "accountId", + type: "hex", + value: e + }, { + name: "accountId", + type: "string", + lte: 32, + gte: 8, + value: e + }], r) || (e.startsWith("0x") && (e = e.slice(2)), + this.tronWeb[t.confirmed ? "solidityNode" : "fullNode"].request(`wallet${t.confirmed ? "solidity" : ""}/getaccountbyid`, { + account_id: e + }, "post").then((e=>{ + r(null, e) + } + )).catch((e=>r(e)))) + } + getBalance() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if (Dp.isFunction(e) && (t = e, + e = this.tronWeb.defaultAddress.hex), + !t) + return this.injectPromise(this.getBalance, e); + this.getAccount(e).then((e=>{ + let {balance: r=0} = e; + t(null, r) + } + )).catch((e=>t(e))) + } + getUnconfirmedAccount() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return Dp.isFunction(e) && (t = e, + e = this.tronWeb.defaultAddress.hex), + t ? this.tronWeb.isAddress(e) ? (e = this.tronWeb.address.toHex(e), + void this.tronWeb.fullNode.request("wallet/getaccount", { + address: e + }, "post").then((e=>{ + t(null, e) + } + )).catch((e=>t(e)))) : t("Invalid address provided") : this.injectPromise(this.getUnconfirmedAccount, e) + } + getUnconfirmedAccountById(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if (!t) + return this.injectPromise(this.getUnconfirmedAccountById, e); + this.getAccountInfoById(e, { + confirmed: !1 + }, t) + } + getUnconfirmedBalance() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if (Dp.isFunction(e) && (t = e, + e = this.tronWeb.defaultAddress.hex), + !t) + return this.injectPromise(this.getUnconfirmedBalance, e); + this.getUnconfirmedAccount(e).then((e=>{ + let {balance: r=0} = e; + t(null, r) + } + )).catch((e=>t(e))) + } + getBandwidth() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return Dp.isFunction(e) && (t = e, + e = this.tronWeb.defaultAddress.hex), + t ? this.tronWeb.isAddress(e) ? (e = this.tronWeb.address.toHex(e), + void this.tronWeb.fullNode.request("wallet/getaccountnet", { + address: e + }, "post").then((e=>{ + let {freeNetUsed: r=0, freeNetLimit: n=0, NetUsed: o=0, NetLimit: s=0} = e; + t(null, n - r + (s - o)) + } + )).catch((e=>t(e)))) : t("Invalid address provided") : this.injectPromise(this.getBandwidth, e) + } + getTokensIssuedByAddress() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return Dp.isFunction(e) && (t = e, + e = this.tronWeb.defaultAddress.hex), + t ? this.tronWeb.isAddress(e) ? (e = this.tronWeb.address.toHex(e), + void this.tronWeb.fullNode.request("wallet/getassetissuebyaccount", { + address: e + }, "post").then((e=>{ + let {assetIssue: r=!1} = e; + if (!r) + return t(null, {}); + const n = r.map((e=>this._parseToken(e))).reduce(((e,t)=>(e[t.name] = t, + e)), {}); + t(null, n) + } + )).catch((e=>t(e)))) : t("Invalid address provided") : this.injectPromise(this.getTokensIssuedByAddress, e) + } + getTokenFromID() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return t ? (Dp.isInteger(e) && (e = e.toString()), + Dp.isString(e) && e.length ? void this.tronWeb.fullNode.request("wallet/getassetissuebyname", { + value: this.tronWeb.fromUtf8(e) + }, "post").then((e=>{ + if (!e.name) + return t("Token does not exist"); + t(null, this._parseToken(e)) + } + )).catch((e=>t(e))) : t("Invalid token ID provided")) : this.injectPromise(this.getTokenFromID, e) + } + listNodes() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e) + return this.injectPromise(this.listNodes); + this.tronWeb.fullNode.request("wallet/listnodes").then((t=>{ + let {nodes: r=[]} = t; + e(null, r.map((e=>{ + let {address: {host: t, port: r}} = e; + return `${this.tronWeb.toUtf8(t)}:${r}` + } + ))) + } + )).catch((t=>e(t))) + } + getBlockRange() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0 + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 30 + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return Dp.isFunction(t) && (r = t, + t = 30), + Dp.isFunction(e) && (r = e, + e = 0), + r ? !Dp.isInteger(e) || e < 0 ? r("Invalid start of range provided") : !Dp.isInteger(t) || t < e ? r("Invalid end of range provided") : t + 1 - e > 100 ? r("Invalid range size, which should be no more than 100.") : void this.tronWeb.fullNode.request("wallet/getblockbylimitnext", { + startNum: parseInt(e), + endNum: parseInt(t) + 1 + }, "post").then((e=>{ + let {block: t=[]} = e; + r(null, t) + } + )).catch((e=>r(e))) : this.injectPromise(this.getBlockRange, e, t) + } + listSuperRepresentatives() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e) + return this.injectPromise(this.listSuperRepresentatives); + this.tronWeb.fullNode.request("wallet/listwitnesses").then((t=>{ + let {witnesses: r=[]} = t; + e(null, r) + } + )).catch((t=>e(t))) + } + listTokens() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0 + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0 + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return Dp.isFunction(t) && (r = t, + t = 0), + Dp.isFunction(e) && (r = e, + e = 0), + r ? !Dp.isInteger(e) || e < 0 || t && e < 1 ? r("Invalid limit provided") : !Dp.isInteger(t) || t < 0 ? r("Invalid offset provided") : e ? void this.tronWeb.fullNode.request("wallet/getpaginatedassetissuelist", { + offset: parseInt(t), + limit: parseInt(e) + }, "post").then((e=>{ + let {assetIssue: t=[]} = e; + r(null, t.map((e=>this._parseToken(e)))) + } + )).catch((e=>r(e))) : this.tronWeb.fullNode.request("wallet/getassetissuelist").then((e=>{ + let {assetIssue: t=[]} = e; + r(null, t.map((e=>this._parseToken(e)))) + } + )).catch((e=>r(e))) : this.injectPromise(this.listTokens, e, t) + } + timeUntilNextVoteCycle() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e) + return this.injectPromise(this.timeUntilNextVoteCycle); + this.tronWeb.fullNode.request("wallet/getnextmaintenancetime").then((t=>{ + let {num: r=-1} = t; + if (-1 == r) + return e("Failed to get time until next vote cycle"); + e(null, Math.floor(r / 1e3)) + } + )).catch((t=>e(t))) + } + getContract(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return t ? this.tronWeb.isAddress(e) ? void (this.cache.contracts[e] ? t(null, this.cache.contracts[e]) : (e = this.tronWeb.address.toHex(e), + this.tronWeb.fullNode.request("wallet/getcontract", { + value: e + }).then((r=>{ + if (r.Error) + return t("Contract does not exist"); + this.cache.contracts[e] = r, + t(null, r) + } + )).catch((e=>t(e))))) : t("Invalid contract address provided") : this.injectPromise(this.getContract, e) + } + async verifyMessage() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this.tronWeb.defaultAddress.base58 + , n = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3] + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + return Dp.isFunction(r) && (o = r, + r = this.tronWeb.defaultAddress.base58, + n = !0), + Dp.isFunction(n) && (o = n, + n = !0), + o ? Dp.isHex(e) ? nf.verifySignature(e, r, t, n) ? o(null, !0) : void o("Signature does not match") : o("Expected hex message input") : this.injectPromise(this.verifyMessage, e, t, r, n) + } + static verifySignature(e, t, r) { + let n = !(arguments.length > 3 && void 0 !== arguments[3]) || arguments[3]; + e = e.replace(/^0x/, ""), + r = r.replace(/^0x/, ""); + const o = [...Lt(n ? ef : tf), ...Dp.code.hexStr2byteArray(e)] + , s = Sn(ir(new Uint8Array(o)), { + yParity: "1c" == r.substring(128, 130) ? 1 : 0, + r: "0x" + r.substring(0, 64), + s: "0x" + r.substring(64, 128) + }) + , i = P + s.substr(2); + return pf.address.fromHex(i) == pf.address.fromHex(t) + } + verifyMessageV2() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {} + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + !n) + return this.injectPromise(this.verifyMessageV2, e, t, r); + try { + n(null, nf.verifyMessageV2(e, t)) + } catch (e) { + n(e) + } + } + static verifyMessageV2(e, t) { + return Dp.message.verifyMessage(e, t) + } + verifyTypedData(e, t, r, n) { + let o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.tronWeb.defaultAddress.base58 + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + return Dp.isFunction(o) && (s = o, + o = this.tronWeb.defaultAddress.base58), + s ? nf.verifyTypedData(e, t, r, n, o) ? s(null, !0) : void s("Signature does not match") : this.injectPromise(this.verifyTypedData, e, t, r, n, o) + } + static verifyTypedData(e, t, r, n, o) { + n = n.replace(/^0x/, ""); + const s = Sn(Dp._TypedDataEncoder.hash(e, t, r), { + yParity: "1c" == n.substring(128, 130) ? 1 : 0, + r: "0x" + n.substring(0, 64), + s: "0x" + n.substring(64, 128) + }) + , i = P + s.substr(2); + return pf.address.fromHex(i) == pf.address.fromHex(o) + } + async sign() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultPrivateKey + , r = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2] + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3] + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = !1), + Dp.isFunction(r) && (o = r, + r = !0, + n = !1), + Dp.isFunction(t) && (o = t, + t = this.tronWeb.defaultPrivateKey, + r = !0, + n = !1), + !o) + return this.injectPromise(this.sign, e, t, r, n); + if (Dp.isString(e)) { + if (!Dp.isHex(e)) + return o("Expected hex message input"); + try { + return o(null, nf.signString(e, t, r)) + } catch (e) { + o(e) + } + } + if (!Dp.isObject(e)) + return o("Invalid transaction provided"); + if (!n && e.signature) + return o("Transaction is already signed"); + try { + if (!n) { + if (this.tronWeb.address.toHex(this.tronWeb.address.fromPrivateKey(t)).toLowerCase() !== this.tronWeb.address.toHex(e.raw_data.contract[0].parameter.value.owner_address)) + return o("Private key does not match address in transaction"); + if (!pp(e)) + return o("Invalid transaction") + } + return o(null, Dp.crypto.signTransaction(t, e)) + } catch (e) { + o(e) + } + } + static signString(e, t) { + let r = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2]; + e = e.replace(/^0x/, ""); + const n = `0x${t.replace(/^0x/, "")}` + , o = new Fn(n) + , s = [...Lt(r ? ef : tf), ...Dp.code.hexStr2byteArray(e)] + , i = ir(new Uint8Array(s)) + , a = o.sign(i); + return ["0x", a.r.substring(2), a.s.substring(2), Number(a.v).toString(16)].join("") + } + signMessageV2(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultPrivateKey + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {} + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + Dp.isFunction(t) && (n = t, + t = this.tronWeb.defaultPrivateKey), + !n) + return this.injectPromise(this.signMessageV2, e, t); + try { + return n(null, nf.signMessageV2(e, t)) + } catch (e) { + n(e) + } + } + static signMessageV2(e, t) { + return Dp.message.signMessage(e, t) + } + _signTypedData(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.tronWeb.defaultPrivateKey + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = this.tronWeb.defaultPrivateKey), + !o) + return this.injectPromise(this._signTypedData, e, t, r, n); + try { + return o(null, nf._signTypedData(e, t, r, n)) + } catch (e) { + o(e) + } + } + static _signTypedData(e, t, r, n) { + return Dp.crypto._signTypedData(e, t, r, n) + } + async multiSign() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultPrivateKey + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = 0), + Dp.isFunction(t) && (n = t, + t = this.tronWeb.defaultPrivateKey, + r = 0), + !n) + return this.injectPromise(this.multiSign, e, t, r); + if (!Dp.isObject(e) || !e.raw_data || !e.raw_data.contract) + return n("Invalid transaction provided"); + if (!e.raw_data.contract[0].Permission_id && r > 0) { + e.raw_data.contract[0].Permission_id = r; + const o = this.tronWeb.address.toHex(this.tronWeb.address.fromPrivateKey(t)).toLowerCase() + , s = await this.getSignWeight(e, r); + if ("PERMISSION_ERROR" === s.result.code) + return n(s.result.message); + let i = !1; + if (s.permission.keys.map((e=>{ + e.address === o && (i = !0) + } + )), + !i) + return n(t + " has no permission to sign"); + if (s.approved_list && -1 != s.approved_list.indexOf(o)) + return n(t + " already sign transaction"); + if (!s.transaction || !s.transaction.transaction) + return n("Invalid transaction provided"); + e = s.transaction.transaction, + r > 0 && (e.raw_data.contract[0].Permission_id = r) + } + try { + return pp(e) ? n(null, Dp.crypto.signTransaction(t, e)) : n("Invalid transaction") + } catch (e) { + n(e) + } + } + async getApprovedList(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return t ? Dp.isObject(e) ? void this.tronWeb.fullNode.request("wallet/getapprovedlist", e, "post").then((e=>{ + t(null, e) + } + )).catch((e=>t(e))) : t("Invalid transaction provided") : this.injectPromise(this.getApprovedList, e) + } + async getSignWeight(e, t) { + let r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return Dp.isFunction(t) && (r = t, + t = void 0), + r ? Dp.isObject(e) && e.raw_data && e.raw_data.contract ? (Dp.isInteger(t) ? e.raw_data.contract[0].Permission_id = parseInt(t) : "number" != typeof e.raw_data.contract[0].Permission_id && (e.raw_data.contract[0].Permission_id = 0), + Dp.isObject(e) ? void this.tronWeb.fullNode.request("wallet/getsignweight", e, "post").then((e=>{ + r(null, e) + } + )).catch((e=>r(e))) : r("Invalid transaction provided")) : r("Invalid transaction provided") : this.injectPromise(this.getSignWeight, e, t) + } + sendRawTransaction() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return Dp.isFunction(t) && (r = t, + t = {}), + r ? Dp.isObject(e) ? Dp.isObject(t) ? e.signature && Dp.isArray(e.signature) ? void this.tronWeb.fullNode.request("wallet/broadcasttransaction", e, "post").then((t=>{ + t.result && (t.transaction = e), + r(null, t) + } + )).catch((e=>r(e))) : r("Transaction is not signed") : r("Invalid options provided") : r("Invalid transaction provided") : this.injectPromise(this.sendRawTransaction, e, t) + } + sendHexTransaction() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = {}), + !r) + return this.injectPromise(this.sendHexTransaction, e, t); + if (!Dp.isHex(e)) + return r("Invalid hex transaction provided"); + if (!Dp.isObject(t)) + return r("Invalid options provided"); + const n = { + transaction: e + }; + this.tronWeb.fullNode.request("wallet/broadcasthex", n, "post").then((t=>{ + t.result && (t.transaction = JSON.parse(t.transaction), + t.hexTransaction = e), + r(null, t) + } + )).catch((e=>r(e))) + } + async sendTransaction() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {} + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + "string" == typeof r && (r = { + privateKey: r + }), + !n) + return this.injectPromise(this.sendTransaction, e, t, r); + if (!this.tronWeb.isAddress(e)) + return n("Invalid recipient provided"); + if (!Dp.isInteger(t) || t <= 0) + return n("Invalid amount provided"); + if (r = { + privateKey: this.tronWeb.defaultPrivateKey, + address: this.tronWeb.defaultAddress.hex, + ...r + }, + !r.privateKey && !r.address) + return n("Function requires either a private key or address to be set"); + try { + const o = r.privateKey ? this.tronWeb.address.fromPrivateKey(r.privateKey) : r.address + , s = await this.tronWeb.transactionBuilder.sendTrx(e, t, o) + , i = await this.sign(s, r.privateKey || void 0); + return n(null, await this.sendRawTransaction(i)) + } catch (e) { + return n(e) + } + } + async sendToken() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {} + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(n) && (o = n, + n = {}), + "string" == typeof n && (n = { + privateKey: n + }), + !o) + return this.injectPromise(this.sendToken, e, t, r, n); + if (!this.tronWeb.isAddress(e)) + return o("Invalid recipient provided"); + if (!Dp.isInteger(t) || t <= 0) + return o("Invalid amount provided"); + if (Dp.isInteger(r) && (r = r.toString()), + !Dp.isString(r)) + return o("Invalid token ID provided"); + if (n = { + privateKey: this.tronWeb.defaultPrivateKey, + address: this.tronWeb.defaultAddress.hex, + ...n + }, + !n.privateKey && !n.address) + return o("Function requires either a private key or address to be set"); + try { + const s = n.privateKey ? this.tronWeb.address.fromPrivateKey(n.privateKey) : n.address + , i = await this.tronWeb.transactionBuilder.sendToken(e, t, r, s) + , a = await this.sign(i, n.privateKey || void 0); + return o(null, await this.sendRawTransaction(a)) + } catch (e) { + return o(e) + } + } + async freezeBalance() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0 + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 3 + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "BANDWIDTH" + , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {} + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : void 0 + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (Dp.isFunction(o) && (s = o, + o = void 0), + Dp.isFunction(t) && (s = t, + t = 3), + Dp.isFunction(r) && (s = r, + r = "BANDWIDTH"), + Dp.isFunction(n) && (s = n, + n = {}), + "string" == typeof n && (n = { + privateKey: n + }), + !s) + return this.injectPromise(this.freezeBalance, e, t, r, n, o); + if (!["BANDWIDTH", "ENERGY"].includes(r)) + return s('Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'); + if (!Dp.isInteger(e) || e <= 0) + return s("Invalid amount provided"); + if (!Dp.isInteger(t) || t < 3) + return s("Invalid duration provided, minimum of 3 days"); + if (n = { + privateKey: this.tronWeb.defaultPrivateKey, + address: this.tronWeb.defaultAddress.hex, + ...n + }, + !n.privateKey && !n.address) + return s("Function requires either a private key or address to be set"); + try { + const i = n.privateKey ? this.tronWeb.address.fromPrivateKey(n.privateKey) : n.address + , a = await this.tronWeb.transactionBuilder.freezeBalance(e, t, r, i, o) + , u = await this.sign(a, n.privateKey || void 0); + return s(null, await this.sendRawTransaction(u)) + } catch (e) { + return s(e) + } + } + async unfreezeBalance() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "BANDWIDTH" + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : void 0 + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = void 0), + Dp.isFunction(e) && (n = e, + e = "BANDWIDTH"), + Dp.isFunction(t) && (n = t, + t = {}), + "string" == typeof t && (t = { + privateKey: t + }), + !n) + return this.injectPromise(this.unfreezeBalance, e, t, r); + if (!["BANDWIDTH", "ENERGY"].includes(e)) + return n('Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'); + if (t = { + privateKey: this.tronWeb.defaultPrivateKey, + address: this.tronWeb.defaultAddress.hex, + ...t + }, + !t.privateKey && !t.address) + return n("Function requires either a private key or address to be set"); + try { + const o = t.privateKey ? this.tronWeb.address.fromPrivateKey(t.privateKey) : t.address + , s = await this.tronWeb.transactionBuilder.unfreezeBalance(e, o, r) + , i = await this.sign(s, t.privateKey || void 0); + return n(null, await this.sendRawTransaction(i)) + } catch (e) { + return n(e) + } + } + async updateAccount() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = {}), + "string" == typeof t && (t = { + privateKey: t + }), + !r) + return this.injectPromise(this.updateAccount, e, t); + if (!Dp.isString(e) || !e.length) + return r("Name must be a string"); + if (t = { + privateKey: this.tronWeb.defaultPrivateKey, + address: this.tronWeb.defaultAddress.hex, + ...t + }, + !t.privateKey && !t.address) + return r("Function requires either a private key or address to be set"); + try { + const n = t.privateKey ? this.tronWeb.address.fromPrivateKey(t.privateKey) : t.address + , o = await this.tronWeb.transactionBuilder.updateAccount(e, n) + , s = await this.sign(o, t.privateKey || void 0); + return r(null, await this.sendRawTransaction(s)) + } catch (e) { + return r(e) + } + } + signMessage() { + return this.sign(...arguments) + } + sendAsset() { + return this.sendToken(...arguments) + } + send() { + return this.sendTransaction(...arguments) + } + sendTrx() { + return this.sendTransaction(...arguments) + } + broadcast() { + return this.sendRawTransaction(...arguments) + } + broadcastHex() { + return this.sendHexTransaction(...arguments) + } + signTransaction() { + return this.sign(...arguments) + } + getProposal() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return t ? !Dp.isInteger(e) || e < 0 ? t("Invalid proposalID provided") : void this.tronWeb.fullNode.request("wallet/getproposalbyid", { + id: parseInt(e) + }, "post").then((e=>{ + t(null, e) + } + )).catch((e=>t(e))) : this.injectPromise(this.getProposal, e) + } + listProposals() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e) + return this.injectPromise(this.listProposals); + this.tronWeb.fullNode.request("wallet/listproposals", {}, "post").then((t=>{ + let {proposals: r=[]} = t; + e(null, r) + } + )).catch((t=>e(t))) + } + getChainParameters() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e) + return this.injectPromise(this.getChainParameters); + this.tronWeb.fullNode.request("wallet/getchainparameters", {}, "post").then((t=>{ + let {chainParameter: r=[]} = t; + e(null, r) + } + )).catch((t=>e(t))) + } + getAccountResources() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return t ? this.tronWeb.isAddress(e) ? void this.tronWeb.fullNode.request("wallet/getaccountresource", { + address: this.tronWeb.address.toHex(e) + }, "post").then((e=>{ + t(null, e) + } + )).catch((e=>t(e))) : t("Invalid address provided") : this.injectPromise(this.getAccountResources, e) + } + getDelegatedResourceV2() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultAddress.hex + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { + confirmed: !0 + } + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + return Dp.isFunction(r) && (n = r, + r = { + confirmed: !0 + }), + Dp.isFunction(t) && (n = t, + t = this.tronWeb.defaultAddress.hex), + Dp.isFunction(e) && (n = e, + e = this.tronWeb.defaultAddress.hex, + t = this.tronWeb.defaultAddress.hex), + n ? this.tronWeb.isAddress(e) && this.tronWeb.isAddress(t) ? void this.tronWeb[r.confirmed ? "solidityNode" : "fullNode"].request(`wallet${r.confirmed ? "solidity" : ""}/getdelegatedresourcev2`, { + fromAddress: rf(e), + toAddress: rf(t) + }, "post").then((e=>{ + n(null, e) + } + )).catch((e=>n(e))) : n("Invalid address provided") : this.injectPromise(this.getDelegatedResourceV2, e, t, r) + } + getDelegatedResourceAccountIndexV2() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { + confirmed: !0 + } + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return Dp.isFunction(t) && (r = t, + t = { + confirmed: !0 + }), + Dp.isFunction(e) && (r = e, + e = this.tronWeb.defaultAddress.hex), + r ? this.tronWeb.isAddress(e) ? void this.tronWeb[t.confirmed ? "solidityNode" : "fullNode"].request(`wallet${t.confirmed ? "solidity" : ""}/getdelegatedresourceaccountindexv2`, { + value: rf(e) + }, "post").then((e=>{ + r(null, e) + } + )).catch((e=>r(e))) : r("Invalid address provided") : this.injectPromise(this.getDelegatedResourceAccountIndexV2, e, t) + } + getCanDelegatedMaxSize() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "BANDWIDTH" + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { + confirmed: !0 + } + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + return Dp.isFunction(r) && (n = r, + r = { + confirmed: !0 + }), + Dp.isFunction(t) && (n = t, + t = "BANDWIDTH"), + Dp.isFunction(e) && (n = e, + e = this.tronWeb.defaultAddress.hex), + n ? this.tronWeb.isAddress(e) ? void (this.validator.notValid([{ + name: "resource", + type: "resource", + value: t, + msg: 'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"' + }], n) || this.tronWeb[r.confirmed ? "solidityNode" : "fullNode"].request(`wallet${r.confirmed ? "solidity" : ""}/getcandelegatedmaxsize`, { + owner_address: rf(e), + type: "ENERGY" === t ? 1 : 0 + }, "post").then((e=>{ + n(null, e) + } + )).catch((e=>n(e)))) : n("Invalid address provided") : this.injectPromise(this.getCanDelegatedMaxSize, e, t, r) + } + getAvailableUnfreezeCount() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : { + confirmed: !0 + } + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return Dp.isFunction(t) && (r = t, + t = { + confirmed: !0 + }), + Dp.isFunction(e) && (r = e, + e = this.tronWeb.defaultAddress.hex), + r ? this.tronWeb.isAddress(e) ? void this.tronWeb[t.confirmed ? "solidityNode" : "fullNode"].request(`wallet${t.confirmed ? "solidity" : ""}/getavailableunfreezecount`, { + owner_address: rf(e) + }, "post").then((e=>{ + r(null, e) + } + )).catch((e=>r(e))) : r("Invalid address provided") : this.injectPromise(this.getAvailableUnfreezeCount, e, t) + } + getCanWithdrawUnfreezeAmount() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Date.now() + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : { + confirmed: !0 + } + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + return Dp.isFunction(r) && (n = r, + r = { + confirmed: !0 + }), + Dp.isFunction(t) && (n = t, + t = Date.now()), + Dp.isFunction(e) && (n = e, + e = this.tronWeb.defaultAddress.hex), + n ? this.tronWeb.isAddress(e) ? !Dp.isInteger(t) || t < 0 ? n("Invalid timestamp provided") : void this.tronWeb[r.confirmed ? "solidityNode" : "fullNode"].request(`wallet${r.confirmed ? "solidity" : ""}/getcanwithdrawunfreezeamount`, { + owner_address: rf(e), + timestamp: t + }, "post").then((e=>{ + n(null, e) + } + )).catch((e=>n(e))) : n("Invalid address provided") : this.injectPromise(this.getCanWithdrawUnfreezeAmount, e, t, r) + } + getExchangeByID() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return t ? !Dp.isInteger(e) || e < 0 ? t("Invalid exchangeID provided") : void this.tronWeb.fullNode.request("wallet/getexchangebyid", { + id: e + }, "post").then((e=>{ + t(null, e) + } + )).catch((e=>t(e))) : this.injectPromise(this.getExchangeByID, e) + } + listExchanges() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e) + return this.injectPromise(this.listExchanges); + this.tronWeb.fullNode.request("wallet/listexchanges", {}, "post").then((t=>{ + let {exchanges: r=[]} = t; + e(null, r) + } + ), "post").catch((t=>e(t))) + } + listExchangesPaginated() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 10 + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0 + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = 0), + Dp.isFunction(e) && (r = e, + e = 10), + !r) + return this.injectPromise(this.listExchangesPaginated, e, t); + this.tronWeb.fullNode.request("wallet/getpaginatedexchangelist", { + limit: e, + offset: t + }, "post").then((e=>{ + let {exchanges: t=[]} = e; + r(null, t) + } + )).catch((e=>r(e))) + } + getNodeInfo() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!e) + return this.injectPromise(this.getNodeInfo); + this.tronWeb.fullNode.request("wallet/getnodeinfo", {}, "post").then((t=>{ + e(null, t) + } + ), "post").catch((t=>e(t))) + } + getTokenListByName() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return t ? (Dp.isInteger(e) && (e = e.toString()), + Dp.isString(e) && e.length ? void this.tronWeb.fullNode.request("wallet/getassetissuelistbyname", { + value: this.tronWeb.fromUtf8(e) + }, "post").then((e=>{ + if (Array.isArray(e.assetIssue)) + t(null, e.assetIssue.map((e=>this._parseToken(e)))); + else if (!e.name) + return t("Token does not exist"); + t(null, this._parseToken(e)) + } + )).catch((e=>t(e))) : t("Invalid token ID provided")) : this.injectPromise(this.getTokenListByName, e) + } + getTokenByID() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return t ? (Dp.isInteger(e) && (e = e.toString()), + Dp.isString(e) && e.length ? void this.tronWeb.fullNode.request("wallet/getassetissuebyid", { + value: e + }, "post").then((e=>{ + if (!e.name) + return t("Token does not exist"); + t(null, this._parseToken(e)) + } + )).catch((e=>t(e))) : t("Invalid token ID provided")) : this.injectPromise(this.getTokenByID, e) + } + async getReward(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return t.confirmed = !0, + this._getReward(e, t, r) + } + async getUnconfirmedReward(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return t.confirmed = !1, + this._getReward(e, t, r) + } + async getBrokerage(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return t.confirmed = !0, + this._getBrokerage(e, t, r) + } + async getUnconfirmedBrokerage(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return t.confirmed = !1, + this._getBrokerage(e, t, r) + } + async _getReward() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 ? arguments[1] : void 0 + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = {}), + Dp.isFunction(e) ? (r = e, + e = this.tronWeb.defaultAddress.hex) : Dp.isObject(e) && (t = e, + e = this.tronWeb.defaultAddress.hex), + !r) + return this.injectPromise(this._getReward, e, t); + if (this.validator.notValid([{ + name: "origin", + type: "address", + value: e + }], r)) + return; + const n = { + address: rf(e) + }; + this.tronWeb[t.confirmed ? "solidityNode" : "fullNode"].request(`wallet${t.confirmed ? "solidity" : ""}/getReward`, n, "post").then((function() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + if (void 0 === e.reward) + return r("Not found."); + r(null, e.reward) + } + )).catch((e=>r(e))) + } + async _getBrokerage() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this.tronWeb.defaultAddress.hex + , t = arguments.length > 1 ? arguments[1] : void 0 + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = {}), + Dp.isFunction(e) ? (r = e, + e = this.tronWeb.defaultAddress.hex) : Dp.isObject(e) && (t = e, + e = this.tronWeb.defaultAddress.hex), + !r) + return this.injectPromise(this._getBrokerage, e, t); + if (this.validator.notValid([{ + name: "origin", + type: "address", + value: e + }], r)) + return; + const n = { + address: rf(e) + }; + this.tronWeb[t.confirmed ? "solidityNode" : "fullNode"].request(`wallet${t.confirmed ? "solidity" : ""}/getBrokerage`, n, "post").then((function() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + if (void 0 === e.brokerage) + return r("Not found."); + r(null, e.brokerage) + } + )).catch((e=>r(e))) + } + } + const of = (e,t)=>bh(e, t); + class sf { + constructor(e, t) { + this.tronWeb = e.tronWeb, + this.contract = e, + this.abi = t, + this.name = t.name || (t.name = t.type), + this.inputs = t.inputs || [], + this.outputs = t.outputs || [], + this.functionSelector = (e=>{ + if (e.stateMutability = e.stateMutability ? e.stateMutability.toLowerCase() : "nonpayable", + e.type = e.type ? e.type.toLowerCase() : "", + "fallback" === e.type || "receive" === e.type) + return "0x"; + let t = new Dp.ethersUtils.Interface([e]); + return "event" === e.type ? t.getEvent(e.name).format(Dp.ethersUtils.FormatTypes.sighash) : t.getFunction(e.name).format(Dp.ethersUtils.FormatTypes.sighash) + } + )(t), + this.signature = this.tronWeb.sha3(this.functionSelector, !1).slice(0, 8), + this.injectPromise = Hp()(this), + this.defaultOptions = { + feeLimit: this.tronWeb.feeLimit, + callValue: 0, + userFeePercentage: 100, + shouldPollResponse: !1 + } + } + decodeInput(e) { + return of(this.inputs, "0x" + e) + } + onMethod() { + var e = this; + let t = ""; + if (this.abi && !/event/i.test(this.abi.type)) { + for (var r = arguments.length, n = new Array(r), o = 0; o < r; o++) + n[o] = arguments[o]; + t = yh(this.abi, n) + } + return { + call: function() { + let r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} + , n = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return Dp.isFunction(r) && (n = r, + r = {}), + r = { + ...r, + rawParameter: t + }, + e._call([], [], r, n) + }, + send: function() { + let r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} + , n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : e.tronWeb.defaultPrivateKey + , o = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return Dp.isFunction(n) && (o = n, + n = e.tronWeb.defaultPrivateKey), + Dp.isFunction(r) && (o = r, + r = {}), + r = { + ...r, + rawParameter: t + }, + e._send([], [], r, n, o) + }, + watch: function() { + return e._watch(...arguments) + } + } + } + async _call(e, t) { + let r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {} + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (Dp.isFunction(r) && (n = r, + r = {}), + !n) + return this.injectPromise(this._call, e, t, r); + if (e.length !== t.length) + return n("Invalid argument count provided"); + if (!this.contract.address) + return n("Smart contract is missing address"); + if (!this.contract.deployed) + return n("Calling smart contracts requires you to load the contract first"); + const {stateMutability: o} = this.abi; + if (!["pure", "view"].includes(o.toLowerCase())) + return n(`Methods with state mutability "${o}" must use send()`); + r = { + ...this.defaultOptions, + from: this.tronWeb.defaultAddress.hex, + ...r, + _isConstant: !0 + }; + const s = t.map(((t,r)=>({ + type: e[r], + value: t + }))); + this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address, this.functionSelector, r, s, !!r.from && this.tronWeb.address.toHex(r.from), ((e,t)=>{ + if (e) + return n(e); + if (!Dp.hasProperty(t, "constant_result")) + return n("Failed to execute"); + try { + const e = t.constant_result[0].length; + if (0 === e || e % 64 == 8) { + let r = "The call has been reverted or has thrown an error."; + if (0 !== e) { + r += " Error message: "; + let n = "" + , o = t.constant_result[0].substring(8); + for (let t = 0; t < e - 8; t += 64) + n += this.tronWeb.toUtf8(o.substring(t, t + 64)); + r += n.replace(/(\u0000|\u000b|\f)+/g, " ").replace(/ +/g, " ").replace(/\s+$/g, "") + } + return n(r) + } + let r = of(this.abi, "0x" + t.constant_result[0]); + return 1 === r.length && 1 === Object.keys(r).length && (r = r[0]), + n(null, r) + } catch (e) { + return n(e) + } + } + )) + } + async _send(e, t) { + var r = this; + let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {} + , o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.tronWeb.defaultPrivateKey + , s = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (Dp.isFunction(o) && (s = o, + o = this.tronWeb.defaultPrivateKey), + Dp.isFunction(n) && (s = n, + n = {}), + !s) + return this.injectPromise(this._send, e, t, n, o); + if (e.length !== t.length) + throw new Error("Invalid argument count provided"); + if (!this.contract.address) + return s("Smart contract is missing address"); + if (!this.contract.deployed) + return s("Calling smart contracts requires you to load the contract first"); + const {stateMutability: i} = this.abi; + if (["pure", "view"].includes(i.toLowerCase())) + return s(`Methods with state mutability "${i}" must use call()`); + ["payable"].includes(i.toLowerCase()) || (n.callValue = 0), + n = { + ...this.defaultOptions, + from: this.tronWeb.defaultAddress.hex, + ...n + }; + const a = t.map(((t,r)=>({ + type: e[r], + value: t + }))); + try { + const e = o ? this.tronWeb.address.fromPrivateKey(o) : this.tronWeb.defaultAddress.base58 + , t = await this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address, this.functionSelector, n, a, this.tronWeb.address.toHex(e)); + if (!t.result || !t.result.result) + return s("Unknown error: " + JSON.stringify(t, null, 2)); + const i = await this.tronWeb.trx.sign(t.transaction, o); + if (!i.signature) + return s(o ? "Invalid private key provided" : "Transaction was not signed properly"); + const u = await this.tronWeb.trx.sendRawTransaction(i); + if (u.code) { + const e = { + error: u.code, + message: u.code + }; + return u.message && (e.message = this.tronWeb.toUtf8(u.message)), + s(e) + } + if (!n.shouldPollResponse) + return s(null, i.txID); + const c = async function() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0; + if (e === (n.pollTimes || 20)) + return s({ + error: "Cannot find result in solidity node", + transaction: i + }); + const t = await r.tronWeb.trx.getTransactionInfo(i.txID); + if (!Object.keys(t).length) + return setTimeout((()=>{ + c(e + 1) + } + ), 3e3); + if (t.result && "FAILED" === t.result) + return s({ + error: r.tronWeb.toUtf8(t.resMessage), + transaction: i, + output: t + }); + if (!Dp.hasProperty(t, "contractResult")) + return s({ + error: "Failed to execute: " + JSON.stringify(t, null, 2), + transaction: i, + output: t + }); + if (n.rawResponse) + return s(null, t); + let o = of(r.abi, "0x" + t.contractResult[0]); + return 1 === o.length && 1 === Object.keys(o).length && (o = o[0]), + n.keepTxID ? s(null, [i.txID, o]) : s(null, o) + }; + c() + } catch (e) { + return s(e) + } + } + async _watch() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if (Dp.isFunction(e) && (t = e, + e = {}), + !Dp.isFunction(t)) + throw new Error("Expected callback to be provided"); + if (!this.contract.address) + return t("Smart contract is missing address"); + if (!this.abi.type || !/event/i.test(this.abi.type)) + return t("Invalid method type for event watching"); + if (!this.tronWeb.eventServer) + return t("No event server configured"); + let r = !1 + , n = !1 + , o = Date.now() - 1e3; + const s = async()=>{ + try { + const t = { + since: o, + eventName: this.name, + sort: "block_timestamp", + blockNumber: "latest", + filters: e.filters + }; + e.size && (t.size = e.size), + e.resourceNode && (/full/i.test(e.resourceNode) ? t.onlyUnconfirmed = !0 : t.onlyConfirmed = !0); + const r = await this.tronWeb.event.getEventsByContractAddress(this.contract.address, t) + , [s] = r.sort(((e,t)=>t.block - e.block)) + , i = r.filter(((t,o)=>(!e.resourceNode || !t.resourceNode || e.resourceNode.toLowerCase() === t.resourceNode.toLowerCase()) && (!r.slice(0, o).some((e=>JSON.stringify(e) == JSON.stringify(t))) && (!n || t.block > n)))); + return s && (n = s.block), + i + } catch (e) { + return Promise.reject(e) + } + } + , i = ()=>{ + r && clearInterval(r), + r = setInterval((()=>{ + s().then((e=>e.forEach((e=>{ + t(null, Dp.parseEvent(e, this.abi)) + } + )))).catch((e=>t(e))) + } + ), 3e3) + } + ; + return await s(), + i(), + { + start: i, + stop: ()=>{ + r && (clearInterval(r), + r = !1) + } + } + } + } + class af { + constructor() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : [] + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (!e || !e instanceof pf) + throw new Error("Expected instance of TronWeb"); + this.tronWeb = e, + this.injectPromise = Hp()(this), + this.address = r, + this.abi = t, + this.eventListener = !1, + this.bytecode = !1, + this.deployed = !1, + this.lastBlock = !1, + this.methods = {}, + this.methodInstances = {}, + this.props = [], + this.tronWeb.isAddress(r) ? this.deployed = !0 : this.address = !1, + this.loadAbi(t) + } + async _getEvents() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + const t = await this.tronWeb.event.getEventsByContractAddress(this.address, e) + , [r] = t.sort(((e,t)=>t.block - e.block)) + , n = t.filter(((r,n)=>(!e.resourceNode || !r.resourceNode || e.resourceNode.toLowerCase() === r.resourceNode.toLowerCase()) && (!t.slice(0, n).some((e=>JSON.stringify(e) == JSON.stringify(r))) && (!this.lastBlock || r.block > this.lastBlock)))); + return r && (this.lastBlock = r.block), + n + } + async _startEventListener() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} + , t = arguments.length > 1 ? arguments[1] : void 0; + if (Dp.isFunction(e) && (t = e, + e = {}), + this.eventListener && clearInterval(this.eventListener), + !this.tronWeb.eventServer) + throw new Error("Event server is not configured"); + if (!this.address) + throw new Error("Contract is not configured with an address"); + this.eventCallback = t, + await this._getEvents(e), + this.eventListener = setInterval((()=>{ + this._getEvents(e).then((e=>e.forEach((e=>{ + this.eventCallback && this.eventCallback(e) + } + )))).catch((e=>{ + console.error("Failed to get event list", e) + } + )) + } + ), 3e3) + } + _stopEventListener() { + this.eventListener && (clearInterval(this.eventListener), + this.eventListener = !1, + this.eventCallback = !1) + } + hasProperty(e) { + return this.hasOwnProperty(e) || this.__proto__.hasOwnProperty(e) + } + loadAbi(e) { + this.abi = e, + this.methods = {}, + this.props.forEach((e=>delete this[e])), + e.forEach((e=>{ + if (!e.type || /constructor|error/i.test(e.type)) + return; + const t = new sf(this,e) + , r = t.onMethod.bind(t) + , {name: n, functionSelector: o, signature: s} = t; + this.methods[n] = r, + this.methods[o] = r, + this.methods[s] = r, + this.methodInstances[n] = t, + this.methodInstances[o] = t, + this.methodInstances[s] = t, + this.hasProperty(n) || (this[n] = r, + this.props.push(n)), + this.hasProperty(o) || (this[o] = r, + this.props.push(o)), + this.hasProperty(s) || (this[s] = r, + this.props.push(s)) + } + )) + } + decodeInput(e) { + const t = e.substring(0, 8) + , r = e.substring(8); + if (!this.methodInstances[t]) + throw new Error("Contract method " + t + " not found"); + return { + name: this.methodInstances[t].name, + params: this.methodInstances[t].decodeInput(r) + } + } + async new(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.tronWeb.defaultPrivateKey + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + if (Dp.isFunction(t) && (r = t, + t = this.tronWeb.defaultPrivateKey), + !r) + return this.injectPromise(this.new, e, t); + try { + const n = this.tronWeb.address.fromPrivateKey(t) + , o = await this.tronWeb.transactionBuilder.createSmartContract(e, n) + , s = await this.tronWeb.trx.sign(o, t) + , i = await this.tronWeb.trx.sendRawTransaction(s); + return i.code ? r({ + error: i.code, + message: this.tronWeb.toUtf8(i.message) + }) : (await Dp.sleep(3e3), + this.at(s.contract_address, r)) + } catch (e) { + return r(e) + } + } + async at(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if (!t) + return this.injectPromise(this.at, e); + try { + const r = await this.tronWeb.trx.getContract(e); + return r.contract_address ? (this.address = r.contract_address, + this.bytecode = r.bytecode, + this.deployed = !0, + this.loadAbi(r.abi && r.abi.entrys ? r.abi.entrys : []), + t(null, this)) : t("Unknown error: " + JSON.stringify(r, null, 2)) + } catch (e) { + return e.toString().includes("does not exist") ? t("Contract has not been deployed on the network") : t(e) + } + } + events() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {} + , t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + if (Dp.isFunction(e) && (t = e, + e = {}), + !Dp.isFunction(t)) + throw new Error("Callback function expected"); + const r = this; + return { + start() { + let n = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + return n ? (r._startEventListener(e, t).then((()=>{ + n() + } + )).catch((e=>{ + n(e) + } + )), + this) : (r._startEventListener(e, t), + this) + }, + stop() { + r._stopEventListener() + } + } + } + } + class uf { + constructor() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; + if (!e || !e instanceof pf) + throw new Error("Expected instance of TronWeb"); + this.tronWeb = e, + this.pluginNoOverride = ["register"], + this.disablePlugins = t.disablePlugins + } + register(e, t) { + let r = { + requires: "0.0.0", + components: {} + } + , n = { + libs: [], + plugged: [], + skipped: [] + }; + if (this.disablePlugins) + return n.error = "This instance of TronWeb has plugins disabled.", + n; + const o = new e(this.tronWeb); + if (Dp.isFunction(o.pluginInterface) && (r = o.pluginInterface(t)), + !Vp().satisfies(pf.version, r.requires)) + throw new Error("The plugin is not compatible with this version of TronWeb"); + if (r.fullClass) { + let t = o.constructor.name + , r = t.substring(0, 1).toLowerCase() + t.substring(1); + t !== r && (pf[t] = e, + this.tronWeb[r] = o, + n.libs.push(t)) + } else + for (let e in r.components) { + if (!this.tronWeb.hasOwnProperty(e)) + continue; + let t = r.components[e] + , o = this.tronWeb[e].pluginNoOverride || []; + for (let r in t) + "constructor" === r || this.tronWeb[e][r] && (o.includes(r) || /^_/.test(r)) ? n.skipped.push(r) : (this.tronWeb[e][r] = t[r].bind(this.tronWeb[e]), + n.plugged.push(r)) + } + return n + } + } + var cf = r(7735); + class lf { + constructor() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!(e && e instanceof pf)) + throw new Error("Expected instance of TronWeb"); + this.tronWeb = e, + this.injectPromise = Hp()(this) + } + setServer() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "healthcheck"; + if (!e) + return this.tronWeb.eventServer = !1; + if (Dp.isString(e) && (e = new Lp.HttpProvider(e)), + !this.tronWeb.isValidProvider(e)) + throw new Error("Invalid event server provided"); + this.tronWeb.eventServer = e, + this.tronWeb.eventServer.isConnected = ()=>this.tronWeb.eventServer.request(t).then((()=>!0)).catch((()=>!1)) + } + getEventsByContractAddress() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] + , {sinceTimestamp: n, since: o, fromTimestamp: s, eventName: i, blockNumber: a, size: u, page: c, onlyConfirmed: l, onlyUnconfirmed: d, previousLastEventFingerprint: h, previousFingerprint: p, fingerprint: f, rawResponse: g, sort: y, filters: b} = Object.assign({ + sinceTimestamp: 0, + eventName: !1, + blockNumber: !1, + size: 20, + page: 1 + }, t); + if (!r) + return this.injectPromise(this.getEventsByContractAddress, e, t); + if (s = s || n || o, + !this.tronWeb.eventServer) + return r("No event server configured"); + const m = []; + if (!this.tronWeb.isAddress(e)) + return r("Invalid contract address provided"); + if (i && !e) + return r("Usage of event name filtering requires a contract address"); + if (void 0 !== s && !Dp.isInteger(s)) + return r("Invalid fromTimestamp provided"); + if (!Dp.isInteger(u)) + return r("Invalid size provided"); + if (u > 200 && (console.warn("Defaulting to maximum accepted size: 200"), + u = 200), + !Dp.isInteger(c)) + return r("Invalid page provided"); + if (a && !i) + return r("Usage of block number filtering requires an event name"); + e && m.push(this.tronWeb.address.fromHex(e)), + i && m.push(i), + a && m.push(a); + const T = { + size: u, + page: c + }; + return "object" == typeof b && Object.keys(b).length > 0 && (T.filters = JSON.stringify(b)), + s && (T.fromTimestamp = T.since = s), + l && (T.only_confirmed = l), + d && !l && (T.only_unconfirmed = d), + y && (T.sort = y), + f = f || p || h, + f && (T.fingerprint = f), + this.tronWeb.eventServer.request(`event/contract/${m.join("/")}?${cf.stringify(T)}`).then((function() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + return e ? Dp.isArray(e) ? r(null, !0 === g ? e : e.map((e=>Dp.mapEvent(e)))) : r(e) : r("Unknown error occurred") + } + )).catch((e=>r(e.response && e.response.data || e))) + } + getEventsByTransactionID() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {} + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2]; + return Dp.isFunction(t) && (r = t, + t = {}), + r ? this.tronWeb.eventServer ? this.tronWeb.eventServer.request(`event/transaction/${e}`).then((function() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + return e ? Dp.isArray(e) ? r(null, !0 === t.rawResponse ? e : e.map((e=>Dp.mapEvent(e)))) : r(e) : r("Unknown error occurred") + } + )).catch((e=>r(e.response && e.response.data || e))) : r("No event server configured") : this.injectPromise(this.getEventsByTransactionID, e, t) + } + } + class df { + constructor(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1] + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + this.mainchain = r; + const {fullHost: o, fullNode: s, solidityNode: i, eventServer: a, mainGatewayAddress: u, sideGatewayAddress: c, sideChainId: l} = e; + this.sidechain = new t(o || s,o || i,o || a,n), + this.isAddress = this.mainchain.isAddress, + this.utils = this.mainchain.utils, + this.setMainGatewayAddress(u), + this.setSideGatewayAddress(c), + this.setChainId(l), + this.injectPromise = Hp()(this), + this.validator = new Kp(this.sidechain); + const d = this; + this.sidechain.trx.sign = function() { + return d.sign(...arguments) + } + , + this.sidechain.trx.multiSign = function() { + return d.multiSign(...arguments) + } + , + console.warn("TronWeb: 'tronWeb.sidechain' is deprecated and may be removed in the future. Please use the 'sunweb' sdk instead. For more information, see: https://github.com/tronprotocol/sun-network/tree/develop/js-sdk") + } + setMainGatewayAddress(e) { + if (!this.isAddress(e)) + throw new Error("Invalid main gateway address provided"); + this.mainGatewayAddress = e + } + setSideGatewayAddress(e) { + if (!this.isAddress(e)) + throw new Error("Invalid side gateway address provided"); + this.sideGatewayAddress = e + } + setChainId(e) { + if (!this.utils.isString(e) || !e) + throw new Error("Invalid side chainId provided"); + this.chainId = e + } + signTransaction(e, t) { + "string" == typeof e && (e = this.utils.code.hexStr2byteArray(e)); + let r = this.utils.code.hexStr2byteArray(this.chainId) + , n = this.utils.code.hexStr2byteArray(t.txID).concat(r) + , o = this.sidechain.utils.ethersUtils.sha256(n); + const s = this.utils.crypto.ECKeySign(this.utils.code.hexStr2byteArray(o.replace(/^0x/, "")), e); + return Array.isArray(t.signature) ? t.signature.includes(s) || t.signature.push(s) : t.signature = [s], + t + } + async multiSign() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.sidechain.defaultPrivateKey + , r = arguments.length > 2 && void 0 !== arguments[2] && arguments[2] + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3]; + if (this.utils.isFunction(r) && (n = r, + r = 0), + this.utils.isFunction(t) && (n = t, + t = this.mainchain.defaultPrivateKey, + r = 0), + !n) + return this.injectPromise(this.multiSign, e, t, r); + if (!this.utils.isObject(e) || !e.raw_data || !e.raw_data.contract) + return n("Invalid transaction provided"); + if (!e.raw_data.contract[0].Permission_id && r > 0) { + e.raw_data.contract[0].Permission_id = r; + const o = this.sidechain.address.toHex(this.sidechain.address.fromPrivateKey(t)).toLowerCase() + , s = await this.sidechain.trx.getSignWeight(e, r); + if ("PERMISSION_ERROR" === s.result.code) + return n(s.result.message); + let i = !1; + if (s.permission.keys.map((e=>{ + e.address === o && (i = !0) + } + )), + !i) + return n(t + " has no permission to sign"); + if (s.approved_list && -1 != s.approved_list.indexOf(o)) + return n(t + " already sign transaction"); + if (!s.transaction || !s.transaction.transaction) + return n("Invalid transaction provided"); + e = s.transaction.transaction, + e.raw_data.contract[0].Permission_id = r + } + try { + return n(null, this.signTransaction(t, e)) + } catch (e) { + n(e) + } + } + async sign() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0] + , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.sidechain.defaultPrivateKey + , r = !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2] + , n = arguments.length > 3 && void 0 !== arguments[3] && arguments[3] + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (this.utils.isFunction(n) && (o = n, + n = !1), + this.utils.isFunction(r) && (o = r, + r = !0, + n = !1), + this.utils.isFunction(t) && (o = t, + t = this.sidechain.defaultPrivateKey, + r = !0, + n = !1), + !o) + return this.injectPromise(this.sign, e, t, r, n); + if (this.utils.isString(e)) { + if (!this.utils.isHex(e)) + return o("Expected hex message input"); + try { + return o(null, this.sidechain.trx.signString(e, t, r)) + } catch (e) { + o(e) + } + } + if (!this.utils.isObject(e)) + return o("Invalid transaction provided"); + if (!n && e.signature) + return o("Transaction is already signed"); + try { + return n || this.sidechain.address.toHex(this.sidechain.address.fromPrivateKey(t)).toLowerCase() === this.sidechain.address.toHex(e.raw_data.contract[0].parameter.value.owner_address) ? o(null, this.signTransaction(t, e)) : o("Private key does not match address in transaction") + } catch (e) { + o(e) + } + } + async depositTrx(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {} + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.mainchain.defaultPrivateKey + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (this.utils.isFunction(o) && (s = o, + o = this.mainchain.defaultPrivateKey), + this.utils.isFunction(n) && (s = n, + n = {}), + !s) + return this.injectPromise(this.depositTrx, e, t, r, n, o); + if (!this.validator.notValid([{ + name: "callValue", + type: "integer", + value: e, + gte: 0 + }, { + name: "depositFee", + type: "integer", + value: t, + gte: 0 + }, { + name: "feeLimit", + type: "integer", + value: r, + gte: 0 + }], s)) { + n = { + callValue: Number(e) + Number(t), + feeLimit: r, + ...n + }; + try { + const e = await this.mainchain.contract().at(this.mainGatewayAddress); + return s(null, await e.depositTRX().send(n, o)) + } catch (e) { + return s(e) + } + } + } + async depositTrc10(e, t, r, n) { + let o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {} + , s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : this.mainchain.defaultPrivateKey + , i = arguments.length > 6 && void 0 !== arguments[6] && arguments[6]; + if (this.utils.isFunction(s) && (i = s, + s = this.mainchain.defaultPrivateKey), + this.utils.isFunction(o) && (i = o, + o = {}), + !i) + return this.injectPromise(this.depositTrc10, e, t, r, n, o, s); + if (!this.validator.notValid([{ + name: "tokenValue", + type: "integer", + value: t, + gte: 0 + }, { + name: "depositFee", + type: "integer", + value: r, + gte: 0 + }, { + name: "feeLimit", + type: "integer", + value: n, + gte: 0 + }, { + name: "tokenId", + type: "integer", + value: e, + gte: 0 + }], i)) { + o = { + tokenId: e, + tokenValue: t, + feeLimit: n, + ...o, + callValue: r + }; + try { + const r = await this.mainchain.contract().at(this.mainGatewayAddress); + i(null, await r.depositTRC10(e, t).send(o, s)) + } catch (e) { + return i(e) + } + } + } + async depositTrc(e, t, r, n, o) { + let s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : {} + , i = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : this.mainchain.defaultPrivateKey + , a = arguments.length > 7 && void 0 !== arguments[7] && arguments[7]; + if (this.utils.isFunction(i) && (a = i, + i = this.mainchain.defaultPrivateKey), + this.utils.isFunction(s) && (a = s, + s = {}), + !a) + return this.injectPromise(this.depositTrc, e, t, r, n, o, s, i); + if (!this.validator.notValid([{ + name: "functionSelector", + type: "not-empty-string", + value: e + }, { + name: "num", + type: "integer", + value: t, + gte: 0 + }, { + name: "fee", + type: "integer", + value: r, + gte: 0 + }, { + name: "feeLimit", + type: "integer", + value: n, + gte: 0 + }, { + name: "contractAddress", + type: "address", + value: o + }], a)) { + s = { + feeLimit: n, + ...s, + callValue: r, + tokenId: "", + tokenValue: 0 + }; + try { + let r = null; + if ("approve" === e) { + const e = await this.mainchain.contract().at(o); + r = await e.approve(this.mainGatewayAddress, t).send(s, i) + } else { + const n = await this.mainchain.contract().at(this.mainGatewayAddress); + switch (e) { + case "depositTRC20": + r = await n.depositTRC20(o, t).send(s, i); + break; + case "depositTRC721": + r = await n.depositTRC721(o, t).send(s, i); + break; + case "retryDeposit": + r = await n.retryDeposit(t).send(s, i); + break; + case "retryMapping": + r = await n.retryMapping(t).send(s, i) + } + } + a(null, r) + } catch (e) { + return a(e) + } + } + } + async approveTrc20(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {} + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.mainchain.defaultPrivateKey + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + return this.depositTrc("approve", e, 0, t, r, n, o, s) + } + async approveTrc721(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {} + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.mainchain.defaultPrivateKey + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + return this.depositTrc("approve", e, 0, t, r, n, o, s) + } + async depositTrc20(e, t, r, n) { + let o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {} + , s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : this.mainchain.defaultPrivateKey + , i = arguments.length > 6 && void 0 !== arguments[6] && arguments[6]; + return this.depositTrc("depositTRC20", e, t, r, n, o, s, i) + } + async depositTrc721(e, t, r, n) { + let o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {} + , s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : this.mainchain.defaultPrivateKey + , i = arguments.length > 6 && void 0 !== arguments[6] && arguments[6]; + return this.depositTrc("depositTRC721", e, t, r, n, o, s, i) + } + async mappingTrc(e, t, r, n) { + let o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {} + , s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : this.mainchain.defaultPrivateKey + , i = arguments.length > 6 ? arguments[6] : void 0; + if (this.utils.isFunction(s) && (i = s, + s = this.mainchain.defaultPrivateKey), + this.utils.isFunction(o) && (i = o, + o = {}), + !i) + return this.injectPromise(this.mappingTrc, e, t, r, n, o, s); + if (!this.validator.notValid([{ + name: "trxHash", + type: "not-empty-string", + value: e + }, { + name: "mappingFee", + type: "integer", + value: t, + gte: 0 + }, { + name: "feeLimit", + type: "integer", + value: r, + gte: 0 + }], i)) { + e = e.startsWith("0x") ? e : "0x" + e, + o = { + feeLimit: r, + ...o, + callValue: t + }; + try { + const t = await this.mainchain.contract().at(this.mainGatewayAddress); + let r = null; + "mappingTRC20" === n ? r = await t.mappingTRC20(e).send(o, s) : "mappingTRC721" === n ? r = await t.mappingTRC721(e).send(o, s) : i(new Error("type must be trc20 or trc721")), + i(null, r) + } catch (e) { + return i(e) + } + } + } + async mappingTrc20(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {} + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.mainchain.defaultPrivateKey + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + return this.mappingTrc(e, t, r, "mappingTRC20", n, o, s) + } + async mappingTrc721(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {} + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.mainchain.defaultPrivateKey + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + return this.mappingTrc(e, t, r, "mappingTRC721", n, o, s) + } + async withdrawTrx(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {} + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.mainchain.defaultPrivateKey + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + if (this.utils.isFunction(o) && (s = o, + o = this.mainchain.defaultPrivateKey), + this.utils.isFunction(n) && (s = n, + n = {}), + !s) + return this.injectPromise(this.withdrawTrx, e, t, r, n, o); + if (!this.validator.notValid([{ + name: "callValue", + type: "integer", + value: e, + gte: 0 + }, { + name: "withdrawFee", + type: "integer", + value: t, + gte: 0 + }, { + name: "feeLimit", + type: "integer", + value: r, + gte: 0 + }], s)) { + n = { + callValue: Number(e) + Number(t), + feeLimit: r, + ...n + }; + try { + const e = await this.sidechain.contract().at(this.sideGatewayAddress); + return s(null, await e.withdrawTRX().send(n, o)) + } catch (e) { + return s(e) + } + } + } + async withdrawTrc10(e, t, r, n) { + let o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : {} + , s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : this.mainchain.defaultPrivateKey + , i = arguments.length > 6 && void 0 !== arguments[6] && arguments[6]; + if (this.utils.isFunction(s) && (i = s, + s = this.mainchain.defaultPrivateKey), + this.utils.isFunction(o) && (i = o, + o = {}), + !i) + return this.injectPromise(this.withdrawTrc10, e, t, r, n, o, s); + if (!this.validator.notValid([{ + name: "tokenId", + type: "integer", + value: e, + gte: 0 + }, { + name: "tokenValue", + type: "integer", + value: t, + gte: 0 + }, { + name: "withdrawFee", + type: "integer", + value: r, + gte: 0 + }, { + name: "feeLimit", + type: "integer", + value: n, + gte: 0 + }], i)) { + o = { + tokenValue: t, + tokenId: e, + callValue: r, + feeLimit: n, + ...o + }; + try { + const r = await this.sidechain.contract().at(this.sideGatewayAddress); + return i(null, await r.withdrawTRC10(e, t).send(o, s)) + } catch (e) { + return i(e) + } + } + } + async withdrawTrc(e, t, r, n, o) { + var s = this; + let i = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : {} + , a = arguments.length > 6 && void 0 !== arguments[6] ? arguments[6] : this.mainchain.defaultPrivateKey + , u = arguments.length > 7 && void 0 !== arguments[7] && arguments[7]; + if (this.utils.isFunction(a) && (u = a, + a = this.mainchain.defaultPrivateKey), + this.utils.isFunction(i) && (u = i, + i = {}), + !u) + return this.injectPromise(this.withdrawTrc, e, t, r, n, o, i, a); + if (this.validator.notValid([{ + name: "functionSelector", + type: "not-empty-string", + value: e + }, { + name: "numOrId", + type: "integer", + value: t, + gte: 0 + }, { + name: "withdrawFee", + type: "integer", + value: r, + gte: 0 + }, { + name: "feeLimit", + type: "integer", + value: n, + gte: 0 + }, { + name: "contractAddress", + type: "address", + value: o + }], u)) + return; + i = { + feeLimit: n, + ...i, + callValue: r + }; + const c = [{ + type: "uint256", + value: t + }]; + try { + const t = a ? this.sidechain.address.fromPrivateKey(a) : this.sidechain.defaultAddress.base58 + , r = await this.sidechain.transactionBuilder.triggerSmartContract(o, e, i, c, this.sidechain.address.toHex(t)); + if (!r.result || !r.result.result) + return u("Unknown error: " + JSON.stringify(r.transaction, null, 2)); + const n = await this.sidechain.trx.sign(r.transaction, a); + if (!n.signature) + return u(a ? "Invalid private key provided" : "Transaction was not signed properly"); + const l = await this.sidechain.trx.sendRawTransaction(n); + if (l.code) { + const e = { + error: l.code, + message: l.code + }; + return l.message && (e.message = this.sidechain.toUtf8(l.message)), + u(e) + } + if (!i.shouldPollResponse) + return u(null, n.txID); + const d = async function() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0; + if (20 == e) + return u({ + error: "Cannot find result in solidity node", + transaction: n + }); + const t = await s.sidechain.trx.getTransactionInfo(n.txID); + if (!Object.keys(t).length) + return setTimeout((()=>{ + d(e + 1) + } + ), 3e3); + if (t.result && "FAILED" == t.result) + return u({ + error: s.sidechain.toUtf8(t.resMessage), + transaction: n, + output: t + }); + if (!s.utils.hasProperty(t, "contractResult")) + return u({ + error: "Failed to execute: " + JSON.stringify(t, null, 2), + transaction: n, + output: t + }); + if (i.rawResponse) + return u(null, t); + let r = decodeOutput(s.outputs, "0x" + t.contractResult[0]); + return 1 === r.length && (r = r[0]), + u(null, r) + }; + d() + } catch (e) { + return u(e) + } + } + async withdrawTrc20(e, t, r, n, o) { + let s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : this.mainchain.defaultPrivateKey + , i = arguments.length > 6 && void 0 !== arguments[6] && arguments[6]; + return this.withdrawTrc("withdrawal(uint256)", e, t, r, n, o, s, i) + } + async withdrawTrc721(e, t, r, n, o) { + let s = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : this.mainchain.defaultPrivateKey + , i = arguments.length > 6 && void 0 !== arguments[6] && arguments[6]; + return this.withdrawTrc("withdrawal(uint256)", e, t, r, n, o, s, i) + } + async injectFund(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : this.mainchain.defaultPrivateKey + , o = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + if (this.utils.isFunction(n) && (o = n, + n = this.mainchain.defaultPrivateKey), + this.utils.isFunction(r) && (o = r, + r = {}), + !o) + return this.injectPromise(this.injectFund, e, t, r, n); + if (!this.validator.notValid([{ + name: "num", + type: "integer", + value: e, + gte: 0 + }, { + name: "feeLimit", + type: "integer", + value: t, + gte: 0 + }], o)) + try { + const t = this.sidechain.address.fromPrivateKey(n) + , r = this.sidechain.address.toHex(t) + , s = await this.sidechain.fullNode.request("/wallet/fundinject", { + owner_address: r, + amount: e + }, "post") + , i = await this.sidechain.trx.sign(s, n); + if (!i.signature) + return o(n ? "Invalid private key provided" : "Transaction was not signed properly"); + const a = await this.sidechain.trx.sendRawTransaction(i); + if (a.code) { + const e = { + error: a.code, + message: a.code + }; + return a.message && (e.message = this.mainchain.toUtf8(a.message)), + o(e) + } + return o(null, i.txID) + } catch (e) { + return o(e) + } + } + async retryWithdraw(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {} + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.sidechain.defaultPrivateKey + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + return this.withdrawTrc("retryWithdraw(uint256)", e, t, r, this.sideGatewayAddress, n, o, s) + } + async retryDeposit(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {} + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.mainchain.defaultPrivateKey + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + return this.depositTrc("retryDeposit", e, t, r, this.mainGatewayAddress, n, o, s) + } + async retryMapping(e, t, r) { + let n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {} + , o = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : this.mainchain.defaultPrivateKey + , s = arguments.length > 5 && void 0 !== arguments[5] && arguments[5]; + return this.depositTrc("retryMapping", e, t, r, this.mainGatewayAddress, n, o, s) + } + } + const hf = "4.7.1"; + class pf extends (jp()) { + static providers = Lp; + static BigNumber = kp; + static TransactionBuilder = Qp; + static Trx = nf; + static Contract = af; + static Plugin = uf; + static Event = lf; + static version = "5.3.1"; + static utils = Dp; + constructor() { + let e, t = arguments.length > 0 && void 0 !== arguments[0] && arguments[0], r = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2], o = arguments.length > 3 && void 0 !== arguments[3] && arguments[3], s = arguments.length > 4 && void 0 !== arguments[4] && arguments[4]; + super(); + let i = !1 + , a = !1; + "object" == typeof t && (t.fullNode || t.fullHost) ? (e = t.fullNode || t.fullHost, + o = r, + r = t.solidityNode || t.fullHost, + n = t.eventServer || t.fullHost, + i = t.headers || !1, + a = t.eventHeaders || i, + s = t.privateKey) : e = t, + Dp.isString(e) && (e = new Lp.HttpProvider(e)), + Dp.isString(r) && (r = new Lp.HttpProvider(r)), + Dp.isString(n) && (n = new Lp.HttpProvider(n)), + this.event = new lf(this), + this.transactionBuilder = new Qp(this), + this.trx = new nf(this), + this.plugin = new uf(this,t), + this.utils = Dp, + this.setFullNode(e), + this.setSolidityNode(r), + this.setEventServer(n), + this.providers = Lp, + this.BigNumber = kp, + this.defaultBlock = !1, + this.defaultPrivateKey = !1, + this.defaultAddress = { + hex: !1, + base58: !1 + }, + ["sha3", "toHex", "toUtf8", "fromUtf8", "toAscii", "fromAscii", "toDecimal", "fromDecimal", "toSun", "fromSun", "toBigNumber", "isAddress", "createAccount", "address", "version", "createRandom", "fromMnemonic"].forEach((e=>{ + this[e] = pf[e] + } + )), + "object" == typeof o && (o.fullNode || o.fullHost) ? this.sidechain = new df(o,pf,this,s) : s = s || o, + s && this.setPrivateKey(s), + this.fullnodeVersion = hf, + this.feeLimit = 15e7, + this.injectPromise = Hp()(this), + i && this.setFullNodeHeader(i), + a && this.setEventHeader(a) + } + async getFullnodeVersion() { + try { + const e = await this.trx.getNodeInfo(); + this.fullnodeVersion = e.configNodeInfo.codeVersion, + 2 === this.fullnodeVersion.split(".").length && (this.fullnodeVersion += ".0") + } catch (e) { + this.fullnodeVersion = hf + } + } + setDefaultBlock() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if ([!1, "latest", "earliest", 0].includes(e)) + return this.defaultBlock = e; + if (!Dp.isInteger(e) || !e) + throw new Error("Invalid block ID provided"); + this.defaultBlock = Math.abs(e) + } + setPrivateKey(e) { + try { + this.setAddress(this.address.fromPrivateKey(e)) + } catch { + throw new Error("Invalid private key provided") + } + this.defaultPrivateKey = e, + this.emit("privateKeyChanged", e) + } + setAddress(e) { + if (!this.isAddress(e)) + throw new Error("Invalid address provided"); + const t = this.address.toHex(e) + , r = this.address.fromHex(e); + this.defaultPrivateKey && this.address.fromPrivateKey(this.defaultPrivateKey) !== r && (this.defaultPrivateKey = !1), + this.defaultAddress = { + hex: t, + base58: r + }, + this.emit("addressChanged", { + hex: t, + base58: r + }) + } + fullnodeSatisfies(e) { + return Vp().satisfies(this.fullnodeVersion, e) + } + isValidProvider(e) { + return Object.values(Lp).some((t=>e instanceof t)) + } + setFullNode(e) { + if (Dp.isString(e) && (e = new Lp.HttpProvider(e)), + !this.isValidProvider(e)) + throw new Error("Invalid full node provided"); + this.fullNode = e, + this.fullNode.setStatusPage("wallet/getnowblock") + } + setSolidityNode(e) { + if (Dp.isString(e) && (e = new Lp.HttpProvider(e)), + !this.isValidProvider(e)) + throw new Error("Invalid solidity node provided"); + this.solidityNode = e, + this.solidityNode.setStatusPage("walletsolidity/getnowblock") + } + setEventServer() { + this.event.setServer(...arguments) + } + setHeader() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + const t = new Lp.HttpProvider(this.fullNode.host,3e4,!1,!1,e) + , r = new Lp.HttpProvider(this.solidityNode.host,3e4,!1,!1,e) + , n = new Lp.HttpProvider(this.eventServer.host,3e4,!1,!1,e); + this.setFullNode(t), + this.setSolidityNode(r), + this.setEventServer(n) + } + setFullNodeHeader() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + const t = new Lp.HttpProvider(this.fullNode.host,3e4,!1,!1,e) + , r = new Lp.HttpProvider(this.solidityNode.host,3e4,!1,!1,e); + this.setFullNode(t), + this.setSolidityNode(r) + } + setEventHeader() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; + const t = new Lp.HttpProvider(this.eventServer.host,3e4,!1,!1,e); + this.setEventServer(t) + } + currentProviders() { + return { + fullNode: this.fullNode, + solidityNode: this.solidityNode, + eventServer: this.eventServer + } + } + currentProvider() { + return this.currentProviders() + } + getEventResult() { + for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++) + t[r] = arguments[r]; + return "object" != typeof t[1] && (t[1] = { + sinceTimestamp: t[1] || 0, + eventName: t[2] || !1, + blockNumber: t[3] || !1, + size: t[4] || 20, + page: t[5] || 1 + }, + t.splice(2, 4), + Dp.isFunction(t[2]) || (Dp.isFunction(t[1].page) ? (t[2] = t[1].page, + t[1].page = 1) : Dp.isFunction(t[1].size) && (t[2] = t[1].size, + t[1].size = 20, + t[1].page = 1))), + this.event.getEventsByContractAddress(...t) + } + getEventByTransactionID() { + return this.event.getEventsByTransactionID(...arguments) + } + contract() { + return new af(this,arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],arguments.length > 1 && void 0 !== arguments[1] && arguments[1]) + } + static get address() { + return { + fromHex: e=>Dp.isHex(e) ? Dp.crypto.getBase58CheckAddress(Dp.code.hexStr2byteArray(e.replace(/^0x/, P))) : e, + toHex: e=>Dp.isHex(e) ? e.toLowerCase().replace(/^0x/, P) : Dp.code.byteArray2hexStr(Dp.crypto.decodeBase58Address(e)).toLowerCase(), + fromPrivateKey(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + try { + return Dp.crypto.pkToAddress(e, t) + } catch { + return !1 + } + } + } + } + static sha3(e) { + return (arguments.length > 1 && void 0 !== arguments[1] && !arguments[1] ? "" : "0x") + ir(ethereumjs.Buffer.Buffer.from(e, "utf-8")).toString().substring(2) + } + static toHex(e) { + if (Dp.isBoolean(e)) + return pf.fromDecimal(+e); + if (Dp.isBigNumber(e)) + return pf.fromDecimal(e); + if ("object" == typeof e) + return pf.fromUtf8(JSON.stringify(e)); + if (Dp.isString(e)) { + if (/^(-|)0x/.test(e)) + return e; + if (!isFinite(e) || /^\s*$/.test(e)) + return pf.fromUtf8(e) + } + let t = pf.fromDecimal(e); + if ("0xNaN" === t) + throw new Error("The passed value is not convertible to a hex string"); + return t + } + static toUtf8(e) { + if (Dp.isHex(e)) + return e = e.replace(/^0x/, ""), + Buffer.from(e, "hex").toString("utf8"); + throw new Error("The passed value is not a valid hex string") + } + static fromUtf8(e) { + if (!Dp.isString(e)) + throw new Error("The passed value is not a valid utf-8 string"); + return "0x" + ethereumjs.Buffer.Buffer.from(e, "utf8").toString("hex") + } + static toAscii(e) { + if (Dp.isHex(e)) { + let t = "" + , r = 0 + , n = e.length; + for ("0x" === e.substring(0, 2) && (r = 2); r < n; r += 2) { + let n = parseInt(e.substr(r, 2), 16); + t += String.fromCharCode(n) + } + return t + } + throw new Error("The passed value is not a valid hex string") + } + static fromAscii(e, t) { + if (!Dp.isString(e)) + throw new Error("The passed value is not a valid utf-8 string"); + return "0x" + Buffer.from(e, "ascii").toString("hex").padEnd(t, "0") + } + static toDecimal(e) { + return pf.toBigNumber(e).toNumber() + } + static fromDecimal(e) { + const t = pf.toBigNumber(e) + , r = t.toString(16); + return t.isLessThan(0) ? "-0x" + r.substr(1) : "0x" + r + } + static fromSun(e) { + const t = pf.toBigNumber(e).div(1e6); + return Dp.isBigNumber(e) ? t : t.toString(10) + } + static toSun(e) { + const t = pf.toBigNumber(e).times(1e6); + return Dp.isBigNumber(e) ? t : t.toString(10) + } + static toBigNumber() { + let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0; + return Dp.isBigNumber(e) ? e : Dp.isString(e) && /^(-|)0x/.test(e) ? new kp(e.replace("0x", ""),16) : new kp(e.toString(10),10) + } + static isAddress() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + if (!Dp.isString(e)) + return !1; + if (42 === e.length) + try { + return pf.isAddress(Dp.crypto.getBase58CheckAddress(Dp.code.hexStr2byteArray(e))) + } catch (e) { + return !1 + } + try { + return Dp.crypto.isAddressValid(e) + } catch (e) { + return !1 + } + } + static async createAccount() { + return Dp.accounts.generateAccount() + } + static createRandom(e) { + return Dp.accounts.generateRandom(e) + } + static fromMnemonic(e) { + let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : C + , r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null; + return Dp.accounts.generateAccountWithMnemonic(e, t, r) + } + async isConnected() { + let e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0]; + return e ? e(null, { + fullNode: await this.fullNode.isConnected(), + solidityNode: await this.solidityNode.isConnected(), + eventServer: this.eventServer && await this.eventServer.isConnected() + }) : this.injectPromise(this.isConnected) + } + } + } + )(), + n.default +} +)())); +//# sourceMappingURL=TronWeb.js.map