System.register([], function(_export, _context) { return { execute: function () { System.register("chunks:///_virtual/_rollupPluginModLoBabelHelpers.js",[],(function(e){"use strict";return{execute:function(){function r(e,r,t,n,i,o,a){try{var u=e[o](a),l=u.value}catch(e){return void t(e)}u.done?r(l):Promise.resolve(l).then(n,i)}function t(e,r){for(var t=0;te.length)&&(r=e.length);for(var t=0,n=new Array(r);t=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)},defineProperty:function(e,r,t){r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t;return e},extends:n,inheritsLoose:function(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,i(e,r)},initializerDefineProperty:function(e,r,t,n){if(!t)return;Object.defineProperty(e,r,{enumerable:t.enumerable,configurable:t.configurable,writable:t.writable,value:t.initializer?t.initializer.call(n):void 0})},setPrototypeOf:i,unsupportedIterableToArray:o})}}})); System.register("chunks:///_virtual/env",[],(function(e){"use strict";return{execute:function(){e("DEV",!1)}}})); System.register("chunks:///_virtual/burgerswapjssdk.mjs_cjs=&original=.js",["./cjs-loader.mjs","./burgerswapjssdk.js"],(function(s,e){"use strict";var r,t;return{setters:[function(s){r=s.default},function(e){t=e.__cjsMetaURL;var r={};r.__cjsMetaURL=e.__cjsMetaURL,r.default=e.default,s(r)}],execute:function(){t||r.throwInvalidWrapper("./burgerswapjssdk.js",e.meta.url),r.require(t)}}})); System.register("chunks:///_virtual/cjs-loader.mjs",[],(function(r){"use strict";return{execute:function(){r("default",new(function(){function r(){this._namedWrappers={},this._resolveCache={},this._moduleCache={}}var e=r.prototype;return e.define=function(r,e){this._namedWrappers[r]=e},e.require=function(r){return this._require(r)},e.createRequireWithReqMap=function(r,e){return function(t){var n=r[t];if(n)return e(n);throw new Error("Unresolved specifier "+t)}},e.throwInvalidWrapper=function(r,e){throw new Error("Module '"+r+"' imported from '"+e+"' is expected be an ESM-wrapped CommonJS module but it doesn't.")},e._require=function(r,e){var t=this._moduleCache[r];if(t)return t.exports;var n={id:r,exports:{}};return this._moduleCache[r]=n,this._tryModuleLoad(n,r),n.exports},e._resolve=function(r,e){return this._resolveFromInfos(r,e)||this._throwUnresolved(r,e)},e._resolveFromInfos=function(r,e){var t,n;return r in cjsInfos?r:e&&null!==(t=null===(n=cjsInfos[e])||void 0===n?void 0:n.resolveCache[r])&&void 0!==t?t:void 0},e._tryModuleLoad=function(r,e){var t=!0;try{this._load(r,e),t=!1}finally{t&&delete this._moduleCache[e]}},e._load=function(r,e){var t=this._loadWrapper(e),n=this._createRequire(r);t(r.exports,n,r)},e._loadWrapper=function(r){return r in this._namedWrappers?this._namedWrappers[r]:this._loadExternalWrapper(r)},e._loadExternalWrapper=function(r){return function(e){var t;try{t=URL.fileURLToPath(r)}catch(e){throw new Error(r+" is not a valid file URL")}var n=require(t);Object.assign(e,n)}},e._createRequire=function(r){var e=this;return function(t){return e._require(t,r)}},e._throwUnresolved=function(r,e){throw new Error("Unable to resolve "+r+" from "+parent+".")},r}()))}}})); System.register("chunks:///_virtual/burgercitiesjssdk.mjs_cjs=&original=.js",["./cjs-loader.mjs","./burgercitiesjssdk.js"],(function(e,s){"use strict";var t,r;return{setters:[function(e){t=e.default},function(s){r=s.__cjsMetaURL;var t={};t.__cjsMetaURL=s.__cjsMetaURL,t.default=s.default,e(t)}],execute:function(){r||t.throwInvalidWrapper("./burgercitiesjssdk.js",s.meta.url),t.require(r)}}})); System.register("chunks:///_virtual/walletconnect.mjs_cjs=&original=.js",["./cjs-loader.mjs","./walletconnect.js"],(function(e,t){"use strict";var c,n;return{setters:[function(e){c=e.default},function(t){n=t.__cjsMetaURL;var c={};c.__cjsMetaURL=t.__cjsMetaURL,c.default=t.default,e(c)}],execute:function(){n||c.throwInvalidWrapper("./walletconnect.js",t.meta.url),c.require(n)}}})); System.register("chunks:///_virtual/ethers-5.2.umd.min.mjs_cjs=&original=.js",["./cjs-loader.mjs","./ethers-5.2.umd.min.js"],(function(e,t){"use strict";var r,s;return{setters:[function(e){r=e.default},function(t){s=t.__cjsMetaURL;var r={};r.__cjsMetaURL=t.__cjsMetaURL,r.default=t.default,e(r)}],execute:function(){s||r.throwInvalidWrapper("./ethers-5.2.umd.min.js",t.meta.url),r.require(s)}}})); System.register("chunks:///_virtual/protobuf-bundles.min.mjs_cjs=&original=.js",["./cjs-loader.mjs","./protobuf-bundles.min.js"],(function(e,t){"use strict";var r,s;return{setters:[function(e){r=e.default},function(t){s=t.__cjsMetaURL;var r={};r.__cjsMetaURL=t.__cjsMetaURL,r.default=t.default,e(r)}],execute:function(){s||r.throwInvalidWrapper("./protobuf-bundles.min.js",t.meta.url),r.require(s)}}})); System.register("chunks:///_virtual/buffer-lib-cjs.mjs_cjs=&original=.js",["./cjs-loader.mjs","./buffer-lib-cjs.js"],(function(e,t){"use strict";var r,s;return{setters:[function(e){r=e.default},function(t){s=t.__cjsMetaURL;var r={};r.__cjsMetaURL=t.__cjsMetaURL,r.default=t.default,e(r)}],execute:function(){s||r.throwInvalidWrapper("./buffer-lib-cjs.js",t.meta.url),r.require(s)}}})); System.register("chunks:///_virtual/ymrtc.o.umd.min.mjs_cjs=&original=.js",["./cjs-loader.mjs","./ymrtc.o.umd.min.js"],(function(t,e){"use strict";var r,s;return{setters:[function(t){r=t.default},function(e){s=e.__cjsMetaURL;var r={};r.__cjsMetaURL=e.__cjsMetaURL,r.default=e.default,t(r)}],execute:function(){s||r.throwInvalidWrapper("./ymrtc.o.umd.min.js",e.meta.url),r.require(s)}}})); System.register("chunks:///_virtual/WalletConnect.mjs_cjs=&original=2.js",["./cjs-loader.mjs","./WalletConnect2.js"],(function(e,t){"use strict";var n,a;return{setters:[function(e){n=e.default},function(t){a=t.__cjsMetaURL;var n={};n.__cjsMetaURL=t.__cjsMetaURL,n.default=t.default,e(n)}],execute:function(){a||n.throwInvalidWrapper("./WalletConnect.js",t.meta.url),n.require(a)}}})); System.register("chunks:///_virtual/WalletConnect2.js",["./cjs-loader.mjs"],(function(t,e){"use strict";var r;return{setters:[function(t){r=t.default}],execute:function(){t("default",void 0),r.define(e.meta.url,(function(e,n,i,o,s){r.createRequireWithReqMap({},n);!function(){function t(e,r){return(t=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(e,r)}function r(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r>>0).toString(2))}function _(t){return c(M(t))}function M(t){return new Uint8Array(E(t).map((function(t){return parseInt(t,2)})))}function k(t,e){return f(M(t),e)}function S(t){return!("string"!=typeof t||!new RegExp(/^[01]+$/).test(t))&&t.length%8==0}function x(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}function R(e){return t.isBuffer(e)}function A(t){return i.default.strict(t)&&!R(t)}function O(t){return!A(t)&&!R(t)&&void 0!==t.byteLength}function T(t,e){void 0===e&&(e=8);var r=t%e;return r?(t-r)/e*e+e:t}function E(t,e){void 0===e&&(e=8);var r=j(t).match(new RegExp(".{"+e+"}","gi"));return Array.from(r||[])}function I(t){return E(t).map(U).join("")}function j(t,e,r){return void 0===e&&(e=8),void 0===r&&(r="0"),B(t,T(t.length,e),r)}function B(t,e,r){return void 0===r&&(r="0"),N(t,e,!0,r)}function C(t){return t.replace(/^0x/,"")}function P(t){return t.startsWith("0x")?t:"0x"+t}function U(t){return t.split("").reverse().join("")}function N(t,e,r,n){void 0===n&&(n="0");var i=e-t.length,o=t;if(i>0){var s=n.repeat(i);o=r?s+t:t+s}return o}e.bufferToArray=s,e.bufferToHex=u,e.bufferToUtf8=a,e.bufferToNumber=h,e.bufferToBinary=function(t){return d(s(t))},e.arrayToBuffer=c,e.arrayToHex=f,e.arrayToUtf8=l,e.arrayToNumber=p,e.arrayToBinary=d,e.hexToBuffer=m,e.hexToArray=g,e.hexToUtf8=function(t){return a(m(t))},e.hexToNumber=function(t){return p(g(t))},e.hexToBinary=v,e.utf8ToBuffer=y,e.utf8ToArray=w,e.utf8ToHex=function(t,e){return void 0===e&&(e=!1),u(y(t),e)},e.utf8ToNumber=function(t){var e=parseInt(t,10);return function(t,e){if(!t)throw new Error("Number can only safely store up to 53 bits")}(!function(t){return void 0===t}(e)),e},e.utf8ToBinary=function(t){return d(w(t))},e.numberToBuffer=function(t){return _(b(t))},e.numberToArray=function(t){return M(b(t))},e.numberToHex=function(t,e){return k(b(t),e)},e.numberToUtf8=function(t){return""+t},e.numberToBinary=b,e.binaryToBuffer=_,e.binaryToArray=M,e.binaryToHex=k,e.binaryToUtf8=function(t){return l(M(t))},e.binaryToNumber=function(t){return p(M(t))},e.isBinaryString=S,e.isHexString=x,e.isBuffer=R,e.isTypedArray=A,e.isArrayBuffer=O,e.getType=function(t){return R(t)?"buffer":A(t)?"typed-array":O(t)?"array-buffer":Array.isArray(t)?"array":typeof t},e.getEncoding=function(t){return S(t)?"binary":x(t)?"hex":"utf8"},e.concatBuffers=function(){for(var e=arguments.length,r=new Array(e),n=0;n0&&(t=t.slice(r)),t},e.trimRight=function(t,e){return t.slice(0,e)},e.calcByteLength=T,e.splitBytes=E,e.swapBytes=I,e.swapHex=function(t){return k(I(v(t)))},e.sanitizeBytes=j,e.padLeft=B,e.padRight=function(t,e,r){return void 0===r&&(r="0"),N(t,e,!1,r)},e.removeHexPrefix=C,e.addHexPrefix=P,e.sanitizeHex=function(t){return(t=j(t=C(t),2))&&(t=P(t)),t},e.removeHexLeadingZeros=function(t){var e=t.startsWith("0x");return t=(t=C(t)).startsWith("0")?t.substring(1):t,e?P(t):t}}).call(this,r(15).Buffer)},function(t,e,r){var n=r(35),i=r(5),o=r(36);function s(t){return Object(o.a)(t)}function u(){var t=s();return t&&t.os?t.os:void 0}function a(){return!!u()&&(function(){var t=u();return!!t&&t.toLowerCase().includes("android")}()||function(){var t=u();return!!t&&(t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}())}function h(){return!function(){var t=s();return!(!t||!t.name)&&"node"===t.name.toLowerCase()}()&&!!c()}i.getFromWindow,i.getFromWindowOrThrow,i.getDocumentOrThrow,i.getDocument,i.getNavigatorOrThrow;var c=i.getNavigator,f=(i.getLocationOrThrow,i.getLocation),l=(i.getCryptoOrThrow,i.getCrypto,i.getLocalStorageOrThrow,i.getLocalStorage);function p(){return n.getWindowMetadata()}function d(t,e){var r=function(t){return"string"==typeof t?t:JSON.stringify(t)}(e),n=l();n&&n.setItem(t,r)}function m(t){var e=null,r=l();return r&&(e=r.getItem(t)),e?function(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return JSON.parse(t)}catch(e){return t}}(e):e}function g(t){var e=l();e&&e.removeItem(t)}var v=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],y=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign"],w=r(11),b=r.n(w),_=r(0);function M(t){return _.arrayToBuffer(new Uint8Array(t))}function k(t,e){return _.arrayToHex(new Uint8Array(t),!e)}function S(t){return _.bufferToArray(t).buffer}function x(t){return _.hexToArray(t).buffer}function R(t,e){var r=_.removeHexPrefix(_.sanitizeHex(new b.a(t).toString(16)));return e?r:_.addHexPrefix(r)}var A=r(37);function O(t){return _.sanitizeHex(t)}var T=r(38).payloadId;function E(){return function(t,e){for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e}()}function I(t,e){return _.isHexString(t,e)}function j(t){return void 0!==t.method}function B(t){return void 0!==t.result}function C(t){return void 0!==t.error}function P(t){return void 0!==t.event}function U(t){return v.includes(t)||t.startsWith("wc_")}function N(t){return!!t.method.startsWith("wc_")||!y.includes(t.method)}function L(t){var e,r;return(r=t)&&r.length&&!I(t[0])&&(t[0]=(e=t[0],_.utf8ToHex(e,!0))),t}function q(t){if(void 0!==t.type&&"0"!==t.type)return t;if(void 0===t.from||!(e=t.from)||"0x"!==e.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(e)||!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e)&&e!==function(t){t=Object(_.removeHexPrefix)(t.toLowerCase());for(var e,r=Object(_.removeHexPrefix)(Object(A.keccak_256)((e=t,_.utf8ToBuffer(e)))),n="",i=0;i7?n+=t[i].toUpperCase():n+=t[i];return Object(_.addHexPrefix)(n)}(e))throw new Error("Transaction object must include a valid 'from' value.");var e;function r(t){var e,r=t;return("number"==typeof t||"string"==typeof t&&!function(t){return""===t||"string"==typeof t&&""===t.trim()}(t))&&(I(t)?"string"==typeof t&&(r=O(t)):r=R(t)),"string"==typeof r&&(e=r,r=_.removeHexLeadingZeros(_.addHexPrefix(e))),r}var n={from:O(t.from),to:void 0===t.to?"":O(t.to),gasPrice:void 0===t.gasPrice?"":r(t.gasPrice),gas:void 0===t.gas?void 0===t.gasLimit?"":r(t.gasLimit):r(t.gas),value:void 0===t.value?"":r(t.value),nonce:void 0===t.nonce?"":r(t.nonce),data:void 0===t.data?"":O(t.data)||"0x"},i=["gasPrice","gas","value","nonce"];return Object.keys(n).forEach((function(t){!n[t].trim().length&&i.includes(t)&&delete n[t]})),n}function D(t){var e=t.message||"Failed or Rejected Request",r=-32e3;if(t&&!t.code)switch(e){case"Parse error":r=-32700;break;case"Invalid request":r=-32600;break;case"Method not found":r=-32601;break;case"Invalid params":r=-32602;break;case"Internal error":r=-32603;break;default:r=-32e3}return{code:r,message:e}}var W=r(14);function H(t){var e=-1!==t.indexOf("?")?t.indexOf("?"):void 0;return void 0!==e?t.substr(e):""}function F(t,e){var r=Y(t);return function(t){return W.stringify(t)}(r=Object.assign(Object.assign({},r),e))}function Y(t){return W.parse(t)}function z(t){return void 0!==t.bridge}function J(t){var e=t.indexOf(":"),r=-1!==t.indexOf("?")?t.indexOf("?"):void 0,n=t.substring(0,e),i=function(t){var e=t.split("@");return{handshakeTopic:e[0],version:parseInt(e[1],10)}}(t.substring(e+1,r)),o=function(t){var e=Y(t);return{key:e.key||"",bridge:e.bridge||""}}(void 0!==r?t.substr(r):"");return Object.assign(Object.assign({protocol:n},i),o)}r.d(e,"g",(function(){return s})),r.d(e,"r",(function(){return a})),r.d(e,"m",(function(){return h})),r.d(e,"k",(function(){return f})),r.d(e,"i",(function(){return p})),r.d(e,"B",(function(){return d})),r.d(e,"j",(function(){return m})),r.d(e,"A",(function(){return g})),r.d(e,"v",(function(){return"WALLETCONNECT_DEEPLINK_CHOICE"})),r.d(e,"C",(function(){return y})),r.d(e,"b",(function(){return M})),r.d(e,"c",(function(){return k})),r.d(e,"d",(function(){return S})),r.d(e,"e",(function(){return x})),r.d(e,"f",(function(){return R})),r.d(e,"w",(function(){return L})),r.d(e,"x",(function(){return q})),r.d(e,"z",(function(){return T})),r.d(e,"D",(function(){return E})),r.d(e,"h",(function(){return D})),r.d(e,"u",(function(){return z})),r.d(e,"y",(function(){return J})),r.d(e,"l",(function(){return H})),r.d(e,"a",(function(){return F})),r.d(e,"o",(function(){return j})),r.d(e,"q",(function(){return B})),r.d(e,"p",(function(){return C})),r.d(e,"n",(function(){return P})),r.d(e,"s",(function(){return U})),r.d(e,"t",(function(){return N}))},function(t,e,r){r.d(e,"b",(function(){return 256})),r.d(e,"g",(function(){return 256})),r.d(e,"a",(function(){return"AES-CBC"})),r.d(e,"f",(function(){return"SHA-256"})),r.d(e,"e",(function(){return"HMAC"})),r.d(e,"i",(function(){return"SHA-256"})),r.d(e,"j",(function(){return"SHA-512"})),r.d(e,"h",(function(){return 512})),r.d(e,"d",(function(){return"encrypt"})),r.d(e,"c",(function(){return"decrypt"})),r.d(e,"k",(function(){return"sign"})),r.d(e,"l",(function(){return"verify"}))},function(t,e,r){var n;r.d(e,"a",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"b",(function(){return s})),r.d(e,"d",(function(){return u})),r.d(e,"e",(function(){return a}));var i="INTERNAL_ERROR",o="SERVER_ERROR",s=[-32700,-32600,-32601,-32602,-32603],u=[-32e3,-32099],a=((n={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"}})[i]={code:-32603,message:"Internal error"},n[o]={code:-32e3,message:"Server error"},n)},function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(50),e),i(r(51),e)},function(t,e,r){function n(t){var e=void 0;return"undefined"!=typeof window&&void 0!==window[t]&&(e=window[t]),e}function i(t){var e=n(t);if(!e)throw new Error(t+" is not defined in Window");return e}Object.defineProperty(e,"__esModule",{value:!0}),e.getLocalStorage=e.getLocalStorageOrThrow=e.getCrypto=e.getCryptoOrThrow=e.getLocation=e.getLocationOrThrow=e.getNavigator=e.getNavigatorOrThrow=e.getDocument=e.getDocumentOrThrow=e.getFromWindowOrThrow=e.getFromWindow=void 0,e.getFromWindow=n,e.getFromWindowOrThrow=i,e.getDocumentOrThrow=function(){return i("document")},e.getDocument=function(){return n("document")},e.getNavigatorOrThrow=function(){return i("navigator")},e.getNavigator=function(){return n("navigator")},e.getLocationOrThrow=function(){return i("location")},e.getLocation=function(){return n("location")},e.getCryptoOrThrow=function(){return i("crypto")},e.getCrypto=function(){return n("crypto")},e.getLocalStorageOrThrow=function(){return i("localStorage")},e.getLocalStorage=function(){return n("localStorage")}},function(t,e,r){r.d(e,"b",(function(){return u})),r.d(e,"a",(function(){return c})),r.d(e,"c",(function(){return l})),r.d(e,"d",(function(){return d})),r.d(e,"e",(function(){return g})),r.d(e,"f",(function(){return y}));var n=r(4),i=r(2);function o(t,e){return s.apply(this,arguments)}function s(){return(s=a(regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r=i.a),t.abrupt("return",n.getSubtleCrypto().importKey("raw",e,function(t){return t===i.a?{length:i.b,name:i.a}:{hash:{name:i.f},name:i.e}}(r),!0,function(t){return t===i.a?[i.d,i.c]:[i.k,i.l]}(r)));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function u(t,e,r){return h.apply(this,arguments)}function h(){return(h=a(regeneratorRuntime.mark((function t(e,r,s){var u,a,h;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=n.getSubtleCrypto(),t.next=3,o(r,i.a);case 3:return a=t.sent,t.next=6,u.encrypt({iv:e,name:i.a},a,s);case 6:return h=t.sent,t.abrupt("return",new Uint8Array(h));case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function c(t,e,r){return f.apply(this,arguments)}function f(){return(f=a(regeneratorRuntime.mark((function t(e,r,s){var u,a,h;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=n.getSubtleCrypto(),t.next=3,o(r,i.a);case 3:return a=t.sent,t.next=6,u.decrypt({iv:e,name:i.a},a,s);case 6:return h=t.sent,t.abrupt("return",new Uint8Array(h));case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function l(t,e){return p.apply(this,arguments)}function p(){return(p=a(regeneratorRuntime.mark((function t(e,r){var s,u,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=n.getSubtleCrypto(),t.next=3,o(e,i.e);case 3:return u=t.sent,t.next=6,s.sign({length:i.g,name:i.e},u,r);case 6:return a=t.sent,t.abrupt("return",new Uint8Array(a));case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function d(t,e){return m.apply(this,arguments)}function m(){return(m=a(regeneratorRuntime.mark((function t(e,r){var s,u,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=n.getSubtleCrypto(),t.next=3,o(e,i.e);case 3:return u=t.sent,t.next=6,s.sign({length:i.h,name:i.e},u,r);case 6:return a=t.sent,t.abrupt("return",new Uint8Array(a));case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(t){return v.apply(this,arguments)}function v(){return(v=a(regeneratorRuntime.mark((function t(e){var r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.getSubtleCrypto(),t.next=3,r.digest({name:i.i},e);case 3:return o=t.sent,t.abrupt("return",new Uint8Array(o));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function y(t){return w.apply(this,arguments)}function w(){return(w=a(regeneratorRuntime.mark((function t(e){var r,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.getSubtleCrypto(),t.next=3,r.digest({name:i.j},e);case 3:return o=t.sent,t.abrupt("return",new Uint8Array(o));case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},function(t,e,r){r.d(e,"c",(function(){return i})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s}));var n=r(3);function i(t){return n.b.includes(t)}function o(t){return Object.keys(n.e).includes(t)?n.e[t]:n.e[n.a]}function s(t){return Object.values(n.e).find((function(e){return e.code===t}))||n.e[n.a]}},function(t,e,r){var n=r(27);r.d(e,"randomBytes",(function(){return n.a}));var i=r(28);r.d(e,"aesCbcDecrypt",(function(){return i.a})),r.d(e,"aesCbcEncrypt",(function(){return i.b}));var o=r(29);r.d(e,"hmacSha256Sign",(function(){return o.a})),r(34),r(10),r(2)},function(t,e,r){r.d(e,"a",(function(){return n}));var n=function(){}},function(t,e,r){var n=r(30);r.o(n,"isConstantTime")&&r.d(e,"isConstantTime",(function(){return n.isConstantTime})),r(31);var i=r(32);r.o(i,"isConstantTime")&&r.d(e,"isConstantTime",(function(){return i.isConstantTime}));var o=r(33);r.d(e,"isConstantTime",(function(){return o.a}))},function(t,e,r){(function(t){!function(t,e){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(44).Buffer}catch(t){}function u(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return n}function a(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s=49?u-49+10:u>=17?u-17+10:u}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<>>26-u&67108863,(u+=24)>=26&&(u-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-u&67108863,(u+=24)>=26&&(u-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=u(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=u(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,u=Math.min(o,o-s)+r,h=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){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"],c=[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 l(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,u=67108863&s,a=s/67108864|0;r.words[0]=u;for(var h=1;h>>26,f=67108863&a,l=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=l;p++){var d=h-p|0;c+=(s=(i=0|t.words[d])*(o=0|e.words[p])+f)/67108864|0,f=67108863&s}r.words[h]=0|f,a=0|c}return 0!==a?r.words[h]=0|a:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s>>24-i&16777215)||s!==this.length-1?h[6-a.length]+a+r:a+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=c[t],p=f[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:h[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,u,a="le"===e,h=new t(o),c=this.clone();if(a){for(u=0;!c.isZero();u++)s=c.andln(255),c.iushrn(8),h[u]=s;for(;u=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,p=0|s[1],d=8191&p,m=p>>>13,g=0|s[2],v=8191&g,y=g>>>13,w=0|s[3],b=8191&w,_=w>>>13,M=0|s[4],k=8191&M,S=M>>>13,x=0|s[5],R=8191&x,A=x>>>13,O=0|s[6],T=8191&O,E=O>>>13,I=0|s[7],j=8191&I,B=I>>>13,C=0|s[8],P=8191&C,U=C>>>13,N=0|s[9],L=8191&N,q=N>>>13,D=0|u[0],W=8191&D,H=D>>>13,F=0|u[1],Y=8191&F,z=F>>>13,J=0|u[2],Z=8191&J,$=J>>>13,K=0|u[3],V=8191&K,Q=K>>>13,X=0|u[4],G=8191&X,tt=X>>>13,et=0|u[5],rt=8191&et,nt=et>>>13,it=0|u[6],ot=8191&it,st=it>>>13,ut=0|u[7],at=8191&ut,ht=ut>>>13,ct=0|u[8],ft=8191&ct,lt=ct>>>13,pt=0|u[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(h+(n=Math.imul(f,W))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(l,W)|0))<<13)|0;h=((o=Math.imul(l,H))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(d,W),i=(i=Math.imul(d,H))+Math.imul(m,W)|0,o=Math.imul(m,H);var vt=(h+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,z)|0)+Math.imul(l,Y)|0))<<13)|0;h=((o=o+Math.imul(l,z)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,W),i=(i=Math.imul(v,H))+Math.imul(y,W)|0,o=Math.imul(y,H),n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,z)|0;var yt=(h+(n=n+Math.imul(f,Z)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(l,Z)|0))<<13)|0;h=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,W),i=(i=Math.imul(b,H))+Math.imul(_,W)|0,o=Math.imul(_,H),n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,z)|0,n=n+Math.imul(d,Z)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,$)|0;var wt=(h+(n=n+Math.imul(f,V)|0)|0)+((8191&(i=(i=i+Math.imul(f,Q)|0)+Math.imul(l,V)|0))<<13)|0;h=((o=o+Math.imul(l,Q)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,W),i=(i=Math.imul(k,H))+Math.imul(S,W)|0,o=Math.imul(S,H),n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,z)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,z)|0,n=n+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,$)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,$)|0,n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,Q)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Q)|0;var bt=(h+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(l,G)|0))<<13)|0;h=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(R,W),i=(i=Math.imul(R,H))+Math.imul(A,W)|0,o=Math.imul(A,H),n=n+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,z)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,z)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(v,V)|0,i=(i=i+Math.imul(v,Q)|0)+Math.imul(y,V)|0,o=o+Math.imul(y,Q)|0,n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(l,rt)|0))<<13)|0;h=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(T,W),i=(i=Math.imul(T,H))+Math.imul(E,W)|0,o=Math.imul(E,H),n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,z)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(S,Z)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(b,V)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(v,G)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(h+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,st)|0)+Math.imul(l,ot)|0))<<13)|0;h=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(j,W),i=(i=Math.imul(j,H))+Math.imul(B,W)|0,o=Math.imul(B,H),n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,z)|0,n=n+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,o=o+Math.imul(y,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var kt=(h+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(l,at)|0))<<13)|0;h=((o=o+Math.imul(l,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(P,W),i=(i=Math.imul(P,H))+Math.imul(U,W)|0,o=Math.imul(U,H),n=n+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,z)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,$)|0,n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,Q)|0,n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,st)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ht)|0;var St=(h+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(l,ft)|0))<<13)|0;h=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,H))+Math.imul(q,W)|0,o=Math.imul(q,H),n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,z)|0)+Math.imul(U,Y)|0,o=o+Math.imul(U,z)|0,n=n+Math.imul(j,Z)|0,i=(i=i+Math.imul(j,$)|0)+Math.imul(B,Z)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,Q)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Q)|0,n=n+Math.imul(R,G)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(A,G)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(v,at)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,at)|0,o=o+Math.imul(y,ht)|0,n=n+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,lt)|0;var xt=(h+(n=n+Math.imul(f,dt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(l,dt)|0))<<13)|0;h=((o=o+Math.imul(l,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,Y),i=(i=Math.imul(L,z))+Math.imul(q,Y)|0,o=Math.imul(q,z),n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(U,Z)|0,o=o+Math.imul(U,$)|0,n=n+Math.imul(j,V)|0,i=(i=i+Math.imul(j,Q)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(T,G)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,at)|0,o=o+Math.imul(_,ht)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(y,ft)|0,o=o+Math.imul(y,lt)|0;var Rt=(h+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(L,Z),i=(i=Math.imul(L,$))+Math.imul(q,Z)|0,o=Math.imul(q,$),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(U,V)|0,o=o+Math.imul(U,Q)|0,n=n+Math.imul(j,G)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,st)|0,n=n+Math.imul(k,at)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(S,at)|0,o=o+Math.imul(S,ht)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,lt)|0;var At=(h+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,dt)|0))<<13)|0;h=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,Q))+Math.imul(q,V)|0,o=Math.imul(q,Q),n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(U,G)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(j,rt)|0,i=(i=i+Math.imul(j,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(R,at)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(A,at)|0,o=o+Math.imul(A,ht)|0,n=n+Math.imul(k,ft)|0,i=(i=i+Math.imul(k,lt)|0)+Math.imul(S,ft)|0,o=o+Math.imul(S,lt)|0;var Ot=(h+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(_,dt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,G),i=(i=Math.imul(L,tt))+Math.imul(q,G)|0,o=Math.imul(q,tt),n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(E,at)|0,o=o+Math.imul(E,ht)|0,n=n+Math.imul(R,ft)|0,i=(i=i+Math.imul(R,lt)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,lt)|0;var Tt=(h+(n=n+Math.imul(k,dt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(S,dt)|0))<<13)|0;h=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(q,rt)|0,o=Math.imul(q,nt),n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(j,at)|0,i=(i=i+Math.imul(j,ht)|0)+Math.imul(B,at)|0,o=o+Math.imul(B,ht)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,lt)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,lt)|0;var Et=(h+(n=n+Math.imul(R,dt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(A,dt)|0))<<13)|0;h=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(q,ot)|0,o=Math.imul(q,st),n=n+Math.imul(P,at)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(U,at)|0,o=o+Math.imul(U,ht)|0,n=n+Math.imul(j,ft)|0,i=(i=i+Math.imul(j,lt)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,lt)|0;var It=(h+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(E,dt)|0))<<13)|0;h=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,at),i=(i=Math.imul(L,ht))+Math.imul(q,at)|0,o=Math.imul(q,ht),n=n+Math.imul(P,ft)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(U,ft)|0,o=o+Math.imul(U,lt)|0;var jt=(h+(n=n+Math.imul(j,dt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(B,dt)|0))<<13)|0;h=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(L,ft),i=(i=Math.imul(L,lt))+Math.imul(q,ft)|0,o=Math.imul(q,lt);var Bt=(h+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(U,dt)|0))<<13)|0;h=((o=o+Math.imul(U,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863;var Ct=(h+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,mt))+Math.imul(q,dt)|0))<<13)|0;return h=((o=Math.imul(q,mt))+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,a[0]=gt,a[1]=vt,a[2]=yt,a[3]=wt,a[4]=bt,a[5]=_t,a[6]=Mt,a[7]=kt,a[8]=St,a[9]=xt,a[10]=Rt,a[11]=At,a[12]=Ot,a[13]=Tt,a[14]=Et,a[15]=It,a[16]=jt,a[17]=Bt,a[18]=Ct,0!==h&&(a[19]=h,r.length++),r};function d(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=l),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?l(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=u,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),u=67108863^67108863>>>o<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var f=0|this.words[h];this.words[h]=c<<26-o|f>>>o,c=f&u}return a&&0!==c&&(a.words[a.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(a/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===u)return this.strip();for(n(-1===u),u=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var u,a=n.length-i.length;if("mod"!==e){(u=new o(null)).length=a+1,u.words=new Array(u.length);for(var h=0;h=0;f--){var l=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,f);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);u&&(u.words[f]=l)}return u&&u.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:u||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(u=this.neg().divmod(t,e),"mod"!==e&&(i=u.div.neg()),"div"!==e&&(s=u.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(u=this.divmod(t.neg(),e),"mod"!==e&&(i=u.div.neg()),{div:i,mod:u.mod}):0!=(this.negative&t.negative)?(u=this.neg().divmod(t.neg(),e),"div"!==e&&(s=u.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:u.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,u},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),u=new o(0),a=new o(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(u.isOdd()||a.isOdd())&&(u.iadd(c),a.isub(f)),u.iushrn(1),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(u),s.isub(a)):(r.isub(e),u.isub(i),a.isub(s))}return{a:u,b:a,gcd:r.iushln(h)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),u=new o(0),a=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var f=0,l=1;0==(r.words[0]&l)&&f<26;++f,l<<=1);if(f>0)for(r.iushrn(f);f-- >0;)u.isOdd()&&u.iadd(a),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(u)):(r.isub(e),u.isub(s))}return(i=0===e.cmpn(1)?s:u).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,u&=67108863,this.words[s]=u}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new M(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new w;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var u=new o(1).toRed(this),a=u.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(a);)c.redIAdd(a);for(var f=this.pow(c,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(u);){for(var m=p,g=0;0!==m.cmp(u);g++)m=m.redSqr();n(g=0;n--){for(var h=e.words[n],c=a-1;c>=0;c--){var f=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4==++u||0===n&&0===c)&&(i=this.mul(i,r[s]),u=0,s=0)):u=0}a=26}return i},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},i(k,M),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(43)(t))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var a,h=[],c=!1,f=-1;function l(){c&&a&&(c=!1,a.length?h=a.concat(h):f=-1,h.length&&p())}function p(){if(!c){var t=u(l);c=!0;for(var e=h.length;e;){for(a=h,h=[];++f1)for(var r=1;r-1?r.split(t.arrayFormatSeparator).map((function(e){return h(e,t)})):null===r?r:h(r,t);n[e]=i};default:return function(t,e,r){void 0!==r[t]?r[t]=[].concat(r[t],e):r[t]=e}}}(e),n=Object.create(null);if("string"!=typeof t)return n;if(!(t=t.trim().replace(/^[?#&]/,"")))return n;for(var i,a=o(t.split("&"));!(i=a()).done;){var c=i.value,f=s(e.decode?c.replace(/\+/g," "):c,"="),p=f[0],d=f[1];d=void 0===d?null:["comma","separator"].includes(e.arrayFormat)?d:h(d,e),r(h(p,e),d,n)}for(var m=0,g=Object.keys(n);m0})).join("&")},e.parseUrl=function(t,e){e=Object.assign({decode:!0},e);var r=s(t,"#"),n=r[0],i=r[1];return Object.assign({url:n.split("?")[0]||"",query:p(f(t),e)},e&&e.parseFragmentIdentifier&&i?{fragmentIdentifier:h(i,e)}:{})},e.stringifyUrl=function(t,r){r=Object.assign({encode:!0,strict:!0},r);var n=c(t.url).split("?")[0]||"",i=e.extract(t.url),o=e.parse(i,{sort:!1}),s=Object.assign(o,t.query),u=e.stringify(s,r);u&&(u="?"+u);var h=function(t){var e="",r=t.indexOf("#");return-1!==r&&(e=t.slice(r)),e}(t.url);return t.fragmentIdentifier&&(h="#"+a(t.fragmentIdentifier,r)),""+n+u+h}},function(t,e,r){(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var n=r(45),i=r(46),o=r(47);function s(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(a.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(n)return D(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,s=1,u=t.length,a=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,u/=2,a/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=r;ou&&(r=u-a),o=r;o>=0;o--){for(var f=!0,l=0;li&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function R(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:h>223?3:h>191?2:1;if(i+f<=r)switch(f){case 1:h<128&&(c=h);break;case 2:128==(192&(o=t[i+1]))&&(a=(31&h)<<6|63&o)>127&&(c=a);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(a=(15&h)<<12|(63&o)<<6|63&s)>2047&&(a<55296||a>57343)&&(c=a);break;case 4:o=t[i+1],s=t[i+2],u=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&u)&&(a=(15&h)<<18|(63&o)<<12|(63&s)<<6|63&u)>65535&&a<1114112&&(c=a)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function B(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function C(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function P(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,o){return o||P(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,o){return o||P(t,0,r,8),i.write(t,e,r,n,52,8),r+8}e.Buffer=a,e.SlowBuffer=function(t){return+t!=t&&(t=0),a.alloc(+t)},e.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),a.poolSize=8192,a._augment=function(t){return t.__proto__=a.prototype,t},a.from=function(t,e,r){return h(null,t,e,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(t,e,r){return function(t,e,r,n){return c(e),e<=0?u(t,e):void 0!==r?"string"==typeof n?u(t,e).fill(r,n):u(t,e).fill(r):u(t,e)}(null,t,e,r)},a.allocUnsafe=function(t){return f(null,t)},a.allocUnsafeSlow=function(t){return f(null,t)},a.isBuffer=function(t){return!(null==t||!t._isBuffer)},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},a.prototype.compare=function(t,e,r,n,i){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),u=Math.min(o,s),h=this.slice(n,i),c=t.slice(e,r),f=0;fi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return M(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):C(this,t,e,!0),e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=0,s=1,u=0;for(this[e]=255&t;++o>0)-u&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=r-1,s=1,u=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/s>>0)-u&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):C(this,t,e,!0),e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},a.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(12))},function(t,e){t.exports=i,i.strict=o,i.loose=s;var r=Object.prototype.toString,n={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(t){return o(t)||s(t)}function o(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function s(t){return n[r.call(t)]}},function(t,e,r){var n=r(4);r.o(n,"payloadId")&&r.d(e,"payloadId",(function(){return n.payloadId})),n.isNode},function(t,e,r){function n(){return Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3))}r.d(e,"a",(function(){return n})),r(7),r(3)},function(t,e,r){},function(t,e,r){r(21)},function(t,e,r){r(22),r(9),r(23),r(24)},function(t,e){},function(t,e,r){var n=r(9);n.a,n.a},function(t,e){},function(t,e,r){},function(t,e,r){},function(t,e,r){r.d(e,"a",(function(){return i}));var n=r(4);function i(t){return n.getBrowerCrypto().getRandomValues(new Uint8Array(t))}},function(t,e,r){r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return o}));var n=r(6);function i(t,e,r){return Object(n.b)(t,e,r)}function o(t,e,r){return Object(n.a)(t,e,r)}},function(t,e,r){r.d(e,"a",(function(){return i}));var n=r(6);function i(t,e){return o.apply(this,arguments)}function o(){return(o=a(regeneratorRuntime.mark((function t(e,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(n.c)(e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}r(10)},function(t,e,r){var n=r(4);r.o(n,"isConstantTime")&&r.d(e,"isConstantTime",(function(){return n.isConstantTime}))},function(t,e,r){},function(t,e){},function(t,e,r){function n(t,e){if(t.length!==e.length)return!1;for(var r=0,n=0;n-1){var u=o.getAttribute("href");if(u)if(-1===u.toLowerCase().indexOf("https:")&&-1===u.toLowerCase().indexOf("http:")&&0!==u.indexOf("//")){var a=e.protocol+"//"+e.host;if(0===u.indexOf("/"))a+=u;else{var h=e.pathname.split("/");h.pop(),a+=h.join("/")+"/"+u}n.push(a)}else if(0===u.indexOf("//")){var c=e.protocol+u;n.push(c)}else n.push(u)}}return n}(),name:i}}},function(t,e,r){(function(t){r.d(e,"a",(function(){return f}));var n=function(t,e,r){this.name=t,this.version=e,this.os=r,this.type="browser"},i=function(e){this.version=e,this.type="node",this.name="node",this.os=t.platform},o=function(t,e,r,n){this.name=t,this.version=e,this.os=r,this.bot=n,this.type="bot-device"},s=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},u=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},a=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,h=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],c=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function f(e){return e?p(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new u:"undefined"!=typeof navigator?p(navigator.userAgent):void 0!==t&&t.version?new i(t.version.slice(1)):null}function l(t){return""!==t&&h.reduce((function(e,r){var n=r[0],i=r[1];if(e)return e;var o=i.exec(t);return!!o&&[n,o]}),!1)}function p(t){var e=l(t);if(!e)return null;var r=e[0],i=e[1];if("searchbot"===r)return new s;var u=i[1]&&i[1].split(/[._]/).slice(0,3);u?u.length<3&&(u=function(){for(var t=0,e=0,r=arguments.length;e>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 N(t,e,r){U.call(this,t,e,r)}U.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(s);if(null===t)throw new Error(s);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||l&&ArrayBuffer.isView(t)))throw new Error(s);e=!0}for(var n,i,o=this.blocks,u=this.byteCount,a=t.length,h=this.blockCount,c=0,f=this.s;c>2]|=t[c]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=u){for(this.start=n-u,this.block=o[h],n=0;n>=8);r>0;)i.unshift(r),r=255&(t>>=8),++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},U.prototype.encodeString=function(t){var e,r=typeof t;if("string"!==r){if("object"!==r)throw new Error(s);if(null===t)throw new Error(s);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||l&&ArrayBuffer.isView(t)))throw new Error(s);e=!0}var n=0,i=t.length;if(e)n=i;else for(var o=0;o=57344?n+=3:(u=65536+((1023&u)<<10|1023&t.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(t),n},U.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e>4&15]+p[15&t]+p[t>>12&15]+p[t>>8&15]+p[t>>20&15]+p[t>>16&15]+p[t>>28&15]+p[t>>24&15];s%e==0&&(L(r),o=0)}return i&&(t=r[o],u+=p[t>>4&15]+p[15&t],i>1&&(u+=p[t>>12&15]+p[t>>8&15]),i>2&&(u+=p[t>>20&15]+p[t>>16&15])),u},U.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,u=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(u);for(var a=new Uint32Array(t);s>8&255,a[t+2]=e>>16&255,a[t+3]=e>>24&255;u%r==0&&L(n)}return o&&(t=u<<2,e=n[s],a[t]=255&e,o>1&&(a[t+1]=e>>8&255),o>2&&(a[t+2]=e>>16&255)),a},N.prototype=new U,N.prototype.finalize=function(){return this.encode(this.outputBits,!0),U.prototype.finalize.call(this)};var L=function(t){var e,r,n,i,o,s,u,a,h,c,f,l,p,d,m,v,y,w,b,_,M,k,S,x,R,A,O,T,E,I,j,B,C,P,U,N,L,q,D,W,H,F,Y,z,J,Z,$,K,V,Q,X,G,tt,et,rt,nt,it,ot,st,ut,at,ht,ct;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],o=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],u=t[3]^t[13]^t[23]^t[33]^t[43],a=t[4]^t[14]^t[24]^t[34]^t[44],h=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],e=(l=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|u>>>31),r=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(u<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(a<<1|h>>>31),r=o^(h<<1|a>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(c<<1|f>>>31),r=u^(f<<1|c>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=a^(l<<1|p>>>31),r=h^(p<<1|l>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=c^(i<<1|o>>>31),r=f^(o<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,d=t[0],m=t[1],Z=t[11]<<4|t[10]>>>28,$=t[10]<<4|t[11]>>>28,T=t[20]<<3|t[21]>>>29,E=t[21]<<3|t[20]>>>29,ut=t[31]<<9|t[30]>>>23,at=t[30]<<9|t[31]>>>23,F=t[40]<<18|t[41]>>>14,Y=t[41]<<18|t[40]>>>14,P=t[2]<<1|t[3]>>>31,U=t[3]<<1|t[2]>>>31,v=t[13]<<12|t[12]>>>20,y=t[12]<<12|t[13]>>>20,K=t[22]<<10|t[23]>>>22,V=t[23]<<10|t[22]>>>22,I=t[33]<<13|t[32]>>>19,j=t[32]<<13|t[33]>>>19,ht=t[42]<<2|t[43]>>>30,ct=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,N=t[14]<<6|t[15]>>>26,L=t[15]<<6|t[14]>>>26,w=t[25]<<11|t[24]>>>21,b=t[24]<<11|t[25]>>>21,Q=t[34]<<15|t[35]>>>17,X=t[35]<<15|t[34]>>>17,B=t[45]<<29|t[44]>>>3,C=t[44]<<29|t[45]>>>3,x=t[6]<<28|t[7]>>>4,R=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,q=t[26]<<25|t[27]>>>7,D=t[27]<<25|t[26]>>>7,_=t[36]<<21|t[37]>>>11,M=t[37]<<21|t[36]>>>11,G=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,z=t[8]<<27|t[9]>>>5,J=t[9]<<27|t[8]>>>5,A=t[18]<<20|t[19]>>>12,O=t[19]<<20|t[18]>>>12,ot=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,W=t[38]<<8|t[39]>>>24,H=t[39]<<8|t[38]>>>24,k=t[48]<<14|t[49]>>>18,S=t[49]<<14|t[48]>>>18,t[0]=d^~v&w,t[1]=m^~y&b,t[10]=x^~A&T,t[11]=R^~O&E,t[20]=P^~N&q,t[21]=U^~L&D,t[30]=z^~Z&K,t[31]=J^~$&V,t[40]=et^~nt&ot,t[41]=rt^~it&st,t[2]=v^~w&_,t[3]=y^~b&M,t[12]=A^~T&I,t[13]=O^~E&j,t[22]=N^~q&W,t[23]=L^~D&H,t[32]=Z^~K&Q,t[33]=$^~V&X,t[42]=nt^~ot&ut,t[43]=it^~st&at,t[4]=w^~_&k,t[5]=b^~M&S,t[14]=T^~I&B,t[15]=E^~j&C,t[24]=q^~W&F,t[25]=D^~H&Y,t[34]=K^~Q&G,t[35]=V^~X&tt,t[44]=ot^~ut&ht,t[45]=st^~at&ct,t[6]=_^~k&d,t[7]=M^~S&m,t[16]=I^~B&x,t[17]=j^~C&R,t[26]=W^~F&P,t[27]=H^~Y&U,t[36]=Q^~G&z,t[37]=X^~tt&J,t[46]=ut^~ht&et,t[47]=at^~ct&rt,t[8]=k^~d&v,t[9]=S^~m&y,t[18]=B^~x&A,t[19]=C^~R&O,t[28]=F^~P&N,t[29]=Y^~U&L,t[38]=G^~z&Z,t[39]=tt^~J&$,t[48]=ht^~et&nt,t[49]=ct^~rt&it,t[0]^=g[n],t[1]^=g[n+1]};if(c)t.exports=O;else{for(E=0;E=0;u--)(i=t[u])&&(s=(o<3?i(s):o>3?i(e,r,s):i(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s}function a(t,e){return function(r,n){e(r,n,t)}}function h(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function c(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{a(n.next(t))}catch(t){o(t)}}function u(t){try{a(n.throw(t))}catch(t){o(t)}}function a(t){t.done?i(t.value):new r((function(e){e(t.value)})).then(s,u)}a((n=n.apply(t,e||[])).next())}))}function f(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function d(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function m(){for(var t=[],e=0;e1||u(t,e)}))})}function u(t,e){try{(r=i[t](e)).value instanceof g?Promise.resolve(r.value.v).then(a,h):c(o[0][2],r)}catch(t){c(o[0][3],t)}var r}function a(t){u("next",t)}function h(t){u("throw",t)}function c(t,e){t(e),o.shift(),o.length&&u(o[0][0],o[0][1])}}function y(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,i){e[n]=t[n]?function(e){return(r=!r)?{value:g(t[n](e)),done:"return"===n}:i?i(e):e}:i}}function w(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=p(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,i){!function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)}(n,i,(e=t[r](e)).done,e.value)}))}}}function b(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function _(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function M(t){return t&&t.__esModule?t:{default:t}}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){},function(t,e,r){e.byteLength=function(t){var e=h(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=h(t),s=n[0],u=n[1],a=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),c=0,f=u>0?s-4:s;for(r=0;r>16&255,a[c++]=e>>8&255,a[c++]=255&e;return 2===u&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,a[c++]=255&e),1===u&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,a[c++]=e>>8&255,a[c++]=255&e),a},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,u=r-i;su?u:s+16383));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,a=s.length;u0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,r){for(var i,o,s=[],u=e;u>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ e.read=function(t,e,r,n,i){var o,s,u=8*i-n-1,a=(1<>1,c=-7,f=r?i-1:0,l=r?-1:1,p=t[e+f];for(f+=l,o=p&(1<<-c)-1,p>>=-c,c+=u;c>0;o=256*o+t[e+f],f+=l,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+f],f+=l,c-=8);if(0===o)o=1-h;else{if(o===a)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=h}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,u,a,h=8*o-i-1,c=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+f>=1?l/a:l*Math.pow(2,1-f))*a>=2&&(s++,a/=2),s+f>=c?(u=0,s=c):s+f>=1?(u=(e*a-1)*Math.pow(2,i),s+=f):(u=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&u,p+=d,u/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,h-=8);t[r+p-d]|=128*m}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(e){var n=r(16).strict;t.exports=function(t){if(n(t)){var r=e.from(t.buffer);return t.byteLength!==t.buffer.byteLength&&(r=r.slice(t.byteOffset,t.byteOffset+t.byteLength)),r}return e.from(t)}}).call(this,r(15).Buffer)},function(t,e){(function(e){t.exports=e}).call(this,{})},function(t,e,r){(function(t){function r(){return(null==t?void 0:t.crypto)||(null==t?void 0:t.msCrypto)||{}}function n(){var t=r();return t.subtle||t.webkitSubtle}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowserCryptoAvailable=e.getSubtleCrypto=e.getBrowerCrypto=void 0,e.getBrowerCrypto=r,e.getSubtleCrypto=n,e.isBrowserCryptoAvailable=function(){return!!r()&&!!n()}}).call(this,r(12))},function(t,e,r){(function(t){function r(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function n(){return void 0!==t&&void 0!==t.versions&&void 0!==t.versions.node}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=e.isNode=e.isReactNative=void 0,e.isReactNative=r,e.isNode=n,e.isBrowser=function(){return!r()&&!n()}}).call(this,r(13))},function(t,e,r){t.exports=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}},function(t,e,r){var n=new RegExp("%[a-f0-9]{2}","gi"),i=new RegExp("(%[a-f0-9]{2})+","gi");function o(t,e){try{return decodeURIComponent(t.join(""))}catch(t){}if(1===t.length)return t;e=e||1;var r=t.slice(0,e),n=t.slice(e);return Array.prototype.concat.call([],o(r),o(n))}function s(t){try{return decodeURIComponent(t)}catch(i){for(var e=t.match(n),r=1;r-1?t.split("/")[2]:t.split("/")[0];return e=(e=e.split(":")[0]).split("?")[0]}(t).split(".").slice(-2).join(".")}(t)}(e=t.connectorOpts.bridge)?h[Math.floor(Math.random()*h.length)]:e),t.connectorOpts.uri&&(this.uri=t.connectorOpts.uri);var r=t.connectorOpts.session||this._getStorageSession();r&&(this.session=r),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=t.transport||new o.a({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),t.connectorOpts.uri&&this._subscribeToSessionRequest(),t.pushServerOpts&&this._registerPushServer(t.pushServerOpts)}var e=t.prototype;return e.on=function(t,e){var r={event:t,callback:e};this._eventManager.subscribe(r)},e.off=function(t){this._eventManager.unsubscribe(t)},e.createInstantRequest=function(){var t=a(regeneratorRuntime.mark((function t(e){var r,n,o,s=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._generateKey();case 2:return this._key=t.sent,r=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(e)}]}),this.handshakeId=r.id,this.handshakeTopic=Object(i.D)(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",(function(){throw new Error("User close QRCode Modal")})),n=function(){s.killSession()},t.prev=6,t.next=9,this._sendCallRequest(r);case 9:return o=t.sent,t.abrupt("return",(o&&n(),o));case 13:throw t.prev=13,t.t0=t.catch(6),n(),t.t0;case 16:case"end":return t.stop()}}),t,this,[[6,13]])})));return function(e){return t.apply(this,arguments)}}(),e.connect=function(){var t=a(regeneratorRuntime.mark((function t(e){var r=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._qrcodeModal){t.next=2;break}throw new Error("QRCode Modal not provided");case 2:if(!this.connected){t.next=6;break}t.t0={chainId:this.chainId,accounts:this.accounts},t.next=9;break;case 6:return t.next=8,this.createSession(e);case 8:t.t0=new Promise(function(){var t=a(regeneratorRuntime.mark((function t(e,n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.on("modal_closed",(function(){return n(new Error("User close QRCode Modal"))})),r.on("connect",(function(t,r){if(t)return n(t);e(r.params[0])}));case 1:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}());case 9:return t.abrupt("return",t.t0);case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.createSession=function(){var t=a(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._connected){t.next=2;break}throw new Error("Session currently connected");case 2:if(!this.pending){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,this._generateKey();case 6:this._key=t.sent,r=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:e&&e.chainId?e.chainId:null}]}),this.handshakeId=r.id,this.handshakeTopic=Object(i.D)(),this._sendSessionRequest(r,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]});case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.approveSession=function(t){if(this._connected)throw new Error("Session currently connected");this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";var e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},r={id:this.handshakeId,jsonrpc:"2.0",result:e};this._sendResponse(r),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})},e.rejectSession=function(t){if(this._connected)throw new Error("Session currently connected");var e=t&&t.message?t.message:"Session Rejected",r=this._formatResponse({id:this.handshakeId,error:{message:e}});this._sendResponse(r),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession()},e.updateSession=function(t){if(!this._connected)throw new Error("Session currently disconnected");this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";var e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},r=this._formatRequest({method:"wc_sessionUpdate",params:[e]});this._sendSessionRequest(r,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()},e.killSession=function(){var t=a(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e?e.message:"Session Disconnected",n=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]}),t.next=3,this._sendRequest(n);case 3:this._handleSessionDisconnect(r);case 4:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.sendTransaction=function(){var t=a(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error("Session currently disconnected");case 2:return r=Object(i.x)(e),n=this._formatRequest({method:"eth_sendTransaction",params:[r]}),t.next=5,this._sendCallRequest(n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.signTransaction=function(){var t=a(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error("Session currently disconnected");case 2:return r=Object(i.x)(e),n=this._formatRequest({method:"eth_signTransaction",params:[r]}),t.next=5,this._sendCallRequest(n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.signMessage=function(){var t=a(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error("Session currently disconnected");case 2:return r=this._formatRequest({method:"eth_sign",params:e}),t.next=5,this._sendCallRequest(r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.signPersonalMessage=function(){var t=a(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error("Session currently disconnected");case 2:return e=Object(i.w)(e),r=this._formatRequest({method:"personal_sign",params:e}),t.next=6,this._sendCallRequest(r);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.signTypedData=function(){var t=a(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error("Session currently disconnected");case 2:return r=this._formatRequest({method:"eth_signTypedData",params:e}),t.next=5,this._sendCallRequest(r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.updateChain=function(){var t=a(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error("Session currently disconnected");case 2:return r=this._formatRequest({method:"wallet_updateChain",params:[e]}),t.next=5,this._sendCallRequest(r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.unsafeSend=function(t,e){var r=this;return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),new Promise((function(e,n){r._subscribeToResponse(t.id,(function(t,r){if(t)n(t);else{if(!r)throw new Error("Missing JSON RPC response");e(r)}}))}))},e.sendCustomRequest=function(){var t=a(regeneratorRuntime.mark((function t(e,r){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._connected){t.next=2;break}throw new Error("Session currently disconnected");case 2:t.t0=e.method,t.next="eth_accounts"===t.t0?5:"eth_chainId"===t.t0?6:"eth_sendTransaction"===t.t0||"eth_signTransaction"===t.t0?7:"personal_sign"===t.t0?9:10;break;case 5:return t.abrupt("return",this.accounts);case 6:return t.abrupt("return",Object(i.f)(this.chainId));case 7:return e.params&&(e.params[0]=Object(i.x)(e.params[0])),t.abrupt("break",10);case 9:e.params&&(e.params=Object(i.w)(e.params));case 10:return n=this._formatRequest(e),t.next=13,this._sendCallRequest(n,r);case 13:return t.abrupt("return",t.sent);case 14:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),e.approveRequest=function(t){if(!Object(i.q)(t))throw new Error('JSON-RPC success response must include "result" field');var e=this._formatResponse(t);this._sendResponse(e)},e.rejectRequest=function(t){if(!Object(i.p)(t))throw new Error('JSON-RPC error response must include "error" field');var e=this._formatResponse(t);this._sendResponse(e)},e.transportClose=function(){this._transport.close()},e._sendRequest=function(){var t=a(regeneratorRuntime.mark((function t(e,r){var n,o,s,u,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this._formatRequest(e),t.next=3,this._encrypt(n);case 3:o=t.sent,s=void 0!==(null==r?void 0:r.topic)?r.topic:this.peerId,u=JSON.stringify(o),a=void 0!==(null==r?void 0:r.forcePushNotification)?!r.forcePushNotification:Object(i.t)(n),this._transport.send(u,s,a);case 8:case"end":return t.stop()}}),t,this)})));return function(e,r){return t.apply(this,arguments)}}(),e._sendResponse=function(){var t=a(regeneratorRuntime.mark((function t(e){var r,n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this._encrypt(e);case 2:r=t.sent,n=this.peerId,i=JSON.stringify(r),this._transport.send(i,n,!0);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e._sendSessionRequest=function(){var t=a(regeneratorRuntime.mark((function t(e,r,n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this._sendRequest(e,n),this._subscribeToSessionResponse(e.id,r);case 1:case"end":return t.stop()}}),t,this)})));return function(e,r,n){return t.apply(this,arguments)}}(),e._sendCallRequest=function(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),this._subscribeToCallResponse(t.id)},e._formatRequest=function(t){if(void 0===t.method)throw new Error('JSON RPC request must have valid "method" value');return{id:void 0===t.id?Object(i.z)():t.id,jsonrpc:"2.0",method:t.method,params:void 0===t.params?[]:t.params}},e._formatResponse=function(t){if(void 0===t.id)throw new Error('JSON RPC request must have valid "id" value');var e={id:t.id,jsonrpc:"2.0"};if(Object(i.p)(t)){var r=Object(i.h)(t.error);return Object.assign(Object.assign(Object.assign({},e),t),{error:r})}if(Object(i.q)(t))return Object.assign(Object.assign({},e),t);throw new Error("JSON RPC response format is invalid")},e._handleSessionDisconnect=function(t){var e=t||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),Object(i.A)(i.v)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession(),this.transportClose()},e._handleSessionResponse=function(t,e){e&&e.approved?(this._connected?(e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),e.peerId&&!this.peerId&&(this.peerId=e.peerId),e.peerMeta&&!this.peerMeta&&(this.peerMeta=e.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(t)},e._handleIncomingMessages=function(){var t=a(regeneratorRuntime.mark((function t(e){var r,n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if([this.clientId,this.handshakeTopic].includes(e.topic)){t.next=2;break}return t.abrupt("return");case 2:t.prev=2,r=JSON.parse(e.payload),t.next=9;break;case 6:return t.prev=6,t.t0=t.catch(2),t.abrupt("return");case 9:return t.next=11,this._decrypt(r);case 11:(n=t.sent)&&this._eventManager.trigger(n);case 13:case"end":return t.stop()}}),t,this,[[2,6]])})));return function(e){return t.apply(this,arguments)}}(),e._subscribeToSessionRequest=function(){this._transport.subscribe(this.handshakeTopic)},e._subscribeToResponse=function(t,e){this.on("response:"+t,e)},e._subscribeToSessionResponse=function(t,e){var r=this;this._subscribeToResponse(t,(function(t,n){t?r._handleSessionResponse(t.message):n.result?r._handleSessionResponse(e,n.result):n.error&&n.error.message?r._handleSessionResponse(n.error.message):r._handleSessionResponse(e)}))},e._subscribeToCallResponse=function(t){var e=this;return new Promise((function(r,n){e._subscribeToResponse(t,(function(t,e){t?n(t):e.result?r(e.result):e.error&&e.error.message?n(new Error(e.error.message)):n(new Error("JSON RPC response format is invalid"))}))}))},e._subscribeToInternalEvents=function(){var t=this;this.on("display_uri",(function(){t._qrcodeModal&&t._qrcodeModal.open(t.uri,(function(){t._eventManager.trigger({event:"modal_closed",params:[]})}),t._qrcodeModalOptions)})),this.on("connect",(function(){t._qrcodeModal&&t._qrcodeModal.close()})),this.on("call_request_sent",(function(e,r){var n=r.params[0].request;if(Object(i.r)()&&t._signingMethods.includes(n.method)){var o=Object(i.j)(i.v);o&&(window.location.href=o.href)}})),this.on("wc_sessionRequest",(function(e,r){e&&t._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:e.toString()}]}),t.handshakeId=r.id,t.peerId=r.params[0].peerId,t.peerMeta=r.params[0].peerMeta;var n=Object.assign(Object.assign({},r),{method:"session_request"});t._eventManager.trigger(n)})),this.on("wc_sessionUpdate",(function(e,r){e&&t._handleSessionResponse(e.message),t._handleSessionResponse("Session disconnected",r.params[0])}))},e._initTransport=function(){var t=this;this._transport.on("message",(function(e){return t._handleIncomingMessages(e)})),this._transport.on("open",(function(){return t._eventManager.trigger({event:"transport_open",params:[]})})),this._transport.on("close",(function(){return t._eventManager.trigger({event:"transport_close",params:[]})})),this._transport.on("error",(function(){return t._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]})})),this._transport.open()},e._formatUri=function(){return this.protocol+":"+this.handshakeTopic+"@"+this.version+"?bridge="+encodeURIComponent(this.bridge)+"&key="+this.key},e._parseUri=function(t){var e=Object(i.y)(t);if(e.protocol===this.protocol){if(!e.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");var r=e.handshakeTopic;if(!e.bridge)throw Error("Invalid or missing bridge url parameter value");var n=decodeURIComponent(e.bridge);if(!e.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:r,bridge:n,key:e.key}}throw new Error("URI format is invalid")},e._generateKey=function(){var t=a(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this._cryptoLib){t.next=4;break}return t.next=3,this._cryptoLib.generateKey();case 3:return t.abrupt("return",t.sent);case 4:return t.abrupt("return",null);case 5:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}(),e._encrypt=function(){var t=a(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this._key,!this._cryptoLib||!r){t.next=5;break}return t.next=4,this._cryptoLib.encrypt(e,r);case 4:return t.abrupt("return",t.sent);case 5:return t.abrupt("return",null);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e._decrypt=function(){var t=a(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=this._key,!this._cryptoLib||!r){t.next=5;break}return t.next=4,this._cryptoLib.decrypt(e,r);case 4:return t.abrupt("return",t.sent);case 5:return t.abrupt("return",null);case 6:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e._getStorageSession=function(){var t=null;return this._sessionStorage&&(t=this._sessionStorage.getSession()),t},e._setStorageSession=function(){this._sessionStorage&&this._sessionStorage.setSession(this.session)},e._removeStorageSession=function(){this._sessionStorage&&this._sessionStorage.removeSession()},e._manageStorageSession=function(){this._connected?this._setStorageSession():this._removeStorageSession()},e._registerPushServer=function(t){if(!t.url||"string"!=typeof t.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!t.type||"string"!=typeof t.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!t.token||"string"!=typeof t.token)throw Error("Invalid or missing pushServerOpts.token parameter value");var e={bridge:this.bridge,topic:this.clientId,type:t.type,token:t.token,peerName:"",language:t.language||""};this.on("connect",function(){var r=a(regeneratorRuntime.mark((function r(n,i){var o,s;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!n){r.next=2;break}throw n;case 2:return t.peerMeta&&(o=i.params[0].peerMeta.name,e.peerName=o),r.prev=3,r.next=6,fetch(t.url+"/new",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)});case 6:return s=r.sent,r.next=9,s.json();case 9:if(r.sent.success){r.next=11;break}throw Error("Failed to register in Push Server");case 11:r.next=16;break;case 13:throw r.prev=13,r.t0=r.catch(3),Error("Failed to register in Push Server");case 16:case"end":return r.stop()}}),r,null,[[3,13]])})));return function(t,e){return r.apply(this,arguments)}}())},n(t,[{key:"bridge",get:function(){return this._bridge},set:function(t){t&&(this._bridge=t)}},{key:"key",get:function(){return this._key?Object(i.c)(this._key,!0):""},set:function(t){if(t){var e=Object(i.e)(t);this._key=e}}},{key:"clientId",get:function(){var t=this._clientId;return t||(t=this._clientId=Object(i.D)()),this._clientId},set:function(t){t&&(this._clientId=t)}},{key:"peerId",get:function(){return this._peerId},set:function(t){t&&(this._peerId=t)}},{key:"clientMeta",get:function(){var t=this._clientMeta;return t||(t=this._clientMeta=Object(i.i)()),t},set:function(t){}},{key:"peerMeta",get:function(){return this._peerMeta},set:function(t){this._peerMeta=t}},{key:"handshakeTopic",get:function(){return this._handshakeTopic},set:function(t){t&&(this._handshakeTopic=t)}},{key:"handshakeId",get:function(){return this._handshakeId},set:function(t){t&&(this._handshakeId=t)}},{key:"uri",get:function(){return this._formatUri()},set:function(t){if(t){var e=this._parseUri(t),r=e.handshakeTopic,n=e.bridge,i=e.key;this.handshakeTopic=r,this.bridge=n,this.key=i}}},{key:"chainId",get:function(){return this._chainId},set:function(t){this._chainId=t}},{key:"networkId",get:function(){return this._networkId},set:function(t){this._networkId=t}},{key:"accounts",get:function(){return this._accounts},set:function(t){this._accounts=t}},{key:"rpcUrl",get:function(){return this._rpcUrl},set:function(t){this._rpcUrl=t}},{key:"connected",get:function(){return this._connected},set:function(t){}},{key:"pending",get:function(){return!!this._handshakeTopic},set:function(t){}},{key:"session",get:function(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}},set:function(t){t&&(this._connected=t.connected,this.accounts=t.accounts,this.chainId=t.chainId,this.bridge=t.bridge,this.key=t.key,this.clientId=t.clientId,this.clientMeta=t.clientMeta,this.peerId=t.peerId,this.peerMeta=t.peerMeta,this.handshakeId=t.handshakeId,this.handshakeTopic=t.handshakeTopic)}}]),t}()}])},"object"==typeof e&&"object"==typeof i?i.exports=c():"function"==typeof define&&define.amd?define("WalletConnect",[],c):"object"==typeof e?e.WalletConnect=c():h.WalletConnect=c()}(),t("default",i.exports)}));t("__cjsMetaURL",e.meta.url)}}})); } }; });