diff --git a/asset-manifest.json b/asset-manifest.json index aa286ac1..1191b372 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { "main.css": "/static/css/main.7ba07c5a.css", - "main.js": "/static/js/main.9babbe61.js", + "main.js": "/static/js/main.a2329c90.js", "static/js/593.88a7adbd.chunk.js": "/static/js/593.88a7adbd.chunk.js", "static/js/992.96d00824.chunk.js": "/static/js/992.96d00824.chunk.js", "static/js/774.a1437ede.chunk.js": "/static/js/774.a1437ede.chunk.js", @@ -39,7 +39,7 @@ "static/media/chain-link-logo.svg": "/static/media/chain-link-logo.fed269c702d271ea2fa608bcf6c8e154.svg", "static/media/getFetch.cjs": "/static/media/getFetch.c780682470504fffbd04.cjs", "main.7ba07c5a.css.map": "/static/css/main.7ba07c5a.css.map", - "main.9babbe61.js.map": "/static/js/main.9babbe61.js.map", + "main.a2329c90.js.map": "/static/js/main.a2329c90.js.map", "992.96d00824.chunk.js.map": "/static/js/992.96d00824.chunk.js.map", "774.a1437ede.chunk.js.map": "/static/js/774.a1437ede.chunk.js.map", "854.9c82a7a6.chunk.js.map": "/static/js/854.9c82a7a6.chunk.js.map", @@ -47,6 +47,6 @@ }, "entrypoints": [ "static/css/main.7ba07c5a.css", - "static/js/main.9babbe61.js" + "static/js/main.a2329c90.js" ] } \ No newline at end of file diff --git a/favicon-old.png b/favicon-old.png new file mode 100644 index 00000000..dce9517a Binary files /dev/null and b/favicon-old.png differ diff --git a/favicon.png b/favicon.png index dce9517a..8f97721b 100644 Binary files a/favicon.png and b/favicon.png differ diff --git a/index.html b/index.html index 883d054c..58388f6e 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -AdEx Staking: stake your ADX
\ No newline at end of file +AdEx Staking: stake your ADX
\ No newline at end of file diff --git a/static/js/main.9babbe61.js b/static/js/main.a2329c90.js similarity index 99% rename from static/js/main.9babbe61.js rename to static/js/main.a2329c90.js index 94899edb..201ccfa2 100644 --- a/static/js/main.9babbe61.js +++ b/static/js/main.a2329c90.js @@ -1,3 +1,3 @@ -/*! For license information please see main.9babbe61.js.LICENSE.txt */ -!function(){var e={20364:function(e){function a(e){var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}a.keys=function(){return[]},a.resolve=a,a.id=20364,e.exports=a},31807:function(e){function a(e){var a=new Error("Cannot find module '"+e+"'");throw a.code="MODULE_NOT_FOUND",a}a.keys=function(){return[]},a.resolve=a,a.id=31807,e.exports=a},68826:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(6032),c=t(88715),n=t(763),d=t(79384),o=/^0x[0-9A-F]*$/i;a.assert={isBigNumber:function(e,t){var r=c.BigNumber.isBigNumber(t);a.assert.assert(r,a.assert.typeAssertionMessage(e,"BigNumber",t))},isValidBaseUnitAmount:function(e,t){a.assert.isBigNumber(e,t);var r=t.isLessThan(0);a.assert.assert(!r,e+" cannot be a negative number, found value: "+t.toNumber());var c=0!==t.decimalPlaces();a.assert.assert(!c,e+" should be in baseUnits (no decimals), found value: "+t.toNumber())},isString:function(e,t){a.assert.assert(n.isString(t),a.assert.typeAssertionMessage(e,"string",t))},isFunction:function(e,t){a.assert.assert(n.isFunction(t),a.assert.typeAssertionMessage(e,"function",t))},isHexString:function(e,t){a.assert.assert(n.isString(t)&&o.test(t),a.assert.typeAssertionMessage(e,"HexString",t))},isETHAddressHex:function(e,t){a.assert.assert(n.isString(t),a.assert.typeAssertionMessage(e,"string",t)),a.assert.assert(c.addressUtils.isAddress(t),a.assert.typeAssertionMessage(e,"ETHAddressHex",t))},doesBelongToStringEnum:function(e,t,r){var c=n.values(r),d=n.includes(c,t),o=n.map(c,(function(e){return"'"+e+"'"})).join(", ");a.assert.assert(d,"Expected "+e+" to be one of: "+o+", encountered: "+t)},hasAtMostOneUniqueValue:function(e,t){a.assert.assert(n.uniq(e).length<=1,t)},isNumber:function(e,t){a.assert.assert(n.isFinite(t),a.assert.typeAssertionMessage(e,"number",t))},isNumberOrBigNumber:function(e,t){n.isFinite(t)||a.assert.assert(c.BigNumber.isBigNumber(t),a.assert.typeAssertionMessage(e,"number or BigNumber",t))},isBoolean:function(e,t){a.assert.assert(n.isBoolean(t),a.assert.typeAssertionMessage(e,"boolean",t))},isWeb3Provider:function(e,t){c.logUtils.warn("DEPRECATED: Please use providerUtils.standardizeOrThrow() instead");var r=n.isFunction(t.send)||n.isFunction(t.sendAsync);a.assert.assert(r,a.assert.typeAssertionMessage(e,"Provider",t))},doesConformToSchema:function(e,t,c,d){if(void 0===t)throw new Error(e+" can't be undefined");var o=new r.SchemaValidator;void 0!==d&&n.map(d,o.addSchema.bind(o));var f=o.validate(t,c),i=f.errors.length>0,s="Expected "+e+" to conform to schema "+c.id+"\nEncountered: "+JSON.stringify(t,null,"\t")+"\nValidation errors: "+f.errors.join(", ");a.assert.assert(!i,s)},isWebUri:function(e,t){var r=void 0!==d.isWebUri(t);a.assert.assert(r,a.assert.typeAssertionMessage(e,"web uri",t))},isUri:function(e,t){var r=void 0!==d.isUri(t);a.assert.assert(r,a.assert.typeAssertionMessage(e,"uri",t))},isBlockParam:function(e,t){if(!(Number.isInteger(t)&&t>=0)&&"earliest"!==t&&"latest"!==t&&"pending"!==t)throw new Error(a.assert.typeAssertionMessage(e,"BlockParam",t))},isArray:function(e,t){if(!Array.isArray(t))throw new Error(a.assert.typeAssertionMessage(e,"Array",t))},assert:function(e,a){if(!e)throw new Error(a)},typeAssertionMessage:function(e,a,t){return"Expected "+e+" to be of type "+a+", encountered: "+t}}},6032:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(34984);a.ValidatorResult=r.ValidatorResult;var c=t(70242);a.SchemaValidator=c.SchemaValidator;var n=t(43948);a.schemas=n.schemas},70242:function(e,a,t){"use strict";var r=this&&this.__values||function(e){var a="function"===typeof Symbol&&e[Symbol.iterator],t=0;return a?a.call(e):{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}};Object.defineProperty(a,"__esModule",{value:!0});var c=t(34984),n=t(28699),d=t(43948),o=function(){function e(){var a,t;this._validator=new c.Validator;try{for(var o=r(n(d.schemas)),f=o.next();!f.done;f=o.next()){var i=f.value;e._assertSchemaDefined(i),this._validator.addSchema(i,i.id)}}catch(s){a={error:s}}finally{try{f&&!f.done&&(t=o.return)&&t.call(o)}finally{if(a)throw a.error}}}return e._assertSchemaDefined=function(e){if(void 0===e)throw new Error("Cannot add undefined schema")},e.prototype.addSchema=function(a){e._assertSchemaDefined(a),this._validator.addSchema(a,a.id)},e.prototype.validate=function(a,t){e._assertSchemaDefined(t);var r=JSON.parse(JSON.stringify(a));return this._validator.validate(r,t)},e.prototype.isValid=function(e,a){return 0===this.validate(e,a).errors.length},e}();a.SchemaValidator=o},43948:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(40608),c=t(88430),n=t(83871),d=t(51477),o=t(42279),f=t(5843),i=t(23914),s=t(91950),b=t(99257),l=t(56355),u=t(78241),h=t(76828),x=t(15444),p=t(32777),m=t(35806),v=t(64494),g=t(81768),y=t(19396),k=t(67231),w=t(98325),I=t(19222),_=t(64921),E=t(87202),N=t(66829),H=t(44770),S=t(84198),A=t(59710),M=t(41613),T=t(54706),P=t(82257),O=t(6413),C=t(86512),R=t(43037),D=t(1006),j=t(37613),L=t(58532),B=t(25973),F=t(29876),Z=t(57625),U=t(300),z=t(43235),q=t(16796),V=t(12181),W=t(76819);a.schemas={numberSchema:h,addressSchema:r,callDataSchema:o,hexSchema:b,ecSignatureParameterSchema:f,ecSignatureSchema:i,eip712TypedDataSchema:s,indexFilterValuesSchema:l,orderCancellationRequestsSchema:x,orderFillOrKillRequestsSchema:m,orderFillRequestsSchema:v,orderHashSchema:g,orderSchema:y,signedOrderSchema:Z,signedOrdersSchema:U,ordersSchema:I,blockParamSchema:n,blockRangeSchema:d,tokenSchema:z,jsNumber:u,requestOptsSchema:F,pagedRequestOptsSchema:_,ordersRequestOptsSchema:w,orderBookRequestSchema:k,orderConfigRequestSchema:p,assetPairsRequestOptsSchema:c,txDataSchema:q,paginatedCollectionSchema:E,relayerApiErrorResponseSchema:A,relayerApiFeeRecipientsResponseSchema:M,relayerApiOrderSchema:O,relayerApiOrdersSchema:B,relayerApiOrderConfigPayloadSchema:T,relayerApiOrderConfigResponseSchema:P,relayerApiOrderbookResponseSchema:C,relayerApiAssetDataPairsResponseSchema:N,relayerApiAssetDataTradeInfoSchema:S,relayerApiOrdersChannelSubscribeSchema:D,relayerApiOrdersChannelSubscribePayloadSchema:R,relayerApiOrdersChannelUpdateSchema:j,relayerApiOrdersResponseSchema:L,relayerApiAssetDataPairsSchema:H,zeroExTransactionSchema:W,wholeNumberSchema:V}},88812:function(e,a,t){"use strict";var r=this&&this.__awaiter||function(e,a,t,r){return new(t||(t=Promise))((function(c,n){function d(e){try{f(r.next(e))}catch(a){n(a)}}function o(e){try{f(r.throw(e))}catch(a){n(a)}}function f(e){e.done?c(e.value):new t((function(a){a(e.value)})).then(d,o)}f((r=r.apply(e,a||[])).next())}))},c=this&&this.__generator||function(e,a){var t,r,c,n,d={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;d;)try{if(t=1,r&&(c=2&n[0]?r.return:n[0]?r.throw||((c=r.return)&&c.call(r),0):r.next)&&!(c=c.call(r,n[1])).done)return c;switch(r=0,c&&(n=[2&n[0],c.value]),n[0]){case 0:case 1:c=n;break;case 4:return d.label++,{value:n[1],done:!1};case 5:d.label++,r=n[1],n=[0];continue;case 7:n=d.ops.pop(),d.trys.pop();continue;default:if(!(c=(c=d.trys).length>0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d};Object.defineProperty(a,"__esModule",{value:!0});var f=t(68826),i=t(88715),s=t(42808),b=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return r(a,e),a._validateTxParams=function(e){void 0!==e.to&&f.assert.isETHAddressHex("to",e.to),f.assert.isHexString("nonce",e.nonce)},a._validateSender=function(e){if(void 0===e||!i.addressUtils.isAddress(e))throw new Error(s.WalletSubproviderErrors.SenderInvalidOrNotSupplied)},a.prototype.handleRequest=function(e,t,r){return n(this,void 0,void 0,(function(){var c,n,f,i,s,b,l,u,h,x,p,m,v,g,y,k,w;return d(this,(function(d){switch(d.label){case 0:switch(e.method){case"eth_coinbase":return[3,1];case"eth_accounts":return[3,5];case"eth_sendTransaction":return[3,9];case"eth_signTransaction":return[3,16];case"eth_sign":case"personal_sign":return[3,22];case"eth_signTypedData":return[3,27]}return[3,32];case 1:return d.trys.push([1,3,,4]),[4,this.getAccountsAsync()];case 2:return n=d.sent(),r(null,n[0]),[3,4];case 3:return b=d.sent(),r(b),[3,4];case 4:return[2];case 5:return d.trys.push([5,7,,8]),[4,this.getAccountsAsync()];case 6:return n=d.sent(),r(null,n),[3,8];case 7:return l=d.sent(),r(l),[3,8];case 8:return[2];case 9:f=e.params[0],d.label=10;case 10:return d.trys.push([10,14,,15]),a._validateSender(f.from),[4,this._populateMissingTxParamsAsync(f)];case 11:return x=d.sent(),[4,this.signTransactionAsync(x)];case 12:return p=d.sent(),[4,this._emitSendTransactionAsync(p)];case 13:return u=d.sent(),r(null,u.result),[3,15];case 14:return h=d.sent(),r(h),[3,15];case 15:return[2];case 16:f=e.params[0],d.label=17;case 17:return d.trys.push([17,20,,21]),[4,this._populateMissingTxParamsAsync(f)];case 18:return x=d.sent(),[4,this.signTransactionAsync(x)];case 19:return p=d.sent(),r(null,{raw:p,tx:f}),[3,21];case 20:return m=d.sent(),r(m),[3,21];case 21:return[2];case 22:v="eth_sign"===e.method?e.params[1]:e.params[0],i="eth_sign"===e.method?e.params[0]:e.params[1],d.label=23;case 23:return d.trys.push([23,25,,26]),[4,this.signPersonalMessageAsync(v,i)];case 24:return g=d.sent(),r(null,g),[3,26];case 25:return y=d.sent(),r(y),[3,26];case 26:return[2];case 27:c=o(e.params,2),i=c[0],s=c[1],d.label=28;case 28:return d.trys.push([28,30,,31]),[4,this.signTypedDataAsync(i,s)];case 29:return k=d.sent(),r(null,k),[3,31];case 30:return w=d.sent(),r(w),[3,31];case 31:return[2];case 32:return t(),[2]}}))}))},a.prototype._emitSendTransactionAsync=function(e){return n(this,void 0,void 0,(function(){var a;return d(this,(function(t){switch(t.label){case 0:return a={method:"eth_sendRawTransaction",params:[e]},[4,this.emitPayloadAsync(a)];case 1:return[2,t.sent()]}}))}))},a.prototype._populateMissingTxParamsAsync=function(e){return n(this,void 0,void 0,(function(){var a,t,r,n,o,f,i;return d(this,(function(d){switch(d.label){case 0:return a=e,void 0!==e.gasPrice?[3,2]:[4,this.emitPayloadAsync({method:"eth_gasPrice",params:[]})];case 1:t=d.sent(),r=t.result.toString(),a=c({},a,{gasPrice:r}),d.label=2;case 2:return void 0!==e.nonce?[3,4]:[4,this.emitPayloadAsync({method:"eth_getTransactionCount",params:[e.from,"pending"]})];case 3:n=d.sent(),o=n.result,a=c({},a,{nonce:o}),d.label=4;case 4:return void 0!==e.gas?[3,6]:[4,this.emitPayloadAsync({method:"eth_estimateGas",params:[e]})];case 5:f=d.sent(),i=f.result.toString(),a=c({},a,{gas:i}),d.label=6;case 6:return[2,a]}}))}))},a}(t(42409).Subprovider);a.BaseWalletSubprovider=b},29929:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),c=this&&this.__awaiter||function(e,a,t,r){return new(t||(t=Promise))((function(c,n){function d(e){try{f(r.next(e))}catch(a){n(a)}}function o(e){try{f(r.throw(e))}catch(a){n(a)}}function f(e){e.done?c(e.value):new t((function(a){a(e.value)})).then(d,o)}f((r=r.apply(e,a||[])).next())}))},n=this&&this.__generator||function(e,a){var t,r,c,n,d={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;d;)try{if(t=1,r&&(c=2&n[0]?r.return:n[0]?r.throw||((c=r.return)&&c.call(r),0):r.next)&&!(c=c.call(r,n[1])).done)return c;switch(r=0,c&&(n=[2&n[0],c.value]),n[0]){case 0:case 1:c=n;break;case 4:return d.label++,{value:n[1],done:!1};case 5:d.label++,r=n[1],n=[0];continue;case 7:n=d.ops.pop(),d.trys.pop();continue;default:if(!(c=(c=d.trys).length>0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d};Object.defineProperty(a,"__esModule",{value:!0});var f=t(88715),i=t(25289),s=function(e){function a(a){var t=e.call(this)||this,r=f.providerUtils.standardizeOrThrow(a);return t._web3Wrapper=new i.Web3Wrapper(r),t._provider=r,t}return r(a,e),a.prototype.handleRequest=function(e,a,t){return n(this,void 0,void 0,(function(){var r,c,n,f,s,b,l,u,h,x,p,m,v,g,y,k,w;return d(this,(function(d){switch(d.label){case 0:switch(e.method){case"web3_clientVersion":return[3,1];case"eth_accounts":return[3,5];case"eth_sendTransaction":return[3,9];case"eth_sign":return[3,14];case"eth_signTypedData":case"eth_signTypedData_v3":return[3,19]}return[3,24];case 1:return d.trys.push([1,3,,4]),[4,this._web3Wrapper.getNodeVersionAsync()];case 2:return s=d.sent(),t(null,s),[3,4];case 3:return b=d.sent(),t(b),[3,4];case 4:return[2];case 5:return d.trys.push([5,7,,8]),[4,this._web3Wrapper.getAvailableAddressesAsync()];case 6:return l=d.sent(),t(null,l),[3,8];case 7:return u=d.sent(),t(u),[3,8];case 8:return[2];case 9:h=o(e.params,1),x=h[0],d.label=10;case 10:return d.trys.push([10,12,,13]),p=i.marshaller.unmarshalTxData(x),[4,this._web3Wrapper.sendTransactionAsync(p)];case 11:return m=d.sent(),t(null,m),[3,13];case 12:return v=d.sent(),t(v),[3,13];case 13:return[2];case 14:r=o(e.params,2),f=r[0],n=r[1],d.label=15;case 15:return d.trys.push([15,17,,18]),[4,this._web3Wrapper.sendRawPayloadAsync({method:"personal_sign",params:[n,f]})];case 16:return(k=d.sent())?t(null,k):t(new Error("Error performing eth_sign"),null),[3,18];case 17:return g=d.sent(),t(g),[3,18];case 18:return[2];case 19:c=o(e.params,2),f=c[0],n=c[1],d.label=20;case 20:return d.trys.push([20,22,,23]),y=JSON.stringify(n),[4,this._web3Wrapper.sendRawPayloadAsync({method:"eth_signTypedData_v3",params:[f,y]})];case 21:return(k=d.sent())?t(null,k):t(new Error("Error performing eth_signTypedData"),null),[3,23];case 22:return w=d.sent(),t(w),[3,23];case 23:return[2];case 24:return a(),[2]}}))}))},a.prototype.sendAsync=function(e,a){var t=this;this.handleRequest(e,(function(){t._provider.sendAsync.bind(t._provider)(e,a)}),(function(t,r){t?a(t):a(null,c({},e,{result:r}))}))},a}(t(42409).Subprovider);a.MetamaskSubprovider=s},7844:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),c=this&&this.__awaiter||function(e,a,t,r){return new(t||(t=Promise))((function(c,n){function d(e){try{f(r.next(e))}catch(a){n(a)}}function o(e){try{f(r.throw(e))}catch(a){n(a)}}function f(e){e.done?c(e.value):new t((function(a){a(e.value)})).then(d,o)}f((r=r.apply(e,a||[])).next())}))},n=this&&this.__generator||function(e,a){var t,r,c,n,d={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;d;)try{if(t=1,r&&(c=2&n[0]?r.return:n[0]?r.throw||((c=r.return)&&c.call(r),0):r.next)&&!(c=c.call(r,n[1])).done)return c;switch(r=0,c&&(n=[2&n[0],c.value]),n[0]){case 0:case 1:c=n;break;case 4:return d.label++,{value:n[1],done:!1};case 5:d.label++,r=n[1],n=[0];continue;case 7:n=d.ops.pop(),d.trys.pop();continue;default:if(!(c=(c=d.trys).length>0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}};Object.defineProperty(a,"__esModule",{value:!0});var o=t(88715),f=function(e){function a(a){var t=e.call(this)||this;return t._subproviders=a,t}return r(a,e),a._firstSuccessAsync=function(e,a,t){return c(this,void 0,void 0,(function(){var r,c,f,i,s,b,l,u;return n(this,(function(n){switch(n.label){case 0:n.trys.push([0,7,8,9]),i=d(e),s=i.next(),n.label=1;case 1:if(s.done)return[3,6];b=s.value,n.label=2;case 2:return n.trys.push([2,4,,5]),[4,o.promisify(b.handleRequest.bind(b))(a,t)];case 3:return[2,n.sent()];case 4:return l=n.sent(),f=l,[3,5];case 5:return s=i.next(),[3,1];case 6:return[3,9];case 7:return u=n.sent(),r={error:u},[3,9];case 8:try{s&&!s.done&&(c=i.return)&&c.call(i)}finally{if(r)throw r.error}return[7];case 9:if(void 0!==f)throw f;return[2]}}))}))},a.prototype.handleRequest=function(e,t,r){return c(this,void 0,void 0,(function(){var c,d,o;return n(this,(function(n){switch(n.label){case 0:c=this._subproviders.slice(),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a._firstSuccessAsync(c,e,t)];case 2:return d=n.sent(),r(null,d),[3,4];case 3:return o=n.sent(),r(o),[3,4];case 4:return[2]}}))}))},a}(t(42409).Subprovider);a.RedundantSubprovider=f},54252:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),c=this&&this.__awaiter||function(e,a,t,r){return new(t||(t=Promise))((function(c,n){function d(e){try{f(r.next(e))}catch(a){n(a)}}function o(e){try{f(r.throw(e))}catch(a){n(a)}}function f(e){e.done?c(e.value):new t((function(a){a(e.value)})).then(d,o)}f((r=r.apply(e,a||[])).next())}))},n=this&&this.__generator||function(e,a){var t,r,c,n,d={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;d;)try{if(t=1,r&&(c=2&n[0]?r.return:n[0]?r.throw||((c=r.return)&&c.call(r),0):r.next)&&!(c=c.call(r,n[1])).done)return c;switch(r=0,c&&(n=[2&n[0],c.value]),n[0]){case 0:case 1:c=n;break;case 4:return d.label++,{value:n[1],done:!1};case 5:d.label++,r=n[1],n=[0];continue;case 7:n=d.ops.pop(),d.trys.pop();continue;default:if(!(c=(c=d.trys).length>0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d};Object.defineProperty(a,"__esModule",{value:!0});var o=t(25289),f=function(e){function a(a){var t=e.call(this)||this;return t._web3Wrapper=new o.Web3Wrapper(a),t}return r(a,e),a.prototype.handleRequest=function(e,a,t){return c(this,void 0,void 0,(function(){var r,c,f,i,s,b,l,u,h,x,p,m,v,g,y,k;return n(this,(function(n){switch(n.label){case 0:switch(e.method){case"web3_clientVersion":return[3,1];case"eth_accounts":return[3,5];case"eth_sendTransaction":return[3,9];case"eth_sign":return[3,14];case"eth_signTypedData":return[3,19]}return[3,24];case 1:return n.trys.push([1,3,,4]),[4,this._web3Wrapper.getNodeVersionAsync()];case 2:return s=n.sent(),t(null,s),[3,4];case 3:return b=n.sent(),t(b),[3,4];case 4:return[2];case 5:return n.trys.push([5,7,,8]),[4,this._web3Wrapper.getAvailableAddressesAsync()];case 6:return l=n.sent(),t(null,l),[3,8];case 7:return u=n.sent(),t(u),[3,8];case 8:return[2];case 9:h=d(e.params,1),x=h[0],n.label=10;case 10:return n.trys.push([10,12,,13]),p=o.marshaller.unmarshalTxData(x),[4,this._web3Wrapper.sendTransactionAsync(p)];case 11:return m=n.sent(),t(null,m),[3,13];case 12:return v=n.sent(),t(v),[3,13];case 13:return[2];case 14:r=d(e.params,2),i=r[0],f=r[1],n.label=15;case 15:return n.trys.push([15,17,,18]),[4,this._web3Wrapper.signMessageAsync(i,f)];case 16:return y=n.sent(),t(null,y),[3,18];case 17:return g=n.sent(),t(g),[3,18];case 18:return[2];case 19:c=d(e.params,2),i=c[0],f=c[1],n.label=20;case 20:return n.trys.push([20,22,,23]),[4,this._web3Wrapper.signTypedDataAsync(i,f)];case 21:return y=n.sent(),t(null,y),[3,23];case 22:return k=n.sent(),t(k),[3,23];case 23:return[2];case 24:return a(),[2]}}))}))},a}(t(42409).Subprovider);a.SignerSubprovider=f},42409:function(e,a,t){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var a,t=1,r=arguments.length;t0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d},r=this&&this.__spread||function(){for(var e=[],a=0;a=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}};Object.defineProperty(a,"__esModule",{value:!0});var c=t(54402),n=function(){function e(e,a){void 0===a&&(a=1e3),this._searchLimit=a,this._parentDerivedKeyInfo=e,this._index=0}return e.prototype.next=function(){var e=this._parentDerivedKeyInfo.baseDerivationPath,t=this._index,r="m/"+e+"/"+t,c="m/"+t,n=this._parentDerivedKeyInfo.hdKey.derive(c),d={address:a.walletUtils.addressOfHDKey(n),hdKey:n,baseDerivationPath:e,derivationPath:r},o=this._index===this._searchLimit;return this._index++,{done:o,value:d}},e.prototype[Symbol.iterator]=function(){return this},e}();a.walletUtils={calculateDerivedHDKeyInfos:function(e,a){var t,c,d=[],o=new n(e,a);try{for(var f=r(o),i=f.next();!i.done;i=f.next()){var s=i.value;d.push(s)}}catch(b){t={error:b}}finally{try{i&&!i.done&&(c=f.return)&&c.call(f)}finally{if(t)throw t.error}}return d},findDerivedKeyInfoForAddressIfExists:function(e,a,t){var c,d,o,f=e.toLowerCase(),i=new n(a,t);try{for(var s=r(i),b=s.next();!b.done;b=s.next()){var l=b.value;if(l.address===f){o=l;break}}}catch(u){c={error:u}}finally{try{b&&!b.done&&(d=s.return)&&d.call(s)}finally{if(c)throw c.error}}return o},addressOfHDKey:function(e){var a=e.publicKey,t=c.publicToAddress(a,!0).toString("hex");return c.addHexPrefix(t).toLowerCase()}}},54402:function(e,a,t){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=t(7285),n=c.keccak224,d=c.keccak384,o=c.keccak256,f=c.keccak512,i=t(5134),s=t(88093),b=t(76445),l=t(80518),u=t(83569),h=t(82543).Buffer;Object.assign(a,t(28810)),a.MAX_INTEGER=new l("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),a.TWO_POW256=new l("10000000000000000000000000000000000000000000000000000000000000000",16),a.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",a.SHA3_NULL_S=a.KECCAK256_NULL_S,a.KECCAK256_NULL=h.from(a.KECCAK256_NULL_S,"hex"),a.SHA3_NULL=a.KECCAK256_NULL,a.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",a.SHA3_RLP_ARRAY_S=a.KECCAK256_RLP_ARRAY_S,a.KECCAK256_RLP_ARRAY=h.from(a.KECCAK256_RLP_ARRAY_S,"hex"),a.SHA3_RLP_ARRAY=a.KECCAK256_RLP_ARRAY,a.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",a.SHA3_RLP_S=a.KECCAK256_RLP_S,a.KECCAK256_RLP=h.from(a.KECCAK256_RLP_S,"hex"),a.SHA3_RLP=a.KECCAK256_RLP,a.BN=l,a.rlp=b,a.secp256k1=i,a.zeros=function(e){return h.allocUnsafe(e).fill(0)},a.zeroAddress=function(){var e=a.zeros(20);return a.bufferToHex(e)},a.setLengthLeft=a.setLength=function(e,t,r){var c=a.zeros(t);return e=a.toBuffer(e),r?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},a.toBuffer=function(e){if(!h.isBuffer(e))if(Array.isArray(e))e=h.from(e);else if("string"===typeof e)e=a.isHexString(e)?h.from(a.padToEven(a.stripHexPrefix(e)),"hex"):h.from(e);else if("number"===typeof e)e=a.intToBuffer(e);else if(null===e||void 0===e)e=h.allocUnsafe(0);else if(l.isBN(e))e=e.toArrayLike(h);else{if(!e.toArray)throw new Error("invalid type");e=h.from(e.toArray())}return e},a.bufferToInt=function(e){return new l(a.toBuffer(e)).toNumber()},a.bufferToHex=function(e){return"0x"+(e=a.toBuffer(e)).toString("hex")},a.fromSigned=function(e){return new l(e).fromTwos(256)},a.toUnsigned=function(e){return h.from(e.toTwos(256).toArray())},a.keccak=function(e,t){switch(e=a.toBuffer(e),t||(t=256),t){case 224:return n(e);case 256:return o(e);case 384:return d(e);case 512:return f(e);default:throw new Error("Invald algorithm: keccak"+t)}},a.keccak256=function(e){return a.keccak(e)},a.sha3=a.keccak,a.sha256=function(e){return e=a.toBuffer(e),u("sha256").update(e).digest()},a.ripemd160=function(e,t){e=a.toBuffer(e);var r=u("rmd160").update(e).digest();return!0===t?a.setLength(r,32):r},a.rlphash=function(e){return a.keccak(b.encode(e))},a.isValidPrivate=function(e){return i.privateKeyVerify(e)},a.isValidPublic=function(e,a){return 64===e.length?i.publicKeyVerify(h.concat([h.from([4]),e])):!!a&&i.publicKeyVerify(e)},a.pubToAddress=a.publicToAddress=function(e,t){return e=a.toBuffer(e),t&&64!==e.length&&(e=i.publicKeyConvert(e,!1).slice(1)),s(64===e.length),a.keccak(e).slice(-20)};var x=a.privateToPublic=function(e){return e=a.toBuffer(e),i.publicKeyCreate(e,!1).slice(1)};a.importPublic=function(e){return 64!==(e=a.toBuffer(e)).length&&(e=i.publicKeyConvert(e,!1).slice(1)),e},a.ecsign=function(e,a){var t=i.sign(e,a),r={};return r.r=t.signature.slice(0,32),r.s=t.signature.slice(32,64),r.v=t.recovery+27,r},a.hashPersonalMessage=function(e){var t=a.toBuffer("\x19Ethereum Signed Message:\n"+e.length.toString());return a.keccak(h.concat([t,e]))},a.ecrecover=function(e,t,r,c){var n=h.concat([a.setLength(r,32),a.setLength(c,32)],64),d=t-27;if(0!==d&&1!==d)throw new Error("Invalid signature v value");var o=i.recover(e,n,d);return i.publicKeyConvert(o,!1).slice(1)},a.toRpcSig=function(e,t,r){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return a.bufferToHex(h.concat([a.setLengthLeft(t,32),a.setLengthLeft(r,32),a.toBuffer(e-27)]))},a.fromRpcSig=function(e){if(65!==(e=a.toBuffer(e)).length)throw new Error("Invalid signature length");var t=e[64];return t<27&&(t+=27),{v:t,r:e.slice(0,32),s:e.slice(32,64)}},a.privateToAddress=function(e){return a.publicToAddress(x(e))},a.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},a.isZeroAddress=function(e){return a.zeroAddress()===a.addHexPrefix(e)},a.toChecksumAddress=function(e){e=a.stripHexPrefix(e).toLowerCase();for(var t=a.keccak(e).toString("hex"),r="0x",c=0;c=8?r+=e[c].toUpperCase():r+=e[c];return r},a.isValidChecksumAddress=function(e){return a.isValidAddress(e)&&a.toChecksumAddress(e)===e},a.generateAddress=function(e,t){return e=a.toBuffer(e),t=(t=new l(t)).isZero()?null:h.from(t.toArray()),a.rlphash([e,t]).slice(-20)},a.isPrecompiled=function(e){var t=a.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},a.addHexPrefix=function(e){return"string"!==typeof e||a.isHexPrefixed(e)?e:"0x"+e},a.isValidSignature=function(e,a,t,r){var c=new l("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),n=new l("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===a.length&&32===t.length&&((27===e||28===e)&&(a=new l(a),t=new l(t),!(a.isZero()||a.gt(n)||t.isZero()||t.gt(n))&&(!1!==r||1!==new l(t).cmp(c))))},a.baToJSON=function(e){if(h.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var t=[],r=0;r=c.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===c.length||!t.length||s(t.length===c.length,"The field "+t.name+" must have byte length of "+t.length),e.raw[r]=c}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:c,set:n}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:n,get:c})})),c)if("string"===typeof c&&(c=h.from(a.stripHexPrefix(c),"hex")),h.isBuffer(c)&&(c=b.decode(c)),Array.isArray(c)){if(c.length>e._fields.length)throw new Error("wrong number of fields in data");c.forEach((function(t,r){e[e._fields[r]]=a.toBuffer(t)}))}else{if("object"!==("undefined"===typeof c?"undefined":r(c)))throw new Error("invalid data");var n=Object.keys(c);t.forEach((function(a){-1!==n.indexOf(a.name)&&(e[a.name]=c[a.name]),-1!==n.indexOf(a.alias)&&(e[a.alias]=c[a.alias])}))}}},5134:function(e,a,t){"use strict";var r=t(19778).Buffer,c=t(30013),n=t(8722),d=t(76829),o=function(e){return 32===e.length&&c.privateKeyVerify(Uint8Array.from(e))};e.exports={privateKeyVerify:o,privateKeyExport:function(e,a){if(32!==e.length)throw new RangeError("private key length is invalid");var t=n.privateKeyExport(e,a);return d.privateKeyExport(e,t,a)},privateKeyImport:function(e){if(null!==(e=d.privateKeyImport(e))&&32===e.length&&o(e))return e;throw new Error("couldn't import from DER format")},privateKeyNegate:function(e){return r.from(c.privateKeyNegate(Uint8Array.from(e)))},privateKeyModInverse:function(e){if(32!==e.length)throw new Error("private key length is invalid");return r.from(n.privateKeyModInverse(Uint8Array.from(e)))},privateKeyTweakAdd:function(e,a){return r.from(c.privateKeyTweakAdd(Uint8Array.from(e),a))},privateKeyTweakMul:function(e,a){return r.from(c.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(a)))},publicKeyCreate:function(e,a){return r.from(c.publicKeyCreate(Uint8Array.from(e),a))},publicKeyConvert:function(e,a){return r.from(c.publicKeyConvert(Uint8Array.from(e),a))},publicKeyVerify:function(e){return(33===e.length||65===e.length)&&c.publicKeyVerify(Uint8Array.from(e))},publicKeyTweakAdd:function(e,a,t){return r.from(c.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(a),t))},publicKeyTweakMul:function(e,a,t){return r.from(c.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(a),t))},publicKeyCombine:function(e,a){var t=[];return e.forEach((function(e){t.push(Uint8Array.from(e))})),r.from(c.publicKeyCombine(t,a))},signatureNormalize:function(e){return r.from(c.signatureNormalize(Uint8Array.from(e)))},signatureExport:function(e){return r.from(c.signatureExport(Uint8Array.from(e)))},signatureImport:function(e){return r.from(c.signatureImport(Uint8Array.from(e)))},signatureImportLax:function(e){if(0===e.length)throw new RangeError("signature length is invalid");var a=d.signatureImportLax(e);if(null===a)throw new Error("couldn't parse DER signature");return n.signatureImport(a)},sign:function(e,a,t){if(null===t)throw new TypeError("options should be an Object");var n=void 0;if(t){if(n={},null===t.data)throw new TypeError("options.data should be a Buffer");if(t.data){if(32!==t.data.length)throw new RangeError("options.data length is invalid");n.data=new Uint8Array(t.data)}if(null===t.noncefn)throw new TypeError("options.noncefn should be a Function");t.noncefn&&(n.noncefn=function(e,a,c,n,d){var o=null!=c?r.from(c):null,f=null!=n?r.from(n):null,i=r.from("");return t.noncefn&&(i=t.noncefn(r.from(e),r.from(a),o,f,d)),Uint8Array.from(i)})}var d=c.ecdsaSign(Uint8Array.from(e),Uint8Array.from(a),n);return{signature:r.from(d.signature),recovery:d.recid}},verify:function(e,a,t){return c.ecdsaVerify(Uint8Array.from(a),Uint8Array.from(e),t)},recover:function(e,a,t,n){return r.from(c.ecdsaRecover(Uint8Array.from(a),t,Uint8Array.from(e),n))},ecdh:function(e,a){return r.from(c.ecdh(Uint8Array.from(e),Uint8Array.from(a),{}))},ecdhUnsafe:function(e,a,t){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==a.length)throw new RangeError("private key length is invalid");return r.from(n.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(a),t))}}},76829:function(e,a,t){"use strict";var r=t(19778).Buffer,c=r.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n=r.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a.privateKeyExport=function(e,a,t){var d=r.from(t?c:n);return e.copy(d,t?8:9),a.copy(d,t?181:214),d},a.privateKeyImport=function(e){var a=e.length,t=0;if(a2)return null;if(a<(t+=1)+r)return null;var c=e[t+r-1]|(r>1?e[t+r-2]<<8:0);return a<(t+=r)+c||a32||ac)return null;if(2!==e[n++])return null;var o=e[n++];if(128&o){if(n+(d=o-128)>c)return null;for(;d>0&&0===e[n];n+=1,d-=1);for(o=0;d>0;n+=1,d-=1)o=(o<<8)+e[n]}if(o>c-n)return null;var f=n;if(n+=o,2!==e[n++])return null;var i=e[n++];if(128&i){if(n+(d=i-128)>c)return null;for(;d>0&&0===e[n];n+=1,d-=1);for(i=0;d>0;n+=1,d-=1)i=(i<<8)+e[n]}if(i>c-n)return null;var s=n;for(n+=i;o>0&&0===e[f];o-=1,f+=1);if(o>32)return null;var b=e.slice(f,f+o);for(b.copy(a,32-b.length);i>0&&0===e[s];i-=1,s+=1);if(i>32)return null;var l=e.slice(s,s+i);return l.copy(t,32-l.length),{r:a,s:t}}},8722:function(e,a,t){"use strict";var r=t(19778).Buffer,c=t(80518),n=new(0,t(6289).ec)("secp256k1"),d=n.curve;a.privateKeyExport=function(e,a){var t=new c(e);if(t.ucmp(d.n)>=0)throw new Error("couldn't export to DER format");var r=n.g.mul(t);return o(r.getX(),r.getY(),a)},a.privateKeyModInverse=function(e){var a=new c(e);if(a.ucmp(d.n)>=0||a.isZero())throw new Error("private key range is invalid");return a.invm(d.n).toArrayLike(r,"be",32)},a.signatureImport=function(e){var a=new c(e.r);a.ucmp(d.n)>=0&&(a=new c(0));var t=new c(e.s);return t.ucmp(d.n)>=0&&(t=new c(0)),r.concat([a.toArrayLike(r,"be",32),t.toArrayLike(r,"be",32)])},a.ecdhUnsafe=function(e,a,t){var r=n.keyFromPublic(e),f=new c(a);if(f.ucmp(d.n)>=0||f.isZero())throw new Error("scalar was invalid (zero or overflow)");var i=r.pub.mul(f);return o(i.getX(),i.getY(),t)};var o=function(e,a,t){var c=void 0;return t?((c=r.alloc(33))[0]=a.isOdd()?3:2,e.toArrayLike(r,"be",32).copy(c,1)):((c=r.alloc(65))[0]=4,e.toArrayLike(r,"be",32).copy(c,1),a.toArrayLike(r,"be",32).copy(c,33)),c}},31823:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),function(e){e.Sell="Sell",e.Buy="Buy"}(a.MarketOperation||(a.MarketOperation={})),function(e){e.OrderFillExpired="ORDER_FILL_EXPIRED",e.OrderCancelExpired="ORDER_CANCEL_EXPIRED",e.OrderCancelled="ORDER_CANCELLED",e.OrderFillAmountZero="ORDER_FILL_AMOUNT_ZERO",e.OrderRemainingFillAmountZero="ORDER_REMAINING_FILL_AMOUNT_ZERO",e.OrderFillRoundingError="ORDER_FILL_ROUNDING_ERROR",e.FillBalanceAllowanceError="FILL_BALANCE_ALLOWANCE_ERROR",e.InsufficientTakerBalance="INSUFFICIENT_TAKER_BALANCE",e.InsufficientTakerAllowance="INSUFFICIENT_TAKER_ALLOWANCE",e.InsufficientMakerBalance="INSUFFICIENT_MAKER_BALANCE",e.InsufficientMakerAllowance="INSUFFICIENT_MAKER_ALLOWANCE",e.InsufficientTakerFeeBalance="INSUFFICIENT_TAKER_FEE_BALANCE",e.InsufficientTakerFeeAllowance="INSUFFICIENT_TAKER_FEE_ALLOWANCE",e.InsufficientMakerFeeBalance="INSUFFICIENT_MAKER_FEE_BALANCE",e.InsufficientMakerFeeAllowance="INSUFFICIENT_MAKER_FEE_ALLOWANCE",e.TransactionSenderIsNotFillOrderTaker="TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER",e.MultipleMakersInSingleCancelBatchDisallowed="MULTIPLE_MAKERS_IN_SINGLE_CANCEL_BATCH_DISALLOWED",e.InsufficientRemainingFillAmount="INSUFFICIENT_REMAINING_FILL_AMOUNT",e.MultipleTakerTokensInFillUpToDisallowed="MULTIPLE_TAKER_TOKENS_IN_FILL_UP_TO_DISALLOWED",e.BatchOrdersMustHaveSameExchangeAddress="BATCH_ORDERS_MUST_HAVE_SAME_EXCHANGE_ADDRESS",e.BatchOrdersMustHaveAtLeastOneItem="BATCH_ORDERS_MUST_HAVE_AT_LEAST_ONE_ITEM"}(a.ExchangeContractErrs||(a.ExchangeContractErrs={})),function(e){e[e.Illegal=0]="Illegal",e[e.Invalid=1]="Invalid",e[e.EIP712=2]="EIP712",e[e.EthSign=3]="EthSign",e[e.Wallet=4]="Wallet",e[e.Validator=5]="Validator",e[e.PreSigned=6]="PreSigned",e[e.NSignatureTypes=7]="NSignatureTypes"}(a.SignatureType||(a.SignatureType={})),function(e){e.ERC20="0xf47261b0",e.ERC721="0x02571792",e.MultiAsset="0x94cfcdd7",e.ERC1155="0xa7cb5fb7",e.StaticCall="0xc339d10a"}(a.AssetProxyId||(a.AssetProxyId={})),function(e){e.OrderUnfillable="ORDER_UNFILLABLE",e.InvalidMaker="INVALID_MAKER",e.InvalidTaker="INVALID_TAKER",e.InvalidSender="INVALID_SENDER",e.InvalidOrderSignature="INVALID_ORDER_SIGNATURE",e.InvalidTakerAmount="INVALID_TAKER_AMOUNT",e.DivisionByZero="DIVISION_BY_ZERO",e.RoundingError="ROUNDING_ERROR",e.InvalidSignature="INVALID_SIGNATURE",e.SignatureIllegal="SIGNATURE_ILLEGAL",e.SignatureInvalid="SIGNATURE_INVALID",e.SignatureUnsupported="SIGNATURE_UNSUPPORTED",e.TakerOverpay="TAKER_OVERPAY",e.OrderOverfill="ORDER_OVERFILL",e.InvalidFillPrice="INVALID_FILL_PRICE",e.InvalidNewOrderEpoch="INVALID_NEW_ORDER_EPOCH",e.CompleteFillFailed="COMPLETE_FILL_FAILED",e.NegativeSpreadRequired="NEGATIVE_SPREAD_REQUIRED",e.ReentrancyIllegal="REENTRANCY_ILLEGAL",e.InvalidTxHash="INVALID_TX_HASH",e.InvalidTxSignature="INVALID_TX_SIGNATURE",e.FailedExecution="FAILED_EXECUTION",e.AssetProxyAlreadyExists="ASSET_PROXY_ALREADY_EXISTS",e.LengthGreaterThan0Required="LENGTH_GREATER_THAN_0_REQUIRED",e.LengthGreaterThan3Required="LENGTH_GREATER_THAN_3_REQUIRED",e.LengthGreaterThan131Required="LENGTH_GREATER_THAN_131_REQUIRED",e.Length0Required="LENGTH_0_REQUIRED",e.Length65Required="LENGTH_65_REQUIRED",e.InvalidAmount="INVALID_AMOUNT",e.TransferFailed="TRANSFER_FAILED",e.SenderNotAuthorized="SENDER_NOT_AUTHORIZED",e.TargetNotAuthorized="TARGET_NOT_AUTHORIZED",e.TargetAlreadyAuthorized="TARGET_ALREADY_AUTHORIZED",e.IndexOutOfBounds="INDEX_OUT_OF_BOUNDS",e.AuthorizedAddressMismatch="AUTHORIZED_ADDRESS_MISMATCH",e.OnlyContractOwner="ONLY_CONTRACT_OWNER",e.MakerNotWhitelisted="MAKER_NOT_WHITELISTED",e.TakerNotWhitelisted="TAKER_NOT_WHITELISTED",e.AssetProxyDoesNotExist="ASSET_PROXY_DOES_NOT_EXIST",e.LengthMismatch="LENGTH_MISMATCH",e.LibBytesGreaterThanZeroLengthRequired="GREATER_THAN_ZERO_LENGTH_REQUIRED",e.LibBytesGreaterOrEqualTo4LengthRequired="GREATER_OR_EQUAL_TO_4_LENGTH_REQUIRED",e.LibBytesGreaterOrEqualTo20LengthRequired="GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED",e.LibBytesGreaterOrEqualTo32LengthRequired="GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED",e.LibBytesGreaterOrEqualToNestedBytesLengthRequired="GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED",e.LibBytesGreaterOrEqualToSourceBytesLengthRequired="GREATER_OR_EQUAL_TO_SOURCE_BYTES_LENGTH_REQUIRED",e.Erc20InsufficientBalance="ERC20_INSUFFICIENT_BALANCE",e.Erc20InsufficientAllowance="ERC20_INSUFFICIENT_ALLOWANCE",e.FeePercentageTooLarge="FEE_PERCENTAGE_TOO_LARGE",e.ValueGreaterThanZero="VALUE_GREATER_THAN_ZERO",e.InvalidMsgValue="INVALID_MSG_VALUE",e.InsufficientEthRemaining="INSUFFICIENT_ETH_REMAINING",e.Uint256Overflow="UINT256_OVERFLOW",e.Erc721ZeroToAddress="ERC721_ZERO_TO_ADDRESS",e.Erc721OwnerMismatch="ERC721_OWNER_MISMATCH",e.Erc721InvalidSpender="ERC721_INVALID_SPENDER",e.Erc721ZeroOwner="ERC721_ZERO_OWNER",e.Erc721InvalidSelector="ERC721_INVALID_SELECTOR",e.WalletError="WALLET_ERROR",e.ValidatorError="VALIDATOR_ERROR",e.InvalidFunctionSelector="INVALID_FUNCTION_SELECTOR",e.InvalidAssetData="INVALID_ASSET_DATA",e.InvalidAssetProxy="INVALID_ASSET_PROXY",e.UnregisteredAssetProxy="UNREGISTERED_ASSET_PROXY",e.TxFullyConfirmed="TX_FULLY_CONFIRMED",e.TxNotFullyConfirmed="TX_NOT_FULLY_CONFIRMED",e.TimeLockIncomplete="TIME_LOCK_INCOMPLETE",e.InvalidFreeMemoryPtr="INVALID_FREE_MEMORY_PTR",e.AuctionInvalidAmount="INVALID_AMOUNT",e.AuctionExpired="AUCTION_EXPIRED",e.AuctionNotStarted="AUCTION_NOT_STARTED",e.AuctionInvalidBeginTime="INVALID_BEGIN_TIME",e.InvalidAssetDataEnd="INVALID_ASSET_DATA_END",e.InvalidOrBlockedExchangeSelector="INVALID_OR_BLOCKED_EXCHANGE_SELECTOR",e.BalanceQueryFailed="BALANCE_QUERY_FAILED",e.AtLeastOneAddressDoesNotMeetBalanceThreshold="AT_LEAST_ONE_ADDRESS_DOES_NOT_MEET_BALANCE_THRESHOLD",e.FromLessThanToRequired="FROM_LESS_THAN_TO_REQUIRED",e.ToLessThanLengthRequired="TO_LESS_THAN_LENGTH_REQUIRED",e.InvalidApprovalSignature="INVALID_APPROVAL_SIGNATURE",e.ApprovalExpired="APPROVAL_EXPIRED",e.InvalidOrigin="INVALID_ORIGIN",e.AmountEqualToOneRequired="AMOUNT_EQUAL_TO_ONE_REQUIRED",e.BadReceiverReturnValue="BAD_RECEIVER_RETURN_VALUE",e.CannotTransferToAddressZero="CANNOT_TRANSFER_TO_ADDRESS_ZERO",e.InsufficientAllowance="INSUFFICIENT_ALLOWANCE",e.NFTNotOwnedByFromAddress="NFT_NOT_OWNED_BY_FROM_ADDRESS",e.OwnersAndIdsMustHaveSameLength="OWNERS_AND_IDS_MUST_HAVE_SAME_LENGTH",e.TokenAndValuesLengthMismatch="TOKEN_AND_VALUES_LENGTH_MISMATCH",e.TriedToMintFungibleForNonFungibleToken="TRIED_TO_MINT_FUNGIBLE_FOR_NON_FUNGIBLE_TOKEN",e.TriedToMintNonFungibleForFungibleToken="TRIED_TO_MINT_NON_FUNGIBLE_FOR_FUNGIBLE_TOKEN",e.TransferRejected="TRANSFER_REJECTED",e.Uint256Underflow="UINT256_UNDERFLOW",e.InvalidIdsOffset="INVALID_IDS_OFFSET",e.InvalidValuesOffset="INVALID_VALUES_OFFSET",e.InvalidDataOffset="INVALID_DATA_OFFSET",e.InvalidAssetDataLength="INVALID_ASSET_DATA_LENGTH",e.InvalidStaticCallDataOffset="INVALID_STATIC_CALL_DATA_OFFSET",e.TargetNotEven="TARGET_NOT_EVEN",e.UnexpectedStaticCallResult="UNEXPECTED_STATIC_CALL_RESULT"}(a.RevertReason||(a.RevertReason={})),function(e){e[e.Success=200]="Success",e[e.NotFound=404]="NotFound",e[e.InternalError=500]="InternalError",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.GatewayTimeout=504]="GatewayTimeout"}(a.StatusCodes||(a.StatusCodes={})),function(e){e.Update="update",e.Unknown="unknown"}(a.OrdersChannelMessageTypes||(a.OrdersChannelMessageTypes={})),function(e){e.Close="close",e.Error="error",e.Message="message"}(a.WebsocketConnectionEventType||(a.WebsocketConnectionEventType={})),function(e){e.Connect="connect",e.ConnectFailed="connectFailed"}(a.WebsocketClientEventType||(a.WebsocketClientEventType={})),function(e){e.Intrinsic="intrinsic",e.Reference="reference",e.Array="array",e.StringLiteral="stringLiteral",e.Reflection="reflection",e.Union="union",e.TypeParameter="typeParameter",e.Intersection="intersection",e.Tuple="tuple",e.Unknown="unknown"}(a.TypeDocTypes||(a.TypeDocTypes={}))},70775:function(e,a,t){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var a,t=1,r=arguments.length;t0?this.generateValue(o,f):this.getDefaultValue(f)},e.prototype.decodeAsArray=function(e,a){var t=this.decode(e,a);return r.isObject(t)?r.values(t):[t]},e.prototype.getSignature=function(e){if(r.isEmpty(this._dataItem.name)||!e)return this.getSignatureType();var a=this.getDataItem().name,t=a.lastIndexOf(".");return(void 0!==t&&t>0?a.substr(t+1):a)+" "+this.getSignatureType()},e}();a.DataType=o},24731:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var c=t(90970),n=function(e){function a(a,t,r){var c=e.call(this,a,t)||this;return c._sizeKnownAtCompileTime=r,c}return r(a,e),a.prototype.generateCalldataBlock=function(e,a){var t=this.encodeValue(e),r=this.getDataItem().name,n=this.getSignature(),d=void 0===a?"":a.getName();return new c.BlobCalldataBlock(r,n,d,t)},a.prototype.generateValue=function(e,a){return this.decodeValue(e)},a.prototype.isStatic=function(){return this._sizeKnownAtCompileTime},a}(t(98788).DataType);a.AbstractBlobDataType=n},19745:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var c=t(69354),n=t(52826),d=t(28845),o=function(e){function a(a,t,r,c){var n=e.call(this,a,t)||this;return n._destination=r,n._parent=c,n}return r(a,e),a.prototype.generateCalldataBlock=function(e,a){if(void 0===a)throw new Error("DependentDataType requires a parent block to generate its block");var t=this._destination.generateCalldataBlock(e,a),r=this.getDataItem().name,c=this.getSignature(),d=a.getName();return new n.PointerCalldataBlock(r,c,d,t,a)},a.prototype.generateValue=function(e,a){var t=e.popWord(),r=c.bufferToHex(t),n=parseInt(r,d.constants.HEX_BASE),o=e.toAbsoluteOffset(n),f=e.getOffset();e.setOffset(o);var i=this._destination.generateValue(e,a);return e.setOffset(f),i},a.prototype.isStatic=function(){return!0},a}(t(98788).DataType);a.AbstractPointerDataType=o},46286:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),c=this&&this.__read||function(e,a){var t="function"===typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,c,n=t.call(e),d=[];try{for(;(void 0===a||a-- >0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d};Object.defineProperty(a,"__esModule",{value:!0});var n=t(69354),d=t(763),o=t(94869),f=t(21869),i=t(28845),s=t(98788),b=t(19745),l=function(e){function a(a,t,r,n,d){var o,f;void 0===r&&(r=!1);var i=e.call(this,a,t)||this;return i._memberIndexByName={},i._members=[],i._isArray=r,i._arrayLength=n,i._arrayElementType=d,r&&void 0!==n?(o=c(i._createMembersWithLength(a,n),2),i._members=o[0],i._memberIndexByName=o[1]):r||(f=c(i._createMembersWithKeys(a),2),i._members=f[0],i._memberIndexByName=f[1]),i}return r(a,e),a.prototype.generateCalldataBlock=function(e,a){return e instanceof Array?this._generateCalldataBlockFromArray(e,a):this._generateCalldataBlockFromObject(e,a)},a.prototype.generateValue=function(e,a){var t,r=this,f=this._members;if(this._isArray&&void 0===this._arrayLength){var s=e.popWord(),b=n.bufferToHex(s),l=new o.BigNumber(b,i.constants.HEX_BASE);f=c(this._createMembersWithLength(this.getDataItem(),l.toNumber()),1)[0]}return e.startScope(),a.shouldConvertStructsToObjects&&!this._isArray?(t={},d.each(this._memberIndexByName,(function(c,n){var d=r._members[c].generateValue(e,a);t[n]=d}))):(t=[],d.each(f,(function(r,c){var n=r.generateValue(e,a);t.push(n)}))),e.endScope(),t},a.prototype.isStatic=function(){return(!this._isArray||void 0!==this._arrayLength)&&void 0===d.find(this._members,(function(e){return e instanceof b.AbstractPointerDataType}))},a.prototype.getDefaultValue=function(e){var a,t=this;return this._isArray&&void 0===this._arrayLength?a=[]:void 0!==e&&e.shouldConvertStructsToObjects&&!this._isArray?(a={},d.each(this._memberIndexByName,(function(e,r){var c=t._members[e].getDefaultValue();a[r]=c}))):(a=[],d.each(this._members,(function(e,t){var r=e.getDefaultValue();a.push(r)}))),a},a.prototype._generateCalldataBlockFromArray=function(e,a){if(void 0!==this._arrayLength&&e.length!==this._arrayLength)throw new Error("Expected array of "+JSON.stringify(this._arrayLength)+" elements, but got array of length "+JSON.stringify(e.length));var t=void 0===a?"":a.getName(),r=new f.SetCalldataBlock(this.getDataItem().name,this.getSignature(),t),o=this._members;if(this._isArray&&void 0===this._arrayLength){o=c(this._createMembersWithLength(this.getDataItem(),e.length),1)[0];var s=n.setLengthLeft(n.toBuffer("0x"+e.length.toString(i.constants.HEX_BASE)),i.constants.EVM_WORD_WIDTH_IN_BYTES);r.setHeader(s)}var b=[];return d.each(o,(function(a,t){var c=a.generateCalldataBlock(e[t],r);b.push(c)})),r.setMembers(b),r},a.prototype._generateCalldataBlockFromObject=function(e,a){var t=this,r=void 0===a?"":a.getName(),c=new f.SetCalldataBlock(this.getDataItem().name,this.getSignature(),r),n=[];return d.forEach(this._memberIndexByName,(function(a,r){if(!(r in e))throw new Error("Could not assign tuple to object: missing key '"+r+"' in object "+JSON.stringify(e));var d=e[r],o=t._members[a].generateCalldataBlock(d,c);n.push(o)})),c.setMembers(n),c},a.prototype._computeSignatureOfMembers=function(e){var a=this,t="(";return d.each(this._members,(function(r,c){t+=r.getSignature(e),c"),a._DEPENDENT_PAYLOAD_SIZE_IN_BYTES=32,a._EMPTY_HEADER_SIZE=0,a}(t(3822).CalldataBlock);a.PointerCalldataBlock=o},21869:function(e,a,t){"use strict";var r=t(19778).Buffer,c=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var n=t(763),d=function(e){function a(a,t,r){var c=e.call(this,a,t,r,0,0)||this;return c._members=[],c._header=void 0,c}return c(a,e),a.prototype.getRawData=function(){var e=[];return void 0!==this._header&&e.push(this._header),n.each(this._members,(function(a){var t=a.getRawData();e.push(t)})),r.concat(e)},a.prototype.setMembers=function(e){this._members=e},a.prototype.setHeader=function(e){this._setHeaderSize(e.byteLength),this._header=e},a.prototype.toBuffer=function(){return void 0!==this._header?this._header:new r("")},a.prototype.getMembers=function(){return this._members},a}(t(3822).CalldataBlock);a.SetCalldataBlock=d},84836:function(e,a,t){"use strict";var r=t(19778).Buffer,c=this&&this.__values||function(e){var a="function"===typeof Symbol&&e[Symbol.iterator],t=0;return a?a.call(e):{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}};Object.defineProperty(a,"__esModule",{value:!0});var n=t(69354),d=t(763),o=t(28845),f=t(52826),i=t(21869),s=t(73411),b=function(){function e(e){this._rules=e,this._selector="",this._root=void 0}return e.prototype.setRoot=function(e){this._root=e},e.prototype.setSelector=function(e){if(!d.startsWith(e,"0x"))throw new Error("Expected selector to be hex. Missing prefix '0x'");if(e.length!==o.constants.HEX_SELECTOR_LENGTH_IN_CHARS)throw new Error("Invalid selector '"+e+"'");this._selector=e},e.prototype.toString=function(){var e,a;if(void 0===this._root)throw new Error("expected root");this._rules.shouldOptimize&&this._optimize();var t=new s.CalldataIterator(this._root),r=0;try{for(var n=c(t),d=n.next();!d.done;d=n.next()){var o=d.value;o.setOffset(r),r+=o.getSizeInBytes()}}catch(f){e={error:f}}finally{try{d&&!d.done&&(a=n.return)&&a.call(n)}finally{if(e)throw e.error}}return this._rules.shouldAnnotate?this._toHumanReadableCallData():this._toEvmCompatibeCallDataHex()},e.prototype._optimize=function(){var e,a;if(void 0===this._root)throw new Error("expected root");var t=new s.ReverseCalldataIterator(this._root),r={};try{for(var d=c(t),o=d.next();!o.done;o=d.next()){var i=o.value;if(i instanceof f.PointerCalldataBlock){var b=i.getDependency().computeHash(),l=n.bufferToHex(b);if(l in r){var u=r[l];u!==i.getDependency()&&i.setAlias(u)}}else{var h=i.computeHash(),x=n.bufferToHex(h);x in r||(r[x]=i)}}}catch(p){e={error:p}}finally{try{o&&!o.done&&(a=d.return)&&a.call(d)}finally{if(e)throw e.error}}},e.prototype._toEvmCompatibeCallDataHex=function(){var e,a;if(void 0===this._root)throw new Error("expected root");var t=[n.toBuffer(this._selector)],d=new s.CalldataIterator(this._root);try{for(var o=c(d),f=o.next();!f.done;f=o.next()){var i=f.value;t.push(i.toBuffer())}}catch(l){e={error:l}}finally{try{f&&!f.done&&(a=o.return)&&a.call(o)}finally{if(e)throw e.error}}var b=r.concat(t);return n.bufferToHex(b)},e.prototype._toHumanReadableCallData=function(){var e,a;if(void 0===this._root)throw new Error("expected root");var t=""+this._selector,r=0,d=this._root.getName(),f=new s.CalldataIterator(this._root);try{for(var b=c(f),l=b.next();!l.done;l=b.next()){var u=l.value,h=u.getSizeInBytes(),x=u.getName(),p=u.getParentName(),m=x.replace(p+".","").replace(d+".",""),v="",g="",y="";0===h?y="\n"+(v=" ".repeat(10))+(g=" ".repeat(74))+("### "+m.padEnd(80)):(v=("0x"+r.toString(o.constants.HEX_BASE)).padEnd(10),g=n.stripHexPrefix(n.bufferToHex(u.toBuffer().slice(0,o.constants.EVM_WORD_WIDTH_IN_BYTES))).padEnd(74),y=u instanceof i.SetCalldataBlock?"\n"+v+g+("### "+m.padEnd(80)):""+v+g+(" "+m.padEnd(80)));for(var k=o.constants.EVM_WORD_WIDTH_IN_BYTES;kthis._value.byteLength)throw new Error("Tried to decode beyond the end of calldata");var r=this._value.slice(a,t);return this.setOffset(t),r},e.prototype.popWord=function(){return this.popBytes(32)},e.prototype.popWords=function(e){return this.popBytes(32*e)},e.prototype.readBytes=function(e,a){return this._value.slice(e,a)},e.prototype.setOffset=function(e){this._offset=e},e.prototype.startScope=function(){this._scopes.pushFront(this._offset)},e.prototype.endScope=function(){this._scopes.popFront()},e.prototype.getOffset=function(){return this._offset},e.prototype.toAbsoluteOffset=function(e){var a=this._scopes.peekFront();if(void 0===a)throw new Error("Tried to access undefined scope.");return e+a},e.prototype.getSelector=function(){return this._selector},e.prototype.getSizeInBytes=function(){return this._value.byteLength},e._INITIAL_OFFSET=0,e}();a.RawCalldata=o},37336:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof N&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var c=t(763),n=t(57505),d=t(70717),o=t(40654),f=t(51074),i=t(8351),s=t(3604),b=t(10838),l=t(90281),u=t(46990),h=t(99377),x=t(12664),p=t(27473),m=function(e){function a(a){return e.call(this,a,S.getInstance())||this}return r(a,e),a}(d.AddressDataType);a.Address=m;var v=function(e){function a(a){return e.call(this,a,S.getInstance())||this}return r(a,e),a}(f.BoolDataType);a.Bool=v;var g=function(e){function a(a){return e.call(this,a,S.getInstance())||this}return r(a,e),a}(s.IntDataType);a.Int=g;var y=function(e){function a(a){return e.call(this,a,S.getInstance())||this}return r(a,e),a}(p.UIntDataType);a.UInt=y;var k=function(e){function a(a){return e.call(this,a,S.getInstance())||this}return r(a,e),a}(u.StaticBytesDataType);a.StaticBytes=k;var w=function(e){function a(a){return e.call(this,a,S.getInstance())||this}return r(a,e),a}(i.DynamicBytesDataType);a.DynamicBytes=w;var I=function(e){function a(a){return e.call(this,a,S.getInstance())||this}return r(a,e),a}(h.StringDataType);a.String=I;var _=function(e){function a(a,t){return e.call(this,a,t,S.getInstance())||this}return r(a,e),a}(l.PointerDataType);a.Pointer=_;var E=function(e){function a(a){return e.call(this,a,S.getInstance())||this}return r(a,e),a}(x.TupleDataType);a.Tuple=E;var N=function(e){function a(a){return e.call(this,a,S.getInstance())||this}return r(a,e),a}(o.ArrayDataType);a.Array=N;var H=function(e){function a(a){return e.call(this,a,S.getInstance())||this}return r(a,e),a}(b.MethodDataType);a.Method=H;var S=function(){function e(){}return e.getInstance=function(){return e._instance||(e._instance=new e),e._instance},e.prototype.create=function(e,a){var t;if(N.matchType(e.type)?t=new N(e):m.matchType(e.type)?t=new m(e):v.matchType(e.type)?t=new v(e):g.matchType(e.type)?t=new g(e):y.matchType(e.type)?t=new y(e):k.matchType(e.type)?t=new k(e):E.matchType(e.type)?t=new E(e):w.matchType(e.type)?t=new w(e):I.matchType(e.type)&&(t=new I(e)),void 0===t)throw new Error("Unrecognized data type: '"+e.type+"'");return void 0===a||t.isStatic()?t:new _(t,a)},e}();function A(e){var a;if(c.isArray(e)&&c.isEmpty(e))a=[];else if(c.isArray(e)&&c.isString(e[0]))a=[],c.each(e,(function(e){var t=n.generateDataItemFromSignature(e);a.push(t)}));else if(c.isArray(e))a=e;else if("string"===typeof e){var t=n.generateDataItemFromSignature(e);a=[t]}else a=[e];return a}a.EvmDataTypeFactory=S,a.create=function(e){var a=function(e){var a;if(c.isArray(e)){a={name:"",type:"tuple",components:e}}else a=c.isString(e)?n.generateDataItemFromSignature(e):e;return a}(e);return S.getInstance().create(a)},a.createMethod=function(e,a,t){var r=void 0===a?[]:A(a),c=void 0===t?[]:A(t);return new H({name:e,inputs:r,outputs:c,type:"function",constant:!1,payable:!1,stateMutability:"nonpayable"})}},70717:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var c=t(59004),n=t(69354),d=t(763),o=t(24731),f=t(28845),i=function(e){function a(t,r){var c=e.call(this,t,r,a._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!a.matchType(t.type))throw new Error("Tried to instantiate Address with bad input: "+t);return c}return r(a,e),a.matchType=function(e){return e===c.SolidityTypes.Address},a.prototype.encodeValue=function(e){if(!n.isValidAddress(e))throw new Error("Invalid address: '"+e+"'");var a=n.toBuffer(e);return n.setLengthLeft(a,f.constants.EVM_WORD_WIDTH_IN_BYTES)},a.prototype.decodeValue=function(e){var t=e.popWord().slice(a._DECODED_ADDRESS_OFFSET_IN_BYTES),r=n.bufferToHex(t);return d.toLower(r)},a.prototype.getDefaultValue=function(){return a._DEFAULT_VALUE},a.prototype.getSignatureType=function(){return c.SolidityTypes.Address},a._SIZE_KNOWN_AT_COMPILE_TIME=!0,a._ADDRESS_SIZE_IN_BYTES=20,a._DECODED_ADDRESS_OFFSET_IN_BYTES=f.constants.EVM_WORD_WIDTH_IN_BYTES-a._ADDRESS_SIZE_IN_BYTES,a._DEFAULT_VALUE="0x0000000000000000000000000000000000000000",a}(o.AbstractBlobDataType);a.AddressDataType=i},40654:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}(),c=this&&this.__read||function(e,a){var t="function"===typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,c,n=t.call(e),d=[];try{for(;(void 0===a||a-- >0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d};Object.defineProperty(a,"__esModule",{value:!0});var n=t(763),d=t(46286),o=t(28845),f=function(e){function a(t,r){var n=this,d=c(a._decodeElementTypeAndLengthFromType(t.type),2),o=d[0],f=d[1];return(n=e.call(this,t,r,!0,f,o)||this)._elementType=o,n}return r(a,e),a.matchType=function(e){return a._MATCHER.test(e)},a._decodeElementTypeAndLengthFromType=function(e){var t=a._MATCHER.exec(e);if(null===t||3!==t.length)throw new Error("Could not parse array: "+e);if(void 0===t[1])throw new Error("Could not parse array type: "+e);if(void 0===t[2])throw new Error("Could not parse array length: "+e);return[t[1],n.isEmpty(t[2])?void 0:parseInt(t[2],o.constants.DEC_BASE)]},a.prototype.getSignatureType=function(){return this._computeSignature(!1)},a.prototype.getSignature=function(e){if(n.isEmpty(this.getDataItem().name)||!e)return this.getSignatureType();var a=this.getDataItem().name,t=a.lastIndexOf(".");return(void 0!==t&&t>0?a.substr(t+1):a)+" "+this._computeSignature(e)},a.prototype._computeSignature=function(e){var a={type:this._elementType,name:""},t=this.getDataItem().components;void 0!==t&&(a.components=t);var r=this.getFactory().create(a).getSignature(e);return void 0===this._arrayLength?r+"[]":r+"["+this._arrayLength+"]"},a._MATCHER=RegExp("^(.+)\\[([0-9]*)\\]$"),a}(d.AbstractSetDataType);a.ArrayDataType=f},51074:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var c=t(59004),n=t(69354),d=t(94869),o=t(24731),f=t(28845),i=function(e){function a(t,r){var c=e.call(this,t,r,a._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!a.matchType(t.type))throw new Error("Tried to instantiate Bool with bad input: "+t);return c}return r(a,e),a.matchType=function(e){return e===c.SolidityTypes.Bool},a.prototype.encodeValue=function(e){var a=e?"0x1":"0x0";return n.setLengthLeft(n.toBuffer(a),f.constants.EVM_WORD_WIDTH_IN_BYTES)},a.prototype.decodeValue=function(e){var a=e.popWord(),t=n.bufferToHex(a),r="0x"===t?new d.BigNumber(0):new d.BigNumber(t,f.constants.HEX_BASE);if(!r.isEqualTo(0)&&!r.isEqualTo(1))throw new Error("Failed to decode boolean. Expected 0x0 or 0x1, got "+t);return!r.isEqualTo(0)},a.prototype.getDefaultValue=function(){return a._DEFAULT_VALUE},a.prototype.getSignatureType=function(){return c.SolidityTypes.Bool},a._SIZE_KNOWN_AT_COMPILE_TIME=!0,a._DEFAULT_VALUE=!1,a}(o.AbstractBlobDataType);a.BoolDataType=i},8351:function(e,a,t){"use strict";var r=t(19778).Buffer,c=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var n=t(59004),d=t(69354),o=t(763),f=t(24731),i=t(28845),s=function(e){function a(t,r){var c=e.call(this,t,r,a._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!a.matchType(t.type))throw new Error("Tried to instantiate Dynamic Bytes with bad input: "+t);return c}return c(a,e),a.matchType=function(e){return e===n.SolidityTypes.Bytes},a._sanityCheckValue=function(e){if("string"===typeof e){if(!o.startsWith(e,"0x"))throw new Error("Tried to encode non-hex value. Value must include '0x' prefix.");if(e.length%2!==0)throw new Error("Tried to assign "+e+", which is contains a half-byte. Use full bytes only.")}},a.prototype.encodeValue=function(e){var t=d.toBuffer(e),c=Math.ceil(t.byteLength/i.constants.EVM_WORD_WIDTH_IN_BYTES)*i.constants.EVM_WORD_WIDTH_IN_BYTES,n=d.toBuffer(t.byteLength),o=d.setLengthLeft(n,i.constants.EVM_WORD_WIDTH_IN_BYTES);a._sanityCheckValue(e);var f=d.setLengthRight(t,c);return r.concat([o,f])},a.prototype.decodeValue=function(e){var t=e.popWord(),r=d.bufferToHex(t),c=parseInt(r,i.constants.HEX_BASE),n=Math.ceil(c/i.constants.EVM_WORD_WIDTH_IN_BYTES),o=e.popWords(n).slice(0,c),f=d.bufferToHex(o);return a._sanityCheckValue(f),f},a.prototype.getDefaultValue=function(){return a._DEFAULT_VALUE},a.prototype.getSignatureType=function(){return n.SolidityTypes.Bytes},a._SIZE_KNOWN_AT_COMPILE_TIME=!1,a._DEFAULT_VALUE="0x",a}(f.AbstractBlobDataType);a.DynamicBytesDataType=s},3604:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var c=t(59004),n=t(94869),d=t(24731),o=t(28845),f=t(43901),i=function(e){function a(t,r){var c=e.call(this,t,r,a._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!a.matchType(t.type))throw new Error("Tried to instantiate Int with bad input: "+t);return c._width=a._decodeWidthFromType(t.type),c._minValue=new n.BigNumber(2).exponentiatedBy(c._width-1).times(-1),c._maxValue=new n.BigNumber(2).exponentiatedBy(c._width-1).minus(1),c}return r(a,e),a.matchType=function(e){return a._MATCHER.test(e)},a._decodeWidthFromType=function(e){var t=a._MATCHER.exec(e);return null!==t&&2===t.length&&void 0!==t[1]?parseInt(t[1],o.constants.DEC_BASE):a._DEFAULT_WIDTH},a.prototype.encodeValue=function(e){return f.safeEncodeNumericValue(e,this._minValue,this._maxValue)},a.prototype.decodeValue=function(e){var a=e.popWord(),t=f.safeDecodeNumericValue(a,this._minValue,this._maxValue);return this._width===o.constants.NUMBER_OF_BYTES_IN_INT8?t.toNumber():t},a.prototype.getDefaultValue=function(){var e=a._DEFAULT_VALUE;return this._width===o.constants.NUMBER_OF_BYTES_IN_INT8?e.toNumber():e},a.prototype.getSignatureType=function(){return""+c.SolidityTypes.Int+this._width},a._MATCHER=RegExp("^int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256){0,1}$"),a._SIZE_KNOWN_AT_COMPILE_TIME=!0,a._MAX_WIDTH=256,a._DEFAULT_WIDTH=a._MAX_WIDTH,a._DEFAULT_VALUE=new n.BigNumber(0),a}(d.AbstractBlobDataType);a.IntDataType=i},10838:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var c=t(69354),n=t(763),d=t(46286),o=t(28845),f=t(12664),i=function(e){function a(a,t){var r=this,c={type:"method",name:a.name,components:a.inputs};(r=e.call(this,c,t)||this)._methodSignature=r._computeSignature(),r._methodSelector=r._computeSelector();var n={type:"tuple",name:a.name,components:a.outputs};return r._returnDataType=new f.TupleDataType(n,r.getFactory()),r}return r(a,e),a.prototype.encode=function(a,t){return e.prototype.encode.call(this,a,t,this._methodSelector)},a.prototype.decode=function(a,t){return e.prototype.decode.call(this,a,t,this._methodSelector)},a.prototype.strictDecode=function(a,t){var r=e.prototype.decode.call(this,a,t,this._methodSelector),c=n.isObject(r)?n.values(r):[r];switch(c.length){case 0:return;case 1:return c[0];default:return c}},a.prototype.encodeReturnValues=function(e,a){return this._returnDataType.encode(e,a)},a.prototype.decodeReturnValues=function(e,a){return this._returnDataType.decode(e,a)},a.prototype.strictDecodeReturnValue=function(e,a){var t=this._returnDataType.decode(e,a),r=n.isObject(t)?n.values(t):[t];switch(r.length){case 0:return;case 1:return r[0];default:return r}},a.prototype.getSignatureType=function(){return this._methodSignature},a.prototype.getSelector=function(){return this._methodSelector},a.prototype.getReturnValueDataItem=function(){return this._returnDataType.getDataItem()},a.prototype._computeSignature=function(){var e=this._computeSignatureOfMembers();return""+this.getDataItem().name+e},a.prototype._computeSelector=function(){var e=this._computeSignature();return c.bufferToHex(c.toBuffer(c.sha3(e).slice(o.constants.HEX_SELECTOR_BYTE_OFFSET_IN_CALLDATA,o.constants.HEX_SELECTOR_LENGTH_IN_BYTES)))},a}(d.AbstractSetDataType);a.MethodDataType=i},90281:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var c=function(e){function a(a,t,r){var c=a.getDataItem(),n={name:"ptr<"+c.name+">",type:"ptr<"+c.type+">"};return e.call(this,n,r,a,t)||this}return r(a,e),a.prototype.getSignatureType=function(){return this._destination.getSignature(!1)},a.prototype.getSignature=function(e){return this._destination.getSignature(e)},a.prototype.getDefaultValue=function(){return this._destination.getDefaultValue()},a}(t(19745).AbstractPointerDataType);a.PointerDataType=c},46990:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var c=t(59004),n=t(69354),d=t(763),o=t(24731),f=t(28845),i=function(e){function a(t,r){var c=e.call(this,t,r,a._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!a.matchType(t.type))throw new Error("Tried to instantiate Static Bytes with bad input: "+t);return c._width=a._decodeWidthFromType(t.type),c}return r(a,e),a.matchType=function(e){return a._MATCHER.test(e)},a._decodeWidthFromType=function(e){var t=a._MATCHER.exec(e);return null!==t&&3===t.length&&void 0!==t[2]?parseInt(t[2],f.constants.DEC_BASE):a._DEFAULT_WIDTH},a.prototype.getSignatureType=function(){return""+c.SolidityTypes.Bytes+this._width},a.prototype.encodeValue=function(e){this._sanityCheckValue(e);var a=n.toBuffer(e);return n.setLengthRight(a,f.constants.EVM_WORD_WIDTH_IN_BYTES)},a.prototype.decodeValue=function(e){var a=e.popWord().slice(0,this._width),t=n.bufferToHex(a);return this._sanityCheckValue(t),t},a.prototype.getDefaultValue=function(){var e=f.constants.EMPTY_EVM_WORD_BUFFER.slice(0,this._width);return n.bufferToHex(e)},a.prototype._sanityCheckValue=function(e){if("string"===typeof e){if(!d.startsWith(e,"0x"))throw new Error("Tried to encode non-hex value. Value must include '0x' prefix.");if(e.length%2!==0)throw new Error("Tried to assign "+e+", which is contains a half-byte. Use full bytes only.")}var a=n.toBuffer(e);if(a.byteLength>this._width)throw new Error("Tried to assign "+e+" ("+a.byteLength+" bytes), which exceeds max bytes that can be stored in a "+this.getSignature())},a._SIZE_KNOWN_AT_COMPILE_TIME=!0,a._MATCHER=RegExp("^(byte|bytes(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32))$"),a._DEFAULT_WIDTH=1,a}(o.AbstractBlobDataType);a.StaticBytesDataType=i},99377:function(e,a,t){"use strict";var r=t(19778).Buffer,c=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var n=t(59004),d=t(69354),o=t(24731),f=t(28845),i=function(e){function a(t,r){var c=e.call(this,t,r,a._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!a.matchType(t.type))throw new Error("Tried to instantiate String with bad input: "+t);return c}return c(a,e),a.matchType=function(e){return e===n.SolidityTypes.String},a.prototype.encodeValue=function(e){var a=new r(e),t=a.byteLength,c=Math.ceil(t/f.constants.EVM_WORD_WIDTH_IN_BYTES)*f.constants.EVM_WORD_WIDTH_IN_BYTES,n=d.setLengthRight(a,c),o=d.toBuffer(t),i=d.setLengthLeft(o,f.constants.EVM_WORD_WIDTH_IN_BYTES);return r.concat([i,n])},a.prototype.decodeValue=function(e){var a=e.popWord(),t=d.bufferToHex(a),r=parseInt(t,f.constants.HEX_BASE),c=Math.ceil(r/f.constants.EVM_WORD_WIDTH_IN_BYTES);return e.popWords(c).slice(0,r).toString("UTF-8")},a.prototype.getDefaultValue=function(){return a._DEFAULT_VALUE},a.prototype.getSignatureType=function(){return n.SolidityTypes.String},a._SIZE_KNOWN_AT_COMPILE_TIME=!1,a._DEFAULT_VALUE="",a}(o.AbstractBlobDataType);a.StringDataType=i},12664:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var c=t(59004),n=t(763),d=function(e){function a(t,r){var c=e.call(this,t,r)||this;if(!a.matchType(t.type))throw new Error("Tried to instantiate Tuple with bad input: "+t);return c}return r(a,e),a.matchType=function(e){return e===c.SolidityTypes.Tuple},a.prototype.getSignatureType=function(){return this._computeSignatureOfMembers(!1)},a.prototype.getSignature=function(e){if(n.isEmpty(this.getDataItem().name)||!e)return this.getSignatureType();var a=this.getDataItem().name,t=a.lastIndexOf(".");return(void 0!==t&&t>0?a.substr(t+1):a)+" "+this._computeSignatureOfMembers(e)},a}(t(46286).AbstractSetDataType);a.TupleDataType=d},27473:function(e,a,t){"use strict";var r=this&&this.__extends||function(){var e=function(a,t){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},e(a,t)};return function(a,t){function r(){this.constructor=a}e(a,t),a.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}}();Object.defineProperty(a,"__esModule",{value:!0});var c=t(59004),n=t(94869),d=t(24731),o=t(28845),f=t(43901),i=function(e){function a(t,r){var c=e.call(this,t,r,a._SIZE_KNOWN_AT_COMPILE_TIME)||this;if(!a.matchType(t.type))throw new Error("Tried to instantiate UInt with bad input: "+t);return c._width=a._decodeWidthFromType(t.type),c._maxValue=new n.BigNumber(2).exponentiatedBy(c._width).minus(1),c}return r(a,e),a.matchType=function(e){return a._MATCHER.test(e)},a._decodeWidthFromType=function(e){var t=a._MATCHER.exec(e);return null!==t&&2===t.length&&void 0!==t[1]?parseInt(t[1],o.constants.DEC_BASE):a._DEFAULT_WIDTH},a.prototype.encodeValue=function(e){return f.safeEncodeNumericValue(e,a._MIN_VALUE,this._maxValue)},a.prototype.decodeValue=function(e){var t=e.popWord(),r=f.safeDecodeNumericValue(t,a._MIN_VALUE,this._maxValue);return this._width===o.constants.NUMBER_OF_BYTES_IN_UINT8?r.toNumber():r},a.prototype.getDefaultValue=function(){var e=a._DEFAULT_VALUE;return this._width===o.constants.NUMBER_OF_BYTES_IN_UINT8?e.toNumber():e},a.prototype.getSignatureType=function(){return""+c.SolidityTypes.Uint+this._width},a._MATCHER=RegExp("^uint(8|16|24|32|40|48|56|64|72|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256){0,1}$"),a._SIZE_KNOWN_AT_COMPILE_TIME=!0,a._MAX_WIDTH=256,a._DEFAULT_WIDTH=a._MAX_WIDTH,a._MIN_VALUE=new n.BigNumber(0),a._DEFAULT_VALUE=new n.BigNumber(0),a}(d.AbstractBlobDataType);a.UIntDataType=i},48494:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(37336);a.Address=r.Address,a.Array=r.Array,a.Bool=r.Bool,a.DynamicBytes=r.DynamicBytes,a.Int=r.Int,a.Method=r.Method,a.Pointer=r.Pointer,a.StaticBytes=r.StaticBytes,a.String=r.String,a.Tuple=r.Tuple,a.UInt=r.UInt,a.create=r.create,a.createMethod=r.createMethod;var c=t(98788);a.DataType=c.DataType},28845:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(69354);a.constants={EVM_WORD_WIDTH_IN_BYTES:32,EVM_WORD_WIDTH_IN_BITS:256,HEX_BASE:16,DEC_BASE:10,BIN_BASE:2,HEX_SELECTOR_LENGTH_IN_CHARS:10,HEX_SELECTOR_LENGTH_IN_BYTES:4,HEX_SELECTOR_BYTE_OFFSET_IN_CALLDATA:0,DEFAULT_DECODING_RULES:{shouldConvertStructsToObjects:!0},DEFAULT_ENCODING_RULES:{shouldOptimize:!0,shouldAnnotate:!1},EMPTY_EVM_WORD_STRING:"0x0000000000000000000000000000000000000000000000000000000000000000",EMPTY_EVM_WORD_BUFFER:r.toBuffer("0x0000000000000000000000000000000000000000000000000000000000000000"),NUMBER_OF_BYTES_IN_UINT8:8,NUMBER_OF_BYTES_IN_INT8:8}},43901:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(69354),c=t(763),n=t(94869),d=t(28845);function o(e,a,t){var r=new n.BigNumber(e,10);if(r.isGreaterThan(t))throw new Error("Tried to assign value of "+r+", which exceeds max value of "+t);if(r.isLessThan(a))throw new Error("Tried to assign value of "+r+", which exceeds min value of "+a);if(r.isNaN())throw new Error("Tried to assign NaN value")}function f(e){var a="0x"+e.toString(d.constants.HEX_BASE),t=r.toBuffer(a);return r.setLengthLeft(t,d.constants.EVM_WORD_WIDTH_IN_BYTES)}function i(e){var a=new n.BigNumber(e,10);if(a.isGreaterThanOrEqualTo(0))return f(a);var t=a.times(-1).toString(d.constants.BIN_BASE),r="1".repeat(d.constants.EVM_WORD_WIDTH_IN_BITS-t.length);return c.each(t,(function(e){r+="1"===e?"0":"1"})),f(new n.BigNumber(r,d.constants.BIN_BASE).plus(1))}function s(e,a){var t=r.bufferToHex(e),o=new n.BigNumber(t,d.constants.HEX_BASE);if(!a.isLessThan(0))return o;var f=o.toString(d.constants.BIN_BASE);if(!(f.length===d.constants.EVM_WORD_WIDTH_IN_BITS&&c.startsWith(f[0],"1")))return o;var i="";return c.each(f,(function(e){i+="1"===e?"0":"1"})),new n.BigNumber(i,d.constants.BIN_BASE).plus(1).times(-1)}a.encodeNumericValue=i,a.safeEncodeNumericValue=function(e,a,t){return o(e,a,t),i(e)},a.decodeNumericValue=s,a.safeDecodeNumericValue=function(e,a,t){var r=s(e,a);return o(r,a,t),r}},57016:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var t=function(){function e(){this._store=[]}return e.prototype.pushBack=function(e){this._store.push(e)},e.prototype.pushFront=function(e){this._store.unshift(e)},e.prototype.popFront=function(){return this._store.shift()},e.prototype.popBack=function(){if(0!==this._store.length)return this._store.splice(-1,1)[0]},e.prototype.mergeBack=function(e){this._store=this._store.concat(e._store)},e.prototype.mergeFront=function(e){this._store=e._store.concat(this._store)},e.prototype.getStore=function(){return this._store},e.prototype.peekFront=function(){return this._store.length>=0?this._store[0]:void 0},e}();a.Queue=t},57505:function(e,a,t){"use strict";var r=this&&this.__values||function(e){var a="function"===typeof Symbol&&e[Symbol.iterator],t=0;return a?a.call(e):{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}};Object.defineProperty(a,"__esModule",{value:!0});var c=t(763);function n(e){var a=[];c.each(e.children,(function(e){var t=n(e);a.push(t)}));var t={name:e.name,type:e.value};return c.isEmpty(a)||(t.components=a),t}a.generateDataItemFromSignature=function(e){var a,t;if(c.isEmpty(e))throw new Error("Cannot parse data item from empty signature, ''");var d={name:"",value:"",children:[]};try{for(var o=r(e),f=o.next();!f.done;f=o.next()){var i=f.value;switch(i){case"(":var s={name:"",value:"",children:[],parent:d};d.value="tuple",d.children.push(s),d=s;break;case")":d=d.parent;break;case",":var b={name:"",value:"",children:[],parent:d.parent};d.parent.children.push(b),d=b;break;case" ":d.name=d.value,d.value="";break;default:d.value+=i}}}catch(l){a={error:l}}finally{try{f&&!f.done&&(t=o.return)&&t.call(o)}finally{if(a)throw a.error}}return n(d)}},5135:function(e,a,t){"use strict";var r=this&&this.__values||function(e){var a="function"===typeof Symbol&&e[Symbol.iterator],t=0;return a?a.call(e):{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}};Object.defineProperty(a,"__esModule",{value:!0});var c=t(59004),n=t(763),d=t(94869);function o(e){var a,t;if(n.endsWith(e,"[]"))throw new Error("Internal error: array types are not supported");if(!n.startsWith(e,"tuple("))throw new Error("Internal error: expected tuple type but got non-tuple type: "+e);var c=e.substring("tuple(".length,e.length-1),d=[],o="",f=0;try{for(var i=r(c),s=i.next();!s.done;s=i.next()){var b=s.value;switch(b){case"(":f+=1,o+=b;break;case")":f-=1,o+=b;break;case",":if(0===f){d.push(o),o="";break}o+=b;break;default:o+=b}}}catch(l){a={error:l}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(a)throw a.error}}return d.push(o),d}a.abiUtils={parseEthersParams:function e(a){var t=[],r=[];return a.forEach((function(a){if(null!=a.components){var c="",n=a.type.indexOf("[");n>=0&&(c=a.type.substring(n));var d=e(a.components);t.push({name:a.name||null,names:d.names}),r.push("tuple("+d.types.join(",")+")"+c)}else t.push(a.name||null),r.push(a.type)})),{names:t,types:r}},isAbiDataEqual:function e(a,t,r,c){if(void 0===r&&void 0===c)return!0;if(void 0===r&&void 0!==c)return!1;if(void 0!==r&&void 0===c)return!1;if(n.endsWith(t,"[]")){if(r.length!==c.length)return!1;for(var f=n.trimEnd(t,"[]"),i=0;i1){var c=t+1,d=""+a.name+c;if(n.findIndex(r,(function(e){return e.name===d}))>=0){var o=a.name;throw new Error("Failed to rename overloaded method '"+o+"' to '"+d+"'. A method with this name already exists.")}a.name=d}}))})),t}}},73151:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(69354),c=t(53828),n=t(763),d=t(37357),o=/^(0x)?[0-9a-f]{40}$/i,f=/^(0x)?([0-9a-f]{40}|[0-9A-F]{40})$/;a.addressUtils={isChecksumAddress:function(e){for(var a=e.replace("0x",""),t=c.keccak256(a.toLowerCase()),r=0;r<40;r++){if(parseInt(t[r],16)>7&&a[r].toUpperCase()!==a[r]||parseInt(t[r],16)<=7&&a[r].toLowerCase()!==a[r])return!1}return!0},isAddress:function(e){return!!o.test(e)&&(!!f.test(e)||a.addressUtils.isChecksumAddress(e))},padZeros:function(e){return r.addHexPrefix(n.padStart(r.stripHexPrefix(e),40,"0"))},generatePseudoRandomAddress:function(){var e=d.generatePseudoRandom256BitNumber();return"0x"+r.sha3(e.toString()).slice(0,20).toString("hex")}}},54527:function(e,a,t){"use strict";var r=this&&this.__values||function(e){var a="function"===typeof Symbol&&e[Symbol.iterator],t=0;return a?a.call(e):{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}};Object.defineProperty(a,"__esModule",{value:!0});var c=t(763);a.classUtils={bindAll:function(e,t,n){var d,o;void 0===t&&(t=["contructor"]);try{for(var f=r(Object.getOwnPropertyNames(e)),i=f.next();!i.done;i=f.next()){var s=i.value,b=e[s];c.includes(t,s)||(c.isFunction(b)?e[s]=b.bind(n||e):c.isObject(b)&&a.classUtils.bindAll(b,t,e))}}catch(l){d={error:l}}finally{try{i&&!i.done&&(o=f.return)&&o.call(f)}finally{if(d)throw d.error}}return e}}},94869:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(17144);if(a.BigNumber=r.BigNumber,r.BigNumber.config({EXPONENTIAL_AT:1e3,DECIMAL_PLACES:78}),t(74969)){var c=t(49639);r.BigNumber.prototype[c.inspect.custom]=function(){return this.toString()}}},95032:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.NULL_BYTES="0x"},3531:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.deleteNestedProperty=function(e,a){if(e&&a){for(var t=a.split("."),r=e,c=0;c0;)delete r[t.pop()]}}},48994:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.errorUtils={spawnSwitchErr:function(e,a){return new Error("Unexpected switch value: "+a+" encountered for "+e)}}},83981:function(e,a,t){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var a,t=1,r=arguments.length;t0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d},n=this&&this.__spread||function(){for(var e=[],a=0;a0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d},n=this&&this.__spread||function(){for(var e=[],a=0;a=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}};Object.defineProperty(a,"__esModule",{value:!0});var n=t(69354),d=t(46105),o=t(94869);a.signTypedDataUtils={generateTypedDataHash:function(e){return n.sha3(r.concat([r.from("1901","hex"),a.signTypedDataUtils._structHash("EIP712Domain",e.domain,e.types),a.signTypedDataUtils._structHash(e.primaryType,e.message,e.types)]))},_findDependencies:function(e,t,r){var n,d,o,f;if(void 0===r&&(r=[]),r.includes(e)||void 0===t[e])return r;r.push(e);try{for(var i=c(t[e]),s=i.next();!s.done;s=i.next()){var b=s.value;try{for(var l=c(a.signTypedDataUtils._findDependencies(b.type,t,r)),u=l.next();!u.done;u=l.next()){var h=u.value;r.includes(h)||r.push(h)}}catch(x){o={error:x}}finally{try{u&&!u.done&&(f=l.return)&&f.call(l)}finally{if(o)throw o.error}}}}catch(p){n={error:p}}finally{try{s&&!s.done&&(d=i.return)&&d.call(i)}finally{if(n)throw n.error}}return r},_encodeType:function(e,t){var r,n,d=a.signTypedDataUtils._findDependencies(e,t);d=d.filter((function(a){return a!==e})),d=[e].concat(d.sort());var o="";try{for(var f=c(d),i=f.next();!i.done;i=f.next()){var s=i.value;o+=s+"("+t[s].map((function(e){var a=e.name;return e.type+" "+a})).join(",")+")"}}catch(b){r={error:b}}finally{try{i&&!i.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}return o},_encodeData:function(e,t,r){var o,f,i=["bytes32"],s=[a.signTypedDataUtils._typeHash(e,r)];try{for(var b=c(r[e]),l=b.next();!l.done;l=b.next()){var u=l.value,h=t[u.name];if("string"===u.type||"bytes"===u.type){var x=n.sha3(h);i.push("bytes32"),s.push(x)}else if(void 0!==r[u.type]){i.push("bytes32");x=n.sha3(a.signTypedDataUtils._encodeData(u.type,h,r));s.push(x)}else{if(u.type.lastIndexOf("]")===u.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");i.push(u.type);var p=a.signTypedDataUtils._normalizeValue(u.type,h);s.push(p)}}}catch(m){o={error:m}}finally{try{l&&!l.done&&(f=b.return)&&f.call(b)}finally{if(o)throw o.error}}return d.utils.defaultAbiCoder.encode(i,s)},_normalizeValue:function(e,a){return"uint256"===e&&o.BigNumber.isBigNumber(a)?a.toString():a},_typeHash:function(e,t){return n.sha3(a.signTypedDataUtils._encodeType(e,t))},_structHash:function(e,t,r){return n.sha3(a.signTypedDataUtils._encodeData(e,t,r))}}},69354:function(e,a,t){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=t(7285),n=c.keccak224,d=c.keccak384,o=c.keccak256,f=c.keccak512,i=t(12399),s=t(88093),b=t(76445),l=t(80518),u=t(83569),h=t(82543).Buffer;Object.assign(a,t(28810)),a.MAX_INTEGER=new l("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16),a.TWO_POW256=new l("10000000000000000000000000000000000000000000000000000000000000000",16),a.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",a.SHA3_NULL_S=a.KECCAK256_NULL_S,a.KECCAK256_NULL=h.from(a.KECCAK256_NULL_S,"hex"),a.SHA3_NULL=a.KECCAK256_NULL,a.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",a.SHA3_RLP_ARRAY_S=a.KECCAK256_RLP_ARRAY_S,a.KECCAK256_RLP_ARRAY=h.from(a.KECCAK256_RLP_ARRAY_S,"hex"),a.SHA3_RLP_ARRAY=a.KECCAK256_RLP_ARRAY,a.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",a.SHA3_RLP_S=a.KECCAK256_RLP_S,a.KECCAK256_RLP=h.from(a.KECCAK256_RLP_S,"hex"),a.SHA3_RLP=a.KECCAK256_RLP,a.BN=l,a.rlp=b,a.secp256k1=i,a.zeros=function(e){return h.allocUnsafe(e).fill(0)},a.zeroAddress=function(){var e=a.zeros(20);return a.bufferToHex(e)},a.setLengthLeft=a.setLength=function(e,t,r){var c=a.zeros(t);return e=a.toBuffer(e),r?e.length0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},a.toBuffer=function(e){if(!h.isBuffer(e))if(Array.isArray(e))e=h.from(e);else if("string"===typeof e)e=a.isHexString(e)?h.from(a.padToEven(a.stripHexPrefix(e)),"hex"):h.from(e);else if("number"===typeof e)e=a.intToBuffer(e);else if(null===e||void 0===e)e=h.allocUnsafe(0);else if(l.isBN(e))e=e.toArrayLike(h);else{if(!e.toArray)throw new Error("invalid type");e=h.from(e.toArray())}return e},a.bufferToInt=function(e){return new l(a.toBuffer(e)).toNumber()},a.bufferToHex=function(e){return"0x"+(e=a.toBuffer(e)).toString("hex")},a.fromSigned=function(e){return new l(e).fromTwos(256)},a.toUnsigned=function(e){return h.from(e.toTwos(256).toArray())},a.keccak=function(e,t){switch(e=a.toBuffer(e),t||(t=256),t){case 224:return n(e);case 256:return o(e);case 384:return d(e);case 512:return f(e);default:throw new Error("Invald algorithm: keccak"+t)}},a.keccak256=function(e){return a.keccak(e)},a.sha3=a.keccak,a.sha256=function(e){return e=a.toBuffer(e),u("sha256").update(e).digest()},a.ripemd160=function(e,t){e=a.toBuffer(e);var r=u("rmd160").update(e).digest();return!0===t?a.setLength(r,32):r},a.rlphash=function(e){return a.keccak(b.encode(e))},a.isValidPrivate=function(e){return i.privateKeyVerify(e)},a.isValidPublic=function(e,a){return 64===e.length?i.publicKeyVerify(h.concat([h.from([4]),e])):!!a&&i.publicKeyVerify(e)},a.pubToAddress=a.publicToAddress=function(e,t){return e=a.toBuffer(e),t&&64!==e.length&&(e=i.publicKeyConvert(e,!1).slice(1)),s(64===e.length),a.keccak(e).slice(-20)};var x=a.privateToPublic=function(e){return e=a.toBuffer(e),i.publicKeyCreate(e,!1).slice(1)};a.importPublic=function(e){return 64!==(e=a.toBuffer(e)).length&&(e=i.publicKeyConvert(e,!1).slice(1)),e},a.ecsign=function(e,a){var t=i.sign(e,a),r={};return r.r=t.signature.slice(0,32),r.s=t.signature.slice(32,64),r.v=t.recovery+27,r},a.hashPersonalMessage=function(e){var t=a.toBuffer("\x19Ethereum Signed Message:\n"+e.length.toString());return a.keccak(h.concat([t,e]))},a.ecrecover=function(e,t,r,c){var n=h.concat([a.setLength(r,32),a.setLength(c,32)],64),d=t-27;if(0!==d&&1!==d)throw new Error("Invalid signature v value");var o=i.recover(e,n,d);return i.publicKeyConvert(o,!1).slice(1)},a.toRpcSig=function(e,t,r){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return a.bufferToHex(h.concat([a.setLengthLeft(t,32),a.setLengthLeft(r,32),a.toBuffer(e-27)]))},a.fromRpcSig=function(e){if(65!==(e=a.toBuffer(e)).length)throw new Error("Invalid signature length");var t=e[64];return t<27&&(t+=27),{v:t,r:e.slice(0,32),s:e.slice(32,64)}},a.privateToAddress=function(e){return a.publicToAddress(x(e))},a.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},a.isZeroAddress=function(e){return a.zeroAddress()===a.addHexPrefix(e)},a.toChecksumAddress=function(e){e=a.stripHexPrefix(e).toLowerCase();for(var t=a.keccak(e).toString("hex"),r="0x",c=0;c=8?r+=e[c].toUpperCase():r+=e[c];return r},a.isValidChecksumAddress=function(e){return a.isValidAddress(e)&&a.toChecksumAddress(e)===e},a.generateAddress=function(e,t){return e=a.toBuffer(e),t=(t=new l(t)).isZero()?null:h.from(t.toArray()),a.rlphash([e,t]).slice(-20)},a.isPrecompiled=function(e){var t=a.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},a.addHexPrefix=function(e){return"string"!==typeof e||a.isHexPrefixed(e)?e:"0x"+e},a.isValidSignature=function(e,a,t,r){var c=new l("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),n=new l("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===a.length&&32===t.length&&((27===e||28===e)&&(a=new l(a),t=new l(t),!(a.isZero()||a.gt(n)||t.isZero()||t.gt(n))&&(!1!==r||1!==new l(t).cmp(c))))},a.baToJSON=function(e){if(h.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var t=[],r=0;r=c.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===c.length||!t.length||s(t.length===c.length,"The field "+t.name+" must have byte length of "+t.length),e.raw[r]=c}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:c,set:n}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:n,get:c})})),c)if("string"===typeof c&&(c=h.from(a.stripHexPrefix(c),"hex")),h.isBuffer(c)&&(c=b.decode(c)),Array.isArray(c)){if(c.length>e._fields.length)throw new Error("wrong number of fields in data");c.forEach((function(t,r){e[e._fields[r]]=a.toBuffer(t)}))}else{if("object"!==("undefined"===typeof c?"undefined":r(c)))throw new Error("invalid data");var n=Object.keys(c);t.forEach((function(a){-1!==n.indexOf(a.name)&&(e[a.name]=c[a.name]),-1!==n.indexOf(a.alias)&&(e[a.alias]=c[a.alias])}))}}},12399:function(e,a,t){"use strict";var r=t(19778).Buffer,c=t(30013),n=t(67461),d=t(50298),o=function(e){return 32===e.length&&c.privateKeyVerify(Uint8Array.from(e))};e.exports={privateKeyVerify:o,privateKeyExport:function(e,a){if(32!==e.length)throw new RangeError("private key length is invalid");var t=n.privateKeyExport(e,a);return d.privateKeyExport(e,t,a)},privateKeyImport:function(e){if(null!==(e=d.privateKeyImport(e))&&32===e.length&&o(e))return e;throw new Error("couldn't import from DER format")},privateKeyNegate:function(e){return r.from(c.privateKeyNegate(Uint8Array.from(e)))},privateKeyModInverse:function(e){if(32!==e.length)throw new Error("private key length is invalid");return r.from(n.privateKeyModInverse(Uint8Array.from(e)))},privateKeyTweakAdd:function(e,a){return r.from(c.privateKeyTweakAdd(Uint8Array.from(e),a))},privateKeyTweakMul:function(e,a){return r.from(c.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(a)))},publicKeyCreate:function(e,a){return r.from(c.publicKeyCreate(Uint8Array.from(e),a))},publicKeyConvert:function(e,a){return r.from(c.publicKeyConvert(Uint8Array.from(e),a))},publicKeyVerify:function(e){return(33===e.length||65===e.length)&&c.publicKeyVerify(Uint8Array.from(e))},publicKeyTweakAdd:function(e,a,t){return r.from(c.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(a),t))},publicKeyTweakMul:function(e,a,t){return r.from(c.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(a),t))},publicKeyCombine:function(e,a){var t=[];return e.forEach((function(e){t.push(Uint8Array.from(e))})),r.from(c.publicKeyCombine(t,a))},signatureNormalize:function(e){return r.from(c.signatureNormalize(Uint8Array.from(e)))},signatureExport:function(e){return r.from(c.signatureExport(Uint8Array.from(e)))},signatureImport:function(e){return r.from(c.signatureImport(Uint8Array.from(e)))},signatureImportLax:function(e){if(0===e.length)throw new RangeError("signature length is invalid");var a=d.signatureImportLax(e);if(null===a)throw new Error("couldn't parse DER signature");return n.signatureImport(a)},sign:function(e,a,t){if(null===t)throw new TypeError("options should be an Object");var n=void 0;if(t){if(n={},null===t.data)throw new TypeError("options.data should be a Buffer");if(t.data){if(32!==t.data.length)throw new RangeError("options.data length is invalid");n.data=new Uint8Array(t.data)}if(null===t.noncefn)throw new TypeError("options.noncefn should be a Function");t.noncefn&&(n.noncefn=function(e,a,c,n,d){var o=null!=c?r.from(c):null,f=null!=n?r.from(n):null,i=r.from("");return t.noncefn&&(i=t.noncefn(r.from(e),r.from(a),o,f,d)),Uint8Array.from(i)})}var d=c.ecdsaSign(Uint8Array.from(e),Uint8Array.from(a),n);return{signature:r.from(d.signature),recovery:d.recid}},verify:function(e,a,t){return c.ecdsaVerify(Uint8Array.from(a),Uint8Array.from(e),t)},recover:function(e,a,t,n){return r.from(c.ecdsaRecover(Uint8Array.from(a),t,Uint8Array.from(e),n))},ecdh:function(e,a){return r.from(c.ecdh(Uint8Array.from(e),Uint8Array.from(a),{}))},ecdhUnsafe:function(e,a,t){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==a.length)throw new RangeError("private key length is invalid");return r.from(n.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(a),t))}}},50298:function(e,a,t){"use strict";var r=t(19778).Buffer,c=r.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n=r.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a.privateKeyExport=function(e,a,t){var d=r.from(t?c:n);return e.copy(d,t?8:9),a.copy(d,t?181:214),d},a.privateKeyImport=function(e){var a=e.length,t=0;if(a2)return null;if(a<(t+=1)+r)return null;var c=e[t+r-1]|(r>1?e[t+r-2]<<8:0);return a<(t+=r)+c||a32||ac)return null;if(2!==e[n++])return null;var o=e[n++];if(128&o){if(n+(d=o-128)>c)return null;for(;d>0&&0===e[n];n+=1,d-=1);for(o=0;d>0;n+=1,d-=1)o=(o<<8)+e[n]}if(o>c-n)return null;var f=n;if(n+=o,2!==e[n++])return null;var i=e[n++];if(128&i){if(n+(d=i-128)>c)return null;for(;d>0&&0===e[n];n+=1,d-=1);for(i=0;d>0;n+=1,d-=1)i=(i<<8)+e[n]}if(i>c-n)return null;var s=n;for(n+=i;o>0&&0===e[f];o-=1,f+=1);if(o>32)return null;var b=e.slice(f,f+o);for(b.copy(a,32-b.length);i>0&&0===e[s];i-=1,s+=1);if(i>32)return null;var l=e.slice(s,s+i);return l.copy(t,32-l.length),{r:a,s:t}}},67461:function(e,a,t){"use strict";var r=t(19778).Buffer,c=t(80518),n=new(0,t(6289).ec)("secp256k1"),d=n.curve;a.privateKeyExport=function(e,a){var t=new c(e);if(t.ucmp(d.n)>=0)throw new Error("couldn't export to DER format");var r=n.g.mul(t);return o(r.getX(),r.getY(),a)},a.privateKeyModInverse=function(e){var a=new c(e);if(a.ucmp(d.n)>=0||a.isZero())throw new Error("private key range is invalid");return a.invm(d.n).toArrayLike(r,"be",32)},a.signatureImport=function(e){var a=new c(e.r);a.ucmp(d.n)>=0&&(a=new c(0));var t=new c(e.s);return t.ucmp(d.n)>=0&&(t=new c(0)),r.concat([a.toArrayLike(r,"be",32),t.toArrayLike(r,"be",32)])},a.ecdhUnsafe=function(e,a,t){var r=n.keyFromPublic(e),f=new c(a);if(f.ucmp(d.n)>=0||f.isZero())throw new Error("scalar was invalid (zero or overflow)");var i=r.pub.mul(f);return o(i.getX(),i.getY(),t)};var o=function(e,a,t){var c=void 0;return t?((c=r.alloc(33))[0]=a.isOdd()?3:2,e.toArrayLike(r,"be",32).copy(c,1)):((c=r.alloc(65))[0]=4,e.toArrayLike(r,"be",32).copy(c,1),a.toArrayLike(r,"be",32).copy(c,33)),c}},46105:function(e,a,t){var r;e.exports=function e(a,c,n){function d(f,i){if(!c[f]){if(!a[f]){var s=void 0;if(!i&&s)return r(f,!0);if(o)return o(f,!0);throw(s=new Error("Cannot find module '"+f+"'")).code="MODULE_NOT_FOUND",t(20364)}s=c[f]={exports:{}},a[f][0].call(s.exports,(function(e){return d(a[f][1][e]||e)}),s,s.exports,e,a,c,n)}return c[f].exports}for(var o=void 0,f=0;fo[e]||console.log.apply(console,a)}function s(){for(var e=[],a=0;a>4]+f[15&r])}return a.join("")}}),b={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],u=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],x=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],v=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],y=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],k=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],I=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],_=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],N=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function H(e){for(var a=[],t=0;t>2][a%4]=n[a],this._Kd[e-t][a%4]=n[a];for(var d,o=0,f=c;f>16&255]<<24^u[d>>8&255]<<16^u[255&d]<<8^u[d>>24&255]^l[o]<<24,o+=1,8!=c)for(a=1;a>8&255]<<8^u[d>>16&255]<<16^u[d>>24&255]<<24,a=c/2+1;a>2][s=f%4]=n[a],this._Kd[e-i][s]=n[a++],f++}for(var i=1;i>24&255]^_[d>>16&255]^E[d>>8&255]^N[255&d]},S.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var a=this._Ke.length-1,t=[0,0,0,0],r=H(e),c=0;c<4;c++)r[c]^=this._Ke[0][c];for(var n=1;n>24&255]^p[r[(c+1)%4]>>16&255]^m[r[(c+2)%4]>>8&255]^v[255&r[(c+3)%4]]^this._Ke[n][c];r=t.slice()}var o,f=d(16);for(c=0;c<4;c++)o=this._Ke[a][c],f[4*c]=255&(u[r[c]>>24&255]^o>>24),f[4*c+1]=255&(u[r[(c+1)%4]>>16&255]^o>>16),f[4*c+2]=255&(u[r[(c+2)%4]>>8&255]^o>>8),f[4*c+3]=255&(u[255&r[(c+3)%4]]^o);return f},S.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var a=this._Kd.length-1,t=[0,0,0,0],r=H(e),c=0;c<4;c++)r[c]^=this._Kd[0][c];for(var n=1;n>24&255]^y[r[(c+3)%4]>>16&255]^k[r[(c+2)%4]>>8&255]^w[255&r[(c+1)%4]]^this._Kd[n][c];r=t.slice()}var o,f=d(16);for(c=0;c<4;c++)o=this._Kd[a][c],f[4*c]=255&(h[r[c]>>24&255]^o>>24),f[4*c+1]=255&(h[r[(c+3)%4]>>16&255]^o>>16),f[4*c+2]=255&(h[r[(c+2)%4]>>8&255]^o>>8),f[4*c+3]=255&(h[255&r[(c+1)%4]]^o);return f};var A=function e(a){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new S(a)};A.prototype.encrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var a=d(e.length),t=d(16),r=0;r>=8},O.prototype.setBytes=function(e){if(16!=(e=n(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},O.prototype.increment=function(){for(var e=15;0<=e;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var C=function e(a,t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof O||(t=new O(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new S(a)};C.prototype.encrypt=function(e){for(var a=n(e,!0),t=0;t>>26-o&67108863,26<=(o+=24)&&(o-=26,c++);else if("le"===t)for(c=d=0;d>>26-o&67108863,26<=(o+=24)&&(o-=26,c++);return this.strip()},n.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var r=0;r>>26):n+=8;else for(r=(e.length-a)%2==0?a+1:a;r>>26):n+=8;this.strip()},n.prototype._parseBase=function(e,a,t){this.words=[0];for(var r=0,c=this.length=1;c<=67108863;c*=a)r++;c=c/a|0;for(var n=e.length-t,d=n%--r,o=Math.min(n,n-d)+t,f=0,s=t;s"};var s=["","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"],b=[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],l=[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 u(e,a,t){t.negative=a.negative^e.negative;var r=e.length+a.length|0,c=(r=(t.length=r)-1|0,(d=(0|e.words[0])*(0|a.words[0]))/67108864|0);t.words[0]=67108863&d;for(var n=1;n>>26,f=67108863&c,i=Math.min(n,a.length-1),s=Math.max(0,n-e.length+1);s<=i;s++)o+=(d=(0|e.words[n-s|0])*(0|a.words[s])+f)/67108864|0,f=67108863&d;t.words[n]=0|f,c=0|o}return 0!==c?t.words[n]=0|c:t.length--,t.strip()}n.prototype.toString=function(e,a){if(a=0|a||1,16===(e=e||10)||"hex"===e){f="";for(var t=0,c=0,n=0;n>>24-t&16777215)||n!==this.length-1?s[6-o.length]+o+f:o+f;26<=(t+=2)&&(t-=26,n--)}for(0!==c&&(f=c.toString(16)+f);f.length%a!=0;)f="0"+f;return 0!==this.negative?"-"+f:f}if(e===(0|e)&&2<=e&&e<=36){var i=b[e],u=l[e];for(f="",(h=this.clone()).negative=0;!h.isZero();){var h,x=h.modn(u).toString(e);f=(h=h.idivn(u)).isZero()?x+f:s[i-x.length]+x+f}for(this.isZero()&&(f="0"+f);f.length%a!=0;)f="0"+f;return 0!==this.negative?"-"+f:f}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2>>=13),64<=a&&(e+=7,a>>>=7),8<=a&&(e+=4,a>>>=4),2<=a&&(e+=2,a>>>=2),e+a},n.prototype._zeroBits=function(e){if(0===e)return 26;var a=e;return e=0,0==(8191&a)&&(e+=13,a>>>=13),0==(127&a)&&(e+=7,a>>>=7),0==(15&a)&&(e+=4,a>>>=4),0==(3&a)&&(e+=2,a>>>=2),0==(1&a)&&e++,e},n.prototype.bitLength=function(){var e=this.words[this.length-1];return e=this._countBits(e),26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){for(var a=this.length>e.length?e:this,t=0;te.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){for(var a,t=this.length>e.length?(a=this,e):(a=e,this),r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&0<=e);var a=0|Math.ceil(e/26);e%=26,this._expand(a),0>26-e),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,a){r("number"==typeof e&&0<=e);var t=e/26|0;return e%=26,this._expand(1+t),this.words[t]=a?this.words[t]|1<e.length?(t=this,e):(t=e,this),c=0,n=0;n>>26;for(;0!==c&&n>>26;if(this.length=t.length,0!==c)this.words[this.length]=c,this.length++;else if(t!==this)for(;ne.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var c=0>26,this.words[d]=67108863&a;for(;0!==n&&d>26,this.words[d]=67108863&a;if(0===n&&d>>13,s=8191&(V=0|n[1]),b=V>>>13,l=8191&(W=0|n[2]),u=W>>>13,h=8191&(r=0|n[3]),x=r>>>13,p=8191&(K=0|n[4]),m=K>>>13,v=8191&(G=0|n[5]),g=G>>>13,y=8191&(c=0|n[6]),k=c>>>13,w=8191&(Y=0|n[7]),I=Y>>>13,_=8191&($=0|n[8]),E=$>>>13,N=8191&(X=0|n[9]),H=X>>>13,S=8191&(J=0|d[0]),A=J>>>13,M=0|d[1],T=8191&M,P=M>>>13,O=0|d[2],C=8191&O,R=O>>>13,D=8191&(Q=0|d[3]),j=Q>>>13,L=0|d[4],B=8191&L,F=L>>>13,Z=0|d[5],U=8191&Z,z=Z>>>13,q=0|d[6],V=8191&q,W=q>>>13,K=8191&(r=0|d[7]),G=r>>>13,Y=8191&(c=0|d[8]),$=c>>>13,X=8191&(n=0|d[9]),J=n>>>13;t.negative=e.negative^a.negative,t.length=19;var Q=(0+Math.imul(f,S)|0)+((8191&(O=(O=Math.imul(f,A))+Math.imul(i,S)|0))<<13)|0,ee=((L=Math.imul(i,A))+(O>>>13)|0)+(Q>>>26)|0;return Q&=67108863,M=Math.imul(s,S),O=(O=Math.imul(s,A))+Math.imul(b,S)|0,L=Math.imul(b,A),Z=(ee+(M+Math.imul(f,T)|0)|0)+((8191&(O=(O=O+Math.imul(f,P)|0)+Math.imul(i,T)|0))<<13)|0,ee=((L=L+Math.imul(i,P)|0)+(O>>>13)|0)+(Z>>>26)|0,Z&=67108863,M=Math.imul(l,S),O=(O=Math.imul(l,A))+Math.imul(u,S)|0,L=Math.imul(u,A),M=M+Math.imul(s,T)|0,O=(O=O+Math.imul(s,P)|0)+Math.imul(b,T)|0,L=L+Math.imul(b,P)|0,q=(ee+(M+Math.imul(f,C)|0)|0)+((8191&(O=(O=O+Math.imul(f,R)|0)+Math.imul(i,C)|0))<<13)|0,ee=((L=L+Math.imul(i,R)|0)+(O>>>13)|0)+(q>>>26)|0,q&=67108863,M=Math.imul(h,S),O=(O=Math.imul(h,A))+Math.imul(x,S)|0,L=Math.imul(x,A),M=M+Math.imul(l,T)|0,O=(O=O+Math.imul(l,P)|0)+Math.imul(u,T)|0,L=L+Math.imul(u,P)|0,M=M+Math.imul(s,C)|0,O=(O=O+Math.imul(s,R)|0)+Math.imul(b,C)|0,L=L+Math.imul(b,R)|0,r=(ee+(M+Math.imul(f,D)|0)|0)+((8191&(O=(O=O+Math.imul(f,j)|0)+Math.imul(i,D)|0))<<13)|0,ee=((L=L+Math.imul(i,j)|0)+(O>>>13)|0)+(r>>>26)|0,r&=67108863,M=Math.imul(p,S),O=(O=Math.imul(p,A))+Math.imul(m,S)|0,L=Math.imul(m,A),M=M+Math.imul(h,T)|0,O=(O=O+Math.imul(h,P)|0)+Math.imul(x,T)|0,L=L+Math.imul(x,P)|0,M=M+Math.imul(l,C)|0,O=(O=O+Math.imul(l,R)|0)+Math.imul(u,C)|0,L=L+Math.imul(u,R)|0,M=M+Math.imul(s,D)|0,O=(O=O+Math.imul(s,j)|0)+Math.imul(b,D)|0,L=L+Math.imul(b,j)|0,c=(ee+(M+Math.imul(f,B)|0)|0)+((8191&(O=(O=O+Math.imul(f,F)|0)+Math.imul(i,B)|0))<<13)|0,ee=((L=L+Math.imul(i,F)|0)+(O>>>13)|0)+(c>>>26)|0,c&=67108863,M=Math.imul(v,S),O=(O=Math.imul(v,A))+Math.imul(g,S)|0,L=Math.imul(g,A),M=M+Math.imul(p,T)|0,O=(O=O+Math.imul(p,P)|0)+Math.imul(m,T)|0,L=L+Math.imul(m,P)|0,M=M+Math.imul(h,C)|0,O=(O=O+Math.imul(h,R)|0)+Math.imul(x,C)|0,L=L+Math.imul(x,R)|0,M=M+Math.imul(l,D)|0,O=(O=O+Math.imul(l,j)|0)+Math.imul(u,D)|0,L=L+Math.imul(u,j)|0,M=M+Math.imul(s,B)|0,O=(O=O+Math.imul(s,F)|0)+Math.imul(b,B)|0,L=L+Math.imul(b,F)|0,d=(ee+(M+Math.imul(f,U)|0)|0)+((8191&(O=(O=O+Math.imul(f,z)|0)+Math.imul(i,U)|0))<<13)|0,ee=((L=L+Math.imul(i,z)|0)+(O>>>13)|0)+(d>>>26)|0,d&=67108863,M=Math.imul(y,S),O=(O=Math.imul(y,A))+Math.imul(k,S)|0,L=Math.imul(k,A),M=M+Math.imul(v,T)|0,O=(O=O+Math.imul(v,P)|0)+Math.imul(g,T)|0,L=L+Math.imul(g,P)|0,M=M+Math.imul(p,C)|0,O=(O=O+Math.imul(p,R)|0)+Math.imul(m,C)|0,L=L+Math.imul(m,R)|0,M=M+Math.imul(h,D)|0,O=(O=O+Math.imul(h,j)|0)+Math.imul(x,D)|0,L=L+Math.imul(x,j)|0,M=M+Math.imul(l,B)|0,O=(O=O+Math.imul(l,F)|0)+Math.imul(u,B)|0,L=L+Math.imul(u,F)|0,M=M+Math.imul(s,U)|0,O=(O=O+Math.imul(s,z)|0)+Math.imul(b,U)|0,L=L+Math.imul(b,z)|0,n=(ee+(M+Math.imul(f,V)|0)|0)+((8191&(O=(O=O+Math.imul(f,W)|0)+Math.imul(i,V)|0))<<13)|0,ee=((L=L+Math.imul(i,W)|0)+(O>>>13)|0)+(n>>>26)|0,n&=67108863,M=Math.imul(w,S),O=(O=Math.imul(w,A))+Math.imul(I,S)|0,L=Math.imul(I,A),M=M+Math.imul(y,T)|0,O=(O=O+Math.imul(y,P)|0)+Math.imul(k,T)|0,L=L+Math.imul(k,P)|0,M=M+Math.imul(v,C)|0,O=(O=O+Math.imul(v,R)|0)+Math.imul(g,C)|0,L=L+Math.imul(g,R)|0,M=M+Math.imul(p,D)|0,O=(O=O+Math.imul(p,j)|0)+Math.imul(m,D)|0,L=L+Math.imul(m,j)|0,M=M+Math.imul(h,B)|0,O=(O=O+Math.imul(h,F)|0)+Math.imul(x,B)|0,L=L+Math.imul(x,F)|0,M=M+Math.imul(l,U)|0,O=(O=O+Math.imul(l,z)|0)+Math.imul(u,U)|0,L=L+Math.imul(u,z)|0,M=M+Math.imul(s,V)|0,O=(O=O+Math.imul(s,W)|0)+Math.imul(b,V)|0,L=L+Math.imul(b,W)|0,e=(ee+(M+Math.imul(f,K)|0)|0)+((8191&(O=(O=O+Math.imul(f,G)|0)+Math.imul(i,K)|0))<<13)|0,ee=((L=L+Math.imul(i,G)|0)+(O>>>13)|0)+(e>>>26)|0,e&=67108863,M=Math.imul(_,S),O=(O=Math.imul(_,A))+Math.imul(E,S)|0,L=Math.imul(E,A),M=M+Math.imul(w,T)|0,O=(O=O+Math.imul(w,P)|0)+Math.imul(I,T)|0,L=L+Math.imul(I,P)|0,M=M+Math.imul(y,C)|0,O=(O=O+Math.imul(y,R)|0)+Math.imul(k,C)|0,L=L+Math.imul(k,R)|0,M=M+Math.imul(v,D)|0,O=(O=O+Math.imul(v,j)|0)+Math.imul(g,D)|0,L=L+Math.imul(g,j)|0,M=M+Math.imul(p,B)|0,O=(O=O+Math.imul(p,F)|0)+Math.imul(m,B)|0,L=L+Math.imul(m,F)|0,M=M+Math.imul(h,U)|0,O=(O=O+Math.imul(h,z)|0)+Math.imul(x,U)|0,L=L+Math.imul(x,z)|0,M=M+Math.imul(l,V)|0,O=(O=O+Math.imul(l,W)|0)+Math.imul(u,V)|0,L=L+Math.imul(u,W)|0,M=M+Math.imul(s,K)|0,O=(O=O+Math.imul(s,G)|0)+Math.imul(b,K)|0,L=L+Math.imul(b,G)|0,a=(ee+(M+Math.imul(f,Y)|0)|0)+((8191&(O=(O=O+Math.imul(f,$)|0)+Math.imul(i,Y)|0))<<13)|0,ee=((L=L+Math.imul(i,$)|0)+(O>>>13)|0)+(a>>>26)|0,a&=67108863,M=Math.imul(N,S),O=(O=Math.imul(N,A))+Math.imul(H,S)|0,L=Math.imul(H,A),M=M+Math.imul(_,T)|0,O=(O=O+Math.imul(_,P)|0)+Math.imul(E,T)|0,L=L+Math.imul(E,P)|0,M=M+Math.imul(w,C)|0,O=(O=O+Math.imul(w,R)|0)+Math.imul(I,C)|0,L=L+Math.imul(I,R)|0,M=M+Math.imul(y,D)|0,O=(O=O+Math.imul(y,j)|0)+Math.imul(k,D)|0,L=L+Math.imul(k,j)|0,M=M+Math.imul(v,B)|0,O=(O=O+Math.imul(v,F)|0)+Math.imul(g,B)|0,L=L+Math.imul(g,F)|0,M=M+Math.imul(p,U)|0,O=(O=O+Math.imul(p,z)|0)+Math.imul(m,U)|0,L=L+Math.imul(m,z)|0,M=M+Math.imul(h,V)|0,O=(O=O+Math.imul(h,W)|0)+Math.imul(x,V)|0,L=L+Math.imul(x,W)|0,M=M+Math.imul(l,K)|0,O=(O=O+Math.imul(l,G)|0)+Math.imul(u,K)|0,L=L+Math.imul(u,G)|0,M=M+Math.imul(s,Y)|0,O=(O=O+Math.imul(s,$)|0)+Math.imul(b,Y)|0,L=L+Math.imul(b,$)|0,f=(ee+(M+Math.imul(f,X)|0)|0)+((8191&(O=(O=O+Math.imul(f,J)|0)+Math.imul(i,X)|0))<<13)|0,ee=((L=L+Math.imul(i,J)|0)+(O>>>13)|0)+(f>>>26)|0,f&=67108863,M=Math.imul(N,T),O=(O=Math.imul(N,P))+Math.imul(H,T)|0,L=Math.imul(H,P),M=M+Math.imul(_,C)|0,O=(O=O+Math.imul(_,R)|0)+Math.imul(E,C)|0,L=L+Math.imul(E,R)|0,M=M+Math.imul(w,D)|0,O=(O=O+Math.imul(w,j)|0)+Math.imul(I,D)|0,L=L+Math.imul(I,j)|0,M=M+Math.imul(y,B)|0,O=(O=O+Math.imul(y,F)|0)+Math.imul(k,B)|0,L=L+Math.imul(k,F)|0,M=M+Math.imul(v,U)|0,O=(O=O+Math.imul(v,z)|0)+Math.imul(g,U)|0,L=L+Math.imul(g,z)|0,M=M+Math.imul(p,V)|0,O=(O=O+Math.imul(p,W)|0)+Math.imul(m,V)|0,L=L+Math.imul(m,W)|0,M=M+Math.imul(h,K)|0,O=(O=O+Math.imul(h,G)|0)+Math.imul(x,K)|0,L=L+Math.imul(x,G)|0,M=M+Math.imul(l,Y)|0,O=(O=O+Math.imul(l,$)|0)+Math.imul(u,Y)|0,L=L+Math.imul(u,$)|0,s=(ee+(M+Math.imul(s,X)|0)|0)+((8191&(O=(O=O+Math.imul(s,J)|0)+Math.imul(b,X)|0))<<13)|0,ee=((L=L+Math.imul(b,J)|0)+(O>>>13)|0)+(s>>>26)|0,s&=67108863,M=Math.imul(N,C),O=(O=Math.imul(N,R))+Math.imul(H,C)|0,L=Math.imul(H,R),M=M+Math.imul(_,D)|0,O=(O=O+Math.imul(_,j)|0)+Math.imul(E,D)|0,L=L+Math.imul(E,j)|0,M=M+Math.imul(w,B)|0,O=(O=O+Math.imul(w,F)|0)+Math.imul(I,B)|0,L=L+Math.imul(I,F)|0,M=M+Math.imul(y,U)|0,O=(O=O+Math.imul(y,z)|0)+Math.imul(k,U)|0,L=L+Math.imul(k,z)|0,M=M+Math.imul(v,V)|0,O=(O=O+Math.imul(v,W)|0)+Math.imul(g,V)|0,L=L+Math.imul(g,W)|0,M=M+Math.imul(p,K)|0,O=(O=O+Math.imul(p,G)|0)+Math.imul(m,K)|0,L=L+Math.imul(m,G)|0,M=M+Math.imul(h,Y)|0,O=(O=O+Math.imul(h,$)|0)+Math.imul(x,Y)|0,L=L+Math.imul(x,$)|0,l=(ee+(M+Math.imul(l,X)|0)|0)+((8191&(O=(O=O+Math.imul(l,J)|0)+Math.imul(u,X)|0))<<13)|0,ee=((L=L+Math.imul(u,J)|0)+(O>>>13)|0)+(l>>>26)|0,l&=67108863,M=Math.imul(N,D),O=(O=Math.imul(N,j))+Math.imul(H,D)|0,L=Math.imul(H,j),M=M+Math.imul(_,B)|0,O=(O=O+Math.imul(_,F)|0)+Math.imul(E,B)|0,L=L+Math.imul(E,F)|0,M=M+Math.imul(w,U)|0,O=(O=O+Math.imul(w,z)|0)+Math.imul(I,U)|0,L=L+Math.imul(I,z)|0,M=M+Math.imul(y,V)|0,O=(O=O+Math.imul(y,W)|0)+Math.imul(k,V)|0,L=L+Math.imul(k,W)|0,M=M+Math.imul(v,K)|0,O=(O=O+Math.imul(v,G)|0)+Math.imul(g,K)|0,L=L+Math.imul(g,G)|0,M=M+Math.imul(p,Y)|0,O=(O=O+Math.imul(p,$)|0)+Math.imul(m,Y)|0,L=L+Math.imul(m,$)|0,h=(ee+(M+Math.imul(h,X)|0)|0)+((8191&(O=(O=O+Math.imul(h,J)|0)+Math.imul(x,X)|0))<<13)|0,ee=((L=L+Math.imul(x,J)|0)+(O>>>13)|0)+(h>>>26)|0,h&=67108863,M=Math.imul(N,B),O=(O=Math.imul(N,F))+Math.imul(H,B)|0,L=Math.imul(H,F),M=M+Math.imul(_,U)|0,O=(O=O+Math.imul(_,z)|0)+Math.imul(E,U)|0,L=L+Math.imul(E,z)|0,M=M+Math.imul(w,V)|0,O=(O=O+Math.imul(w,W)|0)+Math.imul(I,V)|0,L=L+Math.imul(I,W)|0,M=M+Math.imul(y,K)|0,O=(O=O+Math.imul(y,G)|0)+Math.imul(k,K)|0,L=L+Math.imul(k,G)|0,M=M+Math.imul(v,Y)|0,O=(O=O+Math.imul(v,$)|0)+Math.imul(g,Y)|0,L=L+Math.imul(g,$)|0,p=(ee+(M+Math.imul(p,X)|0)|0)+((8191&(O=(O=O+Math.imul(p,J)|0)+Math.imul(m,X)|0))<<13)|0,ee=((L=L+Math.imul(m,J)|0)+(O>>>13)|0)+(p>>>26)|0,p&=67108863,M=Math.imul(N,U),O=(O=Math.imul(N,z))+Math.imul(H,U)|0,L=Math.imul(H,z),M=M+Math.imul(_,V)|0,O=(O=O+Math.imul(_,W)|0)+Math.imul(E,V)|0,L=L+Math.imul(E,W)|0,M=M+Math.imul(w,K)|0,O=(O=O+Math.imul(w,G)|0)+Math.imul(I,K)|0,L=L+Math.imul(I,G)|0,M=M+Math.imul(y,Y)|0,O=(O=O+Math.imul(y,$)|0)+Math.imul(k,Y)|0,L=L+Math.imul(k,$)|0,v=(ee+(M+Math.imul(v,X)|0)|0)+((8191&(O=(O=O+Math.imul(v,J)|0)+Math.imul(g,X)|0))<<13)|0,ee=((L=L+Math.imul(g,J)|0)+(O>>>13)|0)+(v>>>26)|0,v&=67108863,M=Math.imul(N,V),O=(O=Math.imul(N,W))+Math.imul(H,V)|0,L=Math.imul(H,W),M=M+Math.imul(_,K)|0,O=(O=O+Math.imul(_,G)|0)+Math.imul(E,K)|0,L=L+Math.imul(E,G)|0,M=M+Math.imul(w,Y)|0,O=(O=O+Math.imul(w,$)|0)+Math.imul(I,Y)|0,L=L+Math.imul(I,$)|0,y=(ee+(M+Math.imul(y,X)|0)|0)+((8191&(O=(O=O+Math.imul(y,J)|0)+Math.imul(k,X)|0))<<13)|0,ee=((L=L+Math.imul(k,J)|0)+(O>>>13)|0)+(y>>>26)|0,y&=67108863,M=Math.imul(N,K),O=(O=Math.imul(N,G))+Math.imul(H,K)|0,L=Math.imul(H,G),M=M+Math.imul(_,Y)|0,O=(O=O+Math.imul(_,$)|0)+Math.imul(E,Y)|0,L=L+Math.imul(E,$)|0,w=(ee+(M+Math.imul(w,X)|0)|0)+((8191&(O=(O=O+Math.imul(w,J)|0)+Math.imul(I,X)|0))<<13)|0,ee=((L=L+Math.imul(I,J)|0)+(O>>>13)|0)+(w>>>26)|0,w&=67108863,M=Math.imul(N,Y),O=(O=Math.imul(N,$))+Math.imul(H,Y)|0,L=Math.imul(H,$),_=(ee+(M+Math.imul(_,X)|0)|0)+((8191&(O=(O=O+Math.imul(_,J)|0)+Math.imul(E,X)|0))<<13)|0,ee=((L=L+Math.imul(E,J)|0)+(O>>>13)|0)+(_>>>26)|0,_&=67108863,X=(ee+Math.imul(N,X)|0)+((8191&(O=(O=Math.imul(N,J))+Math.imul(H,X)|0))<<13)|0,ee=((L=Math.imul(H,J))+(O>>>13)|0)+(X>>>26)|0,X&=67108863,o[0]=Q,o[1]=Z,o[2]=q,o[3]=r,o[4]=c,o[5]=d,o[6]=n,o[7]=e,o[8]=a,o[9]=f,o[10]=s,o[11]=l,o[12]=h,o[13]=p,o[14]=v,o[15]=y,o[16]=w,o[17]=_,o[18]=X,0!=ee&&(o[19]=ee,t.length++),t};function x(e,a,t){return(new p).mulp(e,a,t)}function p(e,a){this.x=e,this.y=a}Math.imul||(h=u),n.prototype.mulTo=function(e,a){var t=this.length+e.length;return a=(10===this.length&&10===e.length?h:t<63?u:t<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var r=0,c=0,n=0;n>>26)|0)>>>26,d&=67108863}t.words[n]=o,r=d,d=c}return 0!==r?t.words[n]=r:t.length--,t.strip()}:x)(this,e,a),a},p.prototype.makeRBT=function(e){for(var a=new Array(e),t=n.prototype._countBits(e)-1,r=0;r>=1;return r},p.prototype.permute=function(e,a,t,r,c,n){for(var d=0;d>>=1)t++;return 1<>>=13),n>>>=13;for(d=2*a;d>=26,a+=c/67108864|0,a+=n>>>26,this.words[t]=67108863&n}return 0!==a&&(this.words[t]=a,this.length++),this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>r}return a}(e);if(0===a.length)return new n(1);for(var t=this,r=0;r>>26-a<<26-a;if(0!=a){for(var n=0,d=0;d>>26-a}n&&(this.words[d]=n,this.length++)}if(0!=t){for(d=this.length-1;0<=d;d--)this.words[d+t]=this.words[d];for(d=0;d>>n<d)for(this.length-=d,i=0;i>>n,s=b&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,a,t){return r(0===this.negative),this.iushrn(e,a,t)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"==typeof e&&0<=e);var a=e%26;return e=(e-a)/26,!(this.length<=e)&&!!(this.words[e]&1<>>a<>26)-(f/67108864|0),this.words[d+t]=67108863&o}for(;d>26,this.words[d+t]=67108863&o;if(0===n)return this.strip();for(r(-1===n),d=n=0;d>26,this.words[d]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,a){var t=this.length-e.length,r=this.clone(),c=e,d=0|c.words[c.length-1];0!=(t=26-this._countBits(d))&&(c=c.ushln(t),r.iushln(t),d=0|c.words[c.length-1]);var o,f=r.length-c.length;if("mod"!==a){(o=new n(null)).length=1+f,o.words=new Array(o.length);for(var i=0;ithis.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,a);var c,d,o},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,r=e.ushrn(1);return e=e.andln(1),(r=t.cmp(r))<0||1===e&&0===r?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},n.prototype.modn=function(e){r(e<=67108863);for(var a=(1<<26)%e,t=0,c=this.length-1;0<=c;c--)t=(a*t+(0|this.words[c]))%e;return t},n.prototype.idivn=function(e){r(e<=67108863);for(var a=0,t=this.length-1;0<=t;t--){var c=(0|this.words[t])+67108864*a;this.words[t]=c/e|0,a=c%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());for(var a=this,t=e.clone(),c=(a=0!==a.negative?a.umod(e):a.clone(),new n(1)),d=new n(0),o=new n(0),f=new n(1),i=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++i;for(var s=t.clone(),b=a.clone();!a.isZero();){for(var l=0,u=1;0==(a.words[0]&u)&&l<26;++l,u<<=1);if(0>>26,n&=67108863,this.words[c]=n}return 0!==t&&(this.words[c]=t,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var a=e<0;return 0===this.negative||a?0===this.negative&&a?1:(this.strip(),e=1e.length)return 1;if(this.lengththis.n;);return 0===(e=a>>22,c=n}0===(e.words[r-10]=c>>>=22)&&10>>=26,e.words[t]=c,a=r}return 0!==a&&(e.words[e.length++]=a),e},n._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new g;else if("p224"===e)a=new y;else if("p192"===e)a=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a},I.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},I.prototype._verify2=function(e,a){r(0==(e.negative|a.negative),"red works only with positives"),r(e.red&&e.red===a.red,"red works only with red numbers")},I.prototype.imod=function(e){return(this.prime?this.prime.ireduce(e):e.umod(this.m))._forceRed(this)},I.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},I.prototype.add=function(e,a){return this._verify2(e,a),0<=(a=e.add(a)).cmp(this.m)&&a.isub(this.m),a._forceRed(this)},I.prototype.iadd=function(e,a){return this._verify2(e,a),0<=(a=e.iadd(a)).cmp(this.m)&&a.isub(this.m),a},I.prototype.sub=function(e,a){return this._verify2(e,a),(a=e.sub(a)).cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},I.prototype.isub=function(e,a){return this._verify2(e,a),(a=e.isub(a)).cmpn(0)<0&&a.iadd(this.m),a},I.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},I.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},I.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},I.prototype.isqr=function(e){return this.imul(e,e.clone())},I.prototype.sqr=function(e){return this.mul(e,e)},I.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(r(a%2==1),3===a)return a=this.m.add(new n(1)).iushrn(2),this.pow(e,a);for(var t=this.m.subn(1),c=0;!t.isZero()&&0===t.andln(1);)c++,t.iushrn(1);r(!t.isZero());for(var d=new n(1).toRed(this),o=d.redNeg(),f=this.m.subn(1).iushrn(1),i=new n(2*(i=this.m.bitLength())*i).toRed(this);0!==this.pow(i,f).cmp(o);)i.redIAdd(o);for(var s=this.pow(i,t),b=this.pow(e,t.addn(1).iushrn(1)),l=this.pow(e,t),u=c;0!==l.cmp(d);){for(var h=l,x=0;0!==h.cmp(d);x++)h=h.redSqr();r(x>s&1;c!==t[0]&&(c=this.sqr(c)),0!=b||0!==d?(d<<=1,d|=b,(4===++o||0===r&&0===s)&&(c=this.mul(c,t[d]),d=o=0)):o=0}f=26}return c},I.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},I.prototype.convertFrom=function(e){return(e=e.clone()).red=null,e},n.mont=function(e){return new _(e)},c(_,I),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){return(e=this.imod(e.mul(this.rinv))).red=null,e},_.prototype.imul=function(e,a){return e.isZero()||a.isZero()?(e.words[0]=0,e.length=1,e):(a=(e=e.imul(a)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=e=e.isub(a).iushrn(this.shift),0<=e.cmp(this.m)?a=e.isub(this.m):e.cmpn(0)<0&&(a=e.iadd(this.m)),a._forceRed(this))},_.prototype.mul=function(e,a){return e.isZero()||a.isZero()?new n(0)._forceRed(this):(a=(e=e.mul(a)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=e=e.isub(a).iushrn(this.shift),0<=e.cmp(this.m)?a=e.isub(this.m):e.cmpn(0)<0&&(a=e.iadd(this.m)),a._forceRed(this))},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===a||a,this)},{buffer:11}],10:[function(e,a,r){(function(e){(function(){a.exports=function(a){return a=new Uint8Array(a),(e.crypto||e.msCrypto).getRandomValues(a),a}}).call(this)}).call(this,"undefined"!=typeof t.g?t.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,a,t){},{}],12:[function(e,a,t){"use strict";t.version=e("../package.json").version,t.utils=e("./elliptic/utils"),t.rand=e("brorand"),t.curve=e("./elliptic/curve"),t.curves=e("./elliptic/curves"),t.ec=e("./elliptic/ec"),t.eddsa=e("./elliptic/eddsa")},{"../package.json":25,"./elliptic/curve":15,"./elliptic/curves":18,"./elliptic/ec":19,"./elliptic/eddsa":22,"./elliptic/utils":24,brorand:10}],13:[function(e,a,t){"use strict";var r=e("bn.js"),c=e("../utils"),n=c.getNAF,d=c.getJSF,o=c.assert;function f(e,a){this.type=e,this.p=new r(a.p,16),this.red=a.prime?r.red(a.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=a.n&&new r(a.n,16),this.g=a.g&&this.pointFromJSON(a.g,a.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0,!(a=this.n&&this.p.div(this.n))||0>1]):f.mixedAdd(c[-b-1>>1].neg()):0>1]):f.add(c[-b-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,a,t,r,c){for(var o=this._wnafT1,f=this._wnafT2,i=this._wnafT3,s=0,b=0;b>1]:N<0&&(l=f[E][-N-1>>1].neg()),k="affine"===l.type?k.mixedAdd(l):k.add(l))}}for(b=0;b=Math.ceil((e.bitLength()+1)/a.step)},i.prototype._getDoubles=function(e,a){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var t=[this],r=this,c=0;c":""},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);e=(a=0!==(a=this.y.redSub(e.y)).cmpn(0)?a.redMul(this.x.redSub(e.x).redInvm()):a).redSqr().redISub(this.x).redISub(e.x);var a=a.redMul(this.x.redSub(e)).redISub(this.y);return this.curve.point(e,a)},i.prototype.dbl=function(){if(this.inf)return this;if(0===(t=this.y.redAdd(this.y)).cmpn(0))return this.curve.point(null,null);var e=this.curve.a,a=this.x.redSqr(),t=t.redInvm();return t=(e=a.redAdd(a).redIAdd(a).redIAdd(e).redMul(t)).redSqr().redISub(this.x.redAdd(this.x)),e=e.redMul(this.x.redSub(t)).redISub(this.y),this.curve.point(t,e)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(e){return e=new c(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,a,t){return a=[this,a],t=[e,t],this.curve.endo?this.curve._endoWnafMulAdd(a,t):this.curve._wnafMulAdd(1,a,t,2)},i.prototype.jmulAdd=function(e,a,t){return a=[this,a],t=[e,t],this.curve.endo?this.curve._endoWnafMulAdd(a,t,!0):this.curve._wnafMulAdd(1,a,t,2,!0)},i.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},i.prototype.neg=function(e){if(this.inf)return this;var a,t=this.curve.point(this.x,this.y.redNeg());return e&&this.precomputed&&(a=this.precomputed,e=function(e){return e.neg()},t.precomputed={naf:a.naf&&{wnd:a.naf.wnd,points:a.naf.points.map(e)},doubles:a.doubles&&{step:a.doubles.step,points:a.doubles.points.map(e)}}),t},i.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},n(s,d.BasePoint),f.prototype.jpoint=function(e,a,t){return new s(this,e,a,t)},s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=(t=this.z.redInvm()).redSqr(),a=this.x.redMul(e),t=this.y.redMul(e).redMul(t);return this.curve.point(a,t)},s.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},s.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var a=e.z.redSqr(),t=this.z.redSqr(),r=this.x.redMul(a),c=e.x.redMul(t),n=this.y.redMul(a.redMul(e.z)),d=e.y.redMul(t.redMul(this.z));return a=r.redSub(c),t=n.redSub(d),0===a.cmpn(0)?0!==t.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(d=(c=a.redSqr()).redMul(a),r=r.redMul(c),c=t.redSqr().redIAdd(d).redISub(r).redISub(r),d=t.redMul(r.redISub(c)).redISub(n.redMul(d)),a=this.z.redMul(e.z).redMul(a),this.curve.jpoint(c,d,a))},s.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var a=this.z.redSqr(),t=this.x,r=e.x.redMul(a),c=this.y,n=e.y.redMul(a).redMul(this.z);return e=t.redSub(r),a=c.redSub(n),0===e.cmpn(0)?0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(n=(r=e.redSqr()).redMul(e),t=t.redMul(r),r=a.redSqr().redIAdd(n).redISub(t).redISub(t),n=a.redMul(t.redISub(r)).redISub(c.redMul(n)),e=this.z.redMul(e),this.curve.jpoint(r,n,e))},s.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var a=this,t=0;t":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":24,"./base":13,"bn.js":9,inherits:39}],18:[function(e,a,t){"use strict";var r,c=t,n=(t=e("hash.js"),e("./curve")),d=e("./utils").assert;function o(e){"short"===e.type?this.curve=new n.short(e):"edwards"===e.type?this.curve=new n.edwards(e):this.curve=new n.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,d(this.g.validate(),"Invalid curve"),d(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,a){Object.defineProperty(c,e,{configurable:!0,enumerable:!0,get:function(){var t=new o(a);return Object.defineProperty(c,e,{configurable:!0,enumerable:!0,value:t}),t}})}c.PresetCurve=o,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:t.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:t.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:t.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:t.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:t.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=e("./precomputed/secp256k1")}catch(e){r=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:t.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},{"./curve":15,"./precomputed/secp256k1":23,"./utils":24,"hash.js":26}],19:[function(e,a,t){"use strict";var r=e("bn.js"),c=e("hmac-drbg"),n=e("../utils"),d=e("../curves"),o=e("brorand"),f=n.assert,i=e("./key"),s=e("./signature");function b(e){if(!(this instanceof b))return new b(e);"string"==typeof e&&(f(Object.prototype.hasOwnProperty.call(d,e),"Unknown curve "+e),e=d[e]),e instanceof d.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}(a.exports=b).prototype.keyPair=function(e){return new i(this,e)},b.prototype.keyFromPrivate=function(e,a){return i.fromPrivate(this,e,a)},b.prototype.keyFromPublic=function(e,a){return i.fromPublic(this,e,a)},b.prototype.genKeyPair=function(e){for(var a=new c({hash:this.hash,pers:(e=e||{}).pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),t=this.n.byteLength(),n=this.n.sub(new r(2));;){var d=new r(a.generate(t));if(!(0>=1,0<=o.cmp(this.curve.p.umod(this.curve.n))&&t)throw new Error("Unable to find sencond key candinate");return o=t?this.curve.pointFromX(o.add(this.curve.n),e):this.curve.pointFromX(o,e),a=a.r.invm(n),d=n.sub(d).mul(a).umod(n),n=c.mul(a).umod(n),this.g.mulAdd(d,o,n)},b.prototype.getKeyRecoveryParam=function(e,a,t,r){if(null!==(a=new s(a,r)).recoveryParam)return a.recoveryParam;for(var c,n=0;n<4;n++){try{c=this.recoverPubKey(e,a,n)}catch(e){continue}if(c.eq(t))return n}throw new Error("Unable to find valid recovery factor")}},{"../curves":18,"../utils":24,"./key":20,"./signature":21,"bn.js":9,brorand:10,"hmac-drbg":38}],20:[function(e,a,t){"use strict";var r=e("bn.js"),c=e("../utils").assert;function n(e,a){this.ec=e,this.priv=null,this.pub=null,a.priv&&this._importPrivate(a.priv,a.privEnc),a.pub&&this._importPublic(a.pub,a.pubEnc)}(a.exports=n).fromPublic=function(e,a,t){return a instanceof n?a:new n(e,{pub:a,pubEnc:t})},n.fromPrivate=function(e,a,t){return a instanceof n?a:new n(e,{priv:a,privEnc:t})},n.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},n.prototype.getPublic=function(e,a){return"string"==typeof e&&(a=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),a?this.pub.encode(a,e):this.pub},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(e,a){this.priv=new r(e,a||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,a){if(e.x||e.y)return"mont"===this.ec.curve.type?c(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||c(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,a)},n.prototype.derive=function(e){return e.validate()||c(e.validate(),"public point not validated"),e.mul(this.priv).getX()},n.prototype.sign=function(e,a,t){return this.ec.sign(e,this,a,t)},n.prototype.verify=function(e,a){return this.ec.verify(e,a,this)},n.prototype.inspect=function(){return""}},{"../utils":24,"bn.js":9}],21:[function(e,a,t){"use strict";var r=e("bn.js"),c=e("../utils"),n=c.assert;function d(e,a){if(e instanceof d)return e;this._importDER(e,a)||(n(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function o(){this.place=0}function f(e,a){var t=e[a.place++];if(!(128&t))return t;var r=15&t;if(0==r||4>>=0;return!(c<=127)&&(a.place=d,c)}function i(e){for(var a=0,t=e.length-1;!e[a]&&!(128&e[a+1])&&a>>3);for(e.push(128|t);--t;)e.push(a>>>(t<<3)&255);e.push(a)}}(a.exports=d).prototype._importDER=function(e,a){e=c.toArray(e,a);var t=new o;if(48!==e[t.place++])return!1;var n=f(e,t);if(!1===n)return!1;if(n+t.place!==e.length)return!1;if(2!==e[t.place++])return!1;if(!1===(a=f(e,t)))return!1;if(n=e.slice(t.place,a+t.place),t.place+=a,2!==e[t.place++])return!1;if(!1===(a=f(e,t)))return!1;if(e.length!==a+t.place)return!1;if(t=e.slice(t.place,a+t.place),0===n[0]){if(!(128&n[1]))return!1;n=n.slice(1)}if(0===t[0]){if(!(128&t[1]))return!1;t=t.slice(1)}return this.r=new r(n),this.s=new r(t),!(this.recoveryParam=null)},d.prototype.toDER=function(e){var a=this.r.toArray(),t=this.s.toArray();for(128&a[0]&&(a=[0].concat(a)),128&t[0]&&(t=[0].concat(t)),a=i(a),t=i(t);!(t[0]||128&t[1]);)t=t.slice(1);var r=[2];return s(r,a.length),(r=r.concat(a)).push(2),s(r,t.length),a=r.concat(t),s(r=[48],a.length),r=r.concat(a),c.encode(r,e)}},{"../utils":24,"bn.js":9}],22:[function(e,a,t){arguments[4][14][0].apply(t,arguments)},{dup:14}],23:[function(e,a,t){a.exports=void 0},{}],24:[function(e,a,t){"use strict";var r=t,c=e("bn.js");t=e("minimalistic-assert"),e=e("minimalistic-crypto-utils"),r.assert=t,r.toArray=e.toArray,r.zero2=e.zero2,r.toHex=e.toHex,r.encode=e.encode,r.getNAF=function(e,a,t){var r=new Array(Math.max(e.bitLength(),t)+1);r.fill(0);for(var c=1<>1)-1>1)-f:f):o=0,r[d]=o,n.iushrn(1)}return r},r.getJSF=function(e,a){var t=[[],[]];e=e.clone(),a=a.clone();for(var r,c=0,n=0;0=this._delta8){a=(e=this.pending).length%this._delta8,this.pending=e.slice(e.length-a,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-a,this.endian);for(var t=0;t>>24&255,r[c++]=e>>>16&255,r[c++]=e>>>8&255,r[c++]=255&e}else for(r[c++]=255&e,r[c++]=e>>>8&255,r[c++]=e>>>16&255,r[c++]=e>>>24&255,r[c++]=0,r[c++]=0,r[c++]=0,r[c++]=0,n=8;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),c(e.length<=this.blockSize);for(var a=e.length;a>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},{"../utils":37}],37:[function(e,a,t){"use strict";var r=e("minimalistic-assert");function c(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function n(e){return 1===e.length?"0"+e:e}function d(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}e=e("inherits"),t.inherits=e,t.toArray=function(e,a){if(Array.isArray(e))return e.slice();if(!e)return[];var t=[];if("string"==typeof e)if(a){if("hex"===a)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r>8,n=255&n;c?t.push(c,n):t.push(n)}else for(r=0;r>>0}return n},t.split32=function(e,a){for(var t=new Array(4*e.length),r=0,c=0;r>>24,t[c+1]=n>>>16&255,t[c+2]=n>>>8&255,t[c+3]=255&n):(t[c+3]=n>>>24,t[c+2]=n>>>16&255,t[c+1]=n>>>8&255,t[c]=255&n)}return t},t.rotr32=function(e,a){return e>>>a|e<<32-a},t.rotl32=function(e,a){return e<>>32-a},t.sum32=function(e,a){return e+a>>>0},t.sum32_3=function(e,a,t){return e+a+t>>>0},t.sum32_4=function(e,a,t,r){return e+a+t+r>>>0},t.sum32_5=function(e,a,t,r,c){return e+a+t+r+c>>>0},t.sum64=function(e,a,t,r){var c=e[a],n=r+e[a+1]>>>0;e[a]=(n>>0,e[a+1]=n},t.sum64_hi=function(e,a,t,r){return(a+r>>>0>>0},t.sum64_lo=function(e,a,t,r){return a+r>>>0},t.sum64_4_hi=function(e,a,t,r,c,n,d,o){var f=0,i=a;return f+=(i=a+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,a,t,r,c,n,d,o){return a+r+n+o>>>0},t.sum64_5_hi=function(e,a,t,r,c,n,d,o,f,i){var s=0,b=a;return s+=(b=a+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,a,t,r,c,n,d,o,f,i){return a+r+n+o+i>>>0},t.rotr64_hi=function(e,a,t){return(a<<32-t|e>>>t)>>>0},t.rotr64_lo=function(e,a,t){return(e<<32-t|a>>>t)>>>0},t.shr64_hi=function(e,a,t){return e>>>t},t.shr64_lo=function(e,a,t){return(e<<32-t|a>>>t)>>>0}},{inherits:39,"minimalistic-assert":41}],38:[function(e,a,t){"use strict";var r=e("hash.js"),c=e("minimalistic-crypto-utils"),n=e("minimalistic-assert");function d(e){if(!(this instanceof d))return new d(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var a=c.toArray(e.entropy,e.entropyEnc||"hex"),t=c.toArray(e.nonce,e.nonceEnc||"hex");e=c.toArray(e.pers,e.persEnc||"hex"),n(a.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(a,t,e)}(a.exports=d).prototype._init=function(e,a,t){t=e.concat(a).concat(t),this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(t||[])),this._reseed=1},d.prototype.generate=function(e,a,t,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof a&&(r=t,t=a,a=null),t&&(t=c.toArray(t,r||"hex"),this._update(t));for(var n=[];n.length>5,this.byteCount=this.blockCount<<2,this.outputBlocks=t>>5,this.extraBytes=(31&t)>>3;for(var r=0;r<50;++r)this.s[r]=0}k.prototype.update=function(e){for(var a,t,r="string"!=typeof e,c=(e=r&&e.constructor===ArrayBuffer?new Uint8Array(e):e).length,n=this.blocks,o=this.byteCount,f=this.blockCount,i=0,s=this.s;i>2]|=e[i]<>2]|=t<>2]|=(192|t>>6)<>2]|=(224|t>>12)<>2]|=(240|t>>18)<>2]|=(128|t>>12&63)<>2]|=(128|t>>6&63)<>2]|=(128|63&t)<>2]|=this.padding[3&a],this.lastByteIndex===this.byteCount)for(e[0]=e[t],a=1;a>4&15]+n[15&e]+n[e>>12&15]+n[e>>8&15]+n[e>>20&15]+n[e>>16&15]+n[e>>28&15]+n[e>>24&15];o%a==0&&(w(t),d=0)}return c&&(e=t[d],0>4&15]+n[15&e]),1>12&15]+n[e>>8&15]),2>20&15]+n[e>>16&15])),f},k.prototype.arrayBuffer=function(){this.finalize();for(var e=this.blockCount,a=this.s,t=this.outputBlocks,r=this.extraBytes,c=0,n=0,d=this.outputBits>>3,o=r?new ArrayBuffer(t+1<<2):new ArrayBuffer(d),f=new Uint32Array(o);n>8&255,f[e+2]=a>>16&255,f[e+3]=a>>24&255;o%t==0&&w(r)}return n&&(e=o<<2,a=r[d],0>8&255),2>16&255)),f};var w=function(e){for(var a,t,r,c,n,d,f,i,s,b,l,u,h,x,p,m,v,g,y,k,w,I,_,E,N,H,S,A,M,T,P,O,C,R,D,j,L,B,F,Z,U,z,q,V,W,K,G,Y,$,X,J=0;J<48;J+=2)S=e[0]^e[10]^e[20]^e[30]^e[40],A=e[1]^e[11]^e[21]^e[31]^e[41],Z=e[2]^e[12]^e[22]^e[32]^e[42],F=e[3]^e[13]^e[23]^e[33]^e[43],O=e[4]^e[14]^e[24]^e[34]^e[44],P=e[5]^e[15]^e[25]^e[35]^e[45],K=e[6]^e[16]^e[26]^e[36]^e[46],W=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],b=(x=e[9]^e[19]^e[29]^e[39]^e[49])^(F<<1|Z>>>31),e[0]^=s=h^(Z<<1|F>>>31),e[1]^=b,e[10]^=s,e[11]^=b,e[20]^=s,e[21]^=b,e[30]^=s,e[31]^=b,e[40]^=s,e[41]^=b,b=A^(P<<1|O>>>31),e[2]^=s=S^(O<<1|P>>>31),e[3]^=b,e[12]^=s,e[13]^=b,e[22]^=s,e[23]^=b,e[32]^=s,e[33]^=b,e[42]^=s,e[43]^=b,b=F^(W<<1|K>>>31),e[4]^=s=Z^(K<<1|W>>>31),e[5]^=b,e[14]^=s,e[15]^=b,e[24]^=s,e[25]^=b,e[34]^=s,e[35]^=b,e[44]^=s,e[45]^=b,b=P^(x<<1|h>>>31),e[6]^=s=O^(h<<1|x>>>31),e[7]^=b,e[16]^=s,e[17]^=b,e[26]^=s,e[27]^=b,e[36]^=s,e[37]^=b,e[46]^=s,e[47]^=b,b=W^(A<<1|S>>>31),e[8]^=s=K^(S<<1|A>>>31),e[9]^=b,e[18]^=s,e[19]^=b,e[28]^=s,e[29]^=b,e[38]^=s,e[39]^=b,e[48]^=s,e[49]^=b,a=e[0],t=e[1],C=e[11]<<4|e[10]>>>28,R=e[10]<<4|e[11]>>>28,p=e[20]<<3|e[21]>>>29,m=e[21]<<3|e[20]>>>29,G=e[31]<<9|e[30]>>>23,Y=e[30]<<9|e[31]>>>23,M=e[40]<<18|e[41]>>>14,T=e[41]<<18|e[40]>>>14,w=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,r=e[13]<<12|e[12]>>>20,c=e[12]<<12|e[13]>>>20,D=e[22]<<10|e[23]>>>22,j=e[23]<<10|e[22]>>>22,v=e[33]<<13|e[32]>>>19,g=e[32]<<13|e[33]>>>19,$=e[42]<<2|e[43]>>>30,X=e[43]<<2|e[42]>>>30,U=e[5]<<30|e[4]>>>2,z=e[4]<<30|e[5]>>>2,_=e[14]<<6|e[15]>>>26,E=e[15]<<6|e[14]>>>26,n=e[25]<<11|e[24]>>>21,d=e[24]<<11|e[25]>>>21,L=e[34]<<15|e[35]>>>17,B=e[35]<<15|e[34]>>>17,y=e[45]<<29|e[44]>>>3,k=e[44]<<29|e[45]>>>3,l=e[6]<<28|e[7]>>>4,u=e[7]<<28|e[6]>>>4,q=e[17]<<23|e[16]>>>9,V=e[16]<<23|e[17]>>>9,N=e[26]<<25|e[27]>>>7,H=e[27]<<25|e[26]>>>7,f=e[36]<<21|e[37]>>>11,i=e[37]<<21|e[36]>>>11,F=e[47]<<24|e[46]>>>8,Z=e[46]<<24|e[47]>>>8,P=e[8]<<27|e[9]>>>5,O=e[9]<<27|e[8]>>>5,h=e[18]<<20|e[19]>>>12,x=e[19]<<20|e[18]>>>12,W=e[29]<<7|e[28]>>>25,K=e[28]<<7|e[29]>>>25,S=e[38]<<8|e[39]>>>24,A=e[39]<<8|e[38]>>>24,s=e[48]<<14|e[49]>>>18,b=e[49]<<14|e[48]>>>18,e[0]=a^~r&n,e[1]=t^~c&d,e[10]=l^~h&p,e[11]=u^~x&m,e[20]=w^~_&N,e[21]=I^~E&H,e[30]=P^~C&D,e[31]=O^~R&j,e[40]=U^~q&W,e[41]=z^~V&K,e[2]=r^~n&f,e[3]=c^~d&i,e[12]=h^~p&v,e[13]=x^~m&g,e[22]=_^~N&S,e[23]=E^~H&A,e[32]=C^~D&L,e[33]=R^~j&B,e[42]=q^~W&G,e[43]=V^~K&Y,e[4]=n^~f&s,e[5]=d^~i&b,e[14]=p^~v&y,e[15]=m^~g&k,e[24]=N^~S&M,e[25]=H^~A&T,e[34]=D^~L&F,e[35]=j^~B&Z,e[44]=W^~G&$,e[45]=K^~Y&X,e[6]=f^~s&a,e[7]=i^~b&t,e[16]=v^~y&l,e[17]=g^~k&u,e[26]=S^~M&w,e[27]=A^~T&I,e[36]=L^~F&P,e[37]=B^~Z&O,e[46]=G^~$&U,e[47]=Y^~X&z,e[8]=s^~a&r,e[9]=b^~t&c,e[18]=y^~l&h,e[19]=k^~u&x,e[28]=M^~w&_,e[29]=T^~I&E,e[38]=F^~P&C,e[39]=Z^~O&R,e[48]=$^~U&q,e[49]=X^~z&V,e[0]^=o[J],e[1]^=o[J+1]};if(c)a.exports=h;else for(p=0;p>8,n=255&n;c?t.push(c,n):t.push(n)}return t},t.zero2=r,t.toHex=c,t.encode=function(e,a){return"hex"===a?c(e):e}},{}],43:[function(e,a,t){a.exports={browser:!0}},{}],44:[function(e,a,t){(function(e){(function(){"use strict";function r(e){var a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],t=1779033703,r=3144134277,c=1013904242,n=2773480762,d=1359893119,o=2600822924,f=528734635,i=1541459225,s=new Array(64);function b(e){for(var b=0,l=e.length;64<=l;){for(var u,h,x,p,m=t,v=r,g=c,y=n,k=d,w=o,I=f,_=i,E=0;E<16;E++)s[E]=(255&e[h=b+4*E])<<24|(255&e[h+1])<<16|(255&e[h+2])<<8|255&e[h+3];for(E=16;E<64;E++)x=((u=s[E-2])>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,u=s[E-15],s[E]=(x+s[E-7]|0)+((p=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3)+s[E-16]|0)|0;for(E=0;E<64;E++)x=(((k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7))+(k&w^~k&I)|0)+(_+(a[E]+s[E]|0)|0)|0,p=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&v^m&g^v&g)|0,_=I,I=w,w=k,k=y+x|0,y=g,g=v,v=m,m=x+p|0;t=t+m|0,r=r+v|0,c=c+g|0,n=n+y|0,d=d+k|0,o=o+w|0,f=f+I|0,i=i+_|0,b+=64,l-=64}}b(e);var l,u=e.length%64,h=e.length/536870912|0,x=e.length<<3,p=u<56?56:120,m=e.slice(e.length-u,e.length);for(m.push(128),l=1+u;l>>24&255),m.push(h>>>16&255),m.push(h>>>8&255),m.push(h>>>0&255),m.push(x>>>24&255),m.push(x>>>16&255),m.push(x>>>8&255),m.push(x>>>0&255),b(m),[t>>>24&255,t>>>16&255,t>>>8&255,t>>>0&255,r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,d>>>24&255,d>>>16&255,d>>>8&255,d>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255]}function c(e,a,t){e=e.length<=64?e:r(e);for(var c=64+a.length+4,n=new Array(c),d=new Array(64),o=[],f=0;f<64;f++)n[f]=54;for(f=0;f>>32-a}function o(e,a,t,r){for(var c=0;c>0&255),x.push(p[t]>>8&255),x.push(p[t]>>16&255),x.push(p[t]>>24&255);var u=c(a,x,l);return h(null,1,u)}O(e)};C()}var l,u;l=this,u=2147483647,void 0!==t?a.exports=b:l&&(l.scrypt&&(l._scrypt=l.scrypt),l.scrypt=b)}).call(this)}).call(this,e("timers").setImmediate)},{timers:46}],45:[function(e,a,r){(function(e,a,t){(function(){!function(a,t){"use strict";var r,c,n,d,o,f,i,s;function b(e){return c[r]=l.apply(t,e),r++}function l(e){var a=[].slice.call(arguments,1);return function(){"function"==typeof e?e.apply(t,a):new Function(""+e)()}}function u(e){if(n)setTimeout(l(u,e),0);else{var a=c[e];if(a){n=!0;try{a()}finally{h(e),n=!1}}}}function h(e){delete c[e]}function x(){function e(e){e.source===a&&"string"==typeof e.data&&0===e.data.indexOf(t)&&u(+e.data.slice(t.length))}var t="setImmediate$"+Math.random()+"$";a.addEventListener?a.addEventListener("message",e,!1):a.attachEvent("onmessage",e),o=function(){var e=b(arguments);return a.postMessage(t+e,"*"),e}}a.setImmediate||(r=1,n=!(c={}),d=a.document,s=(s=Object.getPrototypeOf&&Object.getPrototypeOf(a))&&s.setTimeout?s:a,"[object process]"==={}.toString.call(a.process)?o=function(){var a=b(arguments);return e.nextTick(l(u,a)),a}:function(){if(a.postMessage&&!a.importScripts){var e=!0,t=a.onmessage;return a.onmessage=function(){e=!1},a.postMessage("","*"),a.onmessage=t,e}}()?x():o=a.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){u(e.data)},function(){var e=b(arguments);return i.port2.postMessage(e),e}):d&&"onreadystatechange"in d.createElement("script")?(f=d.documentElement,function(){var e=b(arguments),a=d.createElement("script");return a.onreadystatechange=function(){u(e),a.onreadystatechange=null,f.removeChild(a),a=null},f.appendChild(a),e}):function(){var e=b(arguments);return setTimeout(l(u,e),0),e},s.setImmediate=o,s.clearImmediate=h)}("undefined"==typeof self?void 0===a?this:a:self)}).call(this)}).call(this,e("_process"),"undefined"!=typeof t.g?t.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").clearImmediate)},{_process:43,timers:46}],46:[function(e,a,r){(function(e){(function(){a.exports={setImmediate:e.setImmediate}}).call(this)}).call(this,"undefined"!=typeof t.g?t.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(e,a,r){(function(e){(function(){var t,r,c;e.crypto&&crypto.getRandomValues&&(t=new Uint8Array(16),r=function(){return crypto.getRandomValues(t),t}),r||(c=new Array(16),r=function(){for(var e,a=0;a<16;a++)0==(3&a)&&(e=4294967296*Math.random()),c[a]=e>>>((3&a)<<3)&255;return c}),a.exports=r}).call(this)}).call(this,"undefined"!=typeof t.g?t.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],48:[function(e,a,t){for(var r=e("./rng"),c=[],n={},d=0;d<256;d++)c[d]=(d+256).toString(16).substr(1),n[c[d]]=d;function o(e,a){return a=a||0,c[e[a++]]+c[e[a++]]+c[e[a++]]+c[e[a++]]+"-"+c[e[a++]]+c[e[a++]]+"-"+c[e[a++]]+c[e[a++]]+"-"+c[e[a++]]+c[e[a++]]+"-"+c[e[a++]]+c[e[a++]]+c[e[a++]]+c[e[a++]]+c[e[a++]]+c[e[a++]]}var f=[1|(e=r())[0],e[1],e[2],e[3],e[4],e[5]],i=16383&(e[6]<<8|e[7]),s=0,b=0;function l(e,a,t){var c=a&&t||0;"string"==typeof e&&(a="binary"==e?new Array(16):null,e=null);var n=(e=e||{}).random||(e.rng||r)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,a)for(var d=0;d<16;d++)a[c+d]=n[d];return a||o(n)}(e=l).v1=function(e,a,t){var r=a&&t||0,c=a||[],n=void 0!==(e=e||{}).clockseq?e.clockseq:i,d=void 0!==e.msecs?e.msecs:(new Date).getTime(),l=void 0!==e.nsecs?e.nsecs:b+1;if((t=d-s+(l-b)/1e4)<0&&void 0===e.clockseq&&(n=n+1&16383),1e4<=(l=(t<0||s>>24&255,c[r++]=l>>>16&255,c[r++]=l>>>8&255,c[r++]=255&l,d=d/4294967296*1e4&268435455,c[r++]=d>>>8&255,c[r++]=255&d,c[r++]=d>>>24&15|16,c[r++]=d>>>16&255,c[r++]=n>>>8|128,c[r++]=255&n;for(var u=e.node||f,h=0;h<6;h++)c[r+h]=u[h];return a||o(c)},e.v4=l,e.parse=function(e,a,t){var r=a&&t||0,c=0;for(a=a||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,(function(e){c<16&&(a[r+c++]=n[e])}));c<16;)a[r+c++]=0;return a},e.unparse=o,a.exports=e},{"./rng":47}],49:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});try{a.exports.XMLHttpRequest=XMLHttpRequest}catch(e){console.log("Warning: XMLHttpRequest is not defined"),a.exports.XMLHttpRequest=null}},{}],50:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../utils/properties");function c(){r.setType(this,"Provider")}c.isProvider=function(e){return r.isType(e,"Provider")},e=c,t.Provider=e},{"../utils/properties":74}],51:[function(e,a,t){"use strict";var r,c=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},function(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var d=e("../utils/address"),o=e("../utils/bignumber"),f=e("../utils/bytes"),i=e("../constants"),s=e("../utils/hash"),b=e("../utils/networks"),l=e("../utils/properties"),u=e("../utils/rlp"),h=e("../utils/transaction"),x=e("../utils/utf8"),p=e("../utils/web"),m=n(e("../errors")),v=e("./abstract-provider");function g(e,a){var t,r={};for(t in e)try{var c=e[t](a[t]);void 0!==c&&(r[t]=c)}catch(e){throw e.checkKey=t,e.checkValue=a[t],e}return r}function y(e,a){return function(t){return null==t?a:e(t)}}function k(e){return function(a){if(!Array.isArray(a))throw new Error("not an array");var t=[];return a.forEach((function(a){t.push(e(a))})),t}}function w(e,a){return"string"==typeof e&&(a||"0x"===e.substring(0,2)||(e="0x"+e),32===f.hexDataLength(e))?e.toLowerCase():(m.throwError("invalid hash",m.INVALID_ARGUMENT,{arg:"hash",value:e}),null)}function I(e){return o.bigNumberify(e).toNumber()}function _(e){if(!f.isHexString(e))throw new Error("invalid uint256");for(;e.length<66;)e="0x0"+e.substring(2);return e}function E(e){if(null==e)return"latest";if("earliest"===e)return"0x0";if("latest"===e||"pending"===e)return e;if("number"==typeof e)return f.hexStripZeros(f.hexlify(e));if(f.isHexString(e))return f.hexStripZeros(e);throw new Error("invalid blockTag")}var N={hash:w,blockHash:y(w,null),blockNumber:y(I,null),transactionIndex:y(I,null),confirmations:y(I,null),from:d.getAddress,gasPrice:o.bigNumberify,gasLimit:o.bigNumberify,to:y(d.getAddress,null),value:o.bigNumberify,nonce:I,data:f.hexlify,r:y(_),s:y(_),v:y(I),creates:y(d.getAddress,null),raw:y(f.hexlify)};function H(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&o.bigNumberify(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=d.getContractAddress(e)),e.raw||e.v&&e.r&&e.s&&(t=[f.stripZeros(f.hexlify(e.nonce)),f.stripZeros(f.hexlify(e.gasPrice)),f.stripZeros(f.hexlify(e.gasLimit)),e.to||"0x",f.stripZeros(f.hexlify(e.value||"0x")),f.hexlify(e.data||"0x"),f.stripZeros(f.hexlify(e.v||"0x")),f.stripZeros(f.hexlify(e.r)),f.stripZeros(f.hexlify(e.s))],e.raw=u.encode(t));var a=g(N,e),t=e.networkId;return null!=e.chainId&&null==t&&null==a.v&&(t=e.chainId),"number"!=typeof(t=f.isHexString(t)?o.bigNumberify(t).toNumber():t)&&null!=a.v&&((t=(a.v-35)/2)<0&&(t=0),t=parseInt(t)),a.networkId=t="number"!=typeof t?0:t,null==a.chainId&&null!=t&&(a.chainId=t),a.blockHash&&"x"===a.blockHash.replace(/0/g,"")&&(a.blockHash=null),a}var S={hash:w,parentHash:w,number:I,timestamp:I,nonce:y(f.hexlify),difficulty:function(e){e=o.bigNumberify(e);try{return e.toNumber()}catch(e){}return null},gasLimit:o.bigNumberify,gasUsed:o.bigNumberify,miner:d.getAddress,extraData:f.hexlify,transactions:y(k(w))},A=l.shallowCopy(S);function M(e,a){return null!=e.author&&null==e.miner&&(e.miner=e.author),g(a?A:S,e)}A.transactions=y(k(H));var T={from:y(d.getAddress),nonce:y(I),gasLimit:y(o.bigNumberify),gasPrice:y(o.bigNumberify),to:y(d.getAddress),value:y(o.bigNumberify),data:y(f.hexlify)};function P(e){return g(T,e)}var O={transactionLogIndex:y(I),transactionIndex:I,blockNumber:I,transactionHash:w,address:d.getAddress,topics:k(w),data:f.hexlify,logIndex:I,blockHash:w},C={to:y(d.getAddress,null),from:y(d.getAddress,null),contractAddress:y(d.getAddress,null),transactionIndex:I,root:y(w),gasUsed:o.bigNumberify,logsBloom:y(f.hexlify),blockHash:w,transactionHash:w,logs:k((function(e){return g(O,e)})),blockNumber:I,confirmations:y(I,null),cumulativeGasUsed:o.bigNumberify,status:y(I)};function R(e){return Array.isArray(e)?e.forEach((function(e){R(e)})):null!=e&&w(e),e}var D,j,L,B={fromBlock:y(E,void 0),toBlock:y(E,void 0),address:y(d.getAddress,void 0),topics:y(R,void 0)},F={blockHash:y(w,void 0),address:y(d.getAddress,void 0),topics:y(R,void 0)},Z={blockNumber:y(I),blockHash:y(w),transactionIndex:I,removed:y((function(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===e)return!0;if("false"===e)return!1}throw new Error("invaid boolean - "+e)})),address:d.getAddress,data:(D=f.hexlify,j="0x",function(e){return e?D(e):j}),topics:k(w),transactionHash:w,logIndex:I};function U(e){return g(Z,e)}function z(e){return e.map((function(e){return"string"==typeof e?e:Array.isArray(e)?(e.forEach((function(e){null!==e&&32!==f.hexDataLength(e)&&m.throwError("invalid topic",m.INVALID_ARGUMENT,{argument:"topic",value:e})})),e.join(",")):null===e?"":m.throwError("invalid topic value",m.INVALID_ARGUMENT,{argument:"topic",value:e})})).join("&")}function q(e){if("string"==typeof e){if(20===f.hexDataLength(e))return"address:"+d.getAddress(e);if(e=e.toLowerCase(),32===f.hexDataLength(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter::"+z(e);if(e&&"object"==typeof e)return"filter:"+(e.address||"")+":"+z(e.topics||[])}throw new Error("invalid event - "+e)}function V(){return(new Date).getTime()}function W(e){var a,t=L.call(this)||this;return m.checkNew(t,v.Provider),e instanceof Promise?(l.defineReadOnly(t,"ready",e.then((function(e){return l.defineReadOnly(t,"_network",e),e}))),t.ready.catch((function(e){}))):(a=b.getNetwork(null==e?"homestead":e))?(l.defineReadOnly(t,"_network",a),l.defineReadOnly(t,"ready",Promise.resolve(t._network))):m.throwError("invalid network",m.INVALID_ARGUMENT,{arg:"network",value:e}),t._lastBlockNumber=-2,t._balances={},t._events=[],t._pollingInterval=4e3,t._emitted={block:-2},t._fastQueryDate=0,t}c(W,L=v.Provider),W.prototype._doPoll=function(){var e=this;this.getBlockNumber().then((function(a){if(e.polling&&(e._setFastBlockNumber(a),a!==e._lastBlockNumber)){-2===e._emitted.block&&(e._emitted.block=a-1);for(var t=e._emitted.block+1;t<=a;t++)e.emit("block",t);e._emitted.block!==a&&(e._emitted.block=a,Object.keys(e._emitted).forEach((function(t){var r;"block"===t||"pending"!==(r=e._emitted[t])&&122*this._pollingInterval&&(this._fastQueryDate=a,this._fastBlockNumberPromise=this.getBlockNumber().then((function(a){return(null==e._fastBlockNumber||a>e._fastBlockNumber)&&(e._fastBlockNumber=a),e._fastBlockNumber}))),this._fastBlockNumberPromise},W.prototype._setFastBlockNumber=function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))},W.prototype.waitForTransaction=function(e,a){var t=this;return null==a&&(a=1),this.getTransactionReceipt(e).then((function(r){return 0===a||r&&r.confirmations>=a?r:new Promise((function(r){var c=function c(n){n.confirmations(a=a.substring(64)).length)return null;var r=x.toUtf8String("0x"+a.substring(0,2*t));return c.resolveName(r).then((function(a){return a!=e?null:r}))}))},W.checkTransactionResponse=H,W.prototype.doPoll=function(){},W.prototype.perform=function(e,a){return m.throwError(e+" not implemented",m.NOT_IMPLEMENTED,{operation:e}),null},W.prototype._startPending=function(){m.warn("WARNING: this provider does not support pending events")},W.prototype._stopPending=function(){},W.prototype._addEventListener=function(e,a,t){this._events.push({tag:q(e),listener:a,once:t}),"pending"===e&&this._startPending(),this.polling=!0},W.prototype.on=function(e,a){return this._addEventListener(e,a,!1),this},W.prototype.once=function(e,a){return this._addEventListener(e,a,!0),this},W.prototype.addEventListener=function(e,a){return this.on(e,a)},W.prototype.emit=function(e){for(var a=this,t=[],r=1;re.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}},H);function H(e,a){return E.call(this,e,"null","",a,!1)||this}var S,A=(c(M,S=k),M.prototype.encode=function(e){try{var a=i.bigNumberify(e);if(this.signed){var t=d.MaxUint256.maskn(8*this.size-1);if(a.gt(t))throw new Error("out-of-bounds");if(t=t.add(d.One).mul(d.NegativeOne),a.lt(t))throw new Error("out-of-bounds")}else if(a.lt(d.Zero)||a.gt(d.MaxUint256.maskn(8*this.size)))throw new Error("out-of-bounds");return a=a.toTwos(8*this.size).maskn(8*this.size),this.signed&&(a=a.fromTwos(8*this.size).toTwos(256)),s.padZeros(s.arrayify(a),32)}catch(a){o.throwError("invalid number value",o.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:e})}return null},M.prototype.decode=function(e,a){e.length>1]>>4&&(a[c]=a[c].toUpperCase()),8<=(15&t[c>>1])&&(a[c+1]=a[c+1].toUpperCase());return"0x"+a.join("")}for(var s={},b=0;b<10;b++)s[String(b)]=String(b);for(b=0;b<26;b++)s[String.fromCharCode(65+b)]=String(10+b);var l,u=Math.floor((l=9007199254740991,Math.log10?Math.log10(l):Math.log(l)/Math.LN10));function h(e){e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00";var a="";for(e.split("").forEach((function(e){a+=s[e]}));a.length>=u;){var t=a.substring(0,u);a=parseInt(t,10)%97+a.substring(t.length)}for(var r=String(98-parseInt(a,10)%97);r.length<2;)r="0"+r;return r}function x(e){var a=null;if("string"!=typeof e&&f.throwError("invalid address",f.INVALID_ARGUMENT,{arg:"address",value:e}),e.match(/^(0x)?[0-9a-fA-F]{40}$/))a=i(e="0x"!==e.substring(0,2)?"0x"+e:e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&a!==e&&f.throwError("bad address checksum",f.INVALID_ARGUMENT,{arg:"address",value:e});else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==h(e)&&f.throwError("bad icap checksum",f.INVALID_ARGUMENT,{arg:"address",value:e}),a=new c.default.BN(e.substring(4),36).toString(16);a.length<40;)a="0"+a;a=i("0x"+a)}else f.throwError("invalid address",f.INVALID_ARGUMENT,{arg:"address",value:e});return a}t.getAddress=x,t.getIcapAddress=function(e){for(var a=new c.default.BN(x(e).substring(2),16).toString(36).toUpperCase();a.length<30;)a="0"+a;return"XE"+h("XE00"+a)+a},t.getContractAddress=function(e){if(!e.from)throw new Error("missing from address");var a=e.nonce;return x("0x"+d.keccak256(o.encode([x(e.from),n.stripZeros(n.hexlify(a))])).substring(26))},t.getCreate2Address=function(e){var a=e.initCodeHash;e.initCode&&(a?d.keccak256(e.initCode)!==a&&f.throwError("initCode/initCodeHash mismatch",f.INVALID_ARGUMENT,{arg:"options",value:e}):a=d.keccak256(e.initCode)),a||f.throwError("missing initCode or initCodeHash",f.INVALID_ARGUMENT,{arg:"options",value:e});var t=x(e.from),r=n.arrayify(e.salt);return 32!==r.length&&f.throwError("invalid salt",f.INVALID_ARGUMENT,{arg:"options",value:e}),x("0x"+d.keccak256(n.concat(["0xff",t,r,a])).substring(26))}},{"../errors":5,"./bytes":64,"./keccak256":71,"./rlp":76,"bn.js":9}],61:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../utils/bytes");a.exports={decode:function(e){e=atob(e);for(var a=[],t=0;t>=8;for(;0>=8}for(var o=0;e[o]===this._leader&&o>4]+b[15&f])}return"0x"+r.join("")}return c.throwError("invalid hexlify value",null,{arg:"value",value:e}),"never"}function u(e,a){for(s(e)||c.throwError("invalid hex string",c.INVALID_ARGUMENT,{arg:"value",value:e});e.length<2*a+2;)e="0x0"+e.substring(2);return e}function h(e){var a=0,t="0x",r="0x";if((n=e)&&null!=n.r&&null!=n.s){null==e.v&&null==e.recoveryParam&&c.throwError("at least on of recoveryParam or v must be specified",c.INVALID_ARGUMENT,{argument:"signature",value:e}),t=u(e.r,32),r=u(e.s,32),"string"==typeof(a=e.v)&&(a=parseInt(a,16));var n=e.recoveryParam;a=27+(n=null==n&&null!=e.v?1-a%2:n)}else{if(65!==(e=f(e)).length)throw new Error("invalid signature");t=l(e.slice(0,32)),r=l(e.slice(32,64)),27!==(a=e[64])&&28!==a&&(a=27+a%2)}return{r:t,s:r,recoveryParam:a-27,v:a}}t.hexlify=l,t.hexDataLength=function(e){return s(e)&&e.length%2==0?(e.length-2)/2:null},t.hexDataSlice=function(e,a,t){return s(e)||c.throwError("invalid hex data",c.INVALID_ARGUMENT,{arg:"value",value:e}),e.length%2!=0&&c.throwError("hex data length must be even",c.INVALID_ARGUMENT,{arg:"value",value:e}),a=2+2*a,null!=t?"0x"+e.substring(a,2+2*t):"0x"+e.substring(a)},t.hexStripZeros=function(e){for(s(e)||c.throwError("invalid hex string",c.INVALID_ARGUMENT,{arg:"value",value:e});3>3)]=e>>24-r&255;var c=(i=b.computeHmac(b.SupportedAlgorithms.sha512,this.chainCode,t)).slice(0,32),n=i.slice(32),d=null,i=null;return this.privateKey?d=g(f.bigNumberify(c).add(this.privateKey).mod(x)):i=new u.KeyPair(o.hexlify(c))._addPoint(this.publicKey),new I(k,d,i,this.fingerprint,g(n),e,this.depth+1,this.mnemonic,a)},I.prototype.derivePath=function(e){var a=e.split("/");if(0===a.length||"m"===a[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===a[0]&&a.shift();for(var t=this,r=0;r>3]|=1<<7-d%8),d++}var b=32*t.length/3,l=v(t.length/3);if(e=o.arrayify(h.sha256(r.slice(0,b/8)))[0],(e&=l)!=(r[r.length-1]&l))throw new Error("invalid checksum");return o.hexlify(r.slice(0,b/8))}function H(e,a){if((e=o.arrayify(e)).length%4!=0||e.length<16||32>8-r,t.push(e[c]&(1<<8-r)-1),r+=3);var d=o.arrayify(h.sha256(e))[0],f=e.length/4;return d&=v(f),t[t.length-1]<<=f,t[t.length-1]|=d>>8-f,(a=a||n.langEn).join(t.map((function(e){return a.getWord(e)})))}t.HDNode=w,t.fromExtendedKey=function(e){var a=d.Base58.decode(e);82===a.length&&y(a.slice(0,78))===e||c.throwError("invalid extended key",c.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"});var t=a[4],r=o.hexlify(a.slice(5,9)),n=parseInt(o.hexlify(a.slice(9,13)).substring(2),16),f=o.hexlify(a.slice(13,45)),i=a.slice(45,78);switch(o.hexlify(a.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new w(k,null,o.hexlify(i),r,f,n,t,null,null);case"0x0488ade4":case"0x04358394":if(0!==i[0])break;return new w(k,o.hexlify(i.slice(1)),null,r,f,n,t,null,null)}return c.throwError("invalid extended key",c.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"})},t.fromMnemonic=function(e,a,t){return _(E(e=H(N(e,a),a),t),e)},t.fromSeed=function(e){return _(e,null)},t.mnemonicToSeed=E,t.mnemonicToEntropy=N,t.entropyToMnemonic=H,t.isValidMnemonic=function(e,a){try{return N(e,a),!0}catch(e){}return!1}},{"../errors":5,"../wordlists/lang-en":90,"./basex":62,"./bignumber":63,"./bytes":64,"./hmac":67,"./pbkdf2":73,"./properties":74,"./secp256k1":77,"./sha2":79,"./utf8":85}],67:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c,n=r(e("hash.js")),d=e("../utils/bytes"),o=r(e("../errors"));(e=c=t.SupportedAlgorithms||(t.SupportedAlgorithms={})).sha256="sha256",e.sha512="sha512",t.computeHmac=function(e,a,t){return c[e]||o.throwError("unsupported algorithm "+e,o.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),d.arrayify(n.hmac(n[e],d.arrayify(a)).update(d.arrayify(t)).digest())}},{"../errors":5,"../utils/bytes":64,"hash.js":26}],68:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c=e("./abi-coder");t.AbiCoder=c.AbiCoder,t.defaultAbiCoder=c.defaultAbiCoder,t.formatSignature=c.formatSignature,t.formatParamType=c.formatParamType,t.parseSignature=c.parseSignature,t.parseParamType=c.parseParamType,c=e("./address"),t.getAddress=c.getAddress,t.getContractAddress=c.getContractAddress,t.getCreate2Address=c.getCreate2Address,t.getIcapAddress=c.getIcapAddress,c=r(e("./base64")),t.base64=c,c=e("./bignumber"),t.BigNumber=c.BigNumber,t.bigNumberify=c.bigNumberify,c=e("./bytes"),t.arrayify=c.arrayify,t.concat=c.concat,t.hexDataSlice=c.hexDataSlice,t.hexDataLength=c.hexDataLength,t.hexlify=c.hexlify,t.hexStripZeros=c.hexStripZeros,t.hexZeroPad=c.hexZeroPad,t.isHexString=c.isHexString,t.joinSignature=c.joinSignature,t.padZeros=c.padZeros,t.splitSignature=c.splitSignature,t.stripZeros=c.stripZeros,c=e("./hash"),t.hashMessage=c.hashMessage,t.id=c.id,t.namehash=c.namehash,c=r(e("./hdnode")),t.HDNode=c,c=e("./interface"),t.Interface=c.Interface,c=e("./json-wallet"),t.getJsonWalletAddress=c.getJsonWalletAddress,c=e("./keccak256"),t.keccak256=c.keccak256,c=e("./sha2"),t.sha256=c.sha256,c=e("./solidity"),t.solidityKeccak256=c.keccak256,t.solidityPack=c.pack,t.soliditySha256=c.sha256,c=e("./random-bytes"),t.randomBytes=c.randomBytes,c=e("./networks"),t.getNetwork=c.getNetwork,c=e("./properties"),t.checkProperties=c.checkProperties,t.deepCopy=c.deepCopy,t.defineReadOnly=c.defineReadOnly,t.resolveProperties=c.resolveProperties,t.shallowCopy=c.shallowCopy,r=r(e("./rlp")),t.RLP=r,r=e("./secp256k1"),t.computeAddress=r.computeAddress,t.computePublicKey=r.computePublicKey,t.recoverAddress=r.recoverAddress,t.recoverPublicKey=r.recoverPublicKey,t.verifyMessage=r.verifyMessage,r=e("./signing-key"),t.SigningKey=r.SigningKey,r=e("./transaction"),t.populateTransaction=r.populateTransaction,r=e("./transaction"),t.parseTransaction=r.parse,t.serializeTransaction=r.serialize,r=e("./utf8"),t.formatBytes32String=r.formatBytes32String,t.parseBytes32String=r.parseBytes32String,t.toUtf8Bytes=r.toUtf8Bytes,t.toUtf8String=r.toUtf8String,r=e("./units"),t.commify=r.commify,t.formatEther=r.formatEther,t.parseEther=r.parseEther,t.formatUnits=r.formatUnits,t.parseUnits=r.parseUnits,r=e("./web"),t.fetchJson=r.fetchJson,t.poll=r.poll,r=e("./hmac"),t.SupportedAlgorithms=r.SupportedAlgorithms,r=e("./utf8"),t.UnicodeNormalizationForm=r.UnicodeNormalizationForm,e=e("./wordlist"),t.Wordlist=e.Wordlist},{"./abi-coder":59,"./address":60,"./base64":61,"./bignumber":63,"./bytes":64,"./hash":65,"./hdnode":66,"./hmac":67,"./interface":69,"./json-wallet":70,"./keccak256":71,"./networks":72,"./properties":74,"./random-bytes":75,"./rlp":76,"./secp256k1":77,"./sha2":79,"./signing-key":81,"./solidity":82,"./transaction":83,"./units":84,"./utf8":85,"./web":86,"./wordlist":87}],69:[function(e,a,t){"use strict";var r,c=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},function(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var d,o=e("./address"),f=e("./abi-coder"),i=e("./bignumber"),s=e("./bytes"),b=e("./hash"),l=e("./keccak256"),u=e("./properties"),h=n(e("../errors")),x=function(e){u.setType(this,"Indexed"),u.defineReadOnly(this,"hash",e)},p=(e=function(e){for(var a in u.setType(this,"Description"),e)u.defineReadOnly(this,a,u.deepCopy(e[a],!0));Object.freeze(this)},c(m,d=e),m.prototype.encode=function(e,a){s.isHexString(e)||h.throwError("invalid contract bytecode",h.INVALID_ARGUMENT,{arg:"bytecode",value:e}),h.checkArgumentCount(a.length,this.inputs.length," in Interface constructor");try{return e+f.defaultAbiCoder.encode(this.inputs,a).substring(2)}catch(e){h.throwError("invalid constructor argument",h.INVALID_ARGUMENT,{arg:e.arg,reason:e.reason,value:e.value})}return null},m);function m(){return null!==d&&d.apply(this,arguments)||this}var v,g=(c(y,v=e),y.prototype.encode=function(e){h.checkArgumentCount(e.length,this.inputs.length," in interface function "+this.name);try{return this.sighash+f.defaultAbiCoder.encode(this.inputs,e).substring(2)}catch(e){h.throwError("invalid input argument",h.INVALID_ARGUMENT,{arg:e.arg,reason:e.reason,value:e.value})}return null},y.prototype.decode=function(a){try{return f.defaultAbiCoder.decode(this.outputs,s.arrayify(a))}catch(e){h.throwError("invalid data for function output",h.INVALID_ARGUMENT,{arg:"data",errorArg:e.arg,errorValue:e.value,value:a,reason:e.reason})}},y);function y(){return null!==v&&v.apply(this,arguments)||this}var k,w=(c(I,k=e),I);function I(){return null!==k&&k.apply(this,arguments)||this}var _,E=(c(N,_=e),N.prototype.encodeTopics=function(e){var a=this;e.length>this.inputs.length&&h.throwError("too many arguments for "+this.name,h.UNEXPECTED_ARGUMENT,{maxCount:e.length,expectedCount:this.inputs.length});var t=[];for(this.anonymous||t.push(this.topic),e.forEach((function(e,r){var c=a.inputs[r];c.indexed?null==e?t.push(null):"string"===c.type?t.push(b.id(e)):"bytes"===c.type?t.push(l.keccak256(e)):-1!==c.type.indexOf("[")||"tuple"===c.type.substring(0,5)?h.throwError("filtering with tuples or arrays not implemented yet; bug us on GitHub",h.NOT_IMPLEMENTED,{operation:"filter(array|tuple)"}):("address"===c.type&&o.getAddress(e),t.push(s.hexZeroPad(s.hexlify(e),32).toLowerCase())):null!=e&&h.throwError("cannot filter non-indexed parameters; must be null",h.INVALID_ARGUMENT,{argument:c.name||r,value:e})}));t.length&&null===t[t.length-1];)t.pop();return t},N.prototype.decode=function(e,a){null==a||this.anonymous||(a=a.slice(1));var t,r=[],c=[],n=[];this.inputs.forEach((function(e,a){e.indexed?"string"===e.type||"bytes"===e.type||0<=e.type.indexOf("[")||"tuple"===e.type.substring(0,5)?(r.push({type:"bytes32",name:e.name||""}),n.push(!0)):(r.push(e),n.push(!1)):(c.push(e),n.push(!1))})),null!=a&&(t=f.defaultAbiCoder.decode(r,s.concat(a)));var d=f.defaultAbiCoder.decode(c,s.arrayify(e)),o={},i=0,b=0;return this.inputs.forEach((function(e,r){e.indexed?null==a?o[r]=new x(null):n[r]?o[r]=new x(t[b++]):o[r]=t[b++]:o[r]=d[i++],e.name&&(o[e.name]=o[r])})),o.length=this.inputs.length,new w(o)},N);function N(){return null!==_&&_.apply(this,arguments)||this}var H,S=(c(A,H=e),A);function A(){return null!==H&&H.apply(this,arguments)||this}var M,T=(c(P,M=e),P);function P(){return null!==M&&M.apply(this,arguments)||this}function O(e){switch(e.type){case"constructor":var a=new p({inputs:e.inputs,payable:null==e.payable||!!e.payable});this.deployFunction||(this.deployFunction=a);break;case"function":var t=f.formatSignature(e).replace(/tuple/g,""),r=b.id(t).substring(0,10),c=!1;null!=e.constant?c=e.constant:null!=e.stateMutability&&(c="view"==e.stateMutability||"pure"==e.stateMutability),a=new g({inputs:e.inputs,outputs:e.outputs,gas:e.gas,payable:null==e.payable||!!e.payable,type:c?"call":"transaction",name:e.name,signature:t,sighash:r}),e.name&&(null==this.functions[e.name]?u.defineReadOnly(this.functions,e.name,a):h.warn("WARNING: Multiple definitions for "+e.name)),null==this.functions[a.signature]&&u.defineReadOnly(this.functions,a.signature,a);break;case"event":t=f.formatSignature(e).replace(/tuple/g,""),a=new E({name:e.name,signature:t,inputs:e.inputs,topic:b.id(t),anonymous:!!e.anonymous}),e.name&&null==this.events[e.name]&&u.defineReadOnly(this.events,e.name,a),null==this.events[a.signature]&&u.defineReadOnly(this.events,a.signature,a);break;case"receive":case"fallback":break;default:h.warn("WARNING: unsupported ABI type - "+e.type)}}function C(a){if(h.checkNew(this,C),"string"==typeof a){try{a=JSON.parse(a)}catch(e){h.throwError("could not parse ABI JSON",h.INVALID_ARGUMENT,{arg:"abi",errorMessage:e.message,value:a})}if(!Array.isArray(a))return h.throwError("invalid abi",h.INVALID_ARGUMENT,{arg:"abi",value:a}),null}u.defineReadOnly(this,"functions",{}),u.defineReadOnly(this,"events",{});var t=[];a.forEach((function(e){"string"==typeof e&&(e=f.parseSignature(e)),t.push(e)})),u.defineReadOnly(this,"abi",u.deepCopy(t,!0)),t.forEach(O,this),this.deployFunction||O.call(this,{type:"constructor",inputs:[]}),u.setType(this,"Interface")}C.prototype.parseTransaction=function(e){var a,t=e.data.substring(0,10).toLowerCase();for(a in this.functions)if(-1!==a.indexOf("(")){var r=this.functions[a];if(r.sighash===t){var c=f.defaultAbiCoder.decode(r.inputs,"0x"+e.data.substring(10));return new S({args:c,decode:r.decode,name:r.name,signature:r.signature,sighash:r.sighash,value:i.bigNumberify(e.value||"0")})}}return null},C.prototype.parseLog=function(e){for(var a in this.events)if(-1!==a.indexOf("(")&&!(a=this.events[a]).anonymous&&a.topic===e.topics[0])return new T({decode:a.decode,name:a.name,signature:a.signature,topic:a.topic,values:a.decode(e.data,e.topics)});return null},C.isInterface=function(e){return u.isType(e,"Interface")},C.isIndexed=function(e){return u.isType(e,"Indexed")},e=C,t.Interface=e},{"../errors":5,"./abi-coder":59,"./address":60,"./bignumber":63,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74}],70:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./address");function c(e){try{var a=JSON.parse(e)}catch(e){return!1}return a.encseed&&a.ethaddr}function n(e){try{var a=JSON.parse(e)}catch(e){return!1}return!(!a.version||parseInt(a.version)!==a.version||3!==parseInt(a.version))}t.isCrowdsaleWallet=c,t.isSecretStorageWallet=n,t.getJsonWalletAddress=function(e){if(c(e))try{return r.getAddress(JSON.parse(e).ethaddr)}catch(e){return null}if(n(e))try{return r.getAddress(JSON.parse(e).address)}catch(e){return null}return null}},{"./address":60}],71:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("js-sha3"),c=e("./bytes");t.keccak256=function(e){return"0x"+r.keccak_256(c.arrayify(e))}},{"./bytes":64,"js-sha3":40}],72:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c=r(e("../errors"));function n(e){return function(a){var t=[];return a.InfuraProvider&&t.push(new a.InfuraProvider(e)),a.EtherscanProvider&&t.push(new a.EtherscanProvider(e)),0===t.length?null:a.FallbackProvider?new a.FallbackProvider(t):t[0]}}function d(e,a){return function(t){return t.JsonRpcProvider?new t.JsonRpcProvider(e,a):null}}var o={unspecified:{chainId:0,name:"unspecified"},homestead:r={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:n("homestead")},mainnet:r,morden:{chainId:2,name:"morden"},ropsten:e={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:n("ropsten")},testnet:e,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:n("rinkeby")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:n("goerli")},kovan:{chainId:42,name:"kovan",_defaultProvider:n("kovan")},classic:{chainId:61,name:"classic",_defaultProvider:d("https://web3.gastracker.io","classic")},classicTestnet:{chainId:62,name:"classicTestnet",_defaultProvider:d("https://web3.gastracker.io/morden","classicTestnet")}};t.getNetwork=function(e){if(null==e)return null;if("number"==typeof e){for(var a in o)if((a=o[a]).chainId===e)return{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress||null,_defaultProvider:a._defaultProvider||null};return{chainId:e,name:"unknown"}}if("string"!=typeof e)return(t=o[e.name])?(0!==e.chainId&&e.chainId!==t.chainId&&c.throwError("network chainId mismatch",c.INVALID_ARGUMENT,{arg:"network",value:e}),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:e._defaultProvider||t._defaultProvider||null}):("number"!=typeof e.chainId&&c.throwError("invalid network chainId",c.INVALID_ARGUMENT,{arg:"network",value:e}),e);var t=o[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}},{"../errors":5}],73:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../utils/bytes"),c=e("./hmac");t.pbkdf2=function(e,a,t,n,d){var o;e=r.arrayify(e),a=r.arrayify(a);var f,i,s=1,b=new Uint8Array(n),l=new Uint8Array(a.length+4);l.set(a);for(var u=1;u<=s;u++){l[a.length]=u>>24&255,l[a.length+1]=u>>16&255,l[a.length+2]=u>>8&255,l[a.length+3]=255&u;var h=c.computeHmac(d,e,l);o||(o=h.length,i=new Uint8Array(o),f=n-((s=Math.ceil(n/o))-1)*o),i.set(h);for(var x=1;x>=8;return a}function n(e,a,t){for(var r=0,c=0;ce.length)throw new Error("too short");if(a+1+t+(c=n(e,a+1,t))>e.length)throw new Error("to short");return d(e,a,a+1+t,t+c)}if(192<=e[a]){if(a+1+(c=e[a]-192)>e.length)throw new Error("invalid rlp data");return d(e,a,a+1,c)}if(184<=e[a]){var t;if(a+1+(t=e[a]-183)>e.length)throw new Error("invalid rlp data");if(a+1+t+(c=n(e,a+1,t))>e.length)throw new Error("invalid rlp data");return{consumed:1+t+c,result:r.hexlify(e.slice(a+1+t,a+1+t+c))}}if(128<=e[a]){var c;if(a+1+(c=e[a]-128)>e.length)throw new Error("invalid rlp data");return{consumed:1+c,result:r.hexlify(e.slice(a+1,a+1+c))}}return{consumed:1,result:r.hexlify(e[a])}}t.encode=function(e){return r.hexlify(function e(a){if(Array.isArray(a)){var t=[];return a.forEach((function(a){t=t.concat(e(a))})),t.length<=55?(t.unshift(192+t.length),t):((n=c(t.length)).unshift(247+n.length),n.concat(t))}var n;return 1===(a=Array.prototype.slice.call(r.arrayify(a))).length&&a[0]<=127?a:a.length<=55?(a.unshift(128+a.length),a):((n=c(a.length)).unshift(183+n.length),n.concat(a))}(e))},t.decode=function(e){var a=r.arrayify(e);if((e=o(a,0)).consumed!==a.length)throw new Error("invalid rlp data");return e.result}},{"./bytes":64}],77:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c=e("elliptic"),n=e("./address"),d=e("./bytes"),o=e("./hash"),f=e("./keccak256"),i=e("./properties"),s=r(e("../errors")),b=null;function l(){return b=b||new c.ec("secp256k1")}var u=(h.prototype.sign=function(e){return{recoveryParam:(e=l().keyFromPrivate(d.arrayify(this.privateKey)).sign(d.arrayify(e),{canonical:!0})).recoveryParam,r:d.hexZeroPad("0x"+e.r.toString(16),32),s:d.hexZeroPad("0x"+e.s.toString(16),32),v:27+e.recoveryParam}},h.prototype.computeSharedSecret=function(e){var a=l().keyFromPrivate(d.arrayify(this.privateKey));return e=l().keyFromPublic(d.arrayify(x(e))),d.hexZeroPad("0x"+a.derive(e.getPublic()).toString(16),32)},h.prototype._addPoint=function(e){var a=l().keyFromPublic(d.arrayify(this.publicKey));return e=l().keyFromPublic(d.arrayify(e)),"0x"+a.pub.add(e.pub).encodeCompressed("hex")},h);function h(e){e=l().keyFromPrivate(d.arrayify(e)),i.defineReadOnly(this,"privateKey",d.hexlify(e.priv.toArray("be",32))),i.defineReadOnly(this,"publicKey","0x"+e.getPublic(!1,"hex")),i.defineReadOnly(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),i.defineReadOnly(this,"publicKeyBytes",e.getPublic().encode(null,!0))}function x(e,a){return 32!==(e=d.arrayify(e)).length?33===e.length?a?d.hexlify(e):"0x"+l().keyFromPublic(e).getPublic(!1,"hex"):65===e.length?a?"0x"+l().keyFromPublic(e).getPublic(!0,"hex"):d.hexlify(e):(s.throwError("invalid public or private key",s.INVALID_ARGUMENT,{arg:"key",value:"[REDACTED]"}),null):(e=new u(e),a?e.compressedPublicKey:e.publicKey)}function p(e){return e="0x"+x(e).slice(4),n.getAddress("0x"+f.keccak256(e).substring(26))}function m(e,a){var t=d.splitSignature(a);return a={r:d.arrayify(t.r),s:d.arrayify(t.s)},"0x"+l().recoverPubKey(d.arrayify(e),a,t.recoveryParam).encode("hex",!1)}function v(e,a){return p(m(d.arrayify(e),a))}t.KeyPair=u,t.computePublicKey=x,t.computeAddress=p,t.recoverPublicKey=m,t.recoverAddress=v,t.verifyMessage=function(e,a){return v(o.hashMessage(e),a)}},{"../errors":5,"./address":60,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74,elliptic:12}],78:[function(e,a,t){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var n=r(e("aes-js")),d=r(e("scrypt-js")),o=r(e("uuid")),f=e("./signing-key"),i=c(e("./hdnode")),s=e("./address"),b=e("./bytes"),l=e("./pbkdf2"),u=e("./keccak256"),h=e("./utf8"),x=e("./random-bytes");function p(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),b.arrayify(e)}function m(e,a){for(e=String(e);e.lengtha.maxLength&&n.throwError("invalid length for "+a.name,n.INVALID_ARGUMENT,{arg:"transaction"+a.name,value:r}),t.push(i.hexlify(r))})),null!=e.chainId&&0!==e.chainId&&(t.push(i.hexlify(e.chainId)),t.push("0x"),t.push("0x"));var r=l.encode(t);return a?(a=27+(r=i.splitSignature(a)).recoveryParam,9===t.length&&(t.pop(),t.pop(),t.pop(),a+=2*e.chainId+8),t.push(i.hexlify(a)),t.push(i.stripZeros(i.arrayify(r.r))),t.push(i.stripZeros(i.arrayify(r.s))),l.encode(t)):r},t.parse=function(e){9!==(r=l.decode(e)).length&&6!==r.length&&n.throwError("invalid raw transaction",n.INVALID_ARGUMENT,{arg:"rawTransactin",value:e});var a={nonce:h(r[0]).toNumber(),gasPrice:h(r[1]),gasLimit:h(r[2]),to:"0x"===(t=r[3])?null:o.getAddress(t),value:h(r[4]),data:r[5],chainId:0};if(6===r.length)return a;try{a.v=f.bigNumberify(r[6]).toNumber()}catch(e){return n.info(e),a}if(a.r=i.hexZeroPad(r[7],32),a.s=i.hexZeroPad(r[8],32),f.bigNumberify(a.r).isZero()&&f.bigNumberify(a.s).isZero())a.chainId=a.v,a.v=0;else{a.chainId=Math.floor((a.v-35)/2),a.chainId<0&&(a.chainId=0);var t=a.v-27,r=r.slice(0,6);0!==a.chainId&&(r.push(i.hexlify(a.chainId)),r.push("0x"),r.push("0x"),t-=2*a.chainId+8),r=s.keccak256(l.encode(r));try{a.from=d.recoverAddress(r,{r:i.hexlify(a.r),s:i.hexlify(a.s),recoveryParam:t})}catch(e){n.info(e)}a.hash=s.keccak256(e)}return a},t.populateTransaction=function(e,a,t){u.Provider.isProvider(a)||n.throwError("missing provider",n.INVALID_ARGUMENT,{argument:"provider",value:a}),b.checkProperties(e,p);var r=b.shallowCopy(e);return null!=r.to&&(r.to=a.resolveName(r.to)),null==r.gasPrice&&(r.gasPrice=a.getGasPrice()),null==r.nonce&&(r.nonce=a.getTransactionCount(t)),null==r.gasLimit&&((e=b.shallowCopy(r)).from=t,r.gasLimit=a.estimateGas(e)),null==r.chainId&&(r.chainId=a.getNetwork().then((function(e){return e.chainId}))),b.resolveProperties(r)}},{"../constants":3,"../errors":5,"../providers/abstract-provider":50,"./address":60,"./bignumber":63,"./bytes":64,"./keccak256":71,"./properties":74,"./rlp":76,"./secp256k1":77}],84:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c,n=e("../constants"),d=r(e("../errors")),o=e("./bignumber"),f={};function i(e){return{decimals:e.length-1,tenPower:o.bigNumberify(e)}}function s(e){var a=f[String(e).toLowerCase()];if(!a&&"number"==typeof e&&parseInt(String(e))==e&&0<=e&&e<=256){for(var t="1",r=0;rt.decimals&&d.throwError("underflow occurred",d.NUMERIC_FAULT,{operation:"division",fault:"underflow"});c.length>6|192),t.push(63&o|128);else if(55296==(64512&o)){c++;var f=e.charCodeAt(c);if(c>=e.length||56320!=(64512&f))throw new Error("invalid utf-8 string");t.push((o=65536+((1023&o)<<10)+(1023&f))>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128)}else t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128)}return d.arrayify(t)}function f(e,a){e=d.arrayify(e);for(var t="",r=0;r>7!=0){var n=null,o=null;if(192==(224&c))n=1,o=127;else if(224==(240&c))n=2,o=2047;else{if(240!=(248&c)){if(a)continue;if(128==(192&c))throw new Error("invalid utf8 byte sequence; unexpected continuation byte");throw new Error("invalid utf8 byte sequence; invalid prefix")}n=3,o=65535}if(r+n>e.length){if(!a)throw new Error("invalid utf8 byte sequence; too short");for(;r>6==2;r++);}else{for(var f=c&(1<<8-n-1)-1,i=0;i>10&1023),56320+(1023&f)));else if(!a)throw new Error("invalid utf8 byte sequence; invalid continuation byte")}}else t+=String.fromCharCode(c)}return t}(e=r=t.UnicodeNormalizationForm||(t.UnicodeNormalizationForm={})).current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD",t.toUtf8Bytes=o,t.toUtf8String=f,t.formatBytes32String=function(e){if(31<(e=o(e)).length)throw new Error("bytes32 string must be less than 32 bytes");return d.hexlify(d.concat([e,c.HashZero]).slice(0,32))},t.parseBytes32String=function(e){var a=d.arrayify(e);if(32!==a.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==a[31])throw new Error("invalid bytes32 string - no null terminator");for(var t=31;0===a[t-1];)t--;return f(a.slice(0,t))}},{"../constants":3,"../errors":5,"./bytes":64}],86:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c=e("xmlhttprequest"),n=e("./base64"),d=e("./properties"),o=e("./utf8"),f=r(e("../errors"));t.fetchJson=function(e,a,t){var r,d={},i=null,s=12e4;if("string"==typeof e)i=e;else if("object"==typeof e){if(null==e.url&&f.throwError("missing URL",f.MISSING_ARGUMENT,{arg:"url"}),i=e.url,"number"==typeof e.timeout&&0a.ceiling&&(e=a.ceiling),o&&(f--,e=o,o=null),setTimeout(c,e)),null}),(function(e){d()&&r(e)}))}()}))}},{"../errors":5,"./base64":61,"./properties":74,"./utf8":85,xmlhttprequest:49}],87:[function(e,a,r){(function(a){(function(){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=e("../utils/hash"),t=e("../utils/properties");r.check=function(e){for(var t=[],r=0;r<2048;r++){var c=e.getWord(r);if(r!==e.getWordIndex(c))return"0x";t.push(c)}return a.id(t.join("\n")+"\n")};var c=(n.prototype.split=function(e){return e.toLowerCase().split(/ +/g)},n.prototype.join=function(e){return e.join(" ")},n);function n(e){t.defineReadOnly(this,"locale",e)}r.Wordlist=c,r.register=function(e,a){a=a||e.locale}}).call(this)}).call(this,"undefined"!=typeof t.g?t.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/hash":65,"../utils/properties":74}],88:[function(e,a,t){"use strict";var r,c=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},function(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var d,o=e("./utils/bytes"),f=e("./utils/hash"),i=e("./utils/hdnode"),s=e("./utils/json-wallet"),b=e("./utils/keccak256"),l=e("./utils/properties"),u=e("./utils/random-bytes"),h=n(e("./utils/secret-storage")),x=e("./utils/signing-key"),p=e("./utils/transaction"),m=e("./abstract-signer"),v=e("./providers/abstract-provider"),g=n(e("./errors"));function y(e,a){var t=d.call(this)||this;return g.checkNew(t,y),x.SigningKey.isSigningKey(e)?l.defineReadOnly(t,"signingKey",e):l.defineReadOnly(t,"signingKey",new x.SigningKey(e)),l.defineReadOnly(t,"provider",a),t}c(y,d=m.Signer),Object.defineProperty(y.prototype,"address",{get:function(){return this.signingKey.address},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"mnemonic",{get:function(){return this.signingKey.mnemonic},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"path",{get:function(){return this.signingKey.path},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"privateKey",{get:function(){return this.signingKey.privateKey},enumerable:!0,configurable:!0}),y.prototype.connect=function(e){return v.Provider.isProvider(e)||g.throwError("invalid provider",g.INVALID_ARGUMENT,{argument:"provider",value:e}),new y(this.signingKey,e)},y.prototype.getAddress=function(){return Promise.resolve(this.address)},y.prototype.sign=function(e){var a=this;return l.resolveProperties(e).then((function(e){var t=p.serialize(e);return t=a.signingKey.signDigest(b.keccak256(t)),p.serialize(e,t)}))},y.prototype.signMessage=function(e){return Promise.resolve(o.joinSignature(this.signingKey.signDigest(f.hashMessage(e))))},y.prototype.getBalance=function(e){if(!this.provider)throw new Error("missing provider");return this.provider.getBalance(this.address,e)},y.prototype.getTransactionCount=function(e){if(!this.provider)throw new Error("missing provider");return this.provider.getTransactionCount(this.address,e)},y.prototype.sendTransaction=function(e){var a=this;if(!this.provider)throw new Error("missing provider");return null==e.nonce&&((e=l.shallowCopy(e)).nonce=this.getTransactionCount("pending")),p.populateTransaction(e,this.provider,this.address).then((function(e){return a.sign(e).then((function(e){return a.provider.sendTransaction(e)}))}))},y.prototype.encrypt=function(e,a,t){if("function"!=typeof a||t||(t=a,a={}),t&&"function"!=typeof t)throw new Error("invalid callback");return a=a||{},this.mnemonic&&((a=l.shallowCopy(a)).mnemonic=this.mnemonic,a.path=this.path),h.encrypt(this.privateKey,e,a,t)},y.createRandom=function(e){var a=u.randomBytes(16);return(e=e||{}).extraEntropy&&(a=o.arrayify(b.keccak256(o.concat([a,e.extraEntropy])).substring(0,34))),a=i.entropyToMnemonic(a,e.locale),y.fromMnemonic(a,e.path,e.locale)},y.fromEncryptedJson=function(e,a,t){if(s.isCrowdsaleWallet(e))try{t&&t(0);var r=h.decryptCrowdsale(e,a);return t&&t(1),Promise.resolve(new y(r))}catch(e){return Promise.reject(e)}else if(s.isSecretStorageWallet(e))return h.decrypt(e,a,t).then((function(e){return new y(e)}));return Promise.reject("invalid wallet JSON")},y.fromMnemonic=function(e,a,t){return a=a||i.defaultPath,new y(i.fromMnemonic(e,t).derivePath(a))},c=y,t.Wallet=c},{"./abstract-signer":2,"./errors":5,"./providers/abstract-provider":50,"./utils/bytes":64,"./utils/hash":65,"./utils/hdnode":66,"./utils/json-wallet":70,"./utils/keccak256":71,"./utils/properties":74,"./utils/random-bytes":75,"./utils/secret-storage":78,"./utils/signing-key":81,"./utils/transaction":83}],89:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e=e("../wordlists/lang-en").langEn,t.en=e},{"../wordlists/lang-en":90}],90:[function(e,a,t){"use strict";var r,c=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},function(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)});Object.defineProperty(t,"__esModule",{value:!0});var n,d=e("../utils/wordlist"),o="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",f=null;function i(e){if(null==f&&(f=o.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==d.check(e)))throw f=null,new Error("BIP39 Wordlist for en (English) FAILED")}function s(){return n.call(this,"en")||this}c=new(c(s,n=d.Wordlist),s.prototype.getWord=function(e){return i(this),f[e]},s.prototype.getWordIndex=function(e){return i(this),f.indexOf(e)},s),t.langEn=c,d.register(c)},{"../utils/wordlist":87}]},{},[7])(7)},53828:function(e,a,t){var r,c=t(1426);!function(){"use strict";var n="input is invalid type",d="object"===typeof window,o=d?window:{};o.JS_SHA3_NO_WINDOW&&(d=!1);var f=!d&&"object"===typeof self;!o.JS_SHA3_NO_NODE_JS&&"object"===typeof c&&c.versions&&c.versions.node?o=t.g:f&&(o=self);var i=!o.JS_SHA3_NO_COMMON_JS&&e.exports,s=t.amdO,b=!o.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,l="0123456789abcdef".split(""),u=[4,1024,262144,67108864],h=[0,8,16,24],x=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],p=[224,256,384,512],m=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],g={128:168,256:136};!o.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!b||!o.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var y=function(e,a,t){return function(r){return new R(e,a,e).update(r)[t]()}},k=function(e,a,t){return function(r,c){return new R(e,a,c).update(r)[t]()}},w=function(e,a,t){return function(a,r,c,n){return H["cshake"+e].update(a,r,c,n)[t]()}},I=function(e,a,t){return function(a,r,c,n){return H["kmac"+e].update(a,r,c,n)[t]()}},_=function(e,a,t,r){for(var c=0;c>5,this.byteCount=this.blockCount<<2,this.outputBlocks=t>>5,this.extraBytes=(31&t)>>3;for(var r=0;r<50;++r)this.s[r]=0}function D(e,a,t){R.call(this,e,a,t)}R.prototype.update=function(e){if(!this.finalized){var a,t=typeof e;if("string"!==t){if("object"!==t)throw n;if(null===e)throw n;if(b&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!b||!ArrayBuffer.isView(e)))throw n;a=!0}for(var r,c,d=this.blocks,o=this.byteCount,f=e.length,i=this.blockCount,s=0,l=this.s;s>2]|=e[s]<>2]|=c<>2]|=(192|c>>6)<>2]|=(128|63&c)<=57344?(d[r>>2]|=(224|c>>12)<>2]|=(128|c>>6&63)<>2]|=(128|63&c)<>2]|=(240|c>>18)<>2]|=(128|c>>12&63)<>2]|=(128|c>>6&63)<>2]|=(128|63&c)<=o){for(this.start=r-o,this.block=d[i],r=0;r>=8);t>0;)c.unshift(t),t=255&(e>>=8),++r;return a?c.push(r):c.unshift(r),this.update(c),c.length},R.prototype.encodeString=function(e){var a,t=typeof e;if("string"!==t){if("object"!==t)throw n;if(null===e)throw n;if(b&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!b||!ArrayBuffer.isView(e)))throw n;a=!0}var r=0,c=e.length;if(a)r=c;else for(var d=0;d=57344?r+=3:(o=65536+((1023&o)<<10|1023&e.charCodeAt(++d)),r+=4)}return r+=this.encode(8*r),this.update(e),r},R.prototype.bytepad=function(e,a){for(var t=this.encode(a),r=0;r>2]|=this.padding[3&a],this.lastByteIndex===this.byteCount)for(e[0]=e[t],a=1;a>4&15]+l[15&e]+l[e>>12&15]+l[e>>8&15]+l[e>>20&15]+l[e>>16&15]+l[e>>28&15]+l[e>>24&15];d%a===0&&(j(t),n=0)}return c&&(e=t[n],o+=l[e>>4&15]+l[15&e],c>1&&(o+=l[e>>12&15]+l[e>>8&15]),c>2&&(o+=l[e>>20&15]+l[e>>16&15])),o},R.prototype.arrayBuffer=function(){this.finalize();var e,a=this.blockCount,t=this.s,r=this.outputBlocks,c=this.extraBytes,n=0,d=0,o=this.outputBits>>3;e=c?new ArrayBuffer(r+1<<2):new ArrayBuffer(o);for(var f=new Uint32Array(e);d>8&255,f[e+2]=a>>16&255,f[e+3]=a>>24&255;o%t===0&&j(r)}return n&&(e=o<<2,a=r[d],f[e]=255&a,n>1&&(f[e+1]=a>>8&255),n>2&&(f[e+2]=a>>16&255)),f},D.prototype=new R,D.prototype.finalize=function(){return this.encode(this.outputBits,!0),R.prototype.finalize.call(this)};var j=function(e){var a,t,r,c,n,d,o,f,i,s,b,l,u,h,p,m,v,g,y,k,w,I,_,E,N,H,S,A,M,T,P,O,C,R,D,j,L,B,F,Z,U,z,q,V,W,K,G,Y,$,X,J,Q,ee,ae,te,re,ce,ne,de,oe,fe,ie,se;for(r=0;r<48;r+=2)c=e[0]^e[10]^e[20]^e[30]^e[40],n=e[1]^e[11]^e[21]^e[31]^e[41],d=e[2]^e[12]^e[22]^e[32]^e[42],o=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],i=e[5]^e[15]^e[25]^e[35]^e[45],s=e[6]^e[16]^e[26]^e[36]^e[46],b=e[7]^e[17]^e[27]^e[37]^e[47],a=(l=e[8]^e[18]^e[28]^e[38]^e[48])^(d<<1|o>>>31),t=(u=e[9]^e[19]^e[29]^e[39]^e[49])^(o<<1|d>>>31),e[0]^=a,e[1]^=t,e[10]^=a,e[11]^=t,e[20]^=a,e[21]^=t,e[30]^=a,e[31]^=t,e[40]^=a,e[41]^=t,a=c^(f<<1|i>>>31),t=n^(i<<1|f>>>31),e[2]^=a,e[3]^=t,e[12]^=a,e[13]^=t,e[22]^=a,e[23]^=t,e[32]^=a,e[33]^=t,e[42]^=a,e[43]^=t,a=d^(s<<1|b>>>31),t=o^(b<<1|s>>>31),e[4]^=a,e[5]^=t,e[14]^=a,e[15]^=t,e[24]^=a,e[25]^=t,e[34]^=a,e[35]^=t,e[44]^=a,e[45]^=t,a=f^(l<<1|u>>>31),t=i^(u<<1|l>>>31),e[6]^=a,e[7]^=t,e[16]^=a,e[17]^=t,e[26]^=a,e[27]^=t,e[36]^=a,e[37]^=t,e[46]^=a,e[47]^=t,a=s^(c<<1|n>>>31),t=b^(n<<1|c>>>31),e[8]^=a,e[9]^=t,e[18]^=a,e[19]^=t,e[28]^=a,e[29]^=t,e[38]^=a,e[39]^=t,e[48]^=a,e[49]^=t,h=e[0],p=e[1],K=e[11]<<4|e[10]>>>28,G=e[10]<<4|e[11]>>>28,A=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,oe=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,z=e[40]<<18|e[41]>>>14,q=e[41]<<18|e[40]>>>14,R=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,m=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,$=e[23]<<10|e[22]>>>22,T=e[33]<<13|e[32]>>>19,P=e[32]<<13|e[33]>>>19,ie=e[42]<<2|e[43]>>>30,se=e[43]<<2|e[42]>>>30,ae=e[5]<<30|e[4]>>>2,te=e[4]<<30|e[5]>>>2,j=e[14]<<6|e[15]>>>26,L=e[15]<<6|e[14]>>>26,g=e[25]<<11|e[24]>>>21,y=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,O=e[45]<<29|e[44]>>>3,C=e[44]<<29|e[45]>>>3,E=e[6]<<28|e[7]>>>4,N=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ce=e[16]<<23|e[17]>>>9,B=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,k=e[36]<<21|e[37]>>>11,w=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,V=e[8]<<27|e[9]>>>5,W=e[9]<<27|e[8]>>>5,H=e[18]<<20|e[19]>>>12,S=e[19]<<20|e[18]>>>12,ne=e[29]<<7|e[28]>>>25,de=e[28]<<7|e[29]>>>25,Z=e[38]<<8|e[39]>>>24,U=e[39]<<8|e[38]>>>24,I=e[48]<<14|e[49]>>>18,_=e[49]<<14|e[48]>>>18,e[0]=h^~m&g,e[1]=p^~v&y,e[10]=E^~H&A,e[11]=N^~S&M,e[20]=R^~j&B,e[21]=D^~L&F,e[30]=V^~K&Y,e[31]=W^~G&$,e[40]=ae^~re&ne,e[41]=te^~ce&de,e[2]=m^~g&k,e[3]=v^~y&w,e[12]=H^~A&T,e[13]=S^~M&P,e[22]=j^~B&Z,e[23]=L^~F&U,e[32]=K^~Y&X,e[33]=G^~$&J,e[42]=re^~ne&oe,e[43]=ce^~de&fe,e[4]=g^~k&I,e[5]=y^~w&_,e[14]=A^~T&O,e[15]=M^~P&C,e[24]=B^~Z&z,e[25]=F^~U&q,e[34]=Y^~X&Q,e[35]=$^~J&ee,e[44]=ne^~oe&ie,e[45]=de^~fe&se,e[6]=k^~I&h,e[7]=w^~_&p,e[16]=T^~O&E,e[17]=P^~C&N,e[26]=Z^~z&R,e[27]=U^~q&D,e[36]=X^~Q&V,e[37]=J^~ee&W,e[46]=oe^~ie&ae,e[47]=fe^~se&te,e[8]=I^~h&m,e[9]=_^~p&v,e[18]=O^~E&H,e[19]=C^~N&S,e[28]=z^~R&j,e[29]=q^~D&L,e[38]=Q^~V&K,e[39]=ee^~W&G,e[48]=ie^~ae&re,e[49]=se^~te&ce,e[0]^=x[r],e[1]^=x[r+1]};if(i)e.exports=H;else{for(A=0;A0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e},a.toBuffer=function(e){if(!h.isBuffer(e))if(Array.isArray(e))e=h.from(e);else if("string"===typeof e)e=a.isHexString(e)?h.from(a.padToEven(a.stripHexPrefix(e)),"hex"):h.from(e);else if("number"===typeof e)e=a.intToBuffer(e);else if(null===e||void 0===e)e=h.allocUnsafe(0);else if(l.isBN(e))e=e.toArrayLike(h);else{if(!e.toArray)throw new Error("invalid type");e=h.from(e.toArray())}return e},a.bufferToInt=function(e){return new l(a.toBuffer(e)).toNumber()},a.bufferToHex=function(e){return"0x"+(e=a.toBuffer(e)).toString("hex")},a.fromSigned=function(e){return new l(e).fromTwos(256)},a.toUnsigned=function(e){return h.from(e.toTwos(256).toArray())},a.keccak=function(e,t){switch(e=a.toBuffer(e),t||(t=256),t){case 224:return n(e);case 256:return o(e);case 384:return d(e);case 512:return f(e);default:throw new Error("Invald algorithm: keccak"+t)}},a.keccak256=function(e){return a.keccak(e)},a.sha3=a.keccak,a.sha256=function(e){return e=a.toBuffer(e),u("sha256").update(e).digest()},a.ripemd160=function(e,t){e=a.toBuffer(e);var r=u("rmd160").update(e).digest();return!0===t?a.setLength(r,32):r},a.rlphash=function(e){return a.keccak(b.encode(e))},a.isValidPrivate=function(e){return i.privateKeyVerify(e)},a.isValidPublic=function(e,a){return 64===e.length?i.publicKeyVerify(h.concat([h.from([4]),e])):!!a&&i.publicKeyVerify(e)},a.pubToAddress=a.publicToAddress=function(e,t){return e=a.toBuffer(e),t&&64!==e.length&&(e=i.publicKeyConvert(e,!1).slice(1)),s(64===e.length),a.keccak(e).slice(-20)};var x=a.privateToPublic=function(e){return e=a.toBuffer(e),i.publicKeyCreate(e,!1).slice(1)};a.importPublic=function(e){return 64!==(e=a.toBuffer(e)).length&&(e=i.publicKeyConvert(e,!1).slice(1)),e},a.ecsign=function(e,a){var t=i.sign(e,a),r={};return r.r=t.signature.slice(0,32),r.s=t.signature.slice(32,64),r.v=t.recovery+27,r},a.hashPersonalMessage=function(e){var t=a.toBuffer("\x19Ethereum Signed Message:\n"+e.length.toString());return a.keccak(h.concat([t,e]))},a.ecrecover=function(e,t,r,c){var n=h.concat([a.setLength(r,32),a.setLength(c,32)],64),d=t-27;if(0!==d&&1!==d)throw new Error("Invalid signature v value");var o=i.recover(e,n,d);return i.publicKeyConvert(o,!1).slice(1)},a.toRpcSig=function(e,t,r){if(27!==e&&28!==e)throw new Error("Invalid recovery id");return a.bufferToHex(h.concat([a.setLengthLeft(t,32),a.setLengthLeft(r,32),a.toBuffer(e-27)]))},a.fromRpcSig=function(e){if(65!==(e=a.toBuffer(e)).length)throw new Error("Invalid signature length");var t=e[64];return t<27&&(t+=27),{v:t,r:e.slice(0,32),s:e.slice(32,64)}},a.privateToAddress=function(e){return a.publicToAddress(x(e))},a.isValidAddress=function(e){return/^0x[0-9a-fA-F]{40}$/.test(e)},a.isZeroAddress=function(e){return a.zeroAddress()===a.addHexPrefix(e)},a.toChecksumAddress=function(e){e=a.stripHexPrefix(e).toLowerCase();for(var t=a.keccak(e).toString("hex"),r="0x",c=0;c=8?r+=e[c].toUpperCase():r+=e[c];return r},a.isValidChecksumAddress=function(e){return a.isValidAddress(e)&&a.toChecksumAddress(e)===e},a.generateAddress=function(e,t){return e=a.toBuffer(e),t=(t=new l(t)).isZero()?null:h.from(t.toArray()),a.rlphash([e,t]).slice(-20)},a.isPrecompiled=function(e){var t=a.unpad(e);return 1===t.length&&t[0]>=1&&t[0]<=8},a.addHexPrefix=function(e){return"string"!==typeof e||a.isHexPrefixed(e)?e:"0x"+e},a.isValidSignature=function(e,a,t,r){var c=new l("7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0",16),n=new l("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",16);return 32===a.length&&32===t.length&&((27===e||28===e)&&(a=new l(a),t=new l(t),!(a.isZero()||a.gt(n)||t.isZero()||t.gt(n))&&(!1!==r||1!==new l(t).cmp(c))))},a.baToJSON=function(e){if(h.isBuffer(e))return"0x"+e.toString("hex");if(e instanceof Array){for(var t=[],r=0;r=c.length,"The field "+t.name+" must not have more "+t.length+" bytes")):t.allowZero&&0===c.length||!t.length||s(t.length===c.length,"The field "+t.name+" must have byte length of "+t.length),e.raw[r]=c}e._fields.push(t.name),Object.defineProperty(e,t.name,{enumerable:!0,configurable:!0,get:c,set:n}),t.default&&(e[t.name]=t.default),t.alias&&Object.defineProperty(e,t.alias,{enumerable:!1,configurable:!0,set:n,get:c})})),c)if("string"===typeof c&&(c=h.from(a.stripHexPrefix(c),"hex")),h.isBuffer(c)&&(c=b.decode(c)),Array.isArray(c)){if(c.length>e._fields.length)throw new Error("wrong number of fields in data");c.forEach((function(t,r){e[e._fields[r]]=a.toBuffer(t)}))}else{if("object"!==("undefined"===typeof c?"undefined":r(c)))throw new Error("invalid data");var n=Object.keys(c);t.forEach((function(a){-1!==n.indexOf(a.name)&&(e[a.name]=c[a.name]),-1!==n.indexOf(a.alias)&&(e[a.alias]=c[a.alias])}))}}},99024:function(e,a,t){"use strict";var r=t(19778).Buffer,c=t(30013),n=t(9872),d=t(48826),o=function(e){return 32===e.length&&c.privateKeyVerify(Uint8Array.from(e))};e.exports={privateKeyVerify:o,privateKeyExport:function(e,a){if(32!==e.length)throw new RangeError("private key length is invalid");var t=n.privateKeyExport(e,a);return d.privateKeyExport(e,t,a)},privateKeyImport:function(e){if(null!==(e=d.privateKeyImport(e))&&32===e.length&&o(e))return e;throw new Error("couldn't import from DER format")},privateKeyNegate:function(e){return r.from(c.privateKeyNegate(Uint8Array.from(e)))},privateKeyModInverse:function(e){if(32!==e.length)throw new Error("private key length is invalid");return r.from(n.privateKeyModInverse(Uint8Array.from(e)))},privateKeyTweakAdd:function(e,a){return r.from(c.privateKeyTweakAdd(Uint8Array.from(e),a))},privateKeyTweakMul:function(e,a){return r.from(c.privateKeyTweakMul(Uint8Array.from(e),Uint8Array.from(a)))},publicKeyCreate:function(e,a){return r.from(c.publicKeyCreate(Uint8Array.from(e),a))},publicKeyConvert:function(e,a){return r.from(c.publicKeyConvert(Uint8Array.from(e),a))},publicKeyVerify:function(e){return(33===e.length||65===e.length)&&c.publicKeyVerify(Uint8Array.from(e))},publicKeyTweakAdd:function(e,a,t){return r.from(c.publicKeyTweakAdd(Uint8Array.from(e),Uint8Array.from(a),t))},publicKeyTweakMul:function(e,a,t){return r.from(c.publicKeyTweakMul(Uint8Array.from(e),Uint8Array.from(a),t))},publicKeyCombine:function(e,a){var t=[];return e.forEach((function(e){t.push(Uint8Array.from(e))})),r.from(c.publicKeyCombine(t,a))},signatureNormalize:function(e){return r.from(c.signatureNormalize(Uint8Array.from(e)))},signatureExport:function(e){return r.from(c.signatureExport(Uint8Array.from(e)))},signatureImport:function(e){return r.from(c.signatureImport(Uint8Array.from(e)))},signatureImportLax:function(e){if(0===e.length)throw new RangeError("signature length is invalid");var a=d.signatureImportLax(e);if(null===a)throw new Error("couldn't parse DER signature");return n.signatureImport(a)},sign:function(e,a,t){if(null===t)throw new TypeError("options should be an Object");var n=void 0;if(t){if(n={},null===t.data)throw new TypeError("options.data should be a Buffer");if(t.data){if(32!==t.data.length)throw new RangeError("options.data length is invalid");n.data=new Uint8Array(t.data)}if(null===t.noncefn)throw new TypeError("options.noncefn should be a Function");t.noncefn&&(n.noncefn=function(e,a,c,n,d){var o=null!=c?r.from(c):null,f=null!=n?r.from(n):null,i=r.from("");return t.noncefn&&(i=t.noncefn(r.from(e),r.from(a),o,f,d)),Uint8Array.from(i)})}var d=c.ecdsaSign(Uint8Array.from(e),Uint8Array.from(a),n);return{signature:r.from(d.signature),recovery:d.recid}},verify:function(e,a,t){return c.ecdsaVerify(Uint8Array.from(a),Uint8Array.from(e),t)},recover:function(e,a,t,n){return r.from(c.ecdsaRecover(Uint8Array.from(a),t,Uint8Array.from(e),n))},ecdh:function(e,a){return r.from(c.ecdh(Uint8Array.from(e),Uint8Array.from(a),{}))},ecdhUnsafe:function(e,a,t){if(33!==e.length&&65!==e.length)throw new RangeError("public key length is invalid");if(32!==a.length)throw new RangeError("private key length is invalid");return r.from(n.ecdhUnsafe(Uint8Array.from(e),Uint8Array.from(a),t))}}},48826:function(e,a,t){"use strict";var r=t(19778).Buffer,c=r.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),n=r.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);a.privateKeyExport=function(e,a,t){var d=r.from(t?c:n);return e.copy(d,t?8:9),a.copy(d,t?181:214),d},a.privateKeyImport=function(e){var a=e.length,t=0;if(a2)return null;if(a<(t+=1)+r)return null;var c=e[t+r-1]|(r>1?e[t+r-2]<<8:0);return a<(t+=r)+c||a32||ac)return null;if(2!==e[n++])return null;var o=e[n++];if(128&o){if(n+(d=o-128)>c)return null;for(;d>0&&0===e[n];n+=1,d-=1);for(o=0;d>0;n+=1,d-=1)o=(o<<8)+e[n]}if(o>c-n)return null;var f=n;if(n+=o,2!==e[n++])return null;var i=e[n++];if(128&i){if(n+(d=i-128)>c)return null;for(;d>0&&0===e[n];n+=1,d-=1);for(i=0;d>0;n+=1,d-=1)i=(i<<8)+e[n]}if(i>c-n)return null;var s=n;for(n+=i;o>0&&0===e[f];o-=1,f+=1);if(o>32)return null;var b=e.slice(f,f+o);for(b.copy(a,32-b.length);i>0&&0===e[s];i-=1,s+=1);if(i>32)return null;var l=e.slice(s,s+i);return l.copy(t,32-l.length),{r:a,s:t}}},9872:function(e,a,t){"use strict";var r=t(19778).Buffer,c=t(80518),n=new(0,t(6289).ec)("secp256k1"),d=n.curve;a.privateKeyExport=function(e,a){var t=new c(e);if(t.ucmp(d.n)>=0)throw new Error("couldn't export to DER format");var r=n.g.mul(t);return o(r.getX(),r.getY(),a)},a.privateKeyModInverse=function(e){var a=new c(e);if(a.ucmp(d.n)>=0||a.isZero())throw new Error("private key range is invalid");return a.invm(d.n).toArrayLike(r,"be",32)},a.signatureImport=function(e){var a=new c(e.r);a.ucmp(d.n)>=0&&(a=new c(0));var t=new c(e.s);return t.ucmp(d.n)>=0&&(t=new c(0)),r.concat([a.toArrayLike(r,"be",32),t.toArrayLike(r,"be",32)])},a.ecdhUnsafe=function(e,a,t){var r=n.keyFromPublic(e),f=new c(a);if(f.ucmp(d.n)>=0||f.isZero())throw new Error("scalar was invalid (zero or overflow)");var i=r.pub.mul(f);return o(i.getX(),i.getY(),t)};var o=function(e,a,t){var c=void 0;return t?((c=r.alloc(33))[0]=a.isOdd()?3:2,e.toArrayLike(r,"be",32).copy(c,1)):((c=r.alloc(65))[0]=4,e.toArrayLike(r,"be",32).copy(c,1),a.toArrayLike(r,"be",32).copy(c,33)),c}},63244:function(e,a,t){!function(e,a){"use strict";function r(e,a){if(!e)throw new Error(a||"Assertion failed")}function c(e,a){e.super_=a;var t=function(){};t.prototype=a.prototype,e.prototype=new t,e.prototype.constructor=e}function n(e,a,t){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==a&&"be"!==a||(t=a,a=10),this._init(e||0,a||10,t||"be"))}var d;"object"===typeof e?e.exports=n:a.BN=n,n.BN=n,n.wordSize=26;try{d="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:t(88677).Buffer}catch(S){}function o(e,a){var t=e.charCodeAt(a);return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:void r(!1,"Invalid character in "+e)}function f(e,a,t){var r=o(e,t);return t-1>=a&&(r|=o(e,t-1)<<4),r}function i(e,a,t,c){for(var n=0,d=0,o=Math.min(e.length,t),f=a;f=49?i-49+10:i>=17?i-17+10:i,r(i>=0&&d0?e:a},n.min=function(e,a){return e.cmp(a)<0?e:a},n.prototype._init=function(e,a,t){if("number"===typeof e)return this._initNumber(e,a,t);if("object"===typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),r(a===(0|a)&&a>=2&&a<=36);var c=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(c++,this.negative=1),c=0;c-=3)d=e[c]|e[c-1]<<8|e[c-2]<<16,this.words[n]|=d<>>26-o&67108863,(o+=24)>=26&&(o-=26,n++);else if("le"===t)for(c=0,n=0;c>>26-o&67108863,(o+=24)>=26&&(o-=26,n++);return this._strip()},n.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var r=0;r=a;r-=2)c=f(e,a,r)<=18?(n-=18,d+=1,this.words[d]|=c>>>26):n+=8;else for(r=(e.length-a)%2===0?a+1:a;r=18?(n-=18,d+=1,this.words[d]|=c>>>26):n+=8;this._strip()},n.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var r=0,c=1;c<=67108863;c*=a)r++;r--,c=c/a|0;for(var n=e.length-t,d=n%r,o=Math.min(n,n-d)+t,f=0,s=t;s1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch(S){n.prototype.inspect=b}else n.prototype.inspect=b;function b(){return(this.red?""}var l=["","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"],u=[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],h=[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];n.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var c=0,n=0,d=0;d>>24-c&16777215,(c+=2)>=26&&(c-=26,d--),t=0!==n||d!==this.length-1?l[6-f.length]+f+t:f+t}for(0!==n&&(t=n.toString(16)+t);t.length%a!==0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var i=u[e],s=h[e];t="";var b=this.clone();for(b.negative=0;!b.isZero();){var x=b.modrn(s).toString(e);t=(b=b.idivn(s)).isZero()?x+t:l[i-x.length]+x+t}for(this.isZero()&&(t="0"+t);t.length%a!==0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16,2)},d&&(n.prototype.toBuffer=function(e,a){return this.toArrayLike(d,e,a)}),n.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)};function x(e,a,t){t.negative=a.negative^e.negative;var r=e.length+a.length|0;t.length=r,r=r-1|0;var c=0|e.words[0],n=0|a.words[0],d=c*n,o=67108863&d,f=d/67108864|0;t.words[0]=o;for(var i=1;i>>26,b=67108863&f,l=Math.min(i,a.length-1),u=Math.max(0,i-e.length+1);u<=l;u++){var h=i-u|0;s+=(d=(c=0|e.words[h])*(n=0|a.words[u])+b)/67108864|0,b=67108863&d}t.words[i]=0|b,f=0|s}return 0!==f?t.words[i]=0|f:t.length--,t._strip()}n.prototype.toArrayLike=function(e,a,t){this._strip();var c=this.byteLength(),n=t||Math.max(1,c);r(c<=n,"byte array longer than desired length"),r(n>0,"Requested array length <= 0");var d=function(e,a){return e.allocUnsafe?e.allocUnsafe(a):new e(a)}(e,n);return this["_toArrayLike"+("le"===a?"LE":"BE")](d,c),d},n.prototype._toArrayLikeLE=function(e,a){for(var t=0,r=0,c=0,n=0;c>8&255),t>16&255),6===n?(t>24&255),r=0,n=0):(r=d>>>24,n+=2)}if(t=0&&(e[t--]=d>>8&255),t>=0&&(e[t--]=d>>16&255),6===n?(t>=0&&(e[t--]=d>>24&255),r=0,n=0):(r=d>>>24,n+=2)}if(t>=0)for(e[t--]=r;t>=0;)e[t--]=0},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var a=e,t=0;return a>=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},n.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 0===(8191&a)&&(t+=13,a>>>=13),0===(127&a)&&(t+=7,a>>>=7),0===(15&a)&&(t+=4,a>>>=4),0===(3&a)&&(t+=2,a>>>=2),0===(1&a)&&t++,t},n.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var c=0;c0&&(this.words[c]=~this.words[c]&67108863>>26-t),this._strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,a){r("number"===typeof e&&e>=0);var t=e/26|0,c=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,r=e):(t=e,r=this);for(var c=0,n=0;n>>26;for(;0!==c&&n>>26;if(this.length=t.length,0!==c)this.words[this.length]=c,this.length++;else if(t!==this)for(;ne.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,r,c=this.cmp(e);if(0===c)return this.negative=0,this.length=1,this.words[0]=0,this;c>0?(t=this,r=e):(t=e,r=this);for(var n=0,d=0;d>26,this.words[d]=67108863&a;for(;0!==n&&d>26,this.words[d]=67108863&a;if(0===n&&d>>13,u=0|d[1],h=8191&u,x=u>>>13,p=0|d[2],m=8191&p,v=p>>>13,g=0|d[3],y=8191&g,k=g>>>13,w=0|d[4],I=8191&w,_=w>>>13,E=0|d[5],N=8191&E,H=E>>>13,S=0|d[6],A=8191&S,M=S>>>13,T=0|d[7],P=8191&T,O=T>>>13,C=0|d[8],R=8191&C,D=C>>>13,j=0|d[9],L=8191&j,B=j>>>13,F=0|o[0],Z=8191&F,U=F>>>13,z=0|o[1],q=8191&z,V=z>>>13,W=0|o[2],K=8191&W,G=W>>>13,Y=0|o[3],$=8191&Y,X=Y>>>13,J=0|o[4],Q=8191&J,ee=J>>>13,ae=0|o[5],te=8191&ae,re=ae>>>13,ce=0|o[6],ne=8191&ce,de=ce>>>13,oe=0|o[7],fe=8191&oe,ie=oe>>>13,se=0|o[8],be=8191&se,le=se>>>13,ue=0|o[9],he=8191&ue,xe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var pe=(i+(r=Math.imul(b,Z))|0)+((8191&(c=(c=Math.imul(b,U))+Math.imul(l,Z)|0))<<13)|0;i=((n=Math.imul(l,U))+(c>>>13)|0)+(pe>>>26)|0,pe&=67108863,r=Math.imul(h,Z),c=(c=Math.imul(h,U))+Math.imul(x,Z)|0,n=Math.imul(x,U);var me=(i+(r=r+Math.imul(b,q)|0)|0)+((8191&(c=(c=c+Math.imul(b,V)|0)+Math.imul(l,q)|0))<<13)|0;i=((n=n+Math.imul(l,V)|0)+(c>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,Z),c=(c=Math.imul(m,U))+Math.imul(v,Z)|0,n=Math.imul(v,U),r=r+Math.imul(h,q)|0,c=(c=c+Math.imul(h,V)|0)+Math.imul(x,q)|0,n=n+Math.imul(x,V)|0;var ve=(i+(r=r+Math.imul(b,K)|0)|0)+((8191&(c=(c=c+Math.imul(b,G)|0)+Math.imul(l,K)|0))<<13)|0;i=((n=n+Math.imul(l,G)|0)+(c>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(y,Z),c=(c=Math.imul(y,U))+Math.imul(k,Z)|0,n=Math.imul(k,U),r=r+Math.imul(m,q)|0,c=(c=c+Math.imul(m,V)|0)+Math.imul(v,q)|0,n=n+Math.imul(v,V)|0,r=r+Math.imul(h,K)|0,c=(c=c+Math.imul(h,G)|0)+Math.imul(x,K)|0,n=n+Math.imul(x,G)|0;var ge=(i+(r=r+Math.imul(b,$)|0)|0)+((8191&(c=(c=c+Math.imul(b,X)|0)+Math.imul(l,$)|0))<<13)|0;i=((n=n+Math.imul(l,X)|0)+(c>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(I,Z),c=(c=Math.imul(I,U))+Math.imul(_,Z)|0,n=Math.imul(_,U),r=r+Math.imul(y,q)|0,c=(c=c+Math.imul(y,V)|0)+Math.imul(k,q)|0,n=n+Math.imul(k,V)|0,r=r+Math.imul(m,K)|0,c=(c=c+Math.imul(m,G)|0)+Math.imul(v,K)|0,n=n+Math.imul(v,G)|0,r=r+Math.imul(h,$)|0,c=(c=c+Math.imul(h,X)|0)+Math.imul(x,$)|0,n=n+Math.imul(x,X)|0;var ye=(i+(r=r+Math.imul(b,Q)|0)|0)+((8191&(c=(c=c+Math.imul(b,ee)|0)+Math.imul(l,Q)|0))<<13)|0;i=((n=n+Math.imul(l,ee)|0)+(c>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(N,Z),c=(c=Math.imul(N,U))+Math.imul(H,Z)|0,n=Math.imul(H,U),r=r+Math.imul(I,q)|0,c=(c=c+Math.imul(I,V)|0)+Math.imul(_,q)|0,n=n+Math.imul(_,V)|0,r=r+Math.imul(y,K)|0,c=(c=c+Math.imul(y,G)|0)+Math.imul(k,K)|0,n=n+Math.imul(k,G)|0,r=r+Math.imul(m,$)|0,c=(c=c+Math.imul(m,X)|0)+Math.imul(v,$)|0,n=n+Math.imul(v,X)|0,r=r+Math.imul(h,Q)|0,c=(c=c+Math.imul(h,ee)|0)+Math.imul(x,Q)|0,n=n+Math.imul(x,ee)|0;var ke=(i+(r=r+Math.imul(b,te)|0)|0)+((8191&(c=(c=c+Math.imul(b,re)|0)+Math.imul(l,te)|0))<<13)|0;i=((n=n+Math.imul(l,re)|0)+(c>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(A,Z),c=(c=Math.imul(A,U))+Math.imul(M,Z)|0,n=Math.imul(M,U),r=r+Math.imul(N,q)|0,c=(c=c+Math.imul(N,V)|0)+Math.imul(H,q)|0,n=n+Math.imul(H,V)|0,r=r+Math.imul(I,K)|0,c=(c=c+Math.imul(I,G)|0)+Math.imul(_,K)|0,n=n+Math.imul(_,G)|0,r=r+Math.imul(y,$)|0,c=(c=c+Math.imul(y,X)|0)+Math.imul(k,$)|0,n=n+Math.imul(k,X)|0,r=r+Math.imul(m,Q)|0,c=(c=c+Math.imul(m,ee)|0)+Math.imul(v,Q)|0,n=n+Math.imul(v,ee)|0,r=r+Math.imul(h,te)|0,c=(c=c+Math.imul(h,re)|0)+Math.imul(x,te)|0,n=n+Math.imul(x,re)|0;var we=(i+(r=r+Math.imul(b,ne)|0)|0)+((8191&(c=(c=c+Math.imul(b,de)|0)+Math.imul(l,ne)|0))<<13)|0;i=((n=n+Math.imul(l,de)|0)+(c>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(P,Z),c=(c=Math.imul(P,U))+Math.imul(O,Z)|0,n=Math.imul(O,U),r=r+Math.imul(A,q)|0,c=(c=c+Math.imul(A,V)|0)+Math.imul(M,q)|0,n=n+Math.imul(M,V)|0,r=r+Math.imul(N,K)|0,c=(c=c+Math.imul(N,G)|0)+Math.imul(H,K)|0,n=n+Math.imul(H,G)|0,r=r+Math.imul(I,$)|0,c=(c=c+Math.imul(I,X)|0)+Math.imul(_,$)|0,n=n+Math.imul(_,X)|0,r=r+Math.imul(y,Q)|0,c=(c=c+Math.imul(y,ee)|0)+Math.imul(k,Q)|0,n=n+Math.imul(k,ee)|0,r=r+Math.imul(m,te)|0,c=(c=c+Math.imul(m,re)|0)+Math.imul(v,te)|0,n=n+Math.imul(v,re)|0,r=r+Math.imul(h,ne)|0,c=(c=c+Math.imul(h,de)|0)+Math.imul(x,ne)|0,n=n+Math.imul(x,de)|0;var Ie=(i+(r=r+Math.imul(b,fe)|0)|0)+((8191&(c=(c=c+Math.imul(b,ie)|0)+Math.imul(l,fe)|0))<<13)|0;i=((n=n+Math.imul(l,ie)|0)+(c>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(R,Z),c=(c=Math.imul(R,U))+Math.imul(D,Z)|0,n=Math.imul(D,U),r=r+Math.imul(P,q)|0,c=(c=c+Math.imul(P,V)|0)+Math.imul(O,q)|0,n=n+Math.imul(O,V)|0,r=r+Math.imul(A,K)|0,c=(c=c+Math.imul(A,G)|0)+Math.imul(M,K)|0,n=n+Math.imul(M,G)|0,r=r+Math.imul(N,$)|0,c=(c=c+Math.imul(N,X)|0)+Math.imul(H,$)|0,n=n+Math.imul(H,X)|0,r=r+Math.imul(I,Q)|0,c=(c=c+Math.imul(I,ee)|0)+Math.imul(_,Q)|0,n=n+Math.imul(_,ee)|0,r=r+Math.imul(y,te)|0,c=(c=c+Math.imul(y,re)|0)+Math.imul(k,te)|0,n=n+Math.imul(k,re)|0,r=r+Math.imul(m,ne)|0,c=(c=c+Math.imul(m,de)|0)+Math.imul(v,ne)|0,n=n+Math.imul(v,de)|0,r=r+Math.imul(h,fe)|0,c=(c=c+Math.imul(h,ie)|0)+Math.imul(x,fe)|0,n=n+Math.imul(x,ie)|0;var _e=(i+(r=r+Math.imul(b,be)|0)|0)+((8191&(c=(c=c+Math.imul(b,le)|0)+Math.imul(l,be)|0))<<13)|0;i=((n=n+Math.imul(l,le)|0)+(c>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,Z),c=(c=Math.imul(L,U))+Math.imul(B,Z)|0,n=Math.imul(B,U),r=r+Math.imul(R,q)|0,c=(c=c+Math.imul(R,V)|0)+Math.imul(D,q)|0,n=n+Math.imul(D,V)|0,r=r+Math.imul(P,K)|0,c=(c=c+Math.imul(P,G)|0)+Math.imul(O,K)|0,n=n+Math.imul(O,G)|0,r=r+Math.imul(A,$)|0,c=(c=c+Math.imul(A,X)|0)+Math.imul(M,$)|0,n=n+Math.imul(M,X)|0,r=r+Math.imul(N,Q)|0,c=(c=c+Math.imul(N,ee)|0)+Math.imul(H,Q)|0,n=n+Math.imul(H,ee)|0,r=r+Math.imul(I,te)|0,c=(c=c+Math.imul(I,re)|0)+Math.imul(_,te)|0,n=n+Math.imul(_,re)|0,r=r+Math.imul(y,ne)|0,c=(c=c+Math.imul(y,de)|0)+Math.imul(k,ne)|0,n=n+Math.imul(k,de)|0,r=r+Math.imul(m,fe)|0,c=(c=c+Math.imul(m,ie)|0)+Math.imul(v,fe)|0,n=n+Math.imul(v,ie)|0,r=r+Math.imul(h,be)|0,c=(c=c+Math.imul(h,le)|0)+Math.imul(x,be)|0,n=n+Math.imul(x,le)|0;var Ee=(i+(r=r+Math.imul(b,he)|0)|0)+((8191&(c=(c=c+Math.imul(b,xe)|0)+Math.imul(l,he)|0))<<13)|0;i=((n=n+Math.imul(l,xe)|0)+(c>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,q),c=(c=Math.imul(L,V))+Math.imul(B,q)|0,n=Math.imul(B,V),r=r+Math.imul(R,K)|0,c=(c=c+Math.imul(R,G)|0)+Math.imul(D,K)|0,n=n+Math.imul(D,G)|0,r=r+Math.imul(P,$)|0,c=(c=c+Math.imul(P,X)|0)+Math.imul(O,$)|0,n=n+Math.imul(O,X)|0,r=r+Math.imul(A,Q)|0,c=(c=c+Math.imul(A,ee)|0)+Math.imul(M,Q)|0,n=n+Math.imul(M,ee)|0,r=r+Math.imul(N,te)|0,c=(c=c+Math.imul(N,re)|0)+Math.imul(H,te)|0,n=n+Math.imul(H,re)|0,r=r+Math.imul(I,ne)|0,c=(c=c+Math.imul(I,de)|0)+Math.imul(_,ne)|0,n=n+Math.imul(_,de)|0,r=r+Math.imul(y,fe)|0,c=(c=c+Math.imul(y,ie)|0)+Math.imul(k,fe)|0,n=n+Math.imul(k,ie)|0,r=r+Math.imul(m,be)|0,c=(c=c+Math.imul(m,le)|0)+Math.imul(v,be)|0,n=n+Math.imul(v,le)|0;var Ne=(i+(r=r+Math.imul(h,he)|0)|0)+((8191&(c=(c=c+Math.imul(h,xe)|0)+Math.imul(x,he)|0))<<13)|0;i=((n=n+Math.imul(x,xe)|0)+(c>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,K),c=(c=Math.imul(L,G))+Math.imul(B,K)|0,n=Math.imul(B,G),r=r+Math.imul(R,$)|0,c=(c=c+Math.imul(R,X)|0)+Math.imul(D,$)|0,n=n+Math.imul(D,X)|0,r=r+Math.imul(P,Q)|0,c=(c=c+Math.imul(P,ee)|0)+Math.imul(O,Q)|0,n=n+Math.imul(O,ee)|0,r=r+Math.imul(A,te)|0,c=(c=c+Math.imul(A,re)|0)+Math.imul(M,te)|0,n=n+Math.imul(M,re)|0,r=r+Math.imul(N,ne)|0,c=(c=c+Math.imul(N,de)|0)+Math.imul(H,ne)|0,n=n+Math.imul(H,de)|0,r=r+Math.imul(I,fe)|0,c=(c=c+Math.imul(I,ie)|0)+Math.imul(_,fe)|0,n=n+Math.imul(_,ie)|0,r=r+Math.imul(y,be)|0,c=(c=c+Math.imul(y,le)|0)+Math.imul(k,be)|0,n=n+Math.imul(k,le)|0;var He=(i+(r=r+Math.imul(m,he)|0)|0)+((8191&(c=(c=c+Math.imul(m,xe)|0)+Math.imul(v,he)|0))<<13)|0;i=((n=n+Math.imul(v,xe)|0)+(c>>>13)|0)+(He>>>26)|0,He&=67108863,r=Math.imul(L,$),c=(c=Math.imul(L,X))+Math.imul(B,$)|0,n=Math.imul(B,X),r=r+Math.imul(R,Q)|0,c=(c=c+Math.imul(R,ee)|0)+Math.imul(D,Q)|0,n=n+Math.imul(D,ee)|0,r=r+Math.imul(P,te)|0,c=(c=c+Math.imul(P,re)|0)+Math.imul(O,te)|0,n=n+Math.imul(O,re)|0,r=r+Math.imul(A,ne)|0,c=(c=c+Math.imul(A,de)|0)+Math.imul(M,ne)|0,n=n+Math.imul(M,de)|0,r=r+Math.imul(N,fe)|0,c=(c=c+Math.imul(N,ie)|0)+Math.imul(H,fe)|0,n=n+Math.imul(H,ie)|0,r=r+Math.imul(I,be)|0,c=(c=c+Math.imul(I,le)|0)+Math.imul(_,be)|0,n=n+Math.imul(_,le)|0;var Se=(i+(r=r+Math.imul(y,he)|0)|0)+((8191&(c=(c=c+Math.imul(y,xe)|0)+Math.imul(k,he)|0))<<13)|0;i=((n=n+Math.imul(k,xe)|0)+(c>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,Q),c=(c=Math.imul(L,ee))+Math.imul(B,Q)|0,n=Math.imul(B,ee),r=r+Math.imul(R,te)|0,c=(c=c+Math.imul(R,re)|0)+Math.imul(D,te)|0,n=n+Math.imul(D,re)|0,r=r+Math.imul(P,ne)|0,c=(c=c+Math.imul(P,de)|0)+Math.imul(O,ne)|0,n=n+Math.imul(O,de)|0,r=r+Math.imul(A,fe)|0,c=(c=c+Math.imul(A,ie)|0)+Math.imul(M,fe)|0,n=n+Math.imul(M,ie)|0,r=r+Math.imul(N,be)|0,c=(c=c+Math.imul(N,le)|0)+Math.imul(H,be)|0,n=n+Math.imul(H,le)|0;var Ae=(i+(r=r+Math.imul(I,he)|0)|0)+((8191&(c=(c=c+Math.imul(I,xe)|0)+Math.imul(_,he)|0))<<13)|0;i=((n=n+Math.imul(_,xe)|0)+(c>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,te),c=(c=Math.imul(L,re))+Math.imul(B,te)|0,n=Math.imul(B,re),r=r+Math.imul(R,ne)|0,c=(c=c+Math.imul(R,de)|0)+Math.imul(D,ne)|0,n=n+Math.imul(D,de)|0,r=r+Math.imul(P,fe)|0,c=(c=c+Math.imul(P,ie)|0)+Math.imul(O,fe)|0,n=n+Math.imul(O,ie)|0,r=r+Math.imul(A,be)|0,c=(c=c+Math.imul(A,le)|0)+Math.imul(M,be)|0,n=n+Math.imul(M,le)|0;var Me=(i+(r=r+Math.imul(N,he)|0)|0)+((8191&(c=(c=c+Math.imul(N,xe)|0)+Math.imul(H,he)|0))<<13)|0;i=((n=n+Math.imul(H,xe)|0)+(c>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ne),c=(c=Math.imul(L,de))+Math.imul(B,ne)|0,n=Math.imul(B,de),r=r+Math.imul(R,fe)|0,c=(c=c+Math.imul(R,ie)|0)+Math.imul(D,fe)|0,n=n+Math.imul(D,ie)|0,r=r+Math.imul(P,be)|0,c=(c=c+Math.imul(P,le)|0)+Math.imul(O,be)|0,n=n+Math.imul(O,le)|0;var Te=(i+(r=r+Math.imul(A,he)|0)|0)+((8191&(c=(c=c+Math.imul(A,xe)|0)+Math.imul(M,he)|0))<<13)|0;i=((n=n+Math.imul(M,xe)|0)+(c>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,fe),c=(c=Math.imul(L,ie))+Math.imul(B,fe)|0,n=Math.imul(B,ie),r=r+Math.imul(R,be)|0,c=(c=c+Math.imul(R,le)|0)+Math.imul(D,be)|0,n=n+Math.imul(D,le)|0;var Pe=(i+(r=r+Math.imul(P,he)|0)|0)+((8191&(c=(c=c+Math.imul(P,xe)|0)+Math.imul(O,he)|0))<<13)|0;i=((n=n+Math.imul(O,xe)|0)+(c>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,be),c=(c=Math.imul(L,le))+Math.imul(B,be)|0,n=Math.imul(B,le);var Oe=(i+(r=r+Math.imul(R,he)|0)|0)+((8191&(c=(c=c+Math.imul(R,xe)|0)+Math.imul(D,he)|0))<<13)|0;i=((n=n+Math.imul(D,xe)|0)+(c>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Ce=(i+(r=Math.imul(L,he))|0)+((8191&(c=(c=Math.imul(L,xe))+Math.imul(B,he)|0))<<13)|0;return i=((n=Math.imul(B,xe))+(c>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,f[0]=pe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=ke,f[6]=we,f[7]=Ie,f[8]=_e,f[9]=Ee,f[10]=Ne,f[11]=He,f[12]=Se,f[13]=Ae,f[14]=Me,f[15]=Te,f[16]=Pe,f[17]=Oe,f[18]=Ce,0!==i&&(f[19]=i,t.length++),t};function m(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var r=0,c=0,n=0;n>>26)|0)>>>26,d&=67108863}t.words[n]=o,r=d,d=c}return 0!==r?t.words[n]=r:t.length--,t._strip()}function v(e,a,t){return m(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(p=x),n.prototype.mulTo=function(e,a){var t=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,a):t<63?x(this,e,a):t<1024?m(this,e,a):v(this,e,a)},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=n.prototype._countBits(e)-1,r=0;r>=1;return r},g.prototype.permute=function(e,a,t,r,c,n){for(var d=0;d>>=1)c++;return 1<>>=13,t[2*d+1]=8191&n,n>>>=13;for(d=2*a;d>=26,t+=n/67108864|0,t+=d>>>26,this.words[c]=67108863&d}return 0!==t&&(this.words[c]=t,this.length++),a?this.ineg():this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>c&1}return a}(e);if(0===a.length)return new n(1);for(var t=this,r=0;r=0);var a,t=e%26,c=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!==t){var d=0;for(a=0;a>>26-t}d&&(this.words[a]=d,this.length++)}if(0!==c){for(a=this.length-1;a>=0;a--)this.words[a+c]=this.words[a];for(a=0;a=0),c=a?(a-a%26)/26:0;var n=e%26,d=Math.min((e-n)/26,this.length),o=67108863^67108863>>>n<d)for(this.length-=d,i=0;i=0&&(0!==s||i>=c);i--){var b=0|this.words[i];this.words[i]=s<<26-n|b>>>n,s=b&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(e,a,t){return r(0===this.negative),this.iushrn(e,a,t)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"===typeof e&&e>=0);var a=e%26,t=(e-a)/26,c=1<=0);var a=e%26,t=(e-a)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var c=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},n.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(f/67108864|0),this.words[c+t]=67108863&n}for(;c>26,this.words[c+t]=67108863&n;if(0===o)return this._strip();for(r(-1===o),o=0,c=0;c>26,this.words[c]=67108863&n;return this.negative=1,this._strip()},n.prototype._wordDiv=function(e,a){var t=(this.length,e.length),r=this.clone(),c=e,d=0|c.words[c.length-1];0!==(t=26-this._countBits(d))&&(c=c.ushln(t),r.iushln(t),d=0|c.words[c.length-1]);var o,f=r.length-c.length;if("mod"!==a){(o=new n(null)).length=f+1,o.words=new Array(o.length);for(var i=0;i=0;b--){var l=67108864*(0|r.words[c.length+b])+(0|r.words[c.length+b-1]);for(l=Math.min(l/d|0,67108863),r._ishlnsubmul(c,l,b);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(c,1,b),r.isZero()||(r.negative^=1);o&&(o.words[b]=l)}return o&&o._strip(),r._strip(),"div"!==a&&0!==t&&r.iushrn(t),{div:o||null,mod:r}},n.prototype.divmod=function(e,a,t){return r(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,a),"mod"!==a&&(c=o.div.neg()),"div"!==a&&(d=o.mod.neg(),t&&0!==d.negative&&d.iadd(e)),{div:c,mod:d}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),a),"mod"!==a&&(c=o.div.neg()),{div:c,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),a),"div"!==a&&(d=o.mod.neg(),t&&0!==d.negative&&d.isub(e)),{div:o.div,mod:d}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new n(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modrn(e.words[0]))}:this._wordDiv(e,a);var c,d,o},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,r=e.ushrn(1),c=e.andln(1),n=t.cmp(r);return n<0||1===c&&0===n?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},n.prototype.modrn=function(e){var a=e<0;a&&(e=-e),r(e<=67108863);for(var t=(1<<26)%e,c=0,n=this.length-1;n>=0;n--)c=(t*c+(0|this.words[n]))%e;return a?-c:c},n.prototype.modn=function(e){return this.modrn(e)},n.prototype.idivn=function(e){var a=e<0;a&&(e=-e),r(e<=67108863);for(var t=0,c=this.length-1;c>=0;c--){var n=(0|this.words[c])+67108864*t;this.words[c]=n/e|0,t=n%e}return this._strip(),a?this.ineg():this},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var c=new n(1),d=new n(0),o=new n(0),f=new n(1),i=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++i;for(var s=t.clone(),b=a.clone();!a.isZero();){for(var l=0,u=1;0===(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(c.isOdd()||d.isOdd())&&(c.iadd(s),d.isub(b)),c.iushrn(1),d.iushrn(1);for(var h=0,x=1;0===(t.words[0]&x)&&h<26;++h,x<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(b)),o.iushrn(1),f.iushrn(1);a.cmp(t)>=0?(a.isub(t),c.isub(o),d.isub(f)):(t.isub(a),o.isub(c),f.isub(d))}return{a:o,b:f,gcd:t.iushln(i)}},n.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var c,d=new n(1),o=new n(0),f=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var i=0,s=1;0===(a.words[0]&s)&&i<26;++i,s<<=1);if(i>0)for(a.iushrn(i);i-- >0;)d.isOdd()&&d.iadd(f),d.iushrn(1);for(var b=0,l=1;0===(t.words[0]&l)&&b<26;++b,l<<=1);if(b>0)for(t.iushrn(b);b-- >0;)o.isOdd()&&o.iadd(f),o.iushrn(1);a.cmp(t)>=0?(a.isub(t),d.isub(o)):(t.isub(a),o.isub(d))}return(c=0===a.cmpn(1)?d:o).cmpn(0)<0&&c.iadd(e),c},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var r=0;a.isEven()&&t.isEven();r++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var c=a.cmp(t);if(c<0){var n=a;a=t,t=n}else if(0===c||0===t.cmpn(1))break;a.isub(t)}return t.iushln(r)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return 0===(1&this.words[0])},n.prototype.isOdd=function(){return 1===(1&this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){r("number"===typeof e);var a=e%26,t=(e-a)/26,c=1<>>26,o&=67108863,this.words[d]=o}return 0!==n&&(this.words[d]=n,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this._strip(),this.length>1)a=1;else{t&&(e=-e),r(e<=67108863,"Number is too big");var c=0|this.words[0];a=c===e?0:ce.length)return 1;if(this.length=0;t--){var r=0|this.words[t],c=0|e.words[t];if(r!==c){rc&&(a=1);break}}return a},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new N(e)},n.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function k(e,a){this.name=e,this.p=new n(a,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function I(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function N(e){if("string"===typeof e){var a=n._prime(e);this.m=a.p,this.prime=a}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function H(e){N.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}k.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var r=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},k.prototype.split=function(e,a){e.iushrn(this.n,0,a)},k.prototype.imulK=function(e){return e.imul(this.k)},c(w,k),w.prototype.split=function(e,a){for(var t=4194303,r=Math.min(e.length,9),c=0;c>>22,n=d}n>>>=22,e.words[c-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=c,a=r}return 0!==a&&(e.words[e.length++]=a),e},n._prime=function(e){if(y[e])return y[e];var a;if("k256"===e)a=new w;else if("p224"===e)a=new I;else if("p192"===e)a=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new E}return y[e]=a,a},N.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},N.prototype._verify2=function(e,a){r(0===(e.negative|a.negative),"red works only with positives"),r(e.red&&e.red===a.red,"red works only with red numbers")},N.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(s(e,e.umod(this.m)._forceRed(this)),e)},N.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},N.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},N.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},N.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},N.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},N.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},N.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},N.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},N.prototype.isqr=function(e){return this.imul(e,e.clone())},N.prototype.sqr=function(e){return this.mul(e,e)},N.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(r(a%2===1),3===a){var t=this.m.add(new n(1)).iushrn(2);return this.pow(e,t)}for(var c=this.m.subn(1),d=0;!c.isZero()&&0===c.andln(1);)d++,c.iushrn(1);r(!c.isZero());var o=new n(1).toRed(this),f=o.redNeg(),i=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new n(2*s*s).toRed(this);0!==this.pow(s,i).cmp(f);)s.redIAdd(f);for(var b=this.pow(s,c),l=this.pow(e,c.addn(1).iushrn(1)),u=this.pow(e,c),h=d;0!==u.cmp(o);){for(var x=u,p=0;0!==x.cmp(o);p++)x=x.redSqr();r(p=0;r--){for(var i=a.words[r],s=f-1;s>=0;s--){var b=i>>s&1;c!==t[0]&&(c=this.sqr(c)),0!==b||0!==d?(d<<=1,d|=b,(4===++o||0===r&&0===s)&&(c=this.mul(c,t[d]),o=0,d=0)):o=0}f=26}return c},N.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},N.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},n.mont=function(e){return new H(e)},c(H,N),H.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},H.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},H.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=t.isub(r).iushrn(this.shift),n=c;return c.cmp(this.m)>=0?n=c.isub(this.m):c.cmpn(0)<0&&(n=c.iadd(this.m)),n._forceRed(this)},H.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new n(0)._forceRed(this);var t=e.mul(a),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=t.isub(r).iushrn(this.shift),d=c;return c.cmp(this.m)>=0?d=c.isub(this.m):c.cmpn(0)<0&&(d=c.iadd(this.m)),d._forceRed(this)},H.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},29286:function(e,a,t){!function(e,a){"use strict";function r(e,a){if(!e)throw new Error(a||"Assertion failed")}function c(e,a){e.super_=a;var t=function(){};t.prototype=a.prototype,e.prototype=new t,e.prototype.constructor=e}function n(e,a,t){if(n.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==a&&"be"!==a||(t=a,a=10),this._init(e||0,a||10,t||"be"))}var d;"object"===typeof e?e.exports=n:a.BN=n,n.BN=n,n.wordSize=26;try{d="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:t(62808).Buffer}catch(S){}function o(e,a){var t=e.charCodeAt(a);return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:void r(!1,"Invalid character in "+e)}function f(e,a,t){var r=o(e,t);return t-1>=a&&(r|=o(e,t-1)<<4),r}function i(e,a,t,c){for(var n=0,d=0,o=Math.min(e.length,t),f=a;f=49?i-49+10:i>=17?i-17+10:i,r(i>=0&&d0?e:a},n.min=function(e,a){return e.cmp(a)<0?e:a},n.prototype._init=function(e,a,t){if("number"===typeof e)return this._initNumber(e,a,t);if("object"===typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),r(a===(0|a)&&a>=2&&a<=36);var c=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(c++,this.negative=1),c=0;c-=3)d=e[c]|e[c-1]<<8|e[c-2]<<16,this.words[n]|=d<>>26-o&67108863,(o+=24)>=26&&(o-=26,n++);else if("le"===t)for(c=0,n=0;c>>26-o&67108863,(o+=24)>=26&&(o-=26,n++);return this._strip()},n.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var r=0;r=a;r-=2)c=f(e,a,r)<=18?(n-=18,d+=1,this.words[d]|=c>>>26):n+=8;else for(r=(e.length-a)%2===0?a+1:a;r=18?(n-=18,d+=1,this.words[d]|=c>>>26):n+=8;this._strip()},n.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var r=0,c=1;c<=67108863;c*=a)r++;r--,c=c/a|0;for(var n=e.length-t,d=n%r,o=Math.min(n,n-d)+t,f=0,s=t;s1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=b}catch(S){n.prototype.inspect=b}else n.prototype.inspect=b;function b(){return(this.red?""}var l=["","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"],u=[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],h=[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];n.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var c=0,n=0,d=0;d>>24-c&16777215,(c+=2)>=26&&(c-=26,d--),t=0!==n||d!==this.length-1?l[6-f.length]+f+t:f+t}for(0!==n&&(t=n.toString(16)+t);t.length%a!==0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var i=u[e],s=h[e];t="";var b=this.clone();for(b.negative=0;!b.isZero();){var x=b.modrn(s).toString(e);t=(b=b.idivn(s)).isZero()?x+t:l[i-x.length]+x+t}for(this.isZero()&&(t="0"+t);t.length%a!==0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},n.prototype.toJSON=function(){return this.toString(16,2)},d&&(n.prototype.toBuffer=function(e,a){return this.toArrayLike(d,e,a)}),n.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)};function x(e,a,t){t.negative=a.negative^e.negative;var r=e.length+a.length|0;t.length=r,r=r-1|0;var c=0|e.words[0],n=0|a.words[0],d=c*n,o=67108863&d,f=d/67108864|0;t.words[0]=o;for(var i=1;i>>26,b=67108863&f,l=Math.min(i,a.length-1),u=Math.max(0,i-e.length+1);u<=l;u++){var h=i-u|0;s+=(d=(c=0|e.words[h])*(n=0|a.words[u])+b)/67108864|0,b=67108863&d}t.words[i]=0|b,f=0|s}return 0!==f?t.words[i]=0|f:t.length--,t._strip()}n.prototype.toArrayLike=function(e,a,t){this._strip();var c=this.byteLength(),n=t||Math.max(1,c);r(c<=n,"byte array longer than desired length"),r(n>0,"Requested array length <= 0");var d=function(e,a){return e.allocUnsafe?e.allocUnsafe(a):new e(a)}(e,n);return this["_toArrayLike"+("le"===a?"LE":"BE")](d,c),d},n.prototype._toArrayLikeLE=function(e,a){for(var t=0,r=0,c=0,n=0;c>8&255),t>16&255),6===n?(t>24&255),r=0,n=0):(r=d>>>24,n+=2)}if(t=0&&(e[t--]=d>>8&255),t>=0&&(e[t--]=d>>16&255),6===n?(t>=0&&(e[t--]=d>>24&255),r=0,n=0):(r=d>>>24,n+=2)}if(t>=0)for(e[t--]=r;t>=0;)e[t--]=0},Math.clz32?n.prototype._countBits=function(e){return 32-Math.clz32(e)}:n.prototype._countBits=function(e){var a=e,t=0;return a>=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},n.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 0===(8191&a)&&(t+=13,a>>>=13),0===(127&a)&&(t+=7,a>>>=7),0===(15&a)&&(t+=4,a>>>=4),0===(3&a)&&(t+=2,a>>>=2),0===(1&a)&&t++,t},n.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var c=0;c0&&(this.words[c]=~this.words[c]&67108863>>26-t),this._strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,a){r("number"===typeof e&&e>=0);var t=e/26|0,c=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,r=e):(t=e,r=this);for(var c=0,n=0;n>>26;for(;0!==c&&n>>26;if(this.length=t.length,0!==c)this.words[this.length]=c,this.length++;else if(t!==this)for(;ne.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,r,c=this.cmp(e);if(0===c)return this.negative=0,this.length=1,this.words[0]=0,this;c>0?(t=this,r=e):(t=e,r=this);for(var n=0,d=0;d>26,this.words[d]=67108863&a;for(;0!==n&&d>26,this.words[d]=67108863&a;if(0===n&&d>>13,u=0|d[1],h=8191&u,x=u>>>13,p=0|d[2],m=8191&p,v=p>>>13,g=0|d[3],y=8191&g,k=g>>>13,w=0|d[4],I=8191&w,_=w>>>13,E=0|d[5],N=8191&E,H=E>>>13,S=0|d[6],A=8191&S,M=S>>>13,T=0|d[7],P=8191&T,O=T>>>13,C=0|d[8],R=8191&C,D=C>>>13,j=0|d[9],L=8191&j,B=j>>>13,F=0|o[0],Z=8191&F,U=F>>>13,z=0|o[1],q=8191&z,V=z>>>13,W=0|o[2],K=8191&W,G=W>>>13,Y=0|o[3],$=8191&Y,X=Y>>>13,J=0|o[4],Q=8191&J,ee=J>>>13,ae=0|o[5],te=8191&ae,re=ae>>>13,ce=0|o[6],ne=8191&ce,de=ce>>>13,oe=0|o[7],fe=8191&oe,ie=oe>>>13,se=0|o[8],be=8191&se,le=se>>>13,ue=0|o[9],he=8191&ue,xe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var pe=(i+(r=Math.imul(b,Z))|0)+((8191&(c=(c=Math.imul(b,U))+Math.imul(l,Z)|0))<<13)|0;i=((n=Math.imul(l,U))+(c>>>13)|0)+(pe>>>26)|0,pe&=67108863,r=Math.imul(h,Z),c=(c=Math.imul(h,U))+Math.imul(x,Z)|0,n=Math.imul(x,U);var me=(i+(r=r+Math.imul(b,q)|0)|0)+((8191&(c=(c=c+Math.imul(b,V)|0)+Math.imul(l,q)|0))<<13)|0;i=((n=n+Math.imul(l,V)|0)+(c>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(m,Z),c=(c=Math.imul(m,U))+Math.imul(v,Z)|0,n=Math.imul(v,U),r=r+Math.imul(h,q)|0,c=(c=c+Math.imul(h,V)|0)+Math.imul(x,q)|0,n=n+Math.imul(x,V)|0;var ve=(i+(r=r+Math.imul(b,K)|0)|0)+((8191&(c=(c=c+Math.imul(b,G)|0)+Math.imul(l,K)|0))<<13)|0;i=((n=n+Math.imul(l,G)|0)+(c>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(y,Z),c=(c=Math.imul(y,U))+Math.imul(k,Z)|0,n=Math.imul(k,U),r=r+Math.imul(m,q)|0,c=(c=c+Math.imul(m,V)|0)+Math.imul(v,q)|0,n=n+Math.imul(v,V)|0,r=r+Math.imul(h,K)|0,c=(c=c+Math.imul(h,G)|0)+Math.imul(x,K)|0,n=n+Math.imul(x,G)|0;var ge=(i+(r=r+Math.imul(b,$)|0)|0)+((8191&(c=(c=c+Math.imul(b,X)|0)+Math.imul(l,$)|0))<<13)|0;i=((n=n+Math.imul(l,X)|0)+(c>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(I,Z),c=(c=Math.imul(I,U))+Math.imul(_,Z)|0,n=Math.imul(_,U),r=r+Math.imul(y,q)|0,c=(c=c+Math.imul(y,V)|0)+Math.imul(k,q)|0,n=n+Math.imul(k,V)|0,r=r+Math.imul(m,K)|0,c=(c=c+Math.imul(m,G)|0)+Math.imul(v,K)|0,n=n+Math.imul(v,G)|0,r=r+Math.imul(h,$)|0,c=(c=c+Math.imul(h,X)|0)+Math.imul(x,$)|0,n=n+Math.imul(x,X)|0;var ye=(i+(r=r+Math.imul(b,Q)|0)|0)+((8191&(c=(c=c+Math.imul(b,ee)|0)+Math.imul(l,Q)|0))<<13)|0;i=((n=n+Math.imul(l,ee)|0)+(c>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(N,Z),c=(c=Math.imul(N,U))+Math.imul(H,Z)|0,n=Math.imul(H,U),r=r+Math.imul(I,q)|0,c=(c=c+Math.imul(I,V)|0)+Math.imul(_,q)|0,n=n+Math.imul(_,V)|0,r=r+Math.imul(y,K)|0,c=(c=c+Math.imul(y,G)|0)+Math.imul(k,K)|0,n=n+Math.imul(k,G)|0,r=r+Math.imul(m,$)|0,c=(c=c+Math.imul(m,X)|0)+Math.imul(v,$)|0,n=n+Math.imul(v,X)|0,r=r+Math.imul(h,Q)|0,c=(c=c+Math.imul(h,ee)|0)+Math.imul(x,Q)|0,n=n+Math.imul(x,ee)|0;var ke=(i+(r=r+Math.imul(b,te)|0)|0)+((8191&(c=(c=c+Math.imul(b,re)|0)+Math.imul(l,te)|0))<<13)|0;i=((n=n+Math.imul(l,re)|0)+(c>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(A,Z),c=(c=Math.imul(A,U))+Math.imul(M,Z)|0,n=Math.imul(M,U),r=r+Math.imul(N,q)|0,c=(c=c+Math.imul(N,V)|0)+Math.imul(H,q)|0,n=n+Math.imul(H,V)|0,r=r+Math.imul(I,K)|0,c=(c=c+Math.imul(I,G)|0)+Math.imul(_,K)|0,n=n+Math.imul(_,G)|0,r=r+Math.imul(y,$)|0,c=(c=c+Math.imul(y,X)|0)+Math.imul(k,$)|0,n=n+Math.imul(k,X)|0,r=r+Math.imul(m,Q)|0,c=(c=c+Math.imul(m,ee)|0)+Math.imul(v,Q)|0,n=n+Math.imul(v,ee)|0,r=r+Math.imul(h,te)|0,c=(c=c+Math.imul(h,re)|0)+Math.imul(x,te)|0,n=n+Math.imul(x,re)|0;var we=(i+(r=r+Math.imul(b,ne)|0)|0)+((8191&(c=(c=c+Math.imul(b,de)|0)+Math.imul(l,ne)|0))<<13)|0;i=((n=n+Math.imul(l,de)|0)+(c>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(P,Z),c=(c=Math.imul(P,U))+Math.imul(O,Z)|0,n=Math.imul(O,U),r=r+Math.imul(A,q)|0,c=(c=c+Math.imul(A,V)|0)+Math.imul(M,q)|0,n=n+Math.imul(M,V)|0,r=r+Math.imul(N,K)|0,c=(c=c+Math.imul(N,G)|0)+Math.imul(H,K)|0,n=n+Math.imul(H,G)|0,r=r+Math.imul(I,$)|0,c=(c=c+Math.imul(I,X)|0)+Math.imul(_,$)|0,n=n+Math.imul(_,X)|0,r=r+Math.imul(y,Q)|0,c=(c=c+Math.imul(y,ee)|0)+Math.imul(k,Q)|0,n=n+Math.imul(k,ee)|0,r=r+Math.imul(m,te)|0,c=(c=c+Math.imul(m,re)|0)+Math.imul(v,te)|0,n=n+Math.imul(v,re)|0,r=r+Math.imul(h,ne)|0,c=(c=c+Math.imul(h,de)|0)+Math.imul(x,ne)|0,n=n+Math.imul(x,de)|0;var Ie=(i+(r=r+Math.imul(b,fe)|0)|0)+((8191&(c=(c=c+Math.imul(b,ie)|0)+Math.imul(l,fe)|0))<<13)|0;i=((n=n+Math.imul(l,ie)|0)+(c>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(R,Z),c=(c=Math.imul(R,U))+Math.imul(D,Z)|0,n=Math.imul(D,U),r=r+Math.imul(P,q)|0,c=(c=c+Math.imul(P,V)|0)+Math.imul(O,q)|0,n=n+Math.imul(O,V)|0,r=r+Math.imul(A,K)|0,c=(c=c+Math.imul(A,G)|0)+Math.imul(M,K)|0,n=n+Math.imul(M,G)|0,r=r+Math.imul(N,$)|0,c=(c=c+Math.imul(N,X)|0)+Math.imul(H,$)|0,n=n+Math.imul(H,X)|0,r=r+Math.imul(I,Q)|0,c=(c=c+Math.imul(I,ee)|0)+Math.imul(_,Q)|0,n=n+Math.imul(_,ee)|0,r=r+Math.imul(y,te)|0,c=(c=c+Math.imul(y,re)|0)+Math.imul(k,te)|0,n=n+Math.imul(k,re)|0,r=r+Math.imul(m,ne)|0,c=(c=c+Math.imul(m,de)|0)+Math.imul(v,ne)|0,n=n+Math.imul(v,de)|0,r=r+Math.imul(h,fe)|0,c=(c=c+Math.imul(h,ie)|0)+Math.imul(x,fe)|0,n=n+Math.imul(x,ie)|0;var _e=(i+(r=r+Math.imul(b,be)|0)|0)+((8191&(c=(c=c+Math.imul(b,le)|0)+Math.imul(l,be)|0))<<13)|0;i=((n=n+Math.imul(l,le)|0)+(c>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(L,Z),c=(c=Math.imul(L,U))+Math.imul(B,Z)|0,n=Math.imul(B,U),r=r+Math.imul(R,q)|0,c=(c=c+Math.imul(R,V)|0)+Math.imul(D,q)|0,n=n+Math.imul(D,V)|0,r=r+Math.imul(P,K)|0,c=(c=c+Math.imul(P,G)|0)+Math.imul(O,K)|0,n=n+Math.imul(O,G)|0,r=r+Math.imul(A,$)|0,c=(c=c+Math.imul(A,X)|0)+Math.imul(M,$)|0,n=n+Math.imul(M,X)|0,r=r+Math.imul(N,Q)|0,c=(c=c+Math.imul(N,ee)|0)+Math.imul(H,Q)|0,n=n+Math.imul(H,ee)|0,r=r+Math.imul(I,te)|0,c=(c=c+Math.imul(I,re)|0)+Math.imul(_,te)|0,n=n+Math.imul(_,re)|0,r=r+Math.imul(y,ne)|0,c=(c=c+Math.imul(y,de)|0)+Math.imul(k,ne)|0,n=n+Math.imul(k,de)|0,r=r+Math.imul(m,fe)|0,c=(c=c+Math.imul(m,ie)|0)+Math.imul(v,fe)|0,n=n+Math.imul(v,ie)|0,r=r+Math.imul(h,be)|0,c=(c=c+Math.imul(h,le)|0)+Math.imul(x,be)|0,n=n+Math.imul(x,le)|0;var Ee=(i+(r=r+Math.imul(b,he)|0)|0)+((8191&(c=(c=c+Math.imul(b,xe)|0)+Math.imul(l,he)|0))<<13)|0;i=((n=n+Math.imul(l,xe)|0)+(c>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(L,q),c=(c=Math.imul(L,V))+Math.imul(B,q)|0,n=Math.imul(B,V),r=r+Math.imul(R,K)|0,c=(c=c+Math.imul(R,G)|0)+Math.imul(D,K)|0,n=n+Math.imul(D,G)|0,r=r+Math.imul(P,$)|0,c=(c=c+Math.imul(P,X)|0)+Math.imul(O,$)|0,n=n+Math.imul(O,X)|0,r=r+Math.imul(A,Q)|0,c=(c=c+Math.imul(A,ee)|0)+Math.imul(M,Q)|0,n=n+Math.imul(M,ee)|0,r=r+Math.imul(N,te)|0,c=(c=c+Math.imul(N,re)|0)+Math.imul(H,te)|0,n=n+Math.imul(H,re)|0,r=r+Math.imul(I,ne)|0,c=(c=c+Math.imul(I,de)|0)+Math.imul(_,ne)|0,n=n+Math.imul(_,de)|0,r=r+Math.imul(y,fe)|0,c=(c=c+Math.imul(y,ie)|0)+Math.imul(k,fe)|0,n=n+Math.imul(k,ie)|0,r=r+Math.imul(m,be)|0,c=(c=c+Math.imul(m,le)|0)+Math.imul(v,be)|0,n=n+Math.imul(v,le)|0;var Ne=(i+(r=r+Math.imul(h,he)|0)|0)+((8191&(c=(c=c+Math.imul(h,xe)|0)+Math.imul(x,he)|0))<<13)|0;i=((n=n+Math.imul(x,xe)|0)+(c>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul(L,K),c=(c=Math.imul(L,G))+Math.imul(B,K)|0,n=Math.imul(B,G),r=r+Math.imul(R,$)|0,c=(c=c+Math.imul(R,X)|0)+Math.imul(D,$)|0,n=n+Math.imul(D,X)|0,r=r+Math.imul(P,Q)|0,c=(c=c+Math.imul(P,ee)|0)+Math.imul(O,Q)|0,n=n+Math.imul(O,ee)|0,r=r+Math.imul(A,te)|0,c=(c=c+Math.imul(A,re)|0)+Math.imul(M,te)|0,n=n+Math.imul(M,re)|0,r=r+Math.imul(N,ne)|0,c=(c=c+Math.imul(N,de)|0)+Math.imul(H,ne)|0,n=n+Math.imul(H,de)|0,r=r+Math.imul(I,fe)|0,c=(c=c+Math.imul(I,ie)|0)+Math.imul(_,fe)|0,n=n+Math.imul(_,ie)|0,r=r+Math.imul(y,be)|0,c=(c=c+Math.imul(y,le)|0)+Math.imul(k,be)|0,n=n+Math.imul(k,le)|0;var He=(i+(r=r+Math.imul(m,he)|0)|0)+((8191&(c=(c=c+Math.imul(m,xe)|0)+Math.imul(v,he)|0))<<13)|0;i=((n=n+Math.imul(v,xe)|0)+(c>>>13)|0)+(He>>>26)|0,He&=67108863,r=Math.imul(L,$),c=(c=Math.imul(L,X))+Math.imul(B,$)|0,n=Math.imul(B,X),r=r+Math.imul(R,Q)|0,c=(c=c+Math.imul(R,ee)|0)+Math.imul(D,Q)|0,n=n+Math.imul(D,ee)|0,r=r+Math.imul(P,te)|0,c=(c=c+Math.imul(P,re)|0)+Math.imul(O,te)|0,n=n+Math.imul(O,re)|0,r=r+Math.imul(A,ne)|0,c=(c=c+Math.imul(A,de)|0)+Math.imul(M,ne)|0,n=n+Math.imul(M,de)|0,r=r+Math.imul(N,fe)|0,c=(c=c+Math.imul(N,ie)|0)+Math.imul(H,fe)|0,n=n+Math.imul(H,ie)|0,r=r+Math.imul(I,be)|0,c=(c=c+Math.imul(I,le)|0)+Math.imul(_,be)|0,n=n+Math.imul(_,le)|0;var Se=(i+(r=r+Math.imul(y,he)|0)|0)+((8191&(c=(c=c+Math.imul(y,xe)|0)+Math.imul(k,he)|0))<<13)|0;i=((n=n+Math.imul(k,xe)|0)+(c>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(L,Q),c=(c=Math.imul(L,ee))+Math.imul(B,Q)|0,n=Math.imul(B,ee),r=r+Math.imul(R,te)|0,c=(c=c+Math.imul(R,re)|0)+Math.imul(D,te)|0,n=n+Math.imul(D,re)|0,r=r+Math.imul(P,ne)|0,c=(c=c+Math.imul(P,de)|0)+Math.imul(O,ne)|0,n=n+Math.imul(O,de)|0,r=r+Math.imul(A,fe)|0,c=(c=c+Math.imul(A,ie)|0)+Math.imul(M,fe)|0,n=n+Math.imul(M,ie)|0,r=r+Math.imul(N,be)|0,c=(c=c+Math.imul(N,le)|0)+Math.imul(H,be)|0,n=n+Math.imul(H,le)|0;var Ae=(i+(r=r+Math.imul(I,he)|0)|0)+((8191&(c=(c=c+Math.imul(I,xe)|0)+Math.imul(_,he)|0))<<13)|0;i=((n=n+Math.imul(_,xe)|0)+(c>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(L,te),c=(c=Math.imul(L,re))+Math.imul(B,te)|0,n=Math.imul(B,re),r=r+Math.imul(R,ne)|0,c=(c=c+Math.imul(R,de)|0)+Math.imul(D,ne)|0,n=n+Math.imul(D,de)|0,r=r+Math.imul(P,fe)|0,c=(c=c+Math.imul(P,ie)|0)+Math.imul(O,fe)|0,n=n+Math.imul(O,ie)|0,r=r+Math.imul(A,be)|0,c=(c=c+Math.imul(A,le)|0)+Math.imul(M,be)|0,n=n+Math.imul(M,le)|0;var Me=(i+(r=r+Math.imul(N,he)|0)|0)+((8191&(c=(c=c+Math.imul(N,xe)|0)+Math.imul(H,he)|0))<<13)|0;i=((n=n+Math.imul(H,xe)|0)+(c>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,ne),c=(c=Math.imul(L,de))+Math.imul(B,ne)|0,n=Math.imul(B,de),r=r+Math.imul(R,fe)|0,c=(c=c+Math.imul(R,ie)|0)+Math.imul(D,fe)|0,n=n+Math.imul(D,ie)|0,r=r+Math.imul(P,be)|0,c=(c=c+Math.imul(P,le)|0)+Math.imul(O,be)|0,n=n+Math.imul(O,le)|0;var Te=(i+(r=r+Math.imul(A,he)|0)|0)+((8191&(c=(c=c+Math.imul(A,xe)|0)+Math.imul(M,he)|0))<<13)|0;i=((n=n+Math.imul(M,xe)|0)+(c>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(L,fe),c=(c=Math.imul(L,ie))+Math.imul(B,fe)|0,n=Math.imul(B,ie),r=r+Math.imul(R,be)|0,c=(c=c+Math.imul(R,le)|0)+Math.imul(D,be)|0,n=n+Math.imul(D,le)|0;var Pe=(i+(r=r+Math.imul(P,he)|0)|0)+((8191&(c=(c=c+Math.imul(P,xe)|0)+Math.imul(O,he)|0))<<13)|0;i=((n=n+Math.imul(O,xe)|0)+(c>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(L,be),c=(c=Math.imul(L,le))+Math.imul(B,be)|0,n=Math.imul(B,le);var Oe=(i+(r=r+Math.imul(R,he)|0)|0)+((8191&(c=(c=c+Math.imul(R,xe)|0)+Math.imul(D,he)|0))<<13)|0;i=((n=n+Math.imul(D,xe)|0)+(c>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Ce=(i+(r=Math.imul(L,he))|0)+((8191&(c=(c=Math.imul(L,xe))+Math.imul(B,he)|0))<<13)|0;return i=((n=Math.imul(B,xe))+(c>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,f[0]=pe,f[1]=me,f[2]=ve,f[3]=ge,f[4]=ye,f[5]=ke,f[6]=we,f[7]=Ie,f[8]=_e,f[9]=Ee,f[10]=Ne,f[11]=He,f[12]=Se,f[13]=Ae,f[14]=Me,f[15]=Te,f[16]=Pe,f[17]=Oe,f[18]=Ce,0!==i&&(f[19]=i,t.length++),t};function m(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var r=0,c=0,n=0;n>>26)|0)>>>26,d&=67108863}t.words[n]=o,r=d,d=c}return 0!==r?t.words[n]=r:t.length--,t._strip()}function v(e,a,t){return m(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(p=x),n.prototype.mulTo=function(e,a){var t=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,a):t<63?x(this,e,a):t<1024?m(this,e,a):v(this,e,a)},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=n.prototype._countBits(e)-1,r=0;r>=1;return r},g.prototype.permute=function(e,a,t,r,c,n){for(var d=0;d>>=1)c++;return 1<>>=13,t[2*d+1]=8191&n,n>>>=13;for(d=2*a;d>=26,t+=n/67108864|0,t+=d>>>26,this.words[c]=67108863&d}return 0!==t&&(this.words[c]=t,this.length++),a?this.ineg():this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>c&1}return a}(e);if(0===a.length)return new n(1);for(var t=this,r=0;r=0);var a,t=e%26,c=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!==t){var d=0;for(a=0;a>>26-t}d&&(this.words[a]=d,this.length++)}if(0!==c){for(a=this.length-1;a>=0;a--)this.words[a+c]=this.words[a];for(a=0;a=0),c=a?(a-a%26)/26:0;var n=e%26,d=Math.min((e-n)/26,this.length),o=67108863^67108863>>>n<d)for(this.length-=d,i=0;i=0&&(0!==s||i>=c);i--){var b=0|this.words[i];this.words[i]=s<<26-n|b>>>n,s=b&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(e,a,t){return r(0===this.negative),this.iushrn(e,a,t)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"===typeof e&&e>=0);var a=e%26,t=(e-a)/26,c=1<=0);var a=e%26,t=(e-a)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var c=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},n.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(f/67108864|0),this.words[c+t]=67108863&n}for(;c>26,this.words[c+t]=67108863&n;if(0===o)return this._strip();for(r(-1===o),o=0,c=0;c>26,this.words[c]=67108863&n;return this.negative=1,this._strip()},n.prototype._wordDiv=function(e,a){var t=(this.length,e.length),r=this.clone(),c=e,d=0|c.words[c.length-1];0!==(t=26-this._countBits(d))&&(c=c.ushln(t),r.iushln(t),d=0|c.words[c.length-1]);var o,f=r.length-c.length;if("mod"!==a){(o=new n(null)).length=f+1,o.words=new Array(o.length);for(var i=0;i=0;b--){var l=67108864*(0|r.words[c.length+b])+(0|r.words[c.length+b-1]);for(l=Math.min(l/d|0,67108863),r._ishlnsubmul(c,l,b);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(c,1,b),r.isZero()||(r.negative^=1);o&&(o.words[b]=l)}return o&&o._strip(),r._strip(),"div"!==a&&0!==t&&r.iushrn(t),{div:o||null,mod:r}},n.prototype.divmod=function(e,a,t){return r(!e.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,a),"mod"!==a&&(c=o.div.neg()),"div"!==a&&(d=o.mod.neg(),t&&0!==d.negative&&d.iadd(e)),{div:c,mod:d}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),a),"mod"!==a&&(c=o.div.neg()),{div:c,mod:o.mod}):0!==(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),a),"div"!==a&&(d=o.mod.neg(),t&&0!==d.negative&&d.isub(e)),{div:o.div,mod:d}):e.length>this.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new n(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modrn(e.words[0]))}:this._wordDiv(e,a);var c,d,o},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,r=e.ushrn(1),c=e.andln(1),n=t.cmp(r);return n<0||1===c&&0===n?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},n.prototype.modrn=function(e){var a=e<0;a&&(e=-e),r(e<=67108863);for(var t=(1<<26)%e,c=0,n=this.length-1;n>=0;n--)c=(t*c+(0|this.words[n]))%e;return a?-c:c},n.prototype.modn=function(e){return this.modrn(e)},n.prototype.idivn=function(e){var a=e<0;a&&(e=-e),r(e<=67108863);for(var t=0,c=this.length-1;c>=0;c--){var n=(0|this.words[c])+67108864*t;this.words[c]=n/e|0,t=n%e}return this._strip(),a?this.ineg():this},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var c=new n(1),d=new n(0),o=new n(0),f=new n(1),i=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++i;for(var s=t.clone(),b=a.clone();!a.isZero();){for(var l=0,u=1;0===(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(c.isOdd()||d.isOdd())&&(c.iadd(s),d.isub(b)),c.iushrn(1),d.iushrn(1);for(var h=0,x=1;0===(t.words[0]&x)&&h<26;++h,x<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(o.isOdd()||f.isOdd())&&(o.iadd(s),f.isub(b)),o.iushrn(1),f.iushrn(1);a.cmp(t)>=0?(a.isub(t),c.isub(o),d.isub(f)):(t.isub(a),o.isub(c),f.isub(d))}return{a:o,b:f,gcd:t.iushln(i)}},n.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var c,d=new n(1),o=new n(0),f=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var i=0,s=1;0===(a.words[0]&s)&&i<26;++i,s<<=1);if(i>0)for(a.iushrn(i);i-- >0;)d.isOdd()&&d.iadd(f),d.iushrn(1);for(var b=0,l=1;0===(t.words[0]&l)&&b<26;++b,l<<=1);if(b>0)for(t.iushrn(b);b-- >0;)o.isOdd()&&o.iadd(f),o.iushrn(1);a.cmp(t)>=0?(a.isub(t),d.isub(o)):(t.isub(a),o.isub(d))}return(c=0===a.cmpn(1)?d:o).cmpn(0)<0&&c.iadd(e),c},n.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var r=0;a.isEven()&&t.isEven();r++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var c=a.cmp(t);if(c<0){var n=a;a=t,t=n}else if(0===c||0===t.cmpn(1))break;a.isub(t)}return t.iushln(r)},n.prototype.invm=function(e){return this.egcd(e).a.umod(e)},n.prototype.isEven=function(){return 0===(1&this.words[0])},n.prototype.isOdd=function(){return 1===(1&this.words[0])},n.prototype.andln=function(e){return this.words[0]&e},n.prototype.bincn=function(e){r("number"===typeof e);var a=e%26,t=(e-a)/26,c=1<>>26,o&=67108863,this.words[d]=o}return 0!==n&&(this.words[d]=n,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this._strip(),this.length>1)a=1;else{t&&(e=-e),r(e<=67108863,"Number is too big");var c=0|this.words[0];a=c===e?0:ce.length)return 1;if(this.length=0;t--){var r=0|this.words[t],c=0|e.words[t];if(r!==c){rc&&(a=1);break}}return a},n.prototype.gtn=function(e){return 1===this.cmpn(e)},n.prototype.gt=function(e){return 1===this.cmp(e)},n.prototype.gten=function(e){return this.cmpn(e)>=0},n.prototype.gte=function(e){return this.cmp(e)>=0},n.prototype.ltn=function(e){return-1===this.cmpn(e)},n.prototype.lt=function(e){return-1===this.cmp(e)},n.prototype.lten=function(e){return this.cmpn(e)<=0},n.prototype.lte=function(e){return this.cmp(e)<=0},n.prototype.eqn=function(e){return 0===this.cmpn(e)},n.prototype.eq=function(e){return 0===this.cmp(e)},n.red=function(e){return new N(e)},n.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(e){return this.red=e,this},n.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},n.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},n.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},n.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},n.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},n.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},n.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},n.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function k(e,a){this.name=e,this.p=new n(a,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){k.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function I(){k.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){k.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){k.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function N(e){if("string"===typeof e){var a=n._prime(e);this.m=a.p,this.prime=a}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function H(e){N.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}k.prototype._tmp=function(){var e=new n(null);return e.words=new Array(Math.ceil(this.n/13)),e},k.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var r=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},k.prototype.split=function(e,a){e.iushrn(this.n,0,a)},k.prototype.imulK=function(e){return e.imul(this.k)},c(w,k),w.prototype.split=function(e,a){for(var t=4194303,r=Math.min(e.length,9),c=0;c>>22,n=d}n>>>=22,e.words[c-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=c,a=r}return 0!==a&&(e.words[e.length++]=a),e},n._prime=function(e){if(y[e])return y[e];var a;if("k256"===e)a=new w;else if("p224"===e)a=new I;else if("p192"===e)a=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new E}return y[e]=a,a},N.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},N.prototype._verify2=function(e,a){r(0===(e.negative|a.negative),"red works only with positives"),r(e.red&&e.red===a.red,"red works only with red numbers")},N.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(s(e,e.umod(this.m)._forceRed(this)),e)},N.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},N.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},N.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},N.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},N.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},N.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},N.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},N.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},N.prototype.isqr=function(e){return this.imul(e,e.clone())},N.prototype.sqr=function(e){return this.mul(e,e)},N.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(r(a%2===1),3===a){var t=this.m.add(new n(1)).iushrn(2);return this.pow(e,t)}for(var c=this.m.subn(1),d=0;!c.isZero()&&0===c.andln(1);)d++,c.iushrn(1);r(!c.isZero());var o=new n(1).toRed(this),f=o.redNeg(),i=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new n(2*s*s).toRed(this);0!==this.pow(s,i).cmp(f);)s.redIAdd(f);for(var b=this.pow(s,c),l=this.pow(e,c.addn(1).iushrn(1)),u=this.pow(e,c),h=d;0!==u.cmp(o);){for(var x=u,p=0;0!==x.cmp(o);p++)x=x.redSqr();r(p=0;r--){for(var i=a.words[r],s=f-1;s>=0;s--){var b=i>>s&1;c!==t[0]&&(c=this.sqr(c)),0!==b||0!==d?(d<<=1,d|=b,(4===++o||0===r&&0===s)&&(c=this.mul(c,t[d]),o=0,d=0)):o=0}f=26}return c},N.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},N.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},n.mont=function(e){return new H(e)},c(H,N),H.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},H.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},H.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=t.isub(r).iushrn(this.shift),n=c;return c.cmp(this.m)>=0?n=c.isub(this.m):c.cmpn(0)<0&&(n=c.iadd(this.m)),n._forceRed(this)},H.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new n(0)._forceRed(this);var t=e.mul(a),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=t.isub(r).iushrn(this.shift),d=c;return c.cmp(this.m)>=0?d=c.isub(this.m):c.cmpn(0)<0&&(d=c.iadd(this.m)),d._forceRed(this)},H.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},45465:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var t="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r={},c={},n=(a.addCustomErrorDeserializer=function(e,a){c[e]=a},a.createCustomErrorClass=function(e){var a=function(a,t){Object.assign(this,t),this.name=e,this.message=a||e,this.stack=(new Error).stack};return a.prototype=new Error,r[e]=a,a});a.deserializeError=function e(a){if("object"===("undefined"===typeof a?"undefined":t(a))&&a){try{var d=JSON.parse(a.message);d.message&&d.name&&(a=d)}catch(l){}var o=void 0;if("string"===typeof a.name){var f=a.name,i=c[f];if(i)o=i(a);else{var s="Error"===f?Error:r[f];s||(console.warn("deserializing an unknown class '"+f+"'"),s=n(f)),o=Object.create(s.prototype);try{for(var b in a)a.hasOwnProperty(b)&&(o[b]=a[b])}catch(l){}}}else o=new Error(a.message);return!o.stack&&Error.captureStackTrace&&Error.captureStackTrace(o,e),o}return new Error(String(a))},a.serializeError=function(e){return e?"object"===("undefined"===typeof e?"undefined":t(e))?d(e,[]):"function"===typeof e?"[Function: "+(e.name||"anonymous")+"]":e:e};function d(e,a){var r={};a.push(e);var c=!0,n=!1,o=void 0;try{for(var f,i=Object.keys(e)[Symbol.iterator]();!(c=(f=i.next()).done);c=!0){var s=f.value,b=e[s];"function"!==typeof b&&(b&&"object"===("undefined"===typeof b?"undefined":t(b))?-1!==a.indexOf(e[s])?r[s]="[Circular]":r[s]=d(e[s],a.slice(0)):r[s]=b)}}catch(l){n=!0,o=l}finally{try{!c&&i.return&&i.return()}finally{if(n)throw o}}return"string"===typeof e.name&&(r.name=e.name),"string"===typeof e.message&&(r.message=e.message),"string"===typeof e.stack&&(r.stack=e.stack),r}},89772:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.StatusCodes=a.DBNotReset=a.DBWrongPassword=a.NoDBPathGiven=a.FirmwareOrAppUpdateRequired=a.LedgerAPI5xx=a.LedgerAPI4xx=a.GenuineCheckFailed=a.PairingFailed=a.SyncError=a.FeeTooHigh=a.FeeRequired=a.FeeNotLoaded=a.CantScanQRCode=a.ETHAddressNonEIP=a.WrongAppForCurrency=a.WrongDeviceForAccount=a.WebsocketConnectionFailed=a.WebsocketConnectionError=a.DeviceShouldStayInApp=a.TransportWebUSBGestureRequired=a.TransportInterfaceNotAvailable=a.TransportOpenUserCancelled=a.UserRefusedOnDevice=a.UserRefusedAllowManager=a.UserRefusedFirmwareUpdate=a.UserRefusedAddress=a.UserRefusedDeviceNameChange=a.UpdateYourApp=a.UnavailableTezosOriginatedAccountSend=a.UnavailableTezosOriginatedAccountReceive=a.RecipientRequired=a.MCUNotGenuineToDashboard=a.UnexpectedBootloader=a.TimeoutTagged=a.RecommendUndelegation=a.RecommendSubAccountsToEmpty=a.PasswordIncorrectError=a.PasswordsDontMatchError=a.GasLessThanEstimate=a.NotSupportedLegacyAddress=a.NotEnoughGas=a.NoAccessToCamera=a.NotEnoughBalanceBecauseDestinationNotCreated=a.NotEnoughSpendableBalance=a.NotEnoughBalanceInParentAccount=a.NotEnoughBalanceToDelegate=a.NotEnoughBalance=a.NoAddressesFound=a.NetworkDown=a.ManagerUninstallBTCDep=a.ManagerNotEnoughSpaceError=a.ManagerFirmwareNotEnoughSpaceError=a.ManagerDeviceLockedError=a.ManagerAppDepUninstallRequired=a.ManagerAppDepInstallRequired=a.ManagerAppRelyOnBTCError=a.ManagerAppAlreadyInstalledError=a.LedgerAPINotAvailable=a.LedgerAPIErrorWithMessage=a.LedgerAPIError=a.UnknownMCU=a.LatestMCUInstalledError=a.InvalidAddressBecauseDestinationIsAlsoSource=a.InvalidAddress=a.InvalidXRPTag=a.HardResetFail=a.FeeEstimationFailed=a.EthAppPleaseEnableContractData=a.EnpointConfigError=a.DisconnectedDeviceDuringOperation=a.DisconnectedDevice=a.DeviceSocketNoBulkStatus=a.DeviceSocketFail=a.DeviceNameInvalid=a.DeviceHalted=a.DeviceInOSUExpected=a.DeviceOnDashboardUnexpected=a.DeviceOnDashboardExpected=a.DeviceNotGenuineError=a.DeviceGenuineSocketEarlyClose=a.DeviceAppVerifyNotSupported=a.CurrencyNotSupported=a.CashAddrNotSupported=a.CantOpenDevice=a.BtcUnmatchedApp=a.BluetoothRequired=a.AmountRequired=a.AccountNotSupported=a.AccountNameRequiredError=a.addCustomErrorDeserializer=a.createCustomErrorClass=a.deserializeError=a.serializeError=void 0,a.TransportError=c,a.getAltStatusMessage=d,a.TransportStatusError=o;var r=t(45465);a.serializeError=r.serializeError,a.deserializeError=r.deserializeError,a.createCustomErrorClass=r.createCustomErrorClass,a.addCustomErrorDeserializer=r.addCustomErrorDeserializer;a.AccountNameRequiredError=(0,r.createCustomErrorClass)("AccountNameRequired"),a.AccountNotSupported=(0,r.createCustomErrorClass)("AccountNotSupported"),a.AmountRequired=(0,r.createCustomErrorClass)("AmountRequired"),a.BluetoothRequired=(0,r.createCustomErrorClass)("BluetoothRequired"),a.BtcUnmatchedApp=(0,r.createCustomErrorClass)("BtcUnmatchedApp"),a.CantOpenDevice=(0,r.createCustomErrorClass)("CantOpenDevice"),a.CashAddrNotSupported=(0,r.createCustomErrorClass)("CashAddrNotSupported"),a.CurrencyNotSupported=(0,r.createCustomErrorClass)("CurrencyNotSupported"),a.DeviceAppVerifyNotSupported=(0,r.createCustomErrorClass)("DeviceAppVerifyNotSupported"),a.DeviceGenuineSocketEarlyClose=(0,r.createCustomErrorClass)("DeviceGenuineSocketEarlyClose"),a.DeviceNotGenuineError=(0,r.createCustomErrorClass)("DeviceNotGenuine"),a.DeviceOnDashboardExpected=(0,r.createCustomErrorClass)("DeviceOnDashboardExpected"),a.DeviceOnDashboardUnexpected=(0,r.createCustomErrorClass)("DeviceOnDashboardUnexpected"),a.DeviceInOSUExpected=(0,r.createCustomErrorClass)("DeviceInOSUExpected"),a.DeviceHalted=(0,r.createCustomErrorClass)("DeviceHalted"),a.DeviceNameInvalid=(0,r.createCustomErrorClass)("DeviceNameInvalid"),a.DeviceSocketFail=(0,r.createCustomErrorClass)("DeviceSocketFail"),a.DeviceSocketNoBulkStatus=(0,r.createCustomErrorClass)("DeviceSocketNoBulkStatus"),a.DisconnectedDevice=(0,r.createCustomErrorClass)("DisconnectedDevice"),a.DisconnectedDeviceDuringOperation=(0,r.createCustomErrorClass)("DisconnectedDeviceDuringOperation"),a.EnpointConfigError=(0,r.createCustomErrorClass)("EnpointConfig"),a.EthAppPleaseEnableContractData=(0,r.createCustomErrorClass)("EthAppPleaseEnableContractData"),a.FeeEstimationFailed=(0,r.createCustomErrorClass)("FeeEstimationFailed"),a.HardResetFail=(0,r.createCustomErrorClass)("HardResetFail"),a.InvalidXRPTag=(0,r.createCustomErrorClass)("InvalidXRPTag"),a.InvalidAddress=(0,r.createCustomErrorClass)("InvalidAddress"),a.InvalidAddressBecauseDestinationIsAlsoSource=(0,r.createCustomErrorClass)("InvalidAddressBecauseDestinationIsAlsoSource"),a.LatestMCUInstalledError=(0,r.createCustomErrorClass)("LatestMCUInstalledError"),a.UnknownMCU=(0,r.createCustomErrorClass)("UnknownMCU"),a.LedgerAPIError=(0,r.createCustomErrorClass)("LedgerAPIError"),a.LedgerAPIErrorWithMessage=(0,r.createCustomErrorClass)("LedgerAPIErrorWithMessage"),a.LedgerAPINotAvailable=(0,r.createCustomErrorClass)("LedgerAPINotAvailable"),a.ManagerAppAlreadyInstalledError=(0,r.createCustomErrorClass)("ManagerAppAlreadyInstalled"),a.ManagerAppRelyOnBTCError=(0,r.createCustomErrorClass)("ManagerAppRelyOnBTC"),a.ManagerAppDepInstallRequired=(0,r.createCustomErrorClass)("ManagerAppDepInstallRequired"),a.ManagerAppDepUninstallRequired=(0,r.createCustomErrorClass)("ManagerAppDepUninstallRequired"),a.ManagerDeviceLockedError=(0,r.createCustomErrorClass)("ManagerDeviceLocked"),a.ManagerFirmwareNotEnoughSpaceError=(0,r.createCustomErrorClass)("ManagerFirmwareNotEnoughSpace"),a.ManagerNotEnoughSpaceError=(0,r.createCustomErrorClass)("ManagerNotEnoughSpace"),a.ManagerUninstallBTCDep=(0,r.createCustomErrorClass)("ManagerUninstallBTCDep"),a.NetworkDown=(0,r.createCustomErrorClass)("NetworkDown"),a.NoAddressesFound=(0,r.createCustomErrorClass)("NoAddressesFound"),a.NotEnoughBalance=(0,r.createCustomErrorClass)("NotEnoughBalance"),a.NotEnoughBalanceToDelegate=(0,r.createCustomErrorClass)("NotEnoughBalanceToDelegate"),a.NotEnoughBalanceInParentAccount=(0,r.createCustomErrorClass)("NotEnoughBalanceInParentAccount"),a.NotEnoughSpendableBalance=(0,r.createCustomErrorClass)("NotEnoughSpendableBalance"),a.NotEnoughBalanceBecauseDestinationNotCreated=(0,r.createCustomErrorClass)("NotEnoughBalanceBecauseDestinationNotCreated"),a.NoAccessToCamera=(0,r.createCustomErrorClass)("NoAccessToCamera"),a.NotEnoughGas=(0,r.createCustomErrorClass)("NotEnoughGas"),a.NotSupportedLegacyAddress=(0,r.createCustomErrorClass)("NotSupportedLegacyAddress"),a.GasLessThanEstimate=(0,r.createCustomErrorClass)("GasLessThanEstimate"),a.PasswordsDontMatchError=(0,r.createCustomErrorClass)("PasswordsDontMatch"),a.PasswordIncorrectError=(0,r.createCustomErrorClass)("PasswordIncorrect"),a.RecommendSubAccountsToEmpty=(0,r.createCustomErrorClass)("RecommendSubAccountsToEmpty"),a.RecommendUndelegation=(0,r.createCustomErrorClass)("RecommendUndelegation"),a.TimeoutTagged=(0,r.createCustomErrorClass)("TimeoutTagged"),a.UnexpectedBootloader=(0,r.createCustomErrorClass)("UnexpectedBootloader"),a.MCUNotGenuineToDashboard=(0,r.createCustomErrorClass)("MCUNotGenuineToDashboard"),a.RecipientRequired=(0,r.createCustomErrorClass)("RecipientRequired"),a.UnavailableTezosOriginatedAccountReceive=(0,r.createCustomErrorClass)("UnavailableTezosOriginatedAccountReceive"),a.UnavailableTezosOriginatedAccountSend=(0,r.createCustomErrorClass)("UnavailableTezosOriginatedAccountSend"),a.UpdateYourApp=(0,r.createCustomErrorClass)("UpdateYourApp"),a.UserRefusedDeviceNameChange=(0,r.createCustomErrorClass)("UserRefusedDeviceNameChange"),a.UserRefusedAddress=(0,r.createCustomErrorClass)("UserRefusedAddress"),a.UserRefusedFirmwareUpdate=(0,r.createCustomErrorClass)("UserRefusedFirmwareUpdate"),a.UserRefusedAllowManager=(0,r.createCustomErrorClass)("UserRefusedAllowManager"),a.UserRefusedOnDevice=(0,r.createCustomErrorClass)("UserRefusedOnDevice"),a.TransportOpenUserCancelled=(0,r.createCustomErrorClass)("TransportOpenUserCancelled"),a.TransportInterfaceNotAvailable=(0,r.createCustomErrorClass)("TransportInterfaceNotAvailable"),a.TransportWebUSBGestureRequired=(0,r.createCustomErrorClass)("TransportWebUSBGestureRequired"),a.DeviceShouldStayInApp=(0,r.createCustomErrorClass)("DeviceShouldStayInApp"),a.WebsocketConnectionError=(0,r.createCustomErrorClass)("WebsocketConnectionError"),a.WebsocketConnectionFailed=(0,r.createCustomErrorClass)("WebsocketConnectionFailed"),a.WrongDeviceForAccount=(0,r.createCustomErrorClass)("WrongDeviceForAccount"),a.WrongAppForCurrency=(0,r.createCustomErrorClass)("WrongAppForCurrency"),a.ETHAddressNonEIP=(0,r.createCustomErrorClass)("ETHAddressNonEIP"),a.CantScanQRCode=(0,r.createCustomErrorClass)("CantScanQRCode"),a.FeeNotLoaded=(0,r.createCustomErrorClass)("FeeNotLoaded"),a.FeeRequired=(0,r.createCustomErrorClass)("FeeRequired"),a.FeeTooHigh=(0,r.createCustomErrorClass)("FeeTooHigh"),a.SyncError=(0,r.createCustomErrorClass)("SyncError"),a.PairingFailed=(0,r.createCustomErrorClass)("PairingFailed"),a.GenuineCheckFailed=(0,r.createCustomErrorClass)("GenuineCheckFailed"),a.LedgerAPI4xx=(0,r.createCustomErrorClass)("LedgerAPI4xx"),a.LedgerAPI5xx=(0,r.createCustomErrorClass)("LedgerAPI5xx"),a.FirmwareOrAppUpdateRequired=(0,r.createCustomErrorClass)("FirmwareOrAppUpdateRequired"),a.NoDBPathGiven=(0,r.createCustomErrorClass)("NoDBPathGiven"),a.DBWrongPassword=(0,r.createCustomErrorClass)("DBWrongPassword"),a.DBNotReset=(0,r.createCustomErrorClass)("DBNotReset");function c(e,a){this.name="TransportError",this.message=e,this.stack=(new Error).stack,this.id=a}c.prototype=new Error,(0,r.addCustomErrorDeserializer)("TransportError",(function(e){return new c(e.message,e.id)}));var n=a.StatusCodes={PIN_REMAINING_ATTEMPTS:25536,INCORRECT_LENGTH:26368,COMMAND_INCOMPATIBLE_FILE_STRUCTURE:27009,SECURITY_STATUS_NOT_SATISFIED:27010,CONDITIONS_OF_USE_NOT_SATISFIED:27013,INCORRECT_DATA:27264,NOT_ENOUGH_MEMORY_SPACE:27268,REFERENCED_DATA_NOT_FOUND:27272,FILE_ALREADY_EXISTS:27273,INCORRECT_P1_P2:27392,INS_NOT_SUPPORTED:27904,CLA_NOT_SUPPORTED:28160,TECHNICAL_PROBLEM:28416,OK:36864,MEMORY_PROBLEM:37440,NO_EF_SELECTED:37888,INVALID_OFFSET:37890,FILE_NOT_FOUND:37892,INCONSISTENT_FILE:37896,ALGORITHM_NOT_SUPPORTED:38020,INVALID_KCV:38021,CODE_NOT_INITIALIZED:38914,ACCESS_CONDITION_NOT_FULFILLED:38916,CONTRADICTION_SECRET_CODE_STATUS:38920,CONTRADICTION_INVALIDATION:38928,CODE_BLOCKED:38976,MAX_VALUE_REACHED:38992,GP_AUTH_FAILED:25344,LICENSING:28482,HALTED:28586};function d(e){switch(e){case 26368:return"Incorrect length";case 27010:return"Security not satisfied (dongle locked or have invalid access rights)";case 27013:return"Condition of use not satisfied (denied by the user?)";case 27264:return"Invalid data received";case 27392:return"Invalid parameter received"}if(28416<=e&&e<=28671)return"Internal error, please report"}function o(e){this.name="TransportStatusError";var a=Object.keys(n).find((function(a){return n[a]===e}))||"UNKNOWN_ERROR",t=d(e)||a,r=e.toString(16);this.message="Ledger device: "+t+" (0x"+r+")",this.stack=(new Error).stack,this.statusCode=e,this.statusText=a}o.prototype=new Error,(0,r.addCustomErrorDeserializer)("TransportStatusError",(function(e){return new o(e.statusCode)}))},13157:function(e,a,t){"use strict";var r=t(19778).Buffer;Object.defineProperty(a,"__esModule",{value:!0});var c=function(){function e(e,a){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"w0w";o(this,e),this.transport=a,a.decorateAppAPIMethods(this,["getAddress","provideERC20TokenInformation","signTransaction","signPersonalMessage","getAppConfiguration"],t)}return c(e,[{key:"getAddress",value:function(e,a,t){var c=(0,n.splitPath)(e),d=new r(1+4*c.length);return d[0]=c.length,c.forEach((function(e,a){d.writeUInt32BE(e,1+4*a)})),this.transport.send(224,2,a?1:0,t?1:0,d).then((function(e){var a={},r=e[0],c=e[1+r];return a.publicKey=e.slice(1,1+r).toString("hex"),a.address="0x"+e.slice(1+r+1,1+r+1+c).toString("ascii"),t&&(a.chainCode=e.slice(1+r+1+c,1+r+1+c+32).toString("hex")),a}))}},{key:"provideERC20TokenInformation",value:function(e){var a=e.data;return this.transport.send(224,10,0,0,a).then((function(){return!0}),(function(e){if(e&&27904===e.statusCode)return!1;throw e}))}},{key:"signTransaction",value:function(e,a){for(var t=this,c=(0,n.splitPath)(e),o=0,f=new r(a,"hex"),i=[],s=void 0,b=function(){var e=0===o?149-4*c.length:150,a=o+e>f.length?f.length-o:e,t=new r(0===o?1+4*c.length+a:a);0===o?(t[0]=c.length,c.forEach((function(e,a){t.writeUInt32BE(e,1+4*a)})),f.copy(t,1+4*c.length,o,o+a)):f.copy(t,0,o,o+a),i.push(t),o+=a};o!==f.length;)b();return(0,n.foreach)(i,(function(e,a){return t.transport.send(224,4,0===a?0:128,0,e).then((function(e){s=e}))})).then((function(){return{v:s.slice(0,1).toString("hex"),r:s.slice(1,33).toString("hex"),s:s.slice(33,65).toString("hex")}}),(function(e){throw function(e){return e&&27264===e.statusCode?new d.EthAppPleaseEnableContractData("Please enable Contract data on the Ethereum app Settings"):e}(e)}))}},{key:"getAppConfiguration",value:function(){return this.transport.send(224,6,0,0).then((function(e){var a={};return a.arbitraryDataEnabled=1&e[0],a.version=e[1]+"."+e[2]+"."+e[3],a}))}},{key:"signPersonalMessage",value:function(e,a){for(var t=this,c=(0,n.splitPath)(e),d=0,o=new r(a,"hex"),f=[],i=void 0,s=function(){var e=0===d?149-4*c.length-4:150,a=d+e>o.length?o.length-d:e,t=new r(0===d?1+4*c.length+4+a:a);0===d?(t[0]=c.length,c.forEach((function(e,a){t.writeUInt32BE(e,1+4*a)})),t.writeUInt32BE(o.length,1+4*c.length),o.copy(t,1+4*c.length+4,d,d+a)):o.copy(t,0,d,d+a),f.push(t),d+=a};d!==o.length;)s();return(0,n.foreach)(f,(function(e,a){return t.transport.send(224,8,0===a?0:128,0,e).then((function(e){i=e}))})).then((function(){return{v:i[0],r:i.slice(1,33).toString("hex"),s:i.slice(33,65).toString("hex")}}))}}]),e}();a.default=f},44230:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.defer=function(){var e=void 0,a=void 0,t=new Promise((function(t,r){e=t,a=r}));if(!e||!a)throw"defer() error";return{promise:t,resolve:e,reject:a}},a.splitPath=function(e){var a=[];return e.split("/").forEach((function(e){var t=parseInt(e,10);isNaN(t)||(e.length>1&&"'"===e[e.length-1]&&(t+=2147483648),a.push(t))})),a},a.eachSeries=function(e,a){return e.reduce((function(e,t){return e.then((function(){return a(t)}))}),Promise.resolve())},a.foreach=function(e,a){function t(e,r,c){return e>=r.length?c:a(r[e],e).then((function(a){return c.push(a),t(e+1,r,c)}))}return Promise.resolve().then((function(){return t(0,e,[])}))},a.doIf=function(e,a){return Promise.resolve().then((function(){if(e)return a()}))},a.asyncWhile=function(e,a){return Promise.resolve([]).then((function t(r){return e()?a().then((function(e){return r.push(e),t(r)})):r}))}},52111:function(e,a,t){"use strict";var r=t(19778).Buffer;Object.defineProperty(a,"__esModule",{value:!0});var c=p(t(77327)),n=p(t(68129)),d=p(t(53415)),o=p(t(33283)),f=p(t(95977)),i=p(t(75053)),s=p(t(14976)),b=p(t(42749)),l=p(t(42455)),u=t(89449),h=t(42940),x=p(h);function p(e){return e&&e.__esModule?e:{default:e}}function m(e,a,t){var r=new h.TransportError(a,t);return r.originalError=e,r}var v=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")};function g(e,a,t,c){var n=function(e,a){for(var t=r.alloc(e.length),c=0;c "+e.toString("hex")),(0,u.sign)(o,a/1e3).then((function(e){var a,c=e.signatureData;if("string"===typeof c){var n=r.from((a=c).replace(/-/g,"+").replace(/_/g,"/")+"==".substring(0,3*a.length%4),"base64").slice(5);return t&&t("<= "+n.toString("hex")),n}throw e}))}var y=[];var k=function(e){function a(){(0,i.default)(this,a);var e=(0,s.default)(this,(a.__proto__||(0,d.default)(a)).call(this));return y.push(e),e}return(0,l.default)(a,e),(0,b.default)(a,null,[{key:"open",value:function(){var e=(0,f.default)(o.default.mark((function e(t){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new a);case 1:case"end":return e.stop()}}),e,this)})));return function(a){return e.apply(this,arguments)}}()}]),(0,b.default)(a,[{key:"exchange",value:function(){var e=(0,f.default)(o.default.mark((function e(a){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g(a,this.exchangeTimeout,this.debug,this.scrambleKey);case 3:return e.abrupt("return",e.sent);case 6:if(e.prev=6,e.t0=e.catch(0),!("object"===(0,n.default)(e.t0.metaData))){e.next=14;break}throw 5===e.t0.metaData.code&&(y.forEach((function(e){return e.emit("disconnect")})),y=[]),m(e.t0,"Failed to sign with Ledger device: U2F "+e.t0.metaData.type,"U2F_"+e.t0.metaData.code);case 14:throw e.t0;case 15:case"end":return e.stop()}}),e,this,[[0,6]])})));return function(a){return e.apply(this,arguments)}}()},{key:"setScrambleKey",value:function(e){this.scrambleKey=r.from(e,"ascii")}},{key:"close",value:function(){var e=y.indexOf(this);if(-1===e)throw new Error("invalid transport instance");return y.splice(e,1),c.default.resolve()}}]),a}(x.default);k.isSupported=u.isSupported,k.list=function(){return(0,u.isSupported)().then((function(e){return e?[null]:[]}))},k.listen=function(e){var a=!1;return(0,u.isSupported)().then((function(t){a||(t?(e.next({type:"add",descriptor:null}),e.complete()):e.error(new h.TransportError("U2F browser support is needed for Ledger. Please use Chrome, Opera or Firefox with a U2F extension. Also make sure you're on an HTTPS connection","U2FNotSupported")))})),{unsubscribe:function(){a=!0}}},a.default=k},42940:function(e,a,t){"use strict";var r=t(19778).Buffer,c=t(17061).default;Object.defineProperty(a,"__esModule",{value:!0}),a.getAltStatusMessage=a.StatusCodes=a.TransportStatusError=a.TransportError=void 0;var n,d=function(){function e(e,a){for(var t=0;t4&&void 0!==arguments[4]?arguments[4]:r.alloc(0),l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[i.StatusCodes.OK];return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(b.length>=256)){e.next=2;break}throw new i.TransportError("data.length exceed 256 bytes limit. Got: "+b.length,"DataLengthTooBig");case 2:return e.next=4,a.exchange(r.concat([r.from([t,n,d,o]),r.from([b.length]),b]));case 4:if(f=e.sent,s=f.readUInt16BE(f.length-2),l.some((function(e){return e===s}))){e.next=8;break}throw new i.TransportStatusError(s);case 8:return e.abrupt("return",f);case 9:case"end":return e.stop()}}),e,a)})));return function(a,t,r,c){return e.apply(this,arguments)}}(),this.exchangeAtomicImpl=function(){var e=b(c().mark((function e(t){var r,n,d;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.exchangeBusyPromise){e.next=2;break}throw new i.TransportError("Transport race condition","RaceCondition");case 2:return r=void 0,n=new Promise((function(e){r=e})),a.exchangeBusyPromise=n,e.prev=5,e.next=8,t();case 8:return d=e.sent,e.abrupt("return",d);case 10:return e.prev=10,r&&r(),a.exchangeBusyPromise=null,e.finish(10);case 14:case"end":return e.stop()}}),e,a,[[5,,10,14]])})));return function(a){return e.apply(this,arguments)}}(),this._appAPIlock=null}return d(e,[{key:"on",value:function(e,a){this._events.on(e,a)}},{key:"off",value:function(e,a){this._events.removeListener(e,a)}},{key:"emit",value:function(e){for(var a,t=arguments.length,r=Array(t>1?t-1:0),c=1;c0&&void 0!==arguments[0]?arguments[0]:3e3,t=arguments[1];return new Promise((function(r,c){var n=!1,d=e.listen({next:function(t){n=!0,d&&d.unsubscribe(),o&&clearTimeout(o),e.open(t.descriptor,a).then(r,c)},error:function(e){o&&clearTimeout(o),c(e)},complete:function(){o&&clearTimeout(o),n||c(new i.TransportError(e.ErrorMessage_NoDeviceFound,"NoDeviceFound"))}}),o=t?setTimeout((function(){d.unsubscribe(),c(new i.TransportError(e.ErrorMessage_ListenTimeout,"ListenTimeout"))}),t):null}))}}]),e}();l.ErrorMessage_ListenTimeout="No Ledger device found (timeout)",l.ErrorMessage_NoDeviceFound="No Ledger device found",a.default=l},98091:function(e,a){"use strict";a.Z=void 0;var t={50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00"};a.Z=t},16608:function(e,a,t){"use strict";var r=t(87462),c=t(45987),n=t(72791),d=t(28182),o=t(38317),f=t(91122),i=n.forwardRef((function(e,a){var t=e.children,o=e.classes,i=e.className,s=e.color,b=void 0===s?"inherit":s,l=e.component,u=void 0===l?"svg":l,h=e.fontSize,x=void 0===h?"medium":h,p=e.htmlColor,m=e.titleAccess,v=e.viewBox,g=void 0===v?"0 0 24 24":v,y=(0,c.Z)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return n.createElement(u,(0,r.Z)({className:(0,d.Z)(o.root,i,"inherit"!==b&&o["color".concat((0,f.Z)(b))],"default"!==x&&"medium"!==x&&o["fontSize".concat((0,f.Z)(x))]),focusable:"false",viewBox:g,color:p,"aria-hidden":!m||void 0,role:m?"img":void 0,ref:a},y),t,m?n.createElement("title",null,m):null)}));i.muiName="SvgIcon",a.Z=(0,o.Z)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(i)},13108:function(e,a,t){"use strict";t.d(a,{$n:function(){return l},Fq:function(){return s},_4:function(){return i},_j:function(){return b},mi:function(){return o}});var r=t(37483);function c(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(a,e),t)}function n(e){if(e.type)return e;if("#"===e.charAt(0))return n(function(e){e=e.substr(1);var a=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),t=e.match(a);return t&&1===t[0].length&&(t=t.map((function(e){return e+e}))),t?"rgb".concat(4===t.length?"a":"","(").concat(t.map((function(e,a){return a<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var a=e.indexOf("("),t=e.substring(0,a);if(-1===["rgb","rgba","hsl","hsla"].indexOf(t))throw new Error((0,r.Z)(3,e));var c=e.substring(a+1,e.length-1).split(",");return{type:t,values:c=c.map((function(e){return parseFloat(e)}))}}function d(e){var a=e.type,t=e.values;return-1!==a.indexOf("rgb")?t=t.map((function(e,a){return a<3?parseInt(e,10):e})):-1!==a.indexOf("hsl")&&(t[1]="".concat(t[1],"%"),t[2]="".concat(t[2],"%")),"".concat(a,"(").concat(t.join(", "),")")}function o(e,a){var t=f(e),r=f(a);return(Math.max(t,r)+.05)/(Math.min(t,r)+.05)}function f(e){var a="hsl"===(e=n(e)).type?n(function(e){var a=(e=n(e)).values,t=a[0],r=a[1]/100,c=a[2]/100,o=r*Math.min(c,1-c),f=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return c-o*Math.max(Math.min(a-3,9-a,1),-1)},i="rgb",s=[Math.round(255*f(0)),Math.round(255*f(8)),Math.round(255*f(4))];return"hsla"===e.type&&(i+="a",s.push(a[3])),d({type:i,values:s})}(e)).values:e.values;return a=a.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*a[0]+.7152*a[1]+.0722*a[2]).toFixed(3))}function i(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return f(e)>.5?b(e,a):l(e,a)}function s(e,a){return e=n(e),a=c(a),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=a,d(e)}function b(e,a){if(e=n(e),a=c(a),-1!==e.type.indexOf("hsl"))e.values[2]*=1-a;else if(-1!==e.type.indexOf("rgb"))for(var t=0;t<3;t+=1)e.values[t]*=1-a;return d(e)}function l(e,a){if(e=n(e),a=c(a),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*a;else if(-1!==e.type.indexOf("rgb"))for(var t=0;t<3;t+=1)e.values[t]+=(255-e.values[t])*a;return d(e)}},47121:function(e,a,t){"use strict";t.d(a,{X:function(){return n},Z:function(){return d}});var r=t(87462),c=t(45987),n=["xs","sm","md","lg","xl"];function d(e){var a=e.values,t=void 0===a?{xs:0,sm:600,md:960,lg:1280,xl:1920}:a,d=e.unit,o=void 0===d?"px":d,f=e.step,i=void 0===f?5:f,s=(0,c.Z)(e,["values","unit","step"]);function b(e){var a="number"===typeof t[e]?t[e]:e;return"@media (min-width:".concat(a).concat(o,")")}function l(e,a){var r=n.indexOf(a);return r===n.length-1?b(e):"@media (min-width:".concat("number"===typeof t[e]?t[e]:e).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof t[n[r+1]]?t[n[r+1]]:a)-i/100).concat(o,")")}return(0,r.Z)({keys:n,values:t,up:b,down:function(e){var a=n.indexOf(e)+1,r=t[n[a]];return a===n.length?b("xs"):"@media (max-width:".concat(("number"===typeof r&&a>0?r:e)-i/100).concat(o,")")},between:l,only:function(e){return l(e,e)},width:function(e){return t[e]}},s)}},65628:function(e,a,t){"use strict";t.d(a,{Z:function(){return D}});var r=t(45987),c=t(81534),n=t(47121),d=t(4942),o=t(87462);function f(e,a,t){var r;return(0,o.Z)({gutters:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),(0,o.Z)({paddingLeft:a(2),paddingRight:a(2)},t,(0,d.Z)({},e.up("sm"),(0,o.Z)({paddingLeft:a(3),paddingRight:a(3)},t[e.up("sm")])))},toolbar:(r={minHeight:56},(0,d.Z)(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),(0,d.Z)(r,e.up("sm"),{minHeight:64}),r)},t)}var i=t(37483),s={black:"#000",white:"#fff"},b={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},l={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},u={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},h={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},x={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},p={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},m={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},v=t(13108),g={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:s.white,default:b[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},y={text:{primary:s.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:b[800],default:"#303030"},action:{active:s.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function k(e,a,t,r){var c=r.light||r,n=r.dark||1.5*r;e[a]||(e.hasOwnProperty(t)?e[a]=e[t]:"light"===a?e.light=(0,v.$n)(e.main,c):"dark"===a&&(e.dark=(0,v._j)(e.main,n)))}function w(e){var a=e.primary,t=void 0===a?{light:l[300],main:l[500],dark:l[700]}:a,n=e.secondary,d=void 0===n?{light:u.A200,main:u.A400,dark:u.A700}:n,f=e.error,w=void 0===f?{light:h[300],main:h[500],dark:h[700]}:f,I=e.warning,_=void 0===I?{light:x[300],main:x[500],dark:x[700]}:I,E=e.info,N=void 0===E?{light:p[300],main:p[500],dark:p[700]}:E,H=e.success,S=void 0===H?{light:m[300],main:m[500],dark:m[700]}:H,A=e.type,M=void 0===A?"light":A,T=e.contrastThreshold,P=void 0===T?3:T,O=e.tonalOffset,C=void 0===O?.2:O,R=(0,r.Z)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function D(e){return(0,v.mi)(e,y.text.primary)>=P?y.text.primary:g.text.primary}var j=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=(0,o.Z)({},e)).main&&e[a]&&(e.main=e[a]),!e.main)throw new Error((0,i.Z)(4,a));if("string"!==typeof e.main)throw new Error((0,i.Z)(5,JSON.stringify(e.main)));return k(e,"light",t,C),k(e,"dark",r,C),e.contrastText||(e.contrastText=D(e.main)),e},L={dark:y,light:g};return(0,c.Z)((0,o.Z)({common:s,type:M,primary:j(t),secondary:j(d,"A400","A200","A700"),error:j(w),warning:j(_),info:j(N),success:j(S),grey:b,contrastThreshold:P,getContrastText:D,augmentColor:j,tonalOffset:C},L[M]),R)}function I(e){return Math.round(1e5*e)/1e5}function _(e){return I(e)}var E={textTransform:"uppercase"},N='"Roboto", "Helvetica", "Arial", sans-serif';function H(e,a){var t="function"===typeof a?a(e):a,n=t.fontFamily,d=void 0===n?N:n,f=t.fontSize,i=void 0===f?14:f,s=t.fontWeightLight,b=void 0===s?300:s,l=t.fontWeightRegular,u=void 0===l?400:l,h=t.fontWeightMedium,x=void 0===h?500:h,p=t.fontWeightBold,m=void 0===p?700:p,v=t.htmlFontSize,g=void 0===v?16:v,y=t.allVariants,k=t.pxToRem,w=(0,r.Z)(t,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var H=i/14,S=k||function(e){return"".concat(e/g*H,"rem")},A=function(e,a,t,r,c){return(0,o.Z)({fontFamily:d,fontWeight:e,fontSize:S(a),lineHeight:t},d===N?{letterSpacing:"".concat(I(r/a),"em")}:{},c,y)},M={h1:A(b,96,1.167,-1.5),h2:A(b,60,1.2,-.5),h3:A(u,48,1.167,0),h4:A(u,34,1.235,.25),h5:A(u,24,1.334,0),h6:A(x,20,1.6,.15),subtitle1:A(u,16,1.75,.15),subtitle2:A(x,14,1.57,.1),body1:A(u,16,1.5,.15),body2:A(u,14,1.43,.15),button:A(x,14,1.75,.4,E),caption:A(u,12,1.66,.4),overline:A(u,12,2.66,1,E)};return(0,c.Z)((0,o.Z)({htmlFontSize:g,pxToRem:S,round:_,fontFamily:d,fontSize:i,fontWeightLight:b,fontWeightRegular:u,fontWeightMedium:x,fontWeightBold:m},M),w,{clone:!1})}function S(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var A=["none",S(0,2,1,-1,0,1,1,0,0,1,3,0),S(0,3,1,-2,0,2,2,0,0,1,5,0),S(0,3,3,-2,0,3,4,0,0,1,8,0),S(0,2,4,-1,0,4,5,0,0,1,10,0),S(0,3,5,-1,0,5,8,0,0,1,14,0),S(0,3,5,-1,0,6,10,0,0,1,18,0),S(0,4,5,-2,0,7,10,1,0,2,16,1),S(0,5,5,-3,0,8,10,1,0,3,14,2),S(0,5,6,-3,0,9,12,1,0,3,16,2),S(0,6,6,-3,0,10,14,1,0,4,18,3),S(0,6,7,-4,0,11,15,1,0,4,20,3),S(0,7,8,-4,0,12,17,2,0,5,22,4),S(0,7,8,-4,0,13,19,2,0,5,24,4),S(0,7,9,-4,0,14,21,2,0,5,26,4),S(0,8,9,-5,0,15,22,2,0,6,28,5),S(0,8,10,-5,0,16,24,2,0,6,30,5),S(0,8,11,-5,0,17,26,2,0,6,32,5),S(0,9,11,-5,0,18,28,2,0,7,34,6),S(0,9,12,-6,0,19,29,2,0,7,36,6),S(0,10,13,-6,0,20,31,3,0,8,38,7),S(0,10,13,-6,0,21,33,3,0,8,40,7),S(0,10,14,-6,0,22,35,3,0,8,42,7),S(0,11,14,-7,0,23,36,3,0,9,44,8),S(0,11,15,-7,0,24,38,3,0,9,46,8)],M={borderRadius:4},T=t(99908);function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var a=(0,T.h)({spacing:e}),t=function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},a=e.breakpoints,t=void 0===a?{}:a,d=e.mixins,o=void 0===d?{}:d,i=e.palette,s=void 0===i?{}:i,b=e.spacing,l=e.typography,u=void 0===l?{}:l,h=(0,r.Z)(e,["breakpoints","mixins","palette","spacing","typography"]),x=w(s),p=(0,n.Z)(t),m=P(b),v=(0,c.Z)({breakpoints:p,direction:"ltr",mixins:f(p,m,o),overrides:{},palette:x,props:{},shadows:A,typography:H(x,u),spacing:m,shape:M,transitions:O.ZP,zIndex:C.Z},h),g=arguments.length,y=new Array(g>1?g-1:0),k=1;k0&&void 0!==arguments[0]?arguments[0]:["all"],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=a.duration,o=void 0===t?n.standard:t,f=a.easing,i=void 0===f?c.easeInOut:f,s=a.delay,b=void 0===s?0:s;(0,r.Z)(a,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof o?o:d(o)," ").concat(i," ").concat("string"===typeof b?b:d(b))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var a=e/36;return Math.round(10*(4+15*Math.pow(a,.25)+a/5))}}},38317:function(e,a,t){"use strict";t.d(a,{Z:function(){return u}});var r=t(87462),c=t(45987),n=t(72791),d=t(62110),o=t.n(d),f=t(63401),i=t(70794),s=t(78444),b=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t){var d=a.defaultTheme,b=a.withTheme,l=void 0!==b&&b,u=a.name,h=(0,c.Z)(a,["defaultTheme","withTheme","name"]);var x=u,p=(0,f.Z)(e,(0,r.Z)({defaultTheme:d,Component:t,name:u||t.displayName,classNamePrefix:x},h)),m=n.forwardRef((function(e,a){e.classes;var o,f=e.innerRef,b=(0,c.Z)(e,["classes","innerRef"]),h=p((0,r.Z)({},t.defaultProps,e)),x=b;return("string"===typeof u||l)&&(o=(0,s.Z)()||d,u&&(x=(0,i.Z)({theme:o,name:u,props:b})),l&&!x.theme&&(x.theme=o)),n.createElement(t,(0,r.Z)({ref:f||a,classes:h},x))}));return o()(m,t),m}},l=t(40663);var u=function(e,a){return b(e,(0,r.Z)({defaultTheme:l.Z},a))}},19535:function(e,a){"use strict";a.Z={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},91122:function(e,a,t){"use strict";t.d(a,{Z:function(){return c}});var r=t(37483);function c(e){if("string"!==typeof e)throw new Error((0,r.Z)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},37545:function(e,a,t){"use strict";function r(){for(var e=arguments.length,a=new Array(e),t=0;t1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,c=new Array(r),n=0;n1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(a,e),t)}function n(e){e=e.substr(1);var a=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),t=e.match(a);return t&&1===t[0].length&&(t=t.map((function(e){return e+e}))),t?"rgb".concat(4===t.length?"a":"","(").concat(t.map((function(e,a){return a<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}function d(e){var a=(e=o(e)).values,t=a[0],r=a[1]/100,c=a[2]/100,n=r*Math.min(c,1-c),d=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+t/30)%12;return c-n*Math.max(Math.min(a-3,9-a,1),-1)},i="rgb",s=[Math.round(255*d(0)),Math.round(255*d(8)),Math.round(255*d(4))];return"hsla"===e.type&&(i+="a",s.push(a[3])),f({type:i,values:s})}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(n(e));var a=e.indexOf("("),t=e.substring(0,a);if(-1===["rgb","rgba","hsl","hsla"].indexOf(t))throw new Error((0,r.formatMuiErrorMessage)(3,e));var c=e.substring(a+1,e.length-1).split(",");return{type:t,values:c=c.map((function(e){return parseFloat(e)}))}}function f(e){var a=e.type,t=e.values;return-1!==a.indexOf("rgb")?t=t.map((function(e,a){return a<3?parseInt(e,10):e})):-1!==a.indexOf("hsl")&&(t[1]="".concat(t[1],"%"),t[2]="".concat(t[2],"%")),"".concat(a,"(").concat(t.join(", "),")")}function i(e){var a="hsl"===(e=o(e)).type?o(d(e)).values:e.values;return a=a.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*a[0]+.7152*a[1]+.0722*a[2]).toFixed(3))}function s(e,a){return e=o(e),a=c(a),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=a,f(e)}function b(e,a){if(e=o(e),a=c(a),-1!==e.type.indexOf("hsl"))e.values[2]*=1-a;else if(-1!==e.type.indexOf("rgb"))for(var t=0;t<3;t+=1)e.values[t]*=1-a;return f(e)}function l(e,a){if(e=o(e),a=c(a),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*a;else if(-1!==e.type.indexOf("rgb"))for(var t=0;t<3;t+=1)e.values[t]+=(255-e.values[t])*a;return f(e)}},19329:function(e,a,t){"use strict";var r=t(64836),c=t(75263);a.Z=void 0;var n=c(t(72791)),d=(0,r(t(44894)).default)(n.createElement("path",{d:"M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z"}),"ArrowForwardIos");a.Z=d},54993:function(e,a,t){"use strict";var r=t(64836),c=t(75263);a.Z=void 0;var n=c(t(72791)),d=(0,r(t(44894)).default)(n.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");a.Z=d},66944:function(e,a,t){"use strict";var r=t(64836),c=t(75263);a.Z=void 0;var n=c(t(72791)),d=(0,r(t(44894)).default)(n.createElement("path",{d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"}),"HelpOutline");a.Z=d},89862:function(e,a,t){"use strict";var r=t(64836),c=t(75263);a.Z=void 0;var n=c(t(72791)),d=(0,r(t(44894)).default)(n.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23L16.23 18z"}),"Stars");a.Z=d},44894:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=t(87156)},79316:function(e,a){"use strict";var t="function"===typeof Symbol&&Symbol.for;a.Z=t?Symbol.for("mui.nested"):"__THEME_NESTED__"},70794:function(e,a,t){"use strict";function r(e){var a=e.theme,t=e.name,r=e.props;if(!a||!a.props||!a.props[t])return r;var c,n=a.props[t];for(c in n)void 0===r[c]&&(r[c]=n[c]);return r}t.d(a,{Z:function(){return r}})},63401:function(e,a,t){"use strict";t.d(a,{Z:function(){return vt}});var r=t(45987),c=t(87462),n=t(72791),d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o="object"===("undefined"===typeof window?"undefined":d(window))&&"object"===("undefined"===typeof document?"undefined":d(document))&&9===document.nodeType,f=t(43144),i=t(94578),s=t(97326),b=t(63366),l={}.constructor;function u(e){if(null==e||"object"!==typeof e)return e;if(Array.isArray(e))return e.map(u);if(e.constructor!==l)return e;var a={};for(var t in e)a[t]=u(e[t]);return a}function h(e,a,t){void 0===e&&(e="unnamed");var r=t.jss,c=u(a),n=r.plugins.onCreateRule(e,c,t);return n||(e[0],null)}var x=function(e,a){for(var t="",r=0;r<+~=|^:(),"'`\s])/g,k="undefined"!==typeof CSS&&CSS.escape,w=function(e){return k?k(e):e.replace(y,"\\$1")},I=function(){function e(e,a,t){this.type="style",this.isProcessed=!1;var r=t.sheet,c=t.Renderer;this.key=e,this.options=t,this.style=a,r?this.renderer=r.renderer:c&&(this.renderer=new c)}return e.prototype.prop=function(e,a,t){if(void 0===a)return this.style[e];var r=!!t&&t.force;if(!r&&this.style[e]===a)return this;var c=a;t&&!1===t.process||(c=this.options.jss.plugins.onChangeValue(a,e,this));var n=null==c||!1===c,d=e in this.style;if(n&&!d&&!r)return this;var o=n&&d;if(o?delete this.style[e]:this.style[e]=c,this.renderable&&this.renderer)return o?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,c),this;var f=this.options.sheet;return f&&f.attached,this},e}(),_=function(e){function a(a,t,r){var c;c=e.call(this,a,t,r)||this;var n=r.selector,d=r.scoped,o=r.sheet,f=r.generateId;return n?c.selectorText=n:!1!==d&&(c.id=f((0,s.Z)((0,s.Z)(c)),o),c.selectorText="."+w(c.id)),c}(0,i.Z)(a,e);var t=a.prototype;return t.applyTo=function(e){var a=this.renderer;if(a){var t=this.toJSON();for(var r in t)a.setProperty(e,r,t[r])}return this},t.toJSON=function(){var e={};for(var a in this.style){var t=this.style[a];"object"!==typeof t?e[a]=t:Array.isArray(t)&&(e[a]=p(t))}return e},t.toString=function(e){var a=this.options.sheet,t=!!a&&a.options.link?(0,c.Z)({},e,{allowEmpty:!0}):e;return g(this.selectorText,this.style,t)},(0,f.Z)(a,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var a=this.renderer,t=this.renderable;if(t&&a)a.setSelector(t,e)||a.replaceRule(t,this)}},get:function(){return this.selectorText}}]),a}(I),E={onCreateRule:function(e,a,t){return"@"===e[0]||t.parent&&"keyframes"===t.parent.type?null:new _(e,a,t)}},N={indent:1,children:!0},H=/@([\w-]+)/,S=function(){function e(e,a,t){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(H);for(var n in this.at=r?r[1]:"unknown",this.query=t.name||"@"+this.at,this.options=t,this.rules=new J((0,c.Z)({},t,{parent:this})),a)this.rules.add(n,a[n]);this.rules.process()}var a=e.prototype;return a.getRule=function(e){return this.rules.get(e)},a.indexOf=function(e){return this.rules.indexOf(e)},a.addRule=function(e,a,t){var r=this.rules.add(e,a,t);return r?(this.options.jss.plugins.onProcessRule(r),r):null},a.replaceRule=function(e,a,t){var r=this.rules.replace(e,a,t);return r&&this.options.jss.plugins.onProcessRule(r),r},a.toString=function(e){void 0===e&&(e=N);var a=m(e).linebreak;if(null==e.indent&&(e.indent=N.indent),null==e.children&&(e.children=N.children),!1===e.children)return this.query+" {}";var t=this.rules.toString(e);return t?this.query+" {"+a+t+a+"}":""},e}(),A=/@media|@supports\s+/,M={onCreateRule:function(e,a,t){return A.test(e)?new S(e,a,t):null}},T={indent:1,children:!0},P=/@keyframes\s+([\w-]+)/,O=function(){function e(e,a,t){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(P);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=t;var n=t.scoped,d=t.sheet,o=t.generateId;for(var f in this.id=!1===n?this.name:w(o(this,d)),this.rules=new J((0,c.Z)({},t,{parent:this})),a)this.rules.add(f,a[f],(0,c.Z)({},t,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=T);var a=m(e).linebreak;if(null==e.indent&&(e.indent=T.indent),null==e.children&&(e.children=T.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t=""+a+t+a),this.at+" "+this.id+" {"+t+"}"},e}(),C=/@keyframes\s+/,R=/\$([\w-]+)/g,D=function(e,a){return"string"===typeof e?e.replace(R,(function(e,t){return t in a?a[t]:e})):e},j=function(e,a,t){var r=e[a],c=D(r,t);c!==r&&(e[a]=c)},L={onCreateRule:function(e,a,t){return"string"===typeof e&&C.test(e)?new O(e,a,t):null},onProcessStyle:function(e,a,t){return"style"===a.type&&t?("animation-name"in e&&j(e,"animation-name",t.keyframes),"animation"in e&&j(e,"animation",t.keyframes),e):e},onChangeValue:function(e,a,t){var r=t.options.sheet;if(!r)return e;switch(a){case"animation":case"animation-name":return D(e,r.keyframes);default:return e}}},B=function(e){function a(){return e.apply(this,arguments)||this}return(0,i.Z)(a,e),a.prototype.toString=function(e){var a=this.options.sheet,t=!!a&&a.options.link?(0,c.Z)({},e,{allowEmpty:!0}):e;return g(this.key,this.style,t)},a}(I),F={onCreateRule:function(e,a,t){return t.parent&&"keyframes"===t.parent.type?new B(e,a,t):null}},Z=function(){function e(e,a,t){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=a,this.options=t}return e.prototype.toString=function(e){var a=m(e).linebreak;if(Array.isArray(this.style)){for(var t="",r=0;r=this.index)a.push(e);else for(var r=0;rt)return void a.splice(r,0,e)},a.reset=function(){this.registry=[]},a.remove=function(e){var a=this.registry.indexOf(e);this.registry.splice(a,1)},a.toString=function(e){for(var a=void 0===e?{}:e,t=a.attached,r=(0,b.Z)(a,["attached"]),c=m(r).linebreak,n="",d=0;d0){var t=function(e,a){for(var t=0;ta.index&&r.options.insertionPoint===a.insertionPoint)return r}return null}(a,e);if(t&&t.renderer)return{parent:t.renderer.element.parentNode,node:t.renderer.element};if(t=function(e,a){for(var t=e.length-1;t>=0;t--){var r=e[t];if(r.attached&&r.options.insertionPoint===a.insertionPoint)return r}return null}(a,e),t&&t.renderer)return{parent:t.renderer.element.parentNode,node:t.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"===typeof r){var c=function(e){for(var a=le(),t=0;tt?t:a},me=function(){function e(e){this.getPropertyValue=fe,this.setProperty=ie,this.removeProperty=se,this.setSelector=be,this.hasInsertedRules=!1,this.cssRules=[],e&&te.add(e),this.sheet=e;var a=this.sheet?this.sheet.options:{},t=a.media,r=a.meta,c=a.element;this.element=c||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),t&&this.element.setAttribute("media",t),r&&this.element.setAttribute("data-meta",r);var n=he();n&&this.element.setAttribute("nonce",n)}var a=e.prototype;return a.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,a){var t=a.insertionPoint,r=ue(a);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(t&&"number"===typeof t.nodeType){var c=t,n=c.parentNode;n&&n.insertBefore(e,c.nextSibling)}else le().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},a.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},a.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},a.insertRules=function(e,a){for(var t=0;t-1){var c=Ba[e];if(!Array.isArray(c))return ua+Ia(c)in a&&ha+c;if(!r)return!1;for(var n=0;na?1:-1:e.length-a.length};return{onProcessStyle:function(a,t){if("style"!==t.type)return a;for(var r={},c=Object.keys(a).sort(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},a=e.disableGlobal,t=void 0!==a&&a,r=e.productionPrefix,c=void 0===r?"jss":r,n=e.seed,d=void 0===n?"":n,o=""===d?"":"".concat(d,"-"),f=0,i=function(){return f+=1};return function(e,a){var r=a.options.name;if(r&&0===r.indexOf("Mui")&&!a.options.link&&!t){if(-1!==Se.indexOf(e.key))return"Mui-".concat(e.key);var n="".concat(o).concat(r,"-").concat(e.key);return a.options.theme[He.Z]&&""===d?"".concat(n,"-").concat(i()):n}return"".concat(o).concat(c).concat(i())}}(),dt={disableGeneration:!1,generateClassName:nt,jss:ct,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},ot=n.createContext(dt);var ft=-1e9;function it(){return ft+=1}var st=t(81534);function bt(e){var a="function"===typeof e;return{create:function(t,r){var n;try{n=a?e(t):e}catch(f){throw f}if(!r||!t.overrides||!t.overrides[r])return n;var d=t.overrides[r],o=(0,c.Z)({},n);return Object.keys(d).forEach((function(e){o[e]=(0,st.Z)(o[e],d[e])})),o},options:{}}}var lt={};function ut(e,a,t){var r=e.state;if(e.stylesOptions.disableGeneration)return a||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var c=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,c=!0),a!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=a,c=!0),c&&(r.cacheClasses.value=(0,Ie.Z)({baseClasses:r.cacheClasses.lastJSS,newClasses:a,Component:t})),r.cacheClasses.value}function ht(e,a){var t=e.state,r=e.theme,n=e.stylesOptions,d=e.stylesCreator,o=e.name;if(!n.disableGeneration){var f=Ee.get(n.sheetsManager,d,r);f||(f={refs:0,staticSheet:null,dynamicStyles:null},Ee.set(n.sheetsManager,d,r,f));var i=(0,c.Z)({},d.options,n,{theme:r,flip:"boolean"===typeof n.flip?n.flip:"rtl"===r.direction});i.generateId=i.serverGenerateClassName||i.generateClassName;var s=n.sheetsRegistry;if(0===f.refs){var b;n.sheetsCache&&(b=Ee.get(n.sheetsCache,d,r));var l=d.create(r,o);b||((b=n.jss.createStyleSheet(l,(0,c.Z)({link:!1},i))).attach(),n.sheetsCache&&Ee.set(n.sheetsCache,d,r,b)),s&&s.add(b),f.staticSheet=b,f.dynamicStyles=we(l)}if(f.dynamicStyles){var u=n.jss.createStyleSheet(f.dynamicStyles,(0,c.Z)({link:!0},i));u.update(a),u.attach(),t.dynamicSheet=u,t.classes=(0,Ie.Z)({baseClasses:f.staticSheet.classes,newClasses:u.classes}),s&&s.add(u)}else t.classes=f.staticSheet.classes;f.refs+=1}}function xt(e,a){var t=e.state;t.dynamicSheet&&t.dynamicSheet.update(a)}function pt(e){var a=e.state,t=e.theme,r=e.stylesOptions,c=e.stylesCreator;if(!r.disableGeneration){var n=Ee.get(r.sheetsManager,c,t);n.refs-=1;var d=r.sheetsRegistry;0===n.refs&&(Ee.delete(r.sheetsManager,c,t),r.jss.removeStyleSheet(n.staticSheet),d&&d.remove(n.staticSheet)),a.dynamicSheet&&(r.jss.removeStyleSheet(a.dynamicSheet),d&&d.remove(a.dynamicSheet))}}function mt(e,a){var t,r=n.useRef([]),c=n.useMemo((function(){return{}}),a);r.current!==c&&(r.current=c,t=e()),n.useEffect((function(){return function(){t&&t()}}),[c])}function vt(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=a.name,d=a.classNamePrefix,o=a.Component,f=a.defaultTheme,i=void 0===f?lt:f,s=(0,r.Z)(a,["name","classNamePrefix","Component","defaultTheme"]),b=bt(e),l=t||d||"makeStyles";b.options={index:it(),name:t,meta:l,classNamePrefix:l};var u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=(0,Ne.Z)()||i,r=(0,c.Z)({},n.useContext(ot),s),d=n.useRef(),f=n.useRef();mt((function(){var c={name:t,state:{},stylesCreator:b,stylesOptions:r,theme:a};return ht(c,e),f.current=!1,d.current=c,function(){pt(c)}}),[a,b]),n.useEffect((function(){f.current&&xt(d.current,e),f.current=!0}));var l=ut(d.current,e.classes,o);return l};return u}},25352:function(e,a,t){"use strict";t.d(a,{Z:function(){return c}});var r=t(87462);function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.baseClasses,t=e.newClasses;e.Component;if(!t)return a;var c=(0,r.Z)({},a);return Object.keys(t).forEach((function(e){t[e]&&(c[e]="".concat(a[e]," ").concat(t[e]))})),c}},40423:function(e,a,t){"use strict";var r=t(72791).createContext(null);a.Z=r},78444:function(e,a,t){"use strict";t.d(a,{Z:function(){return n}});var r=t(72791),c=t(40423);function n(){return r.useContext(c.Z)}},16086:function(e,a,t){"use strict";t.d(a,{k:function(){return d}});var r=t(71002),c={xs:0,sm:600,md:960,lg:1280,xl:1920},n={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(c[e],"px)")}};function d(e,a,t){if(Array.isArray(a)){var c=e.theme.breakpoints||n;return a.reduce((function(e,r,n){return e[c.up(c.keys[n])]=t(a[n]),e}),{})}if("object"===(0,r.Z)(a)){var d=e.theme.breakpoints||n;return Object.keys(a).reduce((function(e,r){return e[d.up(r)]=t(a[r]),e}),{})}return t(a)}},7351:function(e,a,t){"use strict";var r=t(81534);a.Z=function(e,a){return a?(0,r.Z)(e,a,{clone:!1}):e}},99908:function(e,a,t){"use strict";t.d(a,{h:function(){return b},Z:function(){return h}});var r=t(29439),c=t(16086),n=t(7351);var d={m:"margin",p:"padding"},o={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},f={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},i=function(e){var a={};return function(t){return void 0===a[t]&&(a[t]=e(t)),a[t]}}((function(e){if(e.length>2){if(!f[e])return[e];e=f[e]}var a=e.split(""),t=(0,r.Z)(a,2),c=t[0],n=t[1],i=d[c],s=o[n]||"";return Array.isArray(s)?s.map((function(e){return i+e})):[i+s]})),s=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function b(e){var a=e.spacing||8;return"number"===typeof a?function(e){return a*e}:Array.isArray(a)?function(e){return a[e]}:"function"===typeof a?a:function(){}}function l(e,a){return function(t){return e.reduce((function(e,r){return e[r]=function(e,a){if("string"===typeof a||null==a)return a;var t=e(Math.abs(a));return a>=0?t:"number"===typeof t?-t:"-".concat(t)}(a,t),e}),{})}}function u(e){var a=b(e.theme);return Object.keys(e).map((function(t){if(-1===s.indexOf(t))return null;var r=l(i(t),a),n=e[t];return(0,c.k)(e,n,r)})).reduce(n.Z,{})}u.propTypes={},u.filterProps=s;var h=u},81534:function(e,a,t){"use strict";t.d(a,{Z:function(){return d}});var r=t(87462),c=t(71002);function n(e){return e&&"object"===(0,c.Z)(e)&&e.constructor===Object}function d(e,a){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},c=t.clone?(0,r.Z)({},e):e;return n(e)&&n(a)&&Object.keys(a).forEach((function(r){"__proto__"!==r&&(n(a[r])&&r in e?c[r]=d(e[r],a[r],t):c[r]=a[r])})),c}},37483:function(e,a,t){"use strict";function r(e){for(var a="https://mui.com/production-error/?code="+e,t=1;t1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||x(e)||a}function m(e,a,t){var r=p(a);return e.displayName||(""!==r?"".concat(t,"(").concat(r,")"):t)}function v(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return p(e,"Component");if("object"===(0,l.Z)(e))switch(e.$$typeof){case u.ForwardRef:return m(e,e.render,"ForwardRef");case u.Memo:return m(e,e.type,"memo");default:return}}}function g(e,a,t,r,c){return null}var y="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),k=d().oneOfType([d().func,d().object])},76232:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(45073);function c(e,a,t){return void 0===a&&(a=new Uint8Array(2)),void 0===t&&(t=0),a[t+0]=e>>>8,a[t+1]=e>>>0,a}function n(e,a,t){return void 0===a&&(a=new Uint8Array(2)),void 0===t&&(t=0),a[t+0]=e>>>0,a[t+1]=e>>>8,a}function d(e,a){return void 0===a&&(a=0),e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]}function o(e,a){return void 0===a&&(a=0),(e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3])>>>0}function f(e,a){return void 0===a&&(a=0),e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a]}function i(e,a){return void 0===a&&(a=0),(e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a])>>>0}function s(e,a,t){return void 0===a&&(a=new Uint8Array(4)),void 0===t&&(t=0),a[t+0]=e>>>24,a[t+1]=e>>>16,a[t+2]=e>>>8,a[t+3]=e>>>0,a}function b(e,a,t){return void 0===a&&(a=new Uint8Array(4)),void 0===t&&(t=0),a[t+0]=e>>>0,a[t+1]=e>>>8,a[t+2]=e>>>16,a[t+3]=e>>>24,a}function l(e,a,t){return void 0===a&&(a=new Uint8Array(8)),void 0===t&&(t=0),s(e/4294967296>>>0,a,t),s(e>>>0,a,t+4),a}function u(e,a,t){return void 0===a&&(a=new Uint8Array(8)),void 0===t&&(t=0),b(e>>>0,a,t),b(e/4294967296>>>0,a,t+4),a}a.readInt16BE=function(e,a){return void 0===a&&(a=0),(e[a+0]<<8|e[a+1])<<16>>16},a.readUint16BE=function(e,a){return void 0===a&&(a=0),(e[a+0]<<8|e[a+1])>>>0},a.readInt16LE=function(e,a){return void 0===a&&(a=0),(e[a+1]<<8|e[a])<<16>>16},a.readUint16LE=function(e,a){return void 0===a&&(a=0),(e[a+1]<<8|e[a])>>>0},a.writeUint16BE=c,a.writeInt16BE=c,a.writeUint16LE=n,a.writeInt16LE=n,a.readInt32BE=d,a.readUint32BE=o,a.readInt32LE=f,a.readUint32LE=i,a.writeUint32BE=s,a.writeInt32BE=s,a.writeUint32LE=b,a.writeInt32LE=b,a.readInt64BE=function(e,a){void 0===a&&(a=0);var t=d(e,a),r=d(e,a+4);return 4294967296*t+r-4294967296*(r>>31)},a.readUint64BE=function(e,a){return void 0===a&&(a=0),4294967296*o(e,a)+o(e,a+4)},a.readInt64LE=function(e,a){void 0===a&&(a=0);var t=f(e,a);return 4294967296*f(e,a+4)+t-4294967296*(t>>31)},a.readUint64LE=function(e,a){void 0===a&&(a=0);var t=i(e,a);return 4294967296*i(e,a+4)+t},a.writeUint64BE=l,a.writeInt64BE=l,a.writeUint64LE=u,a.writeInt64LE=u,a.readUintBE=function(e,a,t){if(void 0===t&&(t=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>a.length-t)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,c=1,n=e/8+t-1;n>=t;n--)r+=a[n]*c,c*=256;return r},a.readUintLE=function(e,a,t){if(void 0===t&&(t=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>a.length-t)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,c=1,n=t;n=c;d--)t[d]=a/n&255,n*=256;return t},a.writeUintLE=function(e,a,t,c){if(void 0===t&&(t=new Uint8Array(e/8)),void 0===c&&(c=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!r.isSafeInteger(a))throw new Error("writeUintLE value must be an integer");for(var n=1,d=c;d>>16|P<<16)|0)>>>20|_<<12,E=(E^=A=A+(O=(O^=k=k+E|0)>>>16|O<<16)|0)>>>20|E<<12,N=(N^=M=M+(C=(C^=w=w+N|0)>>>16|C<<16)|0)>>>20|N<<12,H=(H^=T=T+(R=(R^=I=I+H|0)>>>16|R<<16)|0)>>>20|H<<12,N=(N^=M=M+(C=(C^=w=w+N|0)>>>24|C<<8)|0)>>>25|N<<7,H=(H^=T=T+(R=(R^=I=I+H|0)>>>24|R<<8)|0)>>>25|H<<7,E=(E^=A=A+(O=(O^=k=k+E|0)>>>24|O<<8)|0)>>>25|E<<7,_=(_^=S=S+(P=(P^=y=y+_|0)>>>24|P<<8)|0)>>>25|_<<7,E=(E^=M=M+(R=(R^=y=y+E|0)>>>16|R<<16)|0)>>>20|E<<12,N=(N^=T=T+(P=(P^=k=k+N|0)>>>16|P<<16)|0)>>>20|N<<12,H=(H^=S=S+(O=(O^=w=w+H|0)>>>16|O<<16)|0)>>>20|H<<12,_=(_^=A=A+(C=(C^=I=I+_|0)>>>16|C<<16)|0)>>>20|_<<12,H=(H^=S=S+(O=(O^=w=w+H|0)>>>24|O<<8)|0)>>>25|H<<7,_=(_^=A=A+(C=(C^=I=I+_|0)>>>24|C<<8)|0)>>>25|_<<7,N=(N^=T=T+(P=(P^=k=k+N|0)>>>24|P<<8)|0)>>>25|N<<7,E=(E^=M=M+(R=(R^=y=y+E|0)>>>24|R<<8)|0)>>>25|E<<7;r.writeUint32LE(y+c|0,e,0),r.writeUint32LE(k+n|0,e,4),r.writeUint32LE(w+d|0,e,8),r.writeUint32LE(I+o|0,e,12),r.writeUint32LE(_+f|0,e,16),r.writeUint32LE(E+i|0,e,20),r.writeUint32LE(N+s|0,e,24),r.writeUint32LE(H+b|0,e,28),r.writeUint32LE(S+l|0,e,32),r.writeUint32LE(A+u|0,e,36),r.writeUint32LE(M+h|0,e,40),r.writeUint32LE(T+x|0,e,44),r.writeUint32LE(P+p|0,e,48),r.writeUint32LE(O+m|0,e,52),r.writeUint32LE(C+v|0,e,56),r.writeUint32LE(R+g|0,e,60)}function d(e,a,t,r,d){if(void 0===d&&(d=0),32!==e.length)throw new Error("ChaCha: key size must be 32 bytes");if(r.length>>=8,a++;if(r>0)throw new Error("ChaCha: counter overflow")}a.streamXOR=d,a.stream=function(e,a,t,r){return void 0===r&&(r=0),c.wipe(t),d(e,a,t,t,r)}},53642:function(e,a,t){"use strict";var r=t(78284),c=t(75629),n=t(9116),d=t(76232),o=t(68770);a.Cv=32,a.WH=12,a.pg=16;var f=new Uint8Array(16),i=function(){function e(e){if(this.nonceLength=a.WH,this.tagLength=a.pg,e.length!==a.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(e)}return e.prototype.seal=function(e,a,t,c){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var d=new Uint8Array(16);d.set(e,d.length-e.length);var o=new Uint8Array(32);r.stream(this._key,d,o,4);var f,i=a.length+this.tagLength;if(c){if(c.length!==i)throw new Error("ChaCha20Poly1305: incorrect destination length");f=c}else f=new Uint8Array(i);return r.streamXOR(this._key,d,a,f,4),this._authenticate(f.subarray(f.length-this.tagLength,f.length),o,f.subarray(0,f.length-this.tagLength),t),n.wipe(d),f},e.prototype.open=function(e,a,t,c){if(e.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(a.length0&&o.update(f.subarray(r.length%16))),o.update(t),t.length%16>0&&o.update(f.subarray(t.length%16));var i=new Uint8Array(8);r&&d.writeUint64LE(r.length,i),o.update(i),d.writeUint64LE(t.length,i),o.update(i);for(var s=o.digest(),b=0;b>>8}Object.defineProperty(a,"__esModule",{value:!0}),a.select=function(e,a,t){return~(e-1)&a|e-1&t},a.lessOrEqual=function(e,a){return(0|e)-(0|a)-1>>>31&1},a.compare=t,a.equal=function(e,a){return 0!==e.length&&0!==a.length&&0!==t(e,a)}},2421:function(e,a,t){"use strict";a.Xx=a._w=a.aP=a.KS=a.jQ=void 0;var r=t(56271),c=t(40526),n=t(9116);function d(e){var a=new Float64Array(16);if(e)for(var t=0;t>16&1),t[o-1]&=65535;t[15]=r[15]-32767-(t[14]>>16&1);var f=t[15]>>16&1;t[14]&=65535,p(r,t,1-f)}for(var i=0;i<16;i++)e[2*i]=255&r[i],e[2*i+1]=r[i]>>8}function v(e,a){for(var t=0,r=0;r<32;r++)t|=e[r]^a[r];return(1&t-1>>>8)-1}function g(e,a){var t=new Uint8Array(32),r=new Uint8Array(32);return m(t,e),m(r,a),v(t,r)}function y(e){var a=new Uint8Array(32);return m(a,e),1&a[0]}function k(e,a,t){for(var r=0;r<16;r++)e[r]=a[r]+t[r]}function w(e,a,t){for(var r=0;r<16;r++)e[r]=a[r]-t[r]}function I(e,a,t){var r,c,n=0,d=0,o=0,f=0,i=0,s=0,b=0,l=0,u=0,h=0,x=0,p=0,m=0,v=0,g=0,y=0,k=0,w=0,I=0,_=0,E=0,N=0,H=0,S=0,A=0,M=0,T=0,P=0,O=0,C=0,R=0,D=t[0],j=t[1],L=t[2],B=t[3],F=t[4],Z=t[5],U=t[6],z=t[7],q=t[8],V=t[9],W=t[10],K=t[11],G=t[12],Y=t[13],$=t[14],X=t[15];n+=(r=a[0])*D,d+=r*j,o+=r*L,f+=r*B,i+=r*F,s+=r*Z,b+=r*U,l+=r*z,u+=r*q,h+=r*V,x+=r*W,p+=r*K,m+=r*G,v+=r*Y,g+=r*$,y+=r*X,d+=(r=a[1])*D,o+=r*j,f+=r*L,i+=r*B,s+=r*F,b+=r*Z,l+=r*U,u+=r*z,h+=r*q,x+=r*V,p+=r*W,m+=r*K,v+=r*G,g+=r*Y,y+=r*$,k+=r*X,o+=(r=a[2])*D,f+=r*j,i+=r*L,s+=r*B,b+=r*F,l+=r*Z,u+=r*U,h+=r*z,x+=r*q,p+=r*V,m+=r*W,v+=r*K,g+=r*G,y+=r*Y,k+=r*$,w+=r*X,f+=(r=a[3])*D,i+=r*j,s+=r*L,b+=r*B,l+=r*F,u+=r*Z,h+=r*U,x+=r*z,p+=r*q,m+=r*V,v+=r*W,g+=r*K,y+=r*G,k+=r*Y,w+=r*$,I+=r*X,i+=(r=a[4])*D,s+=r*j,b+=r*L,l+=r*B,u+=r*F,h+=r*Z,x+=r*U,p+=r*z,m+=r*q,v+=r*V,g+=r*W,y+=r*K,k+=r*G,w+=r*Y,I+=r*$,_+=r*X,s+=(r=a[5])*D,b+=r*j,l+=r*L,u+=r*B,h+=r*F,x+=r*Z,p+=r*U,m+=r*z,v+=r*q,g+=r*V,y+=r*W,k+=r*K,w+=r*G,I+=r*Y,_+=r*$,E+=r*X,b+=(r=a[6])*D,l+=r*j,u+=r*L,h+=r*B,x+=r*F,p+=r*Z,m+=r*U,v+=r*z,g+=r*q,y+=r*V,k+=r*W,w+=r*K,I+=r*G,_+=r*Y,E+=r*$,N+=r*X,l+=(r=a[7])*D,u+=r*j,h+=r*L,x+=r*B,p+=r*F,m+=r*Z,v+=r*U,g+=r*z,y+=r*q,k+=r*V,w+=r*W,I+=r*K,_+=r*G,E+=r*Y,N+=r*$,H+=r*X,u+=(r=a[8])*D,h+=r*j,x+=r*L,p+=r*B,m+=r*F,v+=r*Z,g+=r*U,y+=r*z,k+=r*q,w+=r*V,I+=r*W,_+=r*K,E+=r*G,N+=r*Y,H+=r*$,S+=r*X,h+=(r=a[9])*D,x+=r*j,p+=r*L,m+=r*B,v+=r*F,g+=r*Z,y+=r*U,k+=r*z,w+=r*q,I+=r*V,_+=r*W,E+=r*K,N+=r*G,H+=r*Y,S+=r*$,A+=r*X,x+=(r=a[10])*D,p+=r*j,m+=r*L,v+=r*B,g+=r*F,y+=r*Z,k+=r*U,w+=r*z,I+=r*q,_+=r*V,E+=r*W,N+=r*K,H+=r*G,S+=r*Y,A+=r*$,M+=r*X,p+=(r=a[11])*D,m+=r*j,v+=r*L,g+=r*B,y+=r*F,k+=r*Z,w+=r*U,I+=r*z,_+=r*q,E+=r*V,N+=r*W,H+=r*K,S+=r*G,A+=r*Y,M+=r*$,T+=r*X,m+=(r=a[12])*D,v+=r*j,g+=r*L,y+=r*B,k+=r*F,w+=r*Z,I+=r*U,_+=r*z,E+=r*q,N+=r*V,H+=r*W,S+=r*K,A+=r*G,M+=r*Y,T+=r*$,P+=r*X,v+=(r=a[13])*D,g+=r*j,y+=r*L,k+=r*B,w+=r*F,I+=r*Z,_+=r*U,E+=r*z,N+=r*q,H+=r*V,S+=r*W,A+=r*K,M+=r*G,T+=r*Y,P+=r*$,O+=r*X,g+=(r=a[14])*D,y+=r*j,k+=r*L,w+=r*B,I+=r*F,_+=r*Z,E+=r*U,N+=r*z,H+=r*q,S+=r*V,A+=r*W,M+=r*K,T+=r*G,P+=r*Y,O+=r*$,C+=r*X,y+=(r=a[15])*D,d+=38*(w+=r*L),o+=38*(I+=r*B),f+=38*(_+=r*F),i+=38*(E+=r*Z),s+=38*(N+=r*U),b+=38*(H+=r*z),l+=38*(S+=r*q),u+=38*(A+=r*V),h+=38*(M+=r*W),x+=38*(T+=r*K),p+=38*(P+=r*G),m+=38*(O+=r*Y),v+=38*(C+=r*$),g+=38*(R+=r*X),n=(r=(n+=38*(k+=r*j))+(c=1)+65535)-65536*(c=Math.floor(r/65536)),d=(r=d+c+65535)-65536*(c=Math.floor(r/65536)),o=(r=o+c+65535)-65536*(c=Math.floor(r/65536)),f=(r=f+c+65535)-65536*(c=Math.floor(r/65536)),i=(r=i+c+65535)-65536*(c=Math.floor(r/65536)),s=(r=s+c+65535)-65536*(c=Math.floor(r/65536)),b=(r=b+c+65535)-65536*(c=Math.floor(r/65536)),l=(r=l+c+65535)-65536*(c=Math.floor(r/65536)),u=(r=u+c+65535)-65536*(c=Math.floor(r/65536)),h=(r=h+c+65535)-65536*(c=Math.floor(r/65536)),x=(r=x+c+65535)-65536*(c=Math.floor(r/65536)),p=(r=p+c+65535)-65536*(c=Math.floor(r/65536)),m=(r=m+c+65535)-65536*(c=Math.floor(r/65536)),v=(r=v+c+65535)-65536*(c=Math.floor(r/65536)),g=(r=g+c+65535)-65536*(c=Math.floor(r/65536)),y=(r=y+c+65535)-65536*(c=Math.floor(r/65536)),n=(r=(n+=c-1+37*(c-1))+(c=1)+65535)-65536*(c=Math.floor(r/65536)),d=(r=d+c+65535)-65536*(c=Math.floor(r/65536)),o=(r=o+c+65535)-65536*(c=Math.floor(r/65536)),f=(r=f+c+65535)-65536*(c=Math.floor(r/65536)),i=(r=i+c+65535)-65536*(c=Math.floor(r/65536)),s=(r=s+c+65535)-65536*(c=Math.floor(r/65536)),b=(r=b+c+65535)-65536*(c=Math.floor(r/65536)),l=(r=l+c+65535)-65536*(c=Math.floor(r/65536)),u=(r=u+c+65535)-65536*(c=Math.floor(r/65536)),h=(r=h+c+65535)-65536*(c=Math.floor(r/65536)),x=(r=x+c+65535)-65536*(c=Math.floor(r/65536)),p=(r=p+c+65535)-65536*(c=Math.floor(r/65536)),m=(r=m+c+65535)-65536*(c=Math.floor(r/65536)),v=(r=v+c+65535)-65536*(c=Math.floor(r/65536)),g=(r=g+c+65535)-65536*(c=Math.floor(r/65536)),y=(r=y+c+65535)-65536*(c=Math.floor(r/65536)),n+=c-1+37*(c-1),e[0]=n,e[1]=d,e[2]=o,e[3]=f,e[4]=i,e[5]=s,e[6]=b,e[7]=l,e[8]=u,e[9]=h,e[10]=x,e[11]=p,e[12]=m,e[13]=v,e[14]=g,e[15]=y}function _(e,a){I(e,a,a)}function E(e,a){var t,r=d();for(t=0;t<16;t++)r[t]=a[t];for(t=253;t>=0;t--)_(r,r),2!==t&&4!==t&&I(r,r,a);for(t=0;t<16;t++)e[t]=r[t]}function N(e,a){var t=d(),r=d(),c=d(),n=d(),o=d(),f=d(),i=d(),b=d(),l=d();w(t,e[1],e[0]),w(l,a[1],a[0]),I(t,t,l),k(r,e[0],e[1]),k(l,a[0],a[1]),I(r,r,l),I(c,e[3],a[3]),I(c,c,s),I(n,e[2],a[2]),k(n,n,n),w(o,r,t),w(f,n,c),k(i,n,c),k(b,r,t),I(e[0],o,f),I(e[1],b,i),I(e[2],i,f),I(e[3],o,b)}function H(e,a,t){for(var r=0;r<4;r++)p(e[r],a[r],t)}function S(e,a){var t=d(),r=d(),c=d();E(c,a[2]),I(t,a[0],c),I(r,a[1],c),m(e,r),e[31]^=y(t)<<7}function A(e,a,t){h(e[0],o),h(e[1],f),h(e[2],f),h(e[3],o);for(var r=255;r>=0;--r){var c=t[r/8|0]>>(7&r)&1;H(e,a,c),N(a,e),N(e,e),H(e,a,c)}}function M(e,a){var t=[d(),d(),d(),d()];h(t[0],b),h(t[1],l),h(t[2],f),I(t[3],b,l),A(e,t,a)}function T(e){if(e.length!==a.aP)throw new Error("ed25519: seed must be ".concat(a.aP," bytes"));var t=(0,c.hash)(e);t[0]&=248,t[31]&=127,t[31]|=64;var r=new Uint8Array(32),n=[d(),d(),d(),d()];M(n,t),S(r,n);var o=new Uint8Array(64);return o.set(e),o.set(r,32),{publicKey:r,secretKey:o}}a._w=T;var P=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function O(e,a){var t,r,c,n;for(r=63;r>=32;--r){for(t=0,c=r-32,n=r-12;c>4)*P[c],t=a[c]>>8,a[c]&=255;for(c=0;c<32;c++)a[c]-=t*P[c];for(r=0;r<32;r++)a[r+1]+=a[r]>>8,e[r]=255&a[r]}function C(e){for(var a=new Float64Array(64),t=0;t<64;t++)a[t]=e[t];for(var r=0;r<64;r++)e[r]=0;O(e,a)}function R(e,a){var t=d(),r=d(),c=d(),n=d(),s=d(),b=d(),l=d();return h(e[2],f),function(e,a){for(var t=0;t<16;t++)e[t]=a[2*t]+(a[2*t+1]<<8);e[15]&=32767}(e[1],a),_(c,e[1]),I(n,c,i),w(c,c,e[2]),k(n,e[2],n),_(s,n),_(b,s),I(l,b,s),I(t,l,c),I(t,t,n),function(e,a){var t,r=d();for(t=0;t<16;t++)r[t]=a[t];for(t=250;t>=0;t--)_(r,r),1!==t&&I(r,r,a);for(t=0;t<16;t++)e[t]=r[t]}(t,t),I(t,t,c),I(t,t,n),I(t,t,n),I(e[0],t,n),_(r,e[0]),I(r,r,n),g(r,c)&&I(e[0],e[0],u),_(r,e[0]),I(r,r,n),g(r,c)?-1:(y(e[0])===a[31]>>7&&w(e[0],o,e[0]),I(e[3],e[0],e[1]),0)}a.Xx=function(e,a){var t=new Float64Array(64),r=[d(),d(),d(),d()],n=(0,c.hash)(e.subarray(0,32));n[0]&=248,n[31]&=127,n[31]|=64;var o=new Uint8Array(64);o.set(n.subarray(32),32);var f=new c.SHA512;f.update(o.subarray(32)),f.update(a);var i=f.digest();f.clean(),C(i),M(r,i),S(o,r),f.reset(),f.update(o.subarray(0,32)),f.update(e.subarray(32)),f.update(a);var s=f.digest();C(s);for(var b=0;b<32;b++)t[b]=i[b];for(var l=0;l<32;l++)for(var u=0;u<32;u++)t[l+u]+=s[l]*n[u];return O(o.subarray(32),t),o}},41412:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.isSerializableHash=function(e){return"undefined"!==typeof e.saveState&&"undefined"!==typeof e.restoreState&&"undefined"!==typeof e.cleanSavedState}},52497:function(e,a,t){"use strict";var r=t(5499),c=t(9116),n=function(){function e(e,a,t,c){void 0===t&&(t=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=e,this._info=c;var n=r.hmac(this._hash,t,a);this._hmac=new r.HMAC(e,n),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var e=this._counter[0];if(0===e)throw new Error("hkdf: cannot expand more");this._hmac.reset(),e>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(e){for(var a=new Uint8Array(e),t=0;tthis.blockSize?this._inner.update(a).finish(t).clean():t.set(a);for(var c=0;c>>16&65535)*r+t*(a>>>16&65535)<<16>>>0)|0},a.add=function(e,a){return e+a|0},a.sub=function(e,a){return e-a|0},a.rotl=function(e,a){return e<>>32-a},a.rotr=function(e,a){return e<<32-a|e>>>a},a.isInteger=Number.isInteger||function(e){return"number"===typeof e&&isFinite(e)&&Math.floor(e)===e},a.MAX_SAFE_INTEGER=9007199254740991,a.isSafeInteger=function(e){return a.isInteger(e)&&e>=-a.MAX_SAFE_INTEGER&&e<=a.MAX_SAFE_INTEGER}},75629:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(68770),c=t(9116);a.DIGEST_LENGTH=16;var n=function(){function e(e){this.digestLength=a.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var t=e[0]|e[1]<<8;this._r[0]=8191&t;var r=e[2]|e[3]<<8;this._r[1]=8191&(t>>>13|r<<3);var c=e[4]|e[5]<<8;this._r[2]=7939&(r>>>10|c<<6);var n=e[6]|e[7]<<8;this._r[3]=8191&(c>>>7|n<<9);var d=e[8]|e[9]<<8;this._r[4]=255&(n>>>4|d<<12),this._r[5]=d>>>1&8190;var o=e[10]|e[11]<<8;this._r[6]=8191&(d>>>14|o<<2);var f=e[12]|e[13]<<8;this._r[7]=8065&(o>>>11|f<<5);var i=e[14]|e[15]<<8;this._r[8]=8191&(f>>>8|i<<8),this._r[9]=i>>>5&127,this._pad[0]=e[16]|e[17]<<8,this._pad[1]=e[18]|e[19]<<8,this._pad[2]=e[20]|e[21]<<8,this._pad[3]=e[22]|e[23]<<8,this._pad[4]=e[24]|e[25]<<8,this._pad[5]=e[26]|e[27]<<8,this._pad[6]=e[28]|e[29]<<8,this._pad[7]=e[30]|e[31]<<8}return e.prototype._blocks=function(e,a,t){for(var r=this._fin?0:2048,c=this._h[0],n=this._h[1],d=this._h[2],o=this._h[3],f=this._h[4],i=this._h[5],s=this._h[6],b=this._h[7],l=this._h[8],u=this._h[9],h=this._r[0],x=this._r[1],p=this._r[2],m=this._r[3],v=this._r[4],g=this._r[5],y=this._r[6],k=this._r[7],w=this._r[8],I=this._r[9];t>=16;){var _=e[a+0]|e[a+1]<<8;c+=8191&_;var E=e[a+2]|e[a+3]<<8;n+=8191&(_>>>13|E<<3);var N=e[a+4]|e[a+5]<<8;d+=8191&(E>>>10|N<<6);var H=e[a+6]|e[a+7]<<8;o+=8191&(N>>>7|H<<9);var S=e[a+8]|e[a+9]<<8;f+=8191&(H>>>4|S<<12),i+=S>>>1&8191;var A=e[a+10]|e[a+11]<<8;s+=8191&(S>>>14|A<<2);var M=e[a+12]|e[a+13]<<8;b+=8191&(A>>>11|M<<5);var T=e[a+14]|e[a+15]<<8,P=0,O=P;O+=c*h,O+=n*(5*I),O+=d*(5*w),O+=o*(5*k),P=(O+=f*(5*y))>>>13,O&=8191,O+=i*(5*g),O+=s*(5*v),O+=b*(5*m),O+=(l+=8191&(M>>>8|T<<8))*(5*p);var C=P+=(O+=(u+=T>>>5|r)*(5*x))>>>13;C+=c*x,C+=n*h,C+=d*(5*I),C+=o*(5*w),P=(C+=f*(5*k))>>>13,C&=8191,C+=i*(5*y),C+=s*(5*g),C+=b*(5*v),C+=l*(5*m),P+=(C+=u*(5*p))>>>13,C&=8191;var R=P;R+=c*p,R+=n*x,R+=d*h,R+=o*(5*I),P=(R+=f*(5*w))>>>13,R&=8191,R+=i*(5*k),R+=s*(5*y),R+=b*(5*g),R+=l*(5*v);var D=P+=(R+=u*(5*m))>>>13;D+=c*m,D+=n*p,D+=d*x,D+=o*h,P=(D+=f*(5*I))>>>13,D&=8191,D+=i*(5*w),D+=s*(5*k),D+=b*(5*y),D+=l*(5*g);var j=P+=(D+=u*(5*v))>>>13;j+=c*v,j+=n*m,j+=d*p,j+=o*x,P=(j+=f*h)>>>13,j&=8191,j+=i*(5*I),j+=s*(5*w),j+=b*(5*k),j+=l*(5*y);var L=P+=(j+=u*(5*g))>>>13;L+=c*g,L+=n*v,L+=d*m,L+=o*p,P=(L+=f*x)>>>13,L&=8191,L+=i*h,L+=s*(5*I),L+=b*(5*w),L+=l*(5*k);var B=P+=(L+=u*(5*y))>>>13;B+=c*y,B+=n*g,B+=d*v,B+=o*m,P=(B+=f*p)>>>13,B&=8191,B+=i*x,B+=s*h,B+=b*(5*I),B+=l*(5*w);var F=P+=(B+=u*(5*k))>>>13;F+=c*k,F+=n*y,F+=d*g,F+=o*v,P=(F+=f*m)>>>13,F&=8191,F+=i*p,F+=s*x,F+=b*h,F+=l*(5*I);var Z=P+=(F+=u*(5*w))>>>13;Z+=c*w,Z+=n*k,Z+=d*y,Z+=o*g,P=(Z+=f*v)>>>13,Z&=8191,Z+=i*m,Z+=s*p,Z+=b*x,Z+=l*h;var U=P+=(Z+=u*(5*I))>>>13;U+=c*I,U+=n*w,U+=d*k,U+=o*y,P=(U+=f*g)>>>13,U&=8191,U+=i*v,U+=s*m,U+=b*p,U+=l*x,c=O=8191&(P=(P=((P+=(U+=u*h)>>>13)<<2)+P|0)+(O&=8191)|0),n=C+=P>>>=13,d=R&=8191,o=D&=8191,f=j&=8191,i=L&=8191,s=B&=8191,b=F&=8191,l=Z&=8191,u=U&=8191,a+=16,t-=16}this._h[0]=c,this._h[1]=n,this._h[2]=d,this._h[3]=o,this._h[4]=f,this._h[5]=i,this._h[6]=s,this._h[7]=b,this._h[8]=l,this._h[9]=u},e.prototype.finish=function(e,a){void 0===a&&(a=0);var t,r,c,n,d=new Uint16Array(10);if(this._leftover){for(n=this._leftover,this._buffer[n++]=1;n<16;n++)this._buffer[n]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(t=this._h[1]>>>13,this._h[1]&=8191,n=2;n<10;n++)this._h[n]+=t,t=this._h[n]>>>13,this._h[n]&=8191;for(this._h[0]+=5*t,t=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=t,t=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=t,d[0]=this._h[0]+5,t=d[0]>>>13,d[0]&=8191,n=1;n<10;n++)d[n]=this._h[n]+t,t=d[n]>>>13,d[n]&=8191;for(d[9]-=8192,r=(1^t)-1,n=0;n<10;n++)d[n]&=r;for(r=~r,n=0;n<10;n++)this._h[n]=this._h[n]&r|d[n];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),c=this._h[0]+this._pad[0],this._h[0]=65535&c,n=1;n<8;n++)c=(this._h[n]+this._pad[n]|0)+(c>>>16)|0,this._h[n]=65535&c;return e[a+0]=this._h[0]>>>0,e[a+1]=this._h[0]>>>8,e[a+2]=this._h[1]>>>0,e[a+3]=this._h[1]>>>8,e[a+4]=this._h[2]>>>0,e[a+5]=this._h[2]>>>8,e[a+6]=this._h[3]>>>0,e[a+7]=this._h[3]>>>8,e[a+8]=this._h[4]>>>0,e[a+9]=this._h[4]>>>8,e[a+10]=this._h[5]>>>0,e[a+11]=this._h[5]>>>8,e[a+12]=this._h[6]>>>0,e[a+13]=this._h[6]>>>8,e[a+14]=this._h[7]>>>0,e[a+15]=this._h[7]>>>8,this._finished=!0,this},e.prototype.update=function(e){var a,t=0,r=e.length;if(this._leftover){(a=16-this._leftover)>r&&(a=r);for(var c=0;c=16&&(a=r-r%16,this._blocks(e,t,a),t+=a,r-=a),r){for(c=0;c1&&void 0!==arguments[1]?arguments[1]:a.defaultRandomSource;return t.randomBytes(e)}a.defaultRandomSource=new r.SystemRandomSource,a.randomBytes=d,a.randomUint32=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.defaultRandomSource,t=d(4,e),r=(0,c.readUint32LE)(t);return(0,n.wipe)(t),r};var o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.defaultRandomSource;if(t.length<2)throw new Error("randomString charset is too short");if(t.length>256)throw new Error("randomString charset is too long");for(var c="",f=t.length,i=256-256%f;e>0;){for(var s=d(Math.ceil(256*e/i),r),b=0;b0;b++){var l=s[b];l1&&void 0!==arguments[1]?arguments[1]:o,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.defaultRandomSource,c=Math.ceil(e/(Math.log(t.length)/Math.LN2));return f(c,t,r)}},98136:function(e,a,t){"use strict";var r=t(56690).default,c=t(89728).default;Object.defineProperty(a,"__esModule",{value:!0}),a.BrowserRandomSource=void 0;var n=function(){function e(){r(this,e),this.isAvailable=!1,this.isInstantiated=!1;var a="undefined"!==typeof self?self.crypto||self.msCrypto:null;a&&void 0!==a.getRandomValues&&(this._crypto=a,this.isAvailable=!0,this.isInstantiated=!0)}return c(e,[{key:"randomBytes",value:function(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");for(var a=new Uint8Array(e),t=0;t0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[t++],a--;this._bufferLength===this.blockSize&&(o(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(a>=this.blockSize&&(t=o(this._temp,this._state,e,t,a),a%=this.blockSize);a>0;)this._buffer[this._bufferLength++]=e[t++],a--;return this},e.prototype.finish=function(e){if(!this._finished){var a=this._bytesHashed,t=this._bufferLength,c=a/536870912|0,n=a<<3,d=a%64<56?64:128;this._buffer[t]=128;for(var f=t+1;f0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){c.wipe(e.state),e.buffer&&c.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();a.mE=n;var d=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function o(e,a,t,c,n){for(;n>=64;){for(var o=a[0],f=a[1],i=a[2],s=a[3],b=a[4],l=a[5],u=a[6],h=a[7],x=0;x<16;x++){var p=c+4*x;e[x]=r.readUint32BE(t,p)}for(x=16;x<64;x++){var m=e[x-2],v=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,g=((m=e[x-15])>>>7|m<<25)^(m>>>18|m<<14)^m>>>3;e[x]=(v+e[x-7]|0)+(g+e[x-16]|0)}for(x=0;x<64;x++){v=(((b>>>6|b<<26)^(b>>>11|b<<21)^(b>>>25|b<<7))+(b&l^~b&u)|0)+(h+(d[x]+e[x]|0)|0)|0,g=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&f^o&i^f&i)|0;h=u,u=l,l=b,b=s+v|0,s=i,i=f,f=o,o=v+g|0}a[0]+=o,a[1]+=f,a[2]+=i,a[3]+=s,a[4]+=b,a[5]+=l,a[6]+=u,a[7]+=h,c+=64,n-=64}return c}a.vp=function(e){var a=new n;a.update(e);var t=a.digest();return a.clean(),t}},40526:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(76232),c=t(9116);a.DIGEST_LENGTH=64,a.BLOCK_SIZE=128;var n=function(){function e(){this.digestLength=a.DIGEST_LENGTH,this.blockSize=a.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return e.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},e.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},e.prototype.clean=function(){c.wipe(this._buffer),c.wipe(this._tempHi),c.wipe(this._tempLo),this.reset()},e.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var r=0;if(this._bytesHashed+=t,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=e[r++],t--;this._bufferLength===this.blockSize&&(o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(r=o(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,r,t),t%=this.blockSize);t>0;)this._buffer[this._bufferLength++]=e[r++],t--;return this},e.prototype.finish=function(e){if(!this._finished){var a=this._bytesHashed,t=this._bufferLength,c=a/536870912|0,n=a<<3,d=a%128<112?128:256;this._buffer[t]=128;for(var f=t+1;f0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},e.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},e.prototype.cleanSavedState=function(e){c.wipe(e.stateHi),c.wipe(e.stateLo),e.buffer&&c.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},e}();a.SHA512=n;var d=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function o(e,a,t,c,n,o,f){for(var i,s,b,l,u,h,x,p,m=t[0],v=t[1],g=t[2],y=t[3],k=t[4],w=t[5],I=t[6],_=t[7],E=c[0],N=c[1],H=c[2],S=c[3],A=c[4],M=c[5],T=c[6],P=c[7];f>=128;){for(var O=0;O<16;O++){var C=8*O+o;e[O]=r.readUint32BE(n,C),a[O]=r.readUint32BE(n,C+4)}for(O=0;O<80;O++){var R,D,j=m,L=v,B=g,F=y,Z=k,U=w,z=I,q=E,V=N,W=H,K=S,G=A,Y=M,$=T;if(u=65535&(s=P),h=s>>>16,x=65535&(i=_),p=i>>>16,u+=65535&(s=(A>>>14|k<<18)^(A>>>18|k<<14)^(k>>>9|A<<23)),h+=s>>>16,x+=65535&(i=(k>>>14|A<<18)^(k>>>18|A<<14)^(A>>>9|k<<23)),p+=i>>>16,u+=65535&(s=A&M^~A&T),h+=s>>>16,x+=65535&(i=k&w^~k&I),p+=i>>>16,i=d[2*O],u+=65535&(s=d[2*O+1]),h+=s>>>16,x+=65535&i,p+=i>>>16,i=e[O%16],h+=(s=a[O%16])>>>16,x+=65535&i,p+=i>>>16,x+=(h+=(u+=65535&s)>>>16)>>>16,u=65535&(s=l=65535&u|h<<16),h=s>>>16,x=65535&(i=b=65535&x|(p+=x>>>16)<<16),p=i>>>16,u+=65535&(s=(E>>>28|m<<4)^(m>>>2|E<<30)^(m>>>7|E<<25)),h+=s>>>16,x+=65535&(i=(m>>>28|E<<4)^(E>>>2|m<<30)^(E>>>7|m<<25)),p+=i>>>16,h+=(s=E&N^E&H^N&H)>>>16,x+=65535&(i=m&v^m&g^v&g),p+=i>>>16,R=65535&(x+=(h+=(u+=65535&s)>>>16)>>>16)|(p+=x>>>16)<<16,D=65535&u|h<<16,u=65535&(s=K),h=s>>>16,x=65535&(i=F),p=i>>>16,h+=(s=l)>>>16,x+=65535&(i=b),p+=i>>>16,v=j,g=L,y=B,k=F=65535&(x+=(h+=(u+=65535&s)>>>16)>>>16)|(p+=x>>>16)<<16,w=Z,I=U,_=z,m=R,N=q,H=V,S=W,A=K=65535&u|h<<16,M=G,T=Y,P=$,E=D,O%16===15)for(C=0;C<16;C++)i=e[C],u=65535&(s=a[C]),h=s>>>16,x=65535&i,p=i>>>16,i=e[(C+9)%16],u+=65535&(s=a[(C+9)%16]),h+=s>>>16,x+=65535&i,p+=i>>>16,b=e[(C+1)%16],u+=65535&(s=((l=a[(C+1)%16])>>>1|b<<31)^(l>>>8|b<<24)^(l>>>7|b<<25)),h+=s>>>16,x+=65535&(i=(b>>>1|l<<31)^(b>>>8|l<<24)^b>>>7),p+=i>>>16,b=e[(C+14)%16],h+=(s=((l=a[(C+14)%16])>>>19|b<<13)^(b>>>29|l<<3)^(l>>>6|b<<26))>>>16,x+=65535&(i=(b>>>19|l<<13)^(l>>>29|b<<3)^b>>>6),p+=i>>>16,p+=(x+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,e[C]=65535&x|p<<16,a[C]=65535&u|h<<16}u=65535&(s=E),h=s>>>16,x=65535&(i=m),p=i>>>16,i=t[0],h+=(s=c[0])>>>16,x+=65535&i,p+=i>>>16,p+=(x+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,t[0]=m=65535&x|p<<16,c[0]=E=65535&u|h<<16,u=65535&(s=N),h=s>>>16,x=65535&(i=v),p=i>>>16,i=t[1],h+=(s=c[1])>>>16,x+=65535&i,p+=i>>>16,p+=(x+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,t[1]=v=65535&x|p<<16,c[1]=N=65535&u|h<<16,u=65535&(s=H),h=s>>>16,x=65535&(i=g),p=i>>>16,i=t[2],h+=(s=c[2])>>>16,x+=65535&i,p+=i>>>16,p+=(x+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,t[2]=g=65535&x|p<<16,c[2]=H=65535&u|h<<16,u=65535&(s=S),h=s>>>16,x=65535&(i=y),p=i>>>16,i=t[3],h+=(s=c[3])>>>16,x+=65535&i,p+=i>>>16,p+=(x+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,t[3]=y=65535&x|p<<16,c[3]=S=65535&u|h<<16,u=65535&(s=A),h=s>>>16,x=65535&(i=k),p=i>>>16,i=t[4],h+=(s=c[4])>>>16,x+=65535&i,p+=i>>>16,p+=(x+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,t[4]=k=65535&x|p<<16,c[4]=A=65535&u|h<<16,u=65535&(s=M),h=s>>>16,x=65535&(i=w),p=i>>>16,i=t[5],h+=(s=c[5])>>>16,x+=65535&i,p+=i>>>16,p+=(x+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,t[5]=w=65535&x|p<<16,c[5]=M=65535&u|h<<16,u=65535&(s=T),h=s>>>16,x=65535&(i=I),p=i>>>16,i=t[6],h+=(s=c[6])>>>16,x+=65535&i,p+=i>>>16,p+=(x+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,t[6]=I=65535&x|p<<16,c[6]=T=65535&u|h<<16,u=65535&(s=P),h=s>>>16,x=65535&(i=_),p=i>>>16,i=t[7],h+=(s=c[7])>>>16,x+=65535&i,p+=i>>>16,p+=(x+=(h+=(u+=65535&s)>>>16)>>>16)>>>16,t[7]=_=65535&x|p<<16,c[7]=P=65535&u|h<<16,o+=128,f-=128}return o}a.hash=function(e){var a=new n;a.update(e);var t=a.digest();return a.clean(),t}},9116:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.wipe=function(e){for(var a=0;a=0;--y){var k=t[y>>>3]>>>(7&y)&1;i(c,d,k),i(h,x,k),s(p,c,h),b(c,c,h),s(h,d,x),b(d,d,x),u(x,p),u(m,c),l(c,h,c),l(h,d,p),s(p,c,h),b(c,c,h),u(d,c),b(h,x,m),l(c,h,o),s(c,c,x),l(h,h,c),l(c,x,m),l(x,d,r),u(d,p),i(c,d,k),i(h,x,k)}for(var w=0;w<16;w++)r[w+16]=c[w],r[w+32]=h[w],r[w+48]=d[w],r[w+64]=x[w];var I=r.subarray(32),_=r.subarray(16);!function(e,a){for(var t=n(),r=0;r<16;r++)t[r]=a[r];for(var c=253;c>=0;c--)u(t,t),2!==c&&4!==c&&l(t,t,a);for(var d=0;d<16;d++)e[d]=t[d]}(I,I),l(_,_,I);var E=new Uint8Array(32);return function(e,a){for(var t=n(),r=n(),c=0;c<16;c++)r[c]=a[c];f(r),f(r),f(r);for(var d=0;d<2;d++){t[0]=r[0]-65517;for(var o=1;o<15;o++)t[o]=r[o]-65535-(t[o-1]>>16&1),t[o-1]&=65535;t[15]=r[15]-32767-(t[14]>>16&1);var s=t[15]>>16&1;t[14]&=65535,i(r,t,1-s)}for(var b=0;b<16;b++)e[2*b]=255&r[b],e[2*b+1]=r[b]>>8}(E,_),E}function x(e){return h(e,d)}function p(e){if(e.length!==a.KS)throw new Error("x25519: seed must be ".concat(a.KS," bytes"));var t=new Uint8Array(e);return{publicKey:x(t),secretKey:t}}a.Au=function(e){var a=(0,r.randomBytes)(32,e),t=p(a);return(0,c.wipe)(a),t},a.gi=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e.length!==a.kz)throw new Error("X25519: incorrect secret key length");if(t.length!==a.kz)throw new Error("X25519: incorrect public key length");var c=h(e,t);if(r){for(var n=0,d=0;d=0;o--)(c=e[o])&&(d=(n<3?c(d):n>3?c(a,t,d):c(a,t))||d);return n>3&&d&&Object.defineProperty(a,t,d),d}function f(e,a){return function(t,r){a(t,r,e)}}function i(e,a){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,a)}function s(e,a,t,r){return new(t||(t=Promise))((function(c,n){function d(e){try{f(r.next(e))}catch(a){n(a)}}function o(e){try{f(r.throw(e))}catch(a){n(a)}}function f(e){var a;e.done?c(e.value):(a=e.value,a instanceof t?a:new t((function(e){e(a)}))).then(d,o)}f((r=r.apply(e,a||[])).next())}))}function b(e,a){var t,r,c,n,d={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;d;)try{if(t=1,r&&(c=2&n[0]?r.return:n[0]?r.throw||((c=r.return)&&c.call(r),0):r.next)&&!(c=c.call(r,n[1])).done)return c;switch(r=0,c&&(n=[2&n[0],c.value]),n[0]){case 0:case 1:c=n;break;case 4:return d.label++,{value:n[1],done:!1};case 5:d.label++,r=n[1],n=[0];continue;case 7:n=d.ops.pop(),d.trys.pop();continue;default:if(!(c=(c=d.trys).length>0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,a){var t="function"===typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,c,n=t.call(e),d=[];try{for(;(void 0===a||a-- >0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d}function p(){for(var e=[],a=0;a1||o(e,a)}))})}function o(e,a){try{(t=c[e](a)).value instanceof v?Promise.resolve(t.value.v).then(f,i):s(n[0][2],t)}catch(r){s(n[0][3],r)}var t}function f(e){o("next",e)}function i(e){o("throw",e)}function s(e,a){e(a),n.shift(),n.length&&o(n[0][0],n[0][1])}}function y(e){var a,t;return a={},r("next"),r("throw",(function(e){throw e})),r("return"),a[Symbol.iterator]=function(){return this},a;function r(r,c){a[r]=e[r]?function(a){return(t=!t)?{value:v(e[r](a)),done:"return"===r}:c?c(a):a}:c}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a,t=e[Symbol.asyncIterator];return t?t.call(e):(e=h(e),a={},r("next"),r("throw"),r("return"),a[Symbol.asyncIterator]=function(){return this},a);function r(t){a[t]=e[t]&&function(a){return new Promise((function(r,c){(function(e,a,t,r){Promise.resolve(r).then((function(a){e({value:a,done:t})}),a)})(r,c,(a=e[t](a)).done,a.value)}))}}}function w(e,a){return Object.defineProperty?Object.defineProperty(e,"raw",{value:a}):e.raw=a,e}function I(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a}function _(e){return e&&e.__esModule?e:{default:e}}function E(e,a){if(!a.has(e))throw new TypeError("attempted to get private field on non-instance");return a.get(e)}function N(e,a,t){if(!a.has(e))throw new TypeError("attempted to set private field on non-instance");return a.set(e,t),t}},90948:function(e,a,t){"use strict";t.d(a,{q:function(){return n}});var r=t(43144),c=t(15671),n=(0,r.Z)((function e(){(0,c.Z)(this,e)}))},98196:function(e,a,t){"use strict";t.r(a),t.d(a,{IEvents:function(){return r.q}});var r=t(90948)},94601:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.HEARTBEAT_EVENTS=a.HEARTBEAT_INTERVAL=void 0;var r=t(63182);a.HEARTBEAT_INTERVAL=r.FIVE_SECONDS,a.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},63007:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),t(67492).__exportStar(t(94601),a)},12101:function(e,a,t){"use strict";var r=t(17061).default,c=t(56690).default,n=t(89728).default,d=t(61655).default,o=t(26389).default;Object.defineProperty(a,"__esModule",{value:!0}),a.HeartBeat=void 0;var f=t(67492),i=t(47465),s=t(63182),b=t(58830),l=t(63007),u=function(e){d(t,e);var a=o(t);function t(e){var r;return c(this,t),(r=a.call(this,e)).events=new i.EventEmitter,r.interval=l.HEARTBEAT_INTERVAL,r.interval=(null===e||void 0===e?void 0:e.interval)||l.HEARTBEAT_INTERVAL,r}return n(t,[{key:"init",value:function(){return f.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.initialize();case 2:case"end":return e.stop()}}),e,this)})))}},{key:"stop",value:function(){clearInterval(this.intervalRef)}},{key:"on",value:function(e,a){this.events.on(e,a)}},{key:"once",value:function(e,a){this.events.once(e,a)}},{key:"off",value:function(e,a){this.events.off(e,a)}},{key:"removeListener",value:function(e,a){this.events.removeListener(e,a)}},{key:"initialize",value:function(){return f.__awaiter(this,void 0,void 0,r().mark((function e(){var a=this;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.intervalRef=setInterval((function(){return a.pulse()}),s.toMiliseconds(this.interval));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"pulse",value:function(){this.events.emit(l.HEARTBEAT_EVENTS.pulse)}}],[{key:"init",value:function(e){return f.__awaiter(this,void 0,void 0,r().mark((function a(){var c;return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return c=new t(e),a.next=3,c.init();case 3:return a.abrupt("return",c);case 4:case"end":return a.stop()}}),a)})))}}]),t}(b.IHeartBeat);a.HeartBeat=u},6961:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(67492);r.__exportStar(t(12101),a),r.__exportStar(t(58830),a),r.__exportStar(t(63007),a)},65336:function(e,a,t){"use strict";var r=t(89728).default,c=t(56690).default,n=t(61655).default,d=t(26389).default;Object.defineProperty(a,"__esModule",{value:!0}),a.IHeartBeat=void 0;var o=function(e){n(t,e);var a=d(t);function t(e){return c(this,t),a.call(this)}return r(t)}(t(98196).IEvents);a.IHeartBeat=o},58830:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),t(67492).__exportStar(t(65336),a)},67492:function(e,a,t){"use strict";t.r(a),t.d(a,{__assign:function(){return n},__asyncDelegator:function(){return y},__asyncGenerator:function(){return g},__asyncValues:function(){return k},__await:function(){return v},__awaiter:function(){return s},__classPrivateFieldGet:function(){return E},__classPrivateFieldSet:function(){return N},__createBinding:function(){return l},__decorate:function(){return o},__exportStar:function(){return u},__extends:function(){return c},__generator:function(){return b},__importDefault:function(){return _},__importStar:function(){return I},__makeTemplateObject:function(){return w},__metadata:function(){return i},__param:function(){return f},__read:function(){return x},__rest:function(){return d},__spread:function(){return p},__spreadArrays:function(){return m},__values:function(){return h}});var r=function(e,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},r(e,a)};function c(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}var n=function(){return n=Object.assign||function(e){for(var a,t=1,r=arguments.length;t=0;o--)(c=e[o])&&(d=(n<3?c(d):n>3?c(a,t,d):c(a,t))||d);return n>3&&d&&Object.defineProperty(a,t,d),d}function f(e,a){return function(t,r){a(t,r,e)}}function i(e,a){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,a)}function s(e,a,t,r){return new(t||(t=Promise))((function(c,n){function d(e){try{f(r.next(e))}catch(a){n(a)}}function o(e){try{f(r.throw(e))}catch(a){n(a)}}function f(e){var a;e.done?c(e.value):(a=e.value,a instanceof t?a:new t((function(e){e(a)}))).then(d,o)}f((r=r.apply(e,a||[])).next())}))}function b(e,a){var t,r,c,n,d={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;d;)try{if(t=1,r&&(c=2&n[0]?r.return:n[0]?r.throw||((c=r.return)&&c.call(r),0):r.next)&&!(c=c.call(r,n[1])).done)return c;switch(r=0,c&&(n=[2&n[0],c.value]),n[0]){case 0:case 1:c=n;break;case 4:return d.label++,{value:n[1],done:!1};case 5:d.label++,r=n[1],n=[0];continue;case 7:n=d.ops.pop(),d.trys.pop();continue;default:if(!(c=(c=d.trys).length>0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,a){var t="function"===typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,c,n=t.call(e),d=[];try{for(;(void 0===a||a-- >0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d}function p(){for(var e=[],a=0;a1||o(e,a)}))})}function o(e,a){try{(t=c[e](a)).value instanceof v?Promise.resolve(t.value.v).then(f,i):s(n[0][2],t)}catch(r){s(n[0][3],r)}var t}function f(e){o("next",e)}function i(e){o("throw",e)}function s(e,a){e(a),n.shift(),n.length&&o(n[0][0],n[0][1])}}function y(e){var a,t;return a={},r("next"),r("throw",(function(e){throw e})),r("return"),a[Symbol.iterator]=function(){return this},a;function r(r,c){a[r]=e[r]?function(a){return(t=!t)?{value:v(e[r](a)),done:"return"===r}:c?c(a):a}:c}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a,t=e[Symbol.asyncIterator];return t?t.call(e):(e=h(e),a={},r("next"),r("throw"),r("return"),a[Symbol.asyncIterator]=function(){return this},a);function r(t){a[t]=e[t]&&function(a){return new Promise((function(r,c){(function(e,a,t,r){Promise.resolve(r).then((function(a){e({value:a,done:t})}),a)})(r,c,(a=e[t](a)).done,a.value)}))}}}function w(e,a){return Object.defineProperty?Object.defineProperty(e,"raw",{value:a}):e.raw=a,e}function I(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a}function _(e){return e&&e.__esModule?e:{default:e}}function E(e,a){if(!a.has(e))throw new TypeError("attempted to get private field on non-instance");return a.get(e)}function N(e,a,t){if(!a.has(e))throw new TypeError("attempted to set private field on non-instance");return a.set(e,t),t}},10159:function(e,a,t){"use strict";t.d(a,{k:function(){return u},Z:function(){return h}});var r=t(74165),c=t(15861),n=t(15671),d=t(43144),o=t(47465),f=t(84255),i=t.n(f),s=t(75457),b=t(28477),l={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},u=function(){function e(a){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,n.Z)(this,e),this.url=a,this.disableProviderPing=t,this.events=new o.EventEmitter,this.isAvailable=!1,this.registering=!1,!(0,b.isHttpUrl)(a))throw new Error("Provided URL is not compatible with HTTP connection: ".concat(a));this.url=a,this.disableProviderPing=t}return(0,d.Z)(e,[{key:"connected",get:function(){return this.isAvailable}},{key:"connecting",get:function(){return this.registering}},{key:"on",value:function(e,a){this.events.on(e,a)}},{key:"once",value:function(e,a){this.events.once(e,a)}},{key:"off",value:function(e,a){this.events.off(e,a)}},{key:"removeListener",value:function(e,a){this.events.removeListener(e,a)}},{key:"open",value:function(){var e=(0,c.Z)((0,r.Z)().mark((function e(){var a,t=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.length>0&&void 0!==t[0]?t[0]:this.url,e.next=3,this.register(a);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"close",value:function(){var e=(0,c.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isAvailable){e.next=2;break}throw new Error("Connection already closed");case 2:this.onClose();case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"send",value:function(){var e=(0,c.Z)((0,r.Z)().mark((function e(a,t){var c,n,d;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isAvailable){e.next=3;break}return e.next=3,this.register();case 3:return e.prev=3,c=(0,s.u)(a),e.next=7,i()(this.url,Object.assign(Object.assign({},l),{body:c}));case 7:return n=e.sent,e.next=10,n.json();case 10:d=e.sent,this.onPayload({data:d}),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),this.onError(a.id,e.t0);case 17:case"end":return e.stop()}}),e,this,[[3,14]])})));return function(a,t){return e.apply(this,arguments)}}()},{key:"register",value:function(){var e=(0,c.Z)((0,r.Z)().mark((function e(){var a,t,c,n,d=this,o=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=o.length>0&&void 0!==o[0]?o[0]:this.url,(0,b.isHttpUrl)(a)){e.next=3;break}throw new Error("Provided URL is not compatible with HTTP connection: ".concat(a));case 3:if(!this.registering){e.next=7;break}return t=this.events.getMaxListeners(),(this.events.listenerCount("register_error")>=t||this.events.listenerCount("open")>=t)&&this.events.setMaxListeners(t+1),e.abrupt("return",new Promise((function(e,a){d.events.once("register_error",(function(e){d.resetMaxListeners(),a(e)})),d.events.once("open",(function(){if(d.resetMaxListeners(),"undefined"===typeof d.isAvailable)return a(new Error("HTTP connection is missing or invalid"));e()}))})));case 7:if(this.url=a,this.registering=!0,e.prev=9,this.disableProviderPing){e.next=14;break}return c=(0,s.u)({id:1,jsonrpc:"2.0",method:"test",params:[]}),e.next=14,i()(a,Object.assign(Object.assign({},l),{body:c}));case 14:this.onOpen(),e.next=23;break;case 17:throw e.prev=17,e.t0=e.catch(9),n=this.parseError(e.t0),this.events.emit("register_error",n),this.onClose(),n;case 23:case"end":return e.stop()}}),e,this,[[9,17]])})));return function(){return e.apply(this,arguments)}}()},{key:"onOpen",value:function(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}},{key:"onClose",value:function(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}},{key:"onPayload",value:function(e){if("undefined"!==typeof e.data){var a="string"===typeof e.data?(0,s.D)(e.data):e.data;this.events.emit("payload",a)}}},{key:"onError",value:function(e,a){var t=this.parseError(a),r=t.message||t.toString(),c=(0,b.formatJsonRpcError)(e,r);this.events.emit("payload",c)}},{key:"parseError",value:function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.url;return(0,b.parseConnectionError)(e,a,"HTTP")}},{key:"resetMaxListeners",value:function(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}]),e}(),h=u},42829:function(e,a,t){"use strict";t.d(a,{r:function(){return b}});var r=t(74165),c=t(15861),n=t(15671),d=t(43144),o=t(60136),f=t(29388),i=t(47465),s=t(28477),b=function(e){(0,o.Z)(t,e);var a=(0,f.Z)(t);function t(e){var r;return(0,n.Z)(this,t),(r=a.call(this,e)).events=new i.EventEmitter,r.hasRegisteredEventListeners=!1,r.connection=r.setConnection(e),r.connection.connected&&r.registerEventListeners(),r}return(0,d.Z)(t,[{key:"connect",value:function(){var e=(0,c.Z)((0,r.Z)().mark((function e(){var a,t=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.length>0&&void 0!==t[0]?t[0]:this.connection,e.next=3,this.open(a);case 3:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"disconnect",value:function(){var e=(0,c.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.close();case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"on",value:function(e,a){this.events.on(e,a)}},{key:"once",value:function(e,a){this.events.once(e,a)}},{key:"off",value:function(e,a){this.events.off(e,a)}},{key:"removeListener",value:function(e,a){this.events.removeListener(e,a)}},{key:"request",value:function(){var e=(0,c.Z)((0,r.Z)().mark((function e(a,t){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.requestStrict((0,s.formatJsonRpcRequest)(a.method,a.params||[],a.id||(0,s.getBigIntRpcId)().toString()),t));case 1:case"end":return e.stop()}}),e,this)})));return function(a,t){return e.apply(this,arguments)}}()},{key:"requestStrict",value:function(){var e=(0,c.Z)((0,r.Z)().mark((function e(a,t){var n=this;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=(0,c.Z)((0,r.Z)().mark((function e(c,d){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.connection.connected){e.next=9;break}return e.prev=1,e.next=4,n.open();case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),d(e.t0);case 9:return n.events.on("".concat(a.id),(function(e){(0,s.isJsonRpcError)(e)?d(e.error):c(e.result)})),e.prev=10,e.next=13,n.connection.send(a,t);case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(10),d(e.t1);case 18:case"end":return e.stop()}}),e,null,[[1,6],[10,15]])})));return function(a,t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}()},{key:"setConnection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.connection;return e}},{key:"onPayload",value:function(e){this.events.emit("payload",e),(0,s.isJsonRpcResponse)(e)?this.events.emit("".concat(e.id),e):this.events.emit("message",{type:e.method,data:e.params})}},{key:"onClose",value:function(e){e&&3e3===e.code&&this.events.emit("error",new Error("WebSocket connection closed abnormally with code: ".concat(e.code," ").concat(e.reason?"(".concat(e.reason,")"):""))),this.events.emit("disconnect")}},{key:"open",value:function(){var e=(0,c.Z)((0,r.Z)().mark((function e(){var a,t=arguments;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.length>0&&void 0!==t[0]?t[0]:this.connection,this.connection!==a||!this.connection.connected){e.next=3;break}return e.abrupt("return");case 3:if(this.connection.connected&&this.close(),"string"!==typeof a){e.next=8;break}return e.next=7,this.connection.open(a);case 7:a=this.connection;case 8:return this.connection=this.setConnection(a),e.next=11,this.connection.open();case 11:this.registerEventListeners(),this.events.emit("connect");case 13:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"close",value:function(){var e=(0,c.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.connection.close();case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"registerEventListeners",value:function(){var e=this;this.hasRegisteredEventListeners||(this.connection.on("payload",(function(a){return e.onPayload(a)})),this.connection.on("close",(function(a){return e.onClose(a)})),this.connection.on("error",(function(a){return e.events.emit("error",a)})),this.connection.on("register_error",(function(a){return e.onClose()})),this.hasRegisteredEventListeners=!0)}}]),t}(s.IJsonRpcProvider)},65670:function(e,a,t){"use strict";t.d(a,{XR:function(){return f},x0:function(){return i}});var r=t(43144),c=t(15671),n=t(60136),d=t(29388),o=(0,r.Z)((function e(){(0,c.Z)(this,e)})),f=function(e){(0,n.Z)(t,e);var a=(0,d.Z)(t);function t(e){return(0,c.Z)(this,t),a.call(this)}return(0,r.Z)(t)}(o),i=function(e){(0,n.Z)(t,e);var a=(0,d.Z)(t);function t(e){return(0,c.Z)(this,t),a.call(this)}return(0,r.Z)(t)}(function(e){(0,n.Z)(t,e);var a=(0,d.Z)(t);function t(){return(0,c.Z)(this,t),a.call(this)}return(0,r.Z)(t)}(o))},60476:function(e,a,t){"use strict";t.d(a,{CA:function(){return d},JV:function(){return i},O4:function(){return n},dQ:function(){return o},xK:function(){return f}});var r,c=t(4942),n="INTERNAL_ERROR",d="SERVER_ERROR",o=[-32700,-32600,-32601,-32602,-32603],f=(r={},(0,c.Z)(r,"PARSE_ERROR",{code:-32700,message:"Parse error"}),(0,c.Z)(r,"INVALID_REQUEST",{code:-32600,message:"Invalid Request"}),(0,c.Z)(r,"METHOD_NOT_FOUND",{code:-32601,message:"Method not found"}),(0,c.Z)(r,"INVALID_PARAMS",{code:-32602,message:"Invalid params"}),(0,c.Z)(r,n,{code:-32603,message:"Internal error"}),(0,c.Z)(r,d,{code:-32e3,message:"Server error"}),r),i=d},15812:function(e,a,t){"use strict";var r=t(67323);t.o(r,"IJsonRpcProvider")&&t.d(a,{IJsonRpcProvider:function(){return r.IJsonRpcProvider}}),t.o(r,"formatJsonRpcError")&&t.d(a,{formatJsonRpcError:function(){return r.formatJsonRpcError}}),t.o(r,"formatJsonRpcRequest")&&t.d(a,{formatJsonRpcRequest:function(){return r.formatJsonRpcRequest}}),t.o(r,"formatJsonRpcResult")&&t.d(a,{formatJsonRpcResult:function(){return r.formatJsonRpcResult}}),t.o(r,"getBigIntRpcId")&&t.d(a,{getBigIntRpcId:function(){return r.getBigIntRpcId}}),t.o(r,"isHttpUrl")&&t.d(a,{isHttpUrl:function(){return r.isHttpUrl}}),t.o(r,"isJsonRpcError")&&t.d(a,{isJsonRpcError:function(){return r.isJsonRpcError}}),t.o(r,"isJsonRpcRequest")&&t.d(a,{isJsonRpcRequest:function(){return r.isJsonRpcRequest}}),t.o(r,"isJsonRpcResponse")&&t.d(a,{isJsonRpcResponse:function(){return r.isJsonRpcResponse}}),t.o(r,"isJsonRpcResult")&&t.d(a,{isJsonRpcResult:function(){return r.isJsonRpcResult}}),t.o(r,"isLocalhostUrl")&&t.d(a,{isLocalhostUrl:function(){return r.isLocalhostUrl}}),t.o(r,"isReactNative")&&t.d(a,{isReactNative:function(){return r.isReactNative}}),t.o(r,"isWsUrl")&&t.d(a,{isWsUrl:function(){return r.isWsUrl}}),t.o(r,"payloadId")&&t.d(a,{payloadId:function(){return r.payloadId}})},41154:function(e,a,t){"use strict";t.d(a,{CX:function(){return o},L2:function(){return d},by:function(){return n},i5:function(){return c}});var r=t(60476);function c(e){return r.dQ.includes(e)}function n(e){return Object.keys(r.xK).includes(e)?r.xK[e]:r.xK[r.JV]}function d(e){var a=Object.values(r.xK).find((function(a){return a.code===e}));return a||r.xK[r.JV]}function o(e,a,t){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?new Error("Unavailable ".concat(t," RPC url at ").concat(a)):e}},810:function(e,a,t){"use strict";t.d(a,{CS:function(){return d},RI:function(){return i},o0:function(){return n},sT:function(){return o},tm:function(){return f}});var r=t(41154),c=t(60476);function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,a=Date.now()*Math.pow(10,e),t=Math.floor(Math.random()*Math.pow(10,e));return a+t}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;return BigInt(n(e))}function o(e,a,t){return{id:t||n(),jsonrpc:"2.0",method:e,params:a}}function f(e,a){return{id:e,jsonrpc:"2.0",result:a}}function i(e,a,t){return{id:e,jsonrpc:"2.0",error:s(a,t)}}function s(e,a){return"undefined"===typeof e?(0,r.by)(c.O4):("string"===typeof e&&(e=Object.assign(Object.assign({},(0,r.by)(c.CA)),{message:e})),"undefined"!==typeof a&&(e.data=a),(0,r.i5)(e.code)&&(e=(0,r.L2)(e.code)),e)}},28477:function(e,a,t){"use strict";t.d(a,{IJsonRpcProvider:function(){return d.x0},formatJsonRpcError:function(){return n.RI},formatJsonRpcRequest:function(){return n.sT},formatJsonRpcResult:function(){return n.tm},getBigIntRpcId:function(){return n.CS},isHttpUrl:function(){return o.jK},isJsonRpcError:function(){return f.jg},isJsonRpcRequest:function(){return f.DW},isJsonRpcResponse:function(){return f.u},isJsonRpcResult:function(){return f.k4},isLocalhostUrl:function(){return o.JF},isWsUrl:function(){return o.UZ},parseConnectionError:function(){return r.CX},payloadId:function(){return n.o0}});t(60476);var r=t(41154),c=t(15812);t.o(c,"IJsonRpcProvider")&&t.d(a,{IJsonRpcProvider:function(){return c.IJsonRpcProvider}}),t.o(c,"formatJsonRpcError")&&t.d(a,{formatJsonRpcError:function(){return c.formatJsonRpcError}}),t.o(c,"formatJsonRpcRequest")&&t.d(a,{formatJsonRpcRequest:function(){return c.formatJsonRpcRequest}}),t.o(c,"formatJsonRpcResult")&&t.d(a,{formatJsonRpcResult:function(){return c.formatJsonRpcResult}}),t.o(c,"getBigIntRpcId")&&t.d(a,{getBigIntRpcId:function(){return c.getBigIntRpcId}}),t.o(c,"isHttpUrl")&&t.d(a,{isHttpUrl:function(){return c.isHttpUrl}}),t.o(c,"isJsonRpcError")&&t.d(a,{isJsonRpcError:function(){return c.isJsonRpcError}}),t.o(c,"isJsonRpcRequest")&&t.d(a,{isJsonRpcRequest:function(){return c.isJsonRpcRequest}}),t.o(c,"isJsonRpcResponse")&&t.d(a,{isJsonRpcResponse:function(){return c.isJsonRpcResponse}}),t.o(c,"isJsonRpcResult")&&t.d(a,{isJsonRpcResult:function(){return c.isJsonRpcResult}}),t.o(c,"isLocalhostUrl")&&t.d(a,{isLocalhostUrl:function(){return c.isLocalhostUrl}}),t.o(c,"isReactNative")&&t.d(a,{isReactNative:function(){return c.isReactNative}}),t.o(c,"isWsUrl")&&t.d(a,{isWsUrl:function(){return c.isWsUrl}}),t.o(c,"payloadId")&&t.d(a,{payloadId:function(){return c.payloadId}});var n=t(810),d=t(38480),o=t(79493),f=t(806)},38480:function(e,a,t){"use strict";t.d(a,{x0:function(){return r.x0}});var r=t(65670)},79493:function(e,a,t){"use strict";t.d(a,{JF:function(){return d},UZ:function(){return n},jK:function(){return c}});function r(e,a){var t=function(e){var a=e.match(new RegExp(/^\w+:/,"gi"));if(a&&a.length)return a[0]}(e);return"undefined"!==typeof t&&new RegExp(a).test(t)}function c(e){return r(e,"^https?:")}function n(e){return r(e,"^wss?:")}function d(e){return new RegExp("wss?://localhost(:d{2,5})?").test(e)}},806:function(e,a,t){"use strict";function r(e){return"object"===typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function c(e){return r(e)&&"method"in e}function n(e){return r(e)&&(d(e)||o(e))}function d(e){return"result"in e}function o(e){return"error"in e}t.d(a,{DW:function(){return c},jg:function(){return o},k4:function(){return d},u:function(){return n}})},53719:function(e,a,t){"use strict";var r=t(17061).default,c=t(56690).default,n=t(89728).default;var d=t(26377),o=t(62038),f=d.__importDefault(t(88062)),i=t(83454),s=function(){function e(){c(this,e),this.localStorage=f.default}return n(e,[{key:"getKeys",value:function(){return d.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object.keys(this.localStorage));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getEntries",value:function(){return d.__awaiter(this,void 0,void 0,r().mark((function e(){return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object.entries(this.localStorage).map(i.parseEntry));case 1:case"end":return e.stop()}}),e,this)})))}},{key:"getItem",value:function(e){return d.__awaiter(this,void 0,void 0,r().mark((function a(){var t;return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(null!==(t=this.localStorage.getItem(e))){a.next=3;break}return a.abrupt("return",void 0);case 3:return a.abrupt("return",o.safeJsonParse(t));case 4:case"end":return a.stop()}}),a,this)})))}},{key:"setItem",value:function(e,a){return d.__awaiter(this,void 0,void 0,r().mark((function t(){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.localStorage.setItem(e,o.safeJsonStringify(a));case 1:case"end":return t.stop()}}),t,this)})))}},{key:"removeItem",value:function(e){return d.__awaiter(this,void 0,void 0,r().mark((function a(){return r().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:this.localStorage.removeItem(e);case 1:case"end":return a.stop()}}),a,this)})))}}]),e}();a.ZP=s},88062:function(e,a,t){"use strict";!function(){var a;function r(){}(a=r).prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},a.prototype.setItem=function(e,a){this[e]=String(a)},a.prototype.removeItem=function(e){delete this[e]},a.prototype.clear=function(){var e=this;Object.keys(e).forEach((function(a){e[a]=void 0,delete e[a]}))},a.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},a.prototype.__defineGetter__("length",(function(){return Object.keys(this).length})),"undefined"!==typeof t.g&&t.g.localStorage?e.exports=t.g.localStorage:"undefined"!==typeof window&&window.localStorage?e.exports=window.localStorage:e.exports=new r}()},83454:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(26377);r.__exportStar(t(72423),a),r.__exportStar(t(64855),a)},72423:function(e,a,t){"use strict";var r=t(89728).default,c=t(56690).default;Object.defineProperty(a,"__esModule",{value:!0}),a.IKeyValueStorage=void 0;var n=r((function e(){c(this,e)}));a.IKeyValueStorage=n},64855:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.parseEntry=void 0;var r=t(62038);a.parseEntry=function(e){var a;return[e[0],r.safeJsonParse(null!==(a=e[1])&&void 0!==a?a:"")]}},26377:function(e,a,t){"use strict";t.r(a),t.d(a,{__assign:function(){return n},__asyncDelegator:function(){return y},__asyncGenerator:function(){return g},__asyncValues:function(){return k},__await:function(){return v},__awaiter:function(){return s},__classPrivateFieldGet:function(){return E},__classPrivateFieldSet:function(){return N},__createBinding:function(){return l},__decorate:function(){return o},__exportStar:function(){return u},__extends:function(){return c},__generator:function(){return b},__importDefault:function(){return _},__importStar:function(){return I},__makeTemplateObject:function(){return w},__metadata:function(){return i},__param:function(){return f},__read:function(){return x},__rest:function(){return d},__spread:function(){return p},__spreadArrays:function(){return m},__values:function(){return h}});var r=function(e,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},r(e,a)};function c(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}var n=function(){return n=Object.assign||function(e){for(var a,t=1,r=arguments.length;t=0;o--)(c=e[o])&&(d=(n<3?c(d):n>3?c(a,t,d):c(a,t))||d);return n>3&&d&&Object.defineProperty(a,t,d),d}function f(e,a){return function(t,r){a(t,r,e)}}function i(e,a){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,a)}function s(e,a,t,r){return new(t||(t=Promise))((function(c,n){function d(e){try{f(r.next(e))}catch(a){n(a)}}function o(e){try{f(r.throw(e))}catch(a){n(a)}}function f(e){var a;e.done?c(e.value):(a=e.value,a instanceof t?a:new t((function(e){e(a)}))).then(d,o)}f((r=r.apply(e,a||[])).next())}))}function b(e,a){var t,r,c,n,d={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;d;)try{if(t=1,r&&(c=2&n[0]?r.return:n[0]?r.throw||((c=r.return)&&c.call(r),0):r.next)&&!(c=c.call(r,n[1])).done)return c;switch(r=0,c&&(n=[2&n[0],c.value]),n[0]){case 0:case 1:c=n;break;case 4:return d.label++,{value:n[1],done:!1};case 5:d.label++,r=n[1],n=[0];continue;case 7:n=d.ops.pop(),d.trys.pop();continue;default:if(!(c=(c=d.trys).length>0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,a){var t="function"===typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,c,n=t.call(e),d=[];try{for(;(void 0===a||a-- >0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d}function p(){for(var e=[],a=0;a1||o(e,a)}))})}function o(e,a){try{(t=c[e](a)).value instanceof v?Promise.resolve(t.value.v).then(f,i):s(n[0][2],t)}catch(r){s(n[0][3],r)}var t}function f(e){o("next",e)}function i(e){o("throw",e)}function s(e,a){e(a),n.shift(),n.length&&o(n[0][0],n[0][1])}}function y(e){var a,t;return a={},r("next"),r("throw",(function(e){throw e})),r("return"),a[Symbol.iterator]=function(){return this},a;function r(r,c){a[r]=e[r]?function(a){return(t=!t)?{value:v(e[r](a)),done:"return"===r}:c?c(a):a}:c}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a,t=e[Symbol.asyncIterator];return t?t.call(e):(e=h(e),a={},r("next"),r("throw"),r("return"),a[Symbol.asyncIterator]=function(){return this},a);function r(t){a[t]=e[t]&&function(a){return new Promise((function(r,c){(function(e,a,t,r){Promise.resolve(r).then((function(a){e({value:a,done:t})}),a)})(r,c,(a=e[t](a)).done,a.value)}))}}}function w(e,a){return Object.defineProperty?Object.defineProperty(e,"raw",{value:a}):e.raw=a,e}function I(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a}function _(e){return e&&e.__esModule?e:{default:e}}function E(e,a){if(!a.has(e))throw new TypeError("attempted to get private field on non-instance");return a.get(e)}function N(e,a,t){if(!a.has(e))throw new TypeError("attempted to set private field on non-instance");return a.set(e,t),t}},49083:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.PINO_CUSTOM_CONTEXT_KEY=a.PINO_LOGGER_DEFAULTS=void 0,a.PINO_LOGGER_DEFAULTS={level:"info"},a.PINO_CUSTOM_CONTEXT_KEY="custom_context"},21581:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.pino=void 0;var r=t(28959),c=r.__importDefault(t(32656));Object.defineProperty(a,"pino",{enumerable:!0,get:function(){return c.default}}),r.__exportStar(t(49083),a),r.__exportStar(t(49889),a)},49889:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.generateChildLogger=a.formatChildLoggerContext=a.getLoggerContext=a.setBrowserLoggerContext=a.getBrowserLoggerContext=a.getDefaultLoggerOptions=void 0;var r=t(49083);function c(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.PINO_CUSTOM_CONTEXT_KEY;return e[a]||""}function n(e,a){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.PINO_CUSTOM_CONTEXT_KEY;return e[t]=a,e}function d(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.PINO_CUSTOM_CONTEXT_KEY;return"undefined"===typeof e.bindings?c(e,a):e.bindings().context||""}function o(e,a){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.PINO_CUSTOM_CONTEXT_KEY,c=d(e,t),n=c.trim()?"".concat(c,"/").concat(a):a;return n}a.getDefaultLoggerOptions=function(e){return Object.assign(Object.assign({},e),{level:(null===e||void 0===e?void 0:e.level)||r.PINO_LOGGER_DEFAULTS.level})},a.getBrowserLoggerContext=c,a.setBrowserLoggerContext=n,a.getLoggerContext=d,a.formatChildLoggerContext=o,a.generateChildLogger=function(e,a){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.PINO_CUSTOM_CONTEXT_KEY,c=o(e,a,t),d=e.child({context:c});return n(d,c,t)}},28959:function(e,a,t){"use strict";t.r(a),t.d(a,{__assign:function(){return n},__asyncDelegator:function(){return y},__asyncGenerator:function(){return g},__asyncValues:function(){return k},__await:function(){return v},__awaiter:function(){return s},__classPrivateFieldGet:function(){return E},__classPrivateFieldSet:function(){return N},__createBinding:function(){return l},__decorate:function(){return o},__exportStar:function(){return u},__extends:function(){return c},__generator:function(){return b},__importDefault:function(){return _},__importStar:function(){return I},__makeTemplateObject:function(){return w},__metadata:function(){return i},__param:function(){return f},__read:function(){return x},__rest:function(){return d},__spread:function(){return p},__spreadArrays:function(){return m},__values:function(){return h}});var r=function(e,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},r(e,a)};function c(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}var n=function(){return n=Object.assign||function(e){for(var a,t=1,r=arguments.length;t=0;o--)(c=e[o])&&(d=(n<3?c(d):n>3?c(a,t,d):c(a,t))||d);return n>3&&d&&Object.defineProperty(a,t,d),d}function f(e,a){return function(t,r){a(t,r,e)}}function i(e,a){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,a)}function s(e,a,t,r){return new(t||(t=Promise))((function(c,n){function d(e){try{f(r.next(e))}catch(a){n(a)}}function o(e){try{f(r.throw(e))}catch(a){n(a)}}function f(e){var a;e.done?c(e.value):(a=e.value,a instanceof t?a:new t((function(e){e(a)}))).then(d,o)}f((r=r.apply(e,a||[])).next())}))}function b(e,a){var t,r,c,n,d={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;d;)try{if(t=1,r&&(c=2&n[0]?r.return:n[0]?r.throw||((c=r.return)&&c.call(r),0):r.next)&&!(c=c.call(r,n[1])).done)return c;switch(r=0,c&&(n=[2&n[0],c.value]),n[0]){case 0:case 1:c=n;break;case 4:return d.label++,{value:n[1],done:!1};case 5:d.label++,r=n[1],n=[0];continue;case 7:n=d.ops.pop(),d.trys.pop();continue;default:if(!(c=(c=d.trys).length>0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,a){var t="function"===typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,c,n=t.call(e),d=[];try{for(;(void 0===a||a-- >0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d}function p(){for(var e=[],a=0;a1||o(e,a)}))})}function o(e,a){try{(t=c[e](a)).value instanceof v?Promise.resolve(t.value.v).then(f,i):s(n[0][2],t)}catch(r){s(n[0][3],r)}var t}function f(e){o("next",e)}function i(e){o("throw",e)}function s(e,a){e(a),n.shift(),n.length&&o(n[0][0],n[0][1])}}function y(e){var a,t;return a={},r("next"),r("throw",(function(e){throw e})),r("return"),a[Symbol.iterator]=function(){return this},a;function r(r,c){a[r]=e[r]?function(a){return(t=!t)?{value:v(e[r](a)),done:"return"===r}:c?c(a):a}:c}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a,t=e[Symbol.asyncIterator];return t?t.call(e):(e=h(e),a={},r("next"),r("throw"),r("return"),a[Symbol.asyncIterator]=function(){return this},a);function r(t){a[t]=e[t]&&function(a){return new Promise((function(r,c){(function(e,a,t,r){Promise.resolve(r).then((function(a){e({value:a,done:t})}),a)})(r,c,(a=e[t](a)).done,a.value)}))}}}function w(e,a){return Object.defineProperty?Object.defineProperty(e,"raw",{value:a}):e.raw=a,e}function I(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a}function _(e){return e&&e.__esModule?e:{default:e}}function E(e,a){if(!a.has(e))throw new TypeError("attempted to get private field on non-instance");return a.get(e)}function N(e,a,t){if(!a.has(e))throw new TypeError("attempted to set private field on non-instance");return a.set(e,t),t}},2023:function(){},6584:function(){},75457:function(e,a,t){"use strict";t.d(a,{D:function(){return r},u:function(){return c}});function r(e){if("string"!==typeof e)throw new Error("Cannot safe json parse value of type ".concat(typeof e));try{return function(e){var a=e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(a,(function(e,a){return"string"===typeof a&&a.match(/^\d+n$/)?BigInt(a.substring(0,a.length-1)):a}))}(e)}catch(a){return e}}function c(e){return"string"===typeof e?e:(a=e,JSON.stringify(a,(function(e,a){return"bigint"===typeof a?a.toString()+"n":a}))||"");var a}},80060:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(33170);r.__exportStar(t(22505),a),r.__exportStar(t(39614),a)},22505:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ONE_THOUSAND=a.ONE_HUNDRED=void 0,a.ONE_HUNDRED=100,a.ONE_THOUSAND=1e3},39614:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.ONE_YEAR=a.FOUR_WEEKS=a.THREE_WEEKS=a.TWO_WEEKS=a.ONE_WEEK=a.THIRTY_DAYS=a.SEVEN_DAYS=a.FIVE_DAYS=a.THREE_DAYS=a.ONE_DAY=a.TWENTY_FOUR_HOURS=a.TWELVE_HOURS=a.SIX_HOURS=a.THREE_HOURS=a.ONE_HOUR=a.SIXTY_MINUTES=a.THIRTY_MINUTES=a.TEN_MINUTES=a.FIVE_MINUTES=a.ONE_MINUTE=a.SIXTY_SECONDS=a.THIRTY_SECONDS=a.TEN_SECONDS=a.FIVE_SECONDS=a.ONE_SECOND=void 0,a.ONE_SECOND=1,a.FIVE_SECONDS=5,a.TEN_SECONDS=10,a.THIRTY_SECONDS=30,a.SIXTY_SECONDS=60,a.ONE_MINUTE=a.SIXTY_SECONDS,a.FIVE_MINUTES=5*a.ONE_MINUTE,a.TEN_MINUTES=10*a.ONE_MINUTE,a.THIRTY_MINUTES=30*a.ONE_MINUTE,a.SIXTY_MINUTES=60*a.ONE_MINUTE,a.ONE_HOUR=a.SIXTY_MINUTES,a.THREE_HOURS=3*a.ONE_HOUR,a.SIX_HOURS=6*a.ONE_HOUR,a.TWELVE_HOURS=12*a.ONE_HOUR,a.TWENTY_FOUR_HOURS=24*a.ONE_HOUR,a.ONE_DAY=a.TWENTY_FOUR_HOURS,a.THREE_DAYS=3*a.ONE_DAY,a.FIVE_DAYS=5*a.ONE_DAY,a.SEVEN_DAYS=7*a.ONE_DAY,a.THIRTY_DAYS=30*a.ONE_DAY,a.ONE_WEEK=a.SEVEN_DAYS,a.TWO_WEEKS=2*a.ONE_WEEK,a.THREE_WEEKS=3*a.ONE_WEEK,a.FOUR_WEEKS=4*a.ONE_WEEK,a.ONE_YEAR=365*a.ONE_DAY},63182:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(33170);r.__exportStar(t(86100),a),r.__exportStar(t(50706),a),r.__exportStar(t(29443),a),r.__exportStar(t(80060),a)},29443:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),t(33170).__exportStar(t(86596),a)},86596:function(e,a,t){"use strict";var r=t(89728).default,c=t(56690).default;Object.defineProperty(a,"__esModule",{value:!0}),a.IWatch=void 0;var n=r((function e(){c(this,e)}));a.IWatch=n},17355:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.fromMiliseconds=a.toMiliseconds=void 0;var r=t(80060);a.toMiliseconds=function(e){return e*r.ONE_THOUSAND},a.fromMiliseconds=function(e){return Math.floor(e/r.ONE_THOUSAND)}},83900:function(e,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.delay=void 0,a.delay=function(e){return new Promise((function(a){setTimeout((function(){a(!0)}),e)}))}},86100:function(e,a,t){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=t(33170);r.__exportStar(t(83900),a),r.__exportStar(t(17355),a)},50706:function(e,a,t){"use strict";var r=t(56690).default,c=t(89728).default;Object.defineProperty(a,"__esModule",{value:!0}),a.Watch=void 0;var n=function(){function e(){r(this,e),this.timestamps=new Map}return c(e,[{key:"start",value:function(e){if(this.timestamps.has(e))throw new Error("Watch already started for label: ".concat(e));this.timestamps.set(e,{started:Date.now()})}},{key:"stop",value:function(e){var a=this.get(e);if("undefined"!==typeof a.elapsed)throw new Error("Watch already stopped for label: ".concat(e));var t=Date.now()-a.started;this.timestamps.set(e,{started:a.started,elapsed:t})}},{key:"get",value:function(e){var a=this.timestamps.get(e);if("undefined"===typeof a)throw new Error("No timestamp found for label: ".concat(e));return a}},{key:"elapsed",value:function(e){var a=this.get(e),t=a.elapsed||Date.now()-a.started;return t}}]),e}();a.Watch=n,a.default=n},33170:function(e,a,t){"use strict";t.r(a),t.d(a,{__assign:function(){return n},__asyncDelegator:function(){return y},__asyncGenerator:function(){return g},__asyncValues:function(){return k},__await:function(){return v},__awaiter:function(){return s},__classPrivateFieldGet:function(){return E},__classPrivateFieldSet:function(){return N},__createBinding:function(){return l},__decorate:function(){return o},__exportStar:function(){return u},__extends:function(){return c},__generator:function(){return b},__importDefault:function(){return _},__importStar:function(){return I},__makeTemplateObject:function(){return w},__metadata:function(){return i},__param:function(){return f},__read:function(){return x},__rest:function(){return d},__spread:function(){return p},__spreadArrays:function(){return m},__values:function(){return h}});var r=function(e,a){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},r(e,a)};function c(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}var n=function(){return n=Object.assign||function(e){for(var a,t=1,r=arguments.length;t=0;o--)(c=e[o])&&(d=(n<3?c(d):n>3?c(a,t,d):c(a,t))||d);return n>3&&d&&Object.defineProperty(a,t,d),d}function f(e,a){return function(t,r){a(t,r,e)}}function i(e,a){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,a)}function s(e,a,t,r){return new(t||(t=Promise))((function(c,n){function d(e){try{f(r.next(e))}catch(a){n(a)}}function o(e){try{f(r.throw(e))}catch(a){n(a)}}function f(e){var a;e.done?c(e.value):(a=e.value,a instanceof t?a:new t((function(e){e(a)}))).then(d,o)}f((r=r.apply(e,a||[])).next())}))}function b(e,a){var t,r,c,n,d={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"===typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;d;)try{if(t=1,r&&(c=2&n[0]?r.return:n[0]?r.throw||((c=r.return)&&c.call(r),0):r.next)&&!(c=c.call(r,n[1])).done)return c;switch(r=0,c&&(n=[2&n[0],c.value]),n[0]){case 0:case 1:c=n;break;case 4:return d.label++,{value:n[1],done:!1};case 5:d.label++,r=n[1],n=[0];continue;case 7:n=d.ops.pop(),d.trys.pop();continue;default:if(!(c=(c=d.trys).length>0&&c[c.length-1])&&(6===n[0]||2===n[0])){d=0;continue}if(3===n[0]&&(!c||n[1]>c[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,a){var t="function"===typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,c,n=t.call(e),d=[];try{for(;(void 0===a||a-- >0)&&!(r=n.next()).done;)d.push(r.value)}catch(o){c={error:o}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(c)throw c.error}}return d}function p(){for(var e=[],a=0;a1||o(e,a)}))})}function o(e,a){try{(t=c[e](a)).value instanceof v?Promise.resolve(t.value.v).then(f,i):s(n[0][2],t)}catch(r){s(n[0][3],r)}var t}function f(e){o("next",e)}function i(e){o("throw",e)}function s(e,a){e(a),n.shift(),n.length&&o(n[0][0],n[0][1])}}function y(e){var a,t;return a={},r("next"),r("throw",(function(e){throw e})),r("return"),a[Symbol.iterator]=function(){return this},a;function r(r,c){a[r]=e[r]?function(a){return(t=!t)?{value:v(e[r](a)),done:"return"===r}:c?c(a):a}:c}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a,t=e[Symbol.asyncIterator];return t?t.call(e):(e=h(e),a={},r("next"),r("throw"),r("return"),a[Symbol.asyncIterator]=function(){return this},a);function r(t){a[t]=e[t]&&function(a){return new Promise((function(r,c){(function(e,a,t,r){Promise.resolve(r).then((function(a){e({value:a,done:t})}),a)})(r,c,(a=e[t](a)).done,a.value)}))}}}function w(e,a){return Object.defineProperty?Object.defineProperty(e,"raw",{value:a}):e.raw=a,e}function I(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a}function _(e){return e&&e.__esModule?e:{default:e}}function E(e,a){if(!a.has(e))throw new TypeError("attempted to get private field on non-instance");return a.get(e)}function N(e,a,t){if(!a.has(e))throw new TypeError("attempted to set private field on non-instance");return a.set(e,t),t}},29808:function(e,a){"use strict";function t(e){var a=void 0;return"undefined"!==typeof window&&"undefined"!==typeof window[e]&&(a=window[e]),a}function r(e){var a=t(e);if(!a)throw new Error("".concat(e," is not defined in Window"));return a}Object.defineProperty(a,"__esModule",{value:!0}),a.getLocalStorage=a.getLocalStorageOrThrow=a.getCrypto=a.getCryptoOrThrow=a.getLocation=a.getLocationOrThrow=a.getNavigator=a.getNavigatorOrThrow=a.getDocument=a.getDocumentOrThrow=a.getFromWindowOrThrow=a.getFromWindow=void 0,a.getFromWindow=t,a.getFromWindowOrThrow=r,a.getDocumentOrThrow=function(){return r("document")},a.getDocument=function(){return t("document")},a.getNavigatorOrThrow=function(){return r("navigator")},a.getNavigator=function(){return t("navigator")},a.getLocationOrThrow=function(){return r("location")},a.getLocation=function(){return t("location")},a.getCryptoOrThrow=function(){return r("crypto")},a.getCrypto=function(){return t("crypto")},a.getLocalStorageOrThrow=function(){return r("localStorage")},a.getLocalStorage=function(){return t("localStorage")}},37296:function(e,a,t){"use strict";a.D=void 0;var r=t(29808);a.D=function(){var e,a;try{e=r.getDocumentOrThrow(),a=r.getLocationOrThrow()}catch(n){return null}function t(){for(var a=arguments.length,t=new Array(a),r=0;r-1){var o=n.getAttribute("href");if(o)if(-1===o.toLowerCase().indexOf("https:")&&-1===o.toLowerCase().indexOf("http:")&&0!==o.indexOf("//")){var f=a.protocol+"//"+a.host;if(0===o.indexOf("/"))f+=o;else{var i=a.pathname.split("/");i.pop(),f+=i.join("/")+"/"+o}r.push(f)}else if(0===o.indexOf("//")){var s=a.protocol+o;r.push(s)}else r.push(o)}}return r}(),name:c}}},5442:function(e,a,t){var r,c;r=function(){"use strict";function e(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}function a(e,a){for(var t=0;t1;)a.push(i(a[a.length-1]));return a}function i(e){return e.reduce((function(e,a,t,r){return t%2===0&&e.push(o(a,r[t+1])),e}),[])}var s=function(){"use strict";function e(a){if(r(this,e),!a.every((function(e){return 32===e.length&&n.isBuffer(e)})))throw new Error("elements must be 32 byte buffers");var t,c={elements:(t=a,t.filter((function(e,a){return t.findIndex((function(a){return a.equals(e)}))===a})))};Object.assign(this,c),this.elements.sort(n.compare);var d={layers:f(this.elements)};Object.assign(this,d)}return c(e,[{key:"getRoot",value:function(){if(!this.root){var e={root:this.layers[this.layers.length-1][0]};Object.assign(this,e)}return this.root}},{key:"verify",value:function(e,a){return this.getRoot().equals(e.reduce((function(e,a){return o(e,a)}),a))}},{key:"proof",value:function(e){var a=this.elements.findIndex((function(a){return a.equals(e)}));if(-1===a)throw new Error("element not found in merkle tree");return this.layers.reduce((function(e,t){var r=function(e,a){var t=e%2?e-1:e+1;return to[e]||console.log.apply(console,a)}function s(){for(var e=[],a=0;a>4]+f[15&r])}return a.join("")}}),b={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],u=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],x=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],v=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],y=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],k=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],w=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],I=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],_=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],N=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function H(e){for(var a=[],t=0;t>2][a%4]=n[a],this._Kd[e-t][a%4]=n[a];for(var d,o=0,f=c;f>16&255]<<24^u[d>>8&255]<<16^u[255&d]<<8^u[d>>24&255]^l[o]<<24,o+=1,8!=c)for(a=1;a>8&255]<<8^u[d>>16&255]<<16^u[d>>24&255]<<24,a=c/2+1;a>2][s=f%4]=n[a],this._Kd[e-i][s]=n[a++],f++}for(var i=1;i>24&255]^_[d>>16&255]^E[d>>8&255]^N[255&d]},S.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var a=this._Ke.length-1,t=[0,0,0,0],r=H(e),c=0;c<4;c++)r[c]^=this._Ke[0][c];for(var n=1;n>24&255]^p[r[(c+1)%4]>>16&255]^m[r[(c+2)%4]>>8&255]^v[255&r[(c+3)%4]]^this._Ke[n][c];r=t.slice()}var o,f=d(16);for(c=0;c<4;c++)o=this._Ke[a][c],f[4*c]=255&(u[r[c]>>24&255]^o>>24),f[4*c+1]=255&(u[r[(c+1)%4]>>16&255]^o>>16),f[4*c+2]=255&(u[r[(c+2)%4]>>8&255]^o>>8),f[4*c+3]=255&(u[255&r[(c+3)%4]]^o);return f},S.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var a=this._Kd.length-1,t=[0,0,0,0],r=H(e),c=0;c<4;c++)r[c]^=this._Kd[0][c];for(var n=1;n>24&255]^y[r[(c+3)%4]>>16&255]^k[r[(c+2)%4]>>8&255]^w[255&r[(c+1)%4]]^this._Kd[n][c];r=t.slice()}var o,f=d(16);for(c=0;c<4;c++)o=this._Kd[a][c],f[4*c]=255&(h[r[c]>>24&255]^o>>24),f[4*c+1]=255&(h[r[(c+3)%4]>>16&255]^o>>16),f[4*c+2]=255&(h[r[(c+2)%4]>>8&255]^o>>8),f[4*c+3]=255&(h[255&r[(c+1)%4]]^o);return f};var A=function e(a){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new S(a)};A.prototype.encrypt=function(e){if((e=n(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var a=d(e.length),t=d(16),r=0;r>=8},O.prototype.setBytes=function(e){if(16!=(e=n(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},O.prototype.increment=function(){for(var e=15;0<=e;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var C=function e(a,t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof O||(t=new O(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new S(a)};C.prototype.encrypt=function(e){for(var a=n(e,!0),t=0;t>>26-o&67108863,26<=(o+=24)&&(o-=26,c++);else if("le"===t)for(c=d=0;d>>26-o&67108863,26<=(o+=24)&&(o-=26,c++);return this.strip()},n.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var r=0;r>>26):n+=8;else for(r=(e.length-a)%2==0?a+1:a;r>>26):n+=8;this.strip()},n.prototype._parseBase=function(e,a,t){this.words=[0];for(var r=0,c=this.length=1;c<=67108863;c*=a)r++;c=c/a|0;for(var n=e.length-t,d=n%--r,o=Math.min(n,n-d)+t,f=0,s=t;s"};var s=["","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"],b=[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],l=[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 u(e,a,t){t.negative=a.negative^e.negative;var r=e.length+a.length|0,c=(r=(t.length=r)-1|0,(d=(0|e.words[0])*(0|a.words[0]))/67108864|0);t.words[0]=67108863&d;for(var n=1;n>>26,f=67108863&c,i=Math.min(n,a.length-1),s=Math.max(0,n-e.length+1);s<=i;s++)o+=(d=(0|e.words[n-s|0])*(0|a.words[s])+f)/67108864|0,f=67108863&d;t.words[n]=0|f,c=0|o}return 0!==c?t.words[n]=0|c:t.length--,t.strip()}n.prototype.toString=function(e,a){if(a=0|a||1,16===(e=e||10)||"hex"===e){f="";for(var t=0,c=0,n=0;n>>24-t&16777215)||n!==this.length-1?s[6-o.length]+o+f:o+f;26<=(t+=2)&&(t-=26,n--)}for(0!==c&&(f=c.toString(16)+f);f.length%a!=0;)f="0"+f;return 0!==this.negative?"-"+f:f}if(e===(0|e)&&2<=e&&e<=36){var i=b[e],u=l[e];for(f="",(h=this.clone()).negative=0;!h.isZero();){var h,x=h.modn(u).toString(e);f=(h=h.idivn(u)).isZero()?x+f:s[i-x.length]+x+f}for(this.isZero()&&(f="0"+f);f.length%a!=0;)f="0"+f;return 0!==this.negative?"-"+f:f}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2>>=13),64<=a&&(e+=7,a>>>=7),8<=a&&(e+=4,a>>>=4),2<=a&&(e+=2,a>>>=2),e+a},n.prototype._zeroBits=function(e){if(0===e)return 26;var a=e;return e=0,0==(8191&a)&&(e+=13,a>>>=13),0==(127&a)&&(e+=7,a>>>=7),0==(15&a)&&(e+=4,a>>>=4),0==(3&a)&&(e+=2,a>>>=2),0==(1&a)&&e++,e},n.prototype.bitLength=function(){var e=this.words[this.length-1];return e=this._countBits(e),26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},n.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},n.prototype.iuand=function(e){for(var a=this.length>e.length?e:this,t=0;te.length?this.clone().iand(e):e.clone().iand(this)},n.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},n.prototype.iuxor=function(e){for(var a,t=this.length>e.length?(a=this,e):(a=e,this),r=0;re.length?this.clone().ixor(e):e.clone().ixor(this)},n.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},n.prototype.inotn=function(e){r("number"==typeof e&&0<=e);var a=0|Math.ceil(e/26);e%=26,this._expand(a),0>26-e),this.strip()},n.prototype.notn=function(e){return this.clone().inotn(e)},n.prototype.setn=function(e,a){r("number"==typeof e&&0<=e);var t=e/26|0;return e%=26,this._expand(1+t),this.words[t]=a?this.words[t]|1<e.length?(t=this,e):(t=e,this),c=0,n=0;n>>26;for(;0!==c&&n>>26;if(this.length=t.length,0!==c)this.words[this.length]=c,this.length++;else if(t!==this)for(;ne.length?this.clone().iadd(e):e.clone().iadd(this)},n.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var c=0>26,this.words[d]=67108863&a;for(;0!==n&&d>26,this.words[d]=67108863&a;if(0===n&&d>>13,s=8191&(V=0|n[1]),b=V>>>13,l=8191&(W=0|n[2]),u=W>>>13,h=8191&(r=0|n[3]),x=r>>>13,p=8191&(K=0|n[4]),m=K>>>13,v=8191&(G=0|n[5]),g=G>>>13,y=8191&(c=0|n[6]),k=c>>>13,w=8191&(Y=0|n[7]),I=Y>>>13,_=8191&($=0|n[8]),E=$>>>13,N=8191&(X=0|n[9]),H=X>>>13,S=8191&(J=0|d[0]),A=J>>>13,M=0|d[1],T=8191&M,P=M>>>13,O=0|d[2],C=8191&O,R=O>>>13,D=8191&(Q=0|d[3]),j=Q>>>13,L=0|d[4],B=8191&L,F=L>>>13,Z=0|d[5],U=8191&Z,z=Z>>>13,q=0|d[6],V=8191&q,W=q>>>13,K=8191&(r=0|d[7]),G=r>>>13,Y=8191&(c=0|d[8]),$=c>>>13,X=8191&(n=0|d[9]),J=n>>>13;t.negative=e.negative^a.negative,t.length=19;var Q=(0+Math.imul(f,S)|0)+((8191&(O=(O=Math.imul(f,A))+Math.imul(i,S)|0))<<13)|0,ee=((L=Math.imul(i,A))+(O>>>13)|0)+(Q>>>26)|0;return Q&=67108863,M=Math.imul(s,S),O=(O=Math.imul(s,A))+Math.imul(b,S)|0,L=Math.imul(b,A),Z=(ee+(M+Math.imul(f,T)|0)|0)+((8191&(O=(O=O+Math.imul(f,P)|0)+Math.imul(i,T)|0))<<13)|0,ee=((L=L+Math.imul(i,P)|0)+(O>>>13)|0)+(Z>>>26)|0,Z&=67108863,M=Math.imul(l,S),O=(O=Math.imul(l,A))+Math.imul(u,S)|0,L=Math.imul(u,A),M=M+Math.imul(s,T)|0,O=(O=O+Math.imul(s,P)|0)+Math.imul(b,T)|0,L=L+Math.imul(b,P)|0,q=(ee+(M+Math.imul(f,C)|0)|0)+((8191&(O=(O=O+Math.imul(f,R)|0)+Math.imul(i,C)|0))<<13)|0,ee=((L=L+Math.imul(i,R)|0)+(O>>>13)|0)+(q>>>26)|0,q&=67108863,M=Math.imul(h,S),O=(O=Math.imul(h,A))+Math.imul(x,S)|0,L=Math.imul(x,A),M=M+Math.imul(l,T)|0,O=(O=O+Math.imul(l,P)|0)+Math.imul(u,T)|0,L=L+Math.imul(u,P)|0,M=M+Math.imul(s,C)|0,O=(O=O+Math.imul(s,R)|0)+Math.imul(b,C)|0,L=L+Math.imul(b,R)|0,r=(ee+(M+Math.imul(f,D)|0)|0)+((8191&(O=(O=O+Math.imul(f,j)|0)+Math.imul(i,D)|0))<<13)|0,ee=((L=L+Math.imul(i,j)|0)+(O>>>13)|0)+(r>>>26)|0,r&=67108863,M=Math.imul(p,S),O=(O=Math.imul(p,A))+Math.imul(m,S)|0,L=Math.imul(m,A),M=M+Math.imul(h,T)|0,O=(O=O+Math.imul(h,P)|0)+Math.imul(x,T)|0,L=L+Math.imul(x,P)|0,M=M+Math.imul(l,C)|0,O=(O=O+Math.imul(l,R)|0)+Math.imul(u,C)|0,L=L+Math.imul(u,R)|0,M=M+Math.imul(s,D)|0,O=(O=O+Math.imul(s,j)|0)+Math.imul(b,D)|0,L=L+Math.imul(b,j)|0,c=(ee+(M+Math.imul(f,B)|0)|0)+((8191&(O=(O=O+Math.imul(f,F)|0)+Math.imul(i,B)|0))<<13)|0,ee=((L=L+Math.imul(i,F)|0)+(O>>>13)|0)+(c>>>26)|0,c&=67108863,M=Math.imul(v,S),O=(O=Math.imul(v,A))+Math.imul(g,S)|0,L=Math.imul(g,A),M=M+Math.imul(p,T)|0,O=(O=O+Math.imul(p,P)|0)+Math.imul(m,T)|0,L=L+Math.imul(m,P)|0,M=M+Math.imul(h,C)|0,O=(O=O+Math.imul(h,R)|0)+Math.imul(x,C)|0,L=L+Math.imul(x,R)|0,M=M+Math.imul(l,D)|0,O=(O=O+Math.imul(l,j)|0)+Math.imul(u,D)|0,L=L+Math.imul(u,j)|0,M=M+Math.imul(s,B)|0,O=(O=O+Math.imul(s,F)|0)+Math.imul(b,B)|0,L=L+Math.imul(b,F)|0,d=(ee+(M+Math.imul(f,U)|0)|0)+((8191&(O=(O=O+Math.imul(f,z)|0)+Math.imul(i,U)|0))<<13)|0,ee=((L=L+Math.imul(i,z)|0)+(O>>>13)|0)+(d>>>26)|0,d&=67108863,M=Math.imul(y,S),O=(O=Math.imul(y,A))+Math.imul(k,S)|0,L=Math.imul(k,A),M=M+Math.imul(v,T)|0,O=(O=O+Math.imul(v,P)|0)+Math.imul(g,T)|0,L=L+Math.imul(g,P)|0,M=M+Math.imul(p,C)|0,O=(O=O+Math.imul(p,R)|0)+Math.imul(m,C)|0,L=L+Math.imul(m,R)|0,M=M+Math.imul(h,D)|0,O=(O=O+Math.imul(h,j)|0)+Math.imul(x,D)|0,L=L+Math.imul(x,j)|0,M=M+Math.imul(l,B)|0,O=(O=O+Math.imul(l,F)|0)+Math.imul(u,B)|0,L=L+Math.imul(u,F)|0,M=M+Math.imul(s,U)|0,O=(O=O+Math.imul(s,z)|0)+Math.imul(b,U)|0,L=L+Math.imul(b,z)|0,n=(ee+(M+Math.imul(f,V)|0)|0)+((8191&(O=(O=O+Math.imul(f,W)|0)+Math.imul(i,V)|0))<<13)|0,ee=((L=L+Math.imul(i,W)|0)+(O>>>13)|0)+(n>>>26)|0,n&=67108863,M=Math.imul(w,S),O=(O=Math.imul(w,A))+Math.imul(I,S)|0,L=Math.imul(I,A),M=M+Math.imul(y,T)|0,O=(O=O+Math.imul(y,P)|0)+Math.imul(k,T)|0,L=L+Math.imul(k,P)|0,M=M+Math.imul(v,C)|0,O=(O=O+Math.imul(v,R)|0)+Math.imul(g,C)|0,L=L+Math.imul(g,R)|0,M=M+Math.imul(p,D)|0,O=(O=O+Math.imul(p,j)|0)+Math.imul(m,D)|0,L=L+Math.imul(m,j)|0,M=M+Math.imul(h,B)|0,O=(O=O+Math.imul(h,F)|0)+Math.imul(x,B)|0,L=L+Math.imul(x,F)|0,M=M+Math.imul(l,U)|0,O=(O=O+Math.imul(l,z)|0)+Math.imul(u,U)|0,L=L+Math.imul(u,z)|0,M=M+Math.imul(s,V)|0,O=(O=O+Math.imul(s,W)|0)+Math.imul(b,V)|0,L=L+Math.imul(b,W)|0,e=(ee+(M+Math.imul(f,K)|0)|0)+((8191&(O=(O=O+Math.imul(f,G)|0)+Math.imul(i,K)|0))<<13)|0,ee=((L=L+Math.imul(i,G)|0)+(O>>>13)|0)+(e>>>26)|0,e&=67108863,M=Math.imul(_,S),O=(O=Math.imul(_,A))+Math.imul(E,S)|0,L=Math.imul(E,A),M=M+Math.imul(w,T)|0,O=(O=O+Math.imul(w,P)|0)+Math.imul(I,T)|0,L=L+Math.imul(I,P)|0,M=M+Math.imul(y,C)|0,O=(O=O+Math.imul(y,R)|0)+Math.imul(k,C)|0,L=L+Math.imul(k,R)|0,M=M+Math.imul(v,D)|0,O=(O=O+Math.imul(v,j)|0)+Math.imul(g,D)|0,L=L+Math.imul(g,j)|0,M=M+Math.imul(p,B)|0,O=(O=O+Math.imul(p,F)|0)+Math.imul(m,B)|0,L=L+Math.imul(m,F)|0,M=M+Math.imul(h,U)|0,O=(O=O+Math.imul(h,z)|0)+Math.imul(x,U)|0,L=L+Math.imul(x,z)|0,M=M+Math.imul(l,V)|0,O=(O=O+Math.imul(l,W)|0)+Math.imul(u,V)|0,L=L+Math.imul(u,W)|0,M=M+Math.imul(s,K)|0,O=(O=O+Math.imul(s,G)|0)+Math.imul(b,K)|0,L=L+Math.imul(b,G)|0,a=(ee+(M+Math.imul(f,Y)|0)|0)+((8191&(O=(O=O+Math.imul(f,$)|0)+Math.imul(i,Y)|0))<<13)|0,ee=((L=L+Math.imul(i,$)|0)+(O>>>13)|0)+(a>>>26)|0,a&=67108863,M=Math.imul(N,S),O=(O=Math.imul(N,A))+Math.imul(H,S)|0,L=Math.imul(H,A),M=M+Math.imul(_,T)|0,O=(O=O+Math.imul(_,P)|0)+Math.imul(E,T)|0,L=L+Math.imul(E,P)|0,M=M+Math.imul(w,C)|0,O=(O=O+Math.imul(w,R)|0)+Math.imul(I,C)|0,L=L+Math.imul(I,R)|0,M=M+Math.imul(y,D)|0,O=(O=O+Math.imul(y,j)|0)+Math.imul(k,D)|0,L=L+Math.imul(k,j)|0,M=M+Math.imul(v,B)|0,O=(O=O+Math.imul(v,F)|0)+Math.imul(g,B)|0,L=L+Math.imul(g,F)|0,M=M+Math.imul(p,U)|0,O=(O=O+Math.imul(p,z)|0)+Math.imul(m,U)|0,L=L+Math.imul(m,z)|0,M=M+Math.imul(h,V)|0,O=(O=O+Math.imul(h,W)|0)+Math.imul(x,V)|0,L=L+Math.imul(x,W)|0,M=M+Math.imul(l,K)|0,O=(O=O+Math.imul(l,G)|0)+Math.imul(u,K)|0,L=L+Math.imul(u,G)|0,M=M+Math.imul(s,Y)|0,O=(O=O+Math.imul(s,$)|0)+Math.imul(b,Y)|0,L=L+Math.imul(b,$)|0,f=(ee+(M+Math.imul(f,X)|0)|0)+((8191&(O=(O=O+Math.imul(f,J)|0)+Math.imul(i,X)|0))<<13)|0,ee=((L=L+Math.imul(i,J)|0)+(O>>>13)|0)+(f>>>26)|0,f&=67108863,M=Math.imul(N,T),O=(O=Math.imul(N,P))+Math.imul(H,T)|0,L=Math.imul(H,P),M=M+Math.imul(_,C)|0,O=(O=O+Math.imul(_,R)|0)+Math.imul(E,C)|0,L=L+Math.imul(E,R)|0,M=M+Math.imul(w,D)|0,O=(O=O+Math.imul(w,j)|0)+Math.imul(I,D)|0,L=L+Math.imul(I,j)|0,M=M+Math.imul(y,B)|0,O=(O=O+Math.imul(y,F)|0)+Math.imul(k,B)|0,L=L+Math.imul(k,F)|0,M=M+Math.imul(v,U)|0,O=(O=O+Math.imul(v,z)|0)+Math.imul(g,U)|0,L=L+Math.imul(g,z)|0,M=M+Math.imul(p,V)|0,O=(O=O+Math.imul(p,W)|0)+Math.imul(m,V)|0,L=L+Math.imul(m,W)|0,M=M+Math.imul(h,K)|0,O=(O=O+Math.imul(h,G)|0)+Math.imul(x,K)|0,L=L+Math.imul(x,G)|0,M=M+Math.imul(l,Y)|0,O=(O=O+Math.imul(l,$)|0)+Math.imul(u,Y)|0,L=L+Math.imul(u,$)|0,s=(ee+(M+Math.imul(s,X)|0)|0)+((8191&(O=(O=O+Math.imul(s,J)|0)+Math.imul(b,X)|0))<<13)|0,ee=((L=L+Math.imul(b,J)|0)+(O>>>13)|0)+(s>>>26)|0,s&=67108863,M=Math.imul(N,C),O=(O=Math.imul(N,R))+Math.imul(H,C)|0,L=Math.imul(H,R),M=M+Math.imul(_,D)|0,O=(O=O+Math.imul(_,j)|0)+Math.imul(E,D)|0,L=L+Math.imul(E,j)|0,M=M+Math.imul(w,B)|0,O=(O=O+Math.imul(w,F)|0)+Math.imul(I,B)|0,L=L+Math.imul(I,F)|0,M=M+Math.imul(y,U)|0,O=(O=O+Math.imul(y,z)|0)+Math.imul(k,U)|0,L=L+Math.imul(k,z)|0,M=M+Math.imul(v,V)|0,O=(O=O+Math.imul(v,W)|0)+Math.imul(g,V)|0,L=L+Math.imul(g,W)|0,M=M+Math.imul(p,K)|0,O=(O=O+Math.imul(p,G)|0)+Math.imul(m,K)|0,L=L+Math.imul(m,G)|0,M=M+Math.imul(h,Y)|0,O=(O=O+Math.imul(h,$)|0)+Math.imul(x,Y)|0,L=L+Math.imul(x,$)|0,l=(ee+(M+Math.imul(l,X)|0)|0)+((8191&(O=(O=O+Math.imul(l,J)|0)+Math.imul(u,X)|0))<<13)|0,ee=((L=L+Math.imul(u,J)|0)+(O>>>13)|0)+(l>>>26)|0,l&=67108863,M=Math.imul(N,D),O=(O=Math.imul(N,j))+Math.imul(H,D)|0,L=Math.imul(H,j),M=M+Math.imul(_,B)|0,O=(O=O+Math.imul(_,F)|0)+Math.imul(E,B)|0,L=L+Math.imul(E,F)|0,M=M+Math.imul(w,U)|0,O=(O=O+Math.imul(w,z)|0)+Math.imul(I,U)|0,L=L+Math.imul(I,z)|0,M=M+Math.imul(y,V)|0,O=(O=O+Math.imul(y,W)|0)+Math.imul(k,V)|0,L=L+Math.imul(k,W)|0,M=M+Math.imul(v,K)|0,O=(O=O+Math.imul(v,G)|0)+Math.imul(g,K)|0,L=L+Math.imul(g,G)|0,M=M+Math.imul(p,Y)|0,O=(O=O+Math.imul(p,$)|0)+Math.imul(m,Y)|0,L=L+Math.imul(m,$)|0,h=(ee+(M+Math.imul(h,X)|0)|0)+((8191&(O=(O=O+Math.imul(h,J)|0)+Math.imul(x,X)|0))<<13)|0,ee=((L=L+Math.imul(x,J)|0)+(O>>>13)|0)+(h>>>26)|0,h&=67108863,M=Math.imul(N,B),O=(O=Math.imul(N,F))+Math.imul(H,B)|0,L=Math.imul(H,F),M=M+Math.imul(_,U)|0,O=(O=O+Math.imul(_,z)|0)+Math.imul(E,U)|0,L=L+Math.imul(E,z)|0,M=M+Math.imul(w,V)|0,O=(O=O+Math.imul(w,W)|0)+Math.imul(I,V)|0,L=L+Math.imul(I,W)|0,M=M+Math.imul(y,K)|0,O=(O=O+Math.imul(y,G)|0)+Math.imul(k,K)|0,L=L+Math.imul(k,G)|0,M=M+Math.imul(v,Y)|0,O=(O=O+Math.imul(v,$)|0)+Math.imul(g,Y)|0,L=L+Math.imul(g,$)|0,p=(ee+(M+Math.imul(p,X)|0)|0)+((8191&(O=(O=O+Math.imul(p,J)|0)+Math.imul(m,X)|0))<<13)|0,ee=((L=L+Math.imul(m,J)|0)+(O>>>13)|0)+(p>>>26)|0,p&=67108863,M=Math.imul(N,U),O=(O=Math.imul(N,z))+Math.imul(H,U)|0,L=Math.imul(H,z),M=M+Math.imul(_,V)|0,O=(O=O+Math.imul(_,W)|0)+Math.imul(E,V)|0,L=L+Math.imul(E,W)|0,M=M+Math.imul(w,K)|0,O=(O=O+Math.imul(w,G)|0)+Math.imul(I,K)|0,L=L+Math.imul(I,G)|0,M=M+Math.imul(y,Y)|0,O=(O=O+Math.imul(y,$)|0)+Math.imul(k,Y)|0,L=L+Math.imul(k,$)|0,v=(ee+(M+Math.imul(v,X)|0)|0)+((8191&(O=(O=O+Math.imul(v,J)|0)+Math.imul(g,X)|0))<<13)|0,ee=((L=L+Math.imul(g,J)|0)+(O>>>13)|0)+(v>>>26)|0,v&=67108863,M=Math.imul(N,V),O=(O=Math.imul(N,W))+Math.imul(H,V)|0,L=Math.imul(H,W),M=M+Math.imul(_,K)|0,O=(O=O+Math.imul(_,G)|0)+Math.imul(E,K)|0,L=L+Math.imul(E,G)|0,M=M+Math.imul(w,Y)|0,O=(O=O+Math.imul(w,$)|0)+Math.imul(I,Y)|0,L=L+Math.imul(I,$)|0,y=(ee+(M+Math.imul(y,X)|0)|0)+((8191&(O=(O=O+Math.imul(y,J)|0)+Math.imul(k,X)|0))<<13)|0,ee=((L=L+Math.imul(k,J)|0)+(O>>>13)|0)+(y>>>26)|0,y&=67108863,M=Math.imul(N,K),O=(O=Math.imul(N,G))+Math.imul(H,K)|0,L=Math.imul(H,G),M=M+Math.imul(_,Y)|0,O=(O=O+Math.imul(_,$)|0)+Math.imul(E,Y)|0,L=L+Math.imul(E,$)|0,w=(ee+(M+Math.imul(w,X)|0)|0)+((8191&(O=(O=O+Math.imul(w,J)|0)+Math.imul(I,X)|0))<<13)|0,ee=((L=L+Math.imul(I,J)|0)+(O>>>13)|0)+(w>>>26)|0,w&=67108863,M=Math.imul(N,Y),O=(O=Math.imul(N,$))+Math.imul(H,Y)|0,L=Math.imul(H,$),_=(ee+(M+Math.imul(_,X)|0)|0)+((8191&(O=(O=O+Math.imul(_,J)|0)+Math.imul(E,X)|0))<<13)|0,ee=((L=L+Math.imul(E,J)|0)+(O>>>13)|0)+(_>>>26)|0,_&=67108863,X=(ee+Math.imul(N,X)|0)+((8191&(O=(O=Math.imul(N,J))+Math.imul(H,X)|0))<<13)|0,ee=((L=Math.imul(H,J))+(O>>>13)|0)+(X>>>26)|0,X&=67108863,o[0]=Q,o[1]=Z,o[2]=q,o[3]=r,o[4]=c,o[5]=d,o[6]=n,o[7]=e,o[8]=a,o[9]=f,o[10]=s,o[11]=l,o[12]=h,o[13]=p,o[14]=v,o[15]=y,o[16]=w,o[17]=_,o[18]=X,0!=ee&&(o[19]=ee,t.length++),t};function x(e,a,t){return(new p).mulp(e,a,t)}function p(e,a){this.x=e,this.y=a}Math.imul||(h=u),n.prototype.mulTo=function(e,a){var t=this.length+e.length;return a=(10===this.length&&10===e.length?h:t<63?u:t<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var r=0,c=0,n=0;n>>26)|0)>>>26,d&=67108863}t.words[n]=o,r=d,d=c}return 0!==r?t.words[n]=r:t.length--,t.strip()}:x)(this,e,a),a},p.prototype.makeRBT=function(e){for(var a=new Array(e),t=n.prototype._countBits(e)-1,r=0;r>=1;return r},p.prototype.permute=function(e,a,t,r,c,n){for(var d=0;d>>=1)t++;return 1<>>=13),n>>>=13;for(d=2*a;d>=26,a+=c/67108864|0,a+=n>>>26,this.words[t]=67108863&n}return 0!==a&&(this.words[t]=a,this.length++),this},n.prototype.muln=function(e){return this.clone().imuln(e)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>r}return a}(e);if(0===a.length)return new n(1);for(var t=this,r=0;r>>26-a<<26-a;if(0!=a){for(var n=0,d=0;d>>26-a}n&&(this.words[d]=n,this.length++)}if(0!=t){for(d=this.length-1;0<=d;d--)this.words[d+t]=this.words[d];for(d=0;d>>n<d)for(this.length-=d,i=0;i>>n,s=b&o}return f&&0!==s&&(f.words[f.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(e,a,t){return r(0===this.negative),this.iushrn(e,a,t)},n.prototype.shln=function(e){return this.clone().ishln(e)},n.prototype.ushln=function(e){return this.clone().iushln(e)},n.prototype.shrn=function(e){return this.clone().ishrn(e)},n.prototype.ushrn=function(e){return this.clone().iushrn(e)},n.prototype.testn=function(e){r("number"==typeof e&&0<=e);var a=e%26;return e=(e-a)/26,!(this.length<=e)&&!!(this.words[e]&1<>>a<>26)-(f/67108864|0),this.words[d+t]=67108863&o}for(;d>26,this.words[d+t]=67108863&o;if(0===n)return this.strip();for(r(-1===n),d=n=0;d>26,this.words[d]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(e,a){var t=this.length-e.length,r=this.clone(),c=e,d=0|c.words[c.length-1];0!=(t=26-this._countBits(d))&&(c=c.ushln(t),r.iushln(t),d=0|c.words[c.length-1]);var o,f=r.length-c.length;if("mod"!==a){(o=new n(null)).length=1+f,o.words=new Array(o.length);for(var i=0;ithis.length||this.cmp(e)<0?{div:new n(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new n(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new n(this.modn(e.words[0]))}:this._wordDiv(e,a);var c,d,o},n.prototype.div=function(e){return this.divmod(e,"div",!1).div},n.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},n.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},n.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,r=e.ushrn(1);return e=e.andln(1),(r=t.cmp(r))<0||1===e&&0===r?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},n.prototype.modn=function(e){r(e<=67108863);for(var a=(1<<26)%e,t=0,c=this.length-1;0<=c;c--)t=(a*t+(0|this.words[c]))%e;return t},n.prototype.idivn=function(e){r(e<=67108863);for(var a=0,t=this.length-1;0<=t;t--){var c=(0|this.words[t])+67108864*a;this.words[t]=c/e|0,a=c%e}return this.strip()},n.prototype.divn=function(e){return this.clone().idivn(e)},n.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());for(var a=this,t=e.clone(),c=(a=0!==a.negative?a.umod(e):a.clone(),new n(1)),d=new n(0),o=new n(0),f=new n(1),i=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++i;for(var s=t.clone(),b=a.clone();!a.isZero();){for(var l=0,u=1;0==(a.words[0]&u)&&l<26;++l,u<<=1);if(0>>26,n&=67108863,this.words[c]=n}return 0!==t&&(this.words[c]=t,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(e){var a=e<0;return 0===this.negative||a?0===this.negative&&a?1:(this.strip(),e=1e.length)return 1;if(this.lengththis.n;);return 0===(e=a>>22,c=n}0===(e.words[r-10]=c>>>=22)&&10>>=26,e.words[t]=c,a=r}return 0!==a&&(e.words[e.length++]=a),e},n._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new g;else if("p224"===e)a=new y;else if("p192"===e)a=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a},I.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},I.prototype._verify2=function(e,a){r(0==(e.negative|a.negative),"red works only with positives"),r(e.red&&e.red===a.red,"red works only with red numbers")},I.prototype.imod=function(e){return(this.prime?this.prime.ireduce(e):e.umod(this.m))._forceRed(this)},I.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},I.prototype.add=function(e,a){return this._verify2(e,a),0<=(a=e.add(a)).cmp(this.m)&&a.isub(this.m),a._forceRed(this)},I.prototype.iadd=function(e,a){return this._verify2(e,a),0<=(a=e.iadd(a)).cmp(this.m)&&a.isub(this.m),a},I.prototype.sub=function(e,a){return this._verify2(e,a),(a=e.sub(a)).cmpn(0)<0&&a.iadd(this.m),a._forceRed(this)},I.prototype.isub=function(e,a){return this._verify2(e,a),(a=e.isub(a)).cmpn(0)<0&&a.iadd(this.m),a},I.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},I.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},I.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},I.prototype.isqr=function(e){return this.imul(e,e.clone())},I.prototype.sqr=function(e){return this.mul(e,e)},I.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(r(a%2==1),3===a)return a=this.m.add(new n(1)).iushrn(2),this.pow(e,a);for(var t=this.m.subn(1),c=0;!t.isZero()&&0===t.andln(1);)c++,t.iushrn(1);r(!t.isZero());for(var d=new n(1).toRed(this),o=d.redNeg(),f=this.m.subn(1).iushrn(1),i=new n(2*(i=this.m.bitLength())*i).toRed(this);0!==this.pow(i,f).cmp(o);)i.redIAdd(o);for(var s=this.pow(i,t),b=this.pow(e,t.addn(1).iushrn(1)),l=this.pow(e,t),u=c;0!==l.cmp(d);){for(var h=l,x=0;0!==h.cmp(d);x++)h=h.redSqr();r(x>s&1;c!==t[0]&&(c=this.sqr(c)),0!=b||0!==d?(d<<=1,d|=b,(4===++o||0===r&&0===s)&&(c=this.mul(c,t[d]),d=o=0)):o=0}f=26}return c},I.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},I.prototype.convertFrom=function(e){return(e=e.clone()).red=null,e},n.mont=function(e){return new _(e)},c(_,I),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){return(e=this.imod(e.mul(this.rinv))).red=null,e},_.prototype.imul=function(e,a){return e.isZero()||a.isZero()?(e.words[0]=0,e.length=1,e):(a=(e=e.imul(a)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=e=e.isub(a).iushrn(this.shift),0<=e.cmp(this.m)?a=e.isub(this.m):e.cmpn(0)<0&&(a=e.iadd(this.m)),a._forceRed(this))},_.prototype.mul=function(e,a){return e.isZero()||a.isZero()?new n(0)._forceRed(this):(a=(e=e.mul(a)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),a=e=e.isub(a).iushrn(this.shift),0<=e.cmp(this.m)?a=e.isub(this.m):e.cmpn(0)<0&&(a=e.iadd(this.m)),a._forceRed(this))},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===a||a,this)},{buffer:11}],10:[function(e,a,r){(function(e){(function(){a.exports=function(a){return a=new Uint8Array(a),(e.crypto||e.msCrypto).getRandomValues(a),a}}).call(this)}).call(this,"undefined"!=typeof t.g?t.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,a,t){},{}],12:[function(e,a,t){"use strict";t.version=e("../package.json").version,t.utils=e("./elliptic/utils"),t.rand=e("brorand"),t.curve=e("./elliptic/curve"),t.curves=e("./elliptic/curves"),t.ec=e("./elliptic/ec"),t.eddsa=e("./elliptic/eddsa")},{"../package.json":25,"./elliptic/curve":15,"./elliptic/curves":18,"./elliptic/ec":19,"./elliptic/eddsa":22,"./elliptic/utils":24,brorand:10}],13:[function(e,a,t){"use strict";var r=e("bn.js"),c=e("../utils"),n=c.getNAF,d=c.getJSF,o=c.assert;function f(e,a){this.type=e,this.p=new r(a.p,16),this.red=a.prime?r.red(a.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=a.n&&new r(a.n,16),this.g=a.g&&this.pointFromJSON(a.g,a.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0,!(a=this.n&&this.p.div(this.n))||0>1]):f.mixedAdd(c[-b-1>>1].neg()):0>1]):f.add(c[-b-1>>1].neg())}return"affine"===e.type?f.toP():f},f.prototype._wnafMulAdd=function(e,a,t,r,c){for(var o=this._wnafT1,f=this._wnafT2,i=this._wnafT3,s=0,b=0;b>1]:N<0&&(l=f[E][-N-1>>1].neg()),k="affine"===l.type?k.mixedAdd(l):k.add(l))}}for(b=0;b=Math.ceil((e.bitLength()+1)/a.step)},i.prototype._getDoubles=function(e,a){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var t=[this],r=this,c=0;c":""},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);e=(a=0!==(a=this.y.redSub(e.y)).cmpn(0)?a.redMul(this.x.redSub(e.x).redInvm()):a).redSqr().redISub(this.x).redISub(e.x);var a=a.redMul(this.x.redSub(e)).redISub(this.y);return this.curve.point(e,a)},i.prototype.dbl=function(){if(this.inf)return this;if(0===(t=this.y.redAdd(this.y)).cmpn(0))return this.curve.point(null,null);var e=this.curve.a,a=this.x.redSqr(),t=t.redInvm();return t=(e=a.redAdd(a).redIAdd(a).redIAdd(e).redMul(t)).redSqr().redISub(this.x.redAdd(this.x)),e=e.redMul(this.x.redSub(t)).redISub(this.y),this.curve.point(t,e)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(e){return e=new c(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,a,t){return a=[this,a],t=[e,t],this.curve.endo?this.curve._endoWnafMulAdd(a,t):this.curve._wnafMulAdd(1,a,t,2)},i.prototype.jmulAdd=function(e,a,t){return a=[this,a],t=[e,t],this.curve.endo?this.curve._endoWnafMulAdd(a,t,!0):this.curve._wnafMulAdd(1,a,t,2,!0)},i.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},i.prototype.neg=function(e){if(this.inf)return this;var a,t=this.curve.point(this.x,this.y.redNeg());return e&&this.precomputed&&(a=this.precomputed,e=function(e){return e.neg()},t.precomputed={naf:a.naf&&{wnd:a.naf.wnd,points:a.naf.points.map(e)},doubles:a.doubles&&{step:a.doubles.step,points:a.doubles.points.map(e)}}),t},i.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},n(s,d.BasePoint),f.prototype.jpoint=function(e,a,t){return new s(this,e,a,t)},s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=(t=this.z.redInvm()).redSqr(),a=this.x.redMul(e),t=this.y.redMul(e).redMul(t);return this.curve.point(a,t)},s.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},s.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var a=e.z.redSqr(),t=this.z.redSqr(),r=this.x.redMul(a),c=e.x.redMul(t),n=this.y.redMul(a.redMul(e.z)),d=e.y.redMul(t.redMul(this.z));return a=r.redSub(c),t=n.redSub(d),0===a.cmpn(0)?0!==t.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(d=(c=a.redSqr()).redMul(a),r=r.redMul(c),c=t.redSqr().redIAdd(d).redISub(r).redISub(r),d=t.redMul(r.redISub(c)).redISub(n.redMul(d)),a=this.z.redMul(e.z).redMul(a),this.curve.jpoint(c,d,a))},s.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var a=this.z.redSqr(),t=this.x,r=e.x.redMul(a),c=this.y,n=e.y.redMul(a).redMul(this.z);return e=t.redSub(r),a=c.redSub(n),0===e.cmpn(0)?0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(n=(r=e.redSqr()).redMul(e),t=t.redMul(r),r=a.redSqr().redIAdd(n).redISub(t).redISub(t),n=a.redMul(t.redISub(r)).redISub(c.redMul(n)),e=this.z.redMul(e),this.curve.jpoint(r,n,e))},s.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var a=this,t=0;t":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":24,"./base":13,"bn.js":9,inherits:39}],18:[function(e,a,t){"use strict";var r,c=t,n=(t=e("hash.js"),e("./curve")),d=e("./utils").assert;function o(e){"short"===e.type?this.curve=new n.short(e):"edwards"===e.type?this.curve=new n.edwards(e):this.curve=new n.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,d(this.g.validate(),"Invalid curve"),d(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,a){Object.defineProperty(c,e,{configurable:!0,enumerable:!0,get:function(){var t=new o(a);return Object.defineProperty(c,e,{configurable:!0,enumerable:!0,value:t}),t}})}c.PresetCurve=o,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:t.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:t.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:t.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:t.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:t.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:t.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=e("./precomputed/secp256k1")}catch(e){r=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:t.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},{"./curve":15,"./precomputed/secp256k1":23,"./utils":24,"hash.js":26}],19:[function(e,a,t){"use strict";var r=e("bn.js"),c=e("hmac-drbg"),n=e("../utils"),d=e("../curves"),o=e("brorand"),f=n.assert,i=e("./key"),s=e("./signature");function b(e){if(!(this instanceof b))return new b(e);"string"==typeof e&&(f(Object.prototype.hasOwnProperty.call(d,e),"Unknown curve "+e),e=d[e]),e instanceof d.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}(a.exports=b).prototype.keyPair=function(e){return new i(this,e)},b.prototype.keyFromPrivate=function(e,a){return i.fromPrivate(this,e,a)},b.prototype.keyFromPublic=function(e,a){return i.fromPublic(this,e,a)},b.prototype.genKeyPair=function(e){for(var a=new c({hash:this.hash,pers:(e=e||{}).pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),t=this.n.byteLength(),n=this.n.sub(new r(2));;){var d=new r(a.generate(t));if(!(0>=1,0<=o.cmp(this.curve.p.umod(this.curve.n))&&t)throw new Error("Unable to find sencond key candinate");return o=t?this.curve.pointFromX(o.add(this.curve.n),e):this.curve.pointFromX(o,e),a=a.r.invm(n),d=n.sub(d).mul(a).umod(n),n=c.mul(a).umod(n),this.g.mulAdd(d,o,n)},b.prototype.getKeyRecoveryParam=function(e,a,t,r){if(null!==(a=new s(a,r)).recoveryParam)return a.recoveryParam;for(var c,n=0;n<4;n++){try{c=this.recoverPubKey(e,a,n)}catch(e){continue}if(c.eq(t))return n}throw new Error("Unable to find valid recovery factor")}},{"../curves":18,"../utils":24,"./key":20,"./signature":21,"bn.js":9,brorand:10,"hmac-drbg":38}],20:[function(e,a,t){"use strict";var r=e("bn.js"),c=e("../utils").assert;function n(e,a){this.ec=e,this.priv=null,this.pub=null,a.priv&&this._importPrivate(a.priv,a.privEnc),a.pub&&this._importPublic(a.pub,a.pubEnc)}(a.exports=n).fromPublic=function(e,a,t){return a instanceof n?a:new n(e,{pub:a,pubEnc:t})},n.fromPrivate=function(e,a,t){return a instanceof n?a:new n(e,{priv:a,privEnc:t})},n.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},n.prototype.getPublic=function(e,a){return"string"==typeof e&&(a=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),a?this.pub.encode(a,e):this.pub},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(e,a){this.priv=new r(e,a||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,a){if(e.x||e.y)return"mont"===this.ec.curve.type?c(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||c(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,a)},n.prototype.derive=function(e){return e.validate()||c(e.validate(),"public point not validated"),e.mul(this.priv).getX()},n.prototype.sign=function(e,a,t){return this.ec.sign(e,this,a,t)},n.prototype.verify=function(e,a){return this.ec.verify(e,a,this)},n.prototype.inspect=function(){return""}},{"../utils":24,"bn.js":9}],21:[function(e,a,t){"use strict";var r=e("bn.js"),c=e("../utils"),n=c.assert;function d(e,a){if(e instanceof d)return e;this._importDER(e,a)||(n(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function o(){this.place=0}function f(e,a){var t=e[a.place++];if(!(128&t))return t;var r=15&t;if(0==r||4>>=0;return!(c<=127)&&(a.place=d,c)}function i(e){for(var a=0,t=e.length-1;!e[a]&&!(128&e[a+1])&&a>>3);for(e.push(128|t);--t;)e.push(a>>>(t<<3)&255);e.push(a)}}(a.exports=d).prototype._importDER=function(e,a){e=c.toArray(e,a);var t=new o;if(48!==e[t.place++])return!1;var n=f(e,t);if(!1===n)return!1;if(n+t.place!==e.length)return!1;if(2!==e[t.place++])return!1;if(!1===(a=f(e,t)))return!1;if(n=e.slice(t.place,a+t.place),t.place+=a,2!==e[t.place++])return!1;if(!1===(a=f(e,t)))return!1;if(e.length!==a+t.place)return!1;if(t=e.slice(t.place,a+t.place),0===n[0]){if(!(128&n[1]))return!1;n=n.slice(1)}if(0===t[0]){if(!(128&t[1]))return!1;t=t.slice(1)}return this.r=new r(n),this.s=new r(t),!(this.recoveryParam=null)},d.prototype.toDER=function(e){var a=this.r.toArray(),t=this.s.toArray();for(128&a[0]&&(a=[0].concat(a)),128&t[0]&&(t=[0].concat(t)),a=i(a),t=i(t);!(t[0]||128&t[1]);)t=t.slice(1);var r=[2];return s(r,a.length),(r=r.concat(a)).push(2),s(r,t.length),a=r.concat(t),s(r=[48],a.length),r=r.concat(a),c.encode(r,e)}},{"../utils":24,"bn.js":9}],22:[function(e,a,t){arguments[4][14][0].apply(t,arguments)},{dup:14}],23:[function(e,a,t){a.exports=void 0},{}],24:[function(e,a,t){"use strict";var r=t,c=e("bn.js");t=e("minimalistic-assert"),e=e("minimalistic-crypto-utils"),r.assert=t,r.toArray=e.toArray,r.zero2=e.zero2,r.toHex=e.toHex,r.encode=e.encode,r.getNAF=function(e,a,t){var r=new Array(Math.max(e.bitLength(),t)+1);r.fill(0);for(var c=1<>1)-1>1)-f:f):o=0,r[d]=o,n.iushrn(1)}return r},r.getJSF=function(e,a){var t=[[],[]];e=e.clone(),a=a.clone();for(var r,c=0,n=0;0=this._delta8){a=(e=this.pending).length%this._delta8,this.pending=e.slice(e.length-a,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-a,this.endian);for(var t=0;t>>24&255,r[c++]=e>>>16&255,r[c++]=e>>>8&255,r[c++]=255&e}else for(r[c++]=255&e,r[c++]=e>>>8&255,r[c++]=e>>>16&255,r[c++]=e>>>24&255,r[c++]=0,r[c++]=0,r[c++]=0,r[c++]=0,n=8;nthis.blockSize&&(e=(new this.Hash).update(e).digest()),c(e.length<=this.blockSize);for(var a=e.length;a>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},{"../utils":37}],37:[function(e,a,t){"use strict";var r=e("minimalistic-assert");function c(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function n(e){return 1===e.length?"0"+e:e}function d(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}e=e("inherits"),t.inherits=e,t.toArray=function(e,a){if(Array.isArray(e))return e.slice();if(!e)return[];var t=[];if("string"==typeof e)if(a){if("hex"===a)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r>8,n=255&n;c?t.push(c,n):t.push(n)}else for(r=0;r>>0}return n},t.split32=function(e,a){for(var t=new Array(4*e.length),r=0,c=0;r>>24,t[c+1]=n>>>16&255,t[c+2]=n>>>8&255,t[c+3]=255&n):(t[c+3]=n>>>24,t[c+2]=n>>>16&255,t[c+1]=n>>>8&255,t[c]=255&n)}return t},t.rotr32=function(e,a){return e>>>a|e<<32-a},t.rotl32=function(e,a){return e<>>32-a},t.sum32=function(e,a){return e+a>>>0},t.sum32_3=function(e,a,t){return e+a+t>>>0},t.sum32_4=function(e,a,t,r){return e+a+t+r>>>0},t.sum32_5=function(e,a,t,r,c){return e+a+t+r+c>>>0},t.sum64=function(e,a,t,r){var c=e[a],n=r+e[a+1]>>>0;e[a]=(n>>0,e[a+1]=n},t.sum64_hi=function(e,a,t,r){return(a+r>>>0>>0},t.sum64_lo=function(e,a,t,r){return a+r>>>0},t.sum64_4_hi=function(e,a,t,r,c,n,d,o){var f=0,i=a;return f+=(i=a+r>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,a,t,r,c,n,d,o){return a+r+n+o>>>0},t.sum64_5_hi=function(e,a,t,r,c,n,d,o,f,i){var s=0,b=a;return s+=(b=a+r>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,a,t,r,c,n,d,o,f,i){return a+r+n+o+i>>>0},t.rotr64_hi=function(e,a,t){return(a<<32-t|e>>>t)>>>0},t.rotr64_lo=function(e,a,t){return(e<<32-t|a>>>t)>>>0},t.shr64_hi=function(e,a,t){return e>>>t},t.shr64_lo=function(e,a,t){return(e<<32-t|a>>>t)>>>0}},{inherits:39,"minimalistic-assert":41}],38:[function(e,a,t){"use strict";var r=e("hash.js"),c=e("minimalistic-crypto-utils"),n=e("minimalistic-assert");function d(e){if(!(this instanceof d))return new d(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var a=c.toArray(e.entropy,e.entropyEnc||"hex"),t=c.toArray(e.nonce,e.nonceEnc||"hex");e=c.toArray(e.pers,e.persEnc||"hex"),n(a.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(a,t,e)}(a.exports=d).prototype._init=function(e,a,t){t=e.concat(a).concat(t),this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(t||[])),this._reseed=1},d.prototype.generate=function(e,a,t,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof a&&(r=t,t=a,a=null),t&&(t=c.toArray(t,r||"hex"),this._update(t));for(var n=[];n.length>5,this.byteCount=this.blockCount<<2,this.outputBlocks=t>>5,this.extraBytes=(31&t)>>3;for(var r=0;r<50;++r)this.s[r]=0}k.prototype.update=function(e){for(var a,t,r="string"!=typeof e,c=(e=r&&e.constructor===ArrayBuffer?new Uint8Array(e):e).length,n=this.blocks,o=this.byteCount,f=this.blockCount,i=0,s=this.s;i>2]|=e[i]<>2]|=t<>2]|=(192|t>>6)<>2]|=(224|t>>12)<>2]|=(240|t>>18)<>2]|=(128|t>>12&63)<>2]|=(128|t>>6&63)<>2]|=(128|63&t)<>2]|=this.padding[3&a],this.lastByteIndex===this.byteCount)for(e[0]=e[t],a=1;a>4&15]+n[15&e]+n[e>>12&15]+n[e>>8&15]+n[e>>20&15]+n[e>>16&15]+n[e>>28&15]+n[e>>24&15];o%a==0&&(w(t),d=0)}return c&&(e=t[d],0>4&15]+n[15&e]),1>12&15]+n[e>>8&15]),2>20&15]+n[e>>16&15])),f},k.prototype.arrayBuffer=function(){this.finalize();for(var e=this.blockCount,a=this.s,t=this.outputBlocks,r=this.extraBytes,c=0,n=0,d=this.outputBits>>3,o=r?new ArrayBuffer(t+1<<2):new ArrayBuffer(d),f=new Uint32Array(o);n>8&255,f[e+2]=a>>16&255,f[e+3]=a>>24&255;o%t==0&&w(r)}return n&&(e=o<<2,a=r[d],0>8&255),2>16&255)),f};var w=function(e){for(var a,t,r,c,n,d,f,i,s,b,l,u,h,x,p,m,v,g,y,k,w,I,_,E,N,H,S,A,M,T,P,O,C,R,D,j,L,B,F,Z,U,z,q,V,W,K,G,Y,$,X,J=0;J<48;J+=2)S=e[0]^e[10]^e[20]^e[30]^e[40],A=e[1]^e[11]^e[21]^e[31]^e[41],Z=e[2]^e[12]^e[22]^e[32]^e[42],F=e[3]^e[13]^e[23]^e[33]^e[43],O=e[4]^e[14]^e[24]^e[34]^e[44],P=e[5]^e[15]^e[25]^e[35]^e[45],K=e[6]^e[16]^e[26]^e[36]^e[46],W=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],b=(x=e[9]^e[19]^e[29]^e[39]^e[49])^(F<<1|Z>>>31),e[0]^=s=h^(Z<<1|F>>>31),e[1]^=b,e[10]^=s,e[11]^=b,e[20]^=s,e[21]^=b,e[30]^=s,e[31]^=b,e[40]^=s,e[41]^=b,b=A^(P<<1|O>>>31),e[2]^=s=S^(O<<1|P>>>31),e[3]^=b,e[12]^=s,e[13]^=b,e[22]^=s,e[23]^=b,e[32]^=s,e[33]^=b,e[42]^=s,e[43]^=b,b=F^(W<<1|K>>>31),e[4]^=s=Z^(K<<1|W>>>31),e[5]^=b,e[14]^=s,e[15]^=b,e[24]^=s,e[25]^=b,e[34]^=s,e[35]^=b,e[44]^=s,e[45]^=b,b=P^(x<<1|h>>>31),e[6]^=s=O^(h<<1|x>>>31),e[7]^=b,e[16]^=s,e[17]^=b,e[26]^=s,e[27]^=b,e[36]^=s,e[37]^=b,e[46]^=s,e[47]^=b,b=W^(A<<1|S>>>31),e[8]^=s=K^(S<<1|A>>>31),e[9]^=b,e[18]^=s,e[19]^=b,e[28]^=s,e[29]^=b,e[38]^=s,e[39]^=b,e[48]^=s,e[49]^=b,a=e[0],t=e[1],C=e[11]<<4|e[10]>>>28,R=e[10]<<4|e[11]>>>28,p=e[20]<<3|e[21]>>>29,m=e[21]<<3|e[20]>>>29,G=e[31]<<9|e[30]>>>23,Y=e[30]<<9|e[31]>>>23,M=e[40]<<18|e[41]>>>14,T=e[41]<<18|e[40]>>>14,w=e[2]<<1|e[3]>>>31,I=e[3]<<1|e[2]>>>31,r=e[13]<<12|e[12]>>>20,c=e[12]<<12|e[13]>>>20,D=e[22]<<10|e[23]>>>22,j=e[23]<<10|e[22]>>>22,v=e[33]<<13|e[32]>>>19,g=e[32]<<13|e[33]>>>19,$=e[42]<<2|e[43]>>>30,X=e[43]<<2|e[42]>>>30,U=e[5]<<30|e[4]>>>2,z=e[4]<<30|e[5]>>>2,_=e[14]<<6|e[15]>>>26,E=e[15]<<6|e[14]>>>26,n=e[25]<<11|e[24]>>>21,d=e[24]<<11|e[25]>>>21,L=e[34]<<15|e[35]>>>17,B=e[35]<<15|e[34]>>>17,y=e[45]<<29|e[44]>>>3,k=e[44]<<29|e[45]>>>3,l=e[6]<<28|e[7]>>>4,u=e[7]<<28|e[6]>>>4,q=e[17]<<23|e[16]>>>9,V=e[16]<<23|e[17]>>>9,N=e[26]<<25|e[27]>>>7,H=e[27]<<25|e[26]>>>7,f=e[36]<<21|e[37]>>>11,i=e[37]<<21|e[36]>>>11,F=e[47]<<24|e[46]>>>8,Z=e[46]<<24|e[47]>>>8,P=e[8]<<27|e[9]>>>5,O=e[9]<<27|e[8]>>>5,h=e[18]<<20|e[19]>>>12,x=e[19]<<20|e[18]>>>12,W=e[29]<<7|e[28]>>>25,K=e[28]<<7|e[29]>>>25,S=e[38]<<8|e[39]>>>24,A=e[39]<<8|e[38]>>>24,s=e[48]<<14|e[49]>>>18,b=e[49]<<14|e[48]>>>18,e[0]=a^~r&n,e[1]=t^~c&d,e[10]=l^~h&p,e[11]=u^~x&m,e[20]=w^~_&N,e[21]=I^~E&H,e[30]=P^~C&D,e[31]=O^~R&j,e[40]=U^~q&W,e[41]=z^~V&K,e[2]=r^~n&f,e[3]=c^~d&i,e[12]=h^~p&v,e[13]=x^~m&g,e[22]=_^~N&S,e[23]=E^~H&A,e[32]=C^~D&L,e[33]=R^~j&B,e[42]=q^~W&G,e[43]=V^~K&Y,e[4]=n^~f&s,e[5]=d^~i&b,e[14]=p^~v&y,e[15]=m^~g&k,e[24]=N^~S&M,e[25]=H^~A&T,e[34]=D^~L&F,e[35]=j^~B&Z,e[44]=W^~G&$,e[45]=K^~Y&X,e[6]=f^~s&a,e[7]=i^~b&t,e[16]=v^~y&l,e[17]=g^~k&u,e[26]=S^~M&w,e[27]=A^~T&I,e[36]=L^~F&P,e[37]=B^~Z&O,e[46]=G^~$&U,e[47]=Y^~X&z,e[8]=s^~a&r,e[9]=b^~t&c,e[18]=y^~l&h,e[19]=k^~u&x,e[28]=M^~w&_,e[29]=T^~I&E,e[38]=F^~P&C,e[39]=Z^~O&R,e[48]=$^~U&q,e[49]=X^~z&V,e[0]^=o[J],e[1]^=o[J+1]};if(c)a.exports=h;else for(p=0;p>8,n=255&n;c?t.push(c,n):t.push(n)}return t},t.zero2=r,t.toHex=c,t.encode=function(e,a){return"hex"===a?c(e):e}},{}],43:[function(e,a,t){a.exports={browser:!0}},{}],44:[function(e,a,t){(function(e){(function(){"use strict";function r(e){var a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],t=1779033703,r=3144134277,c=1013904242,n=2773480762,d=1359893119,o=2600822924,f=528734635,i=1541459225,s=new Array(64);function b(e){for(var b=0,l=e.length;64<=l;){for(var u,h,x,p,m=t,v=r,g=c,y=n,k=d,w=o,I=f,_=i,E=0;E<16;E++)s[E]=(255&e[h=b+4*E])<<24|(255&e[h+1])<<16|(255&e[h+2])<<8|255&e[h+3];for(E=16;E<64;E++)x=((u=s[E-2])>>>17|u<<15)^(u>>>19|u<<13)^u>>>10,u=s[E-15],s[E]=(x+s[E-7]|0)+((p=(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3)+s[E-16]|0)|0;for(E=0;E<64;E++)x=(((k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7))+(k&w^~k&I)|0)+(_+(a[E]+s[E]|0)|0)|0,p=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&v^m&g^v&g)|0,_=I,I=w,w=k,k=y+x|0,y=g,g=v,v=m,m=x+p|0;t=t+m|0,r=r+v|0,c=c+g|0,n=n+y|0,d=d+k|0,o=o+w|0,f=f+I|0,i=i+_|0,b+=64,l-=64}}b(e);var l,u=e.length%64,h=e.length/536870912|0,x=e.length<<3,p=u<56?56:120,m=e.slice(e.length-u,e.length);for(m.push(128),l=1+u;l>>24&255),m.push(h>>>16&255),m.push(h>>>8&255),m.push(h>>>0&255),m.push(x>>>24&255),m.push(x>>>16&255),m.push(x>>>8&255),m.push(x>>>0&255),b(m),[t>>>24&255,t>>>16&255,t>>>8&255,t>>>0&255,r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,d>>>24&255,d>>>16&255,d>>>8&255,d>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255]}function c(e,a,t){e=e.length<=64?e:r(e);for(var c=64+a.length+4,n=new Array(c),d=new Array(64),o=[],f=0;f<64;f++)n[f]=54;for(f=0;f>>32-a}function o(e,a,t,r){for(var c=0;c>0&255),x.push(p[t]>>8&255),x.push(p[t]>>16&255),x.push(p[t]>>24&255);var u=c(a,x,l);return h(null,1,u)}O(e)};C()}var l,u;l=this,u=2147483647,void 0!==t?a.exports=b:l&&(l.scrypt&&(l._scrypt=l.scrypt),l.scrypt=b)}).call(this)}).call(this,e("timers").setImmediate)},{timers:46}],45:[function(e,a,r){(function(e,a,t){(function(){!function(a,t){"use strict";var r,c,n,d,o,f,i,s;function b(e){return c[r]=l.apply(t,e),r++}function l(e){var a=[].slice.call(arguments,1);return function(){"function"==typeof e?e.apply(t,a):new Function(""+e)()}}function u(e){if(n)setTimeout(l(u,e),0);else{var a=c[e];if(a){n=!0;try{a()}finally{h(e),n=!1}}}}function h(e){delete c[e]}function x(){function e(e){e.source===a&&"string"==typeof e.data&&0===e.data.indexOf(t)&&u(+e.data.slice(t.length))}var t="setImmediate$"+Math.random()+"$";a.addEventListener?a.addEventListener("message",e,!1):a.attachEvent("onmessage",e),o=function(){var e=b(arguments);return a.postMessage(t+e,"*"),e}}a.setImmediate||(r=1,n=!(c={}),d=a.document,s=(s=Object.getPrototypeOf&&Object.getPrototypeOf(a))&&s.setTimeout?s:a,"[object process]"==={}.toString.call(a.process)?o=function(){var a=b(arguments);return e.nextTick(l(u,a)),a}:function(){if(a.postMessage&&!a.importScripts){var e=!0,t=a.onmessage;return a.onmessage=function(){e=!1},a.postMessage("","*"),a.onmessage=t,e}}()?x():o=a.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){u(e.data)},function(){var e=b(arguments);return i.port2.postMessage(e),e}):d&&"onreadystatechange"in d.createElement("script")?(f=d.documentElement,function(){var e=b(arguments),a=d.createElement("script");return a.onreadystatechange=function(){u(e),a.onreadystatechange=null,f.removeChild(a),a=null},f.appendChild(a),e}):function(){var e=b(arguments);return setTimeout(l(u,e),0),e},s.setImmediate=o,s.clearImmediate=h)}("undefined"==typeof self?void 0===a?this:a:self)}).call(this)}).call(this,e("_process"),"undefined"!=typeof t.g?t.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").clearImmediate)},{_process:43,timers:46}],46:[function(e,a,r){(function(e){(function(){a.exports={setImmediate:e.setImmediate}}).call(this)}).call(this,"undefined"!=typeof t.g?t.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(e,a,r){(function(e){(function(){var t,r,c;e.crypto&&crypto.getRandomValues&&(t=new Uint8Array(16),r=function(){return crypto.getRandomValues(t),t}),r||(c=new Array(16),r=function(){for(var e,a=0;a<16;a++)0==(3&a)&&(e=4294967296*Math.random()),c[a]=e>>>((3&a)<<3)&255;return c}),a.exports=r}).call(this)}).call(this,"undefined"!=typeof t.g?t.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],48:[function(e,a,t){for(var r=e("./rng"),c=[],n={},d=0;d<256;d++)c[d]=(d+256).toString(16).substr(1),n[c[d]]=d;function o(e,a){return a=a||0,c[e[a++]]+c[e[a++]]+c[e[a++]]+c[e[a++]]+"-"+c[e[a++]]+c[e[a++]]+"-"+c[e[a++]]+c[e[a++]]+"-"+c[e[a++]]+c[e[a++]]+"-"+c[e[a++]]+c[e[a++]]+c[e[a++]]+c[e[a++]]+c[e[a++]]+c[e[a++]]}var f=[1|(e=r())[0],e[1],e[2],e[3],e[4],e[5]],i=16383&(e[6]<<8|e[7]),s=0,b=0;function l(e,a,t){var c=a&&t||0;"string"==typeof e&&(a="binary"==e?new Array(16):null,e=null);var n=(e=e||{}).random||(e.rng||r)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,a)for(var d=0;d<16;d++)a[c+d]=n[d];return a||o(n)}(e=l).v1=function(e,a,t){var r=a&&t||0,c=a||[],n=void 0!==(e=e||{}).clockseq?e.clockseq:i,d=void 0!==e.msecs?e.msecs:(new Date).getTime(),l=void 0!==e.nsecs?e.nsecs:b+1;if((t=d-s+(l-b)/1e4)<0&&void 0===e.clockseq&&(n=n+1&16383),1e4<=(l=(t<0||s>>24&255,c[r++]=l>>>16&255,c[r++]=l>>>8&255,c[r++]=255&l,d=d/4294967296*1e4&268435455,c[r++]=d>>>8&255,c[r++]=255&d,c[r++]=d>>>24&15|16,c[r++]=d>>>16&255,c[r++]=n>>>8|128,c[r++]=255&n;for(var u=e.node||f,h=0;h<6;h++)c[r+h]=u[h];return a||o(c)},e.v4=l,e.parse=function(e,a,t){var r=a&&t||0,c=0;for(a=a||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,(function(e){c<16&&(a[r+c++]=n[e])}));c<16;)a[r+c++]=0;return a},e.unparse=o,a.exports=e},{"./rng":47}],49:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});try{a.exports.XMLHttpRequest=XMLHttpRequest}catch(e){console.log("Warning: XMLHttpRequest is not defined"),a.exports.XMLHttpRequest=null}},{}],50:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../utils/properties");function c(){r.setType(this,"Provider")}c.isProvider=function(e){return r.isType(e,"Provider")},e=c,t.Provider=e},{"../utils/properties":74}],51:[function(e,a,t){"use strict";var r,c=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},function(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var d=e("../utils/address"),o=e("../utils/bignumber"),f=e("../utils/bytes"),i=e("../constants"),s=e("../utils/hash"),b=e("../utils/networks"),l=e("../utils/properties"),u=e("../utils/rlp"),h=e("../utils/transaction"),x=e("../utils/utf8"),p=e("../utils/web"),m=n(e("../errors")),v=e("./abstract-provider");function g(e,a){var t,r={};for(t in e)try{var c=e[t](a[t]);void 0!==c&&(r[t]=c)}catch(e){throw e.checkKey=t,e.checkValue=a[t],e}return r}function y(e,a){return function(t){return null==t?a:e(t)}}function k(e){return function(a){if(!Array.isArray(a))throw new Error("not an array");var t=[];return a.forEach((function(a){t.push(e(a))})),t}}function w(e,a){return"string"==typeof e&&(a||"0x"===e.substring(0,2)||(e="0x"+e),32===f.hexDataLength(e))?e.toLowerCase():(m.throwError("invalid hash",m.INVALID_ARGUMENT,{arg:"hash",value:e}),null)}function I(e){return o.bigNumberify(e).toNumber()}function _(e){if(!f.isHexString(e))throw new Error("invalid uint256");for(;e.length<66;)e="0x0"+e.substring(2);return e}function E(e){if(null==e)return"latest";if("earliest"===e)return"0x0";if("latest"===e||"pending"===e)return e;if("number"==typeof e)return f.hexStripZeros(f.hexlify(e));if(f.isHexString(e))return f.hexStripZeros(e);throw new Error("invalid blockTag")}var N={hash:w,blockHash:y(w,null),blockNumber:y(I,null),transactionIndex:y(I,null),confirmations:y(I,null),from:d.getAddress,gasPrice:o.bigNumberify,gasLimit:o.bigNumberify,to:y(d.getAddress,null),value:o.bigNumberify,nonce:I,data:f.hexlify,r:y(_),s:y(_),v:y(I),creates:y(d.getAddress,null),raw:y(f.hexlify)};function H(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&o.bigNumberify(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=d.getContractAddress(e)),e.raw||e.v&&e.r&&e.s&&(t=[f.stripZeros(f.hexlify(e.nonce)),f.stripZeros(f.hexlify(e.gasPrice)),f.stripZeros(f.hexlify(e.gasLimit)),e.to||"0x",f.stripZeros(f.hexlify(e.value||"0x")),f.hexlify(e.data||"0x"),f.stripZeros(f.hexlify(e.v||"0x")),f.stripZeros(f.hexlify(e.r)),f.stripZeros(f.hexlify(e.s))],e.raw=u.encode(t));var a=g(N,e),t=e.networkId;return null!=e.chainId&&null==t&&null==a.v&&(t=e.chainId),"number"!=typeof(t=f.isHexString(t)?o.bigNumberify(t).toNumber():t)&&null!=a.v&&((t=(a.v-35)/2)<0&&(t=0),t=parseInt(t)),a.networkId=t="number"!=typeof t?0:t,null==a.chainId&&null!=t&&(a.chainId=t),a.blockHash&&"x"===a.blockHash.replace(/0/g,"")&&(a.blockHash=null),a}var S={hash:w,parentHash:w,number:I,timestamp:I,nonce:y(f.hexlify),difficulty:function(e){e=o.bigNumberify(e);try{return e.toNumber()}catch(e){}return null},gasLimit:o.bigNumberify,gasUsed:o.bigNumberify,miner:d.getAddress,extraData:f.hexlify,transactions:y(k(w))},A=l.shallowCopy(S);function M(e,a){return null!=e.author&&null==e.miner&&(e.miner=e.author),g(a?A:S,e)}A.transactions=y(k(H));var T={from:y(d.getAddress),nonce:y(I),gasLimit:y(o.bigNumberify),gasPrice:y(o.bigNumberify),to:y(d.getAddress),value:y(o.bigNumberify),data:y(f.hexlify)};function P(e){return g(T,e)}var O={transactionLogIndex:y(I),transactionIndex:I,blockNumber:I,transactionHash:w,address:d.getAddress,topics:k(w),data:f.hexlify,logIndex:I,blockHash:w},C={to:y(d.getAddress,null),from:y(d.getAddress,null),contractAddress:y(d.getAddress,null),transactionIndex:I,root:y(w),gasUsed:o.bigNumberify,logsBloom:y(f.hexlify),blockHash:w,transactionHash:w,logs:k((function(e){return g(O,e)})),blockNumber:I,confirmations:y(I,null),cumulativeGasUsed:o.bigNumberify,status:y(I)};function R(e){return Array.isArray(e)?e.forEach((function(e){R(e)})):null!=e&&w(e),e}var D,j,L,B={fromBlock:y(E,void 0),toBlock:y(E,void 0),address:y(d.getAddress,void 0),topics:y(R,void 0)},F={blockHash:y(w,void 0),address:y(d.getAddress,void 0),topics:y(R,void 0)},Z={blockNumber:y(I),blockHash:y(w),transactionIndex:I,removed:y((function(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===e)return!0;if("false"===e)return!1}throw new Error("invaid boolean - "+e)})),address:d.getAddress,data:(D=f.hexlify,j="0x",function(e){return e?D(e):j}),topics:k(w),transactionHash:w,logIndex:I};function U(e){return g(Z,e)}function z(e){return e.map((function(e){return"string"==typeof e?e:Array.isArray(e)?(e.forEach((function(e){null!==e&&32!==f.hexDataLength(e)&&m.throwError("invalid topic",m.INVALID_ARGUMENT,{argument:"topic",value:e})})),e.join(",")):null===e?"":m.throwError("invalid topic value",m.INVALID_ARGUMENT,{argument:"topic",value:e})})).join("&")}function q(e){if("string"==typeof e){if(20===f.hexDataLength(e))return"address:"+d.getAddress(e);if(e=e.toLowerCase(),32===f.hexDataLength(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter::"+z(e);if(e&&"object"==typeof e)return"filter:"+(e.address||"")+":"+z(e.topics||[])}throw new Error("invalid event - "+e)}function V(){return(new Date).getTime()}function W(e){var a,t=L.call(this)||this;return m.checkNew(t,v.Provider),e instanceof Promise?(l.defineReadOnly(t,"ready",e.then((function(e){return l.defineReadOnly(t,"_network",e),e}))),t.ready.catch((function(e){}))):(a=b.getNetwork(null==e?"homestead":e))?(l.defineReadOnly(t,"_network",a),l.defineReadOnly(t,"ready",Promise.resolve(t._network))):m.throwError("invalid network",m.INVALID_ARGUMENT,{arg:"network",value:e}),t._lastBlockNumber=-2,t._balances={},t._events=[],t._pollingInterval=4e3,t._emitted={block:-2},t._fastQueryDate=0,t}c(W,L=v.Provider),W.prototype._doPoll=function(){var e=this;this.getBlockNumber().then((function(a){if(e.polling&&(e._setFastBlockNumber(a),a!==e._lastBlockNumber)){-2===e._emitted.block&&(e._emitted.block=a-1);for(var t=e._emitted.block+1;t<=a;t++)e.emit("block",t);e._emitted.block!==a&&(e._emitted.block=a,Object.keys(e._emitted).forEach((function(t){var r;"block"===t||"pending"!==(r=e._emitted[t])&&122*this._pollingInterval&&(this._fastQueryDate=a,this._fastBlockNumberPromise=this.getBlockNumber().then((function(a){return(null==e._fastBlockNumber||a>e._fastBlockNumber)&&(e._fastBlockNumber=a),e._fastBlockNumber}))),this._fastBlockNumberPromise},W.prototype._setFastBlockNumber=function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))},W.prototype.waitForTransaction=function(e,a){var t=this;return null==a&&(a=1),this.getTransactionReceipt(e).then((function(r){return 0===a||r&&r.confirmations>=a?r:new Promise((function(r){var c=function c(n){n.confirmations(a=a.substring(64)).length)return null;var r=x.toUtf8String("0x"+a.substring(0,2*t));return c.resolveName(r).then((function(a){return a!=e?null:r}))}))},W.checkTransactionResponse=H,W.prototype.doPoll=function(){},W.prototype.perform=function(e,a){return m.throwError(e+" not implemented",m.NOT_IMPLEMENTED,{operation:e}),null},W.prototype._startPending=function(){m.warn("WARNING: this provider does not support pending events")},W.prototype._stopPending=function(){},W.prototype._addEventListener=function(e,a,t){this._events.push({tag:q(e),listener:a,once:t}),"pending"===e&&this._startPending(),this.polling=!0},W.prototype.on=function(e,a){return this._addEventListener(e,a,!1),this},W.prototype.once=function(e,a){return this._addEventListener(e,a,!0),this},W.prototype.addEventListener=function(e,a){return this.on(e,a)},W.prototype.emit=function(e){for(var a=this,t=[],r=1;re.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}},H);function H(e,a){return E.call(this,e,"null","",a,!1)||this}var S,A=(c(M,S=k),M.prototype.encode=function(e){try{var a=i.bigNumberify(e);if(this.signed){var t=d.MaxUint256.maskn(8*this.size-1);if(a.gt(t))throw new Error("out-of-bounds");if(t=t.add(d.One).mul(d.NegativeOne),a.lt(t))throw new Error("out-of-bounds")}else if(a.lt(d.Zero)||a.gt(d.MaxUint256.maskn(8*this.size)))throw new Error("out-of-bounds");return a=a.toTwos(8*this.size).maskn(8*this.size),this.signed&&(a=a.fromTwos(8*this.size).toTwos(256)),s.padZeros(s.arrayify(a),32)}catch(a){o.throwError("invalid number value",o.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:e})}return null},M.prototype.decode=function(e,a){e.length>1]>>4&&(a[c]=a[c].toUpperCase()),8<=(15&t[c>>1])&&(a[c+1]=a[c+1].toUpperCase());return"0x"+a.join("")}for(var s={},b=0;b<10;b++)s[String(b)]=String(b);for(b=0;b<26;b++)s[String.fromCharCode(65+b)]=String(10+b);var l,u=Math.floor((l=9007199254740991,Math.log10?Math.log10(l):Math.log(l)/Math.LN10));function h(e){e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00";var a="";for(e.split("").forEach((function(e){a+=s[e]}));a.length>=u;){var t=a.substring(0,u);a=parseInt(t,10)%97+a.substring(t.length)}for(var r=String(98-parseInt(a,10)%97);r.length<2;)r="0"+r;return r}function x(e){var a=null;if("string"!=typeof e&&f.throwError("invalid address",f.INVALID_ARGUMENT,{arg:"address",value:e}),e.match(/^(0x)?[0-9a-fA-F]{40}$/))a=i(e="0x"!==e.substring(0,2)?"0x"+e:e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&a!==e&&f.throwError("bad address checksum",f.INVALID_ARGUMENT,{arg:"address",value:e});else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==h(e)&&f.throwError("bad icap checksum",f.INVALID_ARGUMENT,{arg:"address",value:e}),a=new c.default.BN(e.substring(4),36).toString(16);a.length<40;)a="0"+a;a=i("0x"+a)}else f.throwError("invalid address",f.INVALID_ARGUMENT,{arg:"address",value:e});return a}t.getAddress=x,t.getIcapAddress=function(e){for(var a=new c.default.BN(x(e).substring(2),16).toString(36).toUpperCase();a.length<30;)a="0"+a;return"XE"+h("XE00"+a)+a},t.getContractAddress=function(e){if(!e.from)throw new Error("missing from address");var a=e.nonce;return x("0x"+d.keccak256(o.encode([x(e.from),n.stripZeros(n.hexlify(a))])).substring(26))},t.getCreate2Address=function(e){var a=e.initCodeHash;e.initCode&&(a?d.keccak256(e.initCode)!==a&&f.throwError("initCode/initCodeHash mismatch",f.INVALID_ARGUMENT,{arg:"options",value:e}):a=d.keccak256(e.initCode)),a||f.throwError("missing initCode or initCodeHash",f.INVALID_ARGUMENT,{arg:"options",value:e});var t=x(e.from),r=n.arrayify(e.salt);return 32!==r.length&&f.throwError("invalid salt",f.INVALID_ARGUMENT,{arg:"options",value:e}),x("0x"+d.keccak256(n.concat(["0xff",t,r,a])).substring(26))}},{"../errors":5,"./bytes":64,"./keccak256":71,"./rlp":76,"bn.js":9}],61:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../utils/bytes");a.exports={decode:function(e){e=atob(e);for(var a=[],t=0;t>=8;for(;0>=8}for(var o=0;e[o]===this._leader&&o>4]+b[15&f])}return"0x"+r.join("")}return c.throwError("invalid hexlify value",null,{arg:"value",value:e}),"never"}function u(e,a){for(s(e)||c.throwError("invalid hex string",c.INVALID_ARGUMENT,{arg:"value",value:e});e.length<2*a+2;)e="0x0"+e.substring(2);return e}function h(e){var a=0,t="0x",r="0x";if((n=e)&&null!=n.r&&null!=n.s){null==e.v&&null==e.recoveryParam&&c.throwError("at least on of recoveryParam or v must be specified",c.INVALID_ARGUMENT,{argument:"signature",value:e}),t=u(e.r,32),r=u(e.s,32),"string"==typeof(a=e.v)&&(a=parseInt(a,16));var n=e.recoveryParam;a=27+(n=null==n&&null!=e.v?1-a%2:n)}else{if(65!==(e=f(e)).length)throw new Error("invalid signature");t=l(e.slice(0,32)),r=l(e.slice(32,64)),27!==(a=e[64])&&28!==a&&(a=27+a%2)}return{r:t,s:r,recoveryParam:a-27,v:a}}t.hexlify=l,t.hexDataLength=function(e){return s(e)&&e.length%2==0?(e.length-2)/2:null},t.hexDataSlice=function(e,a,t){return s(e)||c.throwError("invalid hex data",c.INVALID_ARGUMENT,{arg:"value",value:e}),e.length%2!=0&&c.throwError("hex data length must be even",c.INVALID_ARGUMENT,{arg:"value",value:e}),a=2+2*a,null!=t?"0x"+e.substring(a,2+2*t):"0x"+e.substring(a)},t.hexStripZeros=function(e){for(s(e)||c.throwError("invalid hex string",c.INVALID_ARGUMENT,{arg:"value",value:e});3>3)]=e>>24-r&255;var c=(i=b.computeHmac(b.SupportedAlgorithms.sha512,this.chainCode,t)).slice(0,32),n=i.slice(32),d=null,i=null;return this.privateKey?d=g(f.bigNumberify(c).add(this.privateKey).mod(x)):i=new u.KeyPair(o.hexlify(c))._addPoint(this.publicKey),new I(k,d,i,this.fingerprint,g(n),e,this.depth+1,this.mnemonic,a)},I.prototype.derivePath=function(e){var a=e.split("/");if(0===a.length||"m"===a[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===a[0]&&a.shift();for(var t=this,r=0;r>3]|=1<<7-d%8),d++}var b=32*t.length/3,l=v(t.length/3);if(e=o.arrayify(h.sha256(r.slice(0,b/8)))[0],(e&=l)!=(r[r.length-1]&l))throw new Error("invalid checksum");return o.hexlify(r.slice(0,b/8))}function H(e,a){if((e=o.arrayify(e)).length%4!=0||e.length<16||32>8-r,t.push(e[c]&(1<<8-r)-1),r+=3);var d=o.arrayify(h.sha256(e))[0],f=e.length/4;return d&=v(f),t[t.length-1]<<=f,t[t.length-1]|=d>>8-f,(a=a||n.langEn).join(t.map((function(e){return a.getWord(e)})))}t.HDNode=w,t.fromExtendedKey=function(e){var a=d.Base58.decode(e);82===a.length&&y(a.slice(0,78))===e||c.throwError("invalid extended key",c.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"});var t=a[4],r=o.hexlify(a.slice(5,9)),n=parseInt(o.hexlify(a.slice(9,13)).substring(2),16),f=o.hexlify(a.slice(13,45)),i=a.slice(45,78);switch(o.hexlify(a.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new w(k,null,o.hexlify(i),r,f,n,t,null,null);case"0x0488ade4":case"0x04358394":if(0!==i[0])break;return new w(k,o.hexlify(i.slice(1)),null,r,f,n,t,null,null)}return c.throwError("invalid extended key",c.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"})},t.fromMnemonic=function(e,a,t){return _(E(e=H(N(e,a),a),t),e)},t.fromSeed=function(e){return _(e,null)},t.mnemonicToSeed=E,t.mnemonicToEntropy=N,t.entropyToMnemonic=H,t.isValidMnemonic=function(e,a){try{return N(e,a),!0}catch(e){}return!1}},{"../errors":5,"../wordlists/lang-en":90,"./basex":62,"./bignumber":63,"./bytes":64,"./hmac":67,"./pbkdf2":73,"./properties":74,"./secp256k1":77,"./sha2":79,"./utf8":85}],67:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c,n=r(e("hash.js")),d=e("../utils/bytes"),o=r(e("../errors"));(e=c=t.SupportedAlgorithms||(t.SupportedAlgorithms={})).sha256="sha256",e.sha512="sha512",t.computeHmac=function(e,a,t){return c[e]||o.throwError("unsupported algorithm "+e,o.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),d.arrayify(n.hmac(n[e],d.arrayify(a)).update(d.arrayify(t)).digest())}},{"../errors":5,"../utils/bytes":64,"hash.js":26}],68:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c=e("./abi-coder");t.AbiCoder=c.AbiCoder,t.defaultAbiCoder=c.defaultAbiCoder,t.formatSignature=c.formatSignature,t.formatParamType=c.formatParamType,t.parseSignature=c.parseSignature,t.parseParamType=c.parseParamType,c=e("./address"),t.getAddress=c.getAddress,t.getContractAddress=c.getContractAddress,t.getCreate2Address=c.getCreate2Address,t.getIcapAddress=c.getIcapAddress,c=r(e("./base64")),t.base64=c,c=e("./bignumber"),t.BigNumber=c.BigNumber,t.bigNumberify=c.bigNumberify,c=e("./bytes"),t.arrayify=c.arrayify,t.concat=c.concat,t.hexDataSlice=c.hexDataSlice,t.hexDataLength=c.hexDataLength,t.hexlify=c.hexlify,t.hexStripZeros=c.hexStripZeros,t.hexZeroPad=c.hexZeroPad,t.isHexString=c.isHexString,t.joinSignature=c.joinSignature,t.padZeros=c.padZeros,t.splitSignature=c.splitSignature,t.stripZeros=c.stripZeros,c=e("./hash"),t.hashMessage=c.hashMessage,t.id=c.id,t.namehash=c.namehash,c=r(e("./hdnode")),t.HDNode=c,c=e("./interface"),t.Interface=c.Interface,c=e("./json-wallet"),t.getJsonWalletAddress=c.getJsonWalletAddress,c=e("./keccak256"),t.keccak256=c.keccak256,c=e("./sha2"),t.sha256=c.sha256,c=e("./solidity"),t.solidityKeccak256=c.keccak256,t.solidityPack=c.pack,t.soliditySha256=c.sha256,c=e("./random-bytes"),t.randomBytes=c.randomBytes,c=e("./networks"),t.getNetwork=c.getNetwork,c=e("./properties"),t.checkProperties=c.checkProperties,t.deepCopy=c.deepCopy,t.defineReadOnly=c.defineReadOnly,t.resolveProperties=c.resolveProperties,t.shallowCopy=c.shallowCopy,r=r(e("./rlp")),t.RLP=r,r=e("./secp256k1"),t.computeAddress=r.computeAddress,t.computePublicKey=r.computePublicKey,t.recoverAddress=r.recoverAddress,t.recoverPublicKey=r.recoverPublicKey,t.verifyMessage=r.verifyMessage,r=e("./signing-key"),t.SigningKey=r.SigningKey,r=e("./transaction"),t.populateTransaction=r.populateTransaction,r=e("./transaction"),t.parseTransaction=r.parse,t.serializeTransaction=r.serialize,r=e("./utf8"),t.formatBytes32String=r.formatBytes32String,t.parseBytes32String=r.parseBytes32String,t.toUtf8Bytes=r.toUtf8Bytes,t.toUtf8String=r.toUtf8String,r=e("./units"),t.commify=r.commify,t.formatEther=r.formatEther,t.parseEther=r.parseEther,t.formatUnits=r.formatUnits,t.parseUnits=r.parseUnits,r=e("./web"),t.fetchJson=r.fetchJson,t.poll=r.poll,r=e("./hmac"),t.SupportedAlgorithms=r.SupportedAlgorithms,r=e("./utf8"),t.UnicodeNormalizationForm=r.UnicodeNormalizationForm,e=e("./wordlist"),t.Wordlist=e.Wordlist},{"./abi-coder":59,"./address":60,"./base64":61,"./bignumber":63,"./bytes":64,"./hash":65,"./hdnode":66,"./hmac":67,"./interface":69,"./json-wallet":70,"./keccak256":71,"./networks":72,"./properties":74,"./random-bytes":75,"./rlp":76,"./secp256k1":77,"./sha2":79,"./signing-key":81,"./solidity":82,"./transaction":83,"./units":84,"./utf8":85,"./web":86,"./wordlist":87}],69:[function(e,a,t){"use strict";var r,c=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},function(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var d,o=e("./address"),f=e("./abi-coder"),i=e("./bignumber"),s=e("./bytes"),b=e("./hash"),l=e("./keccak256"),u=e("./properties"),h=n(e("../errors")),x=function(e){u.setType(this,"Indexed"),u.defineReadOnly(this,"hash",e)},p=(e=function(e){for(var a in u.setType(this,"Description"),e)u.defineReadOnly(this,a,u.deepCopy(e[a],!0));Object.freeze(this)},c(m,d=e),m.prototype.encode=function(e,a){s.isHexString(e)||h.throwError("invalid contract bytecode",h.INVALID_ARGUMENT,{arg:"bytecode",value:e}),h.checkArgumentCount(a.length,this.inputs.length," in Interface constructor");try{return e+f.defaultAbiCoder.encode(this.inputs,a).substring(2)}catch(e){h.throwError("invalid constructor argument",h.INVALID_ARGUMENT,{arg:e.arg,reason:e.reason,value:e.value})}return null},m);function m(){return null!==d&&d.apply(this,arguments)||this}var v,g=(c(y,v=e),y.prototype.encode=function(e){h.checkArgumentCount(e.length,this.inputs.length," in interface function "+this.name);try{return this.sighash+f.defaultAbiCoder.encode(this.inputs,e).substring(2)}catch(e){h.throwError("invalid input argument",h.INVALID_ARGUMENT,{arg:e.arg,reason:e.reason,value:e.value})}return null},y.prototype.decode=function(a){try{return f.defaultAbiCoder.decode(this.outputs,s.arrayify(a))}catch(e){h.throwError("invalid data for function output",h.INVALID_ARGUMENT,{arg:"data",errorArg:e.arg,errorValue:e.value,value:a,reason:e.reason})}},y);function y(){return null!==v&&v.apply(this,arguments)||this}var k,w=(c(I,k=e),I);function I(){return null!==k&&k.apply(this,arguments)||this}var _,E=(c(N,_=e),N.prototype.encodeTopics=function(e){var a=this;e.length>this.inputs.length&&h.throwError("too many arguments for "+this.name,h.UNEXPECTED_ARGUMENT,{maxCount:e.length,expectedCount:this.inputs.length});var t=[];for(this.anonymous||t.push(this.topic),e.forEach((function(e,r){var c=a.inputs[r];c.indexed?null==e?t.push(null):"string"===c.type?t.push(b.id(e)):"bytes"===c.type?t.push(l.keccak256(e)):-1!==c.type.indexOf("[")||"tuple"===c.type.substring(0,5)?h.throwError("filtering with tuples or arrays not implemented yet; bug us on GitHub",h.NOT_IMPLEMENTED,{operation:"filter(array|tuple)"}):("address"===c.type&&o.getAddress(e),t.push(s.hexZeroPad(s.hexlify(e),32).toLowerCase())):null!=e&&h.throwError("cannot filter non-indexed parameters; must be null",h.INVALID_ARGUMENT,{argument:c.name||r,value:e})}));t.length&&null===t[t.length-1];)t.pop();return t},N.prototype.decode=function(e,a){null==a||this.anonymous||(a=a.slice(1));var t,r=[],c=[],n=[];this.inputs.forEach((function(e,a){e.indexed?"string"===e.type||"bytes"===e.type||0<=e.type.indexOf("[")||"tuple"===e.type.substring(0,5)?(r.push({type:"bytes32",name:e.name||""}),n.push(!0)):(r.push(e),n.push(!1)):(c.push(e),n.push(!1))})),null!=a&&(t=f.defaultAbiCoder.decode(r,s.concat(a)));var d=f.defaultAbiCoder.decode(c,s.arrayify(e)),o={},i=0,b=0;return this.inputs.forEach((function(e,r){e.indexed?null==a?o[r]=new x(null):n[r]?o[r]=new x(t[b++]):o[r]=t[b++]:o[r]=d[i++],e.name&&(o[e.name]=o[r])})),o.length=this.inputs.length,new w(o)},N);function N(){return null!==_&&_.apply(this,arguments)||this}var H,S=(c(A,H=e),A);function A(){return null!==H&&H.apply(this,arguments)||this}var M,T=(c(P,M=e),P);function P(){return null!==M&&M.apply(this,arguments)||this}function O(e){switch(e.type){case"constructor":var a=new p({inputs:e.inputs,payable:null==e.payable||!!e.payable});this.deployFunction||(this.deployFunction=a);break;case"function":var t=f.formatSignature(e).replace(/tuple/g,""),r=b.id(t).substring(0,10),c=!1;null!=e.constant?c=e.constant:null!=e.stateMutability&&(c="view"==e.stateMutability||"pure"==e.stateMutability),a=new g({inputs:e.inputs,outputs:e.outputs,gas:e.gas,payable:null==e.payable||!!e.payable,type:c?"call":"transaction",name:e.name,signature:t,sighash:r}),e.name&&(null==this.functions[e.name]?u.defineReadOnly(this.functions,e.name,a):h.warn("WARNING: Multiple definitions for "+e.name)),null==this.functions[a.signature]&&u.defineReadOnly(this.functions,a.signature,a);break;case"event":t=f.formatSignature(e).replace(/tuple/g,""),a=new E({name:e.name,signature:t,inputs:e.inputs,topic:b.id(t),anonymous:!!e.anonymous}),e.name&&null==this.events[e.name]&&u.defineReadOnly(this.events,e.name,a),null==this.events[a.signature]&&u.defineReadOnly(this.events,a.signature,a);break;case"receive":case"fallback":break;default:h.warn("WARNING: unsupported ABI type - "+e.type)}}function C(a){if(h.checkNew(this,C),"string"==typeof a){try{a=JSON.parse(a)}catch(e){h.throwError("could not parse ABI JSON",h.INVALID_ARGUMENT,{arg:"abi",errorMessage:e.message,value:a})}if(!Array.isArray(a))return h.throwError("invalid abi",h.INVALID_ARGUMENT,{arg:"abi",value:a}),null}u.defineReadOnly(this,"functions",{}),u.defineReadOnly(this,"events",{});var t=[];a.forEach((function(e){"string"==typeof e&&(e=f.parseSignature(e)),t.push(e)})),u.defineReadOnly(this,"abi",u.deepCopy(t,!0)),t.forEach(O,this),this.deployFunction||O.call(this,{type:"constructor",inputs:[]}),u.setType(this,"Interface")}C.prototype.parseTransaction=function(e){var a,t=e.data.substring(0,10).toLowerCase();for(a in this.functions)if(-1!==a.indexOf("(")){var r=this.functions[a];if(r.sighash===t){var c=f.defaultAbiCoder.decode(r.inputs,"0x"+e.data.substring(10));return new S({args:c,decode:r.decode,name:r.name,signature:r.signature,sighash:r.sighash,value:i.bigNumberify(e.value||"0")})}}return null},C.prototype.parseLog=function(e){for(var a in this.events)if(-1!==a.indexOf("(")&&!(a=this.events[a]).anonymous&&a.topic===e.topics[0])return new T({decode:a.decode,name:a.name,signature:a.signature,topic:a.topic,values:a.decode(e.data,e.topics)});return null},C.isInterface=function(e){return u.isType(e,"Interface")},C.isIndexed=function(e){return u.isType(e,"Indexed")},e=C,t.Interface=e},{"../errors":5,"./abi-coder":59,"./address":60,"./bignumber":63,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74}],70:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("./address");function c(e){try{var a=JSON.parse(e)}catch(e){return!1}return a.encseed&&a.ethaddr}function n(e){try{var a=JSON.parse(e)}catch(e){return!1}return!(!a.version||parseInt(a.version)!==a.version||3!==parseInt(a.version))}t.isCrowdsaleWallet=c,t.isSecretStorageWallet=n,t.getJsonWalletAddress=function(e){if(c(e))try{return r.getAddress(JSON.parse(e).ethaddr)}catch(e){return null}if(n(e))try{return r.getAddress(JSON.parse(e).address)}catch(e){return null}return null}},{"./address":60}],71:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("js-sha3"),c=e("./bytes");t.keccak256=function(e){return"0x"+r.keccak_256(c.arrayify(e))}},{"./bytes":64,"js-sha3":40}],72:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c=r(e("../errors"));function n(e){return function(a){var t=[];return a.InfuraProvider&&t.push(new a.InfuraProvider(e)),a.EtherscanProvider&&t.push(new a.EtherscanProvider(e)),0===t.length?null:a.FallbackProvider?new a.FallbackProvider(t):t[0]}}function d(e,a){return function(t){return t.JsonRpcProvider?new t.JsonRpcProvider(e,a):null}}var o={unspecified:{chainId:0,name:"unspecified"},homestead:r={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:n("homestead")},mainnet:r,morden:{chainId:2,name:"morden"},ropsten:e={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:n("ropsten")},testnet:e,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:n("rinkeby")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:n("goerli")},kovan:{chainId:42,name:"kovan",_defaultProvider:n("kovan")},classic:{chainId:61,name:"classic",_defaultProvider:d("https://web3.gastracker.io","classic")},classicTestnet:{chainId:62,name:"classicTestnet",_defaultProvider:d("https://web3.gastracker.io/morden","classicTestnet")}};t.getNetwork=function(e){if(null==e)return null;if("number"==typeof e){for(var a in o)if((a=o[a]).chainId===e)return{name:a.name,chainId:a.chainId,ensAddress:a.ensAddress||null,_defaultProvider:a._defaultProvider||null};return{chainId:e,name:"unknown"}}if("string"!=typeof e)return(t=o[e.name])?(0!==e.chainId&&e.chainId!==t.chainId&&c.throwError("network chainId mismatch",c.INVALID_ARGUMENT,{arg:"network",value:e}),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:e._defaultProvider||t._defaultProvider||null}):("number"!=typeof e.chainId&&c.throwError("invalid network chainId",c.INVALID_ARGUMENT,{arg:"network",value:e}),e);var t=o[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}},{"../errors":5}],73:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=e("../utils/bytes"),c=e("./hmac");t.pbkdf2=function(e,a,t,n,d){var o;e=r.arrayify(e),a=r.arrayify(a);var f,i,s=1,b=new Uint8Array(n),l=new Uint8Array(a.length+4);l.set(a);for(var u=1;u<=s;u++){l[a.length]=u>>24&255,l[a.length+1]=u>>16&255,l[a.length+2]=u>>8&255,l[a.length+3]=255&u;var h=c.computeHmac(d,e,l);o||(o=h.length,i=new Uint8Array(o),f=n-((s=Math.ceil(n/o))-1)*o),i.set(h);for(var x=1;x>=8;return a}function n(e,a,t){for(var r=0,c=0;ce.length)throw new Error("too short");if(a+1+t+(c=n(e,a+1,t))>e.length)throw new Error("to short");return d(e,a,a+1+t,t+c)}if(192<=e[a]){if(a+1+(c=e[a]-192)>e.length)throw new Error("invalid rlp data");return d(e,a,a+1,c)}if(184<=e[a]){var t;if(a+1+(t=e[a]-183)>e.length)throw new Error("invalid rlp data");if(a+1+t+(c=n(e,a+1,t))>e.length)throw new Error("invalid rlp data");return{consumed:1+t+c,result:r.hexlify(e.slice(a+1+t,a+1+t+c))}}if(128<=e[a]){var c;if(a+1+(c=e[a]-128)>e.length)throw new Error("invalid rlp data");return{consumed:1+c,result:r.hexlify(e.slice(a+1,a+1+c))}}return{consumed:1,result:r.hexlify(e[a])}}t.encode=function(e){return r.hexlify(function e(a){if(Array.isArray(a)){var t=[];return a.forEach((function(a){t=t.concat(e(a))})),t.length<=55?(t.unshift(192+t.length),t):((n=c(t.length)).unshift(247+n.length),n.concat(t))}var n;return 1===(a=Array.prototype.slice.call(r.arrayify(a))).length&&a[0]<=127?a:a.length<=55?(a.unshift(128+a.length),a):((n=c(a.length)).unshift(183+n.length),n.concat(a))}(e))},t.decode=function(e){var a=r.arrayify(e);if((e=o(a,0)).consumed!==a.length)throw new Error("invalid rlp data");return e.result}},{"./bytes":64}],77:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c=e("elliptic"),n=e("./address"),d=e("./bytes"),o=e("./hash"),f=e("./keccak256"),i=e("./properties"),s=r(e("../errors")),b=null;function l(){return b=b||new c.ec("secp256k1")}var u=(h.prototype.sign=function(e){return{recoveryParam:(e=l().keyFromPrivate(d.arrayify(this.privateKey)).sign(d.arrayify(e),{canonical:!0})).recoveryParam,r:d.hexZeroPad("0x"+e.r.toString(16),32),s:d.hexZeroPad("0x"+e.s.toString(16),32),v:27+e.recoveryParam}},h.prototype.computeSharedSecret=function(e){var a=l().keyFromPrivate(d.arrayify(this.privateKey));return e=l().keyFromPublic(d.arrayify(x(e))),d.hexZeroPad("0x"+a.derive(e.getPublic()).toString(16),32)},h.prototype._addPoint=function(e){var a=l().keyFromPublic(d.arrayify(this.publicKey));return e=l().keyFromPublic(d.arrayify(e)),"0x"+a.pub.add(e.pub).encodeCompressed("hex")},h);function h(e){e=l().keyFromPrivate(d.arrayify(e)),i.defineReadOnly(this,"privateKey",d.hexlify(e.priv.toArray("be",32))),i.defineReadOnly(this,"publicKey","0x"+e.getPublic(!1,"hex")),i.defineReadOnly(this,"compressedPublicKey","0x"+e.getPublic(!0,"hex")),i.defineReadOnly(this,"publicKeyBytes",e.getPublic().encode(null,!0))}function x(e,a){return 32!==(e=d.arrayify(e)).length?33===e.length?a?d.hexlify(e):"0x"+l().keyFromPublic(e).getPublic(!1,"hex"):65===e.length?a?"0x"+l().keyFromPublic(e).getPublic(!0,"hex"):d.hexlify(e):(s.throwError("invalid public or private key",s.INVALID_ARGUMENT,{arg:"key",value:"[REDACTED]"}),null):(e=new u(e),a?e.compressedPublicKey:e.publicKey)}function p(e){return e="0x"+x(e).slice(4),n.getAddress("0x"+f.keccak256(e).substring(26))}function m(e,a){var t=d.splitSignature(a);return a={r:d.arrayify(t.r),s:d.arrayify(t.s)},"0x"+l().recoverPubKey(d.arrayify(e),a,t.recoveryParam).encode("hex",!1)}function v(e,a){return p(m(d.arrayify(e),a))}t.KeyPair=u,t.computePublicKey=x,t.computeAddress=p,t.recoverPublicKey=m,t.recoverAddress=v,t.verifyMessage=function(e,a){return v(o.hashMessage(e),a)}},{"../errors":5,"./address":60,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74,elliptic:12}],78:[function(e,a,t){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var n=r(e("aes-js")),d=r(e("scrypt-js")),o=r(e("uuid")),f=e("./signing-key"),i=c(e("./hdnode")),s=e("./address"),b=e("./bytes"),l=e("./pbkdf2"),u=e("./keccak256"),h=e("./utf8"),x=e("./random-bytes");function p(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),b.arrayify(e)}function m(e,a){for(e=String(e);e.lengtha.maxLength&&n.throwError("invalid length for "+a.name,n.INVALID_ARGUMENT,{arg:"transaction"+a.name,value:r}),t.push(i.hexlify(r))})),null!=e.chainId&&0!==e.chainId&&(t.push(i.hexlify(e.chainId)),t.push("0x"),t.push("0x"));var r=l.encode(t);return a?(a=27+(r=i.splitSignature(a)).recoveryParam,9===t.length&&(t.pop(),t.pop(),t.pop(),a+=2*e.chainId+8),t.push(i.hexlify(a)),t.push(i.stripZeros(i.arrayify(r.r))),t.push(i.stripZeros(i.arrayify(r.s))),l.encode(t)):r},t.parse=function(e){9!==(r=l.decode(e)).length&&6!==r.length&&n.throwError("invalid raw transaction",n.INVALID_ARGUMENT,{arg:"rawTransactin",value:e});var a={nonce:h(r[0]).toNumber(),gasPrice:h(r[1]),gasLimit:h(r[2]),to:"0x"===(t=r[3])?null:o.getAddress(t),value:h(r[4]),data:r[5],chainId:0};if(6===r.length)return a;try{a.v=f.bigNumberify(r[6]).toNumber()}catch(e){return n.info(e),a}if(a.r=i.hexZeroPad(r[7],32),a.s=i.hexZeroPad(r[8],32),f.bigNumberify(a.r).isZero()&&f.bigNumberify(a.s).isZero())a.chainId=a.v,a.v=0;else{a.chainId=Math.floor((a.v-35)/2),a.chainId<0&&(a.chainId=0);var t=a.v-27,r=r.slice(0,6);0!==a.chainId&&(r.push(i.hexlify(a.chainId)),r.push("0x"),r.push("0x"),t-=2*a.chainId+8),r=s.keccak256(l.encode(r));try{a.from=d.recoverAddress(r,{r:i.hexlify(a.r),s:i.hexlify(a.s),recoveryParam:t})}catch(e){n.info(e)}a.hash=s.keccak256(e)}return a},t.populateTransaction=function(e,a,t){u.Provider.isProvider(a)||n.throwError("missing provider",n.INVALID_ARGUMENT,{argument:"provider",value:a}),b.checkProperties(e,p);var r=b.shallowCopy(e);return null!=r.to&&(r.to=a.resolveName(r.to)),null==r.gasPrice&&(r.gasPrice=a.getGasPrice()),null==r.nonce&&(r.nonce=a.getTransactionCount(t)),null==r.gasLimit&&((e=b.shallowCopy(r)).from=t,r.gasLimit=a.estimateGas(e)),null==r.chainId&&(r.chainId=a.getNetwork().then((function(e){return e.chainId}))),b.resolveProperties(r)}},{"../constants":3,"../errors":5,"../providers/abstract-provider":50,"./address":60,"./bignumber":63,"./bytes":64,"./keccak256":71,"./properties":74,"./rlp":76,"./secp256k1":77}],84:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c,n=e("../constants"),d=r(e("../errors")),o=e("./bignumber"),f={};function i(e){return{decimals:e.length-1,tenPower:o.bigNumberify(e)}}function s(e){var a=f[String(e).toLowerCase()];if(!a&&"number"==typeof e&&parseInt(String(e))==e&&0<=e&&e<=256){for(var t="1",r=0;rt.decimals&&d.throwError("underflow occurred",d.NUMERIC_FAULT,{operation:"division",fault:"underflow"});c.length>6|192),t.push(63&o|128);else if(55296==(64512&o)){c++;var f=e.charCodeAt(c);if(c>=e.length||56320!=(64512&f))throw new Error("invalid utf-8 string");t.push((o=65536+((1023&o)<<10)+(1023&f))>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(63&o|128)}else t.push(o>>12|224),t.push(o>>6&63|128),t.push(63&o|128)}return d.arrayify(t)}function f(e,a){e=d.arrayify(e);for(var t="",r=0;r>7!=0){var n=null,o=null;if(192==(224&c))n=1,o=127;else if(224==(240&c))n=2,o=2047;else{if(240!=(248&c)){if(a)continue;if(128==(192&c))throw new Error("invalid utf8 byte sequence; unexpected continuation byte");throw new Error("invalid utf8 byte sequence; invalid prefix")}n=3,o=65535}if(r+n>e.length){if(!a)throw new Error("invalid utf8 byte sequence; too short");for(;r>6==2;r++);}else{for(var f=c&(1<<8-n-1)-1,i=0;i>10&1023),56320+(1023&f)));else if(!a)throw new Error("invalid utf8 byte sequence; invalid continuation byte")}}else t+=String.fromCharCode(c)}return t}(e=r=t.UnicodeNormalizationForm||(t.UnicodeNormalizationForm={})).current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD",t.toUtf8Bytes=o,t.toUtf8String=f,t.formatBytes32String=function(e){if(31<(e=o(e)).length)throw new Error("bytes32 string must be less than 32 bytes");return d.hexlify(d.concat([e,c.HashZero]).slice(0,32))},t.parseBytes32String=function(e){var a=d.arrayify(e);if(32!==a.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==a[31])throw new Error("invalid bytes32 string - no null terminator");for(var t=31;0===a[t-1];)t--;return f(a.slice(0,t))}},{"../constants":3,"../errors":5,"./bytes":64}],86:[function(e,a,t){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var c=e("xmlhttprequest"),n=e("./base64"),d=e("./properties"),o=e("./utf8"),f=r(e("../errors"));t.fetchJson=function(e,a,t){var r,d={},i=null,s=12e4;if("string"==typeof e)i=e;else if("object"==typeof e){if(null==e.url&&f.throwError("missing URL",f.MISSING_ARGUMENT,{arg:"url"}),i=e.url,"number"==typeof e.timeout&&0a.ceiling&&(e=a.ceiling),o&&(f--,e=o,o=null),setTimeout(c,e)),null}),(function(e){d()&&r(e)}))}()}))}},{"../errors":5,"./base64":61,"./properties":74,"./utf8":85,xmlhttprequest:49}],87:[function(e,a,r){(function(a){(function(){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a=e("../utils/hash"),t=e("../utils/properties");r.check=function(e){for(var t=[],r=0;r<2048;r++){var c=e.getWord(r);if(r!==e.getWordIndex(c))return"0x";t.push(c)}return a.id(t.join("\n")+"\n")};var c=(n.prototype.split=function(e){return e.toLowerCase().split(/ +/g)},n.prototype.join=function(e){return e.join(" ")},n);function n(e){t.defineReadOnly(this,"locale",e)}r.Wordlist=c,r.register=function(e,a){a=a||e.locale}}).call(this)}).call(this,"undefined"!=typeof t.g?t.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/hash":65,"../utils/properties":74}],88:[function(e,a,t){"use strict";var r,c=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},function(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(a[t]=e[t]);return a.default=e,a};Object.defineProperty(t,"__esModule",{value:!0});var d,o=e("./utils/bytes"),f=e("./utils/hash"),i=e("./utils/hdnode"),s=e("./utils/json-wallet"),b=e("./utils/keccak256"),l=e("./utils/properties"),u=e("./utils/random-bytes"),h=n(e("./utils/secret-storage")),x=e("./utils/signing-key"),p=e("./utils/transaction"),m=e("./abstract-signer"),v=e("./providers/abstract-provider"),g=n(e("./errors"));function y(e,a){var t=d.call(this)||this;return g.checkNew(t,y),x.SigningKey.isSigningKey(e)?l.defineReadOnly(t,"signingKey",e):l.defineReadOnly(t,"signingKey",new x.SigningKey(e)),l.defineReadOnly(t,"provider",a),t}c(y,d=m.Signer),Object.defineProperty(y.prototype,"address",{get:function(){return this.signingKey.address},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"mnemonic",{get:function(){return this.signingKey.mnemonic},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"path",{get:function(){return this.signingKey.path},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"privateKey",{get:function(){return this.signingKey.privateKey},enumerable:!0,configurable:!0}),y.prototype.connect=function(e){return v.Provider.isProvider(e)||g.throwError("invalid provider",g.INVALID_ARGUMENT,{argument:"provider",value:e}),new y(this.signingKey,e)},y.prototype.getAddress=function(){return Promise.resolve(this.address)},y.prototype.sign=function(e){var a=this;return l.resolveProperties(e).then((function(e){var t=p.serialize(e);return t=a.signingKey.signDigest(b.keccak256(t)),p.serialize(e,t)}))},y.prototype.signMessage=function(e){return Promise.resolve(o.joinSignature(this.signingKey.signDigest(f.hashMessage(e))))},y.prototype.getBalance=function(e){if(!this.provider)throw new Error("missing provider");return this.provider.getBalance(this.address,e)},y.prototype.getTransactionCount=function(e){if(!this.provider)throw new Error("missing provider");return this.provider.getTransactionCount(this.address,e)},y.prototype.sendTransaction=function(e){var a=this;if(!this.provider)throw new Error("missing provider");return null==e.nonce&&((e=l.shallowCopy(e)).nonce=this.getTransactionCount("pending")),p.populateTransaction(e,this.provider,this.address).then((function(e){return a.sign(e).then((function(e){return a.provider.sendTransaction(e)}))}))},y.prototype.encrypt=function(e,a,t){if("function"!=typeof a||t||(t=a,a={}),t&&"function"!=typeof t)throw new Error("invalid callback");return a=a||{},this.mnemonic&&((a=l.shallowCopy(a)).mnemonic=this.mnemonic,a.path=this.path),h.encrypt(this.privateKey,e,a,t)},y.createRandom=function(e){var a=u.randomBytes(16);return(e=e||{}).extraEntropy&&(a=o.arrayify(b.keccak256(o.concat([a,e.extraEntropy])).substring(0,34))),a=i.entropyToMnemonic(a,e.locale),y.fromMnemonic(a,e.path,e.locale)},y.fromEncryptedJson=function(e,a,t){if(s.isCrowdsaleWallet(e))try{t&&t(0);var r=h.decryptCrowdsale(e,a);return t&&t(1),Promise.resolve(new y(r))}catch(e){return Promise.reject(e)}else if(s.isSecretStorageWallet(e))return h.decrypt(e,a,t).then((function(e){return new y(e)}));return Promise.reject("invalid wallet JSON")},y.fromMnemonic=function(e,a,t){return a=a||i.defaultPath,new y(i.fromMnemonic(e,t).derivePath(a))},c=y,t.Wallet=c},{"./abstract-signer":2,"./errors":5,"./providers/abstract-provider":50,"./utils/bytes":64,"./utils/hash":65,"./utils/hdnode":66,"./utils/json-wallet":70,"./utils/keccak256":71,"./utils/properties":74,"./utils/random-bytes":75,"./utils/secret-storage":78,"./utils/signing-key":81,"./utils/transaction":83}],89:[function(e,a,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e=e("../wordlists/lang-en").langEn,t.en=e},{"../wordlists/lang-en":90}],90:[function(e,a,t){"use strict";var r,c=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var t in a)a.hasOwnProperty(t)&&(e[t]=a[t])},function(e,a){function t(){this.constructor=e}r(e,a),e.prototype=null===a?Object.create(a):(t.prototype=a.prototype,new t)});Object.defineProperty(t,"__esModule",{value:!0});var n,d=e("../utils/wordlist"),o="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",f=null;function i(e){if(null==f&&(f=o.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==d.check(e)))throw f=null,new Error("BIP39 Wordlist for en (English) FAILED")}function s(){return n.call(this,"en")||this}c=new(c(s,n=d.Wordlist),s.prototype.getWord=function(e){return i(this),f[e]},s.prototype.getWordIndex=function(e){return i(this),f.indexOf(e)},s),t.langEn=c,d.register(c)},{"../utils/wordlist":87}]},{},[7])(7)},67822:function(e,a,t){"use strict";e=t.nmd(e);var r=t(87287),c=function(e,a){return function(){var t=e.apply(r,arguments);return"\x1b[".concat(t+a,"m")}},n=function(e,a){return function(){var t=e.apply(r,arguments);return"\x1b[".concat(38+a,";5;").concat(t,"m")}},d=function(e,a){return function(){var t=e.apply(r,arguments);return"\x1b[".concat(38+a,";2;").concat(t[0],";").concat(t[1],";").concat(t[2],"m")}};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){var e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.grey=a.color.gray;for(var t=0,o=Object.keys(a);t>6],c=0===(32&t);if(31===(31&t)){var n=t;for(t=0;128===(128&n);){if(n=e.readUInt8(a),e.isError(n))return n;t<<=7,t|=127&n}}else t&=31;return{cls:r,primitive:c,tag:t,tagStr:o.tag[t]}}function b(e,a,t){var r=e.readUInt8(t);if(e.isError(r))return r;if(!a&&128===r)return null;if(0===(128&r))return r;var c=127&r;if(c>4)return e.error("length octect is too long");r=0;for(var n=0;n=31)return r.error("Multi-octet tag encoding unsupported");a||(c|=32);return c|=d.tagClassByName[t||"universal"]<<6}(e,a,t,this.reporter);if(r.length<128){var o=c.alloc(2);return o[0]=n,o[1]=r.length,this._createEncoderBuffer([o,r])}for(var f=1,i=r.length;i>=256;i>>=8)f++;var s=c.alloc(2+f);s[0]=n,s[1]=128|f;for(var b=1+f,l=r.length;l>0;b--,l>>=8)s[b]=255&l;return this._createEncoderBuffer([s,r])},f.prototype._encodeStr=function(e,a){if("bitstr"===a)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===a){for(var t=c.alloc(2*e.length),r=0;r=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var d=0,o=0;o=128;f>>=7)d++}for(var i=c.alloc(d),s=i.length-1,b=e.length-1;b>=0;b--){var l=e[b];for(i[s--]=127&l;(l>>=7)>0;)i[s--]=128|127&l}return this._createEncoderBuffer(i)},f.prototype._encodeTime=function(e,a){var t,r=new Date(e);return"gentime"===a?t=[i(r.getUTCFullYear()),i(r.getUTCMonth()+1),i(r.getUTCDate()),i(r.getUTCHours()),i(r.getUTCMinutes()),i(r.getUTCSeconds()),"Z"].join(""):"utctime"===a?t=[i(r.getUTCFullYear()%100),i(r.getUTCMonth()+1),i(r.getUTCDate()),i(r.getUTCHours()),i(r.getUTCMinutes()),i(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+a+" time is not supported yet"),this._encodeStr(t,"octstr")},f.prototype._encodeNull=function(){return this._createEncoderBuffer("")},f.prototype._encodeInt=function(e,a){if("string"===typeof e){if(!a)return this.reporter.error("String int or enum given, but no values map");if(!a.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=a[e]}if("number"!==typeof e&&!c.isBuffer(e)){var t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=c.from(t)}if(c.isBuffer(e)){var r=e.length;0===e.length&&r++;var n=c.alloc(r);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var d=1,o=e;o>=256;o>>=8)d++;for(var f=new Array(d),i=f.length-1;i>=0;i--)f[i]=255&e,e>>=8;return 128&f[0]&&f.unshift(0),this._createEncoderBuffer(c.from(f))},f.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},f.prototype._use=function(e,a){return"function"===typeof e&&(e=e(a)),e._getEncoder("der").tree},f.prototype._skipDefault=function(e,a,t){var r,c=this._baseState;if(null===c.default)return!1;var n=e.join();if(void 0===c.defaultBuffer&&(c.defaultBuffer=this._encodeValue(c.default,a,t).join()),n.length!==c.defaultBuffer.length)return!1;for(r=0;r1?t-1:0),c=1;c1?t-1:0),c=1;c1?t-1:0),c=1;c1?t-1:0),c=1;ce.length)&&(t=e.length),e.substring(t-a.length,t)===a}var m="",v="",g="",y="",k={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(e){var a=Object.keys(e),t=Object.create(Object.getPrototypeOf(e));return a.forEach((function(a){t[a]=e[a]})),Object.defineProperty(t,"message",{value:e.message}),t}function I(e){return h(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function _(e,a,t){var c="",n="",d=0,o="",f=!1,i=I(e),s=i.split("\n"),b=I(a).split("\n"),l=0,h="";if("strictEqual"===t&&"object"===u(e)&&"object"===u(a)&&null!==e&&null!==a&&(t="strictEqualObject"),1===s.length&&1===b.length&&s[0]!==b[0]){var x=s[0].length+b[0].length;if(x<=10){if(("object"!==u(e)||null===e)&&("object"!==u(a)||null===a)&&(0!==e||0!==a))return"".concat(k[t],"\n\n")+"".concat(s[0]," !== ").concat(b[0],"\n")}else if("strictEqualObject"!==t){if(x<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;s[0][l]===b[0][l];)l++;l>2&&(h="\n ".concat(function(e,a){if(a=Math.floor(a),0==e.length||0==a)return"";var t=e.length*a;for(a=Math.floor(Math.log(a)/Math.log(2));a;)e+=e,a--;return e+e.substring(0,t-e.length)}(" ",l),"^"),l=0)}}}for(var w=s[s.length-1],_=b[b.length-1];w===_&&(l++<2?o="\n ".concat(w).concat(o):c=w,s.pop(),b.pop(),0!==s.length&&0!==b.length);)w=s[s.length-1],_=b[b.length-1];var E=Math.max(s.length,b.length);if(0===E){var N=i.split("\n");if(N.length>30)for(N[26]="".concat(m,"...").concat(y);N.length>27;)N.pop();return"".concat(k.notIdentical,"\n\n").concat(N.join("\n"),"\n")}l>3&&(o="\n".concat(m,"...").concat(y).concat(o),f=!0),""!==c&&(o="\n ".concat(c).concat(o),c="");var H=0,S=k[t]+"\n".concat(v,"+ actual").concat(y," ").concat(g,"- expected").concat(y),A=" ".concat(m,"...").concat(y," Lines skipped");for(l=0;l1&&l>2&&(M>4?(n+="\n".concat(m,"...").concat(y),f=!0):M>3&&(n+="\n ".concat(b[l-2]),H++),n+="\n ".concat(b[l-1]),H++),d=l,c+="\n".concat(g,"-").concat(y," ").concat(b[l]),H++;else if(b.length1&&l>2&&(M>4?(n+="\n".concat(m,"...").concat(y),f=!0):M>3&&(n+="\n ".concat(s[l-2]),H++),n+="\n ".concat(s[l-1]),H++),d=l,n+="\n".concat(v,"+").concat(y," ").concat(s[l]),H++;else{var T=b[l],P=s[l],O=P!==T&&(!p(P,",")||P.slice(0,-1)!==T);O&&p(T,",")&&T.slice(0,-1)===P&&(O=!1,P+=","),O?(M>1&&l>2&&(M>4?(n+="\n".concat(m,"...").concat(y),f=!0):M>3&&(n+="\n ".concat(s[l-2]),H++),n+="\n ".concat(s[l-1]),H++),d=l,n+="\n".concat(v,"+").concat(y," ").concat(P),c+="\n".concat(g,"-").concat(y," ").concat(T),H+=2):(n+=c,c="",1!==M&&0!==l||(n+="\n ".concat(P),H++))}if(H>20&&l30)for(p[26]="".concat(m,"...").concat(y);p.length>27;)p.pop();t=1===p.length?d(this,l(a).call(this,"".concat(h," ").concat(p[0]))):d(this,l(a).call(this,"".concat(h,"\n\n").concat(p.join("\n"),"\n")))}else{var E=I(i),N="",H=k[n];"notDeepEqual"===n||"notEqual"===n?(E="".concat(k[n],"\n\n").concat(E)).length>1024&&(E="".concat(E.slice(0,1021),"...")):(N="".concat(I(s)),E.length>512&&(E="".concat(E.slice(0,509),"...")),N.length>512&&(N="".concat(N.slice(0,509),"...")),"deepEqual"===n||"equal"===n?E="".concat(H,"\n\n").concat(E,"\n\nshould equal\n\n"):N=" ".concat(n," ").concat(N)),t=d(this,l(a).call(this,"".concat(E).concat(N)))}return Error.stackTraceLimit=b,t.generatedMessage=!c,Object.defineProperty(o(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=i,t.expected=s,t.operator=n,Error.captureStackTrace&&Error.captureStackTrace(o(t),f),t.stack,t.name="AssertionError",d(t)}var t,f,i;return function(e,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),a&&b(e,a)}(a,e),t=a,f=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:h.custom,value:function(e,a){return h(this,function(e){for(var a=1;a2?"one of ".concat(a," ").concat(e.slice(0,t-1).join(", "),", or ")+e[t-1]:2===t?"one of ".concat(a," ").concat(e[0]," or ").concat(e[1]):"of ".concat(a," ").concat(e[0])}return"of ".concat(a," ").concat(String(e))}s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",(function(e,a,c){var n,d,f,i;if(void 0===o&&(o=t(88093)),o("string"===typeof e,"'name' must be a string"),"string"===typeof a&&(d="not ",a.substr(!f||f<0?0:+f,d.length)===d)?(n="must not be",a=a.replace(/^not /,"")):n="must be",function(e,a,t){return(void 0===t||t>e.length)&&(t=e.length),e.substring(t-a.length,t)===a}(e," argument"))i="The ".concat(e," ").concat(n," ").concat(b(a,"type"));else{var s=function(e,a,t){return"number"!==typeof t&&(t=0),!(t+a.length>e.length)&&-1!==e.indexOf(a,t)}(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(s," ").concat(n," ").concat(b(a,"type"))}return i+=". Received type ".concat(r(c))}),TypeError),s("ERR_INVALID_ARG_VALUE",(function(e,a){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===f&&(f=t(49639));var c=f.inspect(a);return c.length>128&&(c="".concat(c.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(c)}),TypeError,RangeError),s("ERR_INVALID_RETURN_VALUE",(function(e,a,t){var c;return c=t&&t.constructor&&t.constructor.name?"instance of ".concat(t.constructor.name):"type ".concat(r(t)),"Expected ".concat(e,' to be returned from the "').concat(a,'"')+" function but got ".concat(c,".")}),TypeError),s("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,a=new Array(e),r=0;r0,"At least one arg needs to be specified");var c="The ",n=a.length;switch(a=a.map((function(e){return'"'.concat(e,'"')})),n){case 1:c+="".concat(a[0]," argument");break;case 2:c+="".concat(a[0]," and ").concat(a[1]," arguments");break;default:c+=a.slice(0,n-1).join(", "),c+=", and ".concat(a[n-1]," arguments")}return"".concat(c," must be specified")}),TypeError),e.exports.codes=i},46912:function(e,a,t){"use strict";function r(e,a){return function(e){if(Array.isArray(e))return e}(e)||function(e,a){var t=[],r=!0,c=!1,n=void 0;try{for(var d,o=e[Symbol.iterator]();!(r=(d=o.next()).done)&&(t.push(d.value),!a||t.length!==a);r=!0);}catch(f){c=!0,n=f}finally{try{r||null==o.return||o.return()}finally{if(c)throw n}}return t}(e,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function c(e){return c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var n=void 0!==/a/g.flags,d=function(e){var a=[];return e.forEach((function(e){return a.push(e)})),a},o=function(e){var a=[];return e.forEach((function(e,t){return a.push([t,e])})),a},f=Object.is?Object.is:t(33454),i=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},s=Number.isNaN?Number.isNaN:t(6188);function b(e){return e.call.bind(e)}var l=b(Object.prototype.hasOwnProperty),u=b(Object.prototype.propertyIsEnumerable),h=b(Object.prototype.toString),x=t(49639).types,p=x.isAnyArrayBuffer,m=x.isArrayBufferView,v=x.isDate,g=x.isMap,y=x.isRegExp,k=x.isSet,w=x.isNativeError,I=x.isBoxedPrimitive,_=x.isNumberObject,E=x.isStringObject,N=x.isBooleanObject,H=x.isBigIntObject,S=x.isSymbolObject,A=x.isFloat32Array,M=x.isFloat64Array;function T(e){if(0===e.length||e.length>10)return!0;for(var a=0;a57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function P(e){return Object.keys(e).filter(T).concat(i(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function O(e,a){if(e===a)return 0;for(var t=e.length,r=a.length,c=0,n=Math.min(t,r);cs;)if((o=f[s++])!=o)return!0}else for(;i>s;s++)if((e||s in f)&&f[s]===t)return e||s||0;return!e&&-1}}},26413:function(e,a,t){var r=t(93760),c=t(56505)("toStringTag"),n="Arguments"==r(function(){return arguments}());e.exports=function(e){var a,t,d;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,a){try{return e[a]}catch(t){}}(a=Object(e),c))?t:n?r(a):"Object"==(d=r(a))&&"function"==typeof a.callee?"Arguments":d}},93760:function(e){var a={}.toString;e.exports=function(e){return a.call(e).slice(8,-1)}},40640:function(e){var a=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=a)},79882:function(e,a,t){var r=t(67281);e.exports=function(e,a,t){if(r(e),void 0===a)return e;switch(t){case 1:return function(t){return e.call(a,t)};case 2:return function(t,r){return e.call(a,t,r)};case 3:return function(t,r,c){return e.call(a,t,r,c)}}return function(){return e.apply(a,arguments)}}},16101:function(e){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},73457:function(e,a,t){e.exports=!t(31718)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},80244:function(e,a,t){var r=t(65682),c=t(69765).document,n=r(c)&&r(c.createElement);e.exports=function(e){return n?c.createElement(e):{}}},2158:function(e){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},37594:function(e,a,t){var r=t(55059),c=t(87141),n=t(52553);e.exports=function(e){var a=r(e),t=c.f;if(t)for(var d,o=t(e),f=n.f,i=0;o.length>i;)f.call(e,d=o[i++])&&a.push(d);return a}},58430:function(e,a,t){var r=t(69765),c=t(40640),n=t(79882),d=t(61086),o=t(39820),f=function e(a,t,f){var i,s,b,l=a&e.F,u=a&e.G,h=a&e.S,x=a&e.P,p=a&e.B,m=a&e.W,v=u?c:c[t]||(c[t]={}),g=v.prototype,y=u?r:h?r[t]:(r[t]||{}).prototype;for(i in u&&(f=t),f)(s=!l&&y&&void 0!==y[i])&&o(v,i)||(b=s?y[i]:f[i],v[i]=u&&"function"!=typeof y[i]?f[i]:p&&s?n(b,r):m&&y[i]==b?function(e){var a=function(a,t,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(a);case 2:return new e(a,t)}return new e(a,t,r)}return e.apply(this,arguments)};return a.prototype=e.prototype,a}(b):x&&"function"==typeof b?n(Function.call,b):b,x&&((v.virtual||(v.virtual={}))[i]=b,a&e.R&&g&&!g[i]&&d(g,i,b)))};f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,e.exports=f},31718:function(e){e.exports=function(e){try{return!!e()}catch(a){return!0}}},54435:function(e,a,t){var r=t(79882),c=t(34567),n=t(44175),d=t(79478),o=t(89839),f=t(78458),i={},s={},b=e.exports=function(e,a,t,b,l){var u,h,x,p,m=l?function(){return e}:f(e),v=r(t,b,a?2:1),g=0;if("function"!=typeof m)throw TypeError(e+" is not iterable!");if(n(m)){for(u=o(e.length);u>g;g++)if((p=a?v(d(h=e[g])[0],h[1]):v(e[g]))===i||p===s)return p}else for(x=m.call(e);!(h=x.next()).done;)if((p=c(x,v,h.value,a))===i||p===s)return p};b.BREAK=i,b.RETURN=s},69765:function(e){var a=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},39820:function(e){var a={}.hasOwnProperty;e.exports=function(e,t){return a.call(e,t)}},61086:function(e,a,t){var r=t(51272),c=t(6117);e.exports=t(73457)?function(e,a,t){return r.f(e,a,c(1,t))}:function(e,a,t){return e[a]=t,e}},45942:function(e,a,t){var r=t(69765).document;e.exports=r&&r.documentElement},23952:function(e,a,t){e.exports=!t(73457)&&!t(31718)((function(){return 7!=Object.defineProperty(t(80244)("div"),"a",{get:function(){return 7}}).a}))},74727:function(e){e.exports=function(e,a,t){var r=void 0===t;switch(a.length){case 0:return r?e():e.call(t);case 1:return r?e(a[0]):e.call(t,a[0]);case 2:return r?e(a[0],a[1]):e.call(t,a[0],a[1]);case 3:return r?e(a[0],a[1],a[2]):e.call(t,a[0],a[1],a[2]);case 4:return r?e(a[0],a[1],a[2],a[3]):e.call(t,a[0],a[1],a[2],a[3])}return e.apply(t,a)}},21922:function(e,a,t){var r=t(93760);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},44175:function(e,a,t){var r=t(1700),c=t(56505)("iterator"),n=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||n[c]===e)}},58249:function(e,a,t){var r=t(93760);e.exports=Array.isArray||function(e){return"Array"==r(e)}},65682:function(e){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},34567:function(e,a,t){var r=t(79478);e.exports=function(e,a,t,c){try{return c?a(r(t)[0],t[1]):a(t)}catch(d){var n=e.return;throw void 0!==n&&r(n.call(e)),d}}},59136:function(e,a,t){"use strict";var r=t(91760),c=t(6117),n=t(20825),d={};t(61086)(d,t(56505)("iterator"),(function(){return this})),e.exports=function(e,a,t){e.prototype=r(d,{next:c(1,t)}),n(e,a+" Iterator")}},85387:function(e,a,t){"use strict";var r=t(73845),c=t(58430),n=t(24368),d=t(61086),o=t(1700),f=t(59136),i=t(20825),s=t(94794),b=t(56505)("iterator"),l=!([].keys&&"next"in[].keys()),u="keys",h="values",x=function(){return this};e.exports=function(e,a,t,p,m,v,g){f(t,a,p);var y,k,w,I=function(e){if(!l&&e in H)return H[e];switch(e){case u:case h:return function(){return new t(this,e)}}return function(){return new t(this,e)}},_=a+" Iterator",E=m==h,N=!1,H=e.prototype,S=H[b]||H["@@iterator"]||m&&H[m],A=S||I(m),M=m?E?I("entries"):A:void 0,T="Array"==a&&H.entries||S;if(T&&(w=s(T.call(new e)))!==Object.prototype&&w.next&&(i(w,_,!0),r||"function"==typeof w[b]||d(w,b,x)),E&&S&&S.name!==h&&(N=!0,A=function(){return S.call(this)}),r&&!g||!l&&!N&&H[b]||d(H,b,A),o[a]=A,o[_]=x,m)if(y={values:E?A:I(h),keys:v?A:I(u),entries:M},g)for(k in y)k in H||n(H,k,y[k]);else c(c.P+c.F*(l||N),a,y);return y}},33471:function(e,a,t){var r=t(56505)("iterator"),c=!1;try{var n=[7][r]();n.return=function(){c=!0},Array.from(n,(function(){throw 2}))}catch(d){}e.exports=function(e,a){if(!a&&!c)return!1;var t=!1;try{var n=[7],o=n[r]();o.next=function(){return{done:t=!0}},n[r]=function(){return o},e(n)}catch(d){}return t}},82217:function(e){e.exports=function(e,a){return{value:a,done:!!e}}},1700:function(e){e.exports={}},73845:function(e){e.exports=!0},25619:function(e,a,t){var r=t(87898)("meta"),c=t(65682),n=t(39820),d=t(51272).f,o=0,f=Object.isExtensible||function(){return!0},i=!t(31718)((function(){return f(Object.preventExtensions({}))})),s=function(e){d(e,r,{value:{i:"O"+ ++o,w:{}}})},b=e.exports={KEY:r,NEED:!1,fastKey:function(e,a){if(!c(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!n(e,r)){if(!f(e))return"F";if(!a)return"E";s(e)}return e[r].i},getWeak:function(e,a){if(!n(e,r)){if(!f(e))return!0;if(!a)return!1;s(e)}return e[r].w},onFreeze:function(e){return i&&b.NEED&&f(e)&&!n(e,r)&&s(e),e}}},44290:function(e,a,t){var r=t(69765),c=t(95401).set,n=r.MutationObserver||r.WebKitMutationObserver,d=r.process,o=r.Promise,f="process"==t(93760)(d);e.exports=function(){var e,a,t,i=function(){var r,c;for(f&&(r=d.domain)&&r.exit();e;){c=e.fn,e=e.next;try{c()}catch(n){throw e?t():a=void 0,n}}a=void 0,r&&r.enter()};if(f)t=function(){d.nextTick(i)};else if(!n||r.navigator&&r.navigator.standalone)if(o&&o.resolve){var s=o.resolve(void 0);t=function(){s.then(i)}}else t=function(){c.call(r,i)};else{var b=!0,l=document.createTextNode("");new n(i).observe(l,{characterData:!0}),t=function(){l.data=b=!b}}return function(r){var c={fn:r,next:void 0};a&&(a.next=c),e||(e=c,t()),a=c}}},80320:function(e,a,t){"use strict";var r=t(67281);function c(e){var a,t;this.promise=new e((function(e,r){if(void 0!==a||void 0!==t)throw TypeError("Bad Promise constructor");a=e,t=r})),this.resolve=r(a),this.reject=r(t)}e.exports.f=function(e){return new c(e)}},91760:function(e,a,t){var r=t(79478),c=t(75475),n=t(2158),d=t(11383)("IE_PROTO"),o=function(){},f=function(){var e,a=t(80244)("iframe"),r=n.length;for(a.style.display="none",t(45942).appendChild(a),a.src="javascript:",(e=a.contentWindow.document).open(),e.write("